GodTalk — Architecture

How the concept in CONCEPT.md is built: the systems involved, the data model, the pipelines, the agent loop, the guardrails and the deployment.


1. Principles

Five decisions shape everything below.

  1. Build each capability in the system that owns it. GodTalk is a product, not a platform. The graph, retrieval and reasoning live in Syntagraph. Agents, scheduled jobs and outside integrations (TikTok, Instagram, transcription) live in Complexity. GodTalk owns the app, the person model, the session engine, the bounds policy and its MCP server. Where an owner lacks something GodTalk needs, it gets added to the owner, not worked around in GodTalk.
  2. Search is Syntagraph. GodTalk has no retriever, ranker, embedding index or keyword index of its own. Every "find the verse", "find the story", "find the clip", "how many balances touch X" is a call to Syntagraph (ask, find, sentence_search, related, trace, star, algebra_eval, hql_query). GodTalk only composes the request and interprets the answer.
  3. The balance map is curated data, not model output. The ~400 balances are typed, versioned, cited facts in the graph, reviewed by people. The model uses the map; it does not invent it at runtime.
  4. Every claim is grounded and checkable. Every verse reference in an answer is resolved against the stored text. Every correction names a balance in the map. An answer that cannot be grounded is not sent.
  5. Claude runs on Amazon Bedrock. All model calls go through the Anthropic SDK's Bedrock client, called in AWS account 779590667519. Everything else (storage, compute, secrets) lives in 944599182879.

2. System map

                         ┌────────────────────────────────────────────┐
   phone / web           │                 GodTalk                    │
  ┌──────────┐  HTTPS    │  App (Next.js / React Native)              │
  │  person  │──────────▶│  API (session engine, person model,        │
  └──────────┘           │       bounds policy, visual composer)      │
        ▲                │  godtalk-mcp (tools for agents)            │
        │ visuals,       └──────┬─────────────┬──────────────┬────────┘
        │ clips                 │             │              │
        │                       │ ask / find  │ jobs         │ Claude
        │                       ▼             ▼              ▼
        │              ┌──────────────┐ ┌─────────────┐ ┌──────────────┐
        │              │  Syntagraph  │ │ Complexity  │ │ Bedrock      │
        │              │  Bible graph │ │ Apify jobs  │ │ (779590667519)│
        │              │  Balance map │ │ transcribe  │ │ Opus / Sonnet│
        │              │  Content     │ │ classify    │ │ / Haiku 5.5  │
        │              │  retrieval   │ │ schedulers  │ └──────────────┘
        │              └──────▲───────┘ └──────┬──────┘
        │                     │  writes facts  │
        └── embeds from ──────┴────────────────┘
            TikTok / Instagram / YouTube (original hosts)
System Owns for GodTalk Does not own
GodTalk App UI, sessions, person model (drift vectors), bounds policy, answer composition, visual composer, godtalk-mcp, analytics Any search, ranking, indexing or graph storage
Syntagraph Bible graph, balance map as typed facts, content nodes, cross-references, all retrieval and reasoning (scan, lenses, query algebra, verification, method selection) User accounts, UI
Complexity Apify integrations for TikTok and Instagram, transcription, scheduled ingestion, content classification agents, the balance-mining agent jobs Storage of the facts it produces (it writes them into Syntagraph)
Holotext Syncing the book drafts (Principles of the Game) into the archive so Syntagraph can read them as sources Search (it only passes questions to Syntagraph)
Bedrock Claude inference Nothing else

3. The corpora

3.1 The Bible

Source files live in this repo at bible/:

Planned additions, all public domain or open-licensed:

3.2 The book

Principles of the Game/ is a symlink to ~/Books/Principles of the Game. The relevant drafts are:

Holotext syncs these into the archive; Syntagraph ingests them as sources, so every balance can cite the paragraph of the book it came from as well as the verses.

3.3 Short-form content

TikTok, Instagram Reels and carousels, YouTube Shorts and selected long-form teaching. GodTalk stores metadata, transcript, classification and a link, never the media file. Playback uses each platform's official embed. That keeps creators credited, keeps their view counts, respects takedowns, and keeps GodTalk out of re-hosting copyrighted media.

4. The graph model (in Syntagraph)

Everything theological and every piece of content is a typed node with cited evidence. Proposed types, to be added to Syntagraph's schema (checked with describe_schema first; anything missing is added there):

Type Key fields Main edges
Verse ref, translations{}, book, chapter, verse in_passage, cross_ref, quotes
Passage range, title, genre (narrative, law, wisdom, prophecy, gospel, epistle, apocalyptic) contains, features_person, teaches_balance
Person / Event / Place names, period appears_in, fell_to_pole, held_balance
Law number (1–12), name, tagline, movement (I–III), enemy, armour receives_from, gives_to (the chain), has_balance
Balance id (e.g. L06.B03), name, pole_a, pole_b, grasping_failure, shrinking_failure, centre_description, status (draft / reviewed / live), map_version in_law, touches_law, pole_a_evidence, pole_b_evidence, exemplar, casualty, counter_move, practice, source_in_book
WarningSign description, pole (grasping / shrinking) signals, answered_by
CounterMove instruction, duration restores, grounded_in
Practice instruction, cadence builds, grounded_in
ContentItem platform, url, creator, duration, transcript_ref, language teaches_balance (with pole + push), depth, form, cites_verse, bounds_status
Creator handle, platform, tradition (self-declared), quality score made

Every edge from a Balance or ContentItem to Scripture is a claim with quoted evidence: the exact verse text in a stored translation. Syntagraph's verify_claim and numeric_consistency run over these, so a misquoted verse or a made-up reference is caught at write time, not at answer time.

4.1 Balance identity

L{law}.B{n} with the D1 law order:

L Law L Law L Law
01 Creativity 05 Love 09 Integrity
02 Calling 06 Truth 10 Endurance
03 Courage 07 Learning 11 Wisdom
04 Joy 08 Strength 12 Authority

B01–B07 are reserved for the book's canonical juggles (84 in total). B08–B32 are mined (§5.2). IDs are stable across map versions; a retired balance keeps its ID with status=retired.

5. Pipelines

5.1 Bible ingestion (one-off, then on change)

  1. Load verses.jsonl into Syntagraph as Verse nodes, with all translations as fields of the same node.
  2. Load cross-references as cross_ref edges with their vote weight.
  3. Load pericopes and the people, place and event metadata.
  4. Load the original-language layer and attach Strong's lemmas.
  5. Syntagraph builds whatever indexes its own retrieval methods need. GodTalk does not build any.

Owner: Syntagraph (an import job; Complexity can schedule it).

5.2 Balance mining (the ~400)

The map is derived from the Bible by a Complexity agent job that writes draft facts into Syntagraph, then people review them. Per Law:

  1. Seed from the book: the 7 canonical juggles, the enemy, the paradox, the warning sign, the chain neighbours.
  2. Harvest tensions from Scripture with Syntagraph: sentence_search and ask over the Law's themes, cooccur to find passages where two goods appear together, contrast for paired opposites, the cross-reference graph for passages that answer each other (Prov 26:4/26:5; Jas 2:24/Rom 3:28; Eccl 3:1–8 as a ready-made list).
  3. Test each candidate against the five criteria in the concept (two poles each with ≥2 passages; a casualty on each side; a centre; one home Law; distinct from existing balances). Syntagraph's overlap and compare reject near-duplicates.
  4. Fill the record: failure modes, warning signs, counter-move, practice, exemplars and casualties from the people graph.
  5. Adversarial check: a second agent tries to break the balance (is one pole actually unbiblical? is this a denominational dispute disguised as a balance?). Disputed items are flagged, not dropped silently.
  6. Human review in a review queue (Syntagraph propose_decision → approval card). Only reviewed balances go live.
  7. Publish a map version (map_version = 1.0, 1.1, …). Person profiles keep the version they were measured against.

Target is 12 × 32 = 384. The number is a target, not a quota: a Law with 26 real balances keeps 26.

5.3 Content ingestion (continuous)

Owner: Complexity (jobs + integrations), writing into Syntagraph.

  1. Discover: Apify actors for TikTok (hashtag, search and creator scrapers) and Instagram (hashtag, profile and reel scrapers), seeded with (a) balance-derived search terms ("forgive but not trust", "righteous anger"), (b) a curated creator list, (c) whatever users share into the app. Scheduled per balance so thin balances get more search effort.
  2. Fetch: metadata, captions, on-screen text, and the audio track for transcription (held temporarily, deleted after transcription).
  3. Transcribe: speech-to-text with timestamps.
  4. Classify (Claude on Bedrock, Haiku 5.5 for bulk, Sonnet 5.5 for borderline cases): which balances it teaches, which pole it pushes towards, depth (1–5), form, length, verses cited or alluded to. All verse references are resolved against the stored text.
  5. Bounds check (§8): within the bounds / disputed / out of bounds. Out-of-bounds items are kept as nodes (so they are never re-ingested) with bounds_status=out and are never recommended. Their transcripts are useful negative examples for classifiers and for the "what the feed is telling you" view.
  6. Quality: theological accuracy, clarity, and production quality, from a Sonnet rubric and the creator's history. Popularity is a weak signal and never overrides accuracy.
  7. Write a ContentItem with teaches_balance edges into Syntagraph.

5.4 Original visuals

Where no good clip exists for a solution, GodTalk composes its own: story cards, timelines, seesaw animations, word-study cards. These are generated from graph data (passage, people, events), not free-form image generation, so they cannot drift from the text. Optional rendered short videos (narration plus generated scenes) go through the same bounds check as external content before they are shown.

6. The person model

The person model is the one piece of "intelligence" GodTalk owns, because it is about the user of this product and nothing else.

State per person:

Signals that move drift (each a small, decaying update with its evidence stored):

Signal Example Weight
The question's framing "How do I make God answer my prayer faster?" → grasping on Faith ↔︎ Patience medium
Repeated themes the same grievance told three sessions in a row high
Self-check a two-option "which sounds more like you this week" card high, explicit
Content reactions consistently skips challenge content on one balance low
Shared clips clips the person brings in from their own feed low-medium; describes the feed more than the person
Practice outcomes "I tried it, and here's what happened" high

Rules:

Privacy: religious belief is special-category data under GDPR Art. 9. The person model is stored only with explicit consent, is exportable and deletable from the app, is encrypted at rest (KMS), is never used for advertising, and is never shared with creators. Without consent, GodTalk works per session only: the map still lights up, but nothing is remembered.

7. The session engine (the agent loop)

Each question runs through the same loop. The model is Claude Opus 5.5 on Bedrock for the reasoning steps and Haiku 5.5 for fast classification; the loop itself is deterministic code with tool calls, not a free-roaming agent.

LISTEN → READ → LOCATE → DIAGNOSE → SEEK → VERIFY → SHOW → PRACTICE → RETURN
  1. LISTEN: take in text, voice (transcribed) or a shared clip (resolved to a ContentItem, or ingested on the fly through Complexity).
  2. READ: classify the question: the literal ask, the emotional state, the framing, the risk level. Safety gate first: if the question signals crisis (self-harm, abuse, danger), the loop stops and returns the crisis route. No diagnosis, no balances.
  3. LOCATE: map the question to candidate balances. GodTalk calls Syntagraph with the question and the person's top-drift balances as context (ask with a typed answer request over Balance nodes; related to expand along the chain). Syntagraph returns ranked balances with their evidence.
  4. DIAGNOSE: combine the located balances with the person model. Pick one or two. Decide the direction (grasping or shrinking) and the upstream Law to check. Decide the content axes: push = against the drift; depth = the person's level plus one step; form and length from the profile.
  5. SEEK: the agentic search for the godly way through. A bounded multi-step plan, every step a Syntagraph call:
    • the commands and teaching that speak to the centre of the balance (find over Passage with teaches_balance);
    • a person in Scripture who stood in the same place, and what they did (trace over Person → Event → held_balance / fell_to_pole);
    • how the rest of Scripture reads those passages (related along cross_ref);
    • the book's counter-move and practice for that balance (get_node on the balance);
    • for depth ≥ 4, word studies from the original-language layer. The plan stops when it has: one central passage, one exemplar, one counter-move, and (optionally) one deeper note. Max 8 Syntagraph calls per session; Syntagraph's own method selection decides how each call is answered.
  6. VERIFY: the answer draft goes through the bounds policy and the anti-sycophancy critic (§8). Every reference is resolved and quoted from the stored text. Failures go back to step 5 or 4 once; after that the system answers more modestly rather than inventing.
  7. SHOW: compose the response: the map view (which balances lit, which way the person leans), the diagnosis in two sentences, the solution (passage + exemplar + counter-move) rendered as visual cards, and the content stack. Content comes from Syntagraph find over ContentItem filtered by balance, pole-push, depth, form and bounds_status=in, then re-ordered by GodTalk's content axes. GodTalk filters and orders; Syntagraph retrieves.
  8. PRACTICE: offer one practice, with a time frame.
  9. RETURN: schedule a check-in. On return, ask what happened and update the drift from the outcome.

8. Guardrails: staying inside the bounds

8.1 The bounds policy

A versioned document plus a set of machine checks, owned by GodTalk:

8.2 The anti-sycophancy critic

A separate Claude call (different prompt, same model family) reads the person's message, their drift, and the draft answer, and scores:

  1. Did the draft agree with the tilt? If the person is drifting to grasping and the draft empowers, or drifting to shrinking and the draft deepens the lament, it fails.
  2. Is the correction specific? Conviction names a thing and a next step; accusation names an identity. Accusation fails.
  3. Is it true? Every scriptural claim has a resolved, quoted reference, and the reference actually says it (checked with Syntagraph verify_claim).
  4. Is it kind? Tone, timing, no contempt.
  5. Does it end in a solution? No answer may end on the diagnosis.

A fail on 1, 2, 3 or 5 blocks the answer. A fail on 4 triggers a rewrite.

8.3 Evaluation

A standing test set, run on every change to prompts, models or the map:

Results are tracked per release; a regression blocks deployment.

9. The app

10. Deployment

Component Where Account
App + API ECS Fargate behind CloudFront (or Lambda for the API if traffic stays light) 944599182879
Person model DynamoDB (on-demand), KMS-encrypted 944599182879
Sessions / short-term state DynamoDB with TTL 944599182879
Secrets (Apify token, etc.) Secrets Manager 944599182879
Static assets, generated visuals S3 + CloudFront 944599182879
Claude Bedrock, via the Anthropic SDK's Bedrock client (anthropic.-prefixed model IDs), assuming a role in 779590667519 (as with holotext-bedrock) from the API's task role 779590667519
Graph + retrieval Syntagraph (existing deployment) Syntagraph's
Ingestion jobs Complexity (existing deployment) Complexity's
Domain Route 53 hosted zone; registrar gets only the 4 nameservers 944599182879

The app is public. Model calls cost money, so the API applies a per-device rate limit (e.g. 20 sessions per day) and per-IP burst limits, but no access code or login.

11. Cost shape (rough)

Per session: one Haiku classification, one Opus reasoning pass with up to eight Syntagraph tool calls, one critic call, and one composition call. With prompt caching on the bounds policy and the Law summaries, which are the same for every session, the model cost per session is a few cents. Ingestion costs are dominated by Apify runs and transcription, are scheduled, and can be capped per day in Complexity.

12. Build order

  1. Map v0.1: load the Bible and the 84 canonical juggles into Syntagraph. Check that ask / find return the right balances for 100 real questions.
  2. Session engine v0.1: LISTEN → VERIFY with text only and no person model; the critic and the eval set from day one.
  3. Content v0.1: Complexity jobs for TikTok and Instagram on 20 balances, with a hand-reviewed sample.
  4. App v0.1: the ring map, the seesaws, the solution cards, embedded clips.
  5. Person model with consent, returns and practice outcomes.
  6. Balance mining to ~400, with the human review queue.
  7. godtalk-mcp (see MCP.md), so the same engine is usable from Claude, Copilot-style agents and partner apps.
  8. Czech launch, original visuals, the pastor and small-group view.

13. Open questions