A snapshot of the implementation on 2026-11-30

The coach behind the training plan on this site is an AI agent. It plans, reviews and adjusts long-course endurance training for one athlete, working from a repository of plain-text files. This page shows how it is built and how it works.

1. The whole picture

One AI agent, one athlete, one repository of plain text, and the training platforms.

Athlete asks, and reports how sessions felt says yes or no chat Coach Claude Code an AI agent that runs one workflow per task and reads only what it needs writesreads Repository (git) ConstitutionCLAUDE.md Methodologycoaching/ Athlete modelathlete/ Plansplans/ Reviewsreviews/ Raw datadata/ Scriptsscripts/ Platforms Garmin Connect Stryd TrainingPeaks Watch fetch sync plan writes only, on the athlete's yes or a rule they set
Under the hood
  • Claude Code runs inside a git repository of Markdown files. CLAUDE.md is the constitution: the objective, the evidence standard, the safety rules, the decision framework and which source wins when two disagree. It is loaded in every session; everything else is read on demand.
  • Each recurring task is a workflow file in .claude/commands/, such as /check-in, /weekly-review, /block-plan, /block-review, /test-review and /push-plan. A workflow names exactly which files it reads.
  • Python scripts fetch and read the platform data: Garmin Connect through a command-line client, Stryd through its web API, TrainingPeaks through an MCP server. WKO5 has no API, so its numbers are pasted in.
  • Hooks at session start list what is due and start the data fetches in the background.

2. Inside the repository

Every file has one job. The last line of each entry says who writes it: ◆ waits for the athlete's yes, ● is a record.

coaching/ methodology performance-model.mdWhat decides long-course performanceevent demands · capacity · limiter model◆ only on a proposal the athlete accepts metrics.mdWhich metrics count, and how long a value stays validtiers · per-sport metrics · cadence · evidence horizons◆ only on a proposal the athlete accepts fueling.mdCarbohydrate, hydration and energy availabilitycarbohydrate · hydration and heat · energy screen · race day◆ only on a proposal the athlete accepts evidence.mdWhere every claim comes fromclaims by topic · verification states · re-check queue · corrections◆ /block-review re-checks 1–3 claims; changes on yes planning.mdHow seasons and blocks are planned and adjustedseason · blocks and hypotheses · progression · plan of record◆ only on a proposal the athlete accepts workouts-and-testing.mdHow sessions are prescribed and tests are runprescription standard · session types · test protocols◆ only on a proposal the athlete accepts tools.mdWhich source settles which number; platform rulesauthority by quantity · write rules · data flow◆ only on a proposal the athlete accepts review-protocol.mdWhat each review must establishreviews · adjustment thresholds · output · learning loop◆ only on a proposal the athlete accepts athlete/ the athlete model athlete.mdStable facts: accounts, availability, constraintsidentity and accounts · availability · tools · motivation◆ /onboard, then /update-state; on yes current-state.mdThresholds, limiters and fitness, each datedlimiters · capacity per sport · fueling · data gaps◆ /onboard, then /update-state; on yes goals-and-events.mdGoals, race calendar, what the A-race demandsgoals · calendar · A-race demands · success criteria◆ /onboard, /season-plan, /update-state; on yes training-response.mdHow this athlete responds to trainingresponses · prediction ledger · open questions◆ /onboard, /block-review, /update-state; on yes athlete-log.mdThe log's rules and its indexrules · index · closed threads● with every log entry; a record log/One file per observation that is not a numberlog/<YYYY-MM-DD>-<slug>.md● /onboard, /check-in, /weekly-review, /push-plan; a record open-threads.mdObligations still owed, with how each closesyours to decide · carried by the coach◆ opening one needs a yes; each block review rules on it pending.md (optional)Questions waiting for the athlete's answerone line per question● written when work lands; a record sources/Files the athlete suppliedcourse files and the likeread-only plans/ season-<YYYY>.mdThe season, worked backward from the A-racephases · race model · gap trajectory · checkpoints◆ /season-plan, on yes; /block-review fills in results blocks/<YYYY-MM>-<slug>.mdOne block: the plan of recordhypothesis · success criteria · key workouts · notes · change log◆ /block-plan, on yes; notes and change log are records reviews/ audits/ holds reviews of the repo weekly/<YYYY>-W<nn>.mdWhat happened in one weekplanned vs done · energy screen · log trend · next week● /weekly-review; a record blocks/<block>-review.mdThe verdict on one blockresults · limiter change · season impact · learning◆ /block-review; the verdict needs a yes workouts/<YYYY-MM-DD>-<slug>.mdOne key sessiontarget vs observed · interpretation · action● /workout-review; a record tests/<YYYY-MM-DD>-<slug>.mdOne field testprotocol · results · data quality · proposed thresholds● /test-review; a record data/garmin/ · stryd/ · trainingpeaks/ · wko/ — platform exports, fetched by scripts or pasted from WKO, never edited; fetch and write logs scripts/fetchers · readers (one per source) · writers (calendar, watch) · self-checks (verify, due, reviewlog) · unit tests .claude/commands/one file per workflow: what it reads, what it does, what it writes; shared steps in _shared.md templates/blank scaffolds for the athlete files, plans and reviews; copied, never filled in place (athlete files only once)

Three files, as they look inside. The contents are invented.

coaching/evidence.md
### E-nn
Carbohydrate in races
over 2.5 hours
Used by: fueling.md § 1
Source:  systematic review
Level:   1
State:   Verified, <date>
Every rule that sets a number rests on a source, with its level and state.
athlete/training-response.md
Prediction ledger
Block:      B-n
Predicted:  if X changes,
            test Y improves
Stated
confidence: Medium
Observed:   ...
Verdict:    partly confirmed
A prediction that could fail, and its verdict, which the athlete confirms. Enough verdicts calibrate "confidence".
athlete/current-state.md
Threshold power: ___ W
  [as of <key> <date>]
  — Basis: field test,
    <review>
Every value carries its evidence date and basis; metrics.md says when it expires.

Each workflow reads a short list of its own. Rows are workflows; columns are files.

CLAUDE.md performance-model metrics fueling evidence planning workouts-and-testing tools review-protocol athlete current-state goals-and-events training-response athlete-log log/ open-threads season blocks/ weekly/ blocks/ workouts/ tests/ data/ platforms coaching/ athlete/ plans/ reviews/ /onboard /season-plan /block-plan /check-in /workout-review /weekly-review /block-review /test-review /update-state /fetch-garmin /fetch-stryd /fetch-trainingpeaks /push-plan /push-workouts readsreads in some caseswrites a recordwrites on the athlete's yes, or a rule the athlete set
Under the hood
  • Each workflow's reading list lives in its own command file and nowhere else, so there is never a second copy to drift.
  • CLAUDE.md is loaded in every session, so its column is full.
  • /review-implementation is left out. It checks the repository itself and reads the whole vault by design: the one exception to "read only what the task needs".
  • The block file holds both kinds of write. The plan is a decision, changed on the athlete's yes. Mid-block notes and the change log are records.
  • Workflows that end in a calendar change hand it to /push-plan, which writes the platforms on one yes. The weekly review may re-sync the watch under a rule the athlete set.

3. What it aims at, and what it trusts

One target. Two ladders decide which evidence counts and which number wins.

The target the best race the athlete can sustain on race day, arriving healthy, recovered and prepared Fitness numbers such as FTP, CTL, VO2max or weekly volume are inputs, not goals. Which research counts▲ stronger Which number wins▲ stronger 1Systematic reviews and meta-analyses 2Consensus statements and position stands 3Controlled studies 4Observational studies of trained athletes 5Exercise-physiology principles 6Practice of respected coaches 1An actual race performance 2A standardized field test 3Repeated training evidence 4A validated model for the sport 5A general model 6A population formula

When two sources disagree, the higher rung wins. A model never overrides a recent real performance; the gap is investigated instead.

Under the hood
  • Every claim from research that sets a number, a threshold or a cadence carries a marker such as [E-12]. The marker points into an evidence register, coaching/evidence.md, which holds the source, the level of evidence and whether it has been verified. A claim from memory is marked "unverified" wherever it decides something; a house convention is labelled as one.
  • No named method (80/20, polarized, threshold-heavy and so on) is a goal in itself. The approach comes from the athlete, the event and how the athlete has responded so far.

4. The rhythm over time

Loops inside loops: the season holds blocks, a block holds weeks, a week holds days.

Season plan: written backward from the A-race A-race reading window ≈ 90 days Season B1B2B3B4B5B6B7B8B9B10B11B12 Block Week 1 · BuildWeek 2 · ProgressWeek 3 · OverloadWeek 4 · Recovery + tests ▲ block plan: one main aim, one testable hypothesis block review: a verdict on the hypothesis ▲ Week MonTueWedThuFriSatSun ● check-in: any day weekly review when the week ends ▲ Day Session startnew data fetched; what is due Check-inis today's session still right? Sessiondone on the watch Workout reviewkey sessions only
Base Build Specific Peak Taper
Under the hood
  • The season plan (plans/) works backward from the main race. Each block (plans/blocks/) usually has four weeks: build, progress, overload, and recovery with tests.
  • A script, due.py, runs at every session start. It lists what is owed: a week without a review, a block ending with no next block, a value whose evidence is too old, an obligation coming due. When nothing is owed, it prints nothing.
  • The coach reads reviews from about the last 90 days. Older reviews are history, except races, the latest block review and the latest comparable test. What must last is written into athlete/training-response.md.
  • Methods change only between blocks, unless safety requires otherwise.

5. How a decision is made

Every significant recommendation can be traced through nine questions. Plans are then attacked by critics, and the athlete decides.

123456789 Event demandwhat the race requires Capabilitywhat the athlete cando today Gapbetween the two Limiterthe one that mattersmost Stimulusthe training most likelyto move it Recovery costwhat it takes outof the athlete Interactionwith the other sportsand strength Fuelingits energy cost; a racerehearsal? Measurehow we will knowit worked Criticsattack the plan;verifiers check them The athlete decides Inputs: the athlete model and this athlete's own response record, which outranks any general model.
Under the hood
  • Before a season plan reaches the athlete, four critic agents attack it, each from one side: rates, structure, risk and evidence. Two verifier agents then try to disprove the critics. A block plan gets a lighter version.
  • When the athlete chooses differently, the coach states its advice once, plans what the athlete chose, and records both in the athlete log.

6. Where the data flows

Many ways in, one way out. The block file is the plan; the calendar is a copy of it.

read only → Garmin ConnectStrydTrainingPeaksWKO5 (pasted) Fetch scriptsone per platform;right account only Raw datadata/written by the fetch,never edited Reader scriptsrules, not judgement;a warning travelswith its number Coachreads, judges,writes Athlete conversation and files Reviewswhat happened Athlete modelstate, response, log Block planthe plan of record pushafter yes TrainingPeakscalendar: a copy sync Watchwhat gets executed a date the athlete moves by hand goes back into the block
Under the hood
  • Fetch scripts: fetch-garmin.py, fetch-stryd.py and fetch-trainingpeaks.py. Each one checks that the live account is the athlete's own, and refuses if it is not.
  • Reader scripts: one per source (garmin.py, stryd.py, tp.py, wko.py). Anything that follows from the data by a rule is done in a tested script, not by the AI. Reading recipes written in prose proved too error-prone.
  • Writers: tpw.py writes the TrainingPeaks calendar. gw.py writes strength sessions to the watch, because TrainingPeaks does not sync strength to Garmin. Every write is logged with its reason, and completed sessions cannot be touched.

7. How it learns

Two lanes. What this athlete shows outranks what the literature says about athletes in general.

↻ Outer loop: a miss asks for a check. Which reviewer, check or test should have caught it? This athlete Hypothesistestable, writteninto the block plan Training blockusually four weeks Verdictconfirmed, partly,refuted, untestable Prediction ledgerevery verdict is kept Calibrationis "high confidence"actually earned? ▲ this athlete's demonstrated response outranks the literature The literature Claima rule that setsa number or a limit Evidence registersource, level,verified or not Re-check1–3 questionsper block Verified: stays Superseded Prunedevery rule citing itis re-examined
Under the hood
  • athlete/training-response.md records how this athlete responds, one entry per finding, each with a test that would prove it wrong. It also holds the prediction ledger and a calibration table: "high confidence" counts as measured only after enough verdicts at that level.
  • The evidence register is re-checked 1–3 questions per block, chosen by how much a wrong answer would change training. One agent finds sources; a separate agent verifies them.
  • At a block review the athlete's response is read first and the literature last, so the literature cannot explain away what actually happened.
  • The evidence a change needs grows with what it costs the athlete. A change is proposed to the athlete, never applied silently.

8. How it stays consistent

Every change takes the same path, and the rules are checked by machine, not by memory.

Changea rule, a planor code Branchthe live versionstays untouched Checksa checker reads therules in the prose; tests Reviewslogged with theversion they read Athlete's yesto this change,not the next one Live records: no yes needed Three rules behind it One home per facteach value lives in one file;every copy points back to it Source precedencewhen files disagree, a fixedorder of authority decides Append-only logan entry is superseded,never edited
Under the hood
  • scripts/verify.py runs about thirty checks over the Markdown: links and anchors, evidence markers, one home per fact, the safety screen in place, each workflow's reading list, and more. It runs before every commit.
  • A unit-test suite covers the scripts, and a mutation pass checks that the tests would notice a broken line.
  • Every review is logged with the exact version it read. A change can land only when every commit in it was reviewed and the tests pass.
  • Source precedence, highest first: the athlete's instruction now, the constitution, current state and goals, this athlete's demonstrated response, the active plan, the methodology, old reviews and plans.
  • Each commit is tagged as generic coach or athlete-specific, so the coach can be separated from anyone's data.
  • A defect asks for a check: each serious defect raises the question whether a new check or test could catch its kind next time.

9. Guardrails

The coach works on its own where it records. Where it decides, it waits for the athlete.

Recordsthe coach writes them on its own • data fetched from the platforms • workout, test and weekly reviews • entries in the athlete log still checked and reviewed before they land Decisionswait for the athlete's yes • a change to the block or the season • a write to the calendar or the watch • a threshold or a training zone • a block's verdict • a change to the evidence register • a new obligation to follow up A coach, not a doctorred-flag symptoms or signs oflow energy availability lead toa referral, not a plan The athlete decidesthe advice is given once;the decision is logged and raisedagain only on new evidence No invented numbersa missing value is namedas a gap, never estimated
Under the hood
  • Four workflows need the athlete present: onboarding, the season plan, the block plan and the block review.
  • Onboarding is an interview. The coach first reads what the platforms hold, then asks what no file can hold: why the athlete trains, what drains them, what they want from a coach.
  • The athlete log records what is not a number: motivation, life context, confidence. A sustained decline counts as a signal, just like poor recovery markers.

10. Three examples

Invented scenarios, to show the paths through the system. Each card points to the section it shows.

Heavy legs

1The athlete says the legs felt heavy on the long ride.check-in · §4
2The coach logs it. A record, so no yes is needed.§9
3The weekly review sees the same note repeat. A trend, not a bad day.§4
4The coach proposes a lighter week and says why.§5
5The athlete says yes.§9
6The block changes; the calendar and the watch follow.§6

A field test

1The block plan schedules a threshold test.§4
2The data is fetched; scripts read the result.§6
3The test review checks that the test was valid, then compares it with the last one.§3
4The coach proposes a new threshold.§9
5The athlete says yes. The state file records it with its date.§8
6The training zones on the platforms follow.§6

One block

1The block plan states a hypothesis that could fail.§7
2Critics attack the plan; the athlete approves it.§5
3Weeks of check-ins and weekly reviews.§4
4The block review proposes a verdict; the athlete confirms it.§7
5The verdict joins the ledger; the lesson joins the response file.§7
61–3 evidence questions are re-checked before the next block.§7