Dev Diary

Coach should earn the next decision

INCREMNT is an iOS strength-training app that helps athletes plan, log, and learn from their training. This week’s work made Coach more useful by grounding reviews in the right records, carrying training plans through a conversation, and ending with an honest next action instead of an overconfident answer.

  • Coach weekly reviews now compare saved working sets instead of inferring progress from a loose summary.
  • Training questions can prefetch the one scoped record they need, including the authoritative next-session prescription.
  • Ask Coach can carry a programme request through follow-up questions and prepare a reviewable plan without applying it silently.
  • Body-weight tracking now keeps dated readings, profile fallbacks, edits, deletes, and HealthKit sync states distinct.

Product: the answer should end in a useful next step

INCREMNT is a strength-training app for the decisions between workouts: what changed, what it means, and what to do next. The risk with an AI coach is that a fluent answer can sound more certain than the training record behind it.

This week I tightened that contract. When an athlete asks how a lift is progressing, Coach now looks for the exact exercise, comparison window, and requested shape of the answer before it generates prose. “Show my bench progress” and “what should I lift next session?” are not the same request. The first needs a scoped history or progress summary. The second needs the current programme’s next-session prescription. A historical recommendation is not allowed to masquerade as today’s plan.

That distinction is visible in the product. A next-session answer can copy the current planned sets exactly. A progress answer can distinguish first, best, and latest completed sessions. If the records are thin, the answer says what was found and what cannot be established. It doesn’t turn an empty records lookup into “you never logged that movement”, and it doesn’t turn a rep shortfall into a diagnosis about fatigue or sleep.

The weekly review work follows the same rule. Saved working-set comparisons now provide the factual basis for a review, including the exercise and time scope that produced the comparison. Coach can explain that snapshot, but the explanation remains bounded by it. A review is useful because it makes a decision easier, not because it produces the longest paragraph.

The other product change is conversational planning. Ask Coach now starts with prompts such as Plan my training and keeps the request alive while the athlete answers planning questions. The conversation can hold onto goals, schedule, equipment, exclusions, and other explicit requirements, then produce a reviewable programme proposal. The app still owns the final save. Coach can prepare a change; it cannot claim that a plan was applied when the athlete has not confirmed it.

That boundary is important for trust. An athlete should be able to ask for a plan, revise it, and inspect it without wondering which sentence changed the permanent programme. The product now makes the proposal the visible handoff between conversation and action.

There are smaller examples of the same thinking. The app can now share consented body measurements and typed cardio history with Coach, but it keeps dated readings, missing coverage, sharing exclusions, and retrieval errors separate. Body-weight tracking itself was rebuilt around raw readings and an undated profile fallback, so editing or deleting the newest entry does not erase the older truth or resurrect stale HealthKit data. A number is only useful when its date and ownership are clear.

Building INCREMNT: make evidence selection a first-class operation

The substantial engineering problem was ordering. The old path gave the model a menu of tools and asked it to work out the evidence plan while answering. That is flexible, but it makes a simple question take unnecessary turns and leaves more room for a broad read to answer a narrow question.

I added a deterministic foundation read plan for the small, well-understood cases. It recognises the question shape, validates the date window, resolves exercise identity, and prefetches the one or two reads that can answer it. A progress question gets a progress summary, a records question gets records, and a next-session question gets get_next_session. The model receives the scoped result before its first response and is told to finish from that evidence unless a genuinely missing fact requires another read.

The useful detail is that this is not just a performance optimisation. The structured progress result separates a best completed set from the session’s set count and total volume. That prevents a common category error: treating one best set as if it represented the whole workout. The verifier also learned to reject claims that confuse an instruction with a completed result, or that recommend a load conflicting with the authoritative current plan.

Routing needed the same care. A programme day called Upper Volume should still route “What should I focus on in Upper Volume?” to the next-session path; the word “volume” alone should not send it to a workload analysis. The regression test pins both behaviours. This is the kind of small boundary that disappears in a demo and matters in daily use.

The planning flow adds a second state machine. A new request is registered with only the requirements the athlete actually stated. Follow-up answers revise that request. Compilation selects exercises and schedules against the stored request fingerprint, then returns a reviewable proposal. The implementation keeps the request, the evidence used to build it, and the final action separate. That makes revisions testable and prevents previous assistant text from becoming accidental permission.

The test work is deliberately close to those boundaries. Weekly-review fixtures cover saved comparisons with and without goals. Evidence-plan tests cover progress, records, RIR, next-session prescriptions, date windows, ambiguous follow-ups, and the Upper Volume routing case. Coach completion tests cover proposal status and exact prescriptions. Cardio-history and health-context tests cover typed reads. On the iOS side, body-weight tests exercise migration, same-day backfills, deletion, reloads, pending edits, and stale HealthKit snapshots.

There’s a trade-off here. The system now carries more typed intent, more explicit coverage, and more fixtures for old data. That is extra code and extra cases to maintain. I’m taking that cost because the alternative is cheaper only on paper: a polished answer that quietly mixes a planned set with a completed one, or a current reading with a stale fallback, is a bug in the decision layer, not a harmless wording issue.

The transferable idea is straightforward: choose and scope evidence before asking a language model to explain it. Then make the final action a typed proposal with an explicit owner. The model gets room to reason about the record, but not to redefine the record while speaking.

Also moved forward

  • Added timed cardio programme drafts and scheduled an outcome evaluation, extending the same plan-to-action boundary beyond strength sets.
  • Improved body-weight trend presentation and profile synchronisation while keeping local edits recoverable across reloads and deletes.
  • Prepared release and validation changes around TestFlight and native gates; those are delivery work, not a claim that every change is publicly released.

What’s next

The next useful proof is end-to-end: ask Coach for a plan, revise one constraint, inspect the proposal, and then verify that the next logged session follows the confirmed prescription. I’ll keep the language conservative until that path is exercised against the built app and the remaining release checks.

This diary was generated and edited from the week’s commits, pull requests, tests, and development notes using AI, evidence-checked, and automatically published, and may describe work not yet publicly released.