The definition

Every field of .localix-loop.json: the goal, the scorekeeper, the protected paths, the hidden checks and the budget.

An example

JSON
{
  "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

FieldDefaultMeaning
goalrequiredWhat done looks like: one thing, not a wish list
score.runrequiredThe scorekeeper, run from the repository root
score.parseautoauto: 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.directionhigherlower for sizes, times, losses
score.targetM of N / MThe score that means done
score.runs1Runs per measurement; the median counts, for noisy scores
score.minDelta0The least improvement that counts
score.timeoutSec600A run past this is an error and rolls back
protect[]Globs Claude may not change
holdout.runrun.mjs of the folderHidden 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
onEqualdiscardkeep also keeps changes that tie the best
budget30 / 240 / 8Iterations, 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.