Every rule the generator applies has to be traceable to a source that was
actually looked up, with an honest reliability label. Same discipline as
BRONNEN.md in the HomeFit sessieschema-generator this engine was ported from.
Labels used below:
- PRIMARY, the paper itself (or its open-access abstract) was retrieved and read.
- SECONDARY, only found in summaries or textbook material, not the original text.
- PRACTICE, common practice, no measured optimum. Said out loud where it applies.
1. How long may a client keep doing the same exercise?
This is the question that drove the 14 August 2026 rewrite. The answer the engine implements: the same exercises for the whole block (3 to 6 weeks), then a new block rotates them.
O2: Periodisation beats no periodisation
Williams TD, Tolusso DV, Fedewa MV, Esco MR. "Comparison of Periodized and Non-Periodized Resistance Training on Maximal Strength: A Meta-Analysis." Sports Medicine, 2017. DOI 10.1007/s40279-017-0734-y. Status: PRIMARY (full PDF read in the HomeFit project, section O2).
"The cumulative results of 81 effects gathered from 18 studies published between 1988 and 2015 indicated that the magnitude of improvement in 1RM following periodized resistance training was greater than non-periodized resistance training (ES = 0.43, 95% CI 0.27-0.58; P < 0.001)."
Used for: building a block as a mesocycle, same split and same exercises for several weeks, with the progression in the LOAD rather than in constantly changing exercises. It is also the precondition for measuring anything: a heavier weight only means something if the exercise stayed the same.
Honest limit: this meta-analysis shows that periodising works. It does not prescribe a block length.
K1: Variation helps between blocks, hurts within one
Kassiano W, Nunes JP, Costa B, Ribeiro AS, Schoenfeld BJ, Cyrino ES. "Does Varying Resistance Exercises Promote Superior Muscle Hypertrophy and Strength Gains? A Systematic Review." Journal of Strength and Conditioning Research 36(6):1753-1762, June 2022. DOI 10.1519/JSC.0000000000004258. Status: PRIMARY (abstract and conclusion retrieved and read; 8 studies, N = 241, all young men).
"The available studies indicate that varying exercise selection can influence muscle hypertrophy and strength gains. Some degree of systematic variation seems to enhance regional hypertrophic adaptations and maximize dynamic strength, whereas excessive, random variation may compromise muscular gains."
And explicitly on how often to change:
"Exercise variation should be approached systematically with a focus on applied anatomical and biomechanical constructs; on the contrary, employing different exercises that provide a redundant stimulus, as well as excessive rotation of different exercises (i.e., high frequency of change), may actually hinder muscular adaptations."
Used for: the two-sided rule in generator.ts, exercises are FIXED inside a
block (no rotation per session), and the next block deliberately rotates to
different ones (previousExerciseIds). This source is the reason both halves
exist; either one alone is wrong.
Honest limit: all participants were young men. Nothing here is specific to older clients, women, or rehabilitation.
B1: Randomising every session: equal gains, better mood, one loss
Baz-Valle E, Schoenfeld BJ, Torres-Unda J, Santos-Concejero J, Balsalobre-Fernández C. "The effects of exercise variation in muscle thickness, maximal strength and motivation in resistance trained men." PLOS ONE, 2019. DOI 10.1371/journal.pone.0226989. Status: PRIMARY (open-access abstract retrieved and read; 21 trained men, 8 weeks, 4×/week).
"Both conditions promoted large, statistically significant increases in the bench press and back-squat 1 repetition maximum without differences between groups. […] Although no between-group in MT were noted for the vastus intermedius, only the CON [fixed-exercise] displayed significant increases from baseline. Participants in EXP showed a significant, moderate improvement in the intrinsic motivation to training […]"
Used for: the honest reading of the trade-off. Randomising exercises every session is not catastrophic, strength gains matched, but the only group to grow the vastus intermedius was the FIXED one, and the study could not measure load progression at all, because there was nothing to compare. Motivation was the one real advantage of variation, and block-to-block rotation buys that without giving up measurability.
Honest limit: n = 21, trained men only, 8 weeks. This supports a direction, not a precise prescription.
W2: A block runs 3 to 6 weeks
Status: SECONDARY / PRACTICE. Carried over from the HomeFit project, section W2.
The NSCA curriculum describes a mesocycle as 2-6 weeks with 4 weeks most common;
a CPT textbook chapter on periodisation states "The mesocycle ranges from 2-8
weeks, with the final week being an intentional deload." No measured optimum
exists. The lower bound is set at 3 rather than 2 because you cannot establish a
load increase in two weeks. Enforced in blocks.ts (weeks must be 3-6) and in
MESO_MIN_WEEKS / MESO_MAX_WEEKS.
In practice this means: a client keeps an exercise for 3 to 6 weeks, roughly 6 to 30 sessions depending on frequency, and then gets different ones.
2. Load progression
O1: ACSM progression model
ACSM position stand on progression models in resistance training. Status: PRIMARY in the HomeFit project (section O1), carried over here.
Used for: PROGRESSION_PCT_PER_WEEK = 5 (mid-point of the 2-10% band) and the
condition printed on every worksheet, only add load once the client clears the
target reps by 1-2. PROGRESSION_CAP_PCT = 25 stops the projection at week 6,
because O1 ties the increase to a performance condition rather than to the
calendar, and because a mesocycle should end in a deload or a new block.
Also the source of ACSM_FREQUENCY_BAND (novice 2-3 d/wk, intermediate 3-4,
advanced 4-5) and of the ≥2×/week per muscle group rule.
Exercises without external load (since 23/10/2026). An exercise that only
uses UNLOADED_EQUIPMENT (bodyweight, bands, suspension, bars to hang from,
cardio machines) has no weight to raise, so the same weekly percentage goes into
its reps or time instead: 10 reps at +15% is 12, 30 s at +10% is 33 s
(weekTarget in worksheet.ts). The stored dose stays the week 1 base; the
sheet, the trainer's block page and the client's workout show each week's target.
Same O1 logic: the client progresses once the current target is cleared, and
without load to add, the progression is volume. Equipment not on that list keeps
the weight progression.
O3: Deload
Bell L, Darragh IAJ, Kyle TS, Rogerson D, Nolan D. "A Practical Approach to Deloading: Recommendations and Considerations for Strength and Physique Sports." Strength and Conditioning Journal, 2025. Status: PRIMARY in the HomeFit project. Basis for ending a mesocycle rather than progressing indefinitely.
Target versus record
PROGRESSION_PCT_PER_WEEK produces a TARGET. What the client actually lifted is
stored separately in session_logs and is never overwritten by the projection.
This distinction matters: O1 makes the increase conditional on performance (only
add load once the client clears the target reps by 1-2), so a printed "+10%" is
a suggestion the trainer accepts or rejects, not a measurement.
3. Safety rules carried over unchanged
- B1 (McGill), McGill 1998 low-back protocol.
MCGILL_BIG3_FAMILIESpicks one exercise per protective direction (flexion, lateral flexion, rotation / contralateral) rather than three random core exercises, because the Big 3 is about covering directions, not about the three specific movements. - Contraindications, every exercise row carries
avoid_forwith a reason and a source id per condition.scripts/verify-generator.tschecks1asserts that no contraindicated exercise ever reaches a client; last run: 0 violations in 22,680 placements. - Worksheet cap,
MAX_WERKBLAD_OEFENINGEN = 8(main block + core + conditioning together). This is a coach rule, not a source claim, carried over from HomeFit where a trainer asked for it explicitly.
4. Checks that keep this honest
npm run verify, the rule engine against the real exercise database:
day templates identical across weeks, days differing from each other,
progression 0/5/10/15/20/25%, between-block rotation, worksheet cap,
contraindications.
npm run verify:pdf, the printed worksheet stays at one landscape sheet per
training day, so all weeks of an exercise remain visible on one row.
src/lib/training/exercises.fixture.json is a snapshot of the exercise table (RLS
keeps the live table authenticated-only; the file used to live in scripts/).
Refresh it whenever the exercise database changes, otherwise the checks
validate yesterday's data.
Checks added for the rehab and nutrition round (24/10/2026)
Each rule in sections 5.1 and 7 has a failable check. Which script owns which
check (the owners are the agents of this round; a check that does not exist yet
at the time of a release is a gap and is listed as one). The last column states
what each owner was asked to make fail. When this was written (mid round) only
verify-catalogue.ts already held rehab specific checks; the others were still
being extended, so read the script before quoting a row as a fact:
| Rule | Script | What fails it |
|---|---|---|
Rehab goals produce a valid block (RH5, RH14, GOAL_PARAMS) |
npm run verify (scripts/verify-generator.ts) |
A revalidatie, mobiliteit or valpreventie block with more than REHAB_MAX_MAIN_DEFAULT main exercises, a contraindicated exercise (the check s1 still applies), a progression above 0 % in symptom_guided mode, or a day template that differs between weeks. |
| Slow breathing never uses a deep or belly cue (RH8) | npm run verify and scripts/verify-catalogue.ts |
BREATHING_AVOID_IDS (cd10, cd57, cd59, cd63, cd64) in a mobility block; a breathing row whose English, Dutch, French or German text contains a deep or belly cue. |
| Rehab editor rules and the kept override reason (RH3) | scripts/verify-block-edit.ts |
An override without a reason; an override of a failing equipment or level check; a main part that refuses a mobility exercise in a rehab block; more than REHAB_MAX_LOGGED exercises. |
| Templates accept the three goals (RH5, RH6) | npm run verify:templates |
A template with 1 to 7 sessions or up to 12 weeks that the code refuses, or the other way round. |
| Dose string is identical everywhere (RH6) | npm run verify:pdf and npm run verify:training-depth |
A hold or "per side" that prints differently in the editor, portal, worksheet and PDF (describeDose); a rehab sheet that runs past one landscape sheet per day. |
| The rehab catalogue rows rh01 to rh60 (RH1 to RH9) | scripts/verify-catalogue.ts (npm script verify:catalogue, to be added to package.json by the orchestrator) |
A row without an RHn source id; an avoid_for entry whose alternative does not exist or is itself unsafe for the same condition; a missing translation; a dash character in text; a fixture row that the SQL migration does not carry. |
| Food library is consistent (NU12) | scripts/verify-foods.ts (npm script verify:foods, to be added by the orchestrator) |
A food whose macros break the Atwater factors by more than 15 %; a missing fdc id; a detail field that is negative. |
| Warnings (NU1 to NU7) and plans (NU8, NU9, NU11) | npm run verify:meal-plan (scripts/verify-meal-plan.ts) |
Targets below 800 kcal that are not blocked; below the floor that are not warned; a loss predicted above the limit that is not flagged; a referral condition that does not withhold the deficit; a forbidden food reaching a plan for any diet and exclusion; a vegan plan without the note. |
| No dash or hyphen joins in visible copy; all four languages have the same keys | npm run verify:marketing, npm run verify:i18n |
A missing key in any locale; a dash in marketing text. |
Last run. The numbers belong to a release, not to this document; the orchestrator records them when the round is deployed. A check that is red at that moment is listed in the release notes, not hidden here.
The database side is checked separately: the migration was applied twice and
exercised against a Postgres test harness (58 behaviour checks, per the db build
result), and scripts/check-prod-schema.sh refuses a deploy while production
misses a migration the code needs.
5. Meal plans (voedingsschema)
The meal-plan generator (src/lib/meal-plan/) builds days of ordinary dishes
and scales their portions so that each day lands on the coach's targets. What
it rests on, with the same labels as above:
- Food values: USDA FoodData Central, SR Legacy (April 2018). Public domain
(CC0), so the values can ship inside the app. Each food in
foods.tscarries itsfdcrecord id, so every number can be checked athttps://fdc.nal.usda.gov/food-details/<fdc>/nutrients. Status: PRIMARY (the values were extracted from the official CSV download, not copied from a secondary list). Chosen over NEVO (Dutch) because NEVO's terms for redistribution inside a commercial product could not be confirmed. CIQUAL 2025 would be the next candidate for European dishes (its licence is Etalab 2.0, not CC BY 4.0 as an earlier version of this line said: see NU12). - Targets: Mifflin-St Jeor + activity factor + ISSN protein per kg. The
same maths as the public macro calculator (
src/lib/tools/macros.ts, which lists the sources). The coach's calculator in the targets card reuses it. Since 24/10/2026 the targets are checked by the warnings function inmacros.ts(section 5.1, sources NU1 to NU7); the maths itself is unchanged except that protein grams follow the adjusted weight from BMI 30 (NU2) and a known body fat switches resting energy to Katch-McArdle (NU3). - Protein spread over the meals. Each meal's protein share sits halfway between its energy share and an even split, so snacks carry some protein and dinner does not carry it all. Based on the ISSN position stand on protein and exercise (Jäger et al. 2017), which advises spreading protein over the day. Status: SECONDARY for this feature (the position stand is cited from the macro calculator's source list, not re-read for the meal plans), and the "halfway" rule itself is PRACTICE.
- Meal energy split (for example 25 / 30 / 15 / 30 % with four meals): PRACTICE. A common split, no measured optimum; the coach can change any portion.
- Portion ranges per ingredient role (protein 0.5-2×, starch 0.25-3×, vegetables 0.75-1.5×, at most four counted pieces such as eggs per meal): PRACTICE, chosen so a fitted dish still looks like the dish.
npm run verify:meal-plan checks the library against the Atwater factors
(4/4/9 kcal per gram of protein/carbs/fat, within 15 %), that no excluded food
ever reaches a plan (every diet × every exclusion × 3 to 6 meals), and how
close the plans land. Last run over 210 generated days: worst day 2.6 %
off the calorie target, 6.2 % off protein, 9 % off carbs, 9.7 % off
fat.
5.1 Safety rails, references and scope (24/10/2026)
RungGym is now also cold-mailed to nutrition coaches. The research of 24/10/2026
found the existing nutrition maths clean but thin: no absolute energy floors, no
check on the speed of weight loss, no referral gates, no fibre. The rules below
close those gaps. They live in src/lib/tools/macros.ts. The warnings function
in macros.ts (named checkTargets at the time of writing; the nutrition agent
owns the name) takes a finished set of targets and returns a list of warnings, each
with a severity (info, caution, danger, block), a source id (NU1 to NU7)
and the numbers behind it. The coach form, the server action and
scripts/verify-meal-plan.ts call the same function.
The design rule. A warning is never a silent clamp. The coach sees what the rule
is, with its source, and ticks "I understand" for a caution or danger before the
target is saved. Only block (below 800 kcal) cannot be saved at all. Every number
is a suggestion the coach can change. The one older exception is the public macro
calculator's generated suggestion: it still raises a result below resting energy up
to resting energy (raisedToBmr says so); the warnings function then checks the
finished number against the absolute floors below.
Grades follow the labels at the top of the file. As in section 7, PRIMARY means the record or abstract was retrieved; where the research file says a figure came from memory of an EFSA opinion rather than the opinion itself, it says so below.
NU1: EFSA reference values
- Source. EFSA, Dietary Reference Values for nutrients: summary report (2017). Opinions: Scientific Opinion on Dietary Reference Values for fats, EFSA J 2010;8(3):1461, DOI 10.2903/j.efsa.2010.1461; for carbohydrates and dietary fibre, EFSA J 2010;8(3):1462, DOI 10.2903/j.efsa.2010.1462; for water, EFSA J 2010;8(3):1459, DOI 10.2903/j.efsa.2010.1459; for protein, EFSA J 2012;10(2):2557, DOI 10.2903/j.efsa.2012.2557.
- What the source says. Fat 20 to 35 % of energy; carbohydrate 45 to 60 % of energy; dietary fibre 25 g a day (adequate intake); total water 2.0 L (women) and 2.5 L (men) a day from all sources, drinks and food; protein population reference intake 0.83 g per kg bodyweight. Ranges are for the general adult population.
- Grade. PRIMARY (authority). The summary report was confirmed to exist; the per-value check against each opinion was not finished (research file), so a coach who cites a figure to a client should open the opinion.
- What the code does.
ENERGY_SHARE_RANGE(fat 0.20 to 0.35, carbohydrate 0.45 to 0.60),FIBER_TARGET_G(25 to 30 shown, defaultFIBER_DEFAULT_G= 25),WATER_L(2.0 / 2.5),PROTEIN_EFSA_FLOOR_G_PER_KG= 0.83. The warnings function flags fat or carbohydrate below the lower bound (fatLow,carbsLow) and protein below 0.83 g/kg (proteinLow); it does not flag the upper bounds. Fibre and water are always shown as a reference (reference). EFSA 0.83 is shown as a floor, never as a target. - What remains PRACTICE. A high protein deficit plan (2.0 g/kg, 25 % fat) leaves
carbohydrate around 39 to 40 % of energy for a typical 80 kg client at 1800 kcal.
That is below the EFSA band and acceptable for a lifter; the coach sees the
carbsLowcaution and decides. Free sugars, salt and saturated fat (WHO 2015; EFSA sodium 2019, DOI 10.2903/j.efsa.2019.5778) are stored as details per food (sugar_g,sodium_mg,sat_fat_g) and shown as information; they are not hard limits and the research says to keep them that way (EFSA sugars 2022, DOI 10.2903/j.efsa.2022.7074, citation to verify).
NU2: protein anchoring
- Source. Jager R, Kerksick CM, Campbell BI, et al. International Society of Sports Nutrition position stand: protein and exercise. J Int Soc Sports Nutr 2017;14:20, DOI 10.1186/s12970-017-0177-8: 1.4 to 2.0 g/kg/day for exercising people. Morton RW, et al. A systematic review, meta-analysis and meta-regression of the effect of protein supplementation on resistance training-induced gains in muscle mass and strength in healthy adults. Br J Sports Med 2018;52:376-384, DOI 10.1136/bjsports-2017-097608 (49 trials: gains plateau around 1.6 g/kg, upper confidence limit 2.2).
- Grade. PRIMARY (position stand and meta-analysis).
- What the code does. Goal point values stay as before (
PROTEIN_G_PER_KG: lose 2.0, lose slowly 1.8, maintain 1.6, gain 1.8, insidePROTEIN_RANGE_G_PER_KG1.4 to 2.0). New: from BMI aboveADJUSTED_WEIGHT_BMI= 30 the grams follow the adjusted weight, which is the reference weight (the weight at BMI 25 for that height,REFERENCE_BMI) plusADJUSTED_WEIGHT_FACTOR= 25 % of the excess (adjustedWeightKg). AbovePROTEIN_WARN_G_PER_KG= 2.4 g/kg (measured on that basis) the warnings function raisesproteinHigh. - What remains PRACTICE. The 25 % factor is a dietetic convention, not a result from the papers. The limit 2.4 sits at the Morton upper confidence limit rounded up; Helms 2014 (NU4) supports higher figures for lean athletes in a deficit, which is why it is a caution the coach can acknowledge and not a block.
NU3: resting energy, and how wrong it can be
- Source. Mifflin MD, St Jeor ST, Hill LA, et al. A new predictive equation for resting energy expenditure in healthy individuals. Am J Clin Nutr 1990;51:241-247, DOI 10.1093/ajcn/51.2.241. Frankenfield D, Roth-Yousey L, Compher C. Comparison of predictive equations for resting metabolic rate in healthy nonobese and obese adults: a systematic review. J Am Diet Assoc 2005;105:775-789, DOI 10.1016/j.jada.2005.02.005.
- What the source says. Mifflin-St Jeor is within 10 % of measured resting energy in 82 % of non-obese and 70 % of obese adults; no equation is right for everyone.
- Grade. PRIMARY.
- What the code does.
BMR_UNCERTAINTY= 0.10: the warnings function returns aninfoitem with the band around maintenance energy (low and high), and the result carriesbmrRange. When the coach enters a body fat betweenBODY_FAT_LIMITS(3 and 60 percent),restingEnergyuses Katch-McArdle (370 + 21.6 x fat-free mass,katchMcArdle) instead of Mifflin. The research also named Cunningham (500 + 22 x fat-free mass, DOI 10.1093/ajcn/33.11.2372); it is not implemented. - What remains PRACTICE. Katch-McArdle is only as good as the body fat number. The research said to use it only for a reliable measurement (DEXA, not a consumer scale). The code cannot tell the two apart, so the coach decides what to type in. The activity multipliers (1.2 to 1.9) are conventions, and people over-report activity and under-report intake (Lichtman 1992 N Engl J Med, DOI 10.1056/NEJM199212313272701): the target is a hypothesis to adjust from the weight trend after two or three weeks, not a measurement.
NU4: the rate of weight loss
- Source. Garthe I, Raastad T, Refsnes PE, Koivisto A, Sundgot-Borgen J. Effect of two different weight-loss rates on body composition and strength and power-related performance in elite athletes. Int J Sport Nutr Exerc Metab 2011;21(2):97-104, DOI 10.1123/ijsnem.21.2.97 (24 athletes, 8.5 weeks: 0.7 % of bodyweight a week kept lean mass and improved strength; 1.4 % a week lost strength gains). Aragon AA, et al. International Society of Sports Nutrition position stand: diets and body composition. J Int Soc Sports Nutr 2017;14:16, DOI 10.1186/s12970-017-0174-y (0.5 to 1 % a week). Helms ER, Zinn C, Rowlands DS, Brown SR. A systematic review of dietary protein during caloric restriction in resistance trained lean athletes. Int J Sport Nutr Exerc Metab 2014;24(2):127-138, DOI 10.1123/ijsnem.2013-0054: 2.3 to 3.1 g per kg fat-free mass for lean athletes in a deficit.
- A correction. An earlier note gave DOI 10.1186/1550-2783-11-20 for the 2.3 to 3.1 figure. That DOI is Helms et al. 2014 in J Int Soc Sports Nutr (natural bodybuilding contest preparation), a different paper. The figure comes from the Int J Sport Nutr Exerc Metab review cited above, which is the one the research file gives. Cite that one.
- Grade. PRIMARY, small trials, mostly athletes.
- What the code does.
WEEKLY_LOSS_LIMIT_PCT: 1 % of bodyweight a week in general, 0.5 % for a careful case (the coach marks strength focus, or the body fat is at or belowLEAN_BODY_FAT_PCT: 15 % men, 24 % women). Predicted loss = (maintenance - target) x 7 /KCAL_PER_KG_BODY(7700) / bodyweight. Above the limit:fastLoss(caution). The goal adjustments are unchanged (-20 % or -10 % of maintenance). - What remains PRACTICE. The 7700 kcal per kg conversion is a rule of thumb; the body adapts dynamically (Hall 2011, Lancet, DOI 10.1016/S0140-6736(11)60812-X). The lean thresholds 15 and 24 percent are ours.
NU5: energy floors
- Source. Jensen MD, Ryan DH, Apovian CM, et al. 2013 AHA/ACC/TOS guideline for the management of overweight and obesity in adults. J Am Coll Cardiol 2013;63(25):2985-3023, DOI 10.1016/j.jacc.2013.11.004: lifestyle programmes start at 1200 to 1500 kcal for women and 1500 to 1800 kcal for men. EFSA scientific opinion on total diet replacement for weight control (2015): below 800 kcal a day needs medical supervision (the exact EU regulation reference was not verified).
- Grade. PRIMARY for the thresholds, PRACTICE for how they are applied.
- What the code does.
KCAL_FLOOR= 1200 (female) and 1500 (male); with sex unknown the female floor is used.KCAL_REFUSE_BELOW= 800. A target below the floor:belowFloor(danger, the coach must acknowledge). Below 800:belowRefuse(block, cannot be saved). Resting energy is no longer the floor: a 60 year old woman of 50 kg and 160 cm has resting energy of about 1040 kcal, below 1200. - What remains PRACTICE. Applying the lower end of the AHA band as the warning point; a coach with a medical team may go lower with a doctor's supervision, which is why a floor is a warning and not a block.
NU6: low energy availability
- Source. Mountjoy M, Sundgot-Borgen JK, Burke LM, et al. IOC consensus statement on relative energy deficiency in sport (RED-S): 2018 update. Br J Sports Med 2018;52:687-697, DOI 10.1136/bjsports-2018-099193. Loucks AB, Kiens B, Wright HH. Energy availability in athletes. J Sports Sci 2011;29(S1):S7-S15, DOI 10.1080/02640414.2011.588958.
- What the source says. Energy availability = (intake - exercise energy) / fat-free mass. Below about 30 kcal per kg fat-free mass a day, hormones and bone are affected. Women and endurance athletes are most at risk.
- Grade. PRIMARY for the threshold (consensus statement and laboratory work).
- What the code does.
ENERGY_AVAILABILITY: amber below 45, red below 30. It is only computed when the activity factor is at leastHIGH_LOAD_PAL= 1.7 ("very active" and up) and the fat-free mass is known (a valid body fat entered). Exercise energy is estimated as maintenance minus resting energy x 1.7. A lower baseline (1.2 or 1.55) was tried and rejected: an activity factor also holds daily movement and the thermic effect of food, so a lean client eating exactly at maintenance would read below 45 and be warned for nothing. The estimate therefore under-warns, and the coach drawer says so. Result:lowEnergyAvailability,cautionbelow 45,dangerbelow 30. - What remains PRACTICE. The estimate of exercise energy from an activity factor is crude; the real figure needs a training log. The 1.7 cut-off for "high load" is ours.
NU7: referral gates
- Sources. EFSA, Scientific Opinion on Dietary Reference Values for energy, EFSA J 2013;11(1):3005, DOI 10.2903/j.efsa.2013.3005 (pregnancy adds about 70, 260 and 500 kcal a day in the three trimesters, never a deficit). KDIGO 2024 clinical practice guideline for CKD, Kidney Int 2024;105(4S):S117-S314, DOI 10.1016/j.kint.2023.10.018 (protein about 0.8 g/kg, avoid above 1.3 g/kg). Morgan JF, Reid F, Lacey JH. The SCOFF questionnaire: assessment of a new screening tool for eating disorders. BMJ 1999;319:1467-1468, DOI 10.1136/bmj.319.7223.1467 (five questions; two or more "yes" means refer).
- Grade. PRIMARY for the guidelines, PRACTICE for the gating we built.
- What the code does.
REFERRAL_CONDITIONS: pregnancy or breastfeeding, under 18, diabetes treated with insulin or sulfonylurea, kidney disease, an eating disorder (history, or SCOFF of two or more) and underweight. The body data settles two on its own: age underADULT_AGE= 18 (referralAge) and BMI underUNDERWEIGHT_BMI= 18.5 (referralUnderweight). The coach ticks the others in the targets form. If any applies, no deficit target is saved (a maintenance or surplus target still can be) and the form says to consult a physician or dietitian. The coach's screening confirmation stays valid forSCREENING_VALID_DAYS= 90 and is stored on the plan (client_nutrition_plans.screening_confirmed_at). - What remains PRACTICE. The list. The research also names bariatric surgery, GLP-1 medication, coeliac disease, inflammatory bowel disease, cancer and PKU as conditions where a coach should hand off; they are not separate switches, and a coach is expected to apply the general rule "therapeutic diets are not ours" (NU13). The SCOFF questions themselves are not asked by the software: the coach asks, and ticks the box.
NU8: vegetarian and vegan diets
- Source. Melina V, Craig W, Levin S. Position of the Academy of Nutrition and Dietetics: vegetarian diets. J Acad Nutr Diet 2016;116(12):1970-1980, DOI 10.1016/j.jand.2016.09.025: well planned vegetarian and vegan diets are adequate; watch vitamin B12, iron, zinc, iodine, calcium, EPA and DHA and vitamin D.
- Grade. PRIMARY. The EFSA reference figures for each micronutrient that the research listed were from memory and are not used as numbers in the code.
- What the code does.
dietNotesreturns thevegannote for a vegan plan, for the plan screens and the PDF to print: a vitamin B12 source is needed (fortified food or a supplement), and iodine, iron, calcium and omega-3 are on the watch-list (the English wording is inmeal-plan.ts). The diet filter (DIET_FORBIDS) removes meat, fish, shellfish, molluscs, egg, dairy and honey for vegan. - What remains PRACTICE. The software does not total micronutrients; the note is a prompt for the coach. Plant protein: one RCT (Hevia-Larrain 2021, DOI 10.1007/s40279-021-01470-9, men, 12 weeks) found equal gains at about 1.6 g/kg, so vegan clients are advised to aim at the upper protein range (SECONDARY, single trial).
NU9: training day and rest day
- Source. Thomas DT, Erdman KA, Burke LM. Position of the Academy of Nutrition and Dietetics, Dietitians of Canada, and the American College of Sports Medicine: nutrition and athletic performance. Med Sci Sports Exerc 2016;48(3):543-568, DOI 10.1249/MSS.0000000000000852. Impey SG, et al. Fuel for the work required: a theoretical framework for carbohydrate periodization and the glycogen threshold hypothesis. Sports Med 2018;48:1031-1048, DOI 10.1007/s40279-018-0867-7.
- What the source says. Carbohydrate follows the load: about 3 to 5 g/kg on moderate days, more on hard days, with protein 1.2 to 2.0 g/kg and fat at least 20 % of energy.
- Grade. PRIMARY (position stand and review).
- What the code does. Optional. A plan may carry
rest_kcal,rest_carbs_gandtraining_days(weekdays, 0 to 6). The generator gives each day of a plan the training or rest target throughdayTypeFor. Where the two targets are displayed (portal, PDF) is part of the nutrition-app work. - What remains PRACTICE. How far apart the two targets are is the coach's choice; no formula suggests it.
NU10: Belgian and Dutch guidance (context, not hard-coded)
- Sources. Belgium: Hoge Gezondheidsraad advice 9285 (2016), which is being superseded by the advice 9805 to 9807 of June 2025 (their numbers were not verified by us). The Voedingsdriehoek of Gezond Leven (Vlaams Instituut Gezond Leven) is the lay tool. Netherlands: Gezondheidsraad, Richtlijnen goede voeding (2015); the research notes the council replaced its protein-source advice on 4 December 2025 (red meat at most 200 g a week, legumes 250 g a week, fish about 100 g a week; the fish figure from a secondary source).
- Grade. SECONDARY (government and press pages, not the advice documents).
- What the code does. Nothing: no Belgian or Dutch figure is hard-coded. The numbers in the code are EFSA's (NU1) and the sports positions (NU2, NU9).
- What remains open. Fetch the 2025 HGR texts and the December 2025 Dutch advice before any figure is quoted as "official". The Dutch red meat cap should be respected in templates for Dutch users once confirmed.
NU11: the 14 allergens
- Source. Regulation (EU) No 1169/2011, Annex II: cereals containing gluten, crustaceans, eggs, fish, peanuts, soybeans, milk, nuts, celery, mustard, sesame, sulphites, lupin, molluscs.
- Grade. Regulation (the text is public; PRIMARY).
- What the code does.
EU_ALLERGENSlists all 14 andEXCLUSIONSadds pork (a dietary choice, not an allergen). The coach picks exclusions per plan; a food carrying a forbidden tag never reaches a plan (checked for every diet and every exclusion byverify:meal-plan). A tag exists only where a food has been tagged: excluding a substance that no food in the library carries yet removes nothing, and the code comments say so. - What remains PRACTICE. The tags are an aid. Every plan says that product labels must be checked. RungGym does not treat an allergy: that is a medical diet (NU13).
NU12: food data, licences and credits
Licence texts were read on 24/10/2026 (PRIMARY for the licence, not for the nutrient values).
- USDA FoodData Central. CC0. SR Legacy (April 2018) is frozen and is the source
of every value in
foods.ts(each food carries itsfdcid). Foundation Foods (April 2026) was downloaded and checked for gaps; it carried none of the gaps, so nothing in the library is from it. A credit is requested, not required. - CIQUAL 2025 (ANSES). A correction to the text earlier in this section: CIQUAL is released under the Licence Ouverte / Etalab 2.0, not CC BY 4.0. The practical duty is the same (free reuse including commercial use and modification, with the source and the update date credited). Dataset DOI 10.57745/RDMHWY, update of 19 November 2025, 3,484 foods. It is not in the library today. If it is added, the credit line and the date go on the data sources page and in the PDFs.
- Open Food Facts. ODbL 1.0 for the database, DbCL for the contents, CC BY-SA for
the images. RungGym looks products up live (
src/lib/coaching/food-search.ts) and never merges them into its own food table, which is the pattern that avoids a share-alike derivative database. The credit must be visible next to the results and in the PDFs ("Data from Open Food Facts", with a link), and the images are not used. Known gaps found by the research: the credit only appeared in FAQ text and a code comment, the User-Agent has no contact address, and nothing is cached against the per-IP quota (10 searches a minute). Those are fixes for the nutrition-app code, not claims of this document. - Not used, on purpose. NEVO (RIVM) forbids charging end users and changing values; Nubel needs a paid licence agreement; FRIDA's terms are unverified. Swiss Food Composition Database v7.1 (commercial use allowed with credit), CoFID (OGL v3) and the Canadian Nutrient File are possible later layers.
- Evidence for the numbers.
npm run verify:meal-planchecks every food against the Atwater factors (4/4/9, within 15 %). The research suggests tagging every entry as verified or unverified and rounding; crowdsourced entries are accurate for energy and macros but not for sodium (Evenepoel 2020, DOI 10.2196/18237).
NU13: scope of practice
- Sources. Belgium: dietist is a protected paramedical title (royal decree of 19 February 1997 on the qualifications; the research found it through secondary legal sources and notes a 2022 federal advice that it is outdated). Netherlands: the education title diëtist is protected under art. 34 of the Wet BIG; "voedingscoach" and "voedingsdeskundige" are not (secondary source).
- Grade. SECONDARY (the statutes were not read). Not legal advice; a legal check for Belgium and the Netherlands is on Lukas' list and is not done.
- The posture the product takes. RungGym is a coaching tool for healthy adults. It does not tailor a therapeutic diet (diabetes, kidney disease, allergy treatment, tube feeding), does not present a coach as a dietitian, and makes no medical claims; health claim wording follows Regulation (EC) No 1924/2006. Health data (weight, conditions, allergies) is health data under GDPR article 9; the same consent mechanism as in section 7.13 applies.
- What the code does. The referral gates (NU7) withhold a deficit and tell the coach to consult a physician or dietitian, and the plan carries a scope note: a coaching tool for healthy adults, not medical nutrition therapy. Nothing in the product prescribes a therapeutic diet.
What a nutrition coach can check, and what to say when asked.
| They ask | Answer |
|---|---|
| "Can I change every number?" | Yes: targets, per meal, per ingredient. Warnings show reasons and ask for acknowledgement; only below 800 kcal is the save refused. |
| "Why does it warn at my target?" | Each warning names its source (NU1 to NU7), above. |
| "Is Mifflin accurate?" | Within 10 % for most people; the plan shows the band. |
| "Does it handle diabetes or kidney disease?" | No. It stops and tells you to refer. |
| "Where does the food data come from?" | USDA FoodData Central (SR Legacy 2018, CC0). Open Food Facts is looked up live, credited. |
6. Recovery check (herstel)
Code: src/lib/coaching/recovery.ts, checked by npm run verify:recovery.
Same check for people training alone and for a coach's clients; the coach sees
the last 14 days on the client's coaching page.
Note on ids. The letters H1, H2 and H3 below are SCIENCE.md's own (Hooper, Saw, Watson). They are not the ids of the exercise catalogue's
BRONNEN.md, where H1 is Sherrington 2019 (the Cochrane review on exercise and falls) and H2 is Nelson 2007 (ACSM/AHA physical activity for older adults). The two uses of the same letter have coexisted since the recovery check was written; they never meet in code, because the catalogue stores its ids insource_idsandbron_idand this section is prose only. The sources added on 24/10/2026 use two letters (RH1toRH14,NU1toNU13) so that they cannot collide with either.
H1: Four self-rated items: the Hooper index
Hooper SL, MacKinnon LT, Howard A, Gordon RD, Bachmann AW. Markers for monitoring overtraining and recovery. Med Sci Sports Exerc 1995;27(1):106-112. Fourteen elite swimmers over six months: sleep quality, fatigue, stress and muscle soreness, each rated 1-7 with 7 the worst. The well-being ratings explained more of the variation in staleness than the physiological markers, and during the taper 72 % of the variation in performance gains. Status: SECONDARY (abstract-level summaries in sport databases and later papers that use the "Hooper index"; full text not read). Small sample: it justifies the items and the scale, not any cut-off.
H2: Self-report beats the objective markers for day-to-day monitoring
Saw AE, Main LC, Gastin PB. Monitoring the athlete training response: subjective self-reported measures trump commonly used objective measures: a systematic review. Br J Sports Med 2016;50(5):281-291. 56 studies: subjective measures tracked acute and chronic training load with better sensitivity and consistency than blood markers or heart rate, worsening after a rise in load and recovering after a drop. Status: SECONDARY (abstract and conclusion via the BJSM and PMC records, not the full review). This is why the verdict compares a person with their OWN recent normal rather than with fixed population norms.
H3: Sleep: at least 7 hours
Watson NF et al. Recommended amount of sleep for a healthy adult: a joint consensus statement of the AASM and Sleep Research Society. Sleep 2015;38(6):843-844. Adults should sleep 7 hours or more per night on a regular basis. Status: SECONDARY (summary record). Under 7 hours is named as a reason; under 6 makes the verdict at least "take it easier" (a floor, not an extra step: a morning that is already "take it easier" stays there).
Thresholds (all PRACTICE)
- Baseline: the 28 days before the day, used from 7 entries on. One block of training; one week of mornings before it is trusted.
- Verdict against the baseline: z = (today - mean) / max(SD, 2). z ≥ 0.75 "take it easier", z ≥ 1.5 "recovery day". The SD floor of 2 points keeps a person who always answers the same from being flagged for a single point.
- Without a baseline: sum ≥ 16 (every item "average") is "take it easier", ≥ 20 is "recovery day".
- Absolute guards on top of the baseline: a sum ≥ 20 is never "good to go" (someone who always feels wrecked must not be told that is fine because it is their usual), and a sum ≤ 12 (every item "good" on average) is never a "recovery day" (only "take it easier"), however fresh the usual is.
- Any item at 7 forces at least "take it easier".
- Advice: "take it easier" means stopping each set with 2 to 3 reps in reserve (the RIR idea, Helms et al. 2016, used here as wording, not as a measured threshold); "recovery day" means a light session or mobility.
- Three recovery days in a row (calendar days, a missing day ends the run): tell the coach, see a doctor if ill. The app says out loud that it is a training aid, not a medical check.
Training depth: groups, RPE, records and next-load suggestions (18/10/2026)
All of this is PRACTICE built on the sources below; none of it changes what the generator produces by default, except the RPE target (a number printed next to the dose, not a change of sets, reps or load).
Supersets, circuits, AMRAP, EMOM
- Time-efficient pairing (optional, off): Iversen VM, Norum M, Schoenfeld BJ, Fimland MS. No time to lift? Designing time-efficient training programs for strength and hypertrophy: a narrative review. Sports Medicine 2021;51:2079-2095. Supersets and similar structures give comparable volume in clearly less time. Weakley JJS et al. The effects of traditional, superset, and tri-set resistance training structures on perceived intensity and physiological responses. Eur J Appl Physiol 2017;117:1877-1889. Supersets raise the metabolic demand of a session and shorten it.
- Rule in code:
AUTO_SUPERSETinsrc/lib/training/constants.tsis off. When switched on it pairs the last two main-block exercises only for endurance and fat-loss goals, never for a beginner (beginners get straight sets while the movement is being learned) and never for two exercises that share a muscle group (that is local fatigue, not efficiency). A coach can always group by hand in the block editor. - AMRAP and EMOM are coach-chosen formats (a time cap, or one minute per round); the app only runs the clock and counts rounds.
RPE and RIR targets
- Helms ER, Cronin J, Storey A, Zourdos MC. Application of the Repetitions in Reserve-Based Rating of Perceived Exertion Scale for Resistance Training. Strength Cond J 2016;38(4):42-49. RIR = 10 - RPE.
- Zourdos MC et al. Novel Resistance Training-Specific Rating of Perceived Exertion Scale Measuring Repetitions in Reserve. J Strength Cond Res 2016;30(1):267-275. The scale is read less accurately by novices, which is why a beginner's target is one point lower.
- Targets (
rpeTargetForinsrc/lib/training/dose.ts): strength and muscle growth RPE 8 (2 reps in reserve); endurance and fat loss RPE 7 (3 in reserve); beginners one point lower. Main block only.
Personal records and the 1RM estimate
- Epley B. Poundage chart. Boyd Epley Workout, University of Nebraska, 1985:
1RM = weight x (1 + reps / 30). Accuracy drops above roughly 10 repetitions
(the formula keeps climbing while real capacity does not), so the estimate
caps reps at 12; the reps record itself is not capped. One rep is the
weight itself. Brzycki M. JOPERD 1993;64(1):88-90, weight x 36 / (37 -
reps), is available as
brzycki1rmfor comparison; the app records Epley. - Rules (
detectRecords, mirrored in SQL byportal_save_set_v2): a warm-up set never counts; an equal value is not a record; the first set ever is stored but not celebrated; a reps record needs the same or a higher weight.
Next-load suggestion
- Helms ER, Cross MR, Brown SR, Storey A, Cronin J, Zourdos MC. Rating of Perceived Exertion as a Method of Volume Autoregulation Within a Periodized Program. J Strength Cond Res 2018;32(6):1627-1636. Double progression with RPE autoregulation: reach the target reps at an effort clearly below the target, then add load; back off when the effort runs well above it.
- Rule (
suggestNextLoad): every working set at target reps and mean RPE at least 1 below target: +2.5 % (upper body) or +5 % (lower body); any set 2 or more reps short, or mean RPE 1.5 or more above target: -5 %; otherwise hold. Rounded to 2.5 kg (1 kg under 20 kg), and a step up is never less than one plate step. Without RPE data the reps decide. It is a suggestion the client can overwrite, not a prescription.
7. Rehabilitation, mobility and fall prevention (24/10/2026)
RungGym is cold-mailing physiotherapists ("kinesitherapeuten" in Belgium, "fysiotherapeuten" in the Netherlands). Until this round the engine knew four strength goals and a strength-day shape. This section is the ledger for the three goals added for them, and for every rule that comes with those goals.
The rule that overrides everything below. RungGym is a planning and communication tool for a named professional who stays responsible. Every number in this section is a default the therapist can change, shown next to its reason. The software flags and suggests; it never diagnoses, never advances a phase on its own, and never decides that a client is fit to do something. Section 7.13 spells out why.
How the grades were assigned. The labels are the ones at the top of this file. The research of 24/10/2026 retrieved records, abstracts and guideline pages by search; it did not read every full text. So a PRIMARY below means "the record or abstract was retrieved and the number is in it", and where only a secondary source or a memory of the paper backs a detail, it says (citation to verify) instead of guessing. No DOI below was invented: a DOI that came from the research files unconfirmed carries that mark.
Source ids. The rehab rules use ids RH1 to RH14, the nutrition rules in
section 5 use NU1 to NU13. They are two letters on purpose. The exercise
catalogue keeps the single letter ids of HomeFit's BRONNEN.md (A1, B1, H1 and
so on) in source_ids and avoid_for.bron_id; the rehab rows carry at least
one RHn id next to those.
The three goals and their dose (GOAL_PARAMS)
Database keys stay Dutch, labels are translated (GOAL_LABELS in types.ts).
Doses are in src/lib/training/constants.ts:
| Goal (key) | Label | Sets x reps | Time per set | Rest | bronId |
|---|---|---|---|---|---|
revalidatie |
Rehabilitation (pain-guided return to function) | 3 x 12 | 30 s | 60 s | RH1, RH14 |
mobiliteit |
Mobility, flexibility and breathing | 2 x 8 (dynamic items) | 30 s hold | 20 s | RH6 |
valpreventie |
Balance and fall prevention | 2 x 10 | 30 s | 45 s | RH7 |
What the generator does with them (src/lib/training/rehab-generator.ts, dose
rules in dose.ts):
- A rehab block is a short home programme, not a mesocycle. Every session
of a week uses the same template and every week repeats it.
revalidatie: one gentle warm-up,REHAB_MAX_MAIN_DEFAULT= 4 main exercises, 1-2 mobility items and one slow breathing drill to finish.mobiliteit: one light warm-up,MOBILITY_MAIN_COUNT= 4 stretches or mobility drills (equal toREHAB_MAX_MAIN_DEFAULT, so every rehab goal builds four main exercises) and one breathing drill in the cool-down.valpreventie: a marching warm-up, 2 balance rows (timed stances 2 x 30 s, counted rows such as sit-to-stand or walks 2 x 10), 2 beginner lower-body strength exercises (2 x 10) and one stretch. Clients withouderen_balansonly get balance rows that are not flagged for it and are either beginner level or done with support. Mobility never picks a stretch for one side only. - Light kit first. Bodyweight, bands and similar (
REHAB_LIGHT_EQUIPMENT) rank before light dumbbells, which rank before anything heavier. Explosive work (jumps, hops, sprints, swings, slams) is never picked by the generator; the coach can still add it by hand. - Effort.
rpeTargetFor: RPE 6 forrevalidatieandvalpreventie, no effort target at all formobiliteit(a stretch is not graded on effort). Strength goals keep RPE 7 or 8 (section "Training depth"). - Frequency and length.
REHAB_SESSIONS_RANGE= 1 to 7 sessions a week (a daily home programme is normal) andREHAB_WEEKS_RANGE= 1 to 12 weeks (an acute phase runs 1 to 2 weeks, a tendon programme is judged after 12). Strength goals keep 2-6 sessions and 3-6 weeks (MESO_MIN_WEEKS/MESO_MAX_WEEKS). The database constraints were widened to match (migration20261024120000_rehab_goals_pain_consent_nutrition.sql). - Worksheet cap.
REHAB_MAX_LOGGED= 12 replacesMAX_WERKBLAD_OEFENINGEN= 8 for rehab blocks. PRACTICE, a coach rule: a day of many small exercises is normal in therapy. - Progression mode. A new rehab block starts as
symptom_guided(defaultProgressionMode), stored inschema_blocks.progression_state. That meansprogression_pctis 0 in every week: the printed dose does not creep up on the calendar. The therapist can switch a block tostandard(the +5 % a week of section 2) ornoneon the block page.
7.1 RH1: the pain-monitoring model
- Source. Silbernagel KG, Thomee R, Eriksson BI, Karlsson J. Continued sports activity, using a pain-monitoring model, during rehabilitation in patients with Achilles tendinopathy: a randomized controlled study. Am J Sports Med 2007;35(6):897-906. DOI 10.1177/0363546506298279. Thomee R. A comprehensive treatment approach for patellofemoral pain syndrome in young women. Phys Ther 1997;77(12):1690-1703 (the paper the model is usually traced to; it is sometimes cited as 2007, 1997 is the record found: citation to verify).
- What the source says. Pain up to 5/10 during and right after exercise is acceptable, provided it has settled by the next morning. In the Achilles trial, patients who kept training under this model did not do worse than those who were told to stay pain free.
- Grade. PRIMARY for the rule as tested (one RCT, Achilles tendon). SECONDARY for using it on other body parts: that is an expert extension, not a trial result.
- What the code does.
PAIN_CAP_DEFAULT= 5 (0 to 10 scale), overridable per exercise throughpain_cap.PAIN_RISE_ALERT= 2. The portal logs pain before and after a session (session_symptoms, filled throughportal_save_session_symptoms); the coach side reads it withgetSessionSymptomsForCoachandpainFlagsinsrc/lib/coaching/symptoms.ts. A session is flagged when pain after is above the cap, when pain before rose byPAIN_RISE_ALERTor more compared with the previous logged session, or when the client logged a stop (see 7.4). - What remains PRACTICE. The number 2 for the rise alert is ours. And the "settled by the next morning" half of the rule has no field of its own: the pain-before value of the next session stands in for it.
7.2 RH2: painful exercise is not automatically harmful
- Source. Smith BE, Hendrick P, Smith TO, et al. Should exercises be painful in the management of chronic musculoskeletal pain? A systematic review and meta-analysis. Br J Sports Med 2017;51:1679-1687. DOI 10.1136/bjsports-2016-097383.
- What the source says. In chronic musculoskeletal pain, painful and non-painful exercise gave similar short-term outcomes, with some signals in favour of painful exercise for some conditions. Low to moderate certainty.
- Grade. PRIMARY (systematic review, abstract level). It does not cover acute injury, post-operative care, neurological symptoms or red flags.
- What the code does. The generator and the editor do not require a pain free exercise. The pain cap of 7.1 is the limit, and the coach sets it per client or per exercise. The red flags of 7.4 are the places where the rule stops applying.
- What remains PRACTICE. The default of 5 (the research suggested a coach range of 3 to 5).
7.3 RH3: the therapist can override anything, and the reason is kept
- Source. NICE guideline NG59, Low back pain and sciatica in over 16s (2016, updated 2020; the research noted a possible 2026 amendment it could not confirm: citation to verify): tailor the type of exercise to the person's needs, preferences and capabilities. KNGF richtlijn Lage rugpijn en lumbosacraal radiculair syndroom (2021): prognostic factors decide whether care is supervised or self guided.
- Grade. NICE recommendation page: PRIMARY (retrieved). KNGF 2021: SECONDARY (congress summary only, the guideline text was not retrieved). The design rule built on them is PRACTICE: the guidelines say tailoring needs clinical judgement, they do not prescribe an audit field.
- What the code does. Every parameter of a rehab exercise is editable:
sets, reps, hold (
hold_sec, limitsHOLD_SEC_LIMITS1 to 120 s), per side (per_side), a note to the client (coach_note, at mostCOACH_NOTE_MAX= 300 characters), the pain cap and swapping an exercise, also across categories inside the main part (edit.ts, rehab goals only). The one exception is a block-level safety check: an exercise that conflicts with a recorded injury is refused unless the therapist overrides it and writes a reason (override_reason). An override is only possible when the only failing eligibility check is the injury conflict; equipment and level can never be overridden (eligibilityFailureingenerator.tstells the editor which one it is). The reason is stored with the exercise in the block. - What remains PRACTICE. Which checks are overridable. That list is our product choice.
7.4 RH4: red flags and stop criteria
- Source. Finucane LM, Downie A, Mercer C, et al. International framework for red flags for potential serious spinal pathologies. J Orthop Sports Phys Ther 2020;50(7):350-372. DOI 10.2519/jospt.2020.9971. Riebe D, et al. Updating ACSM's recommendations for exercise preparticipation health screening. Med Sci Sports Exerc 2015;47(11):2473-2479. DOI 10.1249/MSS.0000000000000664. Also in the research: Downie A, et al. BMJ 2013;347:f7095.
- What the sources say. A framework of red flags (for the spine: saddle numbness, new bladder or bowel change, progressive weakness, unexplained weight loss, history of cancer, fever, night pain, major trauma) and the ACSM list of symptoms that call for medical clearance before or stopping during exercise (chest pain, fainting, unusual breathlessness).
- Grade. Expert consensus and guideline. PRIMARY for the lists as published (abstract level); the Finucane framework is spine specific, its use for other joints is an extension.
- What the code does. On every rehab session the client sees the stop criteria
(stop and contact your therapist or doctor: chest pain, dizziness or fainting,
unusual shortness of breath, sudden sharp pain, new numbness, tingling or
weakness, pain spreading down a limb, pain above the cap that does not settle).
A logged stop (
stopped = trueinsession_symptoms) is flagged to the coach bypainFlags. Nothing in the software raises a dose on its own after a stop: insymptom_guidedmode the dose never rises anyway, and in a block set tostandardprogression a stop does not change the percentages by itself; the coach sees the flag and switches the mode. The portal says that stopping is allowed and that the coach sees it; for an emergency the text says 112. - What remains PRACTICE. The wording shown to the client, and the choice to show it on every rehab session rather than once. The software does not screen for red flags by itself: it shows the criteria and records what the client reports.
7.5 RH5: how many exercises in a home programme
- Source. Henry KD, Rosemond C, Eckert LB. Effect of number of home exercises on compliance and performance in adults over 65 years of age. Phys Ther 1999;79(3):270-277 (older adults; the group sizes of 2 versus 8 exercises come from secondary reports: citation to verify). Bachmann C, et al. 2018, a systematic review of adherence to home based exercise (title, journal, volume and pages: citation to verify), DOI 10.1055/s-0043-120527 (14 studies: fewer than four exercises, supervision and social support go with better adherence).
- Grade. Low to moderate (a small RCT and a systematic review), PRIMARY at abstract level.
- What the code does.
REHAB_MAX_MAIN_DEFAULT= 4 main exercises when the generator builds a rehab block. The editor allows more, up toREHAB_MAX_LOGGED= 12. - What remains PRACTICE. That four is the number. The sources say "few", with "fewer than four" as the association in the review.
- Adherence supports in the product (written cue and picture or video per exercise, a one tap log, the coach seeing adherence) follow Peek 2016 (Physiotherapy 102(2):127-135) and Essery 2017 (Disabil Rehabil 39(6):519-534): SECONDARY, reviews found by search, not read in full.
7.6 RH6: flexibility and mobility dose
- Source. Garber CE, Blissmer B, Deschenes MR, et al. Quantity and quality of exercise for developing and maintaining cardiorespiratory, musculoskeletal, and neuromotor fitness in apparently healthy adults (ACSM position stand). Med Sci Sports Exerc 2011;43(7):1334-1359. DOI 10.1249/MSS.0b013e318213fefb. Behm DG, et al. Acute effects of muscle stretching on physical performance, range of motion, and injury incidence in healthy active individuals: a systematic review. Appl Physiol Nutr Metab 2016;41:1-11, DOI 10.1139/apnm-2015-0235.
- What the source says. Static stretch: hold 10 to 30 seconds (30 to 60 in older adults), 2 to 4 repetitions per stretch, about 60 seconds in total per muscle group, to mild tightness and not pain, at least 2 to 3 days a week, daily is most effective. Long static holds just before power work can lower force for a short while.
- Grade. PRIMARY (position stand).
- What the code does.
MOBILITY_HOLD_SEC= 30 andmobilityDose: 2 sets of a 30 s hold, which is the 60 seconds per stretch of the position stand; dynamic items get 2 x 8 repetitions; rest 20 s. A mobility or warm-up exercise placed in the main part of a rehab block is dosed this way (doseFor).REHAB_SESSIONS_RANGEallows the daily frequency. - What remains PRACTICE. Choosing the top of the 10 to 30 second range and two sets rather than 2 to 4 repetitions of a shorter hold. The position stand gives a band; the engine picks a point in it. Frequency is the therapist's choice.
7.7 RH7: fall prevention
- Source. Sherrington C, Fairhall NJ, Wallbank GK, et al. Exercise for preventing falls in older people living in the community. Cochrane Database Syst Rev 2019;CD012424, DOI 10.1002/14651858.CD012424.pub2 (DOI citation to verify against the Cochrane record). Campbell AJ, Robertson MC, Gardner MM, et al. Randomised controlled trial of a general practice programme of home based exercise to prevent falls in elderly women. BMJ 1997;315:1065-1069, DOI 10.1136/bmj.315.7115.1065 (the Otago programme).
- Same evidence as fixture id H1. In the exercise catalogue the Sherrington
review is source
H1(see the note at the top of section 6: the letters differ from SCIENCE.md's own H1 to H3).RH7and catalogueH1are one paper. - What the source says. Exercise reduces the rate of falls by about 23 %. Balance and functional exercise, about 3 hours a week in total, gives the most. The Otago programme (women over 80, home visits by a physiotherapist) did 2 sets of 10 with ankle weights, progressive balance exercises and walking, 3 days a week, and cut falls by about 35 %.
- Grade. PRIMARY (Cochrane review and RCT, abstract level).
- What the code does.
valpreventieis 2 x 10 with 30 s balance holds and rest of 45 s (GOAL_PARAMS). The generator builds an Otago style day: marching warm-up, two balance holds, two or three beginner lower body strength exercises, one stretch. Balance rows in the catalogue that are not supported are guarded by the injury keyouderen_balans(scripts/verify-catalogue.tschecks that each such row offers a supported alternative). RPE target 6. - What remains PRACTICE. The generator produces about half an hour of work three days a week at most; the 3 hours a week of the review is a total across all activity and is not enforced. Ankle weights and the progression of balance difficulty are for the therapist to add. Supervision for high risk clients is the therapist's judgement (the research suggested it; the software has no risk score).
7.8 RH8: slow breathing
- Source. Jones M, Harvey A, Marston L, O'Connell NE. Breathing exercises for dysfunctional breathing/hyperventilation syndrome in adults. Cochrane Database Syst Rev 2013;CD009041, DOI 10.1002/14651858.CD009041.pub2. Bradley H, Esformes J. Breathing pattern disorders and functional movement. Int J Sports Phys Ther 2014;9(1):28-39 (open access, PMC3924606).
- What the source says, and what it does not. The Cochrane review found no eligible trials, so there is no evidence either way for breathing retraining in dysfunctional breathing or hyperventilation syndrome. (One summary of the review speaks of a single small trial; either way the review cannot support the drill.) The clinical literature (Bradley and Esformes 2014, and Boulding 2016, Eur Respir Rev 25:287) describes the usual practice: slow nasal breathing, small breaths, a longer exhale, and avoiding the cue "take a deep breath", which tends to push carbon dioxide further down.
- Grade. PRACTICE, low certainty. This is an expert consensus drill, not a tested treatment. Nothing in the product says that it treats hyperventilation.
- What the code does. One slow breathing drill per session,
BREATHING_DRILL_SEC= 120 s, one set (breathingDose). The catalogue familyademhaling-traag(rowsrh*) says small, slow, through the nose, exhale longer (about 4 seconds in and 6 out). The rowscd10andcd57teach deep breathing, andcd59,cd63,cd64teach belly breathing; all five are inBREATHING_AVOID_IDSand the rehab generator never picks them (verify:cataloguechecks the slow breathing rows contain no "deep" or "belly" cue in any of the four languages). - What remains PRACTICE. All of it: the 4 in and 6 out, the 120 seconds, the placement at the end of the session. Medical exclusion (asthma, cardiac disease, pulmonary embolism) is for the therapist; the research mentioned the Nijmegen Questionnaire (score 23 or more) as a screen, which RungGym does not ship.
7.9 RH9: tendon loading
- Sources. Beyer R, Kongsgaard M, Hougs Kjaer B, et al. Heavy slow resistance versus eccentric training as treatment for Achilles tendinopathy: a randomized controlled trial. Am J Sports Med 2015;43(7):1704-1711, DOI 10.1177/0363546515584760. Malliaras P, Barton CJ, Reeves ND, Langberg H. Achilles and patellar tendinopathy loading programmes. Sports Med 2013;43:267-286, DOI 10.1007/s40279-013-0019-z (citation to verify). Cook JL, Purdam CR. Is tendon pathology a continuum? Br J Sports Med 2009;43:409-416, DOI 10.1136/bjsm.2008.051193. Rio E, et al. Isometric exercise induces analgesia and reduces inhibition in patellar tendinopathy. Br J Sports Med 2015;49:1277-1283, DOI 10.1136/bjsports-2014-094386.
- What the sources say. Load the tendon, do not rest it. Heavy slow resistance (3 sessions a week for 12 weeks, 3 s up and 3 s down, from 3 x 15RM to 4 x 6RM) matched Alfredson's eccentric programme on the VISA-A score, with higher satisfaction (100 % against 80 %, 58 patients) and less time. A network meta-analysis found no clear winner among loading types, so the one the client tolerates and keeps doing is the best. Isometrics were reported to reduce patellar tendon pain for 45 minutes in a small crossover (Rio 2015, 6 athletes); a later pre-registered replication (Holden 2020, citation to verify) and a plantar fasciopathy crossover (Riel 2018, citation to verify) did not reproduce that. So isometrics are an entry level for loading, not an analgesic.
- Grade. PRIMARY for heavy slow resistance (RCT) and for the continuum model (expert model); the isometric claim is conflicting and said so.
- What the code does. The catalogue family
pees-belasting(6 or more rows, reps, slow tempo written in the tip) andisometrie(8 or more timed rows) are the building blocks (verify:cataloguechecks both). The pain cap of 7.1 judges the load. The therapist sets the tempo and the dose in the editor. There is no automatic Alfredson preset: it is 3 x 15 twice a day, 7 days a week for 12 weeks (Alfredson 1998 Am J Sports Med 26(3):360-366, DOI citation to verify), painful and hard to keep up, and wrong for insertional Achilles tendinopathy. - What remains PRACTICE. "At least 48 hours between heavy tendon sessions" and "judge after 12 weeks" are the rules of thumb of the programmes above; the engine does not enforce either, it lets the therapist pick the frequency (1 to 7 a week) and the length (up to 12 weeks).
7.10 RH10: knee and hip osteoarthritis
- Source. Bannuru RR, Osani MC, Vaysbrot EE, et al. OARSI guidelines for the non-surgical management of knee, hip, and polyarticular osteoarthritis. Osteoarthritis Cartilage 2019;27(11):1578-1589, DOI 10.1016/j.joca.2019.06.011. Fransen M, et al. Exercise for osteoarthritis of the knee. Cochrane Database Syst Rev 2015;CD004376.
- What the source says. Land based exercise (strengthening, aerobic, mind body) and weight management are core treatment. Dose from the Cochrane work and meta-regressions: about 2 to 3 times a week for 6 to 12 weeks or more, supervised is better, followed by a long term home phase. The research also cites EULAR 2023 (Moseng et al., Ann Rheum Dis 2024, citation to verify), NICE NG226 and KNGF osteoarthritis 2018, which it did not retrieve.
- Grade. PRIMARY (OARSI guideline and Cochrane review).
- What the code does. No dedicated template. The tool supports it through
revalidatiewith lower limb strengthening (rehab rows plus the existing catalogue; the knee osteoarthritis contraindications of the catalogue come fromC1, the ACR/Arthritis Foundation 2019 guideline), the pain cap of 7.1 and the frequency range. The product never says "avoid exercise" for osteoarthritis. - What remains PRACTICE. Everything about the specific dose: it is the therapist's. The research suggested an OA preset; none exists yet.
7.11 RH11: post-operative progression is gated by criteria, not by the calendar
- Source. Grindem H, Snyder-Mackler L, Moksnes H, Engebretsen L, Risberg MA. Simple decision rules can reduce reinjury risk by 84 % after ACL reconstruction: the Delaware-Oslo ACL cohort study. Br J Sports Med 2016;50:804-808, DOI 10.1136/bjsports-2016-096031. van Melick N, et al. Evidence-based clinical practice update: practice guidelines for anterior cruciate ligament rehabilitation based on a systematic review and multidisciplinary consensus. Br J Sports Med 2016;50:1506-1515, DOI 10.1136/bjsports-2015-095898.
- What the source says. Passing return-to-sport criteria (quadriceps and hop limb symmetry of 90 % or more, patient reported outcome, confidence) and waiting at least nine months lowered the reinjury risk by 84 %; each month of delay up to nine months lowered it by 51 %. Rehabilitation phases should be gated by criteria plus a minimum time.
- Grade. PRIMARY (cohort study and a consensus guideline).
- What the code does. The generator has no post-operative template and never
advances a phase on its own.
symptom_guidedandnoneprogression keep the dose where the therapist set it. A therapist who works from a surgeon's protocol writes it as a block and decides when the next block starts. - What remains PRACTICE. The absence of a post-operative generator is a choice (RH13), not a gap that is waiting for a date.
7.12 RH12: outcome measures, shipped and not shipped
- Sources. NPRS (0 to 10 numeric pain rating scale): Hawker GA, et al. Measures of adult pain. Arthritis Care Res 2011;63(S11):S240-S252, DOI 10.1002/acr.20543. The change that counts as meaningful, about 2 points or 30 %, is from Farrar JT, et al. Pain 2001;94:149-158, DOI 10.1016/S0304-3959(01)00349-9 (an earlier note credited Hawker; the research traces it to Farrar, and Kamper 2009 J Man Manip Ther 17:163 notes it depends on the baseline: citation to verify for Hawker as the source of the 2 points). PSFS (Patient Specific Functional Scale): Stratford P, et al. Physiother Can 1995;47:258-263; Horn KK, et al. J Orthop Sports Phys Ther 2012;42(1):30-42, DOI 10.2519/jospt.2012.3727 (citation to verify; about 2 points for an individual change, the group value of about 1.3 is also citation to verify).
- Grade. PRIMARY for the psychometric properties at abstract level.
- Shipped. A plain 0 to 10 pain item, worded by us ("no pain" to "worst pain imaginable"), asked before and after a session (7.1). The 0 to 10 numeric format is generic; the research found no rights holder, and this is uncertain but low risk. Wong-Baker FACES is licensed and is not used.
- NOT shipped, on purpose. KOOS, ODI, QuickDASH and DASH, the PSFS wording, PROMIS, NDI and Roland-Morris. They are copyrighted and need a licence for use in software (KOOS: non-academic users pay and ask via Mapi/ePROVIDE; QuickDASH: a paid software licence; PSFS: permission from the author; ODI: Mapi licence, current terms unverified). No wording from them is in the code. If a therapist wants them, the route is a signed licence first, then the text. Licences requested are on Lukas' list, not in the repository.
- What remains PRACTICE. Showing the change against a 2 point threshold is ours to build when it is built; today the portal records and the coach reads.
7.13 RH13: legal posture and consent
- Sources. Regulation (EU) 2017/745 (medical devices), Annex VIII rule 11, and MDCG 2019-11 (qualification of software; the current revision is citation to verify). Regulation (EU) 2016/679 (GDPR) article 9: health data needs explicit consent or another article 9(2) ground. Belgian wet van 10 mei 2015 betreffende de uitoefening van de gezondheidszorgberoepen. Dutch Wet op de beroepen in de individuele gezondheidszorg (Wet BIG).
- Grade. Regulation, read through secondary legal sources: SECONDARY. This is not legal advice. A legal check (MDR qualification, Belgian and Dutch delegation rules, a data processing agreement) is on Lukas' list and is not done.
- The posture the product takes.
- RungGym is a planning and communication tool for a named professional who stays responsible for the plan. The therapist's name is on the plan.
- It does not diagnose, does not claim to treat a condition, and does not move a
client to another phase on its own. Marketing, including the cold mail, makes
no treatment claims (
verify:marketingguards part of this). - The client gives explicit consent before health data is stored. The coach is the
controller, RungGym the processor. The consent time is stored in
clients.health_consent_at, written byportal_submit_intake_v2when the client ticks the consent box on the intake form; the first timestamp is kept (coalesce). - A new block for a trainer account is created as a draft (
status = 'draft'). Portal functions skip drafts, so a client sees nothing, and gets no push, until the coach presses "Publish to client" (publishBlockAction). A draft PDF carries a DRAFT line in the footer. For an individual account the block is active at once. - The portal link carries health data. It is a secret URL. A coach can issue a new link, which stops the old one working at once (revocation exists); the research also asked for automatic expiry, which is not built (open item).
- What remains open. MDR classification could fall either way: software that influences treatment decisions is at least class IIa under rule 11, and experts disagree on whether a planning tool with an injury filter qualifies. The mitigation is the intended purpose above, not a legal conclusion.
7.14 RH14: strength dose for deconditioned and older adults
- Sources. ACSM 2026 position stand on resistance training (catalogue source
A1, already used in section 1 and forGOAL_PARAMS); Nelson ME, et al. Physical activity and public health in older adults: recommendation from the ACSM and the AHA. Med Sci Sports Exerc 2007 (catalogue sourceH2). Also Ratamess NA, et al. ACSM position stand: progression models in resistance training for healthy adults. Med Sci Sports Exerc 2009;41:687, DOI 10.1249/MSS.0b013e3181915670 (the same stand asO1). - What the source says. 1 to 3 sets of 10 to 15 repetitions at moderate effort, 2 to 3 days a week for older and deconditioned adults; progress by about 2 to 10 % once the client is 1 to 2 repetitions over target on two sessions in a row.
- Grade. PRIMARY (position stands).
- What the code does.
revalidatieis 3 x 12 andvalpreventie2 x 10, both within the band, at RPE 6 (rpeTargetFor). The progression percentage is 0 insymptom_guidedmode; the next-load suggestion of section "Training depth" (suggestNextLoad, +2.5 % upper body, +5 % lower body) still applies to a client who logs weights, and the coach decides whether to take it. The research suggested a rehab cap of +5 % per step; the suggestion rule already does not exceed +5 %. - What remains PRACTICE. Not progressing volume and intensity in the same week for injured tissue (the research's advice) is for the therapist; the software does not enforce it.
What a therapist can check in the product, and what to say when asked
| They ask | Answer |
|---|---|
| "Where do these numbers come from?" | This section, by id (RH1 to RH14). Also /science. |
| "Can I change it?" | Yes, every parameter. Injury conflicts need a written reason, equipment and level cannot be overridden. |
| "Is it evidence for breathing retraining?" | No. The Cochrane review found no eligible trials. The drill is common practice, labelled PRACTICE. |
| "Does it diagnose or advance the phase?" | No, never. |
| "Does it include KOOS / ODI / PSFS?" | No. They are licensed instruments and not in the product. |
| "Is it a medical device?" | Our position: no, a planning tool for a professional. Not legal advice; a legal check is open. |