Progressions & hooks
Static programs are fine. But the real power of ReptoLang is programs that adapt — adding weight when you succeed, backing off when you miss, and periodizing automatically.
Progression macros
A progression is a reusable rule you define once and attach to as many exercises as you like.
It can declare numeric parameters with defaults:
Attach it to an exercise with using:
Built-in macros
Four progressions ship with every program — use them without defining anything. A script-level
progression with the same name overrides the built-in.
| Name | What it does |
|---|---|
lp | Linear progression — one AMRAP top set, bump the TM on success |
lp_deload | Linear progression with built-in deload sets |
dp | Double progression — 5 / 3 / AMRAP ramp |
wave_lp | Wave loading — 65% / 75% / 85% |
Bench Press {
5 @%80
using "lp" (increment = 2.5)
}
Hooks
Hooks run at lifecycle moments and let you read what happened and update state. The two exercise-level hooks are:
on_set— runs after each set. Can pre-fill the next set (next_set_weight,next_set_reps).on_complete— runs after the whole exercise is done. Good for progression decisions.
The { 2.5kg, 5lbs } unit pair bumps the training max by the right amount whether the lifter
trains in kg or lbs (weights are never converted) — see
unit-aware increments.
Inside hooks you can read session variables like completed, completed_reps, target_reps,
current_weight, set_index, estimated_1rm, and unit_is_metric, and call helpers like round(),
clamp(), pct_of(), and pick(). For the complete picture — every scope, the variables each one
exposes, what hooks may write, and the runtime caveats — see
lifecycle hooks and
progression macros.
State variables
Declare program-wide counters in a state { } block, then read and write them from any hook or
weight expression:
Squat (Back Squat) {
5 @state.load
on_complete {
if completed {
state.consecutive_hits += 1
state.load = state.load + 2.5
} else {
state.consecutive_hits = 0
}
}
}
Deload weeks
A deload week scales an existing week down instead of re-typing it. scale: multiplies the
weights; use: copies the day structure from another week:
For everything else — directives, the full hook-variable list, and built-in functions — head to the language reference.