coach icon indicating copy to clipboard operation
coach copied to clipboard

Strength sessions have no target load or progression scheme

Open david-deluca opened this issue 3 months ago • 3 comments

Problem & Context

Strength sessions are generated with exercises, sets, reps and rest times, but no target load. The weight column is empty for every set, and there is no progression rule between sessions.

The root cause looks structural rather than a bug. In trigger/generate-structured-workout.ts:529 the intensity reference set is:

refs: { ftp: number; lthr: number; maxHr: number; thresholdPace: number }

All four are endurance references. Strength has no equivalent, so the generator has nothing to derive a prescribed load from.

Two consequences:

  1. A strength goal (e.g. "reach a 180 kg deadlift") cannot be tracked or progressed by the system.
  2. getStressScore() falls back to hrss for gym sessions. Heart rate during resistance training reflects cardiovascular cost, not the strength stimulus — a heavy triple barely raises HR while being the strongest stimulus. Gym HRSS then feeds the same CTL as rides.

Proposed direction

Add a fifth intensity reference: per-exercise estimated 1RM, derived from logged WorkoutSet history.

  • e1RM from logged sets (Epley / Brzycki / Wathan), restricted to sets ≤8 reps where the formulas converge, exposed as a range rather than a point value
  • Target load on planned sets as a percentage of e1RM
  • RIR-based progression between sessions

Acceptance Criteria (draft)

  • [ ] Planned strength sets carry a target load derived from history
  • [ ] e1RM is computed per exercise and exposed to the generator
  • [ ] Sessions with insufficient history degrade gracefully (no fabricated load)
  • [ ] Unit tests cover e1RM estimation and the no-history path

Source File Pointers

  • trigger/generate-structured-workout.ts (refs construction ~L529, FTP fallback ~L981)
  • server/utils/structured-workout-generator.ts
  • shared/structured-workout-contract.ts

david-deluca avatar Aug 28 '26 18:08 david-deluca

Problem & Context

Strength sessions are generated with exercises, sets, reps and rest times, but no target load. The weight column is empty for every set, and there is no progression rule between sessions.

The root cause looks structural rather than a bug. In trigger/generate-structured-workout.ts:529 the intensity reference set is:

refs: { ftp: number; lthr: number; maxHr: number; thresholdPace: number }

All four are endurance references. Strength has no equivalent, so the generator has nothing to derive a prescribed load from.

Two consequences:

  1. A strength goal (e.g. "reach a 180 kg deadlift") cannot be tracked or progressed by the system.
  2. getStressScore() falls back to hrss for gym sessions. Heart rate during resistance training reflects cardiovascular cost, not the strength stimulus — a heavy triple barely raises HR while being the strongest stimulus. Gym HRSS then feeds the same CTL as rides.

Proposed direction

Add a fifth intensity reference: per-exercise estimated 1RM, derived from logged WorkoutSet history.

  • e1RM from logged sets (Epley / Brzycki / Wathan), restricted to sets ≤8 reps where the formulas converge, exposed as a range rather than a point value
  • Target load on planned sets as a percentage of e1RM
  • RIR-based progression between sessions

Acceptance Criteria (draft)

  • [ ] Planned strength sets carry a target load derived from history[ ] e1RM is computed per exercise and exposed to the generator[ ] Sessions with insufficient history degrade gracefully (no fabricated load)[ ] Unit tests cover e1RM estimation and the no-history path

Source File Pointers

  • trigger/generate-structured-workout.ts (refs construction ~L529, FTP fallback ~L981)
  • server/utils/structured-workout-generator.ts
  • shared/structured-workout-contract.ts

Relationship to the existing plan

plans/structured-workout-intervals-coaching-upgrade.md already identifies adjacent gaps:

  • Workstream C: "Add explicit sport-specific constraints (ride/run/swim/gym) with metric-priority behavior"
  • Workstream F: "Remove cycling-only framing"

This proposal is complementary rather than overlapping. C and F improve how the prompt asks for a session; this adds the reference value the prompt currently has no way to express for gym work. Without a strength intensity reference, "metric-priority behavior for gym" has no metric to prioritise.

It also stays outside the plan's stated non-goal ("full physiological modeling engine rewrite") — this is one additional reference in the existing refs object, not a new engine.

Questions before starting

  1. Is per-exercise load prescription wanted upstream, or is strength intentionally scoped as logging-only?
  2. Is there already a Linear ticket covering this? I don't have board access.
  3. Would you prefer this sequenced after Workstream B (schema hardening), since it extends the target schema?

david-deluca avatar Aug 28 '26 18:08 david-deluca

Problem & Context

Strength sessions are generated with exercises, sets, reps and rest times, but no target load. The weight column is empty for every set, and there is no progression rule between sessions.

The root cause looks structural rather than a bug. In trigger/generate-structured-workout.ts:529 the intensity reference set is:

refs: { ftp: number; lthr: number; maxHr: number; thresholdPace: number }

All four are endurance references. Strength has no equivalent, so the generator has nothing to derive a prescribed load from.

Two consequences:

  1. A strength goal (e.g. "reach a 180 kg deadlift") cannot be tracked or progressed by the system.
  2. getStressScore() falls back to hrss for gym sessions. Heart rate during resistance training reflects cardiovascular cost, not the strength stimulus — a heavy triple barely raises HR while being the strongest stimulus. Gym HRSS then feeds the same CTL as rides.

Proposed direction

Add a fifth intensity reference: per-exercise estimated 1RM, derived from logged WorkoutSet history.

  • e1RM from logged sets (Epley / Brzycki / Wathan), restricted to sets ≤8 reps where the formulas converge, exposed as a range rather than a point value
  • Target load on planned sets as a percentage of e1RM
  • RIR-based progression between sessions

Acceptance Criteria (draft)

  • [ ] Planned strength sets carry a target load derived from history[ ] e1RM is computed per exercise and exposed to the generator[ ] Sessions with insufficient history degrade gracefully (no fabricated load)[ ] Unit tests cover e1RM estimation and the no-history path

Source File Pointers

  • trigger/generate-structured-workout.ts (refs construction ~L529, FTP fallback ~L981)
  • server/utils/structured-workout-generator.ts
  • shared/structured-workout-contract.ts

Follow-up after reading the code

More of the plumbing exists than I assumed:

  • WorkoutSet already stores reps, weight, weightUnit and rpe — no storage schema change needed.
  • StrengthExerciseLibraryItem has loadMode and prescriptionMode, and strength-exercise-matching.ts already propagates them from library to step.
  • loadMode defaults to 'none' (strength-exercise-matching.ts:396,398), which is why every planned set renders with an empty weight column.
  • 'absolute' appears only in a component test, so the field looks provisioned but unused.

That narrows the proposal considerably: add loadMode values beyond 'none' (percent_e1rm, rpe) plus the e1RM resolution that turns them into kg. PersonalBest looks like the natural place to persist e1RM — its @@unique([userId, type]) already gives one all-time best per type, though category is currently RUN/CYCLE/SWIM/OTHER.

Was loadMode intentionally left at 'none' pending a design decision, or is this just unfinished?

david-deluca avatar Aug 28 '26 18:08 david-deluca

Thank you for the detailed report — it made the gap in strength-session progression very clear. The fix has now been merged and deployed to production.

Strength sessions can now derive per-exercise e1RM ranges from logged 1–8 rep sets, prescribe history-based target loads with conservative RIR progression, preserve existing loads and units, and leave unmatched exercises blank rather than inventing a value.

When you have a chance, could you please try it and confirm that the generated strength loads now look correct for your training history? Thank you again for helping us improve this.

hdkiller avatar Sep 01 '26 13:09 hdkiller