/localix-loop:start [goal]from localix-loop
Starts a localix-loop: an iterative improvement cycle with a goal, automated scorekeeper, and rollback on regression. Use for focused, test-driven feature work or bug fixes.
Ships in localix-loop. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
The person wants a loop toward: $ARGUMENTS
In a localix-loop you only propose changes. When you end a turn, the loop runs the scorekeeper itself, keeps the change only if the score beats the best so far, rolls it back otherwise, and decides whether to go on. "Done" comes from the scorekeeper, never from you. Your job now is to set the loop up well: a loop is only as good as its goal and its scorekeeper.
The loop saves versions with git. In a folder that is not a repository yet, run git init first;
no commit is needed.
When .localix-loop.json exists, an earlier loop left its scorekeeper here, and it is the record
of everything that already works. Keep it: a new loop that drops old tests can break what they
guarded and still call itself done. For a new goal (a feature, a change to the spec, a bug the
person reports), ask the examiner to extend that scorekeeper (see section 2) and update goal
in the definition. The hidden checks are kept too: copy the last loop's out with
node ${CLAUDE_PLUGIN_ROOT}/scripts/loop.mjs hidden --to .localix-loop-holdout (do not read
them), give that folder to the examiner with the rest, and start with
--holdout .localix-loop-holdout. For a reported bug, the examiner first writes a case that shows
it, and that case must fail now. The loop then starts from a baseline in which the new cases fail
and the old ones pass. A start without --holdout carries the last hidden checks over unchanged,
which is right only when the new goal changes nothing they check.
Restate the goal as one small, clear outcome ("the login test suite passes", "bundle under 200 KB"), not a wish list. If the request is a list, pick the first item and say the rest can be later loops.
Find what already measures the goal: a test suite, a build, a type check, a benchmark. A good scorekeeper is:
score: N / M (or score: N), or at least exits 0 on success.If nothing fits (a new project, a feature with no tests), do not write the tests yourself: you
will be the one making them pass, and an exam written by the student is easy. Ask the plugin's
examiner subagent to write the scorekeeper, and wait for its report in this same turn, never in
the background: the loop can only start after it, and a turn that ends first leaves the person with
no loop at all. Give it the goal, where the spec is, and the folder
.localix-loop-holdout at the repository's root for the hidden checks. It writes the tests, a
score script that prints score: <passed> / <total>, and hidden checks there, and proves the tests
fail on the project as it is and that a passing case is counted. If its report does not show the
score going up on its throwaway case, send it back: a score stuck at 0 can never be done. Never read the hidden folder: it is there to catch code fitted to
the visible tests, yours included. Pass it to the start with --holdout .localix-loop-holdout:
the start moves it out of the working tree into the loop's own folder, where you cannot reach it.
Run the scorekeeper once now and show the person the baseline: a scorekeeper that does not work yet is the first thing to fix, and one that already passes checks nothing.
List the scorekeeper's own files under protect: the tests, the score script, fixtures, snapshots,
and anything else that decides the score (a package.json whose test script is the scorekeeper,
for example). Globs work: tests/**, **/*.test.ts. The definition file protects itself.
If the person has checks the loop must pass without seeing them, they live in a folder outside the
repository and a holdout.run command reads them through $LOCALIX_LOOP_HOLDOUT. They run only
once the visible target is reached.
.localix-loop.json at the repository root{
"goal": "The login test suite passes",
"score": { "run": "node scripts/score.mjs" },
"protect": ["tests/**", "scripts/score.mjs"],
"budget": { "iterations": 30, "minutes": 240, "plateau": 8 }
}
Other fields, all optional: score.direction ("higher", the default, or "lower"),
score.parse ("auto", "exit", or "regex:<pattern>"), score.runs (several runs and the
median, for noisy scores), score.minDelta (the least change that counts), score.timeoutSec,
onEqual ("discard", the default, or "keep"), rules (extra rules for every iteration),
holdout ({ "run": "<command>" }), score.target. Leave the target out when the scorekeeper
prints score: N / M: the loop aims at M, which stays right when a next goal adds cases. Set it
for a score with no maximum (a time, a size).
Show the person the goal, the scorekeeper's baseline and the file, and ask before starting, unless they asked you to start right away or nobody can answer (a non-interactive run).
The working tree should be clean apart from the definition, the scorekeeper's own protected files and its setup, so the loop's work is its own diff. The setup is what the examiner changed for the tests to run, such as a test dependency in the manifest and the lock file: its report names those files. If the report says the examiner could not run the hidden checks, or they printed no score, do not start: hidden checks no one has seen run can only stop the loop. Have the examiner run them with plain commands, one per call, or tell the person which command was refused. Then run, as one command:
node ${CLAUDE_PLUGIN_ROOT}/scripts/loop.mjs start --session ${CLAUDE_SESSION_ID}
Add --holdout <folder> for hidden checks and --config <file> for a definition elsewhere. When
the only uncommitted changes besides those are the scorekeeper's setup, add --allow-dirty without
asking: they belong in the baseline, not in the loop's diff; say in your message which files went
in. For any other uncommitted change, --allow-dirty only if the person says so. If it refuses,
fix what it names and run it again.
A shell command the session's permissions refuse is not a reason to give up: run each command on
its own, with no pipes, ; or &&. This one and the scorekeeper are usually allowed as plain
commands. Only when even those are refused, tell the person which command needs their permission.
It prints the brief for iteration 1. Follow it: work this turn as if it were the only one, as far
as the goal will go, measuring with the check command the brief names (it saves every better
version at once), and end your turn only when you are out of ideas. From then on each brief comes
from the loop.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
localix-loop, iterative-development, test-driven, automation
npx claudepluginhub localixai/plugins --plugin localix-loop4 skills in this plugin
/resumeGo on with a localix-loop that paused for a person or stopped - optionally with an answer to its question or more iterations./statusShow this session's localix-loop - goal, score, iterations kept and rolled back, what waits for a person./stopStop this session's localix-loop. The working tree keeps the best version for the person to review and commit.Other plugins' skills for the same job