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 macros ship with every program — use them without defining anything. A script-level
progression with the same name overrides the built-in. These lay out sets only — they don't
touch the training max on their own. Pair one with an on_complete hook (inline, or your own
macro) to actually progress.
| Name | Sets it lays out |
|---|---|
lp | One AMRAP top set (amrap @%100) |
lp_deload | 5 / 3 / AMRAP, all at a deload percentage |
dp | 5 / 3 / AMRAP ramp (@%90 / @%95 / @%100) |
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). Not yet live: the compiler parses and validateson_setblocks, but the app doesn't evaluate them at runtime yet — write one if you like, but don't expect it to take effect today.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
Hooks & macros reference.
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.