AI endurance coach · how it works

Inside the Signal Coach

An endurance coach that athletes text on Signal. It reads each athlete's Intervals.icu calendar and fitness, plans cycling, running and swimming with strength around their week, and writes to their calendar only after they say yes. Claude does the reasoning. Code does the numbers, the sessions and the safety checks.

3 sports
Cycling, running and swimming, plus strength and core
1,450+
automated tests in the code base
100+
coaching scenarios in the graded suite
$10
monthly model budget per athlete, enforced in code

The system

From a message to a planned week

The athlete writes on Signal, in French or English. The coach answers with Claude, reading and writing the athlete's calendar through an MCP server I wrote for Intervals.icu. From there, sessions sync to the athlete's Wahoo, Garmin or Zwift. Between the model and the calendar sits a layer of plain code: the workout library, the rules that can block a plan, and the approval step.

Athlete on Signal THE COACH Agent LangGraph Code layer Workout library: writes every session 7 rules that can block a plan Approval: nothing written without a yes Claude reasons, picks formats MCP server Intervals.icu calendar Wahoo · Garmin · Zwift sessions sync here
The model never writes to the calendar directly. Every plan goes through the code layer first.

Context

What the model reads on every call

A long conversation drags old plans and old numbers along, and a model ends up leaning on them. So each call is rebuilt in the same order, with only what is true today.

  1. 1

    Training methodfixed · cached

    Zones, periodization, recovery. Never changes, so it is read from the prompt cache.

  2. 2

    The athlete's state todayrebuilt every call

    Fitness, fatigue, form, availability, recovery and the last two weeks, computed by code.

  3. 3

    The conversationtrimmed

    Old tool results are cleared and long threads summarized. The summary keeps no numbers and no plans.

To check it, I built fake conversations one week, one month and three months long, with traps hidden in them. At the end, seven questions check that the coach answers with today's facts.

Trap · FTP

A 276 W test result mentioned in the thread but never saved. The coach must still use the FTP actually set.

Trap · old form

A fatigue of 71 quoted weeks ago. The coach must use today's form and fatigue.

Trap · healed knee

A knee that hurt last month and has healed. The coach must stop planning around it.

Before the rework the coach got 19 of 21 right. After it, 21 of 21, and still 21 of 21 thirty prompt versions later.

Numbers

The model chooses, code writes

Loads, durations and projected form come from code, never from the model. The same goes for the sessions: Claude picks a format and a duration, and code writes the intervals.

The same inputs always give the same session, so re-planning a week leaves an unchanged day unchanged. Every variant was previewed on the live calendar service before release.

Writing

Nothing written without a yes

Every calendar change is first shown as a preview. The athlete answers, and only a clear yes writes it. Before writing, the preview runs again: if the calendar changed in between, nothing is written and the athlete sees the fresh version.

writes« Oui envoie »

An approval, with only filler words around it.

doesn't write"yes but Tuesday"

Any other word makes it a reply the coach reads and answers.

doesn't write"ok?"

A question mark is never a yes.

Each athlete also has a daily cap on calendar writes, and a proposal expires after 12 hours.

Safety

Seven rules that can block a plan

These run in code before the athlete is even asked. They compare the calendar with and without the plan, so a rule only blocks what the plan makes worse. The model gets the broken rule and the fix.

RuleBlocks
SpacingTwo hard sessions on the same day or on days running, unless the athlete allows it
AvailabilityA session on a day off, or a day longer than the athlete's limit
RampLoad rising faster per week than the athlete's own cap
ReadinessA moderate or hard session today when today's readiness says rest
LibraryA session type the coach doesn't plan
BlockA week that breaks its role in the block, loaded or recovery
Workout of the dayAn on-demand session longer than the time the athlete gave

After three refused attempts in one conversation, code proposes one easy session itself, still through the approval step.

Privacy

Health data only with consent

Recovery scores and health notes reach the coach only after the athlete agrees to the privacy policy. Code sends that question and records the answer; the model can never record a yes. Each athlete's data, history and budget are kept apart, and backups are encrypted.

Testing

How it's tested