← All Case Studies

Caskey Coding2025 – Present · Founder & Full-Stack Builder

AI Marathon Coach Grounded in 90 Days of Actual Training Data

Built a coaching platform that reasons over real Garmin training and recovery history, not generic templates, pairing a deterministic safety-first rules engine with a multi-turn AI coach and a Whoop/Oura-style data dashboard.

The Problem

Generic marathon training plans are static artifacts that do not adapt to current readiness, recovery, or long-run recency.

Data-heavy platforms can show ATL, CTL, and TSB trends, but athletes still need to interpret those signals and translate them into concrete next-step training decisions.

For marathon preparation, guidance had to reflect the last 90 days of actual workload rather than assumptions about the athlete's baseline fitness, and a coaching tool can never let an LLM make a safety call on its own.

The Approach

Integrated Garmin Connect to ingest activity history, heart rate, and daily wellness (sleep, HRV, resting HR, body battery, stress, readiness) on a scheduled poller plus an on-demand "force sync," with a sync-status panel surfacing freshness and failures.

Made the recommendation deterministic: a guardrail rules engine owns the call (proceed / reduce / swap to recovery / rest), and the LLM only narrates it. The model never decides a safety outcome.

Built a Whoop/Oura-style dashboard around endurance-critical signals: 12-week weekly volume and training load with an acute:chronic workload (ACWR) status pill, aerobic-efficiency drift, a training-consistency calendar heatmap with run-log drill-down, and recovery trends for sleep, HRV/resting HR, and readiness.

Computed training load (TRIMP) at read time so CSV imports and Garmin-polled activities share one formula, with no source-dependent drift, and no silently-zeroed load.

Implemented a multi-turn AI coaching interface that passes the previous 90 days of Garmin data as grounded context to Claude via the Anthropic API (with Bedrock failover), with a prompt that forbids inventing any mileage or pace not in the data.

The Impact

  • Authenticated product ingests real Garmin data (activity, heart rate, and daily wellness) on a scheduled poller plus on-demand sync, then grounds every recommendation in the athlete's last 90 days
  • A deterministic rules engine owns every recommendation while the LLM only explains it, so safety calls are never delegated to the model
  • A glanceable data dashboard turns raw history into trends (weekly load with an ACWR pill, aerobic-efficiency drift, a consistency heatmap, and recovery panels), each degrading gracefully when a signal is missing
  • Surfaces trend-level signals (e.g. unintended intensity drift despite stable weekly mileage) rather than generic plan templates
  • A public no-login demo runs the coaching interface against a realistic sample athlete, so anyone can try it without connecting an account
  • Same exposure-safety controls as the finance tool: a hard daily cost ceiling, per-session rate caps, and a default-off kill switch
AI/MLHealth TechAPI IntegrationFull-StackAWS

Related