Sport

Train Smarter for Your Ironman with EnduraCoach — The AI Companion That Actually Delivers

A few months ago, I finished a long ride—just over 100 miles, solid climbing, felt strong the entire way. The kind of session that makes you think, I’m on track.

The next week, I pushed again. Then again.

Nothing dramatic—just a bit more volume, a bit more intensity. Exactly what most self-coached athletes do when things feel good.

Two weeks later, I was flat. Not injured. Not sick. Just… off. Power was down, runs felt heavy, motivation dipped. The frustrating kind of fatigue where nothing is clearly wrong—but nothing is clearly right either.

When I looked back, the pattern was obvious:

  • I had increased load too quickly
  • Skipped a proper recovery week
  • Let “feeling good” override structure

What’s worse: all the data was there.
Garmin had it.
The workouts were logged.
The signals existed.

I just didn’t have a system that could connect the dots, enforce discipline, and still adapt intelligently.

That’s the gap.

Most tools today fall into two extremes:

  • Static plans that ignore what you actually did
  • “AI coaching” that sounds smart but you can’t really trust

I wanted something in between:

A system that keeps me honest on the fundamentals—while still helping me think, adapt, and improve.

That’s where EnduraCoach started.

The bet: coaching that feels intelligent—without gambling on math.

EnduraCoach is an AI-assisted Ironman training app built on a simple premise:
the model does not control your training plan.

Instead, the system splits responsibilities:

  • A deterministic engine owns load, progression, and structure
  • The LLM handles conversation, explanation, and suggestions
  • The user explicitly approves any changes

That separation isn’t academic—it’s the difference between something that sounds smart and something you can actually trust with your body.

Why not let the model run everything?

Because LLMs are excellent at language and context—and unreliable (or just less reliable) at consistent, safe, structured planning. In the (near) future, that might change and we can ‘give it all’ to the LLMs. But for now, let’s keep this part out of it.

Training plans require:

  • Repeatability: same inputs → same outputs
  • Bounded risk: no surprise spikes in load. We don’t want to get injured.
  • Testability: you can verify behavior before doing a session.

So there’s a hard rule in the system:

The LLM never owns training math.

That constraint drives everything else.

The Core System

Think of EnduraCoach as three cooperating layers:

1. Deterministic Training Engine (the source of truth)

This is where the real coaching logic lives.

  • Structured phases: base → build → peak → taper
  • Recovery every 4th week
  • Guardrails:
    • Intensity step <= +1 zone for beginner/intermediate, +2 for advanced
    • Weekly volume increase <= 15% for advanced cyclists, 12% intermediate, 10% beginner; 8% for all swim and run sessions
    • Mandatory recovery week every 4 weeks
    • Preset distributions by race distance
    • Monday-aligned week grid (so UI and logic never drift)

This is intentionally conservative.
You can reason about it.
You can test it – You can trust it.

2. Conversational Layer – LLM as advisor, not authority

The coach experience is powered by Google Gemini via @google/genai.

But it operates under strict constraints:

  • No full chat history dumping
  • A single structured memory state per user
  • Fixed prompt structure:
  • athlete profile
  • goal
  • current phase
  • last week summary
  • current week snapshot
  • user message

This keeps responses:

  • consistent
  • grounded
  • cheap (token-wise)
  • actually useful

The model proposes ideas—it does not execute them.

3. Governance Loop: propose → approve → apply

This is the most important product decision.

When the model suggests a change:

  1. It generates a proposal
  2. The backend converts it into a validated diff via the engine
  3. The diff is stored as pending
  4. The user must explicitly approve
  5. Only then is it applied (transactionally, with an allowlist)

No silent edits. No hidden mutations.

User agency is not a feature—it’s the control system.

Grounding in Reality: Garmin Paste Import

Instead of starting with API integrations, EnduraCoach takes a faster path:

  • Users paste activity data from Garmin Connect
  • A tolerant parser extracts metrics (time, distance, HR, power, TSS)
  • Activities are matched to planned workouts (±1 day, same sport)

From there:

  • workouts are marked completed / missed / extra
  • recent stats (14-day window) are computed
  • a simple fatigue signal (e.g., HR drift) is added to memory

This creates a feedback loop:

Plan → Train → Import → Reconcile → Adjust

No brittle integrations required to get real value.

Product Decisions That Actually Matter

Authentication: fast dev, safe prod

  • Google OAuth in production
  • Dev login for local/staging only
  • UI removes dev login in production builds

You move fast without weakening security.

Structured onboarding (not “tell me about yourself”)

A 4-step flow captures:

  • goal
  • experience
  • biometrics
  • constraints

Why? Because the engine needs typed inputs—not paragraphs.

Markdown coach responses

  • Clean formatting (lists, emphasis)
  • Safer rendering (user input stays plain)

Small detail, big UX upgrade.

Graceful degradation

No Gemini key?

  • The system still runs
  • Chat falls back to deterministic responses

Zero setup friction.

Infrastructure: deliberately boring

  • Frontend: React + Vite + Tailwind
  • Backend: Node + Express
  • DB: SQLite (single file, backed up)
  • Auth: Passport + sessions
  • Deploy: Docker on **Fly.io

Why this stack?

Because complexity is the enemy of iteration—especially in v1.

A subtle but important detail

The app serves both:

  • API routes (/plan, /auth, etc.)
  • SPA routes (also /plan in the UI)

The server distinguishes based on Accept: text/html.

Without this, routing breaks in non-obvious ways.

What’s intentionally missing in the MVP

Not everything belongs in v1:

  • Google Calendar sync
  • advanced CTL/ATL analytics
  • strength training templates

These are useful—but not critical.

Shipping them early adds surface area and support burden without strengthening the core loop.

The Real Product

EnduraCoach isn’t “AI coaching.”

It’s a system where:

  • Rules ensure safety and consistency
  • AI adds intelligence and usability
  • The user stays in control

That combination matters.

Because in endurance training, credibility doesn’t come from elegant language—it comes from predictable progression and transparent decisions.


Bottom line

Most AI products ask: “What can the model do?”

This one asks:

“What should the model should not be allowed to do?”

That constraint is the product.
And it’s the reason it works.


Discover more from Ido Green

Subscribe to get the latest posts sent to your email.

Standard

Leave a comment