← All Case Studies

Caskey Engineering2025 – Present · Founder & Full-Stack Builder

AI Marathon Coach Grounded in 28 Days of Actual Training Data

Built a coaching platform around real Garmin training and recovery history, pairing a deterministic daily recommendation with a separate conversational AI coach and a Whoop/Oura-style data dashboard.

About this artifact

case-studyproductionmaintained

automation · part of Marathon Coach · since 2026

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, the daily recommendation had to reflect recent workload and recovery, with an explicit decision from rules that could be inspected. Conversational coaching needed grounded context without being confused with that deterministic daily decision.

The Approach

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

Made the typed daily recommendation deterministic: the pipeline computes metrics from a 28-day activity window and combines them with recovery signals. A guardrail rules engine owns the call (proceed / reduce / swap to recovery / rest), and the LLM narrates that decision.

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 separate multi-turn AI coaching interface using metrics derived from a 28-day activity window, the latest ten activities, and current recovery data. Chat calls the model directly on that constructed context; its conversational answers do not carry the daily recommendation's deterministic guarantee.

The Impact

  • Authenticated product ingests real Garmin data through a 90-day initial activity backfill, scheduled polling, and on-demand sync; daily recommendations and chat metrics use a 28-day activity window
  • A deterministic rules engine owns the typed daily recommendation while the LLM explains it; conversational chat answers questions separately using the athlete's metrics, latest ten activities, and recovery data
  • 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

Evidence

AI/MLHealth TechAPI IntegrationFull-StackAWS

Related