How it's built
Rules plan.
Data decide.
The model explains.
Isard builds a trail or ultra season from a two-minute brief, ticks sessions off from Strava, and lets an AI coach answer questions about the training without ever inventing a number.
The plan engine
A plan is generated by pure, deterministic functions in plan.js, shared by the browser and the server. No model call: it is free, predictable and testable, and the coach explains the plan rather than writing it.
- Season shape. Base, build, peak and taper in 45 / 35 / 20 proportions, one or two taper weeks, a lighter week every fourth week.
- Safe progression. The long run and the midweek runs each grow by 10% a week at most, and peak volume never exceeds twice the starting volume.
- The athlete's own rules. "Never two run days in a row" is enforced when the plan is built and on every move, in the browser and again on the server, which re-checks each change before saving it.
- Every session explains itself. Effort in words ("you can hold a conversation") and one or two sentences on why the session is there.
Strava runs complete planned sessions automatically: a run on the day of a planned run marks it done, a manual log always wins, and runs on rest days are shown as extras without bending the plan.
Metrics before words
The coach never reasons over raw GPS files. Each run is first reduced to metrics by one module of pure functions, used both by the app and by the agent's tools:
Behind the plain names sit standard tools (Banister load, efficiency factor). They stay in the engine: the interface and the coach speak in words a first-time runner understands.
A grounded agent
The coach is one Claude model (Sonnet) that decides for itself what it needs. The system prompt carries a cached summary of the athlete's state; for anything else it calls tools:
list_activitiesSessions in any date window, filtered by sport.get_activity_detailsSecond-by-second analysis of one session: zones, splits, laps, cardiac drift.compute_statsThe same deterministic metrics the app shows: weekly volume, trends, race readiness.The loop is capped at eight model calls, and the last one is made without tools so it must end in a written answer. The progress lines in the chat are built from the actual tool calls, never from what the model says it will do.
Grounding is tested, not hoped for. Every pull request runs 21 questions with known answers against the real model; a validator checks that every current figure in the reply comes from the data and that no cause is claimed without data behind it.
The stack
Security and cost
- Secrets stay on the server. OAuth exchange and token refresh run server-side; the session is one AES-256-GCM encrypted, httpOnly cookie.
- Private context is owner-only. Injury history and goals live in an environment variable and enter the prompt only for the owner's Strava id.
- The browser is never trusted. It sends conversation text only; the server fetches the data, builds the prompt and re-validates every plan change.
- Bounded spend. The public demo is limited per IP and globally per day, with prompt caching: about one cent per question.
How it ships
The demo is a fictional runner generated by a seeded PRNG into Strava-shaped data, so demo and live share one code path. Every change goes the same way: a branch, tests green, the Vercel preview checked on desktop and mobile, then a merge. The live site is on my CV, so it doesn't break.