55 KiB
Decisions
larv-review: a project lifting itself to the comprehension floor starts at the lowest dimension
2026-09-20, lilleman. Serves goal 1. Across six projects scored with the four seats, Locality or Self-sufficiency was the lowest dimension at every seat and Navigation at none, so a layout fix would not lift a project under the floor. Valid while the scoring run keeps those four seats.
2026-10-15, lilleman: an item that lifts the lowest dimension scores G 9, since the lowest dimension caps the overall and lifting it is worth the most to the floor. Today that ranks the Shape items, todo.md items 114, 124 and 125, first in release 0.3.0: PR #257's scoring run found Shape lowest, at 6.25. When todo item 148 replaces G, the chunk that ships it carries this rule into the new score.
2026-10-16, implementing todo item 148: such an item moves each goal it cites by 9, in place of G 9.
loop-claude: a judge decides each interrupt and each quoted answer from the transcript, the README's premises, AGENTS.md, docs/decisions.md, ~/.claude/CLAUDE.md, ~/.claude/rules/ and larv-review's standards, and holds a chunk open while an answer the human typed in it is recorded nowhere; the worker's own account of which goal settles a choice decides nothing
2026-09-21, lilleman. Serves goal 1. Asked to name the goal behind each choice, the worker cites a real goal for a choice that goal does not settle, and under-reports its own decisions; the judge's bar is whether the README discriminates between the alternatives. Valid while the worker's self-report stays unreliable.
2026-10-01, lilleman: the judge reads docs/decisions.md and AGENTS.md too, so an answer recorded there is not asked again (goal 1.2); its bar becomes whether the README or those files discriminate. 2026-10-03, implemented: when the README's premises or those files answer the worker's question, the judge quotes the answer verbatim and the worker resumes with it. The judge then sees the quote as a [loop] line. The worker asking it again shows the quote did not settle it, and the judge sends it to the human. A backstop of three quoted answers per cycle bounds what the judge misses, such as a reworded repeat or a worker asking without end, so the worker cannot loop unattended (goal 1.4); the fourth question that the README's premises or those files answer in one cycle goes to the human with the judge's quote. An interrupt does not reset the count, so every later question those files answer in that cycle also goes to the human. Valid while the worker writes records only in a worktree, as CLAUDE.md → "Working with the codebase" has it, so the records the judge reads from the checkout root are merged ones.
2026-10-03, lilleman: the judge is to read ~/.claude/CLAUDE.md whole too. The worker follows that file, so a question it answers should not reach the human (goal 1.2). Reading the whole file is safe, because the judge may quote only words that appear in it. A list of sections would need keeping current. Implemented the same day.
2026-10-03, lilleman: the judge rules a chunk finished only once every answer the human typed in it is recorded. A finished chunk's session is deleted, and its answers with it, so an answer recorded nowhere would be asked again in a later chunk (goal 1.2). Implemented the same day by claude, which settled two choices the ruling left open. First, an answer counts as recorded where the files the judge reads hold it, ~/.claude/CLAUDE.md included, or where the transcript shows the worker writing it into README.md's premises, AGENTS.md, docs/decisions.md, todo.md or a code comment. A worker's write to ~/.claude/CLAUDE.md does not count: the judge reads the live ~/.claude, which holds the write only once it merges and the checkout is pulled. The judge cannot read a code comment or todo.md. Yet CLAUDE.md → "Working loop", "Ask, don't guess" puts a standing choice made in one place in a comment there. And the human's approval of a release's items, which "Working loop" requires, is the set of rows todo.md names for that release. The judge also reads the records once a cycle from the main checkout. That checkout may not yet hold an answer the worker wrote and merged. A judge that refused any of these would hold the chunk open every cycle. Second, only an answer a later chunk could need must be recorded, so an approval such as "merge it" holds nothing open. The worker's resume prompt states the rule, so a worker whose chunk is held open knows it.
2026-10-13, implementing todo item 95: the judge reads each file under ~/.claude/rules/ whole too, as the rules/: decision moved topic rules there, for the reason it reads CLAUDE.md whole, and a worker's write to one does not count as recording an answer, as a write to CLAUDE.md does not.
2026-10-13, implementing todo item 104: the judge reads each file under ~/.claude/skills/larv-review/standards/ whole too, for the same reason, as the worker: decision moved rules there.
loop-claude: one session per project, its id derived from the checkout's path relative to ~/code, or to / outside it
2026-09-21, lilleman; revised 2026-09-30 by lilleman. Serves goal 1. One fixed id per project keeps the session picker at one entry per project and makes any transcript under that id loop-claude's own to delete. A checkout outside ~/code mirroring a path inside it shares that id, and a second loop on it is not refused. Once todo.md item 5 lands, the id comes from the full path, so no two checkouts share one, and loop-claude refuses to start while another session on that id is active. Moving the checkout orphans its open sessions, archive folder and models entry: sessions stay in the picker until the human deletes them, migration code not being worth a one-human audience. Valid while claude takes --session-id and resumes by it.
loop-claude: before an interrupt, it marks the checkout and each of its worktrees trusted in ~/.claude.json
2026-09-21, lilleman; the lost-write risk accepted 2026-09-24 by larv-review. Serves goal 1. A write by another claude inside trust's read-modify-write window is lost.
2026-09-24, lilleman, extending it to every worktree. claude --resume re-enters the worktree the worker last entered, recorded in the transcript's worktree-state entry, and Claude Code asks trust per path, so trusting the checkout alone still lands the human in the dialog; trusting every worktree git worktree list names spares reading which one from the transcript. Valid while resume re-enters a recorded worktree and trust is kept per path.
2026-09-30, lilleman: Claude Code owns and writes that file, so loop-claude is to move out of it, bringing each case that must stay to the human. Stands until todo.md item 6 ends it.
bin/: the tests rerun themselves on a uv-fetched Python at README Install's floor
2026-09-26, larv-review. Serves goal 2. The suite reruns itself on a uv-fetched interpreter of the version Install names: ast.parse(feature_version=) on the host's Python accepts the nested f-string 186181a fixed, a compile check passes a call newer than the floor, like 3.12's itertools.batched, and a python3.N on PATH is installed by hand on every machine and again at each bump. Valid while uv can fetch the floor interpreter and no machine taking the checkout ships an older Python.
bin/: the tools and their tests run on the host's Python, with no container
2026-09-24, larv-review. Serves goals 1 and 2. The tools drive the host's claude CLI and read the host's session files, which a container cannot see; the tests run on the same host Python the tools meet. Valid while claude runs on the host.
comprehension floor: every dimension and the overall at 7.0 or above is the target, and blocks no merge or release
2026-09-27, lilleman, restating the 2026-09-24 target and extending it to the overall. Serves goal 1. 2026-10-13, lilleman: the floor blocks nothing, and review: the comprehension check records … says why. Valid while the scoring run keeps its four seats.
loop-claude: each project's model lives in ~/.claude/loop-claude-models.json, which only loop-claude writes
2026-09-26, lilleman. Serves goal 1. Claude Code rewrites the user settings' model whenever one is picked inside a session, so a loop reading settings runs whatever was picked last; ~/.claude/loop-claude-models.json has loop-claude as its one writer, and every claude it starts gets that model as --model. The file is per machine, outside the synced allowlist, since a tracked file the loop writes would dirty the checkout. 2026-10-02, lilleman: goal 2 shares the setup across machines, and a project's model is each machine's own choice, so a new machine asks once per project, which is not asking the same thing twice (goal 1.2). Valid while Claude Code keeps rewriting the settings' model from inside a session.
review: a pass gets at most three rounds per chunk; instead of a fourth, the run asks the human
2026-09-28, lilleman. Serves goal 1. One counter per pass per chunk, so no fix bounces between two passes without end. Valid while one human answers the ask, in the session or from the unmerged PR.
2026-10-13, lilleman through todo item 97, implemented by claude: the cap stays at three after later rounds were narrowed, since a lower cap would ask the human more often, against goal 1, and a third round reviews only the answers to round 2's findings, so it costs little.
2026-10-15, lilleman through todo item 144: a rerun one rung up belongs to the round it reruns, so it counts toward no cap: review: a reviewer or comprehension seat that rules the work below standard.
review: a reviewer or comprehension seat that rules the work below standard may ask to rerun once, one rung up, in the same round; the ruling that stands is an escalation trigger for the worker, never for the judge
2026-10-15, lilleman asked for it through todo item 144, implemented by claude. Serves goal 1.1: a cheap reviewer that finds the work below standard can have a more capable one check that ruling, and work below standard gets a more capable rung to fix it.
The work is below standard where systems-architect returns BLOCK, a reviewer reports a finding against larv-review's standards/quality.md, or record-ruling counts a comprehension seat's vote in a paired ruling as worse. That reviewer or seat may ask, and the worker then relaunches it on the rung loop-claude's prompt names, one above the rung it ran on. bin/loop_claude/cycle/prompts.py's reruns names it: the seats run on the project's rung, and the reviewers too while the worker runs below it. Off the ladder, or for a reviewer or seat already on the top rung, the prompt names none, and its report stands.
A reviewer's relaunch gets the report that asked and confirms or dismisses each of its findings with a reason, so no finding goes unanswered; a seat's relaunch reads afresh, since a seat reports no findings. The relaunch's report stands in place of the one that asked, in the same round, so it adds no round, and a relaunch cannot ask again. So the round cap still bounds a pass, and one round launches a reviewer at most twice. The ruling that stands is the fourth escalation trigger in CLAUDE.md. lilleman ruled that no ruling raises the judge's rung, which routing: on a model judge-replay covered sets.
Valid while the ladder orders its rungs by competence.
review: a fix for a 🔴 or 🟡 reruns the pass that found it and each pass whose trigger names fixes like it; from round 2 a pass reviews only the answers to its last round's findings and any other pass's fix that re-entered it; a fix for a 🟢, a ❓ or a prose finding reruns none
2026-10-08, lilleman, replacing the 2026-09-30 rule that every fix, a nit's included, re-enters review. Serves goal 1.4. An audit of the four costliest archived chunks (2026-10-08) found nearly every finding that mattered in a pass's first round; later rounds mostly re-checked the last fix, reworded what an earlier round wrote, or contradicted another round on the same line. A round 2 caught real bugs only where a fix changed behaviour, so stability still reruns on every fix that does, and security on every fix that opens an untrusted-input boundary or touches authn/authz, secrets or crypto. Valid while round-2 reviews of nit and prose fixes keep changing nothing a user would notice.
2026-10-13, lilleman through todo item 97, implemented by claude: from round 2 a pass reviews only how the chunk answered its previous round, each fix and each dismissal with its reason, and reports only one that is plainly wrong or worse than the change it answered. A fix from another pass that re-enters it is still reviewed as a first round would review it, limited to its lines. Reviewing all that changed had a reviewer find new gaps in each round's fixes, so a pass ran to its cap. Serves goals 1.4 and 1.5. Valid while round-2 findings outside a round's answers keep changing nothing a user would notice.
review: the comprehension check records how hard a project is to read and blocks no merge: a paired ruling against the last measured commit where the architecture pass ran, and the four-seat scoring run when a release's items run out or an item names the floor
2026-10-08, lilleman. Serves goals 1.1 and 1.4. Two independent four-seat runs moved up to 0.4 on near-identical code, so a fall within that noise forced rounds that changed nothing (PR #224). A seat reading both versions judges the difference on the same material, so the noise the versions share cancels. No conventional significance level lets a sign test settle with four votes, so the human chose a lead of two votes over every other ruling, same included. Two seats that agree settle it, so a PR that leaves the reading as it was costs two seats. A third seat alone can never settle it, so the third and fourth launch together. The human chose the last measured commit on the architect's finding that with a merge base as the base, chunks without an architecture pass, and a suspended restructure's steps, could each lower comprehension unseen. Reading the default branch one merged change at a time keeps the rule working for merge commits and squash merges alike. The scoring run also runs on a chunk shipping an item that names the floor, so the chunk that lifts a project to the floor can prove it. A chunk that removes a release's last item without shipping it runs it too, so no release ends unmeasured. Valid while seats reading both versions agree more often than two absolute runs do.
2026-10-13, lilleman. No published study validates simulated reader panels as a measure of how easy code is to understand, and no test of whether the panel's signal beats its noise has run. So no ruling, score or floor blocks a merge. The runs go on, so the history keeps the scores and the places the seats found hard, for later measurement. The architect, the stability reviewer and a session filing an item read the newest places, since those places are what a chunk can improve. With nothing to block, the check runs once per chunk, on the branch as review left it, in place of a run in each architecture round and a rescore after later commits. A fallen dimension no longer calls the four scoring seats either: their scores only decided the block. The base is now the newest merged change that adds any ruling or scoring run: with worse rulings merging, a base left behind them would charge one chunk's ruling with earlier chunks' falls. The newest places are the newest scoring run's and each later ruling's places a seat voted worse, so they change with each ruling. A chunk that leaves a touched place as hard says why in its PR summary, not in a decline's record, which would outlive the place.
review: a project decision may suspend the comprehension check for the plan items it names
2026-10-04, lilleman. Serves goal 1.4. In a restructure, each step's scoring run measures code the next step deletes. It costs a run and, below the floor, blocks the step, yet says nothing about what the restructure buys. The scoring run after the last step measures that. 2026-10-08: the paired ruling replaced the scoring run in most chunks, and the suspension covers it too; the ruling after the last step compares with the commit measured before the first step. 2026-10-13, lilleman: the comprehension check blocks nothing now, so a suspension saves only the runs. Valid while such a decision names its items and the plan item that ends it.
review: a project decision may opt every chunk out of the architect, the product-owner pass or the comprehension check
2026-10-11, lilleman. Serves goal 1.4. A research repo's PR, in a repo with no consumer for the product-owner pass and no product for the architect, spent rounds of both, and of the comprehension check, on a probe. The opt-out is the project's to make, and only an entry titled review opt-out: makes it, so a project without one is reviewed as before (goal 1.3). No opted-out reviewer works against a goal or a technical principle: the principles audit, which has no opt-out, still judges KISS and every other principle, so the entry names no plan item that ends it. 2026-10-13, lilleman: an opt-out of the comprehension check no longer ends with a chunk that ships an item naming the floor, since the floor blocks nothing. Valid while the principles audit judges every chunk, and while the architect's and the product-owner's findings matter only to a product with consumers.
review: a pass skips only on a precedent: a decision, or a plan item crediting the pass, that the repo held before the chunk began
2026-09-30, lilleman. Serves goal 1: a decision the chunk writes is the chunk's own and unreviewed, and an unattended run has no human to catch it. Valid while a pass is the only reader of a chunk before merge.
loop-claude: the archive keeps the raw transcript, and a failed archive stops the loop
2026-09-28, lilleman. Serves goals 1 and 3: saving each transcript locally is the first step of backing it up, and it shows afterwards what an unattended run did. A copy of the .jsonl, deduplicated by content hash, with its outcomes beside it; a rendering drops tool results, and a second-resolution stamp names two states within one second as one file. A failed archive exits 1, since a loop that loses its record silently fails the backup goal. Valid while transcripts stay small enough to copy whole.
loop-claude: a claude that cannot start is a failed worker run, retried
2026-09-28, larv-review, declining a product-owner nit to exit at once when claude is missing. Serves goal 1. Claude Code's updater repoints ~/.local/bin/claude at each new version under running loops, and a start that meets it mid-update fails with the same error as a broken install; the retry costs two minutes on the second and saves an unattended loop on the first. Valid while Claude Code updates by repointing its link.
review: an ask no user answers leaves the PR unmerged
2026-09-30, claude. Serves goal 1: the round cap, a BLOCK's restructure, Stage 0's questions and a goal conflict are the human's call, and an unmerged PR is what brings it to them; merging would make the call for them. Where an option reviews more — run the pass, fix a finding no goal lets the run decline — the run takes it; a ❓, or a fix changing a goal or a decision, is filed in todo.md, which reaches the human without holding the chunk. Valid while a human reads every unmerged PR an unattended run leaves.
loop-claude: every claude it starts bypasses permissions inside its sandbox
2026-09-30, lilleman. Applies "Always grant explicit access to data": the sandbox loop-claude runs in is where access is granted, so the worker and the interrupt run with bypassPermissions. The worker may read ~/.claude/.credentials.json: it holds Claude Code's own credentials, which claude reads to run anyway. Its one seam to production is the forge: what it pushes or merges can publish through CI. Valid while loop-claude runs only in the sandbox README → Install names.
review: /security-review is the security pass of record, except where the full scan runs on the same change and replaces it
2026-09-20, lilleman. Serves goal 1.1. Its value is a tuned exclusion list and a ≥0.8 confidence floor, which a hand-written reviewer would reproduce worse. Valid while /security-review ships both.
2026-10-08, lilleman. Serves goal 1.4: run beside the full scan, /security-review started seconds apart from it each round and returned a near-identical report. Valid while the full scan covers what /security-review reports.
review: the premises chunk's whole review is the human's approval
2026-09-20, lilleman. Serves goal 1.1. A reviewer's finding on that chunk could only be declined by citing the goals the chunk exists to write. Valid while every decline must name a goal or a technical principle.
workflow-bench/: the remote may show the bench cases' names and commit SHAs
2026-10-02, lilleman. Serves goal 4, which keeps credentials, transcripts and memory files off the remote; a private project's name and commit ids are none of those. Valid while the bench names only cases and commits, never their code or results.
todo.md: one table of items scored by the formula it states, each README achieve goal weighed by its rank, held to its bar, ranked by bin/rank_todo.py, which ranks each blocker above the items it blocks; the table's order is the plan's only order
2026-10-02, lilleman. Serves goal 1: findings were filed faster than chunks closed them, so the plan grew without telling what mattered. Each item is scored as ~/.claude/rules/todo-items.md says; this repo's formula counts value highest and size least. An item under the bar is not kept; this repo's bar started at 10 and was set to 9 the same day, purging the 17 items under it. An Exempt cell keeps a row past the bar where a rule needs it kept. lilleman retired the two decisions whose plans the purge removed: the stats line in the transcript archive, and three benches before a workflow change merges. A finding under the bar is recorded nowhere, so a later review may raise it again, and the run rescores it. That costs one scoring; a ledger of dropped findings would regrow the list the bar caps. larv-review's "Round cap" → "Done" counts a finding named under the bar as settled, so one raised again holds no pass open. rank_todo.py --check is part of larv-review's gate, since only a check keeps the stored Score from going stale. The format is mandatory in every project, as the premises are (goal 1.3); the formula, bar and weights are each project's own. A script ranks the table so a re-rank after each addition or edit is deterministic and cheap. A 🟡 against a technical principle is exempt as principle, because its audience value scores low and the bar would drop every one. A 🟢 against a principle is scored like any other finding. 2026-10-08, lilleman: the goal weights in todo.md depart from an even spread by position, which would weigh goal 4, leaking nothing, at 0.11. Valid while one human sets the bar and reads the ranking, and while the items marked principle stay few enough to rank.
2026-10-15, lilleman: the scores get a researched method, which todo item 148 and todo.md items 146, 149, 151 and 152 build; the evidence is in docs/scoring-and-goals-research.md. R becomes L + E + I − 2: the chance the change holds a defect, set first by its size; the chance the defect escapes tests, review and monitoring; and the worst impact dimension, each about ×10 per level. I5, irreversible, holds R at 7 or more, and I4 at 5 or more, since a severe enough consequence outranks how unlikely it is. C goes from every table and tool: what it scored beyond size, spread and novelty, which L already holds, is complexity, which adds almost nothing once size is accounted for. A task's R alone then picks its rung. Items rank by V / C, value per cost: C is 2^S, and V sums each cited achieve goal's sum-reciprocal weight times how far the item moves it. A goes, and the Audience says whose value the goals serve. R stays out of the ranking and sets how carefully an item is done; an item that lowers risk scores it as value. Each release fills by priority up to a capacity it states, in place of the bar. Each README goal is maintain, which vetoes an item that breaks it, or achieve, with a signal, a counter-signal and a one-line reason, as this README's Goals now mark them; each project keeps settled decisions to test its goals against. Until these items ship, the formula and bar above hold.
2026-10-16, implementing todo item 148: items rank by Score = 100 * V / 2**S. 2S is the cost; the 100 lets a score read to one decimal. V sums, over the achieve goals an item's Moves cell names, each goal's sum-reciprocal weight times how far the item moves it, 1 to 10. rank_todo.py derives the weights from README.md's achieve goals in reading order, so A, G and the goal weights table are gone, the 2026-10-08 weights with them. A maintain goal scores nothing, so an item that cited only maintain goals now names the achieve goal it moves, or none and scores 0. A panel of three readers seated as lilleman picked the spelling: two put a Moves column holding 1.1 by 8, 1.2 by 5 first, and one put 1.1: 8 first; two chose 2**S, since a Python reader takes ^ for XOR; all three chose one decimal of 100 × V / 2S over three significant digits or a log. The bar moved to 2.5, under every item not exempt, so the new scale dropped no item. A table in the old shape still ranks by the formula and weights it states, and ranking it says to reshape it, so no other project's commits stop; reshaping is that project's chunk, as CLAUDE.md → "Working loop" says of a todo.md in another shape. The C column stays until todo.md item 146 drops it. The old shape's ranking is valid until todo.md item 156.
2026-10-15, lilleman. Serves goal 1.4: loop-claude routes a chunk's first cycle on the item the chunk takes (routing: one ladder). An item lists the items that must be done before it starts in a Blocked by column, and rank_todo.py ranks each blocker above every item it blocks. The table's order is todo.md's only order: rank_todo.py fails on text beside the table under ## Items, since a prose order there, "Release 0.3.0 takes items 125, 114 and 124 first", contradicted the table and loop-claude could not read it. A decision that wants an order sets the scores instead. An item waits while it is marked question or a blocker of it is still in the table, whatever the rows' order, so a release's first row that does not wait is the item a chunk takes. A blocker the table no longer holds was finished or deleted, and is dropped, so the cell shows what still blocks. A panel of three readers seated as lilleman picked the spelling: two ranked "Blocked by" first, as the cell lists only what still blocks, and all three chose bare IDs such as 12, 14 in a column right after Release, read before the tagline and kept apart from the scores. rank_todo.py adds the column to a table without it. The tools read cells by column name, so a later column leaves a reader on an older release working; rank_todo.py, which writes every column, fails on one it does not know rather than drop it.
todo.md: only a session or subagent on the project's rung or above scores or reshapes the plan; one below it drafts new items and changes to filed ones for a subagent at or above that rung to apply and score, and removes finished ones
2026-10-15, lilleman. Serves goal 1.1: a cheaper rung writes worse scores, and a wrong score routes a chunk onto the wrong rung, ranks the plan wrong and drops an item under the bar that should stay. Below the project's rung, a session or subagent may not score an item, move it between releases, split a milestone, delete an item under the bar, or rewrite a filed item. It drafts each new item, and each change to a filed item, such as a refresh a rule asks for. Before the next commit, one subagent on the project's rung or above applies and scores the drafts. One launch covers all of a chunk's drafts (goal 1.4). A security finding gets that subagent at once, since it is filed the moment it is found. Removing a finished item closes work and plans none, so any rung does it. Scoring a delegated task's R + C runs on any rung too: a launch on the project's rung to score each delegation would cost more than the cheaper task saves (goal 1.4).
Three places carry the rule. rules/todo-items.md states it and loads with todo.md. CLAUDE.md's delegation rule launches the scoring subagent on the rung bin/subagent-rung --plan prints: the one the task's R + C picks, never below the project's, so a hard scoring task still climbs. bin/loop_claude/cycle/prompts.py's off_the_projects_rung names the same command to a worker below the project's rung, never a fixed rung, which would disagree with --plan on a scoring task of R + C 11 or more. Valid while a worker or subagent may run below the project's rung.
settings.json: Claude Code runs in auto mode with the dangerous-mode prompt skipped
2026-10-04, lilleman, answering the principles audit of PR #215. Serves goal 1: this setup is meant to run in a sandbox and to work autonomously, so tool access is granted by the sandbox, as "Always grant explicit access to data" in principles/technical-principles.md asks. Valid while every machine taking this checkout is such a sandbox.
the repo may name bender, bender-infra and ai-sandbox
2026-10-04, lilleman, answering the principles audit of PR #215. Serves goal 4, which keeps credentials, transcripts and memory files off the remote; the names of the host, its infrastructure project and the sandbox VM are none of those. Valid while the repo names them without their addresses or credentials.
reading cost: larv-review measures each finished chunk from loop-claude's archive and appends the figure to docs/reading-cost.md in the next chunk's PR
2026-10-08, lilleman. Serves goal 1.1: comprehension measured from real work, at no model cost (goal 1.4). loop-claude archives from the main checkout, outside any PR, so a tracked file it wrote there would dirty that checkout. So bin/reading-cost measures each finished chunk docs/reading-cost.md lacks from the archive, in the next chunk's worktree. A PR that never merges then loses no figure, and loop-claude needs no change. The figures keep a file of their own, so docs/comprehension-history.md keeps one writer, the comprehension check. Serves goal 4 by naming only files git tracks, and token counts. Rejected: loop-claude opening a PR of its own, one more PR per chunk and a tie to the forge; the worker measuring its own transcript before merging, which misses the chunk's tail. The figure counts new input tokens, uncached and cache-written, because workers read mostly through Bash and subagents, where parsed paths alone miss what they read. Valid while loop-claude archives every finished chunk with its subagents' transcripts.
reading cost: a rise is the last 5 chunks' median above the 5 before them, and files or refreshes one plan item
2026-10-08, lilleman. Serves goal 1.1: comprehension never falls, so any rise counts. Per-chunk figures are noisy: a flat trend rises about every other chunk. So a rise refreshes the item and never refiles it, and a chunk that sees no rise leaves the item as it is. The chunk that ships the item resets the trend, so later figures do not refile it for work that chunk already did (goal 1.4). A median, because one chunk that ran a panel of readers before its first commit measured 2.99M tokens against a typical 80k–370k, and a mean let it decide the trend alone. No published standard sets this threshold. Valid while figures arrive once per chunk.
rule-hook: a PreToolUse hook enforces each rule a program can check, a # rule-override <rule>: <reason> marker overrides one, and larv-review's overrides pass rules on each override before merge
2026-10-12, lilleman. Serves goals 1.2 and 1.3. Anthropic's best-practices page calls CLAUDE.md advisory and hooks deterministic, so a rule that must hold every time moves into bin/rule-hook, and CLAUDE.md keeps it only where the hook cannot check it. A Claude Code hook ties the check to one vendor ("Prefer the vendor-neutral option", principles/technical-principles.md), which is the target itself here: this repo configures Claude Code. What the tie buys: the hook blocks before a write lands, Edit and Write calls included, in every project with no per-repo install; a git commit-msg hook sees only commits, and CI sees them only after the push. The hook checks each write, so the agent fixes the line it just wrote; checking the staged diff at commit time would also cover files a Bash command writes, at the cost of later feedback. The marker's spelling was picked by a panel of three fresh readers, two to one. Each override is logged in the checkout's git directory, which is never pushed (goal 4). The plan had loop-claude's judge to rule on overrides inside a loop; lilleman approved larv-review's overrides pass in every run, because it rules before merge and an outrageous override still reaches the human through its ask. Valid while a PreToolUse hook that exits 2 blocks the call and hands its stderr to the model, and while an agent commits through Claude Code's Bash tool.
rules/: CLAUDE.md holds the worker's rules that no file path can scope, and each topic's rules for the worker live in a rules/ file that Claude Code loads by its paths: frontmatter
2026-10-13, lilleman through todo item 95, implemented by claude. Serves goals 1.3 and 1.4. Every session loaded CLAUDE.md whole, about 4,200 words. Anthropic's memory docs (code.claude.com/docs/en/memory) say a longer file "reduce[s] adherence", and IFScale (arxiv.org/abs/2507.11538) measures adherence falling as the instruction count grows. A rule goes in CLAUDE.md when no file path marks the moment it is needed: the working loop, prose that chat follows, commits, and API spec text, which may sit in code. Every other topic gets a file under rules/ whose paths: name the files that topic is about.
A session that writes a file has read one first, since Edit needs a Read, except for a new file written before any read; the "Topic rules" line says to read the rule file first there. 2026-10-13, todo item 104: the rules a reviewer applies and the worker need not load, those for comments and READMEs among them, moved out of rules/, per the worker: decision.
Claude Code's user-level rules tie this repo to Claude Code, which "Prefer the vendor-neutral option" (principles/technical-principles.md) allows here because this repo configures Claude Code itself. The tie buys topic rules that load without a pointer the session must follow.
Valid while Claude Code loads ~/.claude/rules/*.md in every project, a path-scoped one when a session reads, writes or edits a matching file, or reads one with a single-file Bash command such as cat, and after a write only once the write is done. On 2026-10-13 a smoke test confirmed both triggers: a rule in ~/.claude/rules/ with paths: ["**/smoke-target.txt"] held a secret word. claude -p in a project under /tmp printed the word after reading the target with the Read tool, and after creating it with the Write tool. A control run that opened no file printed none. Per the docs, a path-scoped rule leaves the context at compaction and returns at the next matching read.
worker: a chunk's worker writes the simplest change that solves its item, test first wherever a test can check the change, and reads a technical principle only where the item, a finding or its own record names it; larv-review's reviewers hold the change to the principles and to the standards in skills/larv-review/standards/
2026-10-13, lilleman through todo item 104, implemented by claude. Serves goals 1.4 and 1.5. Like red, green, refactor: the worker makes the item work, and the review passes raise it to the bar. A loop-claude worker loaded CLAUDE.md and every file under rules/, 4,247 words, and CLAUDE.md told it to read technical-principles.md too, 2,426 words more. The reviewers read the principles anyway, and a finding against one names it.
The worker keeps what it needs to write its own work. Each project's decision titles stay in its AGENTS.md, since a worker that misses a decision builds the wrong behaviour. A core of "Prose" stays in CLAUDE.md, since no reviewer reads the worker's chat. lilleman chose both on 2026-10-13. The rules for writing Goals and Audience, todo.md items and decisions stay in rules/, since writing those is the worker's job. bin/rule-hook stays: it blocks what a program can check, at no context cost. "Quality", the rules for comments and READMEs, and the examples behind "Prose" moved to skills/larv-review/standards/, which no path loads. loop-claude's judge and the prose reviewer read them, and the stability reviewer reads "Quality". They sit beside larv-review, whose passes apply them; principles/ stays where it is, since the principles auditor reads it per file.
A finding against a principle names it, so the worker reads only that one when it fixes or declines the finding. The worker still writes a failing test first wherever a test can check the change, since no reviewer can make a test come first. On 2026-10-13 lilleman widened it from code changes to anything there is to test. A chunk that changes no code, config or test, such as one that only plans, meets no principles review; the chunk that implements its items does. The prose reviewer checks that a doc sorts a list whose order carries no meaning.
The item also cut the rule that a session proposes new rules for CLAUDE.md and rules/ and restructures them after each change: changes to these rules go through this repo's chunks and their reviews, like any other change.
Valid while review rounds per pass do not rise. A principle found late, such as functional core, can cost a rewrite within a pass's three rounds. todo.md item 105 compares rounds per pass and reading cost in loop-claude's archive for the five chunks before and after this one.
review: stability and product-owner report only a defect, a broken requirement of the plan or the goals, a breach of a technical principle, or for stability a hard place the change touches; each architect finding names a later change the PR makes harder; prose runs only on a chunk that changes prose
2026-10-13, lilleman through todo item 97, implemented by claude. Serves goals 1.4 and 1.5. Anthropic's Claude Code best practices: "A reviewer prompted to find gaps will usually report some, even when the work is sound… Chasing every finding leads to over-engineering." 320 of this repo's 876 commits answered a review round. So stability and product-owner drop a finding that is none of these, and stability leaves the style of comments to prose, which reads every comment a chunk touches. An architect finding that names no later change it makes harder cannot be checked, so it is dropped. The architecture pass and the comprehension check keep their whole-project view, which guards goal 1.1 as a project grows. Valid while the findings these rules drop keep changing nothing a user would notice.
review: the stability pass mutation-tests the lines a chunk changes, in place of measuring test coverage
2026-10-13, lilleman through todo item 108, implemented by claude. Serves goals 1.1 and 1.4. Coverage counts the lines a test runs, so a test without a meaningful assertion still raises it. A surviving mutant shows a test that would let behaviour break. Every mutant of an untested changed line survives, so mutation testing of the changed lines also shows what a coverage drop on them would. Coverage would also catch a deleted test; the stability reviewer sees one in the diff without it. Measuring coverage beside it would add cost without raising quality, so todo item 69 was dropped and principles/technical-principles.md replaced "Test coverage should not decline" with the mutant rule.
The reviewer limits each run to the changed lines, so its cost grows with the chunk. The tools are widely deployed, each with its own way to limit a run to a diff: cargo-mutants --in-diff (https://mutants.rs/in-diff.html), Infection --git-diff-lines (https://infection.github.io/guide/command-line-options.html), Stryker's mutation ranges (https://stryker-mutator.io/docs/stryker-js/configuration/). mutmut has no such option, so the reviewer mutates the changed files and keeps the mutants on changed lines. On 2026-10-13 mutmut 3 ran on this repo's larv_review/rounds.py in under two seconds, set up as README → "Tools" says.
The run has no time cap. Limiting it to the changed lines already bounds it by the chunk's size, and no published standard gives a cap to copy. Each run's wall time in the reviewer's report shows when the premise below fails.
Valid while a mutation run on a chunk's changed lines stays cheap beside the review itself.
routing: one ladder of (model, effort) rungs, ordered by the Artificial Analysis Intelligence Index with Fable 5.1 at max on top; a task's R + C picks a rung by fixed bands, counted from the cheapest rung of the project's model, and a chunk's worker may run below that rung, launching its reviewers on that rung; the worker routes each subagent it delegates to by the R + C of the subagent's task
2026-10-14, lilleman. Serves goal 1.4, and goal 1.3: one ladder, the same in every project, read by loop-claude and by the worker through bin/subagent-rung. The judge's rung is the next entry's. bin/model_routing/ladder.py holds the rungs and the bands.
The rungs, least competent first: Haiku 5.5 at low, medium, high, xhigh and max; Sonnet 5.5 at high; Opus 5.5 at medium, high, xhigh and max; Fable 5.1 at max. The order and the cut come from the Artificial Analysis Intelligence Index (https://artificialanalysis.ai/leaderboards/models, read 2026-10-14), which scores each model at each effort and gives a cost per task. A rung stays only where no cheaper rung scores as high, so a step up always buys more score (goal 1.4). That cut drops Sonnet 5.5 at low, medium, xhigh and max, Opus 5.5 at low, and every Fable 5.1 rung, and every tie in the index falls among the dropped rungs. lilleman put Fable 5.1 at max back on top: the index scores it under Opus 5.5 at high, but Anthropic's model catalog names Fable the most capable model, and for the hardest tasks lilleman wants the highest quality at any price.
A chunk's worker runs on the rung its item picks, below the project's rung too. Only chunks run below the project's rung can prove that a cheaper worker holds quality (goal 1.1). So on 2026-10-14 lilleman chose a trial on real chunks: a replay of past chunks spends on work nothing ships (goal 1.4). Review holds quality meanwhile. While the worker runs below the project's rung, loop-claude's prompt has it launch each reviewer, each comprehension seat and the security pass's subagent on the project's rung, through the Agent tool's model and effort. It runs a full scan only from such a subagent, because the claude-security plugin's researchers and verifiers inherit the model that starts them. A subagent that cannot run the scan leaves it unavailable, so larv-review runs /security-review in its place. A project's rung is its model's cheapest rung, which for Opus 5.5 is its default effort, medium. lilleman chose medium knowing settings.json runs Opus 5.5 at xhigh, so a routed worker runs below the effort an interactive session takes.
The cost of a cheaper worker shows as extra review rounds and unfinished verdicts. Every 20 cycles across the archive, loop-claude measures them in code, with no model run (goal 1.4), and interrupts lilleman with the calls not raised before, when chunks routed onto a rung took more of either than chunks routed onto the next rung up, each rung with 5 chunks or more. Five keeps one odd chunk from calling for a change (goal 1.2). It also calls when the reports of 5 or more subagents of one type were longer than the tool results they read, so a delegated search cost the worker more context than it saved. bin/routing_figures/ measures and words the calls. A loop on another project cannot commit here, so it writes the figures and the calls raised at the archive's root, and this repo's next chunk files the plan item, as AGENTS.md says. Off a terminal, a call is said on stderr and the loop goes on: it is about this setup, not the running project's chunk. A reset line in the calls file restarts the figures after a routing change, so they show whether the change worked.
A model off the ladder routes nothing: claude runs it at the effort its settings give. R + C steps a task from the project's rung: 2–4 three rungs down, 5–6 two down, 7–8 one down, 9–10 none, 11–12 one up, 13–14 two up, 15–16 three up, 17 and above four up. A step past either end stops there. The bands spread the R + C that todo.md's items held on 2026-10-14, 2 to 12, across the rungs, so most tasks step down. S never moves a rung, so a huge task with low R and C runs cheap. While the worker runs above the project's rung, loop-claude's prompt has it launch the comprehension seats and the security pass's subagent on the project's rung too. So the seats score every chunk on one rung, and the security pass spends no more than the project chose. The prompt after each unfinished verdict repeats this, since a step-up may have taken the worker above the project's rung. The other reviewers inherit the worker's higher rung. On 2026-10-15 lilleman dropped routing them by R + C instead: a worker climbs because its chunk proved harder than its score said, which is when a cheaper reviewer is the bigger risk. score-outcomes had too few finished chunks to ground the bands, and a change to the ladder or the bands is lilleman's. A reviewer or seat that rules the work below standard may rerun one rung up: review: a reviewer or comprehension seat that rules the work below standard.
The worker delegates a task only when it needs just the task's conclusion: a search or read across many files, or work independent enough to run in parallel. Edits, and whatever it must check line by line, stay in its own thread, since it would read a delegated diff again to check it. Measured over archived worker transcripts, subagent reports cost a median 8% of the worker's peak context, and sed -n and grep output made up 41% of its Bash results, so delegated searches save the most context. It scores each delegated task's R and C as for an item, and bin/subagent-rung turns them into the Agent tool's model and effort, counted from the project's rung. The rule names both, because the Agent tool sets a subagent's effort only when instructions ask. CLAUDE.md states the rule, since it holds in every session. A task that proves too hard for the worker's rung goes one rung up instead: routing: a worker hands a task one rung up.
Because a model switch inside a session discards its prompt cache, the worker changes rung only as the chunk starts, after every second unfinished verdict, when the judge reports a taken-in item whose R + C picks a higher rung, or when the judge finds the escalation trigger a worker cites in asking for a higher rung (routing: a worker whose run ends asking for a higher rung). loop-claude routes on the first row of the next release in todo.md's table that does not wait: an item waits while it is marked question or a blocker of it is still in the table. Since todo.md holds no order but its table's (todo.md: one table), that row is the item the worker takes. An item the worker takes in beyond that row lifts the worker's rung once the judge reports it, after the first cycle.
Valid while the index ranks these models, and while no newer model joins the catalog.
routing: a worker hands a task one rung up on each escalation trigger, up to two rungs above the rung its item picks unless the human agrees, and opens the subagent's prompt with the trigger so the routing figures count it
2026-10-15, lilleman asked for it. Serves goals 1.1 and 1.4: a task too hard for a cheap rung gets a dearer one only once it proves hard, and only for the part that proved hard.
Four escalation triggers in CLAUDE.md → "Working with the codebase" mark a task too hard: a re-score of the item on the project's rung or above picks a higher rung, the same failing test or finding survives two fix attempts, a pass reports a 🔴 in round 2 or later, or a reviewer or seat rules the work below standard. When one fires, the worker hands the hard part to a subagent one rung above its own, edits included, though the delegation rule keeps edits in the worker's thread: the escalation exists because the worker could not get them right. Each further trigger on that task climbs one more rung. Without lilleman's yes the climb stops two rungs above the rung the chunk started on: the rung its item picks, or the project's rung when no item routed it. A step-up between cycles raises the worker but not that limit: lilleman set the limit from the rung the chunk started on, so a worker that has stepped up may need a yes for its first escalation.
loop-claude's prompt names the rungs a trigger opens, so the worker computes no rung positions, and tells the worker to open each escalated subagent's prompt with Escalation trigger <n>:. bin/loop_claude/routing.py holds the limit and bin/model_routing/route.py the marker. The archive keeps the raw transcript, which holds the marked prompt, and bin/routing_figures/ counts the escalations by trigger in routing-figures.md, per starting rung for routed chunks and in total for every chunk.
Valid while the ladder orders its rungs by competence.
routing: a worker whose run ends asking for a higher rung, citing an escalation trigger the judge finds in the transcript, resumes one rung up next cycle, up to two rungs above the rung its item picks
2026-10-15, lilleman asked for it. Serves goals 1.1 and 1.4: when the hard part is the rest of the chunk, handing it to subagents piece by piece leaves the worker, which reads and checks each of their diffs, on a rung that proved too low. The worker climbs only once its run records a trigger.
loop-claude's prompt offers the step beside the escalated subagent of routing: a worker hands a task one rung up, as long as the limit leaves a rung that subagent may take without the human's yes. The worker then ends its run asking loop-claude for a higher rung and naming the trigger. The judge quotes an earlier passage that shows the trigger fired, such as a review round's commit title or the worker's report of the failing test, never the request itself. The trigger must have fired since any earlier such request, so one trigger buys one step. The judge sees the worker's text and tool calls but no tool results, so the quote shows that the run recorded the trigger, not that a tool's output bears it out. loop-claude checks the quote word for word, as it checks a quoted answer, since stitched fragments can make up a trigger. Without such a quote, the rung holds. A misquote is no failure, since holding the rung is safe and three failures stop an unattended loop. The next prompt names the worker's rung, so the worker learns whether the step went through.
The step is one rung up from the rung the worker would otherwise hold: its own, or the rung an item the judge saw it take in picks, whichever is higher. It resets the count of unfinished verdicts, so the step every second one takes counts afresh; when both steps fall on one verdict, the worker steps once. It stops at the limit escalated subagents stop at, two rungs above the rung the chunk started on. Past that limit the rung holds: loop-claude takes no yes from the human between cycles, so a worker there asks the human for an escalated subagent instead. The judge keeps its rung, as routing: on a model judge-replay covered says.
The archive quotes the judge's passage under Escalation: in the unfinished verdict, beside any step-up it causes. bin/routing_figures/ counts that verdict as unfinished, not as an escalation by trigger, which it counts only from subagent prompts.
Valid while the worker reports in its transcript the triggers that fired.
routing: on a model judge-replay covered, the judge runs on the rung its chunk's item picks, never below the project's rung
2026-10-15, lilleman's plan, settled by the replay below. Serves goals 1.2 and 1.4, under the ladder and bands of routing: one ladder.
On a model listed in JUDGE_REPLAYED in bin/loop_claude/routing.py, the judge runs on the rung its chunk's item picks, never below the project's rung, and keeps that rung when the worker steps up. Without an item, it runs on the project's rung. Each archived verdict names the judge's rung on a Judge: line.
On 2026-10-15, bin/judge-replay claude-opus-5-5 replayed the latest 15 archived verdicts of each kind from the Opus 5.5 projects, 39 in all. The reference judge, Opus 5.5 at the xhigh effort settings.json gave every judge before, reproduced 31 of them. The other 8 may rest on records or judge rules that have changed since; either way no rung is held to them. On the 31, Haiku 5.5 missed 7 at xhigh and 8 at max. That run tried each judge once. 4 of Haiku's misses, 1 at xhigh and 3 at max, misquoted the transcript, which the loop and judge-replay now retry; without them it missed 6 and 5. Sonnet 5.5 at high returned another kind on 3 interrupts, and Opus 5.5 at medium missed none. A missed interrupt lets the worker settle a decision that is lilleman's (goal 1.2), so the judge never runs below the project's rung.
Only Opus 5.5 was replayed, so the judge of a project on another model keeps the effort its settings give until judge-replay covers that model (goal 1.1). Every routed chunk on record had an item of R + C 9, so the replay could not show that the project's rung suffices for harder items, and the judge climbs with the routed item as the worker does. For R + C 11 to 14 it still runs at or below xhigh (goal 1.4); from 15, routing: one ladder records that lilleman wants the highest quality at any price. An item the worker takes in beyond the routed one lifts the worker's rung but not the judge's, until todo.md item 153 lifts the judge too.
Valid while the archived verdicts show what a judge should return, and until a new model joins the ladder: replay then.
routing: the stability reviewer stays on the project's rung while the worker runs below it, until stability-replay shows a lower rung finding every 🔴 and 🟡 the project's rung finds
2026-10-15, lilleman proposed running the stability reviewer on the worker's rung; the replay that gates it is the agent's proposal. Serves goals 1.1 and 1.4: the stability pass is the only one that mutation-tests the changed lines, so a defect it misses may merge, and a cheaper reviewer saves money only where it misses nothing.
bin/stability-replay <model> replays archived stability rounds on the code each reviewed, first on the project's rung, then on each rung below it, highest first, and stops at the first that misses a finding the project's rung found again. A rung qualifies only where it finds every such 🔴 and 🟡.
On 2026-10-15, bin/stability-replay claude-opus-5-5 replayed the latest 10 rounds holding a 🔴 or 🟡, 40 findings in all, 8 of the rounds from this repo. Opus 5.5 at medium, the project's rung, found 29 of them again. Sonnet 5.5 at high missed 13 of those 29, 2 of them 🔴, so no rung below the project's rung qualifies, and Haiku 5.5, below Sonnet on the ladder, was not tried. So the stability reviewer runs where routing: one ladder puts every reviewer: on the project's rung while the worker runs below it.
Valid until a new model joins the ladder, or the archive holds rounds a new reviewer prompt produced: replay then.