← ClaudeAtlas

endurance-coach-debugging-playbooklisted

Load this to TRIAGE a live symptom in the Endurance Coach app (local-first single-athlete TypeScript coaching app at /Users/maxeskell/dev/personal-training-app). Use when something is broken or wrong RIGHT NOW and you need to find the cause fast: "dashboard won't load" / "page is blank" / "port 3000 already in use" / "EADDRINUSE"; "no data" / "fields show —" / "readiness/state is empty"; OAuth / 401 / "re-auth needed" / "AI Endurance unreachable" / token expired; "structured output 400" / "maxItems is not permitted" / an LLM structured call throws; "my commits landed on main" / HEAD hijacked / wrong branch; Garmin returns null / "FTP looks too low" / lactate-threshold pace is ~10× off / Garmin token stale; "a correlation looks too good" / "is this signal real"; ".FIT won't parse" / no splits / no power curve; "coach flow errored" / "ANTHROPIC_API_KEY is not set"; "tests fail" / suite red; "which runner is live" / launchd vs npm start fight. Keywords: doctor, probe, verify:reads, state:today, degrade, Provenan
maxeskell/personal-training-app · ★ 0 · AI & Automation · score 70
Install: claude install-skill maxeskell/personal-training-app
# Endurance Coach — debugging playbook **Use this when** a symptom is happening now and you need to find the cause and fix-or-degrade it fast. **Don't use this when** you want the settled story of why a past decision was made or reverted — that's `endurance-coach-failure-archaeology`. For deriving/proving a statistical method, use `endurance-coach-proof-and-analysis-toolkit`. For the change gate / how to ship a fix, use `endurance-coach-change-control` (gate) and `endurance-coach-run-and-operate` (ship mechanics). All commands below assume the repo at `/Users/maxeskell/dev/personal-training-app`. Copy them whole. ## Jargon, defined once - **Provenanced slot** — every field of the daily `AthleteState` is `{ value: T | null, source, note? }`. A tool error or shape drift degrades ONE field to `value: null` (rendered `—`) with a `note` saying why — it never crashes the assemble. So a missing field is *expected behaviour*, not a bug, unless the whole state is null. - **Degrade, don't crash** — external fetches (Garmin, weather, local LLM, `.FIT` parse) are best-effort with timeouts. A failure = a missing card/field with a note, never an error page. Enforced project-wide. - **WriteGate** — the propose→confirm two-step; the ONLY path that mutates AI Endurance (`src/guardrails/writeGate.ts`). Never route a fix around it. - **AIE** — AI Endurance, the platform that owns the load model (FTP/CSS/threshold/recovery), pulled live over MCP/OAuth. **MODEL/estimate** — any co