@aneuhold/core-ts-db-lib 4.1.13 → 4.1.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,22 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## 🔖 [4.1.14] (2026-03-07)
9
+
10
+ ### 🏗️ Changed
11
+
12
+ - Refactored `WorkoutVolumePlanningService` into a cleaner multi-step pipeline with dedicated extracted methods: `getVolumeTargetsForMuscleGroup`, `calculateBaselineSetCounts`, `distributeEvenly`, `resolveHistoricalExerciseData`, `applyHistoricalSetCounts`, `evaluateSfrRecommendations`, `distributeSetsToExercises`, `sessionIsCapped`, `getSessionSetTotal`, and `addSetsToExercise`.
13
+ - `WorkoutMesocyclePlanContext` now exposes `accumulationMicrocycleCount` (total microcycles minus the deload, when applicable).
14
+ - `WorkoutVolumeLandmarkEstimate.estimatedMev` now represents total sets per microcycle for the muscle group, not per session.
15
+ - Default volume constants renamed: `DEFAULT_MEV` → `DEFAULT_MEV_PER_EXERCISE`, `DEFAULT_MRV` → `DEFAULT_MRV_PER_EXERCISE`.
16
+ - Cut cycle baseline progression now targets MAV (midpoint) instead of MRV.
17
+ - MAV for exercises returning from recovery is now distributed evenly across all exercises in the muscle group using floor-based distribution.
18
+ - MRV estimate is no longer hard-capped at `MAX_SETS_PER_MUSCLE_GROUP_PER_SESSION` in `estimateVolumeLandmarks()`.
19
+
20
+ ### 🔥 Removed
21
+
22
+ - Removed `WorkoutVolumePlanningService.evaluateMevProximity()` static method and the associated second-microcycle MEV proximity adjustment logic.
23
+
8
24
  ## 🔖 [4.1.13] (2026-02-28)
9
25
 
10
26
  ### ✅ Added
@@ -359,6 +375,7 @@ Updated dependency: now requires `@aneuhold/core-ts-lib@^2.3.11`.
359
375
 
360
376
  <!-- Link References -->
361
377
 
378
+ [4.1.14]: https://github.com/aneuhold/ts-libs/compare/core-ts-db-lib-v4.1.13...core-ts-db-lib-v4.1.14
362
379
  [4.1.13]: https://github.com/aneuhold/ts-libs/compare/core-ts-db-lib-v4.1.12...core-ts-db-lib-v4.1.13
363
380
  [4.1.12]: https://github.com/aneuhold/ts-libs/compare/core-ts-db-lib-v4.1.11...core-ts-db-lib-v4.1.12
364
381
  [4.1.11]: https://github.com/aneuhold/ts-libs/compare/core-ts-db-lib-v4.1.10...core-ts-db-lib-v4.1.11
@@ -38,7 +38,7 @@ export type WorkoutMuscleGroupVolumeCTO = z.infer<typeof WorkoutMuscleGroupVolum
38
38
  * from historical mesocycle data.
39
39
  */
40
40
  export type WorkoutVolumeLandmarkEstimate = {
41
- /** Estimated minimum effective volume (sets per muscle group per session). */
41
+ /** Estimated minimum effective volume (sets per microcycle for this muscle group). */
42
42
  estimatedMev: number;
43
43
  /** Estimated maximum recoverable volume. */
44
44
  estimatedMrv: number;
@@ -1 +1 @@
1
- {"version":3,"file":"WorkoutMuscleGroupVolumeCTO.d.ts","sourceRoot":"","sources":["../../../src/ctos/workout/WorkoutMuscleGroupVolumeCTO.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB;;;;;;;GAOG;AACH,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;iBAS5C,CAAC;AAEH;;;;GAIG;AACH,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC;AAE5F;;;GAGG;AACH,MAAM,MAAM,6BAA6B,GAAG;IAC1C,8EAA8E;IAC9E,YAAY,EAAE,MAAM,CAAC;IAErB,4CAA4C;IAC5C,YAAY,EAAE,MAAM,CAAC;IAErB,mEAAmE;IACnE,YAAY,EAAE,MAAM,CAAC;IAErB,qEAAqE;IACrE,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC"}
1
+ {"version":3,"file":"WorkoutMuscleGroupVolumeCTO.d.ts","sourceRoot":"","sources":["../../../src/ctos/workout/WorkoutMuscleGroupVolumeCTO.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB;;;;;;;GAOG;AACH,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;iBAS5C,CAAC;AAEH;;;;GAIG;AACH,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC;AAE5F;;;GAGG;AACH,MAAM,MAAM,6BAA6B,GAAG;IAC1C,sFAAsF;IACtF,YAAY,EAAE,MAAM,CAAC;IAErB,4CAA4C;IAC5C,YAAY,EAAE,MAAM,CAAC;IAErB,mEAAmE;IACnE,YAAY,EAAE,MAAM,CAAC;IAErB,qEAAqE;IACrE,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC"}
@@ -33,7 +33,7 @@ export type WorkoutMuscleGroupVolumeCTO = z.infer<typeof WorkoutMuscleGroupVolum
33
33
  * from historical mesocycle data.
34
34
  */
35
35
  export type WorkoutVolumeLandmarkEstimate = {
36
- /** Estimated minimum effective volume (sets per muscle group per session). */
36
+ /** Estimated minimum effective volume (sets per microcycle for this muscle group). */
37
37
  estimatedMev: number;
38
38
 
39
39
  /** Estimated maximum recoverable volume. */
@@ -243,8 +243,10 @@ These are requirements that were developed after taking all the notes in the mor
243
243
  - **Reps in Reserve (RIR)** (pg 30): Reps in Reserve are the set's proximity to muscle failure. In other words, how many reps do you have left before you completely fail to produce the movement.
244
244
  - **Effective Sets** (pg 33): Effective sets are a set that is done within 5-30 reps, and within 0-5 RIR.
245
245
  - **Volume** (pg 34+): From page 34 and onwards, the book discusses volume as the number of effective sets. Even though this isn't the technical definition, everything averages out as long as you are using effective sets.
246
+ - **Maintenance Volume (MV)** (pg. 34): The minimum volume necessary to avoid muscle loss. Training below this volume (or not training at all), will result in a loss of muscle over time.
246
247
  - **Minimum Effective Volume (MEV)** (pg. 34): The minimum volume which leads to muscle growth. This varies by age, training experience, and existing muscle mass. As you get stronger / bigger, this gets higher.
247
- - **Maximum Recoverable Volume (MRV)** (pg. 34,117): The maximum volume that can be done before muscle loss begins.
248
+ - **Maximum Adaptive Volume (MAV)** (pg. 34): The amount of training which at any given time provides the greatest muscle growth per unit of time. It shifts over the course of a mesocycle as fatigue accumulates and volume sensitivity changes. When looking at the chart on page 34, this it the "peak" of growth.
249
+ - **Maximum Recoverable Volume (MRV)** (pg. 34,117): The maximum volume that can be done before muscle loss begins. Detected in practice by under-performing two sessions in a row (a drop in reps at any given RIR compared to last week, even adjusted for potentially increased load).
248
250
  - **Raw Stimulus Magnitude (RSM)** (pg. 50-53): RSM is the amount of muscle growth stimulus any given Workout Session gives.
249
251
  - **Microcycle**: The shortest cycle of training that includes all workout sessions and rest days and is repeated. Typically, but not always, this is a week.
250
252
  - **Mesocycle**: An organized sequence of microcycles ordered to elicit a set of distinct training adaptations. The typical mesocycle is composed of two distinct phases: an accumulation phase, and a shorter deload phase.
@@ -363,16 +365,16 @@ To get your MEV, do the RSM calculation for the first 2-3 days of the mesocycle.
363
365
  | 0–1 | Stimulus likely below MEV | Increase volume the following week by two to four sets |
364
366
  | 2–3 | Stimulus likely at or below MEV | Increase volume the following week by two to four sets |
365
367
  | 4–6 | Stimulus likely at or just above MEV (a great place to start your mesocycle) | Progress normally |
366
- | 7–9 | Stimulus likely between MEV and MRV, possibly exceeding MRV | Drop volume the following week |
368
+ | 7–9 | Stimulus likely between MEV and MRV, possibly exceeding MRV | Drop volume the following week (this is handled by recovery sessions) |
367
369
 
368
370
  After you get this information, go ahead and finish out the first week at MEV, then calculate how you should progress by answering the following questions:
369
371
 
370
- On a scale of 0-3 how sore did you get in the target muscle group?
372
+ On a scale of 0-3 how sore did you get in the target muscles?
371
373
 
372
- - 0: You did not get at all sore in the target muscle group
373
- - 1: You got stiff for a few hours after training and had mild soreness in the target muscle group that resolved by next session targeting the same muscle group
374
- - 2: You got DOMS in the target muscle group that resolved just in time for the next session targeting the same muscle group
375
- - 3: You got DOMS in the target muscle group that remained for the next session targeting the same muscle group
374
+ - 0: You did not get at all sore in the target muscles
375
+ - 1: You got stiff for a few hours after training and had mild soreness in the target muscles that resolved by next session targeting the same muscles
376
+ - 2: You got DOMS in the target muscles that resolved just in time for the next session targeting the same muscles
377
+ - 3: You got DOMS in the target muscles that remained for the next session targeting the same muscles
376
378
 
377
379
  On a scale of 0-3 how was your performance?
378
380
 
@@ -402,6 +404,10 @@ The user can choose how they want to progress between two types of progression f
402
404
  - Load Progression: Add the lowest increment available for the weight that the exercise uses each week, within reason. Like if someone is lifting 300lbs, then perhaps increase by 10 lbs instead of 5lbs. A good rule of thumb is if the weight increase is less than 2% of the overall weight, then use the next higher increment available to get at, or above a 2% increase in the weight.
403
405
  - Rep Progression (Default): Add 2 reps per week to each set that is being executed. The reps should be above the previous week's by 2 once data starts coming in. Don't adjust the weight unless the target reps goes above the maximum for that exercise, in which case increase by the lowest increment available.
404
406
 
407
+ These defaults should be auto-regulated based on actual performance. The book's core progression rule is: "If you are increasing load weekly, add only enough to allow at least the same reps, at the same or slightly lower RIR with at least four weeks of accumulation being the goal." The same principle applies in reverse for rep progression: add only enough reps to allow the same load at the same or slightly lower RIR. (Ch. 6: Phase Potentiation, "Hypertrophy Load Progression" / "Hypertrophy Rep Progression"; also repeated in Ch. 8: Summary)
408
+
409
+ In practice this means: if RIR drops faster than planned (e.g. you added weight and went from 4 RIR to 1 RIR in one week), hold the same weight or reps for the next week until RIR catches up. If RIR is unexpectedly high (e.g. staying at 4 RIR when it should have dropped), add more load or reps than the default increment. A very important recommendation is to almost always err on the lighter side of load progression—if you under-add weight, you can make up for it later, but if you over-add, accumulated fatigue may force you to cut the mesocycle short. (Ch. 2: Overload, "Load Progression")
410
+
405
411
  So, with this in mind, the default projection might look like this:
406
412
 
407
413
  - Week 1: 4 RIR, 2 sets per exercise
@@ -426,6 +432,18 @@ How to take a deload?
426
432
  - How to choose the exercises: This can be done in 3 different ways, which are choosing the current mesocycle's exercises, the next mesocycle's, or specifically low stress exercises. To keep things simple for the purposes of my own program, I am just going to go with the first option. It is safest, and easiest to calculate.
427
433
  - How much stimulus to impose: Similar to recovery sessions, for the first half of the week, cut the last microcycle's sets and reps in half, but keep the same weight. The the second half of the week, cut the weight in half as well.
428
434
 
435
+ #### Mesocycle-to-Mesocycle Progression (Ch. 8: Summary, "Mesocycle to Mesocycle Progress"; Ch. 3: Fatigue Management, "Dropping fatigue to reveal performance")
436
+
437
+ Fatigue masks performance during a mesocycle. The deload removes fatigue and reveals the underlying fitness gains—it does not reset the strength baseline. Because of this, performance data from previous mesocycles should inform planning for new ones.
438
+
439
+ When starting a new mesocycle, how to set starting weights depends on the exercise's relationship to the previous mesocycle:
440
+
441
+ - **Same exercise, same rep range:** Start conservatively, below the ending weight from the previous mesocycle. The ending weight was achieved under peak fatigue and is not a sustainable starting point. It is always better to start a bit more conservative—it is less detrimental to add more weight across a meso when load is too light than to deal with the accumulated fatigue of overshooting load early on. (Ch. 8: Summary, "Progression with matched rep range for the same exercise across mesocycles")
442
+ - **Same exercise, different rep range:** Pick the approximate RM for the new target rep range. For example, if switching from the 5-10 range to the 10-20 range, choose a weight between your 14 and 24 rep maxes (offset by the starting 4 RIR). Progress between loading ranges is not expected, only within them. (Ch. 8: Summary, "Progression with different rep ranges for the same exercise across mesocycles")
443
+ - **New exercise:** Loading should be assessed independently and not based on weight used for other lifts. Different people have different exercise-to-exercise load ratios, so trial and error with a logbook is the practical approach. Because loading ranges are wide, estimating a weight to get within the target rep range at ~4 RIR is straightforward enough. (Ch. 8: Summary, "Progression with different exercises across mesocycles")
444
+
445
+ RIR progression resets to ~4 RIR at the start of every mesocycle, progressing down to ~1-0 RIR (or ~2 RIR for beginners) by the final accumulation week. This reset is universal—it allows the longest productive accumulation phase regardless of where the previous mesocycle ended. (Ch. 8: Summary, "Mesocycle Length Choices"; Ch. 2: Overload)
446
+
429
447
  #### Phase Potentiation (pg. 181-191)
430
448
 
431
449
  This is a more advanced concept, and could be explored further later on. Basically, it is a way to organize mesocycles, outside of the periodic active rest periods, to get better performance. This seems to be characterized by a maintenance training phase which is an entire mesocycle training at MV (so very low volumes), but with high weight.
@@ -436,6 +454,23 @@ A clean middle-ground might be to just take a resensitization phase every 3-4 me
436
454
 
437
455
  Identifying the type of mesocycle that is happening in the data model may be helpful to provide even more context. For example, a strength gain mesocycle will likely always be more productive than a cutting mesocycle. There are some great tips on how to track progress during a cutting mesocycle and how to track on page 220-221. What it comes down to is trying to stay around MEV for as long as possible until your cut is complete. You don't want your cut to ever last longer than a single mesocycle, so for example, instead of progressing from 5 sets to 9 sets over four weeks, you might go from 5 to 7 sets over six weeks. You still take the deload at the end of course, and progress with the roughly normal (but reduced) set and rep progression algorithm.
438
456
 
457
+ #### Cycle-Type-Specific Training Modifications
458
+
459
+ **Cut (Fat Loss) Mesocycles** (Ch. 7: Individualization, fat loss training section):
460
+
461
+ The training goal during a fat loss phase is to prevent net muscle loss, not to maximize growth. Training can be altered to extend the mesocycle (improving the accumulation-to-deload ratio) without much downside. Key modifications:
462
+
463
+ - Stay near MEV rather than pushing aggressively toward MRV. Just get some pumps, some metabolites, some soreness, and maintain performance microcycle to microcycle via the Set Progression Algorithm and muscle should be retained.
464
+ - Add only the smallest needed volumes to stay ahead of the MEV landmark. This allows extending the accumulation phase (e.g. going from 5 to 7 sets over six weeks instead of 5 to 9 over four weeks).
465
+ - RIR progression starts at ~4 RIR as normal—no modification is prescribed for cuts.
466
+
467
+ **Resensitization (Maintenance) Mesocycles** (Ch. 6: Phase Potentiation, "Volume Potentiation"; Ch. 7: Individualization):
468
+
469
+ - MV-level training: very low volume. You should rarely get sore, achieve a pump, or even feel very challenged. (Ch. 6: Phase Potentiation, maintenance training phase description)
470
+ - Bias toward the heavy rep range. Muscle conservation during maintenance dieting is best when heavier weights are used at low volumes. (Ch. 6: Phase Potentiation, "Volume Potentiation")
471
+ - Frequency can be very low: 1-2 sessions per muscle group per microcycle, as sparing muscle requires minimal stimulation (as little as once per week per muscle group). (Ch. 6: Phase Potentiation; Ch. 7: Individualization)
472
+ - Duration: 3-6 weeks for the maintenance training phase. (Ch. 6: Phase Potentiation)
473
+
439
474
  ### Fatigue (pg. 87-89)
440
475
 
441
476
  There are different types of fatigue outlined below:
@@ -498,6 +533,7 @@ In addition to the above, which help improve the SFR, which can also help reduce
498
533
  - Recovery sessions should target the affected muscle group. In bad cases, you may need to take it easy for the entire session, but it is better if just the impacted muscle group has lower volume.
499
534
  - To actually take a recovery session, simply cut the planned reps and sets in half. So if you planned to do 5 sets of 20 reps roughly, then do 2 sets of 10 reps. Use the same weight though. If you feel that you can't do any reps at the same weight, then cut the weight and sets in half, but leave the reps the same.
500
535
  - Note that cutting things in half may seem like overkill. But what you want to avoid is only reducing the number of sets by 1, or number of reps by a couple and calling that a recovery. That just reduces stimulation AND doesn't reduce fatigue. Making both problems worse.
536
+ - If the recovery session was taken because MRV was hit too early, the next stimulative session can progress in load as planned, but volume should be dropped to around midway between MEV and MRV. For example, if you did week one with 10 sets and your MRV is around 20 sets, then re-starting at ~15 sets after your recovery session(s) is a good idea. From there, apply the Set Progression Algorithm and move forward with volume as needed. (Ch. 3: Fatigue Management, "Taking Recovery Sessions")
501
537
  - Active rest periods (pg. 112): This happens once per year and lasts 1-4 weeks. Take the time completely off and try not to binge eat lol. Normally this is done right after a deload, and works well with holidays. This is actually not needed for recreational hypertrophy training because the training is a hobby and not a career and the amount of stresses on the body is much less, but it is encouraged.
502
538
 
503
539
  If you are sick, and it is a fever or bad sickness, then take as many rest days as you need to fully recover. You don't want to exacerbate the problem by training early which will make it take even longer to recover and lose more time. After a sickness that takes more than a few days to recover, you need to take a deload and then start a new mesocycle.
@@ -553,5 +589,3 @@ There isn't a definitive part in the book that says this, but it seems implied:
553
589
  These are exhausting to test, and dangerous. You will be strongest at the end of a resensitization phase, or phase where you are working at MV for an extended period of time. The upsides, are you get an accurate representation of 1RM that you can use, the downsides are the danger and fluctuations. Also testing causes 0 gains on it's own. [Here is a Youtube video from RP that discusses this](https://www.youtube.com/watch?v=4luBPhK-rlE). The primary reason this information is needed, is for the algorithms.
554
590
 
555
591
  [NASM provides a 1-rep max calculator](https://www.nasm.org/resources/one-rep-max-calculator) / algorithm that seems like it is relatively accurate. It comes from a reputable organization so it seems safe to trust them. The algorithm can be done by trying to do the most weight you can for the lowest reps possible (lower reps makes it more accurate) and plug it in to: 1RM = (Weight Lifted x Reps / 30.48) + Weight Lifted.
556
-
557
- # Todo
@@ -1,6 +1,6 @@
1
1
  import type { UUID } from 'crypto';
2
2
  import type { WorkoutExerciseCTO } from '../../../ctos/workout/WorkoutExerciseCTO.js';
3
- import type { WorkoutMuscleGroupVolumeCTO } from '../../../ctos/workout/WorkoutMuscleGroupVolumeCTO.js';
3
+ import type { WorkoutMuscleGroupVolumeCTO, WorkoutVolumeLandmarkEstimate } from '../../../ctos/workout/WorkoutMuscleGroupVolumeCTO.js';
4
4
  import type { WorkoutEquipmentType } from '../../../documents/workout/WorkoutEquipmentType.js';
5
5
  import type { WorkoutExercise } from '../../../documents/workout/WorkoutExercise.js';
6
6
  import type { WorkoutMesocycle } from '../../../documents/workout/WorkoutMesocycle.js';
@@ -8,7 +8,6 @@ import type { WorkoutMicrocycle } from '../../../documents/workout/WorkoutMicroc
8
8
  import type { WorkoutSession } from '../../../documents/workout/WorkoutSession.js';
9
9
  import type { WorkoutSessionExercise } from '../../../documents/workout/WorkoutSessionExercise.js';
10
10
  import type { WorkoutSet } from '../../../documents/workout/WorkoutSet.js';
11
- import type { WorkoutVolumeLandmarkEstimate } from '../../../ctos/workout/WorkoutMuscleGroupVolumeCTO.js';
12
11
  /**
13
12
  * Central shared context for generating or updating a {@link WorkoutMesocycle}.
14
13
  *
@@ -37,6 +36,11 @@ export default class WorkoutMesocyclePlanContext {
37
36
  * Resensitization cycles.
38
37
  */
39
38
  readonly skipDeload: boolean;
39
+ /**
40
+ * Number of accumulation (non-deload) microcycles in this mesocycle.
41
+ * Equal to the total planned count when deload is skipped, or total minus one otherwise.
42
+ */
43
+ readonly accumulationMicrocycleCount: number;
40
44
  readonly exerciseMap: Map<UUID, WorkoutExercise>;
41
45
  readonly equipmentMap: Map<UUID, WorkoutEquipmentType>;
42
46
  readonly sessionMap: Map<UUID, WorkoutSession>;
@@ -1 +1 @@
1
- {"version":3,"file":"WorkoutMesocyclePlanContext.d.ts","sourceRoot":"","sources":["../../../../src/services/workout/Mesocycle/WorkoutMesocyclePlanContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,sDAAsD,CAAC;AACxG,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oDAAoD,CAAC;AAC/F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+CAA+C,CAAC;AACrF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gDAAgD,CAAC;AAEvF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iDAAiD,CAAC;AACzF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8CAA8C,CAAC;AACnF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sDAAsD,CAAC;AACnG,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AAC3E,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,sDAAsD,CAAC;AAG1G;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,OAAO,2BAA2B;IA6DrC,SAAS,EAAE,gBAAgB;IAG3B,mBAAmB,EAAE,iBAAiB,EAAE;IACxC,gBAAgB,EAAE,cAAc,EAAE;IAClC,wBAAwB,EAAE,sBAAsB,EAAE;IAClD,YAAY,EAAE,UAAU,EAAE;IAlEnC;;;OAGG;IACH,SA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EAAO,EACvC,wBAAwB,GAAE,sBAAsB,EAAO,EACvD,YAAY,GAAE,UAAU,EAAO;IAyCxC;;OAEG;IACI,aAAa,CAAC,QAAQ,EAAE,iBAAiB,GAAG,IAAI;IAKvD;;OAEG;IACI,UAAU,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI;IAKhD;;OAEG;IACI,kBAAkB,CAAC,eAAe,EAAE,sBAAsB,GAAG,IAAI;IAKxE;;OAEG;IACI,OAAO,CAAC,IAAI,EAAE,UAAU,EAAE,GAAG,IAAI;IAOxC;;;OAGG;IACI,6BAA6B,CAAC,0BAA0B,EAAE,kBAAkB,EAAE,EAAE,GAAG,IAAI;IAK9F;;;;;;;;OAQG;IACH,OAAO,CAAC,mBAAmB;CA0B5B"}
1
+ {"version":3,"file":"WorkoutMesocyclePlanContext.d.ts","sourceRoot":"","sources":["../../../../src/services/workout/Mesocycle/WorkoutMesocyclePlanContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,KAAK,EACV,2BAA2B,EAC3B,6BAA6B,EAC9B,MAAM,sDAAsD,CAAC;AAC9D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oDAAoD,CAAC;AAC/F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+CAA+C,CAAC;AACrF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gDAAgD,CAAC;AAEvF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iDAAiD,CAAC;AACzF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8CAA8C,CAAC;AACnF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sDAAsD,CAAC;AACnG,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AAG3E;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,OAA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CAAC;IACzE,wBAAwB,EAAE,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC;IAE/D;;OAEG;gBAEM,SAAS,EAAE,gBAAgB,EAClC,YAAY,EAAE,kBAAkB,EAAE,EAClC,UAAU,GAAE,2BAA2B,EAAO,EACvC,mBAAmB,GAAE,iBAAiB,EAAO,EAC7C,gBAAgB,GAAE,cAAc,EAAO,EACvC,wBAAwB,GAAE,sBAAsB,EAAO,EACvD,YAAY,GAAE,UAAU,EAAO;IA4CxC;;OAEG;IACI,aAAa,CAAC,QAAQ,EAAE,iBAAiB,GAAG,IAAI;IAKvD;;OAEG;IACI,UAAU,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI;IAKhD;;OAEG;IACI,kBAAkB,CAAC,eAAe,EAAE,sBAAsB,GAAG,IAAI;IAKxE;;OAEG;IACI,OAAO,CAAC,IAAI,EAAE,UAAU,EAAE,GAAG,IAAI;IAOxC;;;OAGG;IACI,6BAA6B,CAAC,0BAA0B,EAAE,kBAAkB,EAAE,EAAE,GAAG,IAAI;IAK9F;;;;;;;;OAQG;IACH,OAAO,CAAC,mBAAmB;CA0B5B"}
@@ -28,6 +28,11 @@ export default class WorkoutMesocyclePlanContext {
28
28
  * Resensitization cycles.
29
29
  */
30
30
  skipDeload;
31
+ /**
32
+ * Number of accumulation (non-deload) microcycles in this mesocycle.
33
+ * Equal to the total planned count when deload is skipped, or total minus one otherwise.
34
+ */
35
+ accumulationMicrocycleCount;
31
36
  exerciseMap;
32
37
  equipmentMap;
33
38
  sessionMap;
@@ -89,6 +94,8 @@ export default class WorkoutMesocyclePlanContext {
89
94
  this.progressionInterval = 1;
90
95
  this.skipDeload = false;
91
96
  }
97
+ const totalMicrocycles = mesocycle.plannedMicrocycleCount ?? 6;
98
+ this.accumulationMicrocycleCount = this.skipDeload ? totalMicrocycles : totalMicrocycles - 1;
92
99
  // Build volume landmark estimates from historical CTOs
93
100
  this.muscleGroupToVolumeLandmarkMap = new Map(volumeCTOs.map((cto) => [cto._id, WorkoutVolumePlanningService.estimateVolumeLandmarks(cto)]));
94
101
  // Derive exercise map from CTOs
@@ -1 +1 @@
1
- {"version":3,"file":"WorkoutMesocyclePlanContext.js","sourceRoot":"","sources":["../../../../src/services/workout/Mesocycle/WorkoutMesocyclePlanContext.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,SAAS,EAAE,MAAM,gDAAgD,CAAC;AAM3E,OAAO,4BAA4B,MAAM,wDAAwD,CAAC;AAElG;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,OAAO,2BAA2B;IA6DrC;IAGA;IACA;IACA;IACA;IAlET;;;OAGG;IACa,kBAAkB,CAAS;IAE3C;;;OAGG;IACa,mBAAmB,CAAS;IAE5C;;;OAGG;IACa,UAAU,CAAU;IAEpB,WAAW,CAA6B;IACxC,YAAY,CAAkC;IAC9C,UAAU,CAA4B;IACtC,kBAAkB,CAAoC;IACtD,MAAM,CAAwB;IAE9B,mBAAmB,GAAwB,EAAE,CAAC;IAC9D;;;;;OAKG;IACa,kBAAkB,GAAwB,EAAE,CAAC;IAC7C,gBAAgB,GAAqB,EAAE,CAAC;IACxC,wBAAwB,GAA6B,EAAE,CAAC;IACxD,YAAY,GAAiB,EAAE,CAAC;IAEhD;;;OAGG;IACI,0BAA0B,CAAqC;IACtE;;;;;;OAMG;IACI,4BAA4B,CAA8C;IACjF;;;OAGG;IACI,8BAA8B,CAA2C;IACzE,wBAAwB,CAAgC;IAE/D;;OAEG;IACH,YACS,SAA2B,EAClC,YAAkC,EAClC,aAA4C,EAAE,EACvC,sBAA2C,EAAE,EAC7C,mBAAqC,EAAE,EACvC,2BAAqD,EAAE,EACvD,eAA6B,EAAE;QAN/B,cAAS,GAAT,SAAS,CAAkB;QAG3B,wBAAmB,GAAnB,mBAAmB,CAA0B;QAC7C,qBAAgB,GAAhB,gBAAgB,CAAuB;QACvC,6BAAwB,GAAxB,wBAAwB,CAA+B;QACvD,iBAAY,GAAZ,YAAY,CAAmB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AA8B,CAAC,CAAC;gBAC1F,CAAC;gBAED,MAAM,QAAQ,GAAG,oBAAoB,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;gBAChE,IAAI,QAAQ,EAAE,CAAC;oBACb,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBACrB,CAAC;qBAAM,CAAC;oBACN,oBAAoB,CAAC,GAAG,CAAC,oBAAoB,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;gBACxD,CAAC;YACH,CAAC;QACH,CAAC;QAED,IAAI,CAAC,4BAA4B,GAAG,oBAAoB,CAAC;QACzD,IAAI,CAAC,wBAAwB,GAAG,wBAAwB,CAAC;IAC3D,CAAC;CACF"}
1
+ {"version":3,"file":"WorkoutMesocyclePlanContext.js","sourceRoot":"","sources":["../../../../src/services/workout/Mesocycle/WorkoutMesocyclePlanContext.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,SAAS,EAAE,MAAM,gDAAgD,CAAC;AAK3E,OAAO,4BAA4B,MAAM,wDAAwD,CAAC;AAElG;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,OAAO,2BAA2B;IAmErC;IAGA;IACA;IACA;IACA;IAxET;;;OAGG;IACa,kBAAkB,CAAS;IAE3C;;;OAGG;IACa,mBAAmB,CAAS;IAE5C;;;OAGG;IACa,UAAU,CAAU;IAEpC;;;OAGG;IACa,2BAA2B,CAAS;IAEpC,WAAW,CAA6B;IACxC,YAAY,CAAkC;IAC9C,UAAU,CAA4B;IACtC,kBAAkB,CAAoC;IACtD,MAAM,CAAwB;IAE9B,mBAAmB,GAAwB,EAAE,CAAC;IAC9D;;;;;OAKG;IACa,kBAAkB,GAAwB,EAAE,CAAC;IAC7C,gBAAgB,GAAqB,EAAE,CAAC;IACxC,wBAAwB,GAA6B,EAAE,CAAC;IACxD,YAAY,GAAiB,EAAE,CAAC;IAEhD;;;OAGG;IACI,0BAA0B,CAAqC;IACtE;;;;;;OAMG;IACI,4BAA4B,CAA8C;IACjF;;;O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AAG,IAAI,GAAG,EAA8B,CAAC;QACnE,MAAM,wBAAwB,GAAG,IAAI,GAAG,EAAgB,CAAC;QAEzD,KAAK,IAAI,YAAY,GAAG,CAAC,EAAE,YAAY,GAAG,cAAc,CAAC,MAAM,EAAE,YAAY,EAAE,EAAE,CAAC;YAChF,MAAM,WAAW,GAAG,cAAc,CAAC,YAAY,CAAC,CAAC;YACjD,KAAK,MAAM,GAAG,IAAI,WAAW,EAAE,CAAC;gBAC9B,wBAAwB,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,YAAY,CAAC,CAAC;gBAEpD,MAAM,oBAAoB,GAAG,GAAG,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC;gBACxD,IAAI,CAAC,oBAAoB,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,YAAY,GAAG,CAAC,GAAG,KAAK,GAAG,CAAC,YAAY,8BAA8B,CAAC,CAAC;gBAC1F,CAAC;gBAED,MAAM,QAAQ,GAAG,oBAAoB,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;gBAChE,IAAI,QAAQ,EAAE,CAAC;oBACb,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBACrB,CAAC;qBAAM,CAAC;oBACN,oBAAoB,CAAC,GAAG,CAAC,oBAAoB,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;gBACxD,CAAC;YACH,CAAC;QACH,CAAC;QAED,IAAI,CAAC,4BAA4B,GAAG,oBAAoB,CAAC;QACzD,IAAI,CAAC,wBAAwB,GAAG,wBAAwB,CAAC;IAC3D,CAAC;CACF"}
@@ -1,6 +1,9 @@
1
1
  import type { UUID } from 'crypto';
2
2
  import type { WorkoutExerciseCTO } from '../../../ctos/workout/WorkoutExerciseCTO.js';
3
- import type { WorkoutMuscleGroupVolumeCTO } from '../../../ctos/workout/WorkoutMuscleGroupVolumeCTO.js';
3
+ import type {
4
+ WorkoutMuscleGroupVolumeCTO,
5
+ WorkoutVolumeLandmarkEstimate
6
+ } from '../../../ctos/workout/WorkoutMuscleGroupVolumeCTO.js';
4
7
  import type { WorkoutEquipmentType } from '../../../documents/workout/WorkoutEquipmentType.js';
5
8
  import type { WorkoutExercise } from '../../../documents/workout/WorkoutExercise.js';
6
9
  import type { WorkoutMesocycle } from '../../../documents/workout/WorkoutMesocycle.js';
@@ -9,7 +12,6 @@ import type { WorkoutMicrocycle } from '../../../documents/workout/WorkoutMicroc
9
12
  import type { WorkoutSession } from '../../../documents/workout/WorkoutSession.js';
10
13
  import type { WorkoutSessionExercise } from '../../../documents/workout/WorkoutSessionExercise.js';
11
14
  import type { WorkoutSet } from '../../../documents/workout/WorkoutSet.js';
12
- import type { WorkoutVolumeLandmarkEstimate } from '../../../ctos/workout/WorkoutMuscleGroupVolumeCTO.js';
13
15
  import WorkoutVolumePlanningService from '../util/VolumePlanning/WorkoutVolumePlanningService.js';
14
16
 
15
17
  /**
@@ -38,6 +40,12 @@ export default class WorkoutMesocyclePlanContext {
38
40
  */
39
41
  public readonly skipDeload: boolean;
40
42
 
43
+ /**
44
+ * Number of accumulation (non-deload) microcycles in this mesocycle.
45
+ * Equal to the total planned count when deload is skipped, or total minus one otherwise.
46
+ */
47
+ public readonly accumulationMicrocycleCount: number;
48
+
41
49
  public readonly exerciseMap: Map<UUID, WorkoutExercise>;
42
50
  public readonly equipmentMap: Map<UUID, WorkoutEquipmentType>;
43
51
  public readonly sessionMap: Map<UUID, WorkoutSession>;
@@ -104,6 +112,9 @@ export default class WorkoutMesocyclePlanContext {
104
112
  this.skipDeload = false;
105
113
  }
106
114
 
115
+ const totalMicrocycles = mesocycle.plannedMicrocycleCount ?? 6;
116
+ this.accumulationMicrocycleCount = this.skipDeload ? totalMicrocycles : totalMicrocycles - 1;
117
+
107
118
  // Build volume landmark estimates from historical CTOs
108
119
  this.muscleGroupToVolumeLandmarkMap = new Map(
109
120
  volumeCTOs.map((cto) => [cto._id, WorkoutVolumePlanningService.estimateVolumeLandmarks(cto)])
@@ -4,8 +4,6 @@ import type WorkoutMesocyclePlanContext from '../../Mesocycle/WorkoutMesocyclePl
4
4
  /**
5
5
  * A service for handling volume planning operations across microcycles.
6
6
  *
7
- * SCOPE: Microcycle-level volume distribution (calculating set counts per exercise)
8
- *
9
7
  * RESPONSIBILITIES:
10
8
  * - Calculate set counts for exercises across a microcycle
11
9
  * - Apply progressive overload rules (baseline + historical adjustments)
@@ -18,26 +16,35 @@ import type WorkoutMesocyclePlanContext from '../../Mesocycle/WorkoutMesocyclePl
18
16
  * - {@link WorkoutSessionExerciseService} - Used to calculate SFR and recovery recommendations
19
17
  */
20
18
  export default class WorkoutVolumePlanningService {
19
+ /**
20
+ * Controls the volume *progression rate* across accumulation microcycles.
21
+ *
22
+ * Both modes start at estimated MEV when historical volume data exists
23
+ * (falling back to 2 sets per exercise when no history is available).
24
+ *
25
+ * When `false` (default): legacy progression — adds 1 set per muscle group
26
+ * every `progressionInterval` microcycles from the MEV starting point.
27
+ *
28
+ * When `true`: MEV-to-MRV interpolation — linearly distributes sets from
29
+ * estimated MEV to estimated MRV across all accumulation microcycles.
30
+ *
31
+ * This flag exists to allow toggling between the two progression algorithms
32
+ * while the MEV-to-MRV approach is validated in practice. Once confidence is
33
+ * established, the flag and legacy path should be removed.
34
+ */
35
+ static USE_VOLUME_LANDMARK_PROGRESSION: boolean;
21
36
  private static readonly MAX_SETS_PER_EXERCISE;
22
37
  private static readonly MAX_SETS_PER_MUSCLE_GROUP_PER_SESSION;
23
38
  /** Minimum average RSM required for a mesocycle to count toward MEV estimation. */
24
39
  private static readonly MEV_RSM_THRESHOLD;
25
- /** Default estimated MEV when no qualifying mesocycle history exists. */
26
- private static readonly DEFAULT_MEV;
40
+ /** Default estimated MEV when no qualifying mesocycle history exists. Per-exercise value. */
41
+ private static readonly DEFAULT_MEV_PER_EXERCISE;
27
42
  /** Minimum average performance score (or recovery presence) to count a mesocycle toward MRV estimation. */
28
43
  private static readonly MRV_PERFORMANCE_THRESHOLD;
29
44
  /** Extra sets added above the historical peak when no stressed mesocycles exist, to estimate MRV. */
30
45
  private static readonly MRV_HEADROOM;
31
- /** Default estimated MRV when no mesocycle history exists at all. */
32
- private static readonly DEFAULT_MRV;
33
- /** RSM bracket upper bound for "below MEV" proximity (0 to this value inclusive). */
34
- private static readonly MEV_PROXIMITY_BELOW_THRESHOLD;
35
- /** RSM bracket upper bound for "at MEV" proximity (above BELOW threshold up to this value inclusive). */
36
- private static readonly MEV_PROXIMITY_AT_THRESHOLD;
37
- /** Recommended set adjustment when volume is below MEV. */
38
- private static readonly MEV_BELOW_SET_ADJUSTMENT;
39
- /** Recommended set adjustment when volume is above MEV. */
40
- private static readonly MEV_ABOVE_SET_ADJUSTMENT;
46
+ /** Default estimated MRV when no mesocycle history exists at all. Per-exercise value. */
47
+ private static readonly DEFAULT_MRV_PER_EXERCISE;
41
48
  /** Maximum sets that can be added to a single exercise in one progression step. */
42
49
  private static readonly MAX_SET_ADDITION_PER_EXERCISE;
43
50
  /** Maximum total sets to distribute across a muscle group in one progression step. */
@@ -58,61 +65,134 @@ export default class WorkoutVolumePlanningService {
58
65
  */
59
66
  static estimateVolumeLandmarks(volumeCTO: WorkoutMuscleGroupVolumeCTO): WorkoutVolumeLandmarkEstimate;
60
67
  /**
61
- * Evaluates MEV (Minimum Effective Volume) proximity for a muscle group based on
62
- * RSM scores from the first microcycle. Called when generating the second microcycle to adjust
63
- * the volume baseline.
68
+ * Calculates the set count for each exercise in a particular muscle group for this microcycle.
64
69
  *
65
- * Returns `null` when the first microcycle is incomplete or has no RSM data for the muscle group.
70
+ * Pipeline:
71
+ * 1. **Volume targets** — Determine start/end volume from landmarks or defaults
72
+ * 2. **Baseline** — Calculate default set counts from progression rules
73
+ * 3. **Resolve history** — Find the most recent session exercise data for each exercise
74
+ * 4. **Apply history** — Override baselines with historical set counts (or MAV for recovery returns)
75
+ * 5. **Evaluate SFR** — Determine recovery exercises and candidates for set additions
76
+ * 6. **Distribute sets** — Allocate added sets to candidates by SFR quality
66
77
  *
67
- * @param context The mesocycle planning context containing microcycle/session/exercise data.
68
- * @param muscleGroupId The muscle group to evaluate.
78
+ * Falls back to baseline when no previous microcycle data exists.
69
79
  */
70
- static evaluateMevProximity(context: WorkoutMesocyclePlanContext, muscleGroupId: UUID): {
71
- /** 'below' = RSM 0-3, 'at' = RSM 4-6, 'above' = RSM 7-9 */
72
- proximity: 'below' | 'at' | 'above';
73
- /**
74
- * Recommended total set adjustment for this muscle group.
75
- * Positive = add sets, negative = remove sets, 0 = no change.
76
- * Range: -2 to +3
77
- */
78
- recommendedSetAdjustment: number;
79
- /** The average RSM across session exercises targeting this muscle group. */
80
- averageRsm: number;
81
- } | null;
80
+ private static calculateSetCountForEachExerciseInMuscleGroup;
82
81
  /**
83
- * Applies MEV proximity adjustments based on RSM data from the first microcycle.
84
- * Adjusts set counts per muscle group when the first microcycle indicates volume
85
- * was below or above MEV.
82
+ * Determines the start and end volume targets for a muscle group based on
83
+ * historical volume landmarks and cycle type.
84
+ *
85
+ * @param volumeLandmark Volume landmark estimate from historical data, if available.
86
+ * @param exerciseCount Number of exercises in the muscle group.
87
+ * @param progressionInterval Cycle-type progression interval (1=MuscleGain, 2=Cut, 0=Resensitization).
86
88
  */
87
- private static applyMevProximityAdjustments;
89
+ private static getVolumeTargetsForMuscleGroup;
88
90
  /**
89
- * Calculates the set count for each exercise in a particular muscle group for this microcycle.
91
+ * Calculates the baseline set counts for all exercises in a muscle group for a given microcycle.
92
+ *
93
+ * When {@link USE_VOLUME_LANDMARK_PROGRESSION} is `false` (default), uses the legacy progression
94
+ * rate: +1 set per muscle group every `progressionInterval` microcycles from the starting volume.
95
+ *
96
+ * When `true`, linearly interpolates from `startVolume` to `endVolume` across accumulation
97
+ * microcycles.
90
98
  *
91
- * If there is no previous microcycle data for the muscle group, this falls back to
92
- * the baseline progression rules.
99
+ * @param microcycleIndex The index of the current microcycle.
100
+ * @param accumulationMicrocycleCount Number of accumulation (non-deload) microcycles.
101
+ * @param exerciseCount Number of exercises in the muscle group.
102
+ * @param startVolume Total muscle-group volume at microcycle 0.
103
+ * @param endVolume Total muscle-group volume target at the last accumulation microcycle.
104
+ * @param isDeloadMicrocycle Whether this is a deload microcycle.
105
+ * @param progressionInterval Microcycles between each set addition (0 = no progression).
93
106
  */
94
- private static calculateSetCountForEachExerciseInMuscleGroup;
107
+ private static calculateBaselineSetCounts;
95
108
  /**
96
- * Calculates the default number of sets for an exercise based on microcycle progression.
109
+ * Distributes a total evenly across N slots, with remainder going to earlier slots.
97
110
  *
98
- * Key rule: set progression is distributed across exercises that share the same primary muscle group
99
- * for the entire microcycle, regardless of which session those exercises are in.
111
+ * @param total The total to distribute.
112
+ * @param slots The number of slots to distribute across.
113
+ */
114
+ private static distributeEvenly;
115
+ /**
116
+ * Walks backward through completed microcycles to find the most recent non-recovery
117
+ * session exercise for each exercise in the muscle group.
100
118
  *
101
- * Baseline: 2 sets per exercise in the muscle group.
102
- * Progression: add 1 set per muscle group every `progressionInterval` microcycles.
103
- * - MuscleGain (interval 1): every microcycle
104
- * - Cut (interval 2): every other microcycle
105
- * - Resensitization (interval 0): no progression (flat 2 sets per exercise)
119
+ * Returns `null` when no usable historical data exists (no previous microcycle, or
120
+ * previous microcycles are incomplete/have no matching exercises).
106
121
  *
107
- * @param microcycleIndex The index of the current microcycle.
108
- * @param totalExercisesInMuscleGroupForMicrocycle Total exercises in the muscle group for
109
- * this microcycle.
110
- * @param exerciseIndexInMuscleGroupForMicrocycle Index of the current exercise within the
111
- * muscle group.
122
+ * @param context The mesocycle planning context.
123
+ * @param microcycleIndex The current microcycle index.
124
+ * @param exerciseIds The exercise IDs to search for.
125
+ */
126
+ private static resolveHistoricalExerciseData;
127
+ /**
128
+ * Overrides baseline set counts with historical data from the previous microcycle.
129
+ *
130
+ * For exercises returning from recovery, distributes the estimated MAV from volume
131
+ * landmarks proportionally across exercises. For deload microcycles, halves the
132
+ * historical count (minimum 1 set).
133
+ *
134
+ * @param muscleGroupExerciseCTOs Exercises in this muscle group.
135
+ * @param exerciseIdToPrevSessionExercise Map from exercise ID to its previous session exercise.
136
+ * @param exercisesThatWerePreviouslyInRecovery Exercises returning from recovery.
137
+ * @param exerciseIdToSetCount Current set count assignments (mutated).
112
138
  * @param isDeloadMicrocycle Whether this is a deload microcycle.
113
- * @param progressionInterval Number of microcycles between each set addition. 0 means no
114
- * progression.
139
+ * @param volumeLandmark Volume landmark estimate for the primary muscle group, if available.
140
+ */
141
+ private static applyHistoricalSetCounts;
142
+ /**
143
+ * Evaluates each exercise's performance feedback to determine recovery exercises,
144
+ * set addition recommendations, and candidates for volume increases.
145
+ *
146
+ * @param context The mesocycle planning context.
147
+ * @param muscleGroupExerciseCTOs Exercises in this muscle group.
148
+ * @param exerciseIdToPrevSessionExercise Map from exercise ID to its previous session exercise.
149
+ * @param exercisesThatWerePreviouslyInRecovery Exercises returning from recovery.
150
+ * @param exerciseIdToSetCount Current set count assignments (mutated for recovery exercises).
151
+ * @param recoveryExerciseIds Set of exercise IDs flagged for recovery (mutated).
152
+ * @param sessionIndexToExerciseIds Map from session index to exercise IDs in that session.
153
+ */
154
+ private static evaluateSfrRecommendations;
155
+ /**
156
+ * Distributes added sets across candidate exercises, prioritizing higher SFR scores.
157
+ * Respects per-exercise, per-session, and per-addition caps.
158
+ *
159
+ * @param candidates Exercises eligible for set additions, with SFR scores.
160
+ * @param totalSetsToAdd Total sets recommended for addition (before capping).
161
+ * @param exerciseIdToSetCount Current set count assignments (mutated).
162
+ * @param exerciseIdToSessionIndex Map from exercise ID to its session index.
163
+ * @param sessionIndexToExerciseIds Map from session index to exercise IDs in that session.
164
+ */
165
+ private static distributeSetsToExercises;
166
+ /**
167
+ * Determines if the session containing the given exercise is already at the
168
+ * per-muscle-group-per-session cap, based on previous microcycle set counts.
169
+ *
170
+ * @param exerciseId The exercise to check.
171
+ * @param exerciseIdToSessionIndex Map from exercise ID to its session index.
172
+ * @param sessionIndexToExerciseIds Map from session index to exercise IDs in that session.
173
+ * @param exerciseIdToPrevSessionExercise Map from exercise ID to its previous session exercise.
174
+ */
175
+ private static sessionIsCapped;
176
+ /**
177
+ * Gets the total sets currently planned for a session containing the given exercise.
178
+ *
179
+ * @param exerciseId The exercise whose session total to compute.
180
+ * @param exerciseIdToSetCount Current set count assignments.
181
+ * @param exerciseIdToSessionIndex Map from exercise ID to its session index.
182
+ * @param sessionIndexToExerciseIds Map from session index to exercise IDs in that session.
183
+ */
184
+ private static getSessionSetTotal;
185
+ /**
186
+ * Attempts to add sets to an exercise, respecting per-exercise, per-session, and
187
+ * per-addition caps. Mutates `exerciseIdToSetCount` in place.
188
+ *
189
+ * @param exerciseId The exercise to add sets to.
190
+ * @param setsToAdd The desired number of sets to add.
191
+ * @param exerciseIdToSetCount Current set count assignments (mutated).
192
+ * @param exerciseIdToSessionIndex Map from exercise ID to its session index.
193
+ * @param sessionIndexToExerciseIds Map from session index to exercise IDs in that session.
194
+ * @returns The number of sets actually added.
115
195
  */
116
- private static calculateBaselineSetCount;
196
+ private static addSetsToExercise;
117
197
  }
118
198
  //# sourceMappingURL=WorkoutVolumePlanningService.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"WorkoutVolumePlanningService.d.ts","sourceRoot":"","sources":["../../../../../src/services/workout/util/VolumePlanning/WorkoutVolumePlanningService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAEnC,OAAO,KAAK,EACV,2BAA2B,EAC3B,6BAA6B,EAC9B,MAAM,yDAAyD,CAAC;AAEjE,OAAO,KAAK,2BAA2B,MAAM,gDAAgD,CAAC;AAI9F;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,OAAO,OAAO,4BAA4B;IAC/C,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,qBAAqB,CAAK;IAClD,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,qCAAqC,CAAM;IAEnE,mFAAmF;IACnF,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC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,OAAO,CAAC;QAEpC;;;;WAIG;QACH,wBAAwB,EAAE,MAAM,CAAC;QAEjC,4EAA4E;QAC5E,UAAU,EAAE,MAAM,CAAC;KACpB,GAAG,IAAI;IA+CR;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,4BAA4B;IA4B3C;;;;;OAKG;IACH,OAAO,CAAC,MAAM,CAAC,6CAA6C;IA0Q5D;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,OAAO,CAAC,MAAM,CAAC,yBAAyB;CAgCzC"}
1
+ {"version":3,"file":"WorkoutVolumePlanningService.d.ts","sourceRoot":"","sources":["../../../../../src/services/workout/util/VolumePlanning/WorkoutVolumePlanningService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAEnC,OAAO,KAAK,EACV,2BAA2B,EAC3B,6BAA6B,EAC9B,MAAM,yDAAyD,CAAC;AAEjE,OAAO,KAAK,2BAA2B,MAAM,gDAAgD,CAAC;AAW9F;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,OAAO,OAAO,4BAA4B;IAC/C;;;;;;;;;;;;;;;OAeG;IACH,MAAM,CAAC,+BAA+B,UAAS;IAE/C,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,qBAAqB,CAAK;IAClD,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,qCAAqC,CAAM;IAEnE,mFAAmF;IACnF,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,iBAAiB,CAAK;IAE9C,6FAA6F;IAC7F,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,wBAAwB,CAAK;IAErD,2GAA2G;IAC3G,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,yBAAyB,CAAO;IAExD,qGAAqG;IACrG,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAK;IAEzC,yFAAyF;IACzF,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,wBAAwB,CAAK;IAEr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