Repository navigation
v0.16.0
Closing out the 2026-09-20 production-readiness audit: 0.15.0 took every P0 and
P1, this entry takes the P2 and P3 remainder. Each item keeps the project's own
discipline — the assertion that would have caught it first, then the fix.
Upgrade
-
A backlog box is now ticked by a command, not by a claim.
.loop/backlog.md
was the last link in the completion chain a model could simply type: the
all-boxes-ticked check read a file the orchestrator writes, so "tick a box
only after the checker reports ALL GREEN" was a red line honoured rather than
a fact produced. A line written- [ ] <item> | verify: <cmd>is now ticked
byrun-contract.shwhen that command exits 0, on every stop attempt, with
the outcome recorded in.loop/results.jsonunder"backlog"; while the loop
is armed the evidence-gate denies model writes to a backlog carrying any such
line. Only pending lines are re-verified, so the cost is proportional to
work remaining rather than to work done. A red backlog item does not turn
a green contract red — the backlog is progress, and draining it is the
orchestrator's job across rounds, not one stop attempt's.Opting in is what locks the file, so nothing changes for a backlog
without| verify:commands: nothing runs, nothing is denied, and the
orchestrator ticks boxes as before. That shape remains a trust boundary and
is now labelled as one. README also spells out thebacklogcriterion it had
referred to without ever defining:! grep -q '^- \[ \]' .loop/backlog.md. -
The evidence-gate now denies
rm -rf .loopwhile a loop is armed. That
one command takes the stop-gate's marker, the hash-lock and the evidence
ledger together, so however innocently it is typed it is a disarm — and it is
the command this README hands humans for cleanup, which is what made it the
likeliest accidental one. The refusal names the two-step form:rm .loop/activein one call, thenrm -rf .loopin the next. A subpath is
unaffected (.loop/state.mdwas never guarded and still isn't), and once the
loop is over the single command goes through unchanged. Humans keep
LOOP_ENG_DISABLE_EVIDENCE_GATE=1. -
install-timer.shnow runsclaude --versionunder the unit's own PATH
before writing anything. Resolving the binary was never the same as proving
it runs:command -vsearches the installing shell's PATH while the unit
hardcodes a minimal one, so an npm/nvm#!/usr/bin/env nodeshim resolved
cleanly and exited 127 at 03:00 with the error only incron.log. A failed
probe refuses the install and prints the exact command to reproduce it.
LOOP_ENG_TIMER_SKIP_PROBE=1is the way past it for a binary whose
environment the probe cannot reproduce. -
unattended-polish.sh --auto-fixnow exits 70 instead of 0 when its result
is not trustworthy.claude -pexits 0 whether the session converged,
stopped on a regression, or ran out of turns mid-edit. The driver now
establishes the two facts it can for itself: the tree must be clean
afterwards, and an optional project command in the newLOOP_ENG_POST_CHECK
must pass. 70 isEX_SOFTWARE, distinct from the session's own status, which
is still passed through untouched. The tree is left exactly as the session
left it — reverting a half-applied fix would destroy the evidence on the one
run that needs looking at. Report-only is exempt. -
The autoloop driver's circuit breaker grew a second arm. The existing one
is keyed to commits, which answers "did anything happen" and not "did the
backlog move": a session that commits real work and leaves its line unticked
reset the counter, so one item could consume the entire session cap with
every session logged as progress (reproduced at 8/8). It now also stops after
LOOP_ENG_MAX_ITEM_SESSIONSsessions (default 2) on the same item. Set it to
0for an item that legitimately spans sessions.
Changed
/polishconverges on deferred findings instead of re-confirming them
every round. A finding deferred under the public-contract stop rule is by
definition never fixed, so nothing moves it out of the code — and with a line
number in the dedup key it re-entered as "fresh" after every fix round that
shifted lines above it, was re-verified into the same CONFIRMED verdict, and
was deferred again. It burned a verifier pass per round and kept the loop
alive on a finding it had already decided not to act on. Deferrals now go to
.loop/polish-deferred.mdkeyedfile|summarywithout the line — the one
class where line-less dedup cannot lose a real finding, because the outcome
is fixed in advance. The dry-round test now asks whether anything entered the
FIX QUEUE rather than whether anything was confirmed, which is what the stop
rules already said and Phase 2 did not.- The checker now reads
.loop/criteria.tsv, the contract that actually
runs. Verify commands had two sources of truth —contract.mdfor the
checker,criteria.tsvfor the gate — both model-written, with nothing
binding them, so a round could go green against one while the other decided
otherwise.criteria.tsvwins because it is the file the stop-gate executes
andall_greenis computed from it alone; a disagreement is now itself a
reportable finding. /autoloopstep 3 reconciles the report against the ledger before ticking
a box. A checker report is a claim andresults.jsonis a run; there was
no branch for "report green, ledger red", so the disagreement would surface
as a blocked stop with no round left to fix it in. Step 3 now refreshes the
ledger, treats any red criterion belonging to the current item as a failed
round whatever the report said, and treatsmalformed_linesorerroras
never-green. The wrap-up's separate refresh is gone — it is this one.- The contract template's fast subset no longer ships
npm test. The
stop-gate runs that subset on every stop attempt under a 100s budget; a
typical JS suite overruns it, three fail-closed timeouts reach the 3-block
ceiling, and ALL GREEN can then never be machine-confirmed at all. The
examples are scoped commands, and the unscoped one sits in the block already
labelled "final round". - The three judgment agents no longer claim "no write access by design".
They have no Write or Edit tool — that half is real and enforced by the tool
whitelist — but they all have Bash, which writes. The prompts now say the
enforced part as enforcement and the rest as the red line it always was.
README's safety table gains the orchestrator row it was missing: it runs in
your session withWriteandBash, and what is mechanical about it is that
the evidence ledger is denied to it by the same hook as to everyone else. - A tag push now runs a release gate.
.github/workflows/release.ymlfires
onv*: it re-runs the full test matrix against the tagged tree (by calling
test.yml, so there is one definition of "the suite" rather than two that
drift) and asserts that the three manifest version fields, the CHANGELOG's
dated section and the tag all say the same thing — plus that no
## Unreleasedwas left behind. A tag whose manifests disagree with it
installs cleanly and then serves the wrong version forever, and until now the
only thing comparing them was a line in a checklist. The gate has
contents: readand publishes nothing:gh release createstays a
person's step, and so do RELEASING.md's live-install smoke and post-ship
identity diff. CI'snpm i -g @anthropic-ai/claude-codealso gets three
attempts with a backoff, so a registry blip cannot be what turns the manifest
gate off. - The shellcheck gate moves from
-S errorto-S warning. Thirteen
warnings sat unchecked behind it and they were not cosmetic: nine were SC2164,
acdwith no|| exit— in a test suite, where a failedcdinto the
sandbox means the remaining assertions run in the real working tree and start
deleting.loop/files there. The rest were$?read from a condition
instead of a command (SC2319, a live trap once the gate rises) and two
unused-looking variables. All thirteen are fixed; the two deliberate
exceptions carry an inline# shellcheck disable=with a reason.-S style
stays out — SC1091 alone is 12 hits with nothing to fix. - Three README sections that restate repo facts now derive from them. The
env-var table was missingLOOP_ENG_PLUGIN_CACHE_DIR; the layout block named
two of fourhooks/files and called sixskills/loop-eng/scripts/entries
"unattended runner"; and two paragraphs disagreed about how many scripts hold
the bash-3.2 floor (four in one, five in the Requirements table — five is
right, andupdate-notify.shwas the one going unmentioned even though a
SessionStart hook is precisely what stock macOS bash 3.2 runs in every real
session).test-packaging.shnow reads the source of truth for each —
git ls-files, the scripts' ownLOOP_ENG_*reads, and the list
test.yml's bash-3.2 leg syntax-checks — so the next addition is covered the
day it lands rather than the day someone remembers. .loop/state.mdsays out loud that nothing reads it. ItsStatus:line
looked like a completion signal and is prose — no hook, script or gate has
ever read this file. It is now labelled advisory, with the machine answer
named (results.json'sall_green, and the ticked boxes) and the tie-break
stated: if the two disagree, the ledger is right and state.md is stale. The
template also gains the## Deferred (not loopable)heading the roadmap
triage step has always told the orchestrator to write here.allowed-toolslistsAgentalongsideTask. The subagent tool's
current name isAgent;allowed-toolsis a pre-authorization list, so
naming only the old one costs a permission prompt on every dispatch in
interactive mode.claude plugin validatedoes not check tool names, so
nothing else would have caught it.
Fixed
- Every scratch directory a test suite creates is now in its EXIT trap, and
test-harness.shchecks that statically. Two suites cleaned theirs with an
inlinerma killed run never reaches, and one of those used a bare
mktemp -dwith no name pattern, so it did not even appear in a
loop-eng-*scan of$TMPDIR. The scan found more than the audit did: the
two unattended suites re-install a longer trap beside each new sandbox, a
hand-maintained list that had already dropped$SBG/$SBG2once and$SB9
again — and only the last trap installed is the one that runs. The check has
two halves for that reason: every scratch variable must appear in some trap,
and in the final one. sync-local.shprunes before it copies.commands/,agents/and
hooks/were copied over and never cleaned, so a file deleted or renamed at
the root kept its stale copy in.claude/— the tree that actually loads
while working in this repo, which then went on registering a command or hook
the plugin no longer ships.skills/already did this; the other three did
not..claude/settings.jsonis still never touched.SKILL.mdgave both loops/autoloop's bounds. "Six stop rules bound
every loop at 5 rounds max" was wrong about/polish, which has four stop
rules and three macro rounds.- A failed update check now backs off for an hour instead of retrying every
session. Every failure path in the notifier — no connectivity, a 403, an
empty body, a tag it cannot compare — exited above the state write, so
nothing recorded that an attempt had been made and an offline machine paid a
3-secondcurlat the start of every session, forever, with no trace of why.
The state file gains alast_failstamp; a success still silences the
network for 24h, a failure for 1h. One hour rather than reusing the 24h
window: a flight should cost one call, a transient blip should not cost a day
of notices. A pre-release tag (v1.3.0-rc1) still produces no notice —
announcing "1.3.0 is available" for a release that is not 1.3.0 would be
wrong — but is now recorded as an attempt rather than silently discarded. uninstall-timer.shnow stops the.service, not only the.timer.
systemd's--nowapplies to the unit it is given, so uninstalling at 03:05
removed the schedule and left that night'sbypassPermissionssession running
against the tree the operator had just unscheduled. The timer is still
disabled first, so nothing can trigger a fresh run in the gap.- A double-registered Stop hook no longer costs two blocks per stop attempt.
Listing the loop-eng hooks in a project's.claude/settings.jsonwhile the
plugin is also installed fires the gate twice, serially, and each invocation
read the counter the previous one had just written: the 3-block ceiling
arrived on the second attempt. The half that was never written down is worse —
the ceiling clearsgate-counton its way to allowing, so the twin read 0,
re-ran the red contract and exited 2, meaning under double registration the
ceiling never actually released the stop. The gate now records its verdict in
.loop/gate-lastand replays it for a repeat invocation arriving within
LOOP_ENG_GATE_DEDUP_WINDOWseconds (default 1 — one second is the smallest
window that survivesdate +%s's own resolution). A marker that is
unparseable, dated in the future, or older than the window is ignored rather
than honoured;0disables the replay. - A UTF-8 BOM on the first line of
criteria.tsvno longer renames the first
criterion. An editor that writes one putEF BB BFin front of the first
id, so the ledger reported an id nobody authored and its evidence landed in
evidence/_<id>.log. Nothing failed, which is why it survived: the contract
still went green, and the mismatch only surfaced when a human looked the
criterion up by name. Stripped on line 1 inrun-contract.shand in both of
arm-contract.sh's parse loops, so arm and run keep naming the same id — the
same agreement the empty-description TAB split was fixed to preserve.
Live-install smoke: PASS (Claude Code 2.1.278, headless, throwaway
CLAUDE_CONFIG_DIR, GitHub-source marketplace install of this release's own
content on main — so no source-type disclosure is owed). The live cache
copies were instrumented before the run, so every verdict below is a marker on
disk rather than a model report:
- evidence-gate:
deny()fired twice in one session — once for theWrite
(EGDENY: raw evidence under .loop/evidence/) and once for the Bash fallback
the model reached for next (a Bash command writing to the .loop evidence ledger)..loop/evidence/smoke.lognever landed. The marker also records
CLAUDE_PLUGIN_ROOTas seen by the hook process: the real absolute
plugins/cache/loop-eng/loop-eng/0.16.0path, not the<loop-eng plugin root>
placeholder — sohooks.jsonauto-loaded and the variable reaches hooks. - arm-contract:
armed from …/plugins/cache/loop-eng/loop-eng/0.16.0/…, the
version-pinned copy that enforces, not theplugins/marketplaces/clone. - stop-gate: exactly three
SGBLOCKmarkers (=MAX_BLOCKS) on a red
contract, thenCEILING-RELEASE— the first live evidence that the ceiling
actually releases the stop, which is the half of the double-registration bug
above that nobody had written down..loop/results.jsonwas machine-written by
run-contract.shwith"all_green": false. ${CLAUDE_PLUGIN_ROOT}in command bodies:/loop-eng:autolooparmed,
reached ALL GREEN in round 1/5, and left a two-criteria ledger with
"all_green": true.
One thing the last step demonstrated without being asked to: the session's own
closing report stated that .loop/active, .loop/gate-count and
.loop/criteria.sha256 "remain in place", and all three were already gone —
the green path had cleared them. The report was a claim, the disk was the fact,
and they disagreed on the very run that proves the mechanism works. That gap is
the whole reason the ledger is machine-written.