A triathlon trainer that runs on your own LLM: Claude, Ollama or OpenAI

I built an AI triathlon trainer for myself, and let Claude Code build it from a spec

TriIQ is a Flutter app that turns my Intervals.icu data into a training plan, an honest analysis of every session and an AI trainer I can steer, with no backend and the model of my choice. I built it for myself in a few weeks, almost entirely by writing a specification and letting Claude Code implement it.

Why I built it

My training data already lives in Intervals.icu. What I wanted on top of it did not exist in one place: a plan I can shape, session analysis I trust, and an AI trainer I control. I did not want another account, another server or another subscription holding my data. So I built the app I wanted. It is for me first. I published it because someone else might want the same thing.

What it does

  • Today: load at a glance (TSS, CTL, ATL, form, ramp), today’s sessions, readiness and tomorrow’s plan.
  • Training plans: two to sixteen weeks for run, ride or triathlon, with a load curve you can drag, a weekly ramp with hold weeks, and preferences such as long sessions at the weekend.
  • Analysis: every workout is evaluated against its plan, with streams, personal bests, an efficiency trend and a recovery hint. Year goals, calendar views and the home-screen widget are all configurable.
  • AI trainer: a chat, plus Train now, which proposes a session or an alternative to today’s and can create it in Intervals.icu. It also writes bodyweight strength sessions for swim, ride or run.

Bring your own model

You list the models you want, in the order you prefer: Claude with your own Anthropic key, Ollama (your own machine or Ollama Cloud), or any OpenAI-compatible server such as OpenAI, OpenRouter, LM Studio, vLLM or llama.cpp. If the first one fails or is rate-limited, the same request goes to the next, and a small chip under each reply says which model answered.

There is no TriIQ server. The trainer is a tool-calling agent that runs inside the app, reads your data from the device through tools, and only what those tools return is sent to the model you chose. That still means things like sleep and heart-rate data reach that provider, so pick one you are comfortable with. You pay your provider for what you use.

Making the trainer yours

The built-in system prompt is fixed and is about epistemics, not physiology: never state a number that did not come from a tool, name the gaps in the data, treat CTL as context and not as a target, send anything medical to a professional. Everything personal sits on top of it, visibly:

  • Trainer memory: standing preferences such as “no hard sessions on Fridays”, listed in the app and deletable.
  • Custom instructions for a single Train now request.
  • A knowledge library of your own Markdown or text documents, quoted by name and treated as information, never as instructions.

If a preference clashes with safety or your data, the trainer is told to say so instead of going along with it.

Spec-driven, with Claude Code

The project is organised around a written spec:

  • One source of truth: docs/okf.md, a plain-text specification of what the app is and how it is built, lives in the repo next to the code.
  • Changes start as text: larger features begin as a proposal with a design, requirements and a task list (using OpenSpec). Claude Code then implements them task by task

A word of care

TriIQ is a tool I built for myself. It is not a coach or a doctor, and the trainer can be wrong. Nothing it says is guaranteed to be correct or safe. Overtraining and health problems are easy to miss in numbers, and a standing preference can make a plan harder than is wise. Check every suggestion against how you feel, and talk to a doctor or coach when in doubt. The app and its docs say this too.

Where it stands

If you build endurance apps, or you wonder how far spec-driven development with Claude Code can go on a real project, have a look at the repo.

1 Like

Nice tool. I have something similar using Intervals.ICU as my primary data source and also My Digital Twin for longitudinal data (other than training). It’s using “skills” within Gemini, was using OpenAI before when I started My Digital Twin.

I have building the skills based on goals and the limitations and guardrails. I prefer versus a more fixed structure because over time goals are changing. Like I have my A Race goal for 2027 set, IM Davao in June. But since I started my plan I have already added a B Race Masters Aquatics swim in February 2027. I update the goals and the skills amend my plan.

The gaurdrails are critical. I had kidney failure back 8 years and scoliosis. So using the data in My Digital Twin, the skills watch daily for indicators, and HRV just not that useful if you happen to have parasympathetic dominance like many endurance athletes.

Ok my approach is very interactive, maybe not for everyone. But one issue I have with most coaching solutions is they are prescriptive on population norms. I am not in a population norm, so I really need something very open and flexible. This is way I started My Digital Twin.

Congrats on your tool you developed. AI can be such a great tool is used respectfully as I read you are doing. Well done.