The definition
Every field of .localix-loop.json: the goal, the scorekeeper, the protected paths, the hidden checks and the budget.
An example
{
"goal": "The login test suite passes",
"score": { "run": "node scripts/score.mjs", "target": 12 },
"protect": ["tests/**", "scripts/score.mjs"],
"holdout": { "run": "node \"$LOCALIX_LOOP_HOLDOUT/run.mjs\"" },
"budget": { "iterations": 30, "minutes": 240, "plateau": 8 }
}The file sits at the repository's root. /localix-loop:start writes it with you; the definition protects itself.
Fields
| Field | Default | Meaning |
|---|---|---|
goal | required | What done looks like: one thing, not a wish list |
score.run | required | The scorekeeper, run from the repository root |
score.parse | auto | auto: the last score: N or score: N / M line, else the exit code; the form the baseline used is then required. exit: 1 on exit 0, else 0. regex:<re>: the first group of the last match |
score.direction | higher | lower for sizes, times, losses |
score.target | M of N / M | The score that means done |
score.runs | 1 | Runs per measurement; the median counts, for noisy scores |
score.minDelta | 0 | The least improvement that counts |
score.timeoutSec | 600 | A run past this is an error and rolls back |
protect | [] | Globs Claude may not change |
holdout.run | run.mjs of the folder | Hidden checks: they print score: N / M or exit 0 when all pass. $LOCALIX_LOOP_HOLDOUT is their folder. Without it, a hidden folder given at the start runs its run.mjs, and one with no run.mjs is refused |
onEqual | discard | keep also keeps changes that tie the best |
budget | 30 / 240 / 8 | Iterations, minutes, iterations without progress |
rules | [] | Extra rules for every iteration |
Hidden checks
Keep them outside the repository, in a folder you name when the loop starts (--holdout <folder>). The loop copies it where Claude can't read it, and the guard refuses any attempt to. Make them test the same goal on inputs the visible scorekeeper doesn't use.
A failing scorekeeper
A scorekeeper that printed a score line at the start and later fails before printing one is an error, and the change is rolled back: never a score of 0, which for a lower-is-better score would look perfect.