Who the athlete is. Training maxes, injuries, weekly floors, schedule anchors, time caps.
people/<name>/intake.yaml
âł every load the plan leans on resolves back to a number here.
The cited knowledge base. One claim per bullet, each tagged [id][authority][source]. StrongFirst ¡ Bryan Johnson ¡ Jack Daniels.
corpus/<authority>/*.md ¡ corpus/INDEX.md
âł the retrieval substrate â the only knowledge the model may cite.
đ
authority.registry.yaml
Who is allowed to back a claim. Active vs. stub authorities, each with a cite-prefix (SF, BJ, JDâŚ).
authority.registry.yaml
âł only status: active authorities may be cited. Adding a coach = 1 entry + 1 corpus file.
What actually happened. Logged sessions and how they felt â returns from the daily loop & app sync.
people/<name>/feedback.yaml
âł closes the loop â feeds the next block. (see the living loop below)
Before anything runs: prove the knowledge base is sound.
src/verify-corpus.ts
â every bullet well-formed
â ids unique
â authority is active
â source pointer present
ONE LLM call. Prompt = intake + feedback + registry + all corpus bullets + a precomputed training-max table. The model writes program.json.
src/generate.ts ¡ claude -p
⢠loads precomputed â can't invent numbers
⢠must cite every line
⢠3 retries ¡ parse-or-fail ¡ 20-min timeout + heartbeat
the model proposes â it never gets the last word.
03
L1 ¡ Deterministic Gate
~47 CHECKS
Rules in code, not prompt-hope. Each prescription is re-derived and re-checked:
STRUCT schema valid ¡ 4 wks à 7 days ¡ recovery day ¡ unique ids
CITE every line cited ¡ resolves ¡ authority active ¡ no fabricated coach names ¡ {NEEDS_*} only in deferred[]
GUARD weekly floors met (strength / Z2 / Z5 / mobility) ¡ ledger honest
LOAD load_kg = round2.5(TM à %) ¡ no 1RM-test ask
INJ forbidden lifts never prescribed (compiled from injuries)
TIME each session fits the time cap ¡ schedule anchors honored
src/verify-L1.ts
REFUSES
one FAIL â the block cannot render.
04
L2 ¡ Adversarial Gate
âĽ2 ROUNDS
Two fresh Claude calls argue over the plan:
đľď¸ Auditor
sees only the artifacts. Files objections â evidence must be a real bullet / rule / intake path, or it's downgraded.
đĄď¸ Defender
concedes â revises program â re-runs L1, or rebuts with a citation.
src/verify-L2.runner.ts
verdict â
CONVERGED ¡
IMPASSE ¡
ESCALATE
The do-today plan is written only if:
â L1 = 0 failures
â L2 = CONVERGED
Views render deterministically from program.json â they can't drift from the verified plan.
src/render-views.ts
REFUSES
else no user plan is produced at all.
đ Verified Block
user-view.md
do-today plan: loads in kg, effort (RIR) cues, what to log.
expert-view.md
the why: trust table, how each weight was derived, honest abstentions.
đŹ Daily Chat
Talk to the coach in the Claude desktop app.
/today
/debrief
/log
/sync
/block
âł any request to change the plan is routed to the adjust gate â chat can't edit the plan directly.
âď¸ The Adjust Gate
THE ONLY WAY THE PLAN CHANGES
Bounded mutation: stage a copy â apply one patch â re-run L1 â promote or discard. Every change is logged.
ALLOWED PATCHES
swap days ¡ scale session ¡ substitute exercise ¡ move session ¡ skip session
FORBIDDEN
TM changes ¡ floor changes ¡ intake / corpus edits ¡ moving a schedule anchor
src/adjust.ts ¡ runs/<id>/adjustments-log.md
âł a change that would break a rule is rejected with the exact failing L1 rule â nothing saved.
đ App Sync
Push the verified block to Hevy (routines) + Garmin (workouts). Pull your actuals back into feedback.yaml.
src/sync/hevy.ts ¡ src/sync/garmin.ts ¡ src/sync/floors.ts
âł floors.ts compares your measured week against your declared minimums.
â Trusted plans
The model proposes once; code and an adversary dispose. A deterministic gate, an adversarial gate, a human backstop, and a ship gate stand between generation and you.
⥠Knowledge retrieval
A curated, cited corpus + a registry of who is allowed to speak. Cite-or-abstain: a claim resolves to a real source bullet from an active authority, or it's honestly parked as {NEEDS_AUTHORITY}.
⢠Verification
Invented numbers, fabricated coach names, broken citations, violated injuries, over-cap sessions â all caught in code, then re-attacked by a blind auditor. Break one citation and the plan won't render.
This is a domain-agnostic trust engine
â swap the corpus & the rules; the architecture holds.
Truth Layer (cited sources + registry)â
single generationâ
deterministic gateâ
adversarial gateâ
human escalationâ
ship gateâ
bounded mutation
The model never gets the last word. Fitness today â compliance, legal, medical, finance tomorrow.