setC(x => ({ ...x, deloadFactor: Math.max(0.5, Math.min(0.95, Number(v) / 100)) }))} />}
}
{invalid &&
{t('Enter a positive step to use this progression rule.')}
@@ -1132,6 +1136,12 @@ function ExConfig({ ex, existing, onSave, onDelete, close, routine, initial }) {
const prog = {}
if (c.prog) prog.prog = c.prog
if (c.inc > 0) prog.inc = c.inc
+ // Epley deloading is configurable per occurrence, but the default stays omitted so older
+ // plans retain their compact shape and keep the existing 90% behaviour.
+ if (mode === 'reps' && !bw && (activePolicy === 'linear' || activePolicy === 'double')) {
+ const deloadFactor = Math.max(0.5, Math.min(0.95, Number(c.deloadFactor) || 0.9))
+ if (deloadFactor !== 0.9) prog.deloadFactor = deloadFactor
+ }
// Written only when it differs from what the dataset already says, so a barbell config
// stays exactly the shape it was before these flags existed.
// `bodyweight` is true of a hold as much as of a set of reps; `side` is not — it counts
diff --git a/mcp/src/tools.js b/mcp/src/tools.js
index 453ff24..44d729c 100644
--- a/mcp/src/tools.js
+++ b/mcp/src/tools.js
@@ -106,7 +106,7 @@ export const listRoutines = {
/** get_routine — the full exercise list for one routine, including set/rep targets. */
export const getRoutine = {
name: 'get_routine',
- description: 'Get the full exercise list for a single routine (the same view the routine editor shows). Returns mode (reps/time/cardio), set/rep/weight targets, superset links, any per-exercise custom increment you can override, and each exercise\'s own rest in seconds (absent means it inherits the global rest timer). Use routine_id from list_routines.',
+ description: 'Get the full exercise list for a single routine (the same view the routine editor shows). Returns mode (reps/time/cardio), set/rep/weight targets, superset links, any per-exercise custom increment or Epley deload factor, and each exercise\'s own rest in seconds (absent means it inherits the global rest timer). Use routine_id from list_routines.',
schema: { routine_id: z.string().min(1) },
handler: ({ routine_id }) => {
const S = getState()
@@ -139,6 +139,7 @@ export const getRoutine = {
speed: mode === 'cardio' ? (cfg.speed || 0) : undefined,
weight: cfg.weight != null ? cfg.weight : undefined,
increment: cfg.inc != null ? cfg.inc : undefined,
+ deload_factor: cfg.deloadFactor != null ? cfg.deloadFactor : undefined,
// The exercise's own rest (issue #10). Absent means it inherits the global rest
// timer; a superset rests once, taking the longest its members ask for.
rest_sec: cfg.restSec > 0 ? cfg.restSec : undefined,