From 1bd192ecc70bacd7af7da722db408f57b86ee607 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Sun, 18 Oct 2026 22:14:34 +0200 Subject: [PATCH 01/47] File item 199: start loop-claude's worker with ScheduleWakeup disallowed --- todo.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/todo.md b/todo.md index df450f1a..44d0983f 100644 --- a/todo.md +++ b/todo.md @@ -6,7 +6,7 @@ `Bar = 0.1` -`Next ID = 199` +`Next ID = 200` ## Items @@ -30,6 +30,7 @@ | 190 | 0.3.0 | | | **Rewrite the `docs/decisions.md` entries `todo.md: one table …` and `loop-claude: a judge decides …` as the current state, so a reader no longer replays superseded paragraphs to learn what holds.** | 2 | 2 | 1 | 3 | 3 | code health by 3, 1.4 by 2 | 15.5 | | 82 | 0.3.0 | | principle | **Sort `AGENTS.md`'s decision titles and `docs/decisions.md`'s entries by title.** | 2 | 2 | 1 | 3 | 4 | code health by 4, 1.4 by 4 | 14.6 | | 29 | 0.3.0 | | | **Make the contributor a standing member of every project's audience, unless its README voids code health.** | 2 | 2 | 3 | 5 | 2 | 1.1 by 5, 1.4 by 5 | 13.7 | +| 199 | 0.3.0 | | defect | **Start loop-claude's worker with `ScheduleWakeup` disallowed, so a worker that ends its turn on a question exits and the judge puts the question to the human.** | 2 | 1 | 3 | 4 | 2 | 1.5 by 6, 1.2 by 3 | 11.8 | | 106 | 0.3.0 | | | **Make larv-review's "Do not over-read a clean result" cite a rule that says Renovate or Dependabot owns dependency CVEs, or drop the citation.** | 1 | 2 | 1 | 2 | 1 | 1.1 by 5 | 8.4 | | 49 | 0.3.0 | | principle | **Check that `AGENTS.md` lists exactly the titles of `docs/decisions.md`.** | 1 | 1 | 1 | 1 | 2 | 1.1 by 6 | 8.4 | | 154 | 0.3.0 | | defect | **Have `bin/shell_command.py`'s `segments` keep a command's words together across a redirect, so `git > out commit` reads as one git commit.** | 1 | 1 | 3 | 3 | 2 | 1.1 by 6 | 8.4 | @@ -168,6 +169,10 @@ Found by the prose review of PR #312, which judged both entries to read as amend State that in `~/.claude/rules/goals-and-audience.md` → "Goals and Audience", and have larv-review's comprehension check name the contributor as the reader it serves. The `**Void:** code health` line (`~/.claude/CLAUDE.md` → "Shared goal") is the one place a project says maintainability does not matter: it drops the contributor. A project that opts out of the comprehension check must already write that line. +### 199. Start loop-claude's worker with `ScheduleWakeup` disallowed, so a worker that ends its turn on a question exits and the judge puts the question to the human. + +A pending `ScheduleWakeup` keeps `claude -p` running after its turn ends. loop-claude acts only once the worker exits, so it neither runs the judge nor interrupts the human, and the chunk stalls with no prompt on the terminal. Seen on 2026-10-18 in plainpages-plugin-fastjira, session `678cac80`: the worker asked "accept" or "yes" for a fourth stability round, then re-armed a 30-minute wakeup on each firing, for as long as nobody killed it. Waiting on its own subagents needs no wakeup, since their task notifications resume the worker. Add `--disallowedTools ScheduleWakeup` to `bin/loop_claude/cycle/worker.py`'s `worker_args`, with a test asserting the flag. + ### 106. Make larv-review's "Do not over-read a clean result" cite a rule that says Renovate or Dependabot owns dependency CVEs, or drop the citation. Found by the goals audit of PR #245. `skills/larv-review/SKILL.md` §3 → "Security" says Renovate or Dependabot owns dependency CVEs per `CLAUDE.md` → "Working with the codebase", which says nothing about either. From a300dc32b7b3ca0253f9a0f12bfd726cb769fb46 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Wed, 21 Oct 2026 18:12:41 +0200 Subject: [PATCH 02/47] Name no other project in item 199, and keep ID 200 for the item the item-200 branch files --- todo.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/todo.md b/todo.md index 44d0983f..bd6267f8 100644 --- a/todo.md +++ b/todo.md @@ -6,7 +6,7 @@ `Bar = 0.1` -`Next ID = 200` +`Next ID = 201` ## Items @@ -171,7 +171,7 @@ State that in `~/.claude/rules/goals-and-audience.md` → "Goals and Audience", ### 199. Start loop-claude's worker with `ScheduleWakeup` disallowed, so a worker that ends its turn on a question exits and the judge puts the question to the human. -A pending `ScheduleWakeup` keeps `claude -p` running after its turn ends. loop-claude acts only once the worker exits, so it neither runs the judge nor interrupts the human, and the chunk stalls with no prompt on the terminal. Seen on 2026-10-18 in plainpages-plugin-fastjira, session `678cac80`: the worker asked "accept" or "yes" for a fourth stability round, then re-armed a 30-minute wakeup on each firing, for as long as nobody killed it. Waiting on its own subagents needs no wakeup, since their task notifications resume the worker. Add `--disallowedTools ScheduleWakeup` to `bin/loop_claude/cycle/worker.py`'s `worker_args`, with a test asserting the flag. +A pending `ScheduleWakeup` keeps `claude -p` running after its turn ends. loop-claude acts only once the worker exits, so it neither runs the judge nor interrupts the human, and the chunk stalls with no prompt on the terminal. Seen on 2026-10-18 in another project, session `678cac80`: the worker asked "accept" or "yes" for a fourth stability round, then re-armed a 30-minute wakeup on each firing, for as long as nobody killed it. Waiting on its own subagents needs no wakeup, since their task notifications resume the worker. Add `--disallowedTools ScheduleWakeup` to `bin/loop_claude/cycle/worker.py`'s `worker_args`, with a test asserting the flag. ### 106. Make larv-review's "Do not over-read a clean result" cite a rule that says Renovate or Dependabot owns dependency CVEs, or drop the citation. From 0df7377a2bb7c1fa2406556a1330b002f46d6a4c Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Wed, 21 Oct 2026 18:18:24 +0200 Subject: [PATCH 03/47] =?UTF-8?q?Answer=20prose=20round=201:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=203=20=F0=9F=9F=A1;=20item=20199=20corrects=20SKI?= =?UTF-8?q?LL.md's=20wakeup=20claim,=20drops=20the=20unproven=20notificati?= =?UTF-8?q?on=20claim,=20and=20its=20tagline=20promises=20only=20that=20th?= =?UTF-8?q?e=20judge=20runs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- todo.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/todo.md b/todo.md index bd6267f8..3a1129e1 100644 --- a/todo.md +++ b/todo.md @@ -30,7 +30,7 @@ | 190 | 0.3.0 | | | **Rewrite the `docs/decisions.md` entries `todo.md: one table …` and `loop-claude: a judge decides …` as the current state, so a reader no longer replays superseded paragraphs to learn what holds.** | 2 | 2 | 1 | 3 | 3 | code health by 3, 1.4 by 2 | 15.5 | | 82 | 0.3.0 | | principle | **Sort `AGENTS.md`'s decision titles and `docs/decisions.md`'s entries by title.** | 2 | 2 | 1 | 3 | 4 | code health by 4, 1.4 by 4 | 14.6 | | 29 | 0.3.0 | | | **Make the contributor a standing member of every project's audience, unless its README voids code health.** | 2 | 2 | 3 | 5 | 2 | 1.1 by 5, 1.4 by 5 | 13.7 | -| 199 | 0.3.0 | | defect | **Start loop-claude's worker with `ScheduleWakeup` disallowed, so a worker that ends its turn on a question exits and the judge puts the question to the human.** | 2 | 1 | 3 | 4 | 2 | 1.5 by 6, 1.2 by 3 | 11.8 | +| 199 | 0.3.0 | | defect | **Start loop-claude's worker with `ScheduleWakeup` disallowed, so a worker that ends its turn on a question exits and the judge runs.** | 2 | 1 | 3 | 4 | 2 | 1.5 by 6, 1.2 by 3 | 11.8 | | 106 | 0.3.0 | | | **Make larv-review's "Do not over-read a clean result" cite a rule that says Renovate or Dependabot owns dependency CVEs, or drop the citation.** | 1 | 2 | 1 | 2 | 1 | 1.1 by 5 | 8.4 | | 49 | 0.3.0 | | principle | **Check that `AGENTS.md` lists exactly the titles of `docs/decisions.md`.** | 1 | 1 | 1 | 1 | 2 | 1.1 by 6 | 8.4 | | 154 | 0.3.0 | | defect | **Have `bin/shell_command.py`'s `segments` keep a command's words together across a redirect, so `git > out commit` reads as one git commit.** | 1 | 1 | 3 | 3 | 2 | 1.1 by 6 | 8.4 | @@ -169,9 +169,9 @@ Found by the prose review of PR #312, which judged both entries to read as amend State that in `~/.claude/rules/goals-and-audience.md` → "Goals and Audience", and have larv-review's comprehension check name the contributor as the reader it serves. The `**Void:** code health` line (`~/.claude/CLAUDE.md` → "Shared goal") is the one place a project says maintainability does not matter: it drops the contributor. A project that opts out of the comprehension check must already write that line. -### 199. Start loop-claude's worker with `ScheduleWakeup` disallowed, so a worker that ends its turn on a question exits and the judge puts the question to the human. +### 199. Start loop-claude's worker with `ScheduleWakeup` disallowed, so a worker that ends its turn on a question exits and the judge runs. -A pending `ScheduleWakeup` keeps `claude -p` running after its turn ends. loop-claude acts only once the worker exits, so it neither runs the judge nor interrupts the human, and the chunk stalls with no prompt on the terminal. Seen on 2026-10-18 in another project, session `678cac80`: the worker asked "accept" or "yes" for a fourth stability round, then re-armed a 30-minute wakeup on each firing, for as long as nobody killed it. Waiting on its own subagents needs no wakeup, since their task notifications resume the worker. Add `--disallowedTools ScheduleWakeup` to `bin/loop_claude/cycle/worker.py`'s `worker_args`, with a test asserting the flag. +Claude Code's `ScheduleWakeup` tool resumes a session after a delay. While a wakeup is pending, the worker's `claude -p` keeps running after its turn ends. loop-claude acts only once the worker exits, so it neither runs the judge nor interrupts the human, and the chunk stalls. Seen on 2026-10-18 in another project, session `678cac80`: the worker asked the human to approve a fourth round of the stability pass, then scheduled a 30-minute wakeup, and another each time one fired, until someone killed the worker. A worker doesn't need a wakeup: larv-review already has it wait on reviewers and CI in the foreground. Add `--disallowedTools ScheduleWakeup` to `bin/loop_claude/cycle/worker.py`'s `worker_args`, with a test asserting the flag. Correct `skills/larv-review/SKILL.md`'s opening paragraph, which says a scheduled wakeup dies with a headless run. ### 106. Make larv-review's "Do not over-read a clean result" cite a rule that says Renovate or Dependabot owns dependency CVEs, or drop the citation. From 2096fe2c7e0e3ec43e558769ab08749f9ff15cc1 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Wed, 21 Oct 2026 18:21:25 +0200 Subject: [PATCH 04/47] File item 201: save tmux setups and restore them after a reboot, once the human has said what they need --- todo.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/todo.md b/todo.md index 3a1129e1..ef70703f 100644 --- a/todo.md +++ b/todo.md @@ -6,7 +6,7 @@ `Bar = 0.1` -`Next ID = 201` +`Next ID = 202` ## Items @@ -51,6 +51,7 @@ | 187 | 0.3.0 | | | **Count the tokens a worker spends reading reviewers' reports, so goal 1.4's signal shows whether report files lowered what a review costs the worker's context.** | 2 | 2 | 1 | 3 | 3 | 1.4 by 3 | 3.0 | | 165 | 0.3.0 | | | **Make this repo's tests assert the facts a prompt or help text carries in place of its sentences, and drop the tests that scan source or assert a constant.** | 3 | 2 | 1 | 4 | 5 | 1.1 by 4, 1.4 by 3 | 2.9 | | 182 | 0.3.0 | | | **Let the human edit an interrupt's answer with the arrow keys, so Left moves the cursor instead of typing ^[[D into the answer.** | 2 | 2 | 1 | 3 | 2 | 1.1 by 2 | 2.8 | +| 201 | 0.3.0 | | owner | **Save the human's tmux setups and restore them after a reboot, so work is up and running again quickly.** | 3 | 2 | 1 | 4 | 4 | 1.5 by 4 | 2.6 | | 155 | 0.3.0 | | | **Lower the reading cost of the files a chunk reads most before its first commit.** | 3 | 2 | 2 | 5 | 5 | 1.4 by 6 | 2.4 | | 169 | 0.3.0 | | | **Have rule-hook's `todo-rank-check` catch a `todo.md` that the same Bash call edits and then commits.** | 3 | 1 | 3 | 5 | 3 | 1.1 by 2 | 2.1 | | 197 | 0.3.0 | | | **Let the human edit what they type at loop-claude's terminal questions with the arrow keys, so Left moves the cursor in place of printing `^[[D`.** | 1 | 2 | 3 | 4 | 1 | 1.5 by 1 | 1.5 | @@ -255,6 +256,10 @@ A test audit across lilleman's projects on 2026-10-16 found 10 of 33 sampled tes `bin/loop_claude/cycle/interrupt.py`'s `put_question` reads the answer with `input()`, and nothing under `bin/` imports `readline`, so Left types `^[[D` into the answer the worker gets. Importing `readline` gives line editing, at two costs. It writes the prompt to stdout, not stderr. And its bracketed paste can return several lines, while `prompts.typed_answer` ends the answer at its first blank line and shows the judge the rest as loop-claude's words. Raised by the product-owner review of PR #308. +### 201. Save the human's tmux setups and restore them after a reboot, so work is up and running again quickly. + +The human asked on 2026-10-21 for tmux support, above all for saving tmux setups. Build nothing until the human has said exactly what they need. Ask them first, at least: what a setup holds, such as sessions, windows, panes, working directories and the commands running in them, like one `loop-claude` per project; when a setup is saved, on demand or on its own; how it comes back after a reboot; whether it must work on every machine that takes this checkout (goal 2), and so whether it belongs in this repo; and what else tmux support should cover. Record each answer where `CLAUDE.md` → "Ask, don't guess" says it belongs, re-score this item from the answers, and split it into items where it is more than one chunk. Weigh the widely used tmux-resurrect and tmux-continuum plugins against a script of our own. + ### 155. Lower the reading cost of the files a chunk reads most before its first commit. `bin/reading-cost` on 2026-10-18: the median of the last 5 chunks is 163,028 new input tokens before their first commit, up from 100,998 for the 5 before them. Read most over the last 5, by opens and searches: `rules/decisions.md` 1. The chunk that ships this item runs `bin/reading-cost --reset`. From c4cc7c11b5f868326673b7599573428dc77e7180 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Wed, 21 Oct 2026 18:26:25 +0200 Subject: [PATCH 05/47] =?UTF-8?q?Answer=20prose=20round=201:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=202=20=F0=9F=9F=A1;=20list=20item=20201's=20quest?= =?UTF-8?q?ions=20with=20their=20subjects,=20and=20file=20item=20202=20to?= =?UTF-8?q?=20add=20the=20negation=20rule=20to=20prose.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- todo.md | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/todo.md b/todo.md index ef70703f..df4fb89d 100644 --- a/todo.md +++ b/todo.md @@ -6,7 +6,7 @@ `Bar = 0.1` -`Next ID = 202` +`Next ID = 203` ## Items @@ -48,6 +48,7 @@ | 192 | 0.3.0 | | principle | **Sort `.gitignore`'s allowlist block, from `!.claude/` to `!workflow-bench/test_review_git.py`, by code point, so rule-hook's `ignorefile-sorted` checks later edits to it again.** | 1 | 1 | 1 | 1 | 1 | 1.1 by 2 | 3.4 | | 193 | 0.3.0 | | | **Narrow `readme_goals`'s mark to `Mark` by a typed lookup in place of `typing.cast`, so a mark added to the regex but not the lookup fails at run time, and one added to the lookup but not `Mark` fails mypy.** | 1 | 1 | 3 | 3 | 1 | 1.1 by 2 | 3.4 | | 194 | 0.3.0 | | | **Make `test_waits_out_a_usage_limit_which_ends_a_run_of_failures` expect a usage-limit wait independent of the wall-clock time that passes during the run.** | 1 | 1 | 1 | 1 | 1 | 1.1 by 2 | 3.4 | +| 202 | 0.3.0 | | | **Add `CLAUDE.md` → "Prose"'s rule "Write negations as people say them", with its examples, to `skills/larv-review/standards/prose.md`, so the prose reviewer holds prose to it.** | 1 | 2 | 2 | 3 | 1 | 1.1 by 2 | 3.4 | | 187 | 0.3.0 | | | **Count the tokens a worker spends reading reviewers' reports, so goal 1.4's signal shows whether report files lowered what a review costs the worker's context.** | 2 | 2 | 1 | 3 | 3 | 1.4 by 3 | 3.0 | | 165 | 0.3.0 | | | **Make this repo's tests assert the facts a prompt or help text carries in place of its sentences, and drop the tests that scan source or assert a constant.** | 3 | 2 | 1 | 4 | 5 | 1.1 by 4, 1.4 by 3 | 2.9 | | 182 | 0.3.0 | | | **Let the human edit an interrupt's answer with the arrow keys, so Left moves the cursor instead of typing ^[[D into the answer.** | 2 | 2 | 1 | 3 | 2 | 1.1 by 2 | 2.8 | @@ -244,6 +245,10 @@ Found by review of PR #317. `bin/rank_todo.py`'s `readme_goals` writes `typing.c Found by review of PR #317. `bin/loop_claude/test_black_box.py:569-575` sets `resets_at` from the test's `time.time()` and expects the wait, rounded to tens, to be 3720. When more than about 5 s pass between that read and the loop's, the wait rounds to 3710 and the test fails with no bug. Item 102 covers only replacing the `time.sleep` swap; this item changes the expected value, for example by asserting the wait against `resets_at + 120` minus the time the loop read, or a bound on it. +### 202. Add `CLAUDE.md` → "Prose"'s rule "Write negations as people say them", with its examples, to `skills/larv-review/standards/prose.md`, so the prose reviewer holds prose to it. + +Found by the prose review of PR #329. `prose.md` opens by calling itself the full rules that `CLAUDE.md` → "Prose" keeps a core of, yet it lacks that rule, so a prose reviewer whose bar is the standards files never sees it. + ### 187. Count the tokens a worker spends reading reviewers' reports, so goal 1.4's signal shows whether report files lowered what a review costs the worker's context. Before PR #310, reports reached the worker as the Agent call's result, a median 19k tokens per chunk (2026-10-08, 68 archived transcripts). Now a reviewer returns its verdict and one line per finding, and the worker reads a 🔴 or 🟡 finding's entry from the report file. `reading-cost` counts only tracked files (`bin/reading_cost/measure.py`), and `routing-figures` counts only the Agent call's result (`bin/routing_figures/measure.py`), so neither sees the report reads. Found by the architecture review of PR #310. @@ -258,7 +263,15 @@ A test audit across lilleman's projects on 2026-10-16 found 10 of 33 sampled tes ### 201. Save the human's tmux setups and restore them after a reboot, so work is up and running again quickly. -The human asked on 2026-10-21 for tmux support, above all for saving tmux setups. Build nothing until the human has said exactly what they need. Ask them first, at least: what a setup holds, such as sessions, windows, panes, working directories and the commands running in them, like one `loop-claude` per project; when a setup is saved, on demand or on its own; how it comes back after a reboot; whether it must work on every machine that takes this checkout (goal 2), and so whether it belongs in this repo; and what else tmux support should cover. Record each answer where `CLAUDE.md` → "Ask, don't guess" says it belongs, re-score this item from the answers, and split it into items where it is more than one chunk. Weigh the widely used tmux-resurrect and tmux-continuum plugins against a script of our own. +The human asked on 2026-10-21 for tmux support, above all for saving tmux setups. Don't build anything until the human has said exactly what they need. Ask them at least: + +- What a setup holds, such as sessions, windows, panes, each pane's working directory and the command running in it, like one `loop-claude` per project. +- When a setup is saved: on demand or on its own. +- How a setup comes back after a reboot. +- Whether the code that saves and restores setups must work on every machine that takes this checkout (goal 2), which decides whether that code lives in this repo. +- What else tmux support should cover. + +Weigh the widely used tmux-resurrect and tmux-continuum plugins against a script of our own. Then re-score this item from the answers and that choice, and split it into items where it is more than one chunk. ### 155. Lower the reading cost of the files a chunk reads most before its first commit. From 7c0e50b52e56d8c28288347c1d3ee26fbf5ae1c7 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Wed, 21 Oct 2026 18:38:07 +0200 Subject: [PATCH 06/47] Plan 0.3.0 as the items that change day-to-day work in projects plus those scoring 30 or more, 0.4.0 as the rest scoring 20 or more, and 0.5.0 as the remainder --- todo.md | 452 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 226 insertions(+), 226 deletions(-) diff --git a/todo.md b/todo.md index df4fb89d..274126ed 100644 --- a/todo.md +++ b/todo.md @@ -16,82 +16,82 @@ | 127 | 0.3.0 | | | **Define seat, place, paired ruling, scoring run and the judge's records in `CLAUDE.md` → "Vocabulary".** | 1 | 2 | 3 | 4 | 1 | code health by 4, 1.4 by 4 | 35.1 | | 129 | 0.3.0 | | | **Explain `bin/rule_hook/rules.py`'s `OVERRIDE` pattern beside it: why the reason is lazy, what the lookahead splits and why `-->` is stripped.** | 1 | 2 | 1 | 2 | 1 | code health by 4, 1.4 by 4 | 35.1 | | 114 | 0.3.0 | | decision | **Run git through `git_repo.py` in `rule_hook`, `metric_bench`, `reading_cost`, `review_replay` and `loop_claude`, keeping rule-hook's guards as an option, so one module owns how a tool runs git.** | 3 | 1 | 3 | 5 | 4 | code health by 9, 1.4 by 9 | 32.9 | -| 117 | 0.3.0 | | | **Give `todo_table.items` one way to say a plan has no items table, so no caller tells it from an empty plan by truthiness.** | 1 | 1 | 3 | 3 | 2 | code health by 4, 1.4 by 4 | 29.2 | -| 126 | 0.3.0 | | | **State when work has landed towards a release once, in `bin/larv_review/plan.py`, and have larv-review's help point to it.** | 1 | 2 | 1 | 2 | 2 | code health by 4, 1.4 by 4 | 29.2 | -| 131 | 0.3.0 | | | **Describe the transcript archive's layout in `bin/transcript_archive/`, which owns it, and have loop-claude's help point there.** | 1 | 2 | 1 | 2 | 2 | code health by 4, 1.4 by 4 | 29.2 | -| 133 | 0.3.0 | | | **Show, beside `bin/rule_hook/override_log.py`'s `this_chunks`, one example per case it decides: an amended or rebased commit, a renamed branch, and a commit on the default branch.** | 1 | 2 | 1 | 2 | 2 | code health by 4, 1.4 by 4 | 29.2 | -| 134 | 0.3.0 | | | **Name in `bin/shell_command.py`'s `segments` the shell forms it does not parse, so a caller knows what it misses.** | 1 | 2 | 1 | 2 | 2 | code health by 4, 1.4 by 4 | 29.2 | -| 157 | 0.3.0 | | | **Split `docs/decisions.md` → `todo.md: one table of items …`'s 2026-10-02 paragraph into one paragraph per choice.** | 1 | 2 | 1 | 2 | 2 | code health by 4, 1.4 by 4 | 29.2 | -| 80 | 0.3.0 | | defect | **State in README → Install that every machine taking this checkout must be a sandbox, as `settings.json`'s auto mode assumes.** | 1 | 2 | 1 | 2 | 1 | 2 by 4 | 28.7 | | 120 | 0.3.0 | | | **Rewrite larv-review §3's "Round cap" and "Re-entry" as one table that says, for each kind of fix, which passes rerun and what a round reviews.** | 2 | 2 | 3 | 5 | 4 | code health by 6, 1.2 by 6, 1.4 by 6 | 26.0 | | 21 | 0.3.0 | | defect | **Give `settings.json`'s model one writer, and sort its keys.** | 3 | 3 | 3 | 7 | 3 | 2 by 5 | 22.5 | -| 176 | 0.3.0 | | | **Give `loop-claude --help`'s routing paragraph sub-headings, such as Routing, Judge rung and Routing figures, so a reader finds a rule without reading 39 lines.** | 1 | 2 | 1 | 2 | 2 | code health by 3, 1.4 by 2 | 20.6 | -| 172 | 0.3.0 | | | **Name the project's rung `project` across `bin/loop_claude`, in place of `anchor`, as `bin/model_routing/ladder.py` names it.** | 2 | 1 | 3 | 4 | 3 | code health by 3, 1.4 by 3 | 16.5 | -| 190 | 0.3.0 | | | **Rewrite the `docs/decisions.md` entries `todo.md: one table …` and `loop-claude: a judge decides …` as the current state, so a reader no longer replays superseded paragraphs to learn what holds.** | 2 | 2 | 1 | 3 | 3 | code health by 3, 1.4 by 2 | 15.5 | -| 82 | 0.3.0 | | principle | **Sort `AGENTS.md`'s decision titles and `docs/decisions.md`'s entries by title.** | 2 | 2 | 1 | 3 | 4 | code health by 4, 1.4 by 4 | 14.6 | | 29 | 0.3.0 | | | **Make the contributor a standing member of every project's audience, unless its README voids code health.** | 2 | 2 | 3 | 5 | 2 | 1.1 by 5, 1.4 by 5 | 13.7 | | 199 | 0.3.0 | | defect | **Start loop-claude's worker with `ScheduleWakeup` disallowed, so a worker that ends its turn on a question exits and the judge runs.** | 2 | 1 | 3 | 4 | 2 | 1.5 by 6, 1.2 by 3 | 11.8 | +| 170 | 0.3.0 | | decision | **Re-tune `WORKER_STEPS` and `REVIEW_STEPS` once 10 chunks have shipped under them, from how well L, E and I order their review rounds and 🔴 findings.** | 2 | 2 | 3 | 5 | 2 | 1.1 by 3, 1.4 by 5 | 10.9 | | 106 | 0.3.0 | | | **Make larv-review's "Do not over-read a clean result" cite a rule that says Renovate or Dependabot owns dependency CVEs, or drop the citation.** | 1 | 2 | 1 | 2 | 1 | 1.1 by 5 | 8.4 | -| 49 | 0.3.0 | | principle | **Check that `AGENTS.md` lists exactly the titles of `docs/decisions.md`.** | 1 | 1 | 1 | 1 | 2 | 1.1 by 6 | 8.4 | | 154 | 0.3.0 | | defect | **Have `bin/shell_command.py`'s `segments` keep a command's words together across a redirect, so `git > out commit` reads as one git commit.** | 1 | 1 | 3 | 3 | 2 | 1.1 by 6 | 8.4 | -| 162 | 0.3.0 | | owner | **Script each step that 0.2.0's chunks repeated by hand and a program can compute, filing one item per step, and file this audit again for the next release.** | 2 | 2 | 1 | 3 | 3 | 1.4 by 4, 1.5 by 4 | 7.8 | -| 175 | 0.3.0 | | | **Compare the first five chunks loop-claude starts with `chunk-preflight` against the five before them, and file an item where the preflight did not pay off.** | 1 | 2 | 1 | 2 | 2 | 1.4 by 3, 1.5 by 3 | 7.8 | -| 183 | 0.3.0 | | | **Merge the two 2026-10-13 paragraphs of `docs/decisions.md` → `loop-claude: a judge decides each interrupt …` into one.** | 1 | 1 | 1 | 1 | 1 | code health by 1 | 7.2 | -| 184 | 0.3.0 | | | **Rewrap the lines of `loop-claude --help` that run past the column the rest of it wraps at.** | 1 | 1 | 1 | 1 | 1 | code health by 1 | 7.2 | | 186 | 0.3.0 | | | **Point every file a session parks outside its checkout, such as the comprehension panel's detached worktree and a build probe's output, at a folder a headless session has, since loop-claude's sessions have no scratchpad.** | 1 | 2 | 2 | 3 | 2 | 1.1 by 3, 1.5 by 2 | 6.8 | | 198 | 0.3.0 | | decision | **Count, per finished chunk, the findings that arose from misreading code that had already shipped, so code health's counter-signal shows.** | 3 | 2 | 2 | 5 | 5 | code health by 3, 1.1 by 2 | 6.2 | +| 59 | 0.3.0 | | | **Bound a run of unfinished verdicts on one chunk, so a worker and judge that disagree cannot cycle unattended without end.** | 2 | 1 | 3 | 4 | 3 | 1.4 by 6 | 6.0 | | 167 | 0.3.0 | | | **Refuse a `/security-review` or `/claude-security` Skill call below the project's rung, as rule-hook refuses such an Agent call.** | 3 | 2 | 3 | 6 | 2 | 1.1 by 4 | 5.6 | -| 173 | 0.3.0 | | | **Have rule-hook's `todo-rank-check` run a worktree's own `bin/rank_todo.py` when the worktree is of this repo, so a branch that changes `todo.md`'s shape commits without an override.** | 2 | 1 | 3 | 4 | 2 | 1.1 by 2, 1.4 by 2 | 5.5 | -| 171 | 0.3.0 | | decision | **Group the routing figures' review rounds by the reviewers' rung as well as the worker's, so a call blames a rung only for rounds its own reviews raised.** | 3 | 2 | 2 | 5 | 4 | 1.2 by 3, 1.4 by 3 | 4.0 | -| 196 | 0.3.0 | | decision | **Replay the architecture, principles, overrides and product-owner passes with `review-replay` on Opus 5.5 projects, record each run in the review-replay routing decision, and add any rung a run qualifies to `REPLAYED`.** | 2 | 2 | 3 | 5 | 2 | 1.4 by 3 | 4.0 | -| 181 | 0.3.0 | | principle | **Have the test of a quoted answer's step-up assert the stepped rung's facts as literals, not through `prompts.rungs_held`.** | 1 | 1 | 1 | 1 | 1 | 1.1 by 2 | 3.4 | -| 192 | 0.3.0 | | principle | **Sort `.gitignore`'s allowlist block, from `!.claude/` to `!workflow-bench/test_review_git.py`, by code point, so rule-hook's `ignorefile-sorted` checks later edits to it again.** | 1 | 1 | 1 | 1 | 1 | 1.1 by 2 | 3.4 | -| 193 | 0.3.0 | | | **Narrow `readme_goals`'s mark to `Mark` by a typed lookup in place of `typing.cast`, so a mark added to the regex but not the lookup fails at run time, and one added to the lookup but not `Mark` fails mypy.** | 1 | 1 | 3 | 3 | 1 | 1.1 by 2 | 3.4 | -| 194 | 0.3.0 | | | **Make `test_waits_out_a_usage_limit_which_ends_a_run_of_failures` expect a usage-limit wait independent of the wall-clock time that passes during the run.** | 1 | 1 | 1 | 1 | 1 | 1.1 by 2 | 3.4 | +| 6 | 0.3.0 | | decision | **Move what `loop-claude` writes out of `~/.claude.json`, and ask the human about each write that must stay.** | 3 | 3 | 3 | 7 | 3 | 1.1 by 5 | 5.3 | +| 66 | 0.3.0 | | principle | **Hold systems-architect's method thresholds only while the comprehension panel finds the flagged code hard.** | 2 | 2 | 3 | 5 | 3 | 1.1 by 5 | 5.3 | +| 135 | 0.3.0 | | | **Fingerprint only the modules loop-claude imports, so editing another tool's code no longer reloads a running loop.** | 2 | 2 | 3 | 5 | 3 | 1.1 by 4 | 4.2 | | 202 | 0.3.0 | | | **Add `CLAUDE.md` → "Prose"'s rule "Write negations as people say them", with its examples, to `skills/larv-review/standards/prose.md`, so the prose reviewer holds prose to it.** | 1 | 2 | 2 | 3 | 1 | 1.1 by 2 | 3.4 | -| 187 | 0.3.0 | | | **Count the tokens a worker spends reading reviewers' reports, so goal 1.4's signal shows whether report files lowered what a review costs the worker's context.** | 2 | 2 | 1 | 3 | 3 | 1.4 by 3 | 3.0 | -| 165 | 0.3.0 | | | **Make this repo's tests assert the facts a prompt or help text carries in place of its sentences, and drop the tests that scan source or assert a constant.** | 3 | 2 | 1 | 4 | 5 | 1.1 by 4, 1.4 by 3 | 2.9 | +| 149 | 0.3.0 | | decision | **Fill each release by priority up to a capacity it states, in place of the bar, and move what does not fit to a later release.** | 4 | 2 | 3 | 7 | 5 | 1.1 by 7 | 3.0 | +| 151 | 0.3.0 | | decision | **Keep 10 to 20 settled decisions per project as its goals' test set, and rerun them after a goal changes.** | 3 | 2 | 2 | 5 | 5 | 1.2 by 7 | 2.9 | | 182 | 0.3.0 | | | **Let the human edit an interrupt's answer with the arrow keys, so Left moves the cursor instead of typing ^[[D into the answer.** | 2 | 2 | 1 | 3 | 2 | 1.1 by 2 | 2.8 | | 201 | 0.3.0 | | owner | **Save the human's tmux setups and restore them after a reboot, so work is up and running again quickly.** | 3 | 2 | 1 | 4 | 4 | 1.5 by 4 | 2.6 | -| 155 | 0.3.0 | | | **Lower the reading cost of the files a chunk reads most before its first commit.** | 3 | 2 | 2 | 5 | 5 | 1.4 by 6 | 2.4 | +| 5 | 0.3.0 | | decision | **Key a project on its checkout's full path, and refuse to start while another session uses that key.** | 4 | 2 | 3 | 7 | 5 | 1.1 by 6 | 2.5 | | 169 | 0.3.0 | | | **Have rule-hook's `todo-rank-check` catch a `todo.md` that the same Bash call edits and then commits.** | 3 | 1 | 3 | 5 | 3 | 1.1 by 2 | 2.1 | | 197 | 0.3.0 | | | **Let the human edit what they type at loop-claude's terminal questions with the arrow keys, so Left moves the cursor in place of printing `^[[D`.** | 1 | 2 | 3 | 4 | 1 | 1.5 by 1 | 1.5 | | 174 | 0.3.0 | | | **In a chunk no item routed, ask the worker to name each todo.md item it takes, with its L and E + I, so loop-claude can route on an item it takes in.** | 1 | 2 | 3 | 4 | 2 | 1.1 by 1 | 1.4 | +| 117 | 0.4.0 | | | **Give `todo_table.items` one way to say a plan has no items table, so no caller tells it from an empty plan by truthiness.** | 1 | 1 | 3 | 3 | 2 | code health by 4, 1.4 by 4 | 29.2 | +| 126 | 0.4.0 | | | **State when work has landed towards a release once, in `bin/larv_review/plan.py`, and have larv-review's help point to it.** | 1 | 2 | 1 | 2 | 2 | code health by 4, 1.4 by 4 | 29.2 | +| 131 | 0.4.0 | | | **Describe the transcript archive's layout in `bin/transcript_archive/`, which owns it, and have loop-claude's help point there.** | 1 | 2 | 1 | 2 | 2 | code health by 4, 1.4 by 4 | 29.2 | +| 133 | 0.4.0 | | | **Show, beside `bin/rule_hook/override_log.py`'s `this_chunks`, one example per case it decides: an amended or rebased commit, a renamed branch, and a commit on the default branch.** | 1 | 2 | 1 | 2 | 2 | code health by 4, 1.4 by 4 | 29.2 | +| 134 | 0.4.0 | | | **Name in `bin/shell_command.py`'s `segments` the shell forms it does not parse, so a caller knows what it misses.** | 1 | 2 | 1 | 2 | 2 | code health by 4, 1.4 by 4 | 29.2 | +| 157 | 0.4.0 | | | **Split `docs/decisions.md` → `todo.md: one table of items …`'s 2026-10-02 paragraph into one paragraph per choice.** | 1 | 2 | 1 | 2 | 2 | code health by 4, 1.4 by 4 | 29.2 | +| 80 | 0.4.0 | | defect | **State in README → Install that every machine taking this checkout must be a sandbox, as `settings.json`'s auto mode assumes.** | 1 | 2 | 1 | 2 | 1 | 2 by 4 | 28.7 | | 122 | 0.4.0 | | | **Assemble the judge's prompt in `bin/loop_claude/cycle/judge.py`, importing only wording the worker also sees, and call the worker "the worker" in it.** | 2 | 2 | 3 | 5 | 3 | code health by 5, 1.4 by 5 | 27.4 | | 130 | 0.4.0 | | | **Move the vote counting out of `bin/larv_review/ruling.py`'s `votes`, so reading a votes file decides nothing.** | 2 | 1 | 2 | 3 | 3 | code health by 4, 1.4 by 4 | 21.9 | -| 125 | 0.4.0 | | decision | **Give "record", "outcome" and "places" one meaning each across `bin/`, and rename `bin/larv_review/git.py` by what it holds.** | 3 | 1 | 3 | 5 | 5 | code health by 9, 1.4 by 9 | 19.7 | -| 137 | 0.4.0 | | | **Archive a chunk's route as a record loop-claude reads back field by field, in place of the `Worker:` prose `ROUTED` parses, and name `stepped` and the judge's `bundled` by what they do.** | 4 | 2 | 3 | 7 | 4 | code health by 4, 1.4 by 4 | 14.6 | -| 139 | 0.4.0 | | | **Split `bin/routing_figures/measure.py` by concern, and keep the figures' measured cycle and each raised call as fields loop-claude reads back, not as the prose it renders.** | 3 | 1 | 2 | 4 | 5 | code health by 5, 1.4 by 5 | 11.0 | -| 170 | 0.4.0 | | decision | **Re-tune `WORKER_STEPS` and `REVIEW_STEPS` once 10 chunks have shipped under them, from how well L, E and I order their review rounds and 🔴 findings.** | 2 | 2 | 3 | 5 | 2 | 1.1 by 3, 1.4 by 5 | 10.9 | -| 158 | 0.4.0 | | decision | **Measure the fixed cost of a chunk from loop-claude's archive, in tokens and hours against its items' S, and set F in `Score = 100 * V / (2**S + F)` to it.** | 2 | 2 | 1 | 3 | 3 | 1.1 by 5, 1.4 by 5 | 10.3 | -| 116 | 0.4.0 | | | **Report L by the share of chunks with a 🔴, once 10 chunks that each shipped one item record finding counts and most record no 🔴.** | 1 | 1 | 2 | 2 | 2 | 1.1 by 5 | 7.0 | -| 121 | 0.4.0 | | | **Check that `bin/round_titles.py`'s `PASSES` lists exactly the passes of larv-review §3's table.** | 1 | 1 | 1 | 1 | 2 | 1.1 by 5 | 7.0 | -| 113 | 0.4.0 | | | **Compute an item's S from the code it names, where it names any, and show it beside the finished items `score-outcomes` lists.** | 3 | 2 | 2 | 5 | 4 | 1.1 by 5, 1.4 by 5 | 6.8 | -| 112 | 0.4.0 | | | **Count an item as shipped only where its chunk built it, so an item a chunk dropped from the plan gets no outcome.** | 3 | 2 | 2 | 5 | 3 | 1.1 by 6 | 6.3 | -| 81 | 0.4.0 | | principle | **Have `workflow-bench/bench.py` return each run's failure as a value, so one failed clone does not hide the later runs' results.** | 1 | 2 | 1 | 2 | 2 | 1.1 by 4 | 5.6 | -| 102 | 0.4.0 | | | **Give loop-claude's retry delay an environment override, so the black-box test stops replacing `time.sleep` through `sitecustomize`.** | 1 | 1 | 2 | 2 | 2 | 1.1 by 4 | 5.6 | -| 66 | 0.4.0 | | principle | **Hold systems-architect's method thresholds only while the comprehension panel finds the flagged code hard.** | 2 | 2 | 3 | 5 | 3 | 1.1 by 5 | 5.3 | -| 101 | 0.4.0 | | principle | **Have `larv_review/record.py`'s `read_seats` take the time, the commit check and the history as inputs, so it parses and decides without effects.** | 2 | 1 | 2 | 3 | 3 | 1.1 by 5 | 5.3 | -| 111 | 0.4.0 | | | **Measure the chunks of a project that merges by squash or fast-forward, which `score-outcomes` skips today.** | 3 | 2 | 2 | 5 | 3 | 1.1 by 5 | 5.3 | -| 110 | 0.4.0 | | | **Count, for each finished chunk, the later changes that fixed code it wrote, and show them beside its guessed E.** | 3 | 2 | 2 | 5 | 5 | 1.1 by 6, 1.4 by 6 | 4.9 | -| 149 | 0.4.0 | | decision | **Fill each release by priority up to a capacity it states, in place of the bar, and move what does not fit to a later release.** | 4 | 2 | 3 | 7 | 5 | 1.1 by 7 | 3.0 | +| 176 | 0.4.0 | | | **Give `loop-claude --help`'s routing paragraph sub-headings, such as Routing, Judge rung and Routing figures, so a reader finds a rule without reading 39 lines.** | 1 | 2 | 1 | 2 | 2 | code health by 3, 1.4 by 2 | 20.6 | +| 1 | 0.5.0 | | question | **Say in README → Install how the transcript archive is backed up, once bender-infra backs up ai-sandbox's data volume.** | 1 | 2 | 1 | 2 | 1 | | 0.0 | +| 125 | 0.5.0 | | decision | **Give "record", "outcome" and "places" one meaning each across `bin/`, and rename `bin/larv_review/git.py` by what it holds.** | 3 | 1 | 3 | 5 | 5 | code health by 9, 1.4 by 9 | 19.7 | +| 172 | 0.5.0 | | | **Name the project's rung `project` across `bin/loop_claude`, in place of `anchor`, as `bin/model_routing/ladder.py` names it.** | 2 | 1 | 3 | 4 | 3 | code health by 3, 1.4 by 3 | 16.5 | +| 190 | 0.5.0 | | | **Rewrite the `docs/decisions.md` entries `todo.md: one table …` and `loop-claude: a judge decides …` as the current state, so a reader no longer replays superseded paragraphs to learn what holds.** | 2 | 2 | 1 | 3 | 3 | code health by 3, 1.4 by 2 | 15.5 | +| 82 | 0.5.0 | | principle | **Sort `AGENTS.md`'s decision titles and `docs/decisions.md`'s entries by title.** | 2 | 2 | 1 | 3 | 4 | code health by 4, 1.4 by 4 | 14.6 | +| 137 | 0.5.0 | | | **Archive a chunk's route as a record loop-claude reads back field by field, in place of the `Worker:` prose `ROUTED` parses, and name `stepped` and the judge's `bundled` by what they do.** | 4 | 2 | 3 | 7 | 4 | code health by 4, 1.4 by 4 | 14.6 | | 123 | 0.5.0 | | | **Have `bin/comprehension_history.py` parse each history entry once into seats, votes and places, so `latest_places`, `worse_places` and `worse_votes` neither depend on table order nor split a label to find a seat.** | 2 | 1 | 2 | 3 | 5 | code health by 5, 1.4 by 5 | 11.0 | | 124 | 0.5.0 | | decision | **Group the shared modules at `bin/`'s root into packages named by purpose, so the root holds only launchers and stand-alone tools.** | 4 | 1 | 3 | 6 | 6 | code health by 9, 1.4 by 9 | 11.0 | | 132 | 0.5.0 | | | **Lift each dimension still under the comprehension floor after release 0.2.0's scoring run, at the places that run names.** | 3 | 2 | 2 | 5 | 5 | code health by 5, 1.4 by 5 | 11.0 | +| 139 | 0.5.0 | | | **Split `bin/routing_figures/measure.py` by concern, and keep the figures' measured cycle and each raised call as fields loop-claude reads back, not as the prose it renders.** | 3 | 1 | 2 | 4 | 5 | code health by 5, 1.4 by 5 | 11.0 | +| 158 | 0.5.0 | | decision | **Measure the fixed cost of a chunk from loop-claude's archive, in tokens and hours against its items' S, and set F in `Score = 100 * V / (2**S + F)` to it.** | 2 | 2 | 1 | 3 | 3 | 1.1 by 5, 1.4 by 5 | 10.3 | +| 49 | 0.5.0 | | principle | **Check that `AGENTS.md` lists exactly the titles of `docs/decisions.md`.** | 1 | 1 | 1 | 1 | 2 | 1.1 by 6 | 8.4 | | 105 | 0.5.0 | | decision | **Compare review rounds per pass and reading cost for the five chunks before and after the `worker:` decision moved the principles out of the worker's context, and file an item if either rose.** | 1 | 2 | 1 | 2 | 2 | 1.4 by 6 | 8.0 | -| 59 | 0.5.0 | | | **Bound a run of unfinished verdicts on one chunk, so a worker and judge that disagree cannot cycle unattended without end.** | 2 | 1 | 3 | 4 | 3 | 1.4 by 6 | 6.0 | +| 162 | 0.5.0 | | owner | **Script each step that 0.2.0's chunks repeated by hand and a program can compute, filing one item per step, and file this audit again for the next release.** | 2 | 2 | 1 | 3 | 3 | 1.4 by 4, 1.5 by 4 | 7.8 | +| 175 | 0.5.0 | | | **Compare the first five chunks loop-claude starts with `chunk-preflight` against the five before them, and file an item where the preflight did not pay off.** | 1 | 2 | 1 | 2 | 2 | 1.4 by 3, 1.5 by 3 | 7.8 | +| 183 | 0.5.0 | | | **Merge the two 2026-10-13 paragraphs of `docs/decisions.md` → `loop-claude: a judge decides each interrupt …` into one.** | 1 | 1 | 1 | 1 | 1 | code health by 1 | 7.2 | +| 184 | 0.5.0 | | | **Rewrap the lines of `loop-claude --help` that run past the column the rest of it wraps at.** | 1 | 1 | 1 | 1 | 1 | code health by 1 | 7.2 | +| 116 | 0.5.0 | | | **Report L by the share of chunks with a 🔴, once 10 chunks that each shipped one item record finding counts and most record no 🔴.** | 1 | 1 | 2 | 2 | 2 | 1.1 by 5 | 7.0 | +| 121 | 0.5.0 | | | **Check that `bin/round_titles.py`'s `PASSES` lists exactly the passes of larv-review §3's table.** | 1 | 1 | 1 | 1 | 2 | 1.1 by 5 | 7.0 | +| 113 | 0.5.0 | | | **Compute an item's S from the code it names, where it names any, and show it beside the finished items `score-outcomes` lists.** | 3 | 2 | 2 | 5 | 4 | 1.1 by 5, 1.4 by 5 | 6.8 | +| 112 | 0.5.0 | | | **Count an item as shipped only where its chunk built it, so an item a chunk dropped from the plan gets no outcome.** | 3 | 2 | 2 | 5 | 3 | 1.1 by 6 | 6.3 | +| 81 | 0.5.0 | | principle | **Have `workflow-bench/bench.py` return each run's failure as a value, so one failed clone does not hide the later runs' results.** | 1 | 2 | 1 | 2 | 2 | 1.1 by 4 | 5.6 | +| 102 | 0.5.0 | | | **Give loop-claude's retry delay an environment override, so the black-box test stops replacing `time.sleep` through `sitecustomize`.** | 1 | 1 | 2 | 2 | 2 | 1.1 by 4 | 5.6 | +| 173 | 0.5.0 | | | **Have rule-hook's `todo-rank-check` run a worktree's own `bin/rank_todo.py` when the worktree is of this repo, so a branch that changes `todo.md`'s shape commits without an override.** | 2 | 1 | 3 | 4 | 2 | 1.1 by 2, 1.4 by 2 | 5.5 | +| 101 | 0.5.0 | | principle | **Have `larv_review/record.py`'s `read_seats` take the time, the commit check and the history as inputs, so it parses and decides without effects.** | 2 | 1 | 2 | 3 | 3 | 1.1 by 5 | 5.3 | +| 111 | 0.5.0 | | | **Measure the chunks of a project that merges by squash or fast-forward, which `score-outcomes` skips today.** | 3 | 2 | 2 | 5 | 3 | 1.1 by 5 | 5.3 | +| 110 | 0.5.0 | | | **Count, for each finished chunk, the later changes that fixed code it wrote, and show them beside its guessed E.** | 3 | 2 | 2 | 5 | 5 | 1.1 by 6, 1.4 by 6 | 4.9 | | 12 | 0.5.0 | | | **Run the test suite in CI on every PR, or record in `docs/decisions.md` why the local run is enough.** | 3 | 2 | 1 | 4 | 4 | 1.1 by 6 | 4.2 | -| 135 | 0.5.0 | | | **Fingerprint only the modules loop-claude imports, so editing another tool's code no longer reloads a running loop.** | 2 | 2 | 3 | 5 | 3 | 1.1 by 4 | 4.2 | +| 171 | 0.5.0 | | decision | **Group the routing figures' review rounds by the reviewers' rung as well as the worker's, so a call blames a rung only for rounds its own reviews raised.** | 3 | 2 | 2 | 5 | 4 | 1.2 by 3, 1.4 by 3 | 4.0 | +| 196 | 0.5.0 | | decision | **Replay the architecture, principles, overrides and product-owner passes with `review-replay` on Opus 5.5 projects, record each run in the review-replay routing decision, and add any rung a run qualifies to `REPLAYED`.** | 2 | 2 | 3 | 5 | 2 | 1.4 by 3 | 4.0 | | 68 | 0.5.0 | | principle | **Test `workflow-bench/compare.py`'s blinding and `bench.py`'s run plan.** | 2 | 1 | 1 | 2 | 4 | 1.1 by 5 | 3.5 | +| 181 | 0.5.0 | | principle | **Have the test of a quoted answer's step-up assert the stepped rung's facts as literals, not through `prompts.rungs_held`.** | 1 | 1 | 1 | 1 | 1 | 1.1 by 2 | 3.4 | +| 192 | 0.5.0 | | principle | **Sort `.gitignore`'s allowlist block, from `!.claude/` to `!workflow-bench/test_review_git.py`, by code point, so rule-hook's `ignorefile-sorted` checks later edits to it again.** | 1 | 1 | 1 | 1 | 1 | 1.1 by 2 | 3.4 | +| 193 | 0.5.0 | | | **Narrow `readme_goals`'s mark to `Mark` by a typed lookup in place of `typing.cast`, so a mark added to the regex but not the lookup fails at run time, and one added to the lookup but not `Mark` fails mypy.** | 1 | 1 | 3 | 3 | 1 | 1.1 by 2 | 3.4 | +| 194 | 0.5.0 | | | **Make `test_waits_out_a_usage_limit_which_ends_a_run_of_failures` expect a usage-limit wait independent of the wall-clock time that passes during the run.** | 1 | 1 | 1 | 1 | 1 | 1.1 by 2 | 3.4 | +| 77 | 0.5.0 | | | **Teach `bin/metric-bench` Go and TypeScript, rerun it once two projects' comprehension histories name places, and bring into review only a metric that tracks the panel.** | 4 | 2 | 1 | 5 | 6 | 1.1 by 7, 1.4 by 7 | 3.2 | | 4 | 0.5.0 | | | **Name each chunk's archive folder by the chunk's start time, so `/` lists chunks in the order they ran.** | 3 | 2 | 3 | 6 | 3 | 1.1 by 3 | 3.2 | +| 187 | 0.5.0 | | | **Count the tokens a worker spends reading reviewers' reports, so goal 1.4's signal shows whether report files lowered what a review costs the worker's context.** | 2 | 2 | 1 | 3 | 3 | 1.4 by 3 | 3.0 | +| 165 | 0.5.0 | | | **Make this repo's tests assert the facts a prompt or help text carries in place of its sentences, and drop the tests that scan source or assert a constant.** | 3 | 2 | 1 | 4 | 5 | 1.1 by 4, 1.4 by 3 | 2.9 | | 156 | 0.5.0 | | decision | **Drop `rank_todo.py`'s ranking of an old-shape table once no project under `~/code` holds one.** | 2 | 1 | 3 | 4 | 4 | 1.1 by 4 | 2.8 | -| 1 | 0.6.0 | | question | **Say in README → Install how the transcript archive is backed up, once bender-infra backs up ai-sandbox's data volume.** | 1 | 2 | 1 | 2 | 1 | | 0.0 | -| 6 | 0.6.0 | | decision | **Move what `loop-claude` writes out of `~/.claude.json`, and ask the human about each write that must stay.** | 3 | 3 | 3 | 7 | 3 | 1.1 by 5 | 5.3 | -| 77 | 0.6.0 | | | **Teach `bin/metric-bench` Go and TypeScript, rerun it once two projects' comprehension histories name places, and bring into review only a metric that tracks the panel.** | 4 | 2 | 1 | 5 | 6 | 1.1 by 7, 1.4 by 7 | 3.2 | -| 151 | 0.6.0 | | decision | **Keep 10 to 20 settled decisions per project as its goals' test set, and rerun them after a goal changes.** | 3 | 2 | 2 | 5 | 5 | 1.2 by 7 | 2.9 | -| 5 | 0.6.0 | | decision | **Key a project on its checkout's full path, and refuse to start while another session uses that key.** | 4 | 2 | 3 | 7 | 5 | 1.1 by 6 | 2.5 | -| 51 | 0.6.0 | | principle | **Hand loop-claude's terminal output to an injected effect, so no storage or retry function prints.** | 2 | 1 | 3 | 4 | 5 | 1.1 by 5 | 2.1 | -| 52 | 0.6.0 | | principle | **Record why this checkout lives in Claude Code's own directory, or move it out and link it in.** | 4 | 3 | 4 | 9 | 6 | 1.1 by 4 | 0.9 | +| 155 | 0.5.0 | | | **Lower the reading cost of the files a chunk reads most before its first commit.** | 3 | 2 | 2 | 5 | 5 | 1.4 by 6 | 2.4 | +| 51 | 0.5.0 | | principle | **Hand loop-claude's terminal output to an injected effect, so no storage or retry function prints.** | 2 | 1 | 3 | 4 | 5 | 1.1 by 5 | 2.1 | +| 52 | 0.5.0 | | principle | **Record why this checkout lives in Claude Code's own directory, or move it out and link it in.** | 4 | 3 | 4 | 9 | 6 | 1.1 by 4 | 0.9 | ## Details @@ -113,6 +113,110 @@ Shape is the lowest dimension, so this item moves code health by 9, per `docs/de The comprehension seats on PR #254 found five git runners with different contracts: `git_repo.git`, `rule_hook/git.py`'s guarded one, `metric_bench/main.py`'s, `reading_cost/main.py`'s `located` and `loop_claude/effects.py`'s. PR #276 added a sixth, `review_replay/main.py`'s `git`. The inherited architect of PR #257's scoring run named `bin/git_repo.py:8` `git` again. Make `git_repo.git` easier to read. +### 120. Rewrite larv-review §3's "Round cap" and "Re-entry" as one table that says, for each kind of fix, which passes rerun and what a round reviews. + +Junior A, Mid A and the maintainability senior of PR #257's scoring run named `skills/larv-review/SKILL.md:63` "Round cap" hardest, two of them with `:74` "Re-entry"; the inherited architect named `:71` "Cap". A reader holds the trigger table's "a fix, only where …" clauses, the cap, later rounds' scope and the prose, 🟢 and ❓ exceptions at once. Junior A could not say what a fix to a stability 🟡 that also touches a comment reruns. Make those sections easier to read. + +### 21. Give `settings.json`'s model one writer, and sort its keys. + +A defect: goal 2, keeping the setup shareable between computers, does not hold while one machine's model choice overwrites every other's. Claude Code rewrites `"model"` in this tracked file whenever a model is picked, so one `/model` dirties the checkout and overrides the synced choice. + +Every write Claude Code makes to the file rewrites `"model"`, `claude plugin install` included: Claude Code 2.1.288 turned `"opus"` into `"opus[1m]"`. Each write also puts the keys back in Claude Code's own order, so a sorted file stays sorted only until the next write. + +### 29. Make the contributor a standing member of every project's audience, unless its README voids code health. + +State that in `~/.claude/rules/goals-and-audience.md` → "Goals and Audience", and have larv-review's comprehension check name the contributor as the reader it serves. The `**Void:** code health` line (`~/.claude/CLAUDE.md` → "Shared goal") is the one place a project says maintainability does not matter: it drops the contributor. A project that opts out of the comprehension check must already write that line. + +### 199. Start loop-claude's worker with `ScheduleWakeup` disallowed, so a worker that ends its turn on a question exits and the judge runs. + +Claude Code's `ScheduleWakeup` tool resumes a session after a delay. While a wakeup is pending, the worker's `claude -p` keeps running after its turn ends. loop-claude acts only once the worker exits, so it neither runs the judge nor interrupts the human, and the chunk stalls. Seen on 2026-10-18 in another project, session `678cac80`: the worker asked the human to approve a fourth round of the stability pass, then scheduled a 30-minute wakeup, and another each time one fired, until someone killed the worker. A worker doesn't need a wakeup: larv-review already has it wait on reviewers and CI in the foreground. Add `--disallowedTools ScheduleWakeup` to `bin/loop_claude/cycle/worker.py`'s `worker_args`, with a test asserting the flag. Correct `skills/larv-review/SKILL.md`'s opening paragraph, which says a scheduled wakeup dies with a headless run. + +### 170. Re-tune `WORKER_STEPS` and `REVIEW_STEPS` once 10 chunks have shipped under them, from how well L, E and I order their review rounds and 🔴 findings. + +`docs/decisions.md` → `routing: one ladder…` calls the steps lilleman approved on 2026-10-16 a first guess. Once 10 chunks that each shipped one item scored with L, E and I have merged, read `score-outcomes`' rank correlations for L, E and I and the routed-chunks table of `routing-figures.md`, and propose new steps to lilleman, whose call they are. + +### 106. Make larv-review's "Do not over-read a clean result" cite a rule that says Renovate or Dependabot owns dependency CVEs, or drop the citation. + +Found by the goals audit of PR #245. `skills/larv-review/SKILL.md` §3 → "Security" says Renovate or Dependabot owns dependency CVEs per `CLAUDE.md` → "Working with the codebase", which says nothing about either. + +### 154. Have `bin/shell_command.py`'s `segments` keep a command's words together across a redirect, so `git > out commit` reads as one git commit. + +`segments('echo hi > f arg')` returns `arg` as a command of its own, and `segments('git > /tmp/x commit -m hi')` returns `git` and `commit -m hi` apart, though the shell runs one `git commit`. rule-hook's commit rules read the commands `segments` finds, so such a commit escapes `commit-one-line`, `no-ai-attribution`, `round-title-counts` and `todo-rank-check`. The comprehension seats' scoring run in PR #280 found it. + +### 186. Point every file a session parks outside its checkout, such as the comprehension panel's detached worktree and a build probe's output, at a folder a headless session has, since loop-claude's sessions have no scratchpad. + +`skills/comprehension-panel/SKILL.md` puts the base version's detached worktree "in your scratchpad", and `CLAUDE.md` → "Working with the codebase" lets a build-probing subagent write "only to the session scratchpad". A probe on 2026-10-18 found no `scratchpad_dir` in a headless `claude -p` session's hook input, and neither the session nor its subagent knew a scratchpad path. larv-review now parks its reports and votes file in the chunk's review folder under `~/.local/state/larv-review/`, per `docs/decisions.md` → `review: each reviewer under agents/ writes its full report into the chunk's review folder`. Found by the architecture review of PR #310. + +### 198. Count, per finished chunk, the findings that arose from misreading code that had already shipped, so code health's counter-signal shows. + +Code health's counter-signal (`CLAUDE.md` → "Shared goal") has no count, since no tool records why a finding arose. Have each reviewer tag a finding that arose because the implementer misread code that had already shipped, and have `score-outcomes` count the tagged findings per finished chunk. Item 110's later fixes stand for the defects that keep reappearing. + +### 59. Bound a run of unfinished verdicts on one chunk, so a worker and judge that disagree cannot cycle unattended without end. + +Raised by the product-owner review of PR #211. The resumed worker gets the judge's quote of the work remaining, but a worker that still thinks the chunk done can answer each cycle the same way, and each cycle costs a worker and a judge run (goal 1.4). + +### 167. Refuse a `/security-review` or `/claude-security` Skill call below the project's rung, as rule-hook refuses such an Agent call. + +rule-hook checks Agent calls (item 163) but no Skill calls. A worker that invokes `/security-review` in its own context, instead of in a subagent, runs the pass on its own rung, and nothing blocks it. Check Skill calls too: `breaches_of` in bin/rule_hook/main.py takes a Skill call whose skill is `security-review` or `claude-security` as a review launch, and settings.json's PreToolUse matcher gains Skill. Found by the systems-architect's review of PR #295. + +### 6. Move what `loop-claude` writes out of `~/.claude.json`, and ask the human about each write that must stay. + +Claude Code owns that file and writes it. `trust` reads it, changes it and writes it back, so a write that lands in between is lost. + +### 66. Hold systems-architect's method thresholds only while the comprehension panel finds the flagged code hard. + +KISS, in `principles/technical-principles.md`, which keeps a limit only while readers find the flagged code hard. `agents/systems-architect.md` makes cyclomatic 7 and 24 lines gate rules from the first commit, a 🔴 unless a reason is stated. + +### 135. Fingerprint only the modules loop-claude imports, so editing another tool's code no longer reloads a running loop. + +The maintainability senior and the inherited architect of PR #257's scoring run named `bin/loop_claude/loop/reload.py:38` `fingerprint` and `:50` `exec_if_edited`: the fingerprint covers every `bin/**/*.py`, so editing `statusline.py` or `rank_todo.py` re-execs a running loop. Make `fingerprint` easier to read. + +### 202. Add `CLAUDE.md` → "Prose"'s rule "Write negations as people say them", with its examples, to `skills/larv-review/standards/prose.md`, so the prose reviewer holds prose to it. + +Found by the prose review of PR #329. `prose.md` opens by calling itself the full rules that `CLAUDE.md` → "Prose" keeps a core of, yet it lacks that rule, so a prose reviewer whose bar is the standards files never sees it. + +### 149. Fill each release by priority up to a capacity it states, in place of the bar, and move what does not fit to a later release. + +A release's capacity is a sum of its items' cost, as the formula counts it. Each project states its own; the human sets the first value per project. Nothing is deleted by score. + +### 151. Keep 10 to 20 settled decisions per project as its goals' test set, and rerun them after a goal changes. + +Each case is a question the project settled and the answer it chose. A fresh-context agent given only the README's premises answers each case; a case it answers differently says the goals no longer decide it. Written guidance can fail to change behaviour, which is why the goals get a test. + +### 182. Let the human edit an interrupt's answer with the arrow keys, so Left moves the cursor instead of typing ^[[D into the answer. + +`bin/loop_claude/cycle/interrupt.py`'s `put_question` reads the answer with `input()`, and nothing under `bin/` imports `readline`, so Left types `^[[D` into the answer the worker gets. Importing `readline` gives line editing, at two costs. It writes the prompt to stdout, not stderr. And its bracketed paste can return several lines, while `prompts.typed_answer` ends the answer at its first blank line and shows the judge the rest as loop-claude's words. Raised by the product-owner review of PR #308. + +### 201. Save the human's tmux setups and restore them after a reboot, so work is up and running again quickly. + +The human asked on 2026-10-21 for tmux support, above all for saving tmux setups. Don't build anything until the human has said exactly what they need. Ask them at least: + +- What a setup holds, such as sessions, windows, panes, each pane's working directory and the command running in it, like one `loop-claude` per project. +- When a setup is saved: on demand or on its own. +- How a setup comes back after a reboot. +- Whether the code that saves and restores setups must work on every machine that takes this checkout (goal 2), which decides whether that code lives in this repo. +- What else tmux support should cover. + +Weigh the widely used tmux-resurrect and tmux-continuum plugins against a script of our own. Then re-score this item from the answers and that choice, and split it into items where it is more than one chunk. + +### 5. Key a project on its checkout's full path, and refuse to start while another session uses that key. + +The key names the project's session, archive folder and models entry. `project_key` drops the leading `/`, so `~/code/a` and `/a` share all three, and one loop can resume or delete the other's session. + +`bin/reading-cost` keys the archive by the main checkout, the parent of git's common dir, since it runs in a chunk's worktree; `loop-claude` keys it by `--show-toplevel`, so a loop started inside a worktree archives where `reading-cost` never looks. Derive both keys one way. + +### 169. Have rule-hook's `todo-rank-check` catch a `todo.md` that the same Bash call edits and then commits. + +The hook judges a call before it runs, and `changed` in `bin/rule_hook/todo_check.py` compares `todo.md` with the index and HEAD as they stand then. A call that edits `todo.md` and commits it, such as a heredoc script followed by `git commit`, passes unchecked: PR #296's commit 149108e did, and the override marker it carried was never logged. larv-review's gate still runs `rank_todo.py --check`, so an unranked plan stops at merge rather than at commit. A git pre-commit hook would see the staged file. + +### 197. Let the human edit what they type at loop-claude's terminal questions with the arrow keys, so Left moves the cursor in place of printing `^[[D`. + +`bin/loop_claude/effects.py` reads each answer with Python's builtin `input`, and nothing imports `readline`, so the terminal gets no line editing: fixing a typo means erasing back to it. Importing `readline` in `effects.py` gives `input` that editing, for the interrupt's answer and the question that asks for the project's model alike. lilleman, 2026-10-18: "Not super-important, but a bit irritating." + +### 174. In a chunk no item routed, ask the worker to name each todo.md item it takes, with its L and E + I, so loop-claude can route on an item it takes in. + +The principles pass of PR #301 found that only `routed_by` in `bin/loop_claude/cycle/prompts.py` asks the worker to name each item it takes with its L and E + I, and `fresh` uses it only where an item routed the chunk. In an unrouted chunk the judge has no levels to report, so neither the taken-in L nor the taken-in E + I lifts the worker, the reviewers or the judge, and the first prompt names no reviewers' rung for a higher E + I. + ### 117. Give `todo_table.items` one way to say a plan has no items table, so no caller tells it from an empty plan by truthiness. The comprehension seats on PR #254 found `items` returning a list, None or a Failure, and `larv_review/plan.py` `plan_reasons` reading None through `items(before) or []`, which works only because a Failure is truthy. @@ -141,20 +245,32 @@ Raised by PR #283's prose pass. The paragraph runs about 330 words and holds six A defect: goal 2, keeping the setup shareable between computers, does not hold while a new machine is never told it must be a sandbox. Raised by the principles audit of PR #224. The `settings.json` decision is valid while every machine taking this checkout is a sandbox, but Install asks for a sandbox only for `loop-claude`. -### 120. Rewrite larv-review §3's "Round cap" and "Re-entry" as one table that says, for each kind of fix, which passes rerun and what a round reviews. +### 122. Assemble the judge's prompt in `bin/loop_claude/cycle/judge.py`, importing only wording the worker also sees, and call the worker "the worker" in it. -Junior A, Mid A and the maintainability senior of PR #257's scoring run named `skills/larv-review/SKILL.md:63` "Round cap" hardest, two of them with `:74` "Re-entry"; the inherited architect named `:71` "Cap". A reader holds the trigger table's "a fix, only where …" clauses, the cap, later rounds' scope and the prose, 🟢 and ❓ exceptions at once. Junior A could not say what a fix to a stability 🟡 that also touches a comment reruns. Make those sections easier to read. +All four seats of PR #257's scoring run named `bin/loop_claude/cycle/judge.py:16` `JUDGE_RULES`. The prompt is spliced from constants in `cycle/prompts.py` (`ANSWER_DESTINATIONS`, `ANSWERS_RECORDED`, `either`) and `project/records.py` (`HUMAN_RULE_NAMES`), so a reader rebuilds it from three files. It says "the agent" where the code and `CLAUDE.md` → "Vocabulary" say "worker". Wording the worker also sees, such as `ANSWER_DESTINATIONS` in `prompts.resumed`, may stay in `cycle/prompts.py`. Make `JUDGE_RULES` easier to read. -### 21. Give `settings.json`'s model one writer, and sort its keys. +### 130. Move the vote counting out of `bin/larv_review/ruling.py`'s `votes`, so reading a votes file decides nothing. -A defect: goal 2, keeping the setup shareable between computers, does not hold while one machine's model choice overwrites every other's. Claude Code rewrites `"model"` in this tracked file whenever a model is picked, so one `/model` dirties the checkout and overrides the synced choice. - -Every write Claude Code makes to the file rewrites `"model"`, `claude plugin install` included: Claude Code 2.1.288 turned `"opus"` into `"opus[1m]"`. Each write also puts the keys back in Claude Code's own order, so a sorted file stays sorted only until the next write. +Mid A of PR #257's scoring run named `bin/larv_review/ruling.py:8` `votes`. It calls `counted` while validating, to reject the maintainability senior's and Junior A's lines when Mid A and the inherited architect already agree overall: a ruling hidden in a parser. The counting rule is spread over `seats.py`, `ruling.py`, `comprehension_history.place_dimensions` and the help. Make `votes` easier to read. ### 176. Give `loop-claude --help`'s routing paragraph sub-headings, such as Routing, Judge rung and Routing figures, so a reader finds a rule without reading 39 lines. Raised by the prose pass of PR #302: the help, the docstring of `bin/loop_claude/loop/main.py`, is 145 lines, and its routing paragraph one block of 39, from the ladder through the judge's rung to the routing figures. A reader looking for one rule, such as when the worker steps up, reads it all. The comprehension seats already found the help hard (`larv-review places`: "loop-claude --help": a 120-line contract with no pointers to the modules it maps onto). +### 1. Say in README → Install how the transcript archive is backed up, once bender-infra backs up ai-sandbox's data volume. + +It lives under `~/.claude`, which `.gitignore` keeps from the remote, so a lost disk loses every unattended run's record. Back it up only to a destination private to me and encrypted at rest: the worker runs with permissions bypassed, so the archived tool results can hold credentials it read. + +2026-10-02, the human: ai-sandbox is the VM `loop-claude` will run on, hosted on the server bender. bender-infra, the infrastructure-as-code project that manages bender, will back up ai-sandbox's data volume once ai-sandbox is rebuilt. The item waits for the human to say the rebuild has landed; do not remind them. Before writing the README line, check that `~/.claude` lives on that volume and that the backup is private and encrypted at rest. + +The README line covers the bench's transcripts in `workflow-bench/logs/` too (goal 3). + +### 125. Give "record", "outcome" and "places" one meaning each across `bin/`, and rename `bin/larv_review/git.py` by what it holds. + +Shape is the lowest dimension, so this item moves code health by 9, per `docs/decisions.md` → `larv-review: a project lifting itself to the comprehension floor starts at the lowest dimension`. + +The inherited architect of PR #257's scoring run named `bin/reading_cost/measure.py:16` `Reading` and `bin/larv_review/git.py:6` `history_changes`, and found each word used for several concepts. "Record": the history writer `larv_review/record.py`, the judge's `loop_claude/project/records.py`, and `reading_cost/figures.py`'s `RECORD`. "Outcome": `transcript_archive/outcomes.py`, `score_outcomes/outcomes.py` `Outcome` and `rule_hook/rules.py` `Outcome`. "Places": `comprehension_history.Place` and `Reading.places`. `larv_review/git.py` holds history logic, not a git runner. Make `Reading` and `history_changes` easier to read. + ### 172. Name the project's rung `project` across `bin/loop_claude`, in place of `anchor`, as `bin/model_routing/ladder.py` names it. The architecture pass of PR #296 found one rung under two names: `bin/model_routing/ladder.py` calls it `project`, while `bin/loop_claude/routing.py`, `cycle/prompts.py`, `cycle/run.py`'s `Cycle.anchor` and `loop/main.py` call it `anchor`, and gloss it as "anchor, the project's rung" in docstring after docstring. A reader works out that the two are one rung each time. Make `bin/loop_claude/routing.py`'s `first_route` easier to read. @@ -167,25 +283,39 @@ Found by the prose review of PR #312, which judged both entries to read as amend "Deterministic order", in `principles/technical-principles.md`, raised by the principles audit of PR #224: their order carries no meaning, so two chunks adding a decision conflict at the end, and a reader cannot find a title by scanning. -### 29. Make the contributor a standing member of every project's audience, unless its README voids code health. +### 137. Archive a chunk's route as a record loop-claude reads back field by field, in place of the `Worker:` prose `ROUTED` parses, and name `stepped` and the judge's `bundled` by what they do. -State that in `~/.claude/rules/goals-and-audience.md` → "Goals and Audience", and have larv-review's comprehension check name the contributor as the reader it serves. The `**Void:** code health` line (`~/.claude/CLAUDE.md` → "Shared goal") is the one place a project says maintainability does not matter: it drops the contributor. A project that opts out of the comprehension check must already write that line. +PR #262's paired ruling found the project reads worse: a rerun resumes on its rung only by parsing `Rung.__str__`'s and `Route.__str__`'s wording back with `bin/loop_claude/routing.py`'s `ROUTED`, a string contract over four files, where a reword silently routes afresh. Write the route as a structured line, such as JSON after `Worker:`, that `transcript_archive` reads into fields. `stepped` both raises to a bundled item's rung and counts towards a one-rung step; `Reply.bundled` names neither L nor highest. Make `bin/loop_claude/loop/main.py`'s `run_loop` easier to read where it threads the route. The structured line must keep the escalation's mark, archived today as `escalated at transcript entry N`: without it, a trigger that already stepped the worker could step it again. -### 199. Start loop-claude's worker with `ScheduleWakeup` disallowed, so a worker that ends its turn on a question exits and the judge runs. +### 123. Have `bin/comprehension_history.py` parse each history entry once into seats, votes and places, so `latest_places`, `worse_places` and `worse_votes` neither depend on table order nor split a label to find a seat. -Claude Code's `ScheduleWakeup` tool resumes a session after a delay. While a wakeup is pending, the worker's `claude -p` keeps running after its turn ends. loop-claude acts only once the worker exits, so it neither runs the judge nor interrupts the human, and the chunk stalls. Seen on 2026-10-18 in another project, session `678cac80`: the worker asked the human to approve a fourth round of the stability pass, then scheduled a 30-minute wakeup, and another each time one fired, until someone killed the worker. A worker doesn't need a wakeup: larv-review already has it wait on reviewers and CI in the foreground. Add `--disallowedTools ScheduleWakeup` to `bin/loop_claude/cycle/worker.py`'s `worker_args`, with a test asserting the flag. Correct `skills/larv-review/SKILL.md`'s opening paragraph, which says a scheduled wakeup dies with a headless run. +Three seats of PR #257's scoring run named `bin/comprehension_history.py:106` `latest_places`; the logic it rests on is `:114` `worse_places` and `:126` `worse_votes`. They regex the markdown the module writes. `worse_votes` keeps a seat's first row through `setdefault`, because the votes table comes first. `worse_places` recovers the seat with `label.split(",")[0]`. `Entry` still holds scoring seats' places for rulings recorded before PR #255. Make these functions easier to read. -### 106. Make larv-review's "Do not over-read a clean result" cite a rule that says Renovate or Dependabot owns dependency CVEs, or drop the citation. +### 124. Group the shared modules at `bin/`'s root into packages named by purpose, so the root holds only launchers and stand-alone tools. -Found by the goals audit of PR #245. `skills/larv-review/SKILL.md` §3 → "Security" says Renovate or Dependabot owns dependency CVEs per `CLAUDE.md` → "Working with the codebase", which says nothing about either. +Shape is the lowest dimension, so this item moves code health by 9, per `docs/decisions.md` → `larv-review: a project lifting itself to the comprehension floor starts at the lowest dimension`. + +PR #257's scoring run put Shape at 6.25, the lowest dimension. `bin/` holds about 30 entries: 6 launchers, 6 tool packages, 3 shared packages and 15 root modules. Two root modules are tools (`rank_todo.py`, `statusline.py`) and 13 are shared libraries, and nothing in the layout tells them apart; only README's import-root paragraph maps them. Candidate packages: git running and parsing, the todo table with `rank_todo.py`'s formula language and goal weighing, and the comprehension history with round titles. `rank_todo.py` keeps its path, which every project's rules name. The `.gitignore` allowlist and README follow the move. + +### 132. Lift each dimension still under the comprehension floor after release 0.2.0's scoring run, at the places that run names. + +Replaces item 62, which release 0.3.0's items split. PR #257's scoring run put Locality and Self-sufficiency at 6.63, Shape at 6.25 and the overall at 6.50, against the floor of 7.0 in `docs/decisions.md` → `comprehension floor: …`. Split this into items, one per place, once 0.3.0's scoring run has named them. + +### 139. Split `bin/routing_figures/measure.py` by concern, and keep the figures' measured cycle and each raised call as fields loop-claude reads back, not as the prose it renders. + +The paired ruling on PR #265 ruled worse. Make these places easier to read: `measure.py` `measured` and `render` (token attribution, subagent rungs, round counting, calls and rendering in one module; `measured`, `Measured` and `measure_archive` side by side); `calls` with `archive.py` `raised` and `last_measured`, where a call's identity is its sentence and the measured cycle is read back from rendered markdown; and `Reports.searches`, which holds characters, not searches. + +### 158. Measure the fixed cost of a chunk from loop-claude's archive, in tokens and hours against its items' S, and set F in `Score = 100 * V / (2**S + F)` to it. + +F is 8 until then, about one S 3 change, lilleman's call in PR #283. A chunk costs more than its size: the worker reads about 130k tokens before its first commit whatever the item, and every chunk takes its review passes. Fit cost against 2**S from the finished chunks `score-outcomes` measures, in the same units `2**S` counts, and say in `docs/decisions.md` → `todo.md: …` how far the fit holds. A chunk bundling tiny items shares F between them. ### 49. Check that `AGENTS.md` lists exactly the titles of `docs/decisions.md`. DRY, in `principles/technical-principles.md`: the list is copied by hand, and sessions work from the copy. -### 154. Have `bin/shell_command.py`'s `segments` keep a command's words together across a redirect, so `git > out commit` reads as one git commit. +### 105. Compare review rounds per pass and reading cost for the five chunks before and after the `worker:` decision moved the principles out of the worker's context, and file an item if either rose. -`segments('echo hi > f arg')` returns `arg` as a command of its own, and `segments('git > /tmp/x commit -m hi')` returns `git` and `commit -m hi` apart, though the shell runs one `git commit`. rule-hook's commit rules read the commands `segments` finds, so such a commit escapes `commit-one-line`, `no-ai-attribution`, `round-title-counts` and `todo-rank-check`. The comprehension seats' scoring run in PR #280 found it. +The `worker:` decision is valid while review rounds per pass do not rise. Count the rounds from each PR's `Answer round :` commits, and take reading cost from `docs/reading-cost.md`. Run it once five chunks have merged after the one that recorded the decision. ### 162. Script each step that 0.2.0's chunks repeated by hand and a program can compute, filing one item per step, and file this audit again for the next release. @@ -205,120 +335,6 @@ They say the same thing for `~/.claude/rules/` (item 95) and `~/.claude/skills/l In `bin/loop_claude/loop/main.py`'s docstring, the line holding "of one PR, is finished" and the one ending "Each of these opens with its UTC time." run to 107 and 159 columns. Raised by the prose review of PR #308. -### 186. Point every file a session parks outside its checkout, such as the comprehension panel's detached worktree and a build probe's output, at a folder a headless session has, since loop-claude's sessions have no scratchpad. - -`skills/comprehension-panel/SKILL.md` puts the base version's detached worktree "in your scratchpad", and `CLAUDE.md` → "Working with the codebase" lets a build-probing subagent write "only to the session scratchpad". A probe on 2026-10-18 found no `scratchpad_dir` in a headless `claude -p` session's hook input, and neither the session nor its subagent knew a scratchpad path. larv-review now parks its reports and votes file in the chunk's review folder under `~/.local/state/larv-review/`, per `docs/decisions.md` → `review: each reviewer under agents/ writes its full report into the chunk's review folder`. Found by the architecture review of PR #310. - -### 198. Count, per finished chunk, the findings that arose from misreading code that had already shipped, so code health's counter-signal shows. - -Code health's counter-signal (`CLAUDE.md` → "Shared goal") has no count, since no tool records why a finding arose. Have each reviewer tag a finding that arose because the implementer misread code that had already shipped, and have `score-outcomes` count the tagged findings per finished chunk. Item 110's later fixes stand for the defects that keep reappearing. - -### 167. Refuse a `/security-review` or `/claude-security` Skill call below the project's rung, as rule-hook refuses such an Agent call. - -rule-hook checks Agent calls (item 163) but no Skill calls. A worker that invokes `/security-review` in its own context, instead of in a subagent, runs the pass on its own rung, and nothing blocks it. Check Skill calls too: `breaches_of` in bin/rule_hook/main.py takes a Skill call whose skill is `security-review` or `claude-security` as a review launch, and settings.json's PreToolUse matcher gains Skill. Found by the systems-architect's review of PR #295. - -### 173. Have rule-hook's `todo-rank-check` run a worktree's own `bin/rank_todo.py` when the worktree is of this repo, so a branch that changes `todo.md`'s shape commits without an override. - -Raised by the overrides pass of PR #296. The hook imports the main checkout's `rank_todo.py`, so while a branch of this repo changes the table's shape, every commit touching `todo.md` needs a `todo-rank-check` override: 33 log lines across four branches, the score-outcomes, plan-136, plan-148 and item-146 ones. The hook then checks nothing, and the rule rests on the worker chaining the branch's own check. Run another repo's `bin/rank_todo.py` never: that would run its code before every commit. - -### 171. Group the routing figures' review rounds by the reviewers' rung as well as the worker's, so a call blames a rung only for rounds its own reviews raised. - -Raised by the goals audit of PR #296. `bin/routing_figures/measure.py` groups a chunk's review rounds by the rung its worker started on, and calls for a routing change when a lower rung took more of them. Since PR #296 the reviewers may run above the worker's rung, on the one their item's E + I picks, and no figure groups rounds by it, though the archived worker line names the E + I it follows from. A cheap worker on an item of high E + I gets stronger reviewers, who may raise more rounds, and a call could then blame the worker's rung for them: an interrupt of lilleman that settles nothing (goal 1.2). - -### 196. Replay the architecture, principles, overrides and product-owner passes with `review-replay` on Opus 5.5 projects, record each run in the review-replay routing decision, and add any rung a run qualifies to `REPLAYED`. - -Item 159's chunk, PR #322, replayed only the prose and stability passes. Sonnet 5.5 at high missed 44 to 55% of what the project's rung found again in each, so the agent judged a replay of the other four unlikely to qualify a rung. The product-owner review of PR #322 asked that the plan keep them, so the ranking decides when they run. Each run costs hours of reviewer replays (goal 1.4), so the score keeps it low until a cheaper model joins the ladder. `docs/decisions.md` → `routing: a review pass runs below the project's rung only on a rung that a replay of its rounds shows finding every 🔴 and 🟡 the project's rung finds…` records the runs so far. - -### 181. Have the test of a quoted answer's step-up assert the stepped rung's facts as literals, not through `prompts.rungs_held`. - -`bin/loop_claude/test_loop_claude.py`'s `test_a_quoted_answer_that_cites_an_escalation_trigger_steps_the_worker_up_before_it_resumes_and_archives_the_step` builds its expected prompt from `prompts.rungs_held`, the code under test, so a bug there passes it. The technical principles' test bullet bans that shape. Assert the new rung and one review launch as literals, as the typed answer's step-up test does. Raised by the principles audit of PR #308. - -### 192. Sort `.gitignore`'s allowlist block, from `!.claude/` to `!workflow-bench/test_review_git.py`, by code point, so rule-hook's `ignorefile-sorted` checks later edits to it again. - -Found by review of PR #317. `.gitignore:56-58` holds `!bin/rule-hook` above `!bin/routing_figures/` and `!bin/routing_figures/*.py`, but `o` sorts before `u`. `ignore_breaches` in `bin/rule_hook/rules.py` skips a block that was already unsorted before an edit, so while this one stays unsorted no later edit to it is checked. The unsorted block breaches the technical principle "Deterministic order wherever order carries no meaning". - -### 193. Narrow `readme_goals`'s mark to `Mark` by a typed lookup in place of `typing.cast`, so a mark added to the regex but not the lookup fails at run time, and one added to the lookup but not `Mark` fails mypy. - -Found by review of PR #317. `bin/rank_todo.py`'s `readme_goals` writes `typing.cast(Mark, mark or None)`, which asserts the type `goal_weights` branches on without checking it: a mark added to the regex reaches `goal_weights` as a value `Mark` lacks. mypy does not read the regex, so no lookup lets it catch that. Replace the cast with a lookup typed `dict[str, Mark]`, from each mark the regex captures, and `""` for none, to its `Mark` value. A mark added to the regex but not the lookup then raises `KeyError` at run time, and a value added to the lookup but not `Mark` fails mypy. - -### 194. Make `test_waits_out_a_usage_limit_which_ends_a_run_of_failures` expect a usage-limit wait independent of the wall-clock time that passes during the run. - -Found by review of PR #317. `bin/loop_claude/test_black_box.py:569-575` sets `resets_at` from the test's `time.time()` and expects the wait, rounded to tens, to be 3720. When more than about 5 s pass between that read and the loop's, the wait rounds to 3710 and the test fails with no bug. Item 102 covers only replacing the `time.sleep` swap; this item changes the expected value, for example by asserting the wait against `resets_at + 120` minus the time the loop read, or a bound on it. - -### 202. Add `CLAUDE.md` → "Prose"'s rule "Write negations as people say them", with its examples, to `skills/larv-review/standards/prose.md`, so the prose reviewer holds prose to it. - -Found by the prose review of PR #329. `prose.md` opens by calling itself the full rules that `CLAUDE.md` → "Prose" keeps a core of, yet it lacks that rule, so a prose reviewer whose bar is the standards files never sees it. - -### 187. Count the tokens a worker spends reading reviewers' reports, so goal 1.4's signal shows whether report files lowered what a review costs the worker's context. - -Before PR #310, reports reached the worker as the Agent call's result, a median 19k tokens per chunk (2026-10-08, 68 archived transcripts). Now a reviewer returns its verdict and one line per finding, and the worker reads a 🔴 or 🟡 finding's entry from the report file. `reading-cost` counts only tracked files (`bin/reading_cost/measure.py`), and `routing-figures` counts only the Agent call's result (`bin/routing_figures/measure.py`), so neither sees the report reads. Found by the architecture review of PR #310. - -### 165. Make this repo's tests assert the facts a prompt or help text carries in place of its sentences, and drop the tests that scan source or assert a constant. - -A test audit across lilleman's projects on 2026-10-16 found 10 of 33 sampled tests in this repo pinning wording that is not the contract. Examples of these and other weak tests: `bin/loop_claude/test_loop_claude.py:165`, `:271` and most asserts in `:664` to `:687` pin whole sentences of the question, archive or prompt text, up to about 750 characters, and `:864` asserts help-text wording. `:906` and `:936` parse the source with `ast` and list each `Stop(...)` and `Failure(...)` call by function name. `bin/model_routing/test_ladder.py:16` asserts `len(LADDER) == 11`. Rewrite each to the technical principles' test bullet: assert the facts the text must carry, such as an item ID, a rung or a model argument, and delete a test no real bug could fail. Before and after rewriting a test, run the mutation tool on the code it covers: every mutant the old test killed, the new one kills. - -### 182. Let the human edit an interrupt's answer with the arrow keys, so Left moves the cursor instead of typing ^[[D into the answer. - -`bin/loop_claude/cycle/interrupt.py`'s `put_question` reads the answer with `input()`, and nothing under `bin/` imports `readline`, so Left types `^[[D` into the answer the worker gets. Importing `readline` gives line editing, at two costs. It writes the prompt to stdout, not stderr. And its bracketed paste can return several lines, while `prompts.typed_answer` ends the answer at its first blank line and shows the judge the rest as loop-claude's words. Raised by the product-owner review of PR #308. - -### 201. Save the human's tmux setups and restore them after a reboot, so work is up and running again quickly. - -The human asked on 2026-10-21 for tmux support, above all for saving tmux setups. Don't build anything until the human has said exactly what they need. Ask them at least: - -- What a setup holds, such as sessions, windows, panes, each pane's working directory and the command running in it, like one `loop-claude` per project. -- When a setup is saved: on demand or on its own. -- How a setup comes back after a reboot. -- Whether the code that saves and restores setups must work on every machine that takes this checkout (goal 2), which decides whether that code lives in this repo. -- What else tmux support should cover. - -Weigh the widely used tmux-resurrect and tmux-continuum plugins against a script of our own. Then re-score this item from the answers and that choice, and split it into items where it is more than one chunk. - -### 155. Lower the reading cost of the files a chunk reads most before its first commit. - -`bin/reading-cost` on 2026-10-18: the median of the last 5 chunks is 163,028 new input tokens before their first commit, up from 100,998 for the 5 before them. Read most over the last 5, by opens and searches: `rules/decisions.md` 1. The chunk that ships this item runs `bin/reading-cost --reset`. - -### 169. Have rule-hook's `todo-rank-check` catch a `todo.md` that the same Bash call edits and then commits. - -The hook judges a call before it runs, and `changed` in `bin/rule_hook/todo_check.py` compares `todo.md` with the index and HEAD as they stand then. A call that edits `todo.md` and commits it, such as a heredoc script followed by `git commit`, passes unchecked: PR #296's commit 149108e did, and the override marker it carried was never logged. larv-review's gate still runs `rank_todo.py --check`, so an unranked plan stops at merge rather than at commit. A git pre-commit hook would see the staged file. - -### 197. Let the human edit what they type at loop-claude's terminal questions with the arrow keys, so Left moves the cursor in place of printing `^[[D`. - -`bin/loop_claude/effects.py` reads each answer with Python's builtin `input`, and nothing imports `readline`, so the terminal gets no line editing: fixing a typo means erasing back to it. Importing `readline` in `effects.py` gives `input` that editing, for the interrupt's answer and the question that asks for the project's model alike. lilleman, 2026-10-18: "Not super-important, but a bit irritating." - -### 174. In a chunk no item routed, ask the worker to name each todo.md item it takes, with its L and E + I, so loop-claude can route on an item it takes in. - -The principles pass of PR #301 found that only `routed_by` in `bin/loop_claude/cycle/prompts.py` asks the worker to name each item it takes with its L and E + I, and `fresh` uses it only where an item routed the chunk. In an unrouted chunk the judge has no levels to report, so neither the taken-in L nor the taken-in E + I lifts the worker, the reviewers or the judge, and the first prompt names no reviewers' rung for a higher E + I. - -### 122. Assemble the judge's prompt in `bin/loop_claude/cycle/judge.py`, importing only wording the worker also sees, and call the worker "the worker" in it. - -All four seats of PR #257's scoring run named `bin/loop_claude/cycle/judge.py:16` `JUDGE_RULES`. The prompt is spliced from constants in `cycle/prompts.py` (`ANSWER_DESTINATIONS`, `ANSWERS_RECORDED`, `either`) and `project/records.py` (`HUMAN_RULE_NAMES`), so a reader rebuilds it from three files. It says "the agent" where the code and `CLAUDE.md` → "Vocabulary" say "worker". Wording the worker also sees, such as `ANSWER_DESTINATIONS` in `prompts.resumed`, may stay in `cycle/prompts.py`. Make `JUDGE_RULES` easier to read. - -### 130. Move the vote counting out of `bin/larv_review/ruling.py`'s `votes`, so reading a votes file decides nothing. - -Mid A of PR #257's scoring run named `bin/larv_review/ruling.py:8` `votes`. It calls `counted` while validating, to reject the maintainability senior's and Junior A's lines when Mid A and the inherited architect already agree overall: a ruling hidden in a parser. The counting rule is spread over `seats.py`, `ruling.py`, `comprehension_history.place_dimensions` and the help. Make `votes` easier to read. - -### 125. Give "record", "outcome" and "places" one meaning each across `bin/`, and rename `bin/larv_review/git.py` by what it holds. - -Shape is the lowest dimension, so this item moves code health by 9, per `docs/decisions.md` → `larv-review: a project lifting itself to the comprehension floor starts at the lowest dimension`. - -The inherited architect of PR #257's scoring run named `bin/reading_cost/measure.py:16` `Reading` and `bin/larv_review/git.py:6` `history_changes`, and found each word used for several concepts. "Record": the history writer `larv_review/record.py`, the judge's `loop_claude/project/records.py`, and `reading_cost/figures.py`'s `RECORD`. "Outcome": `transcript_archive/outcomes.py`, `score_outcomes/outcomes.py` `Outcome` and `rule_hook/rules.py` `Outcome`. "Places": `comprehension_history.Place` and `Reading.places`. `larv_review/git.py` holds history logic, not a git runner. Make `Reading` and `history_changes` easier to read. - -### 137. Archive a chunk's route as a record loop-claude reads back field by field, in place of the `Worker:` prose `ROUTED` parses, and name `stepped` and the judge's `bundled` by what they do. - -PR #262's paired ruling found the project reads worse: a rerun resumes on its rung only by parsing `Rung.__str__`'s and `Route.__str__`'s wording back with `bin/loop_claude/routing.py`'s `ROUTED`, a string contract over four files, where a reword silently routes afresh. Write the route as a structured line, such as JSON after `Worker:`, that `transcript_archive` reads into fields. `stepped` both raises to a bundled item's rung and counts towards a one-rung step; `Reply.bundled` names neither L nor highest. Make `bin/loop_claude/loop/main.py`'s `run_loop` easier to read where it threads the route. The structured line must keep the escalation's mark, archived today as `escalated at transcript entry N`: without it, a trigger that already stepped the worker could step it again. - -### 139. Split `bin/routing_figures/measure.py` by concern, and keep the figures' measured cycle and each raised call as fields loop-claude reads back, not as the prose it renders. - -The paired ruling on PR #265 ruled worse. Make these places easier to read: `measure.py` `measured` and `render` (token attribution, subagent rungs, round counting, calls and rendering in one module; `measured`, `Measured` and `measure_archive` side by side); `calls` with `archive.py` `raised` and `last_measured`, where a call's identity is its sentence and the measured cycle is read back from rendered markdown; and `Reports.searches`, which holds characters, not searches. - -### 170. Re-tune `WORKER_STEPS` and `REVIEW_STEPS` once 10 chunks have shipped under them, from how well L, E and I order their review rounds and 🔴 findings. - -`docs/decisions.md` → `routing: one ladder…` calls the steps lilleman approved on 2026-10-16 a first guess. Once 10 chunks that each shipped one item scored with L, E and I have merged, read `score-outcomes`' rank correlations for L, E and I and the routed-chunks table of `routing-figures.md`, and propose new steps to lilleman, whose call they are. - -### 158. Measure the fixed cost of a chunk from loop-claude's archive, in tokens and hours against its items' S, and set F in `Score = 100 * V / (2**S + F)` to it. - -F is 8 until then, about one S 3 change, lilleman's call in PR #283. A chunk costs more than its size: the worker reads about 130k tokens before its first commit whatever the item, and every chunk takes its review passes. Fit cost against 2**S from the finished chunks `score-outcomes` measures, in the same units `2**S` counts, and say in `docs/decisions.md` → `todo.md: …` how far the fit holds. A chunk bundling tiny items shares F between them. - ### 116. Report L by the share of chunks with a 🔴, once 10 chunks that each shipped one item record finding counts and most record no 🔴. `score-outcomes` reports the median 🔴 count at each guessed R, and how well L orders chunks by 🔴 findings; the part of R a 🔴 tests is L. Where most chunks have no 🔴, every median reads 0 and the rank correlation rests on the few that have one, which tells a scorer little. No round title held counts before PR #254, so how often a chunk has a 🔴 is not yet known. @@ -343,9 +359,9 @@ The inherited architect of PR #257's scoring run named `bin/round_titles.py:5` ` Found by the principles audit of PR #242. `bin/loop_claude/test_black_box.py:113-114` swaps the global `time.sleep`, the shape "Functional core, imperative shell" bans. An override of the delay lets the test run the code as production runs it. -### 66. Hold systems-architect's method thresholds only while the comprehension panel finds the flagged code hard. +### 173. Have rule-hook's `todo-rank-check` run a worktree's own `bin/rank_todo.py` when the worktree is of this repo, so a branch that changes `todo.md`'s shape commits without an override. -KISS, in `principles/technical-principles.md`, which keeps a limit only while readers find the flagged code hard. `agents/systems-architect.md` makes cyclomatic 7 and 24 lines gate rules from the first commit, a 🔴 unless a reason is stated. +Raised by the overrides pass of PR #296. The hook imports the main checkout's `rank_todo.py`, so while a branch of this repo changes the table's shape, every commit touching `todo.md` needs a `todo-rank-check` override: 33 log lines across four branches, the score-outcomes, plan-136, plan-148 and item-146 ones. The hook then checks nothing, and the rule rests on the worker chaining the branch's own check. Run another repo's `bin/rank_todo.py` never: that would run its code before every commit. ### 101. Have `larv_review/record.py`'s `read_seats` take the time, the commit check and the history as inputs, so it parses and decides without effects. @@ -359,41 +375,19 @@ Found by the principles audit of PR #242, against "Functional core, imperative s `score-outcomes` measures risk only by the 🔴 findings review caught. A serious bug review missed shows later, as a change that fixes code the chunk wrote: the defect that escaped, which E guesses. -### 149. Fill each release by priority up to a capacity it states, in place of the bar, and move what does not fit to a later release. - -A release's capacity is a sum of its items' cost, as the formula counts it. Each project states its own; the human sets the first value per project. Nothing is deleted by score. - -### 123. Have `bin/comprehension_history.py` parse each history entry once into seats, votes and places, so `latest_places`, `worse_places` and `worse_votes` neither depend on table order nor split a label to find a seat. - -Three seats of PR #257's scoring run named `bin/comprehension_history.py:106` `latest_places`; the logic it rests on is `:114` `worse_places` and `:126` `worse_votes`. They regex the markdown the module writes. `worse_votes` keeps a seat's first row through `setdefault`, because the votes table comes first. `worse_places` recovers the seat with `label.split(",")[0]`. `Entry` still holds scoring seats' places for rulings recorded before PR #255. Make these functions easier to read. - -### 124. Group the shared modules at `bin/`'s root into packages named by purpose, so the root holds only launchers and stand-alone tools. - -Shape is the lowest dimension, so this item moves code health by 9, per `docs/decisions.md` → `larv-review: a project lifting itself to the comprehension floor starts at the lowest dimension`. - -PR #257's scoring run put Shape at 6.25, the lowest dimension. `bin/` holds about 30 entries: 6 launchers, 6 tool packages, 3 shared packages and 15 root modules. Two root modules are tools (`rank_todo.py`, `statusline.py`) and 13 are shared libraries, and nothing in the layout tells them apart; only README's import-root paragraph maps them. Candidate packages: git running and parsing, the todo table with `rank_todo.py`'s formula language and goal weighing, and the comprehension history with round titles. `rank_todo.py` keeps its path, which every project's rules name. The `.gitignore` allowlist and README follow the move. - -### 132. Lift each dimension still under the comprehension floor after release 0.2.0's scoring run, at the places that run names. - -Replaces item 62, which release 0.3.0's items split. PR #257's scoring run put Locality and Self-sufficiency at 6.63, Shape at 6.25 and the overall at 6.50, against the floor of 7.0 in `docs/decisions.md` → `comprehension floor: …`. Split this into items, one per place, once 0.3.0's scoring run has named them. - -### 105. Compare review rounds per pass and reading cost for the five chunks before and after the `worker:` decision moved the principles out of the worker's context, and file an item if either rose. - -The `worker:` decision is valid while review rounds per pass do not rise. Count the rounds from each PR's `Answer round :` commits, and take reading cost from `docs/reading-cost.md`. Run it once five chunks have merged after the one that recorded the decision. - -### 59. Bound a run of unfinished verdicts on one chunk, so a worker and judge that disagree cannot cycle unattended without end. - -Raised by the product-owner review of PR #211. The resumed worker gets the judge's quote of the work remaining, but a worker that still thinks the chunk done can answer each cycle the same way, and each cycle costs a worker and a judge run (goal 1.4). - ### 12. Run the test suite in CI on every PR, or record in `docs/decisions.md` why the local run is enough. The repo has no CI, so larv-review's gate is the local run, and larv-review's Gate skips even that when the last stability round left the suite green: an unattended chunk can merge on the worker's own word. When CI runs a rule check, such as one of `bin/rule-hook`'s, let `` in the PR body override it. -### 135. Fingerprint only the modules loop-claude imports, so editing another tool's code no longer reloads a running loop. +### 171. Group the routing figures' review rounds by the reviewers' rung as well as the worker's, so a call blames a rung only for rounds its own reviews raised. -The maintainability senior and the inherited architect of PR #257's scoring run named `bin/loop_claude/loop/reload.py:38` `fingerprint` and `:50` `exec_if_edited`: the fingerprint covers every `bin/**/*.py`, so editing `statusline.py` or `rank_todo.py` re-execs a running loop. Make `fingerprint` easier to read. +Raised by the goals audit of PR #296. `bin/routing_figures/measure.py` groups a chunk's review rounds by the rung its worker started on, and calls for a routing change when a lower rung took more of them. Since PR #296 the reviewers may run above the worker's rung, on the one their item's E + I picks, and no figure groups rounds by it, though the archived worker line names the E + I it follows from. A cheap worker on an item of high E + I gets stronger reviewers, who may raise more rounds, and a call could then blame the worker's rung for them: an interrupt of lilleman that settles nothing (goal 1.2). + +### 196. Replay the architecture, principles, overrides and product-owner passes with `review-replay` on Opus 5.5 projects, record each run in the review-replay routing decision, and add any rung a run qualifies to `REPLAYED`. + +Item 159's chunk, PR #322, replayed only the prose and stability passes. Sonnet 5.5 at high missed 44 to 55% of what the project's rung found again in each, so the agent judged a replay of the other four unlikely to qualify a rung. The product-owner review of PR #322 asked that the plan keep them, so the ranking decides when they run. Each run costs hours of reviewer replays (goal 1.4), so the score keeps it low until a cheaper model joins the ladder. `docs/decisions.md` → `routing: a review pass runs below the project's rung only on a rung that a replay of its rounds shows finding every 🔴 and 🟡 the project's rung finds…` records the runs so far. ### 68. Test `workflow-bench/compare.py`'s blinding and `bench.py`'s run plan. @@ -401,25 +395,21 @@ The maintainability senior and the inherited architect of PR #257's scoring run The tests also cover `workflow-bench/bench.py`'s `permission_flags`, with a probe of a headless claude given its flags. It is denied a read outside the granted trees, a bare `git status`, and wrapper calls with `--output`, `--no-index`, a glued `-aF/abs`, `--fil=/abs` or a path outside the clone. A `cd && python3 …` acts on the clone only. It is allowed the wrapper's `log`, `diff`, `show`, `status`, `ls-files`, `add` and `commit -m`. `workflow-bench/test_review_git.py` tests the wrapper's refusals directly. -### 4. Name each chunk's archive folder by the chunk's start time, so `/` lists chunks in the order they ran. +### 181. Have the test of a quoted answer's step-up assert the stepped rung's facts as literals, not through `prompts.rungs_held`. -Today the folder is the SHA-256 of the transcript's first timestamped line, which tells the human nothing; that line carries the start time. Drop the fallback to the first line, which every chunk of a project shares, and give the tests' fake transcripts ISO timestamps. `bin/reading-cost` takes a chunk's id from the folder's first 12 characters and skips a chunk whose id `docs/reading-cost.md` holds, so give it a way to match a figure written under the old name. +`bin/loop_claude/test_loop_claude.py`'s `test_a_quoted_answer_that_cites_an_escalation_trigger_steps_the_worker_up_before_it_resumes_and_archives_the_step` builds its expected prompt from `prompts.rungs_held`, the code under test, so a bug there passes it. The technical principles' test bullet bans that shape. Assert the new rung and one review launch as literals, as the typed answer's step-up test does. Raised by the principles audit of PR #308. -### 156. Drop `rank_todo.py`'s ranking of an old-shape table once no project under `~/code` holds one. +### 192. Sort `.gitignore`'s allowlist block, from `!.claude/` to `!workflow-bench/test_review_git.py`, by code point, so rule-hook's `ignorefile-sorted` checks later edits to it again. -While `rank_todo.py` ranks two shapes, projects follow two sets of scoring rules, against goal 1.3. Once every project has reshaped, drop `OLD_SHAPE`'s weighing from `rank_todo.py`, `RESHAPE`, and the old shape's lines in `rank_todo.py --help` and `rules/todo-items.md`. Keep `todo_table` reading old tables: `score_outcomes` reads every past merge's `todo.md`. PR #283's paired ruling found the old-shape path made `rank_todo.py`'s `score`, `Scoring.weights`, `unknown_columns` and `todo_table.py`'s `Moves` harder to read; leave each easier, with one shape and moves that are always moves, and the Moves cell's rules in one place. +Found by review of PR #317. `.gitignore:56-58` holds `!bin/rule-hook` above `!bin/routing_figures/` and `!bin/routing_figures/*.py`, but `o` sorts before `u`. `ignore_breaches` in `bin/rule_hook/rules.py` skips a block that was already unsorted before an edit, so while this one stays unsorted no later edit to it is checked. The unsorted block breaches the technical principle "Deterministic order wherever order carries no meaning". -### 1. Say in README → Install how the transcript archive is backed up, once bender-infra backs up ai-sandbox's data volume. +### 193. Narrow `readme_goals`'s mark to `Mark` by a typed lookup in place of `typing.cast`, so a mark added to the regex but not the lookup fails at run time, and one added to the lookup but not `Mark` fails mypy. -It lives under `~/.claude`, which `.gitignore` keeps from the remote, so a lost disk loses every unattended run's record. Back it up only to a destination private to me and encrypted at rest: the worker runs with permissions bypassed, so the archived tool results can hold credentials it read. +Found by review of PR #317. `bin/rank_todo.py`'s `readme_goals` writes `typing.cast(Mark, mark or None)`, which asserts the type `goal_weights` branches on without checking it: a mark added to the regex reaches `goal_weights` as a value `Mark` lacks. mypy does not read the regex, so no lookup lets it catch that. Replace the cast with a lookup typed `dict[str, Mark]`, from each mark the regex captures, and `""` for none, to its `Mark` value. A mark added to the regex but not the lookup then raises `KeyError` at run time, and a value added to the lookup but not `Mark` fails mypy. -2026-10-02, the human: ai-sandbox is the VM `loop-claude` will run on, hosted on the server bender. bender-infra, the infrastructure-as-code project that manages bender, will back up ai-sandbox's data volume once ai-sandbox is rebuilt. The item waits for the human to say the rebuild has landed; do not remind them. Before writing the README line, check that `~/.claude` lives on that volume and that the backup is private and encrypted at rest. +### 194. Make `test_waits_out_a_usage_limit_which_ends_a_run_of_failures` expect a usage-limit wait independent of the wall-clock time that passes during the run. -The README line covers the bench's transcripts in `workflow-bench/logs/` too (goal 3). - -### 6. Move what `loop-claude` writes out of `~/.claude.json`, and ask the human about each write that must stay. - -Claude Code owns that file and writes it. `trust` reads it, changes it and writes it back, so a write that lands in between is lost. +Found by review of PR #317. `bin/loop_claude/test_black_box.py:569-575` sets `resets_at` from the test's `time.time()` and expects the wait, rounded to tens, to be 3720. When more than about 5 s pass between that read and the loop's, the wait rounds to 3710 and the test fails with no bug. Item 102 covers only replacing the `time.sleep` swap; this item changes the expected value, for example by asserting the wait against `resets_at + 120` minus the time the loop read, or a bound on it. ### 77. Teach `bin/metric-bench` Go and TypeScript, rerun it once two projects' comprehension histories name places, and bring into review only a metric that tracks the panel. @@ -451,15 +441,25 @@ Claude's misses ranked the named units at a coin toss. Top k scores 0.50 by chan Claude's answers overlapped the truth by a median Jaccard index of 0.76. A run took in 62,643 new input tokens and cost $0.70; it did not record which model answered. Grep answers these questions whatever the code's shape, so no question enters review; a new question bench would need questions that take understanding the code, not finding it. -### 151. Keep 10 to 20 settled decisions per project as its goals' test set, and rerun them after a goal changes. +### 4. Name each chunk's archive folder by the chunk's start time, so `/` lists chunks in the order they ran. -Each case is a question the project settled and the answer it chose. A fresh-context agent given only the README's premises answers each case; a case it answers differently says the goals no longer decide it. Written guidance can fail to change behaviour, which is why the goals get a test. +Today the folder is the SHA-256 of the transcript's first timestamped line, which tells the human nothing; that line carries the start time. Drop the fallback to the first line, which every chunk of a project shares, and give the tests' fake transcripts ISO timestamps. `bin/reading-cost` takes a chunk's id from the folder's first 12 characters and skips a chunk whose id `docs/reading-cost.md` holds, so give it a way to match a figure written under the old name. -### 5. Key a project on its checkout's full path, and refuse to start while another session uses that key. +### 187. Count the tokens a worker spends reading reviewers' reports, so goal 1.4's signal shows whether report files lowered what a review costs the worker's context. -The key names the project's session, archive folder and models entry. `project_key` drops the leading `/`, so `~/code/a` and `/a` share all three, and one loop can resume or delete the other's session. +Before PR #310, reports reached the worker as the Agent call's result, a median 19k tokens per chunk (2026-10-08, 68 archived transcripts). Now a reviewer returns its verdict and one line per finding, and the worker reads a 🔴 or 🟡 finding's entry from the report file. `reading-cost` counts only tracked files (`bin/reading_cost/measure.py`), and `routing-figures` counts only the Agent call's result (`bin/routing_figures/measure.py`), so neither sees the report reads. Found by the architecture review of PR #310. -`bin/reading-cost` keys the archive by the main checkout, the parent of git's common dir, since it runs in a chunk's worktree; `loop-claude` keys it by `--show-toplevel`, so a loop started inside a worktree archives where `reading-cost` never looks. Derive both keys one way. +### 165. Make this repo's tests assert the facts a prompt or help text carries in place of its sentences, and drop the tests that scan source or assert a constant. + +A test audit across lilleman's projects on 2026-10-16 found 10 of 33 sampled tests in this repo pinning wording that is not the contract. Examples of these and other weak tests: `bin/loop_claude/test_loop_claude.py:165`, `:271` and most asserts in `:664` to `:687` pin whole sentences of the question, archive or prompt text, up to about 750 characters, and `:864` asserts help-text wording. `:906` and `:936` parse the source with `ast` and list each `Stop(...)` and `Failure(...)` call by function name. `bin/model_routing/test_ladder.py:16` asserts `len(LADDER) == 11`. Rewrite each to the technical principles' test bullet: assert the facts the text must carry, such as an item ID, a rung or a model argument, and delete a test no real bug could fail. Before and after rewriting a test, run the mutation tool on the code it covers: every mutant the old test killed, the new one kills. + +### 156. Drop `rank_todo.py`'s ranking of an old-shape table once no project under `~/code` holds one. + +While `rank_todo.py` ranks two shapes, projects follow two sets of scoring rules, against goal 1.3. Once every project has reshaped, drop `OLD_SHAPE`'s weighing from `rank_todo.py`, `RESHAPE`, and the old shape's lines in `rank_todo.py --help` and `rules/todo-items.md`. Keep `todo_table` reading old tables: `score_outcomes` reads every past merge's `todo.md`. PR #283's paired ruling found the old-shape path made `rank_todo.py`'s `score`, `Scoring.weights`, `unknown_columns` and `todo_table.py`'s `Moves` harder to read; leave each easier, with one shape and moves that are always moves, and the Moves cell's rules in one place. + +### 155. Lower the reading cost of the files a chunk reads most before its first commit. + +`bin/reading-cost` on 2026-10-18: the median of the last 5 chunks is 163,028 new input tokens before their first commit, up from 100,998 for the 5 before them. Read most over the last 5, by opens and searches: `rules/decisions.md` 1. The chunk that ships this item runs `bin/reading-cost --reset`. ### 51. Hand loop-claude's terminal output to an injected effect, so no storage or retry function prints. From 80d9e9656ff384f51499bfb53a032248443e1bdb Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Wed, 21 Oct 2026 18:42:03 +0200 Subject: [PATCH 07/47] Move the 0.3.0 items scoring over 5 and up to 10 to 0.4.0, and those scoring 5 or less to 0.5.0 --- todo.md | 200 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 100 insertions(+), 100 deletions(-) diff --git a/todo.md b/todo.md index 274126ed..f744ff8d 100644 --- a/todo.md +++ b/todo.md @@ -21,24 +21,6 @@ | 29 | 0.3.0 | | | **Make the contributor a standing member of every project's audience, unless its README voids code health.** | 2 | 2 | 3 | 5 | 2 | 1.1 by 5, 1.4 by 5 | 13.7 | | 199 | 0.3.0 | | defect | **Start loop-claude's worker with `ScheduleWakeup` disallowed, so a worker that ends its turn on a question exits and the judge runs.** | 2 | 1 | 3 | 4 | 2 | 1.5 by 6, 1.2 by 3 | 11.8 | | 170 | 0.3.0 | | decision | **Re-tune `WORKER_STEPS` and `REVIEW_STEPS` once 10 chunks have shipped under them, from how well L, E and I order their review rounds and 🔴 findings.** | 2 | 2 | 3 | 5 | 2 | 1.1 by 3, 1.4 by 5 | 10.9 | -| 106 | 0.3.0 | | | **Make larv-review's "Do not over-read a clean result" cite a rule that says Renovate or Dependabot owns dependency CVEs, or drop the citation.** | 1 | 2 | 1 | 2 | 1 | 1.1 by 5 | 8.4 | -| 154 | 0.3.0 | | defect | **Have `bin/shell_command.py`'s `segments` keep a command's words together across a redirect, so `git > out commit` reads as one git commit.** | 1 | 1 | 3 | 3 | 2 | 1.1 by 6 | 8.4 | -| 186 | 0.3.0 | | | **Point every file a session parks outside its checkout, such as the comprehension panel's detached worktree and a build probe's output, at a folder a headless session has, since loop-claude's sessions have no scratchpad.** | 1 | 2 | 2 | 3 | 2 | 1.1 by 3, 1.5 by 2 | 6.8 | -| 198 | 0.3.0 | | decision | **Count, per finished chunk, the findings that arose from misreading code that had already shipped, so code health's counter-signal shows.** | 3 | 2 | 2 | 5 | 5 | code health by 3, 1.1 by 2 | 6.2 | -| 59 | 0.3.0 | | | **Bound a run of unfinished verdicts on one chunk, so a worker and judge that disagree cannot cycle unattended without end.** | 2 | 1 | 3 | 4 | 3 | 1.4 by 6 | 6.0 | -| 167 | 0.3.0 | | | **Refuse a `/security-review` or `/claude-security` Skill call below the project's rung, as rule-hook refuses such an Agent call.** | 3 | 2 | 3 | 6 | 2 | 1.1 by 4 | 5.6 | -| 6 | 0.3.0 | | decision | **Move what `loop-claude` writes out of `~/.claude.json`, and ask the human about each write that must stay.** | 3 | 3 | 3 | 7 | 3 | 1.1 by 5 | 5.3 | -| 66 | 0.3.0 | | principle | **Hold systems-architect's method thresholds only while the comprehension panel finds the flagged code hard.** | 2 | 2 | 3 | 5 | 3 | 1.1 by 5 | 5.3 | -| 135 | 0.3.0 | | | **Fingerprint only the modules loop-claude imports, so editing another tool's code no longer reloads a running loop.** | 2 | 2 | 3 | 5 | 3 | 1.1 by 4 | 4.2 | -| 202 | 0.3.0 | | | **Add `CLAUDE.md` → "Prose"'s rule "Write negations as people say them", with its examples, to `skills/larv-review/standards/prose.md`, so the prose reviewer holds prose to it.** | 1 | 2 | 2 | 3 | 1 | 1.1 by 2 | 3.4 | -| 149 | 0.3.0 | | decision | **Fill each release by priority up to a capacity it states, in place of the bar, and move what does not fit to a later release.** | 4 | 2 | 3 | 7 | 5 | 1.1 by 7 | 3.0 | -| 151 | 0.3.0 | | decision | **Keep 10 to 20 settled decisions per project as its goals' test set, and rerun them after a goal changes.** | 3 | 2 | 2 | 5 | 5 | 1.2 by 7 | 2.9 | -| 182 | 0.3.0 | | | **Let the human edit an interrupt's answer with the arrow keys, so Left moves the cursor instead of typing ^[[D into the answer.** | 2 | 2 | 1 | 3 | 2 | 1.1 by 2 | 2.8 | -| 201 | 0.3.0 | | owner | **Save the human's tmux setups and restore them after a reboot, so work is up and running again quickly.** | 3 | 2 | 1 | 4 | 4 | 1.5 by 4 | 2.6 | -| 5 | 0.3.0 | | decision | **Key a project on its checkout's full path, and refuse to start while another session uses that key.** | 4 | 2 | 3 | 7 | 5 | 1.1 by 6 | 2.5 | -| 169 | 0.3.0 | | | **Have rule-hook's `todo-rank-check` catch a `todo.md` that the same Bash call edits and then commits.** | 3 | 1 | 3 | 5 | 3 | 1.1 by 2 | 2.1 | -| 197 | 0.3.0 | | | **Let the human edit what they type at loop-claude's terminal questions with the arrow keys, so Left moves the cursor in place of printing `^[[D`.** | 1 | 2 | 3 | 4 | 1 | 1.5 by 1 | 1.5 | -| 174 | 0.3.0 | | | **In a chunk no item routed, ask the worker to name each todo.md item it takes, with its L and E + I, so loop-claude can route on an item it takes in.** | 1 | 2 | 3 | 4 | 2 | 1.1 by 1 | 1.4 | | 117 | 0.4.0 | | | **Give `todo_table.items` one way to say a plan has no items table, so no caller tells it from an empty plan by truthiness.** | 1 | 1 | 3 | 3 | 2 | code health by 4, 1.4 by 4 | 29.2 | | 126 | 0.4.0 | | | **State when work has landed towards a release once, in `bin/larv_review/plan.py`, and have larv-review's help point to it.** | 1 | 2 | 1 | 2 | 2 | code health by 4, 1.4 by 4 | 29.2 | | 131 | 0.4.0 | | | **Describe the transcript archive's layout in `bin/transcript_archive/`, which owns it, and have loop-claude's help point there.** | 1 | 2 | 1 | 2 | 2 | code health by 4, 1.4 by 4 | 29.2 | @@ -49,6 +31,14 @@ | 122 | 0.4.0 | | | **Assemble the judge's prompt in `bin/loop_claude/cycle/judge.py`, importing only wording the worker also sees, and call the worker "the worker" in it.** | 2 | 2 | 3 | 5 | 3 | code health by 5, 1.4 by 5 | 27.4 | | 130 | 0.4.0 | | | **Move the vote counting out of `bin/larv_review/ruling.py`'s `votes`, so reading a votes file decides nothing.** | 2 | 1 | 2 | 3 | 3 | code health by 4, 1.4 by 4 | 21.9 | | 176 | 0.4.0 | | | **Give `loop-claude --help`'s routing paragraph sub-headings, such as Routing, Judge rung and Routing figures, so a reader finds a rule without reading 39 lines.** | 1 | 2 | 1 | 2 | 2 | code health by 3, 1.4 by 2 | 20.6 | +| 106 | 0.4.0 | | | **Make larv-review's "Do not over-read a clean result" cite a rule that says Renovate or Dependabot owns dependency CVEs, or drop the citation.** | 1 | 2 | 1 | 2 | 1 | 1.1 by 5 | 8.4 | +| 154 | 0.4.0 | | defect | **Have `bin/shell_command.py`'s `segments` keep a command's words together across a redirect, so `git > out commit` reads as one git commit.** | 1 | 1 | 3 | 3 | 2 | 1.1 by 6 | 8.4 | +| 186 | 0.4.0 | | | **Point every file a session parks outside its checkout, such as the comprehension panel's detached worktree and a build probe's output, at a folder a headless session has, since loop-claude's sessions have no scratchpad.** | 1 | 2 | 2 | 3 | 2 | 1.1 by 3, 1.5 by 2 | 6.8 | +| 198 | 0.4.0 | | decision | **Count, per finished chunk, the findings that arose from misreading code that had already shipped, so code health's counter-signal shows.** | 3 | 2 | 2 | 5 | 5 | code health by 3, 1.1 by 2 | 6.2 | +| 59 | 0.4.0 | | | **Bound a run of unfinished verdicts on one chunk, so a worker and judge that disagree cannot cycle unattended without end.** | 2 | 1 | 3 | 4 | 3 | 1.4 by 6 | 6.0 | +| 167 | 0.4.0 | | | **Refuse a `/security-review` or `/claude-security` Skill call below the project's rung, as rule-hook refuses such an Agent call.** | 3 | 2 | 3 | 6 | 2 | 1.1 by 4 | 5.6 | +| 6 | 0.4.0 | | decision | **Move what `loop-claude` writes out of `~/.claude.json`, and ask the human about each write that must stay.** | 3 | 3 | 3 | 7 | 3 | 1.1 by 5 | 5.3 | +| 66 | 0.4.0 | | principle | **Hold systems-architect's method thresholds only while the comprehension panel finds the flagged code hard.** | 2 | 2 | 3 | 5 | 3 | 1.1 by 5 | 5.3 | | 1 | 0.5.0 | | question | **Say in README → Install how the transcript archive is backed up, once bender-infra backs up ai-sandbox's data volume.** | 1 | 2 | 1 | 2 | 1 | | 0.0 | | 125 | 0.5.0 | | decision | **Give "record", "outcome" and "places" one meaning each across `bin/`, and rename `bin/larv_review/git.py` by what it holds.** | 3 | 1 | 3 | 5 | 5 | code health by 9, 1.4 by 9 | 19.7 | | 172 | 0.5.0 | | | **Name the project's rung `project` across `bin/loop_claude`, in place of `anchor`, as `bin/model_routing/ladder.py` names it.** | 2 | 1 | 3 | 4 | 3 | code health by 3, 1.4 by 3 | 16.5 | @@ -77,6 +67,7 @@ | 111 | 0.5.0 | | | **Measure the chunks of a project that merges by squash or fast-forward, which `score-outcomes` skips today.** | 3 | 2 | 2 | 5 | 3 | 1.1 by 5 | 5.3 | | 110 | 0.5.0 | | | **Count, for each finished chunk, the later changes that fixed code it wrote, and show them beside its guessed E.** | 3 | 2 | 2 | 5 | 5 | 1.1 by 6, 1.4 by 6 | 4.9 | | 12 | 0.5.0 | | | **Run the test suite in CI on every PR, or record in `docs/decisions.md` why the local run is enough.** | 3 | 2 | 1 | 4 | 4 | 1.1 by 6 | 4.2 | +| 135 | 0.5.0 | | | **Fingerprint only the modules loop-claude imports, so editing another tool's code no longer reloads a running loop.** | 2 | 2 | 3 | 5 | 3 | 1.1 by 4 | 4.2 | | 171 | 0.5.0 | | decision | **Group the routing figures' review rounds by the reviewers' rung as well as the worker's, so a call blames a rung only for rounds its own reviews raised.** | 3 | 2 | 2 | 5 | 4 | 1.2 by 3, 1.4 by 3 | 4.0 | | 196 | 0.5.0 | | decision | **Replay the architecture, principles, overrides and product-owner passes with `review-replay` on Opus 5.5 projects, record each run in the review-replay routing decision, and add any rung a run qualifies to `REPLAYED`.** | 2 | 2 | 3 | 5 | 2 | 1.4 by 3 | 4.0 | | 68 | 0.5.0 | | principle | **Test `workflow-bench/compare.py`'s blinding and `bench.py`'s run plan.** | 2 | 1 | 1 | 2 | 4 | 1.1 by 5 | 3.5 | @@ -84,13 +75,22 @@ | 192 | 0.5.0 | | principle | **Sort `.gitignore`'s allowlist block, from `!.claude/` to `!workflow-bench/test_review_git.py`, by code point, so rule-hook's `ignorefile-sorted` checks later edits to it again.** | 1 | 1 | 1 | 1 | 1 | 1.1 by 2 | 3.4 | | 193 | 0.5.0 | | | **Narrow `readme_goals`'s mark to `Mark` by a typed lookup in place of `typing.cast`, so a mark added to the regex but not the lookup fails at run time, and one added to the lookup but not `Mark` fails mypy.** | 1 | 1 | 3 | 3 | 1 | 1.1 by 2 | 3.4 | | 194 | 0.5.0 | | | **Make `test_waits_out_a_usage_limit_which_ends_a_run_of_failures` expect a usage-limit wait independent of the wall-clock time that passes during the run.** | 1 | 1 | 1 | 1 | 1 | 1.1 by 2 | 3.4 | +| 202 | 0.5.0 | | | **Add `CLAUDE.md` → "Prose"'s rule "Write negations as people say them", with its examples, to `skills/larv-review/standards/prose.md`, so the prose reviewer holds prose to it.** | 1 | 2 | 2 | 3 | 1 | 1.1 by 2 | 3.4 | | 77 | 0.5.0 | | | **Teach `bin/metric-bench` Go and TypeScript, rerun it once two projects' comprehension histories name places, and bring into review only a metric that tracks the panel.** | 4 | 2 | 1 | 5 | 6 | 1.1 by 7, 1.4 by 7 | 3.2 | | 4 | 0.5.0 | | | **Name each chunk's archive folder by the chunk's start time, so `/` lists chunks in the order they ran.** | 3 | 2 | 3 | 6 | 3 | 1.1 by 3 | 3.2 | | 187 | 0.5.0 | | | **Count the tokens a worker spends reading reviewers' reports, so goal 1.4's signal shows whether report files lowered what a review costs the worker's context.** | 2 | 2 | 1 | 3 | 3 | 1.4 by 3 | 3.0 | +| 149 | 0.5.0 | | decision | **Fill each release by priority up to a capacity it states, in place of the bar, and move what does not fit to a later release.** | 4 | 2 | 3 | 7 | 5 | 1.1 by 7 | 3.0 | | 165 | 0.5.0 | | | **Make this repo's tests assert the facts a prompt or help text carries in place of its sentences, and drop the tests that scan source or assert a constant.** | 3 | 2 | 1 | 4 | 5 | 1.1 by 4, 1.4 by 3 | 2.9 | +| 151 | 0.5.0 | | decision | **Keep 10 to 20 settled decisions per project as its goals' test set, and rerun them after a goal changes.** | 3 | 2 | 2 | 5 | 5 | 1.2 by 7 | 2.9 | | 156 | 0.5.0 | | decision | **Drop `rank_todo.py`'s ranking of an old-shape table once no project under `~/code` holds one.** | 2 | 1 | 3 | 4 | 4 | 1.1 by 4 | 2.8 | +| 182 | 0.5.0 | | | **Let the human edit an interrupt's answer with the arrow keys, so Left moves the cursor instead of typing ^[[D into the answer.** | 2 | 2 | 1 | 3 | 2 | 1.1 by 2 | 2.8 | +| 201 | 0.5.0 | | owner | **Save the human's tmux setups and restore them after a reboot, so work is up and running again quickly.** | 3 | 2 | 1 | 4 | 4 | 1.5 by 4 | 2.6 | +| 5 | 0.5.0 | | decision | **Key a project on its checkout's full path, and refuse to start while another session uses that key.** | 4 | 2 | 3 | 7 | 5 | 1.1 by 6 | 2.5 | | 155 | 0.5.0 | | | **Lower the reading cost of the files a chunk reads most before its first commit.** | 3 | 2 | 2 | 5 | 5 | 1.4 by 6 | 2.4 | | 51 | 0.5.0 | | principle | **Hand loop-claude's terminal output to an injected effect, so no storage or retry function prints.** | 2 | 1 | 3 | 4 | 5 | 1.1 by 5 | 2.1 | +| 169 | 0.5.0 | | | **Have rule-hook's `todo-rank-check` catch a `todo.md` that the same Bash call edits and then commits.** | 3 | 1 | 3 | 5 | 3 | 1.1 by 2 | 2.1 | +| 197 | 0.5.0 | | | **Let the human edit what they type at loop-claude's terminal questions with the arrow keys, so Left moves the cursor in place of printing `^[[D`.** | 1 | 2 | 3 | 4 | 1 | 1.5 by 1 | 1.5 | +| 174 | 0.5.0 | | | **In a chunk no item routed, ask the worker to name each todo.md item it takes, with its L and E + I, so loop-claude can route on an item it takes in.** | 1 | 2 | 3 | 4 | 2 | 1.1 by 1 | 1.4 | | 52 | 0.5.0 | | principle | **Record why this checkout lives in Claude Code's own directory, or move it out and link it in.** | 4 | 3 | 4 | 9 | 6 | 1.1 by 4 | 0.9 | ## Details @@ -135,88 +135,6 @@ Claude Code's `ScheduleWakeup` tool resumes a session after a delay. While a wak `docs/decisions.md` → `routing: one ladder…` calls the steps lilleman approved on 2026-10-16 a first guess. Once 10 chunks that each shipped one item scored with L, E and I have merged, read `score-outcomes`' rank correlations for L, E and I and the routed-chunks table of `routing-figures.md`, and propose new steps to lilleman, whose call they are. -### 106. Make larv-review's "Do not over-read a clean result" cite a rule that says Renovate or Dependabot owns dependency CVEs, or drop the citation. - -Found by the goals audit of PR #245. `skills/larv-review/SKILL.md` §3 → "Security" says Renovate or Dependabot owns dependency CVEs per `CLAUDE.md` → "Working with the codebase", which says nothing about either. - -### 154. Have `bin/shell_command.py`'s `segments` keep a command's words together across a redirect, so `git > out commit` reads as one git commit. - -`segments('echo hi > f arg')` returns `arg` as a command of its own, and `segments('git > /tmp/x commit -m hi')` returns `git` and `commit -m hi` apart, though the shell runs one `git commit`. rule-hook's commit rules read the commands `segments` finds, so such a commit escapes `commit-one-line`, `no-ai-attribution`, `round-title-counts` and `todo-rank-check`. The comprehension seats' scoring run in PR #280 found it. - -### 186. Point every file a session parks outside its checkout, such as the comprehension panel's detached worktree and a build probe's output, at a folder a headless session has, since loop-claude's sessions have no scratchpad. - -`skills/comprehension-panel/SKILL.md` puts the base version's detached worktree "in your scratchpad", and `CLAUDE.md` → "Working with the codebase" lets a build-probing subagent write "only to the session scratchpad". A probe on 2026-10-18 found no `scratchpad_dir` in a headless `claude -p` session's hook input, and neither the session nor its subagent knew a scratchpad path. larv-review now parks its reports and votes file in the chunk's review folder under `~/.local/state/larv-review/`, per `docs/decisions.md` → `review: each reviewer under agents/ writes its full report into the chunk's review folder`. Found by the architecture review of PR #310. - -### 198. Count, per finished chunk, the findings that arose from misreading code that had already shipped, so code health's counter-signal shows. - -Code health's counter-signal (`CLAUDE.md` → "Shared goal") has no count, since no tool records why a finding arose. Have each reviewer tag a finding that arose because the implementer misread code that had already shipped, and have `score-outcomes` count the tagged findings per finished chunk. Item 110's later fixes stand for the defects that keep reappearing. - -### 59. Bound a run of unfinished verdicts on one chunk, so a worker and judge that disagree cannot cycle unattended without end. - -Raised by the product-owner review of PR #211. The resumed worker gets the judge's quote of the work remaining, but a worker that still thinks the chunk done can answer each cycle the same way, and each cycle costs a worker and a judge run (goal 1.4). - -### 167. Refuse a `/security-review` or `/claude-security` Skill call below the project's rung, as rule-hook refuses such an Agent call. - -rule-hook checks Agent calls (item 163) but no Skill calls. A worker that invokes `/security-review` in its own context, instead of in a subagent, runs the pass on its own rung, and nothing blocks it. Check Skill calls too: `breaches_of` in bin/rule_hook/main.py takes a Skill call whose skill is `security-review` or `claude-security` as a review launch, and settings.json's PreToolUse matcher gains Skill. Found by the systems-architect's review of PR #295. - -### 6. Move what `loop-claude` writes out of `~/.claude.json`, and ask the human about each write that must stay. - -Claude Code owns that file and writes it. `trust` reads it, changes it and writes it back, so a write that lands in between is lost. - -### 66. Hold systems-architect's method thresholds only while the comprehension panel finds the flagged code hard. - -KISS, in `principles/technical-principles.md`, which keeps a limit only while readers find the flagged code hard. `agents/systems-architect.md` makes cyclomatic 7 and 24 lines gate rules from the first commit, a 🔴 unless a reason is stated. - -### 135. Fingerprint only the modules loop-claude imports, so editing another tool's code no longer reloads a running loop. - -The maintainability senior and the inherited architect of PR #257's scoring run named `bin/loop_claude/loop/reload.py:38` `fingerprint` and `:50` `exec_if_edited`: the fingerprint covers every `bin/**/*.py`, so editing `statusline.py` or `rank_todo.py` re-execs a running loop. Make `fingerprint` easier to read. - -### 202. Add `CLAUDE.md` → "Prose"'s rule "Write negations as people say them", with its examples, to `skills/larv-review/standards/prose.md`, so the prose reviewer holds prose to it. - -Found by the prose review of PR #329. `prose.md` opens by calling itself the full rules that `CLAUDE.md` → "Prose" keeps a core of, yet it lacks that rule, so a prose reviewer whose bar is the standards files never sees it. - -### 149. Fill each release by priority up to a capacity it states, in place of the bar, and move what does not fit to a later release. - -A release's capacity is a sum of its items' cost, as the formula counts it. Each project states its own; the human sets the first value per project. Nothing is deleted by score. - -### 151. Keep 10 to 20 settled decisions per project as its goals' test set, and rerun them after a goal changes. - -Each case is a question the project settled and the answer it chose. A fresh-context agent given only the README's premises answers each case; a case it answers differently says the goals no longer decide it. Written guidance can fail to change behaviour, which is why the goals get a test. - -### 182. Let the human edit an interrupt's answer with the arrow keys, so Left moves the cursor instead of typing ^[[D into the answer. - -`bin/loop_claude/cycle/interrupt.py`'s `put_question` reads the answer with `input()`, and nothing under `bin/` imports `readline`, so Left types `^[[D` into the answer the worker gets. Importing `readline` gives line editing, at two costs. It writes the prompt to stdout, not stderr. And its bracketed paste can return several lines, while `prompts.typed_answer` ends the answer at its first blank line and shows the judge the rest as loop-claude's words. Raised by the product-owner review of PR #308. - -### 201. Save the human's tmux setups and restore them after a reboot, so work is up and running again quickly. - -The human asked on 2026-10-21 for tmux support, above all for saving tmux setups. Don't build anything until the human has said exactly what they need. Ask them at least: - -- What a setup holds, such as sessions, windows, panes, each pane's working directory and the command running in it, like one `loop-claude` per project. -- When a setup is saved: on demand or on its own. -- How a setup comes back after a reboot. -- Whether the code that saves and restores setups must work on every machine that takes this checkout (goal 2), which decides whether that code lives in this repo. -- What else tmux support should cover. - -Weigh the widely used tmux-resurrect and tmux-continuum plugins against a script of our own. Then re-score this item from the answers and that choice, and split it into items where it is more than one chunk. - -### 5. Key a project on its checkout's full path, and refuse to start while another session uses that key. - -The key names the project's session, archive folder and models entry. `project_key` drops the leading `/`, so `~/code/a` and `/a` share all three, and one loop can resume or delete the other's session. - -`bin/reading-cost` keys the archive by the main checkout, the parent of git's common dir, since it runs in a chunk's worktree; `loop-claude` keys it by `--show-toplevel`, so a loop started inside a worktree archives where `reading-cost` never looks. Derive both keys one way. - -### 169. Have rule-hook's `todo-rank-check` catch a `todo.md` that the same Bash call edits and then commits. - -The hook judges a call before it runs, and `changed` in `bin/rule_hook/todo_check.py` compares `todo.md` with the index and HEAD as they stand then. A call that edits `todo.md` and commits it, such as a heredoc script followed by `git commit`, passes unchecked: PR #296's commit 149108e did, and the override marker it carried was never logged. larv-review's gate still runs `rank_todo.py --check`, so an unranked plan stops at merge rather than at commit. A git pre-commit hook would see the staged file. - -### 197. Let the human edit what they type at loop-claude's terminal questions with the arrow keys, so Left moves the cursor in place of printing `^[[D`. - -`bin/loop_claude/effects.py` reads each answer with Python's builtin `input`, and nothing imports `readline`, so the terminal gets no line editing: fixing a typo means erasing back to it. Importing `readline` in `effects.py` gives `input` that editing, for the interrupt's answer and the question that asks for the project's model alike. lilleman, 2026-10-18: "Not super-important, but a bit irritating." - -### 174. In a chunk no item routed, ask the worker to name each todo.md item it takes, with its L and E + I, so loop-claude can route on an item it takes in. - -The principles pass of PR #301 found that only `routed_by` in `bin/loop_claude/cycle/prompts.py` asks the worker to name each item it takes with its L and E + I, and `fresh` uses it only where an item routed the chunk. In an unrouted chunk the judge has no levels to report, so neither the taken-in L nor the taken-in E + I lifts the worker, the reviewers or the judge, and the first prompt names no reviewers' rung for a higher E + I. - ### 117. Give `todo_table.items` one way to say a plan has no items table, so no caller tells it from an empty plan by truthiness. The comprehension seats on PR #254 found `items` returning a list, None or a Failure, and `larv_review/plan.py` `plan_reasons` reading None through `items(before) or []`, which works only because a Failure is truthy. @@ -257,6 +175,38 @@ Mid A of PR #257's scoring run named `bin/larv_review/ruling.py:8` `votes`. It c Raised by the prose pass of PR #302: the help, the docstring of `bin/loop_claude/loop/main.py`, is 145 lines, and its routing paragraph one block of 39, from the ladder through the judge's rung to the routing figures. A reader looking for one rule, such as when the worker steps up, reads it all. The comprehension seats already found the help hard (`larv-review places`: "loop-claude --help": a 120-line contract with no pointers to the modules it maps onto). +### 106. Make larv-review's "Do not over-read a clean result" cite a rule that says Renovate or Dependabot owns dependency CVEs, or drop the citation. + +Found by the goals audit of PR #245. `skills/larv-review/SKILL.md` §3 → "Security" says Renovate or Dependabot owns dependency CVEs per `CLAUDE.md` → "Working with the codebase", which says nothing about either. + +### 154. Have `bin/shell_command.py`'s `segments` keep a command's words together across a redirect, so `git > out commit` reads as one git commit. + +`segments('echo hi > f arg')` returns `arg` as a command of its own, and `segments('git > /tmp/x commit -m hi')` returns `git` and `commit -m hi` apart, though the shell runs one `git commit`. rule-hook's commit rules read the commands `segments` finds, so such a commit escapes `commit-one-line`, `no-ai-attribution`, `round-title-counts` and `todo-rank-check`. The comprehension seats' scoring run in PR #280 found it. + +### 186. Point every file a session parks outside its checkout, such as the comprehension panel's detached worktree and a build probe's output, at a folder a headless session has, since loop-claude's sessions have no scratchpad. + +`skills/comprehension-panel/SKILL.md` puts the base version's detached worktree "in your scratchpad", and `CLAUDE.md` → "Working with the codebase" lets a build-probing subagent write "only to the session scratchpad". A probe on 2026-10-18 found no `scratchpad_dir` in a headless `claude -p` session's hook input, and neither the session nor its subagent knew a scratchpad path. larv-review now parks its reports and votes file in the chunk's review folder under `~/.local/state/larv-review/`, per `docs/decisions.md` → `review: each reviewer under agents/ writes its full report into the chunk's review folder`. Found by the architecture review of PR #310. + +### 198. Count, per finished chunk, the findings that arose from misreading code that had already shipped, so code health's counter-signal shows. + +Code health's counter-signal (`CLAUDE.md` → "Shared goal") has no count, since no tool records why a finding arose. Have each reviewer tag a finding that arose because the implementer misread code that had already shipped, and have `score-outcomes` count the tagged findings per finished chunk. Item 110's later fixes stand for the defects that keep reappearing. + +### 59. Bound a run of unfinished verdicts on one chunk, so a worker and judge that disagree cannot cycle unattended without end. + +Raised by the product-owner review of PR #211. The resumed worker gets the judge's quote of the work remaining, but a worker that still thinks the chunk done can answer each cycle the same way, and each cycle costs a worker and a judge run (goal 1.4). + +### 167. Refuse a `/security-review` or `/claude-security` Skill call below the project's rung, as rule-hook refuses such an Agent call. + +rule-hook checks Agent calls (item 163) but no Skill calls. A worker that invokes `/security-review` in its own context, instead of in a subagent, runs the pass on its own rung, and nothing blocks it. Check Skill calls too: `breaches_of` in bin/rule_hook/main.py takes a Skill call whose skill is `security-review` or `claude-security` as a review launch, and settings.json's PreToolUse matcher gains Skill. Found by the systems-architect's review of PR #295. + +### 6. Move what `loop-claude` writes out of `~/.claude.json`, and ask the human about each write that must stay. + +Claude Code owns that file and writes it. `trust` reads it, changes it and writes it back, so a write that lands in between is lost. + +### 66. Hold systems-architect's method thresholds only while the comprehension panel finds the flagged code hard. + +KISS, in `principles/technical-principles.md`, which keeps a limit only while readers find the flagged code hard. `agents/systems-architect.md` makes cyclomatic 7 and 24 lines gate rules from the first commit, a 🔴 unless a reason is stated. + ### 1. Say in README → Install how the transcript archive is backed up, once bender-infra backs up ai-sandbox's data volume. It lives under `~/.claude`, which `.gitignore` keeps from the remote, so a lost disk loses every unattended run's record. Back it up only to a destination private to me and encrypted at rest: the worker runs with permissions bypassed, so the archived tool results can hold credentials it read. @@ -381,6 +331,10 @@ The repo has no CI, so larv-review's gate is the local run, and larv-review's Ga When CI runs a rule check, such as one of `bin/rule-hook`'s, let `` in the PR body override it. +### 135. Fingerprint only the modules loop-claude imports, so editing another tool's code no longer reloads a running loop. + +The maintainability senior and the inherited architect of PR #257's scoring run named `bin/loop_claude/loop/reload.py:38` `fingerprint` and `:50` `exec_if_edited`: the fingerprint covers every `bin/**/*.py`, so editing `statusline.py` or `rank_todo.py` re-execs a running loop. Make `fingerprint` easier to read. + ### 171. Group the routing figures' review rounds by the reviewers' rung as well as the worker's, so a call blames a rung only for rounds its own reviews raised. Raised by the goals audit of PR #296. `bin/routing_figures/measure.py` groups a chunk's review rounds by the rung its worker started on, and calls for a routing change when a lower rung took more of them. Since PR #296 the reviewers may run above the worker's rung, on the one their item's E + I picks, and no figure groups rounds by it, though the archived worker line names the E + I it follows from. A cheap worker on an item of high E + I gets stronger reviewers, who may raise more rounds, and a call could then blame the worker's rung for them: an interrupt of lilleman that settles nothing (goal 1.2). @@ -411,6 +365,10 @@ Found by review of PR #317. `bin/rank_todo.py`'s `readme_goals` writes `typing.c Found by review of PR #317. `bin/loop_claude/test_black_box.py:569-575` sets `resets_at` from the test's `time.time()` and expects the wait, rounded to tens, to be 3720. When more than about 5 s pass between that read and the loop's, the wait rounds to 3710 and the test fails with no bug. Item 102 covers only replacing the `time.sleep` swap; this item changes the expected value, for example by asserting the wait against `resets_at + 120` minus the time the loop read, or a bound on it. +### 202. Add `CLAUDE.md` → "Prose"'s rule "Write negations as people say them", with its examples, to `skills/larv-review/standards/prose.md`, so the prose reviewer holds prose to it. + +Found by the prose review of PR #329. `prose.md` opens by calling itself the full rules that `CLAUDE.md` → "Prose" keeps a core of, yet it lacks that rule, so a prose reviewer whose bar is the standards files never sees it. + ### 77. Teach `bin/metric-bench` Go and TypeScript, rerun it once two projects' comprehension histories name places, and bring into review only a metric that tracks the panel. 2026-10-08, lilleman: no metric enters review until a rerun on more data shows it tracking the panel. @@ -449,14 +407,44 @@ Today the folder is the SHA-256 of the transcript's first timestamped line, whic Before PR #310, reports reached the worker as the Agent call's result, a median 19k tokens per chunk (2026-10-08, 68 archived transcripts). Now a reviewer returns its verdict and one line per finding, and the worker reads a 🔴 or 🟡 finding's entry from the report file. `reading-cost` counts only tracked files (`bin/reading_cost/measure.py`), and `routing-figures` counts only the Agent call's result (`bin/routing_figures/measure.py`), so neither sees the report reads. Found by the architecture review of PR #310. +### 149. Fill each release by priority up to a capacity it states, in place of the bar, and move what does not fit to a later release. + +A release's capacity is a sum of its items' cost, as the formula counts it. Each project states its own; the human sets the first value per project. Nothing is deleted by score. + ### 165. Make this repo's tests assert the facts a prompt or help text carries in place of its sentences, and drop the tests that scan source or assert a constant. A test audit across lilleman's projects on 2026-10-16 found 10 of 33 sampled tests in this repo pinning wording that is not the contract. Examples of these and other weak tests: `bin/loop_claude/test_loop_claude.py:165`, `:271` and most asserts in `:664` to `:687` pin whole sentences of the question, archive or prompt text, up to about 750 characters, and `:864` asserts help-text wording. `:906` and `:936` parse the source with `ast` and list each `Stop(...)` and `Failure(...)` call by function name. `bin/model_routing/test_ladder.py:16` asserts `len(LADDER) == 11`. Rewrite each to the technical principles' test bullet: assert the facts the text must carry, such as an item ID, a rung or a model argument, and delete a test no real bug could fail. Before and after rewriting a test, run the mutation tool on the code it covers: every mutant the old test killed, the new one kills. +### 151. Keep 10 to 20 settled decisions per project as its goals' test set, and rerun them after a goal changes. + +Each case is a question the project settled and the answer it chose. A fresh-context agent given only the README's premises answers each case; a case it answers differently says the goals no longer decide it. Written guidance can fail to change behaviour, which is why the goals get a test. + ### 156. Drop `rank_todo.py`'s ranking of an old-shape table once no project under `~/code` holds one. While `rank_todo.py` ranks two shapes, projects follow two sets of scoring rules, against goal 1.3. Once every project has reshaped, drop `OLD_SHAPE`'s weighing from `rank_todo.py`, `RESHAPE`, and the old shape's lines in `rank_todo.py --help` and `rules/todo-items.md`. Keep `todo_table` reading old tables: `score_outcomes` reads every past merge's `todo.md`. PR #283's paired ruling found the old-shape path made `rank_todo.py`'s `score`, `Scoring.weights`, `unknown_columns` and `todo_table.py`'s `Moves` harder to read; leave each easier, with one shape and moves that are always moves, and the Moves cell's rules in one place. +### 182. Let the human edit an interrupt's answer with the arrow keys, so Left moves the cursor instead of typing ^[[D into the answer. + +`bin/loop_claude/cycle/interrupt.py`'s `put_question` reads the answer with `input()`, and nothing under `bin/` imports `readline`, so Left types `^[[D` into the answer the worker gets. Importing `readline` gives line editing, at two costs. It writes the prompt to stdout, not stderr. And its bracketed paste can return several lines, while `prompts.typed_answer` ends the answer at its first blank line and shows the judge the rest as loop-claude's words. Raised by the product-owner review of PR #308. + +### 201. Save the human's tmux setups and restore them after a reboot, so work is up and running again quickly. + +The human asked on 2026-10-21 for tmux support, above all for saving tmux setups. Don't build anything until the human has said exactly what they need. Ask them at least: + +- What a setup holds, such as sessions, windows, panes, each pane's working directory and the command running in it, like one `loop-claude` per project. +- When a setup is saved: on demand or on its own. +- How a setup comes back after a reboot. +- Whether the code that saves and restores setups must work on every machine that takes this checkout (goal 2), which decides whether that code lives in this repo. +- What else tmux support should cover. + +Weigh the widely used tmux-resurrect and tmux-continuum plugins against a script of our own. Then re-score this item from the answers and that choice, and split it into items where it is more than one chunk. + +### 5. Key a project on its checkout's full path, and refuse to start while another session uses that key. + +The key names the project's session, archive folder and models entry. `project_key` drops the leading `/`, so `~/code/a` and `/a` share all three, and one loop can resume or delete the other's session. + +`bin/reading-cost` keys the archive by the main checkout, the parent of git's common dir, since it runs in a chunk's worktree; `loop-claude` keys it by `--show-toplevel`, so a loop started inside a worktree archives where `reading-cost` never looks. Derive both keys one way. + ### 155. Lower the reading cost of the files a chunk reads most before its first commit. `bin/reading-cost` on 2026-10-18: the median of the last 5 chunks is 163,028 new input tokens before their first commit, up from 100,998 for the 5 before them. Read most over the last 5, by opens and searches: `rules/decisions.md` 1. The chunk that ships this item runs `bin/reading-cost --reset`. @@ -465,6 +453,18 @@ While `rank_todo.py` ranks two shapes, projects follow two sets of scoring rules "Functional core, imperative shell", in `principles/technical-principles.md`: `archive`, `trust`, `retried`, the worker, `put_question` and `model_choice` print to stderr themselves, and the tests swap the global stream. +### 169. Have rule-hook's `todo-rank-check` catch a `todo.md` that the same Bash call edits and then commits. + +The hook judges a call before it runs, and `changed` in `bin/rule_hook/todo_check.py` compares `todo.md` with the index and HEAD as they stand then. A call that edits `todo.md` and commits it, such as a heredoc script followed by `git commit`, passes unchecked: PR #296's commit 149108e did, and the override marker it carried was never logged. larv-review's gate still runs `rank_todo.py --check`, so an unranked plan stops at merge rather than at commit. A git pre-commit hook would see the staged file. + +### 197. Let the human edit what they type at loop-claude's terminal questions with the arrow keys, so Left moves the cursor in place of printing `^[[D`. + +`bin/loop_claude/effects.py` reads each answer with Python's builtin `input`, and nothing imports `readline`, so the terminal gets no line editing: fixing a typo means erasing back to it. Importing `readline` in `effects.py` gives `input` that editing, for the interrupt's answer and the question that asks for the project's model alike. lilleman, 2026-10-18: "Not super-important, but a bit irritating." + +### 174. In a chunk no item routed, ask the worker to name each todo.md item it takes, with its L and E + I, so loop-claude can route on an item it takes in. + +The principles pass of PR #301 found that only `routed_by` in `bin/loop_claude/cycle/prompts.py` asks the worker to name each item it takes with its L and E + I, and `fresh` uses it only where an item routed the chunk. In an unrouted chunk the judge has no levels to report, so neither the taken-in L nor the taken-in E + I lifts the worker, the reviewers or the judge, and the first prompt names no reviewers' rung for a higher E + I. + ### 52. Record why this checkout lives in Claude Code's own directory, or move it out and link it in. "One owner per value" and "Prefer the vendor-neutral option", in `principles/technical-principles.md`: git, Claude Code and loop-claude all write `~/.claude`, kept apart only by the `.gitignore` allowlist, and the repo's records live in a vendor directory. From dcc7149a020a517019f1b7dc052f9dc171608c9f Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Wed, 21 Oct 2026 18:44:06 +0200 Subject: [PATCH 08/47] Merge item 182 into item 197, which names the file both questions read through --- todo.md | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/todo.md b/todo.md index f744ff8d..5ea6fe33 100644 --- a/todo.md +++ b/todo.md @@ -83,14 +83,13 @@ | 165 | 0.5.0 | | | **Make this repo's tests assert the facts a prompt or help text carries in place of its sentences, and drop the tests that scan source or assert a constant.** | 3 | 2 | 1 | 4 | 5 | 1.1 by 4, 1.4 by 3 | 2.9 | | 151 | 0.5.0 | | decision | **Keep 10 to 20 settled decisions per project as its goals' test set, and rerun them after a goal changes.** | 3 | 2 | 2 | 5 | 5 | 1.2 by 7 | 2.9 | | 156 | 0.5.0 | | decision | **Drop `rank_todo.py`'s ranking of an old-shape table once no project under `~/code` holds one.** | 2 | 1 | 3 | 4 | 4 | 1.1 by 4 | 2.8 | -| 182 | 0.5.0 | | | **Let the human edit an interrupt's answer with the arrow keys, so Left moves the cursor instead of typing ^[[D into the answer.** | 2 | 2 | 1 | 3 | 2 | 1.1 by 2 | 2.8 | | 201 | 0.5.0 | | owner | **Save the human's tmux setups and restore them after a reboot, so work is up and running again quickly.** | 3 | 2 | 1 | 4 | 4 | 1.5 by 4 | 2.6 | | 5 | 0.5.0 | | decision | **Key a project on its checkout's full path, and refuse to start while another session uses that key.** | 4 | 2 | 3 | 7 | 5 | 1.1 by 6 | 2.5 | | 155 | 0.5.0 | | | **Lower the reading cost of the files a chunk reads most before its first commit.** | 3 | 2 | 2 | 5 | 5 | 1.4 by 6 | 2.4 | | 51 | 0.5.0 | | principle | **Hand loop-claude's terminal output to an injected effect, so no storage or retry function prints.** | 2 | 1 | 3 | 4 | 5 | 1.1 by 5 | 2.1 | | 169 | 0.5.0 | | | **Have rule-hook's `todo-rank-check` catch a `todo.md` that the same Bash call edits and then commits.** | 3 | 1 | 3 | 5 | 3 | 1.1 by 2 | 2.1 | -| 197 | 0.5.0 | | | **Let the human edit what they type at loop-claude's terminal questions with the arrow keys, so Left moves the cursor in place of printing `^[[D`.** | 1 | 2 | 3 | 4 | 1 | 1.5 by 1 | 1.5 | | 174 | 0.5.0 | | | **In a chunk no item routed, ask the worker to name each todo.md item it takes, with its L and E + I, so loop-claude can route on an item it takes in.** | 1 | 2 | 3 | 4 | 2 | 1.1 by 1 | 1.4 | +| 197 | 0.5.0 | | | **Let the human edit what they type at loop-claude's terminal questions with the arrow keys, so Left moves the cursor in place of printing `^[[D`.** | 2 | 2 | 3 | 5 | 2 | 1.5 by 1 | 1.3 | | 52 | 0.5.0 | | principle | **Record why this checkout lives in Claude Code's own directory, or move it out and link it in.** | 4 | 3 | 4 | 9 | 6 | 1.1 by 4 | 0.9 | ## Details @@ -423,10 +422,6 @@ Each case is a question the project settled and the answer it chose. A fresh-con While `rank_todo.py` ranks two shapes, projects follow two sets of scoring rules, against goal 1.3. Once every project has reshaped, drop `OLD_SHAPE`'s weighing from `rank_todo.py`, `RESHAPE`, and the old shape's lines in `rank_todo.py --help` and `rules/todo-items.md`. Keep `todo_table` reading old tables: `score_outcomes` reads every past merge's `todo.md`. PR #283's paired ruling found the old-shape path made `rank_todo.py`'s `score`, `Scoring.weights`, `unknown_columns` and `todo_table.py`'s `Moves` harder to read; leave each easier, with one shape and moves that are always moves, and the Moves cell's rules in one place. -### 182. Let the human edit an interrupt's answer with the arrow keys, so Left moves the cursor instead of typing ^[[D into the answer. - -`bin/loop_claude/cycle/interrupt.py`'s `put_question` reads the answer with `input()`, and nothing under `bin/` imports `readline`, so Left types `^[[D` into the answer the worker gets. Importing `readline` gives line editing, at two costs. It writes the prompt to stdout, not stderr. And its bracketed paste can return several lines, while `prompts.typed_answer` ends the answer at its first blank line and shows the judge the rest as loop-claude's words. Raised by the product-owner review of PR #308. - ### 201. Save the human's tmux setups and restore them after a reboot, so work is up and running again quickly. The human asked on 2026-10-21 for tmux support, above all for saving tmux setups. Don't build anything until the human has said exactly what they need. Ask them at least: @@ -457,14 +452,14 @@ The key names the project's session, archive folder and models entry. `project_k The hook judges a call before it runs, and `changed` in `bin/rule_hook/todo_check.py` compares `todo.md` with the index and HEAD as they stand then. A call that edits `todo.md` and commits it, such as a heredoc script followed by `git commit`, passes unchecked: PR #296's commit 149108e did, and the override marker it carried was never logged. larv-review's gate still runs `rank_todo.py --check`, so an unranked plan stops at merge rather than at commit. A git pre-commit hook would see the staged file. -### 197. Let the human edit what they type at loop-claude's terminal questions with the arrow keys, so Left moves the cursor in place of printing `^[[D`. - -`bin/loop_claude/effects.py` reads each answer with Python's builtin `input`, and nothing imports `readline`, so the terminal gets no line editing: fixing a typo means erasing back to it. Importing `readline` in `effects.py` gives `input` that editing, for the interrupt's answer and the question that asks for the project's model alike. lilleman, 2026-10-18: "Not super-important, but a bit irritating." - ### 174. In a chunk no item routed, ask the worker to name each todo.md item it takes, with its L and E + I, so loop-claude can route on an item it takes in. The principles pass of PR #301 found that only `routed_by` in `bin/loop_claude/cycle/prompts.py` asks the worker to name each item it takes with its L and E + I, and `fresh` uses it only where an item routed the chunk. In an unrouted chunk the judge has no levels to report, so neither the taken-in L nor the taken-in E + I lifts the worker, the reviewers or the judge, and the first prompt names no reviewers' rung for a higher E + I. +### 197. Let the human edit what they type at loop-claude's terminal questions with the arrow keys, so Left moves the cursor in place of printing `^[[D`. + +`bin/loop_claude/effects.py` hands loop-claude Python's builtin `input`, and nothing under `bin/` imports `readline`, so the terminal gets no line editing: Left prints `^[[D` into the answer, and fixing a typo means erasing back to it. Both questions loop-claude asks read through it: the interrupt's answer in `cycle/interrupt.py`'s `put_question`, and the project's model in `project/model_choice.py`. Importing `readline` in `effects.py` gives both line editing, at two costs. It writes the prompt to stdout, not stderr. And its bracketed paste can return several lines, while `prompts.typed_answer` ends the answer at its first blank line and shows the judge the rest as loop-claude's words. The product-owner review of PR #308 raised this. lilleman, 2026-10-18: "Not super-important, but a bit irritating." + ### 52. Record why this checkout lives in Claude Code's own directory, or move it out and link it in. "One owner per value" and "Prefer the vendor-neutral option", in `principles/technical-principles.md`: git, Claude Code and loop-claude all write `~/.claude`, kept apart only by the `.gitignore` allowlist, and the repo's records live in a vendor directory. From 747f28adf5825afb1c387f28f1750d0b398a664b Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Wed, 21 Oct 2026 18:48:26 +0200 Subject: [PATCH 09/47] =?UTF-8?q?Answer=20prose=20round=201:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=203=20=F0=9F=9F=A1;=20say=20what=20each=20readlin?= =?UTF-8?q?e=20cost=20breaks,=20and=20name=20both=20questions'=20readers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- todo.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/todo.md b/todo.md index 5ea6fe33..fc69b1b7 100644 --- a/todo.md +++ b/todo.md @@ -458,7 +458,7 @@ The principles pass of PR #301 found that only `routed_by` in `bin/loop_claude/c ### 197. Let the human edit what they type at loop-claude's terminal questions with the arrow keys, so Left moves the cursor in place of printing `^[[D`. -`bin/loop_claude/effects.py` hands loop-claude Python's builtin `input`, and nothing under `bin/` imports `readline`, so the terminal gets no line editing: Left prints `^[[D` into the answer, and fixing a typo means erasing back to it. Both questions loop-claude asks read through it: the interrupt's answer in `cycle/interrupt.py`'s `put_question`, and the project's model in `project/model_choice.py`. Importing `readline` in `effects.py` gives both line editing, at two costs. It writes the prompt to stdout, not stderr. And its bracketed paste can return several lines, while `prompts.typed_answer` ends the answer at its first blank line and shows the judge the rest as loop-claude's words. The product-owner review of PR #308 raised this. lilleman, 2026-10-18: "Not super-important, but a bit irritating." +`bin/loop_claude/effects.py` hands loop-claude Python's builtin `input`, and nothing under `bin/` imports `readline`, so the terminal gets no line editing: fixing a typo means erasing back to it. `effects.input` reads the answer to both of loop-claude's questions: the interrupt, in `cycle/interrupt.py`'s `put_question`, and the pick of the project's model, in `project/model_choice.py`'s `ask_for_model`. Importing `readline` in `effects.py` gives both line editing, at two costs. It moves the prompt from stderr to stdout, while the question above it stays on stderr. `test_black_box.py` waits for the prompt on stderr. `readline`'s bracketed paste takes a pasted block whole, so an answer can hold several lines. `prompts.typed_answer` ends the answer at its first blank line, so the judge would read the rest of such a paste as loop-claude's words. The product-owner review of PR #308 raised the interrupt's case. lilleman, 2026-10-18: "Not super-important, but a bit irritating." ### 52. Record why this checkout lives in Claude Code's own directory, or move it out and link it in. From bff8872e9b30b71d32b1fa6c6a17891700e740b3 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Wed, 21 Oct 2026 19:02:33 +0200 Subject: [PATCH 10/47] Append the reading-cost figure of the last finished chunk --- docs/reading-cost.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/reading-cost.md b/docs/reading-cost.md index 2a64d35f..5e3c4762 100644 --- a/docs/reading-cost.md +++ b/docs/reading-cost.md @@ -677,3 +677,7 @@ Read most (opens and searches): Read most (opens and searches): - `rules/decisions.md` 1 + +## Reading cost, chunk 299b4aa74f32, finished 2026-10-21T16:53:41Z + +250555 new input tokens before the first commit. From 1a1da8f94dd593d3788babacdce823248a97a466 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Wed, 21 Oct 2026 19:02:38 +0200 Subject: [PATCH 11/47] Retitle the comprehension-floor decision to say the floor doesn't block anything, define the comprehension terms and explain OVERRIDE --- AGENTS.md | 2 +- CLAUDE.md | 5 +++++ bin/rule_hook/rules.py | 2 ++ docs/decisions.md | 2 +- todo.md | 23 ++++------------------- 5 files changed, 13 insertions(+), 21 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 67c7940b..f15753ee 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -2,7 +2,7 @@ Decisions live in `docs/decisions.md`: -- larv-review: a project lifting itself to the comprehension floor starts at the lowest dimension +- larv-review: a chunk lifting a project towards the comprehension floor works first on the project's lowest-scoring dimension, and the floor blocks nothing - 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 - loop-claude: one session per project, its id derived from the checkout's path relative to `~/code`, or to `/` outside it - loop-claude: before it opens claude on the terminal, it marks the checkout and each of its worktrees trusted in `~/.claude.json` diff --git a/CLAUDE.md b/CLAUDE.md index c2d75402..3dabd138 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -109,13 +109,18 @@ The rules only reviewers apply, for quality, comments, READMEs and prose, live i - **gate** — the merge gate: the checks a PR passes before it merges. - **interrupt** — `loop-claude` asking the human, on its terminal, for a decision that is theirs. They type a one-line answer, or `/talk` to open the worker's session with `claude --resume`; a release ready to cut opens that session at once, and a routing call opens claude in `~/.claude`. - **judge** — the headless claude that reads a worker's transcript each cycle and decides whether to interrupt and whether the chunk is finished. +- **judge's records** — the files the judge reads beside the README's premises: the project's `AGENTS.md` and `docs/decisions.md`, then the human's `CLAUDE.md` and the `.md` files in `rules/` and `skills/larv-review/standards/`. +- **paired ruling** — each simulated reader votes whether the project reads better, the same or worse at the branch's head than at the base commit, the last measured one. A ruling needs a lead of two or more votes, else it is same. - **pass** — one kind of review a chunk may take, run in rounds by its reviewers until clean; `larv-review` §3 lists them. +- **place** — the smallest unit a simulated reader names as hard to read: a function or a section heading, with its `path:line`. - **plan** — `todo.md`. - **premises** — the goals and audience under `## Goals` and `## Audience` in the project's `README.md`, with code health ("Shared goal") first among the goals unless the README voids it. - **project's rung** — the cheapest rung on loop-claude's routing ladder of the project's model, which is the model loop-claude's prompt names as the project's, or else your own. - **release** — a semver version the human cuts. - **reviewer** — a reporter of findings: an agent under `~/.claude/agents/`, `/security-review` or a forge's auto-reviewer. - **round cap** — the rounds one pass may take per chunk; `larv-review` §3 → "Round cap". +- **scoring run** — four simulated readers (Junior A, Mid A, the maintainability senior and the inherited architect) each score the project from 1 to 10, overall and on four dimensions: Navigation, Locality, Shape and Self-sufficiency. `larv-review needs-scoring-run` says when one is due. +- **seat** — one simulated reader of the comprehension panel, launched per `~/.claude/skills/comprehension-panel/SKILL.md`, that reads the whole project, not the diff. - **session** — a Claude Code session: one id, what `claude --resume` continues. - **trigger** — the condition under which a review pass runs on a change it has not seen; `larv-review` §3 lists them. - **worker** — the headless claude that runs the task in a cycle, in the chunk's session. diff --git a/bin/rule_hook/rules.py b/bin/rule_hook/rules.py index f8822339..0fd2f4d7 100644 --- a/bin/rule_hook/rules.py +++ b/bin/rule_hook/rules.py @@ -61,6 +61,8 @@ RULES: dict[RuleName, Rule] = { "a git commit in a checkout whose todo.md has changes", ), } +# The lookahead ends each reason at the next marker on its line, or at the line's end. The reason is lazy, so it stops there rather than at the last marker. +# An HTML marker's closing `-->` stays in its reason; `overrides` strips it. OVERRIDE = re.compile(r"(?:#|` is stripped.** | 1 | 2 | 1 | 2 | 1 | code health by 4, 1.4 by 4 | 35.1 | | 114 | 0.3.0 | | decision | **Run git through `git_repo.py` in `rule_hook`, `metric_bench`, `reading_cost`, `review_replay` and `loop_claude`, keeping rule-hook's guards as an option, so one module owns how a tool runs git.** | 3 | 1 | 3 | 5 | 4 | code health by 9, 1.4 by 9 | 32.9 | | 120 | 0.3.0 | | | **Rewrite larv-review §3's "Round cap" and "Re-entry" as one table that says, for each kind of fix, which passes rerun and what a round reviews.** | 2 | 2 | 3 | 5 | 4 | code health by 6, 1.2 by 6, 1.4 by 6 | 26.0 | | 21 | 0.3.0 | | defect | **Give `settings.json`'s model one writer, and sort its keys.** | 3 | 3 | 3 | 7 | 3 | 2 by 5 | 22.5 | @@ -94,21 +91,9 @@ ## Details -### 119. Retitle the comprehension-floor decision so it says a chunk lifting a project towards the floor works first on its lowest-scoring dimension, and that the floor blocks nothing. - -Today's title, "a project lifting itself to the comprehension floor starts at the lowest dimension", reads as either where the project scores or where work begins. Beside the title saying the check blocks no merge, a reader cannot tell whether `Floor:` means stop; a seat named `AGENTS.md:5` among the places it found hard. "First" means within such a chunk, not across a release: since the decision's 2026-10-16 line, items that lift the lowest dimension compete with the others like any item. - -### 127. Define seat, place, paired ruling, scoring run and the judge's records in `CLAUDE.md` → "Vocabulary". - -Two seats of PR #257's scoring run assembled these terms from four files: `bin/larv_review/main.py`'s help, `skills/larv-review/SKILL.md:99`, `bin/comprehension_history.py:82` and `skills/comprehension-panel/seat-prompts.md`. "Records" is defined only in a comment at `bin/loop_claude/project/records.py:6`. - -### 129. Explain `bin/rule_hook/rules.py`'s `OVERRIDE` pattern beside it: why the reason is lazy, what the lookahead splits and why `-->` is stripped. - -The maintainability senior of PR #257's scoring run named `bin/rule_hook/rules.py:49` `OVERRIDE`: nothing in the code explains the pattern. Make `OVERRIDE` easier to read. - ### 114. Run git through `git_repo.py` in `rule_hook`, `metric_bench`, `reading_cost`, `review_replay` and `loop_claude`, keeping rule-hook's guards as an option, so one module owns how a tool runs git. -Shape is the lowest dimension, so this item moves code health by 9, per `docs/decisions.md` → `larv-review: a project lifting itself to the comprehension floor starts at the lowest dimension`. +Shape is the lowest dimension, so this item moves code health by 9, per `docs/decisions.md` → `larv-review: a chunk lifting a project towards the comprehension floor works first on the project's lowest-scoring dimension, and the floor blocks nothing`. The comprehension seats on PR #254 found five git runners with different contracts: `git_repo.git`, `rule_hook/git.py`'s guarded one, `metric_bench/main.py`'s, `reading_cost/main.py`'s `located` and `loop_claude/effects.py`'s. PR #276 added a sixth, `review_replay/main.py`'s `git`. The inherited architect of PR #257's scoring run named `bin/git_repo.py:8` `git` again. Make `git_repo.git` easier to read. @@ -216,7 +201,7 @@ The README line covers the bench's transcripts in `workflow-bench/logs/` too (go ### 125. Give "record", "outcome" and "places" one meaning each across `bin/`, and rename `bin/larv_review/git.py` by what it holds. -Shape is the lowest dimension, so this item moves code health by 9, per `docs/decisions.md` → `larv-review: a project lifting itself to the comprehension floor starts at the lowest dimension`. +Shape is the lowest dimension, so this item moves code health by 9, per `docs/decisions.md` → `larv-review: a chunk lifting a project towards the comprehension floor works first on the project's lowest-scoring dimension, and the floor blocks nothing`. The inherited architect of PR #257's scoring run named `bin/reading_cost/measure.py:16` `Reading` and `bin/larv_review/git.py:6` `history_changes`, and found each word used for several concepts. "Record": the history writer `larv_review/record.py`, the judge's `loop_claude/project/records.py`, and `reading_cost/figures.py`'s `RECORD`. "Outcome": `transcript_archive/outcomes.py`, `score_outcomes/outcomes.py` `Outcome` and `rule_hook/rules.py` `Outcome`. "Places": `comprehension_history.Place` and `Reading.places`. `larv_review/git.py` holds history logic, not a git runner. Make `Reading` and `history_changes` easier to read. @@ -242,7 +227,7 @@ Three seats of PR #257's scoring run named `bin/comprehension_history.py:106` `l ### 124. Group the shared modules at `bin/`'s root into packages named by purpose, so the root holds only launchers and stand-alone tools. -Shape is the lowest dimension, so this item moves code health by 9, per `docs/decisions.md` → `larv-review: a project lifting itself to the comprehension floor starts at the lowest dimension`. +Shape is the lowest dimension, so this item moves code health by 9, per `docs/decisions.md` → `larv-review: a chunk lifting a project towards the comprehension floor works first on the project's lowest-scoring dimension, and the floor blocks nothing`. PR #257's scoring run put Shape at 6.25, the lowest dimension. `bin/` holds about 30 entries: 6 launchers, 6 tool packages, 3 shared packages and 15 root modules. Two root modules are tools (`rank_todo.py`, `statusline.py`) and 13 are shared libraries, and nothing in the layout tells them apart; only README's import-root paragraph maps them. Candidate packages: git running and parsing, the todo table with `rank_todo.py`'s formula language and goal weighing, and the comprehension history with round titles. `rank_todo.py` keeps its path, which every project's rules name. The `.gitignore` allowlist and README follow the move. @@ -442,7 +427,7 @@ The key names the project's session, archive folder and models entry. `project_k ### 155. Lower the reading cost of the files a chunk reads most before its first commit. -`bin/reading-cost` on 2026-10-18: the median of the last 5 chunks is 163,028 new input tokens before their first commit, up from 100,998 for the 5 before them. Read most over the last 5, by opens and searches: `rules/decisions.md` 1. The chunk that ships this item runs `bin/reading-cost --reset`. +`bin/reading-cost` on 2026-10-21: the median of the last 5 chunks is 163,028 new input tokens before their first commit, up from 133,110 for the 5 before them. Read most over the last 5, by opens and searches: `rules/decisions.md` 1. The chunk that ships this item runs `bin/reading-cost --reset`. ### 51. Hand loop-claude's terminal output to an injected effect, so no storage or retry function prints. From b20dc28f5b5759b1e5e9415f580c6f1119ae6849 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Wed, 21 Oct 2026 19:19:59 +0200 Subject: [PATCH 12/47] =?UTF-8?q?Answer=20principles=20round=201:=201=20?= =?UTF-8?q?=F0=9F=94=B4,=206=20=F0=9F=9F=A1;=20correct=20the=20OVERRIDE=20?= =?UTF-8?q?comment,=20scope=20the=20floor=20title=20to=20the=20chunk=20and?= =?UTF-8?q?=20file=20the=20citation=20check?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AGENTS.md | 2 +- CLAUDE.md | 12 ++++++------ bin/rule_hook/rules.py | 2 +- docs/decisions.md | 2 +- todo.md | 13 +++++++++---- 5 files changed, 18 insertions(+), 13 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index f15753ee..522a3988 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -2,7 +2,7 @@ Decisions live in `docs/decisions.md`: -- larv-review: a chunk lifting a project towards the comprehension floor works first on the project's lowest-scoring dimension, and the floor blocks nothing +- larv-review: within a chunk lifting a project towards the comprehension floor, work on the project's lowest-scoring dimension comes first, and the floor doesn't block anything - 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 - loop-claude: one session per project, its id derived from the checkout's path relative to `~/code`, or to `/` outside it - loop-claude: before it opens claude on the terminal, it marks the checkout and each of its worktrees trusted in `~/.claude.json` diff --git a/CLAUDE.md b/CLAUDE.md index 3dabd138..f9eba8c8 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -105,22 +105,22 @@ The rules only reviewers apply, for quality, comments, READMEs and prose, live i ## Vocabulary - **chunk** — the unit of work, shipped as one PR; "Working loop" says what it holds. -- **cycle** — in `loop-claude`, worker runs and the judge's verdict on each, until the chunk closes or is left for the next cycle. In between, the human answers any interrupt, or the worker resumes with an answer the judge quoted from `README.md`, `AGENTS.md`, `docs/decisions.md`, `~/.claude/CLAUDE.md`, `~/.claude/rules/` or `~/.claude/skills/larv-review/standards/`. +- **cycle** — in `loop-claude`, worker runs and the judge's verdict on each, until the chunk closes or is left for the next cycle. In between, the human answers any interrupt, or the worker resumes with an answer the judge quoted from `README.md` or the judge's records. - **gate** — the merge gate: the checks a PR passes before it merges. - **interrupt** — `loop-claude` asking the human, on its terminal, for a decision that is theirs. They type a one-line answer, or `/talk` to open the worker's session with `claude --resume`; a release ready to cut opens that session at once, and a routing call opens claude in `~/.claude`. - **judge** — the headless claude that reads a worker's transcript each cycle and decides whether to interrupt and whether the chunk is finished. -- **judge's records** — the files the judge reads beside the README's premises: the project's `AGENTS.md` and `docs/decisions.md`, then the human's `CLAUDE.md` and the `.md` files in `rules/` and `skills/larv-review/standards/`. -- **paired ruling** — each simulated reader votes whether the project reads better, the same or worse at the branch's head than at the base commit, the last measured one. A ruling needs a lead of two or more votes, else it is same. +- **judge's records** — the files the judge reads beside the README's premises: the project's `AGENTS.md` and `docs/decisions.md`, then the human's `~/.claude/CLAUDE.md` and the `.md` files in `~/.claude/rules/` and `~/.claude/skills/larv-review/standards/`. +- **paired ruling** — the seats vote whether the project reads better, the same or worse at the branch's head than at the base, the commit `larv-review ruling-base` prints; `larv-review --help` says how the votes make the ruling. - **pass** — one kind of review a chunk may take, run in rounds by its reviewers until clean; `larv-review` §3 lists them. -- **place** — the smallest unit a simulated reader names as hard to read: a function or a section heading, with its `path:line`. +- **place** — the smallest addressable unit, such as a function or a section heading, that a seat names with its `path:line` when it judges how hard the project is to read there. - **plan** — `todo.md`. - **premises** — the goals and audience under `## Goals` and `## Audience` in the project's `README.md`, with code health ("Shared goal") first among the goals unless the README voids it. - **project's rung** — the cheapest rung on loop-claude's routing ladder of the project's model, which is the model loop-claude's prompt names as the project's, or else your own. - **release** — a semver version the human cuts. - **reviewer** — a reporter of findings: an agent under `~/.claude/agents/`, `/security-review` or a forge's auto-reviewer. - **round cap** — the rounds one pass may take per chunk; `larv-review` §3 → "Round cap". -- **scoring run** — four simulated readers (Junior A, Mid A, the maintainability senior and the inherited architect) each score the project from 1 to 10, overall and on four dimensions: Navigation, Locality, Shape and Self-sufficiency. `larv-review needs-scoring-run` says when one is due. -- **seat** — one simulated reader of the comprehension panel, launched per `~/.claude/skills/comprehension-panel/SKILL.md`, that reads the whole project, not the diff. +- **scoring run** — each seat scores the project from 1 to 10, overall and on each dimension. `larv-review` §3 → "Comprehension check" says which seats score and when one is due. +- **seat** — one simulated reader of the comprehension panel, launched per `~/.claude/skills/comprehension-panel/SKILL.md`. - **session** — a Claude Code session: one id, what `claude --resume` continues. - **trigger** — the condition under which a review pass runs on a change it has not seen; `larv-review` §3 lists them. - **worker** — the headless claude that runs the task in a cycle, in the chunk's session. diff --git a/bin/rule_hook/rules.py b/bin/rule_hook/rules.py index 0fd2f4d7..9a3c9a81 100644 --- a/bin/rule_hook/rules.py +++ b/bin/rule_hook/rules.py @@ -61,7 +61,7 @@ RULES: dict[RuleName, Rule] = { "a git commit in a checkout whose todo.md has changes", ), } -# The lookahead ends each reason at the next marker on its line, or at the line's end. The reason is lazy, so it stops there rather than at the last marker. +# The lookahead ends each reason at the next marker on its line, or at the line's end. The reason is lazy, so it stops at the next marker instead of running on and swallowing the markers after it. # An HTML marker's closing `-->` stays in its reason; `overrides` strips it. OVERRIDE = re.compile(r"(?:#| +- Self-sufficiency: `CLAUDE.md:108` "Vocabulary": now defines judge's records, paired ruling, place, scoring run and seat +- Self-sufficiency: `bin/metric_bench/main.py:114` `run_scores`: a small pull the other way, the comment cites plan item 204 + +Inherited architect, decided by: + +- Navigation, Shape, Overall: `bin/git_repo.py:22` `git`: four places that started git with differently worded errors now go through one function, and the hardening is one named list instead of a one-line comprehension +- Locality, Shape: `bin/loop_claude/effects.py:16` `Git`: Effects.git returns str | Failure, so checkout.py and review_replay drop their own exception and returncode conventions +- Locality: `bin/metric_bench/main.py:112` `run_scores`: what the tool does on bad input is stated in its help, not hidden in a private wrapper's errors="replace" +- Self-sufficiency: `CLAUDE.md:105` "Vocabulary": defines the comprehension terms the charter used without defining, and rules.py's OVERRIDE gains its explanation +- Self-sufficiency: `bin/metric_bench/main.py:114` `run_scores`: a small cost, "item 204's" points to a plan item a code reader can't resolve +- Locality: `bin/rule_hook/git.py:7` `git`: a small cost, the guards no longer sit beside the hook that needs them, though both docstrings say why From 5de35893cd8da27ed5bf0ceeba436e24dd6ffbb2 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Wed, 21 Oct 2026 20:19:27 +0200 Subject: [PATCH 29/47] Record the reading cost of the last finished chunk --- docs/reading-cost.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/reading-cost.md b/docs/reading-cost.md index 963561ec..bcaff283 100644 --- a/docs/reading-cost.md +++ b/docs/reading-cost.md @@ -685,3 +685,11 @@ Read most (opens and searches): ## Reading cost, chunk 5a330b55cc88, finished 2026-10-21T17:22:55Z 230039 new input tokens before the first commit. + +## Reading cost, chunk a346f6f10ff4, finished 2026-10-21T18:16:55Z + +92718 new input tokens before the first commit. + +Read most (opens and searches): + +- `rules/todo-items.md` 1 From f5f6b660f2d171db055ba6b448ec83f5a3ef9043 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Wed, 21 Oct 2026 20:19:27 +0200 Subject: [PATCH 30/47] Rewrite larv-review's Re-entry as one table of which passes a fix reruns --- skills/larv-review/SKILL.md | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/skills/larv-review/SKILL.md b/skills/larv-review/SKILL.md index b72f150a..3c93e268 100644 --- a/skills/larv-review/SKILL.md +++ b/skills/larv-review/SKILL.md @@ -28,16 +28,16 @@ Follow `~/.claude/CLAUDE.md` → "Git, commits, and PRs". Never commit to the de ## 3. Passes -A pass is one kind of review, a row of the table, named by its first column. Its trigger says when it runs on a change it has not seen; its reviewer reports the findings. +A pass is one kind of review, a row of the table, named by its first column. Its trigger says when it first runs, on the chunk's change; "Re-entry" says when a fix reruns it. Its reviewer reports the findings. | Pass | Reviewer | Trigger | |------|----------|----------------------------------------| -| Architecture | systems-architect | carries an architectural decision: a new, restructured or moved component, module, service or boundary; a new dependency or first use of an infrastructure pattern (queue, cron, cache, websocket, …); a new or changed external contract (routes, request/response shapes, events, webhooks, published file formats, CLI flags and exit codes); a schema change beyond an additive column; a fix, only where it carries an architectural decision | -| Principles | principles-auditor | changes code, config or tests; a fix, only where it changes code, config or tests | +| Architecture | systems-architect | carries an architectural decision: a new, restructured or moved component, module, service or boundary; a new dependency or first use of an infrastructure pattern (queue, cron, cache, websocket, …); a new or changed external contract (routes, request/response shapes, events, webhooks, published file formats, CLI flags and exit codes); a schema change beyond an additive column | +| Principles | principles-auditor | changes code, config or tests | | Full scan | the `claude-security` plugin at high effort: `/claude-security scan this branch's changes at high` | touches authn/authz, secrets or crypto, opens an untrusted-input boundary, or adds an external surface | -| Security | `/security-review` | changes code or config, unless the full scan runs on the same change; a fix, only where it opens an untrusted-input boundary or touches authn/authz, secrets or crypto, and the full scan does not rerun on it | -| Overrides | override-reviewer | `~/.claude/bin/rule-hook overrides`, run in the chunk's worktree, prints a line no round of this pass has ruled on; a fix, only where the hook logged an override for it | -| Stability | stability-reviewer | changes code, config or tests; a fix, only where it changes behaviour: what the code or its tests do | +| Security | `/security-review` | changes code or config, unless the full scan runs on the same change | +| Overrides | override-reviewer | `~/.claude/bin/rule-hook overrides`, run in the chunk's worktree, prints a line no round of this pass has ruled on | +| Stability | stability-reviewer | changes code, config or tests | | Product-owner | product-owner-reviewer | changes an external surface: API, CLI, UI, error or deprecation text a consumer reads, README and docs an outside reader lands on | | Prose | prose-reviewer | changes prose a reader reads, such as docs, comments, help or error text, or the plan; one round | @@ -66,16 +66,25 @@ Give a reviewer without Bash the branch diff and `git ls-files`'s output in its - **Round.** A round is one review by a pass's reviewer: the first, each re-entry, and the rerun after the architect returns Stage 0 questions ("Architecture" below). A relaunch one rung up ("Rung up" below) stays in its round. - **Auto-reviewer.** The external auto-reviewer (§4) is a pass of its own, each review it posts a round. - **Count.** Close each round with one commit that holds the round's fixes. Title it `Answer round : 🔴, 🟡; …`: `` is the pass's name in lower case, such as `full scan`, and `` and `` are the 🔴 and 🟡 findings all the round's reviewers reported. Example: `Answer stability round 1: 1 🔴, 2 🟡; flag a deleted test`. A round that changed nothing gets an empty commit (`git commit --allow-empty`). Push the commits when §4 runs next, where there is a remote. `~/.claude/bin/larv-review round-count` prints each pass's count and marks a pass at the cap. The auto-reviewer's count is the number of its reviews on the PR, less its reviews of a `Record the comprehension check:` commit. -- **Later rounds.** From round 2, an agent under `~/.claude/agents/` reviews only the answers to its last round's findings, and each fix from another pass that re-entered its pass. Prompt it with the path of its last round's report and each finding's answer: the fix's diff, or the reason it was dismissed. Give it each other pass's fix as `git diff `, since the fixes may be unpushed, with the finding it answered. It reports only an answer that is plainly wrong or worse than the change it answered, so its pass converges in its second round. Other reviewers review the branch as their tool does. - **Done.** A pass is done when its latest round leaves no 🔴 or 🟡 standing: none was reported, or each was shown factually wrong, declined, filed, or named under the bar per "Findings", or settled in the PR summary per "Comprehension check" → "Places", or, for the prose pass, fixed. Resolve that round's 🟢s and ❓s per "Findings" too. - **Cap.** A pass takes at most three rounds per chunk. Instead of a fourth, list what is open and ask the user. For the auto-reviewer, ask before the push that would summon its fourth, and hold the fixes unpushed until the answer. - **Answer.** A yes grants that pass one more round, after which the ask repeats; a no leaves the PR unmerged. -**Re-entry.** +**Re-entry.** A fix is a change no pass has seen. A round's fixes re-enter together: run, in table order, every pass that a row below names for any of them, a done pass included, then §4. A pass at its cap gets "Round cap" → "Cap"'s ask instead. -- **Fix.** A fix is a change no pass has seen. -- **Rerun.** A round's fixes for 🔴 and 🟡 findings outside the prose pass re-enter together. Run, in table order, each pass whose 🔴 or 🟡 they answer, and each pass whose trigger has an "a fix, only where …" clause they meet, a done pass included. A pass at its cap gets "Round cap" → "Cap"'s ask instead. Then §4. -- **No rerun.** A fix for a 🟢, a ❓ or any prose finding reruns no pass. +| The fix | Reruns | +|---------|--------| +| answers a 🔴 or 🟡 of any pass but prose | that pass | +| changes code, config or tests | Principles | +| changes behaviour: what the code or its tests do | Stability | +| carries an architectural decision | Architecture | +| opens an untrusted-input boundary or touches authn/authz, secrets or crypto | Security, unless the full scan reruns on it | +| has an override that the hook logged | Overrides | +| answers only a 🟢, a ❓ or a prose finding | no pass | + +Each row a fix meets adds its pass; the last row adds none. Prose never reruns, so a comment or doc edit in a fix adds nothing. Example: a fix for a stability 🟡 that changes code and a comment reruns Stability and Principles, and the comment reruns nothing more. + +**What a round reviews.** An agent under `~/.claude/agents/` reviews the branch in round 1. From round 2 it reviews only the answers to its last round's findings, and each fix from another pass that re-entered its pass. Prompt it with the path of its last round's report and each finding's answer: the fix's diff, or the reason it was dismissed. Give it each other pass's fix as `git diff `, since the fixes may be unpushed, with the finding it answered. It reports only an answer that is plainly wrong or worse than the change it answered, so its pass converges in its second round. Other reviewers review the branch as their tool does. **Rung up.** A reviewer rules the work below standard when its report holds systems-architect's BLOCK or a finding against `standards/quality.md`. A comprehension seat does when `record-ruling` counts one of its votes as worse. From 84779764b2e7e8f0bba21ee5b826a5fe63c98fe3 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Wed, 21 Oct 2026 20:24:17 +0200 Subject: [PATCH 31/47] =?UTF-8?q?Answer=20prose=20round=201:=201=20?= =?UTF-8?q?=F0=9F=94=B4,=202=20=F0=9F=9F=A1;=20a=20fix=20for=20a=20?= =?UTF-8?q?=F0=9F=9F=A2,=20=E2=9D=93=20or=20prose=20finding=20reruns=20no?= =?UTF-8?q?=20pass=20whatever=20it=20changes,=20rows=20follow=20the=20pass?= =?UTF-8?q?=20table,=20decision=20title=20follows?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AGENTS.md | 2 +- docs/decisions.md | 4 +++- skills/larv-review/SKILL.md | 15 +++++++-------- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 522a3988..05335592 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -12,7 +12,7 @@ Decisions live in `docs/decisions.md`: - loop-claude: each project's model lives in `~/.claude/loop-claude-models.json`, which only loop-claude writes - review: a pass gets at most three rounds per chunk; instead of a fourth, the run asks the human - 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 -- 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 +- review: a fix for a 🔴 or 🟡 reruns the pass that found it and each pass whose row in `larv-review` §3's re-entry table the fix meets; 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 - 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, once when an item names the floor and twice on one head when a release's items run out - review: a project decision may suspend the comprehension check for the plan items it names - review: a project decision may opt every chunk out of the architect, the product-owner pass or the comprehension check, and a project opting out of the comprehension check voids code health diff --git a/docs/decisions.md b/docs/decisions.md index 30c07fcc..d29f5f5c 100644 --- a/docs/decisions.md +++ b/docs/decisions.md @@ -72,12 +72,14 @@ A reviewer's relaunch gets the report that asked and confirms or dismisses each 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 +## review: a fix for a 🔴 or 🟡 reruns the pass that found it and each pass whose row in `larv-review` §3's re-entry table the fix meets; 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. +2026-10-21, todo item 120: SKILL.md §3 moved the "a fix, only where …" clauses from the pass table into one re-entry table; the rule is unchanged. + ## 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, once when an item names the floor and twice on one head when a release's items run out 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 the scoring run too, so no release ends unmeasured, unless `todo.md` marks that release renamed in a `## Renamed` section (`bin/todo_table.py` → `renames`). Valid while seats reading both versions agree more often than two absolute runs do. diff --git a/skills/larv-review/SKILL.md b/skills/larv-review/SKILL.md index 3c93e268..ce87b54a 100644 --- a/skills/larv-review/SKILL.md +++ b/skills/larv-review/SKILL.md @@ -28,7 +28,7 @@ Follow `~/.claude/CLAUDE.md` → "Git, commits, and PRs". Never commit to the de ## 3. Passes -A pass is one kind of review, a row of the table, named by its first column. Its trigger says when it first runs, on the chunk's change; "Re-entry" says when a fix reruns it. Its reviewer reports the findings. +A pass is one kind of review, a row of the table, named by its first column. Its trigger says when it first runs, on the chunk's branch; "Re-entry" says when a fix reruns it. Its reviewer reports the findings. | Pass | Reviewer | Trigger | |------|----------|----------------------------------------| @@ -70,19 +70,18 @@ Give a reviewer without Bash the branch diff and `git ls-files`'s output in its - **Cap.** A pass takes at most three rounds per chunk. Instead of a fourth, list what is open and ask the user. For the auto-reviewer, ask before the push that would summon its fourth, and hold the fixes unpushed until the answer. - **Answer.** A yes grants that pass one more round, after which the ask repeats; a no leaves the PR unmerged. -**Re-entry.** A fix is a change no pass has seen. A round's fixes re-enter together: run, in table order, every pass that a row below names for any of them, a done pass included, then §4. A pass at its cap gets "Round cap" → "Cap"'s ask instead. +**Re-entry.** A fix is a change no pass has seen. A fix for a 🟢, a ❓ or a prose finding reruns no pass, whatever it changes. A round's fixes for 🔴 and 🟡 findings re-enter together: run, in the pass table's order, every pass that a row below names for any of them, a done pass included, then §4. A pass at its cap gets "Round cap" → "Cap"'s ask instead. | The fix | Reruns | |---------|--------| -| answers a 🔴 or 🟡 of any pass but prose | that pass | -| changes code, config or tests | Principles | -| changes behaviour: what the code or its tests do | Stability | +| answers a 🔴 or 🟡 of a pass other than prose | that pass | | carries an architectural decision | Architecture | +| changes code, config or tests | Principles | | opens an untrusted-input boundary or touches authn/authz, secrets or crypto | Security, unless the full scan reruns on it | -| has an override that the hook logged | Overrides | -| answers only a 🟢, a ❓ or a prose finding | no pass | +| made rule-hook log an override | Overrides | +| changes behaviour: what the code or its tests do | Stability | -Each row a fix meets adds its pass; the last row adds none. Prose never reruns, so a comment or doc edit in a fix adds nothing. Example: a fix for a stability 🟡 that changes code and a comment reruns Stability and Principles, and the comment reruns nothing more. +A fix meets every row it fits. Prose has no row, so a comment or doc edit inside a fix reruns nothing. Example: a fix for a stability 🟡 that changes code and a comment reruns Principles and Stability. **What a round reviews.** An agent under `~/.claude/agents/` reviews the branch in round 1. From round 2 it reviews only the answers to its last round's findings, and each fix from another pass that re-entered its pass. Prompt it with the path of its last round's report and each finding's answer: the fix's diff, or the reason it was dismissed. Give it each other pass's fix as `git diff `, since the fixes may be unpushed, with the finding it answered. It reports only an answer that is plainly wrong or worse than the change it answered, so its pass converges in its second round. Other reviewers review the branch as their tool does. From 64ca83ac944a07df5dac9c981cf386dccfbcffda Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Wed, 21 Oct 2026 20:27:20 +0200 Subject: [PATCH 32/47] Remove the finished item 120 and add it to the changelog --- CHANGELOG.md | 4 ++++ todo.md | 5 ----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 03f4ea89..881b3087 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## Unreleased + +- larv-review's "Re-entry" is now one table of which passes a fix reruns, and the pass table's triggers say only when a pass first runs. The rule is unchanged; a fix for a 🟢, a ❓ or a prose finding still reruns no pass. + ## 0.2.0 - Every project now shares one achieve goal, code health: the code is easy to understand and change safely. `CLAUDE.md` → "Shared goal" states it, with its signal and counter-signal. `rank_todo.py` ranks it first among a project's achieve goals. A project's overall is the overall mean of the newest scoring run in `docs/comprehension-history.md`, averaged with every other run on its commit. While that overall is under 7.0, or no run has measured the project, code health weighs four times as much as it does at 7.0 or above. An item's Moves cell names it as in `code health by 6`. A README voids it with `**Void:** code health, since .` under `## Goals`, and `rank_todo.py` then refuses an item that names it. `larv-review record-scoring` re-ranks `todo.md` after it appends a run, and exits 1 where `rank_todo.py` would, keeping the run. Expect items that make code easier to read to rank higher in every project. On upgrade: diff --git a/todo.md b/todo.md index 8c7cd636..d902cefd 100644 --- a/todo.md +++ b/todo.md @@ -12,7 +12,6 @@ | ID | Release | Blocked by | Exempt | Item | L | E | I | R | S | Moves | Score | |---|---|---|---|---|---|---|---|---|---|---|---| -| 120 | 0.3.0 | | | **Rewrite larv-review §3's "Round cap" and "Re-entry" as one table that says, for each kind of fix, which passes rerun and what a round reviews.** | 2 | 2 | 3 | 5 | 4 | code health by 6, 1.2 by 6, 1.4 by 6 | 26.0 | | 21 | 0.3.0 | | defect | **Give `settings.json`'s model one writer, and sort its keys.** | 3 | 3 | 3 | 7 | 3 | 2 by 5 | 22.5 | | 29 | 0.3.0 | | | **Make the contributor a standing member of every project's audience, unless its README voids code health.** | 2 | 2 | 3 | 5 | 2 | 1.1 by 5, 1.4 by 5 | 13.7 | | 199 | 0.3.0 | | defect | **Start loop-claude's worker with `ScheduleWakeup` disallowed, so a worker that ends its turn on a question exits and the judge runs.** | 2 | 1 | 3 | 4 | 2 | 1.5 by 6, 1.2 by 3 | 11.8 | @@ -93,10 +92,6 @@ ## Details -### 120. Rewrite larv-review §3's "Round cap" and "Re-entry" as one table that says, for each kind of fix, which passes rerun and what a round reviews. - -Junior A, Mid A and the maintainability senior of PR #257's scoring run named `skills/larv-review/SKILL.md:63` "Round cap" hardest, two of them with `:74` "Re-entry"; the inherited architect named `:71` "Cap". A reader holds the trigger table's "a fix, only where …" clauses, the cap, later rounds' scope and the prose, 🟢 and ❓ exceptions at once. Junior A could not say what a fix to a stability 🟡 that also touches a comment reruns. Make those sections easier to read. - ### 21. Give `settings.json`'s model one writer, and sort its keys. A defect: goal 2, keeping the setup shareable between computers, does not hold while one machine's model choice overwrites every other's. Claude Code rewrites `"model"` in this tracked file whenever a model is picked, so one `/model` dirties the checkout and overrides the synced choice. From 4fbe529cfe1e6490ad668224b14e76baa31c8ef3 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Wed, 21 Oct 2026 21:26:40 +0200 Subject: [PATCH 33/47] Record the reading cost of the last finished chunk --- docs/reading-cost.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/reading-cost.md b/docs/reading-cost.md index bcaff283..a4ec8c4e 100644 --- a/docs/reading-cost.md +++ b/docs/reading-cost.md @@ -693,3 +693,7 @@ Read most (opens and searches): Read most (opens and searches): - `rules/todo-items.md` 1 + +## Reading cost, chunk dd5ad8ab4fdf, finished 2026-10-21T18:27:48Z + +58208 new input tokens before the first commit. From 7c3800337a21c60739020ad01a815ba6fc144d04 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Wed, 21 Oct 2026 21:26:40 +0200 Subject: [PATCH 34/47] Give settings.json's model one writer per machine, and sort its keys --- .gitattributes | 1 + .gitignore | 2 ++ AGENTS.md | 3 +- CHANGELOG.md | 3 ++ README.md | 13 ++++++-- bin/repo_checks/test_types.py | 2 +- bin/settings_filter.py | 20 ++++++++++++ bin/test_settings_filter.py | 55 +++++++++++++++++++++++++++++++++ docs/decisions.md | 4 +++ settings.json | 57 +++++++++++++++++------------------ todo.md | 7 ----- 11 files changed, 127 insertions(+), 40 deletions(-) create mode 100644 .gitattributes create mode 100755 bin/settings_filter.py create mode 100644 bin/test_settings_filter.py diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..0cf88d34 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +settings.json filter=settings diff --git a/.gitignore b/.gitignore index 34af3235..a95dd537 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ # un-ignore authored config only. * +!.gitattributes !.gitignore !AGENTS.md !CHANGELOG.md @@ -67,6 +68,7 @@ !bin/score_outcomes/ !bin/score_outcomes/*.py !bin/shell_command.py +!bin/settings_filter.py !bin/statusline.py !bin/subagent-rung !bin/subagent_rung/ diff --git a/AGENTS.md b/AGENTS.md index 05335592..ce97866d 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -26,6 +26,7 @@ Decisions live in `docs/decisions.md`: - review: the premises chunk's whole review is the human's approval - workflow-bench/: the remote may show the bench cases' names and commit SHAs - settings.json: Claude Code runs in auto mode with the dangerous-mode prompt skipped +- settings.json: each machine owns its model, and git's clean filter `bin/settings_filter.py` keeps it, and Claude Code's key order, out of every commit - the repo may name bender, bender-infra and ai-sandbox - todo.md: one table of items, scored by the formula it states, held to its bar and ranked by `bin/rank_todo.py`, which ranks each blocker above the items it blocks; each achieve goal weighs by its position, code health first and four times as heavy while the comprehension panel's overall is under 7.0 or unmeasured, then README.md's goals; the table's order is the plan's only order - 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 @@ -52,7 +53,7 @@ Decisions live in `docs/decisions.md`: ## Working rules - `routing-calls-raised.md` sits at the root of loop-claude's archive (`$LOOP_CLAUDE_TRANSCRIPTS`, default `~/.claude/loop-claude-transcripts`). Each of its lines is a call or a `Reset`, with a stamp. A call is new when it is stamped after the latest `Reset` and after the latest stamp that `todo.md` or `docs/decisions.md` → `routing:` cites. When there are new calls, file one `todo.md` item to settle them, or refresh the item already filed. Its detail quotes those calls with their stamps, and the routed-chunks table of `routing-figures.md` beside it, never the project names its other tables hold. A change to the ladder, its steps or the delegation rule is the human's. The chunk that settles the calls cites the latest stamp it settled in `docs/decisions.md` → `routing:`, whatever the human decided, so they are not filed again. Once a chunk that changes the ladder, its steps or the delegation rule has merged, append `- Reset` to `routing-calls-raised.md`: the figures then count only chunks finished after it, and its calls may be raised again. -- When `~/.claude/settings.json` has uncommitted changes, commit them on a branch of their own and merge them through a PR: Claude Code writes that file from any session. Read their diff first. When it holds a credential, such as a token in `env` or `mcpServers`, ask the human to move it out of the file, and commit only once it is gone. A token in `env` moves to the shell profile; a server in `mcpServers` moves to `~/.claude.json` with `claude mcp add --scope user`. +- When `~/.claude/settings.json` has uncommitted changes, commit them on a branch of their own and merge them through a PR: Claude Code writes that file from any session. Read their diff first: an empty one is a model pick, which `git add settings.json` clears. When it holds a credential, such as a token in `env` or `mcpServers`, ask the human to move it out of the file, and commit only once it is gone. A token in `env` moves to the shell profile; a server in `mcpServers` moves to `~/.claude.json` with `claude mcp add --scope user`. ## Scoring run diff --git a/CHANGELOG.md b/CHANGELOG.md index 881b3087..c87e6b53 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ## Unreleased +- `settings.json` no longer carries a model: each machine keeps the one you pick with `/model`. Git's clean filter `bin/settings_filter.py` drops `"model"` and sorts the keys, so neither a pick nor Claude Code's key order can reach a commit. After a pick, `git status` may still list `settings.json`; `git add settings.json` clears it, with nothing to commit. An update to a release that changes `settings.json` drops the machine's model. On upgrade, on each machine: + 1. Turn the filter on in `~/.claude`: `git config filter.settings.clean bin/settings_filter.py`. + 2. Pick a model with `/model`. Until you do, Claude Code runs its default model, where this repo set `opus` before. - larv-review's "Re-entry" is now one table of which passes a fix reruns, and the pass table's triggers say only when a pass first runs. The rule is unchanged; a fix for a 🟢, a ❓ or a prose finding still reruns no pass. ## 0.2.0 diff --git a/README.md b/README.md index 45d33306..73bb069a 100644 --- a/README.md +++ b/README.md @@ -54,11 +54,19 @@ claude plugin install code-review@claude-plugins-official claude plugin install rust-analyzer-lsp@claude-plugins-official ``` +Have git store `settings.json` without `"model"`, so a model you pick with `/model` stays on this machine and never reaches a commit: + +```sh +git config filter.settings.clean bin/settings_filter.py +``` + +After a pick, `git status` may still list `settings.json`, and `git pull` refuses to update it. `git add settings.json` clears that, with nothing to commit. + Link `loop-claude` onto `PATH`: `ln -s ~/.claude/bin/loop-claude ~/.local/bin/loop-claude`. Run `loop-claude` only in a sandbox with no direct access to a production environment, such as a dedicated VM: every claude it starts, the interactive ones included, skips every permission prompt. ## Update -Move a machine that takes tagged releases to the latest tag. The move discards every uncommitted change to a file the latest tag tracks, such as a `settings.json` Claude Code wrote. List the uncommitted changes to files the checkout tracks, and the tag it is on: +Move a machine that takes tagged releases to the latest tag. The move discards every uncommitted change to a file the latest tag tracks, such as a hook Claude Code wrote into `settings.json`. Where the tag changes `settings.json`, the move also drops this machine's model; pick it again with `/model`. List the uncommitted changes to files the checkout tracks, and the tag it is on: ```sh cd ~/.claude @@ -92,6 +100,7 @@ Install puts only `loop-claude` on `PATH`; call the others by their path, such a - `review-replay ` replays a review pass's archived rounds from the projects run on the model, on the code each reviewed, and prints the lowest rung below the project's that, like each rung above it, finds every 🔴 and 🟡 the project's rung finds again; `review-replay --help` states the replay. Run it only in a sandbox, like loop-claude: each replayed reviewer skips every permission prompt, stability-reviewer has Bash, and an archived prompt may name paths on the host. - `rule-hook [overrides]` blocks a tool call that breaks a rule a program can check, unless the call overrides the rule; `settings.json` → `hooks` runs it before each Bash, Edit, MultiEdit, Write and Agent call, and `rule-hook --help` states the rules and the override. - `score-outcomes [L E I S]` lists the finished items whose guessed scores sit nearest the given ones, and the shipped items the project's `docs/score-anchors.md` names for each level of L, E and I, each with what its chunk measured; then the median outcome at each guessed R and S, and how well L, E and I each order the chunks by review rounds and 🔴 findings; `score-outcomes --help` states the measures. +- `settings_filter.py` is git's clean filter for `settings.json`: it drops `"model"` and sorts the keys. `.gitattributes` names it, and Install turns it on. - `statusline.py` renders Claude Code's status line; `settings.json` → `statusLine` runs it. - `subagent-rung [--plan] ` prints the Agent tool's model and effort for a subagent's task, picked by its L from the project's model, and with `--plan` never below the project's rung; `subagent-rung --help` states the rule. @@ -110,7 +119,7 @@ pytest_add_cli_args=-k Then, in the copy: `uvx --with pytest 'mutmut>=3,<4' run && uvx --with pytest 'mutmut>=3,<4' results`, and `uvx --with pytest 'mutmut>=3,<4' show ` to see a mutant's change. The config keys are mutmut 3's. -`bin/` is the import root: each launcher puts it on `sys.path`, so a module imports another by its path under `bin/`, such as `from claude_code.entries import parse_entry`. Each tool's package holds its tests; `rank_todo.py` and `statusline.py` are tools of one file each, tested beside them, `rule_hook` imports `rank_todo.py`'s check, `larv_review` imports `rank_todo.py`'s ranking, `score_outcomes` imports `reading_cost`'s record path, `judge_replay` imports `loop_claude`'s judge, and `loop_claude` runs `chunk-preflight` as a process of its own. `judge_replay` and `review_replay` share `rung_replay/`: the rung search, the argument reader, the candidate rungs and the exits. `rung_replay/` reads `loop_claude`'s retry count and models file. The other non-test modules at `bin/`'s root, `claude_code/` and `transcript_archive/` serve more than one tool; `model_routing/` holds the routing ladder, which loop-claude, `rule_hook`, both replay tools and `subagent-rung` read. `routing_figures/` measures loop-claude's archive for loop-claude's routing calls. `test_env.py` serves the tests, and `repo_checks/` tests the repo itself. +`bin/` is the import root: each launcher puts it on `sys.path`, so a module imports another by its path under `bin/`, such as `from claude_code.entries import parse_entry`. Each tool's package holds its tests; `rank_todo.py`, `settings_filter.py` and `statusline.py` are tools of one file each, tested beside them, `rule_hook` imports `rank_todo.py`'s check, `larv_review` imports `rank_todo.py`'s ranking, `score_outcomes` imports `reading_cost`'s record path, `judge_replay` imports `loop_claude`'s judge, and `loop_claude` runs `chunk-preflight` as a process of its own. `judge_replay` and `review_replay` share `rung_replay/`: the rung search, the argument reader, the candidate rungs and the exits. `rung_replay/` reads `loop_claude`'s retry count and models file. The other non-test modules at `bin/`'s root, `claude_code/` and `transcript_archive/` serve more than one tool; `model_routing/` holds the routing ladder, which loop-claude, `rule_hook`, both replay tools and `subagent-rung` read. `routing_figures/` measures loop-claude's archive for loop-claude's routing calls. `test_env.py` serves the tests, and `repo_checks/` tests the repo itself. ## Tracking a new file diff --git a/bin/repo_checks/test_types.py b/bin/repo_checks/test_types.py index feaacce9..161ab8f3 100644 --- a/bin/repo_checks/test_types.py +++ b/bin/repo_checks/test_types.py @@ -15,5 +15,5 @@ class Types(unittest.TestCase): self.assertIsNotNone(floor, "README.md's Install names `Python 3.N or newer`") if shutil.which("uv") is None: self.fail("uv on PATH fetches mypy; see README.md's Test line") - ran = subprocess.run(["uv", "tool", "run", "--python", "%d.%d" % floor, "mypy==2.3.1", "--cache-dir=/dev/null", "--check-untyped-defs", "--disallow-untyped-defs", "--exclude", "/test_", "-p", "chunk_preflight", "-p", "claude_code", "-m", "comprehension_history", "-m", "git_repo", "-p", "judge_replay", "-p", "larv_review", "-p", "loop_claude", "-m", "markdown_text", "-p", "metric_bench", "-m", "project_key", "-m", "rank_todo", "-m", "round_titles", "-p", "reading_cost", "-p", "review_replay", "-p", "rule_hook", "-p", "rung_replay", "-p", "score_outcomes", "-p", "subagent_rung", "-m", "shell_command", "-m", "statusline", "-m", "todo_table", "-p", "transcript_archive", "-m", "utc_stamp"], capture_output=True, cwd=ROOT / "bin", text=True) + ran = subprocess.run(["uv", "tool", "run", "--python", "%d.%d" % floor, "mypy==2.3.1", "--cache-dir=/dev/null", "--check-untyped-defs", "--disallow-untyped-defs", "--exclude", "/test_", "-p", "chunk_preflight", "-p", "claude_code", "-m", "comprehension_history", "-m", "git_repo", "-p", "judge_replay", "-p", "larv_review", "-p", "loop_claude", "-m", "markdown_text", "-p", "metric_bench", "-m", "project_key", "-m", "rank_todo", "-m", "round_titles", "-p", "reading_cost", "-p", "review_replay", "-p", "rule_hook", "-p", "rung_replay", "-p", "score_outcomes", "-p", "subagent_rung", "-m", "settings_filter", "-m", "shell_command", "-m", "statusline", "-m", "todo_table", "-p", "transcript_archive", "-m", "utc_stamp"], capture_output=True, cwd=ROOT / "bin", text=True) self.assertEqual(ran.returncode, 0, ran.stdout + ran.stderr) diff --git a/bin/settings_filter.py b/bin/settings_filter.py new file mode 100755 index 00000000..b532462c --- /dev/null +++ b/bin/settings_filter.py @@ -0,0 +1,20 @@ +#!/usr/bin/env python3 +"""Git's clean filter for settings.json: drop "model" and sort every key. + +Claude Code rewrites settings.json, in its own key order, whenever a model is +picked or a plugin installed. Each machine owns its model, so git stores the +file without it, and neither write shows as a change. +""" +import json +import sys + + +def main() -> None: + settings = json.load(sys.stdin) + settings.pop("model", None) + json.dump(settings, sys.stdout, ensure_ascii=False, indent=2, sort_keys=True) + sys.stdout.write("\n") + + +if __name__ == "__main__": + main() diff --git a/bin/test_settings_filter.py b/bin/test_settings_filter.py new file mode 100644 index 00000000..7b126235 --- /dev/null +++ b/bin/test_settings_filter.py @@ -0,0 +1,55 @@ +import json +import pathlib +import subprocess +import sys +import tempfile +import unittest + +BIN = pathlib.Path(__file__).resolve().parent +ROOT = BIN.parent +FILTER = BIN / "settings_filter.py" +INSTALL = "git config filter.settings.clean bin/settings_filter.py" + + +def cleaned(text): + return subprocess.run([sys.executable, FILTER], input=text, capture_output=True, check=True, text=True).stdout + + +class Clean(unittest.TestCase): + def test_drops_the_model_and_sorts_every_key(self): + written = '{"theme": "dark", "model": "opus[1m]", "env": {"B": "1", "A": "2"}}' + self.assertEqual(cleaned(written), '{\n "env": {\n "A": "2",\n "B": "1"\n },\n "theme": "dark"\n}\n') + + def test_the_tracked_settings_hold_no_model_and_sorted_keys(self): + tracked = (ROOT / "settings.json").read_text(encoding="utf-8") + self.assertEqual(tracked, cleaned(tracked)) + + def test_the_readme_installs_the_filter_git_attributes_name(self): + self.assertIn(f"{INSTALL}\n", (ROOT / "README.md").read_text(encoding="utf-8")) + self.assertIn("settings.json filter=settings\n", (ROOT / ".gitattributes").read_text(encoding="utf-8")) + + +class Checkout(unittest.TestCase): + def test_a_model_pick_and_claude_codes_key_order_leave_nothing_to_commit(self): + with tempfile.TemporaryDirectory() as repo: + def git(*args): + return subprocess.run(["git", "-C", repo, *args], capture_output=True, check=True, text=True).stdout + + git("init", "-q") + (pathlib.Path(repo) / "bin").mkdir() + (pathlib.Path(repo) / "bin" / "settings_filter.py").symlink_to(FILTER) + (pathlib.Path(repo) / ".gitattributes").write_text("settings.json filter=settings\n") + git(*INSTALL.split()[1:]) + settings = pathlib.Path(repo) / "settings.json" + settings.write_text(cleaned('{"env": {}, "theme": "dark"}')) + git("add", ".") + git("-c", "user.name=t", "-c", "user.email=t@t", "commit", "-qm", "settings") + settings.write_text(json.dumps({"theme": "dark", "model": "opus[1m]", "env": {}}, indent=2)) + self.assertEqual(git("diff"), "") + # git status lists a file whose size changed until it is staged; staging adds no change. + git("add", "settings.json") + self.assertEqual(git("status", "--porcelain"), "") + + +if __name__ == "__main__": + unittest.main() diff --git a/docs/decisions.md b/docs/decisions.md index d29f5f5c..74266912 100644 --- a/docs/decisions.md +++ b/docs/decisions.md @@ -162,6 +162,10 @@ Three places carry the rule. `rules/todo-items.md` states it and loads with `tod 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. +## settings.json: each machine owns its model, and git's clean filter `bin/settings_filter.py` keeps it, and Claude Code's key order, out of every commit + +2026-10-21, lilleman. Serves goal 2: Claude Code rewrites `"model"` in `settings.json` on every `/model` and plugin install, so a tracked model let one machine's pick override every other's. lilleman chose a model per machine over a synced one in `env.ANTHROPIC_MODEL`, which `/model` could not outlast past one session: it is simpler, and loop-claude picks each project's model in `~/.claude/loop-claude-models.json` anyway. The filter also sorts the keys, since each write puts them back in Claude Code's order. Git still lists `settings.json` after a pick that changes the file's size, and `git pull` refuses to update it, until `git add settings.json`, which stages no change. An Update to a tag that changes `settings.json` drops the machine's model. Valid while Claude Code writes the model it picks into `settings.json`. + ## 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. diff --git a/settings.json b/settings.json index 28436f68..a700479e 100644 --- a/settings.json +++ b/settings.json @@ -1,63 +1,62 @@ { - "env": { - "CLAUDE_SECURITY_SCAN_TIP": "off" - }, "attribution": { "sessionUrl": false }, - "includeCoAuthoredBy": false, - "permissions": { - "defaultMode": "auto", - "additionalDirectories": [ - "~/.local/state/larv-review", - "~/code" - ] - }, - "model": "opus", + "awaySummaryEnabled": false, "disableClaudeAiConnectors": true, - "statusLine": { - "type": "command", - "command": "~/.claude/bin/statusline.py", - "refreshInterval": 30 - }, + "effortLevel": "xhigh", "enabledPlugins": { "claude-security@claude-plugins-official": true, + "code-review@claude-plugins-official": true, "frontend-design@claude-plugins-official": false, - "rust-analyzer-lsp@claude-plugins-official": true, - "code-review@claude-plugins-official": true + "rust-analyzer-lsp@claude-plugins-official": true + }, + "env": { + "CLAUDE_SECURITY_SCAN_TIP": "off" }, "extraKnownMarketplaces": { "claude-plugins-official": { "source": { - "source": "github", - "repo": "anthropics/claude-plugins-official" + "repo": "anthropics/claude-plugins-official", + "source": "github" } } }, "hooks": { "PreToolUse": [ { - "matcher": "Bash|Edit|MultiEdit|Write|Agent", "hooks": [ { - "type": "command", "command": "~/.claude/bin/rule-hook", - "timeout": 30 + "timeout": 30, + "type": "command" } - ] + ], + "matcher": "Bash|Edit|MultiEdit|Write|Agent" } ] }, - "effortLevel": "xhigh", + "includeCoAuthoredBy": false, + "mcpServers": {}, "modelSettings": { "claude-fable-5-1": { "effortLevel": "high" } }, - "awaySummaryEnabled": false, - "tui": "fullscreen", + "permissions": { + "additionalDirectories": [ + "~/.local/state/larv-review", + "~/code" + ], + "defaultMode": "auto" + }, "skipDangerousModePermissionPrompt": true, "skipWorkflowUsageWarning": true, + "statusLine": { + "command": "~/.claude/bin/statusline.py", + "refreshInterval": 30, + "type": "command" + }, "theme": "dark", - "mcpServers": {} + "tui": "fullscreen" } diff --git a/todo.md b/todo.md index d902cefd..e65f39e9 100644 --- a/todo.md +++ b/todo.md @@ -12,7 +12,6 @@ | ID | Release | Blocked by | Exempt | Item | L | E | I | R | S | Moves | Score | |---|---|---|---|---|---|---|---|---|---|---|---| -| 21 | 0.3.0 | | defect | **Give `settings.json`'s model one writer, and sort its keys.** | 3 | 3 | 3 | 7 | 3 | 2 by 5 | 22.5 | | 29 | 0.3.0 | | | **Make the contributor a standing member of every project's audience, unless its README voids code health.** | 2 | 2 | 3 | 5 | 2 | 1.1 by 5, 1.4 by 5 | 13.7 | | 199 | 0.3.0 | | defect | **Start loop-claude's worker with `ScheduleWakeup` disallowed, so a worker that ends its turn on a question exits and the judge runs.** | 2 | 1 | 3 | 4 | 2 | 1.5 by 6, 1.2 by 3 | 11.8 | | 170 | 0.3.0 | | decision | **Re-tune `WORKER_STEPS` and `REVIEW_STEPS` once 10 chunks have shipped under them, from how well L, E and I order their review rounds and 🔴 findings.** | 2 | 2 | 3 | 5 | 2 | 1.1 by 3, 1.4 by 5 | 10.9 | @@ -92,12 +91,6 @@ ## Details -### 21. Give `settings.json`'s model one writer, and sort its keys. - -A defect: goal 2, keeping the setup shareable between computers, does not hold while one machine's model choice overwrites every other's. Claude Code rewrites `"model"` in this tracked file whenever a model is picked, so one `/model` dirties the checkout and overrides the synced choice. - -Every write Claude Code makes to the file rewrites `"model"`, `claude plugin install` included: Claude Code 2.1.288 turned `"opus"` into `"opus[1m]"`. Each write also puts the keys back in Claude Code's own order, so a sorted file stays sorted only until the next write. - ### 29. Make the contributor a standing member of every project's audience, unless its README voids code health. State that in `~/.claude/rules/goals-and-audience.md` → "Goals and Audience", and have larv-review's comprehension check name the contributor as the reader it serves. The `**Void:** code health` line (`~/.claude/CLAUDE.md` → "Shared goal") is the one place a project says maintainability does not matter: it drops the contributor. A project that opts out of the comprehension check must already write that line. From 7665087e1e0355b1a8d5451626c2c0cb93923013 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Wed, 21 Oct 2026 21:38:50 +0200 Subject: [PATCH 35/47] =?UTF-8?q?Answer=20architecture=20round=201:=201=20?= =?UTF-8?q?=F0=9F=94=B4,=202=20=F0=9F=9F=A1;=20split=20the=20filter's=20pu?= =?UTF-8?q?re=20core=20out=20of=20main,=20stage=20settings.json=20before?= =?UTF-8?q?=20Update's=20move,=20read=20the=20stored=20settings=20in=20a?= =?UTF-8?q?=20repo=20check?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 2 +- README.md | 5 ++-- bin/repo_checks/test_settings.py | 21 +++++++++++++++++ bin/settings_filter.py | 12 ++++++---- bin/test_settings_filter.py | 39 ++++++++++++++++---------------- docs/decisions.md | 2 +- 6 files changed, 54 insertions(+), 27 deletions(-) create mode 100644 bin/repo_checks/test_settings.py diff --git a/CHANGELOG.md b/CHANGELOG.md index c87e6b53..b23d6c5b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ## Unreleased -- `settings.json` no longer carries a model: each machine keeps the one you pick with `/model`. Git's clean filter `bin/settings_filter.py` drops `"model"` and sorts the keys, so neither a pick nor Claude Code's key order can reach a commit. After a pick, `git status` may still list `settings.json`; `git add settings.json` clears it, with nothing to commit. An update to a release that changes `settings.json` drops the machine's model. On upgrade, on each machine: +- `settings.json` no longer carries a model: each machine keeps the one you pick with `/model`. Git's clean filter `bin/settings_filter.py` drops `"model"` and sorts the keys, so neither a pick nor Claude Code's key order can reach a commit. After a pick, `git status` may still list `settings.json`; `git add settings.json` clears it, with nothing to commit. Update now starts with that `git add`: without it, the move drops the machine's model. An update to a release that changes `settings.json` drops the model either way. On upgrade, on each machine: 1. Turn the filter on in `~/.claude`: `git config filter.settings.clean bin/settings_filter.py`. 2. Pick a model with `/model`. Until you do, Claude Code runs its default model, where this repo set `opus` before. - larv-review's "Re-entry" is now one table of which passes a fix reruns, and the pass table's triggers say only when a pass first runs. The rule is unchanged; a fix for a 🟢, a ❓ or a prose finding still reruns no pass. diff --git a/README.md b/README.md index 73bb069a..543bee77 100644 --- a/README.md +++ b/README.md @@ -60,16 +60,17 @@ Have git store `settings.json` without `"model"`, so a model you pick with `/mod git config filter.settings.clean bin/settings_filter.py ``` -After a pick, `git status` may still list `settings.json`, and `git pull` refuses to update it. `git add settings.json` clears that, with nothing to commit. +After a pick, `git status` may still list `settings.json`, and `git pull` refuses to update it. `git add settings.json` clears that, with nothing to commit. A pull that changes `settings.json` then drops the model; pick it again with `/model`. Link `loop-claude` onto `PATH`: `ln -s ~/.claude/bin/loop-claude ~/.local/bin/loop-claude`. Run `loop-claude` only in a sandbox with no direct access to a production environment, such as a dedicated VM: every claude it starts, the interactive ones included, skips every permission prompt. ## Update -Move a machine that takes tagged releases to the latest tag. The move discards every uncommitted change to a file the latest tag tracks, such as a hook Claude Code wrote into `settings.json`. Where the tag changes `settings.json`, the move also drops this machine's model; pick it again with `/model`. List the uncommitted changes to files the checkout tracks, and the tag it is on: +Move a machine that takes tagged releases to the latest tag. The move discards every uncommitted change to a file the latest tag tracks, such as a hook Claude Code wrote into `settings.json`. Git counts a model pick as such a change until `git add settings.json`, so stage it first. Where the tag changes `settings.json`, the move still drops this machine's model; pick it again with `/model`. List the uncommitted changes to files the checkout tracks, and the tag it is on: ```sh cd ~/.claude +git add settings.json git fetch --tags origin git status ``` diff --git a/bin/repo_checks/test_settings.py b/bin/repo_checks/test_settings.py new file mode 100644 index 00000000..bd83f2ed --- /dev/null +++ b/bin/repo_checks/test_settings.py @@ -0,0 +1,21 @@ +import pathlib +import sys +import unittest + +sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[1])) + +from git_repo import git +from repo_checks.test_python_floor import ROOT +from settings_filter import cleaned + + +class Settings(unittest.TestCase): + def test_the_stored_settings_hold_no_model_and_sorted_keys(self): + # The index, not the working file: the working file holds this machine's model in Claude Code's key order. + stored = git("show", ":settings.json", cwd=str(ROOT)) + self.assertIsInstance(stored, str, stored) + self.assertEqual(stored, cleaned(stored)) + + def test_the_readme_installs_the_filter_git_attributes_name(self): + self.assertIn("settings.json filter=settings\n", (ROOT / ".gitattributes").read_text(encoding="utf-8")) + self.assertIn("git config filter.settings.clean bin/settings_filter.py\n", (ROOT / "README.md").read_text(encoding="utf-8")) diff --git a/bin/settings_filter.py b/bin/settings_filter.py index b532462c..b1c7b1ec 100755 --- a/bin/settings_filter.py +++ b/bin/settings_filter.py @@ -9,11 +9,15 @@ import json import sys -def main() -> None: - settings = json.load(sys.stdin) +def cleaned(written: str) -> str: + """settings.json as git stores it: without "model", every key sorted.""" + settings = json.loads(written) settings.pop("model", None) - json.dump(settings, sys.stdout, ensure_ascii=False, indent=2, sort_keys=True) - sys.stdout.write("\n") + return json.dumps(settings, ensure_ascii=False, indent=2, sort_keys=True) + "\n" + + +def main() -> None: + sys.stdout.write(cleaned(sys.stdin.read())) if __name__ == "__main__": diff --git a/bin/test_settings_filter.py b/bin/test_settings_filter.py index 7b126235..580b7f61 100644 --- a/bin/test_settings_filter.py +++ b/bin/test_settings_filter.py @@ -5,14 +5,11 @@ import sys import tempfile import unittest -BIN = pathlib.Path(__file__).resolve().parent -ROOT = BIN.parent -FILTER = BIN / "settings_filter.py" -INSTALL = "git config filter.settings.clean bin/settings_filter.py" +sys.path.insert(0, str(pathlib.Path(__file__).resolve().parent)) +from settings_filter import cleaned -def cleaned(text): - return subprocess.run([sys.executable, FILTER], input=text, capture_output=True, check=True, text=True).stdout +FILTER = pathlib.Path(__file__).resolve().parent / "settings_filter.py" class Clean(unittest.TestCase): @@ -20,35 +17,39 @@ class Clean(unittest.TestCase): written = '{"theme": "dark", "model": "opus[1m]", "env": {"B": "1", "A": "2"}}' self.assertEqual(cleaned(written), '{\n "env": {\n "A": "2",\n "B": "1"\n },\n "theme": "dark"\n}\n') - def test_the_tracked_settings_hold_no_model_and_sorted_keys(self): - tracked = (ROOT / "settings.json").read_text(encoding="utf-8") - self.assertEqual(tracked, cleaned(tracked)) - - def test_the_readme_installs_the_filter_git_attributes_name(self): - self.assertIn(f"{INSTALL}\n", (ROOT / "README.md").read_text(encoding="utf-8")) - self.assertIn("settings.json filter=settings\n", (ROOT / ".gitattributes").read_text(encoding="utf-8")) + def test_keeps_text_outside_ascii(self): + self.assertEqual(cleaned('{"name": "Lilleman på Larv"}'), '{\n "name": "Lilleman på Larv"\n}\n') class Checkout(unittest.TestCase): - def test_a_model_pick_and_claude_codes_key_order_leave_nothing_to_commit(self): + def test_a_model_pick_in_claude_codes_key_order_leaves_nothing_to_commit_and_outlasts_an_update(self): with tempfile.TemporaryDirectory() as repo: def git(*args): - return subprocess.run(["git", "-C", repo, *args], capture_output=True, check=True, text=True).stdout + return subprocess.run(["git", "-C", repo, "-c", "user.name=t", "-c", "user.email=t@t", *args], capture_output=True, check=True, text=True).stdout git("init", "-q") (pathlib.Path(repo) / "bin").mkdir() (pathlib.Path(repo) / "bin" / "settings_filter.py").symlink_to(FILTER) (pathlib.Path(repo) / ".gitattributes").write_text("settings.json filter=settings\n") - git(*INSTALL.split()[1:]) + git("config", "filter.settings.clean", "bin/settings_filter.py") settings = pathlib.Path(repo) / "settings.json" settings.write_text(cleaned('{"env": {}, "theme": "dark"}')) git("add", ".") - git("-c", "user.name=t", "-c", "user.email=t@t", "commit", "-qm", "settings") - settings.write_text(json.dumps({"theme": "dark", "model": "opus[1m]", "env": {}}, indent=2)) + git("commit", "-qm", "settings") + git("tag", "v1") + (pathlib.Path(repo) / "other").write_text("") + git("add", "other") + git("commit", "-qm", "a tag that leaves settings.json alone") + git("tag", "v2") + git("checkout", "-q", "v1") + picked = json.dumps({"theme": "dark", "model": "opus[1m]", "env": {}}, indent=2) + settings.write_text(picked) self.assertEqual(git("diff"), "") - # git status lists a file whose size changed until it is staged; staging adds no change. + # README → Update: git status lists a file whose size changed until it is staged; staging adds no change, and keeps the model through the move. git("add", "settings.json") self.assertEqual(git("status", "--porcelain"), "") + git("checkout", "-q", "-f", "v2") + self.assertEqual(settings.read_text(), picked) if __name__ == "__main__": diff --git a/docs/decisions.md b/docs/decisions.md index 74266912..e2ee8ecf 100644 --- a/docs/decisions.md +++ b/docs/decisions.md @@ -164,7 +164,7 @@ Three places carry the rule. `rules/todo-items.md` states it and loads with `tod ## settings.json: each machine owns its model, and git's clean filter `bin/settings_filter.py` keeps it, and Claude Code's key order, out of every commit -2026-10-21, lilleman. Serves goal 2: Claude Code rewrites `"model"` in `settings.json` on every `/model` and plugin install, so a tracked model let one machine's pick override every other's. lilleman chose a model per machine over a synced one in `env.ANTHROPIC_MODEL`, which `/model` could not outlast past one session: it is simpler, and loop-claude picks each project's model in `~/.claude/loop-claude-models.json` anyway. The filter also sorts the keys, since each write puts them back in Claude Code's order. Git still lists `settings.json` after a pick that changes the file's size, and `git pull` refuses to update it, until `git add settings.json`, which stages no change. An Update to a tag that changes `settings.json` drops the machine's model. Valid while Claude Code writes the model it picks into `settings.json`. +2026-10-21, lilleman. Serves goal 2: Claude Code rewrites `"model"` in `settings.json` on every `/model` and plugin install, so a tracked model let one machine's pick override every other's. lilleman chose a model per machine over a synced one in `env.ANTHROPIC_MODEL`, which `/model` could not outlast past one session: it is simpler, and loop-claude picks each project's model in `~/.claude/loop-claude-models.json` anyway. The filter also sorts the keys, since each write puts them back in Claude Code's order. Git still lists `settings.json` after a pick that changes the file's size, and `git pull` refuses to update it, until `git add settings.json`, which stages no change. Until then, Update's `git checkout -f` rewrites the file and drops the model, so Update stages it first. A move or pull that changes `settings.json` drops the machine's model either way. The effort keys, `effortLevel` and `modelSettings`, stay synced: the routing decision on a chunk's worker rung relies on "`settings.json` runs Opus 5.5 at xhigh". Valid while Claude Code writes the model it picks into `settings.json`. ## the repo may name bender, bender-infra and ai-sandbox From d18b064e43d1460da7ff2e3d9d6416e7fc88b749 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Wed, 21 Oct 2026 21:41:31 +0200 Subject: [PATCH 36/47] =?UTF-8?q?Answer=20architecture=20round=202:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=200=20=F0=9F=9F=A1;=20cite=20the=20synced=20effor?= =?UTF-8?q?t=20without=20the=20model?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/decisions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/decisions.md b/docs/decisions.md index e2ee8ecf..d12f75df 100644 --- a/docs/decisions.md +++ b/docs/decisions.md @@ -164,7 +164,7 @@ Three places carry the rule. `rules/todo-items.md` states it and loads with `tod ## settings.json: each machine owns its model, and git's clean filter `bin/settings_filter.py` keeps it, and Claude Code's key order, out of every commit -2026-10-21, lilleman. Serves goal 2: Claude Code rewrites `"model"` in `settings.json` on every `/model` and plugin install, so a tracked model let one machine's pick override every other's. lilleman chose a model per machine over a synced one in `env.ANTHROPIC_MODEL`, which `/model` could not outlast past one session: it is simpler, and loop-claude picks each project's model in `~/.claude/loop-claude-models.json` anyway. The filter also sorts the keys, since each write puts them back in Claude Code's order. Git still lists `settings.json` after a pick that changes the file's size, and `git pull` refuses to update it, until `git add settings.json`, which stages no change. Until then, Update's `git checkout -f` rewrites the file and drops the model, so Update stages it first. A move or pull that changes `settings.json` drops the machine's model either way. The effort keys, `effortLevel` and `modelSettings`, stay synced: the routing decision on a chunk's worker rung relies on "`settings.json` runs Opus 5.5 at xhigh". Valid while Claude Code writes the model it picks into `settings.json`. +2026-10-21, lilleman. Serves goal 2: Claude Code rewrites `"model"` in `settings.json` on every `/model` and plugin install, so a tracked model let one machine's pick override every other's. lilleman chose a model per machine over a synced one in `env.ANTHROPIC_MODEL`, which `/model` could not outlast past one session: it is simpler, and loop-claude picks each project's model in `~/.claude/loop-claude-models.json` anyway. The filter also sorts the keys, since each write puts them back in Claude Code's order. Git still lists `settings.json` after a pick that changes the file's size, and `git pull` refuses to update it, until `git add settings.json`, which stages no change. Until then, Update's `git checkout -f` rewrites the file and drops the model, so Update stages it first. A move or pull that changes `settings.json` drops the machine's model either way. The effort keys, `effortLevel` and `modelSettings`, stay synced: the routing decision on a chunk's worker rung relies on `settings.json` running every interactive session at xhigh effort. Valid while Claude Code writes the model it picks into `settings.json`. ## the repo may name bender, bender-infra and ai-sandbox From b57704d237aff76095ac20777aedce71b941af24 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Wed, 21 Oct 2026 21:59:53 +0200 Subject: [PATCH 37/47] =?UTF-8?q?Answer=20stability=20round=201:=202=20?= =?UTF-8?q?=F0=9F=94=B4,=203=20=F0=9F=9F=A1;=20anchor=20.gitattributes=20t?= =?UTF-8?q?o=20the=20root=20settings.json,=20sort=20the=20new=20imports,?= =?UTF-8?q?=20isolate=20the=20checkout=20tests=20from=20the=20host's=20git?= =?UTF-8?q?,=20start=20a=20new=20install's=20Update=20at=20git=20fetch,=20?= =?UTF-8?q?fix=20the=20filter's=20docstring?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitattributes | 2 +- .gitignore | 2 +- AGENTS.md | 2 +- README.md | 4 +- bin/repo_checks/test_settings.py | 14 ++++-- bin/repo_checks/test_types.py | 2 +- bin/settings_filter.py | 18 +++++-- bin/test_settings_filter.py | 82 +++++++++++++++++++++----------- 8 files changed, 83 insertions(+), 43 deletions(-) diff --git a/.gitattributes b/.gitattributes index 0cf88d34..d996d049 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1 @@ -settings.json filter=settings +/settings.json filter=settings diff --git a/.gitignore b/.gitignore index a95dd537..ea57c2a8 100644 --- a/.gitignore +++ b/.gitignore @@ -67,8 +67,8 @@ !bin/score-outcomes !bin/score_outcomes/ !bin/score_outcomes/*.py -!bin/shell_command.py !bin/settings_filter.py +!bin/shell_command.py !bin/statusline.py !bin/subagent-rung !bin/subagent_rung/ diff --git a/AGENTS.md b/AGENTS.md index ce97866d..f50aab7a 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -53,7 +53,7 @@ Decisions live in `docs/decisions.md`: ## Working rules - `routing-calls-raised.md` sits at the root of loop-claude's archive (`$LOOP_CLAUDE_TRANSCRIPTS`, default `~/.claude/loop-claude-transcripts`). Each of its lines is a call or a `Reset`, with a stamp. A call is new when it is stamped after the latest `Reset` and after the latest stamp that `todo.md` or `docs/decisions.md` → `routing:` cites. When there are new calls, file one `todo.md` item to settle them, or refresh the item already filed. Its detail quotes those calls with their stamps, and the routed-chunks table of `routing-figures.md` beside it, never the project names its other tables hold. A change to the ladder, its steps or the delegation rule is the human's. The chunk that settles the calls cites the latest stamp it settled in `docs/decisions.md` → `routing:`, whatever the human decided, so they are not filed again. Once a chunk that changes the ladder, its steps or the delegation rule has merged, append `- Reset` to `routing-calls-raised.md`: the figures then count only chunks finished after it, and its calls may be raised again. -- When `~/.claude/settings.json` has uncommitted changes, commit them on a branch of their own and merge them through a PR: Claude Code writes that file from any session. Read their diff first: an empty one is a model pick, which `git add settings.json` clears. When it holds a credential, such as a token in `env` or `mcpServers`, ask the human to move it out of the file, and commit only once it is gone. A token in `env` moves to the shell profile; a server in `mcpServers` moves to `~/.claude.json` with `claude mcp add --scope user`. +- When `~/.claude/settings.json` has uncommitted changes, commit them on a branch of their own and merge them through a PR: Claude Code writes that file from any session. Read their diff first with `git diff HEAD -- settings.json`, which shows staged changes too: an empty one is a model pick, which `git add settings.json` clears. When it holds a credential, such as a token in `env` or `mcpServers`, ask the human to move it out of the file, and commit only once it is gone. A token in `env` moves to the shell profile; a server in `mcpServers` moves to `~/.claude.json` with `claude mcp add --scope user`. ## Scoring run diff --git a/README.md b/README.md index 543bee77..4b589776 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ git init git remote add origin ssh://git@gitea.larvit.se:21022/lilleman/claude-config.git ``` -Then run Update's commands. +Then run Update's commands, from `git fetch` on: a new checkout has no model pick to stage. Have Python 3.11 or newer as `python3` on `PATH`, and for Rust projects `rust-analyzer` on `PATH`, which the `rust-analyzer-lsp` plugin needs. Install every plugin `settings.json` enables: @@ -60,7 +60,7 @@ Have git store `settings.json` without `"model"`, so a model you pick with `/mod git config filter.settings.clean bin/settings_filter.py ``` -After a pick, `git status` may still list `settings.json`, and `git pull` refuses to update it. `git add settings.json` clears that, with nothing to commit. A pull that changes `settings.json` then drops the model; pick it again with `/model`. +After a pick, `git status` may still list `settings.json`, and `git pull` refuses to update it. `git add settings.json` clears that, with nothing to commit. A pull that changes `settings.json` then drops the model. Pick one with `/model` on each new machine, and again after such a pull. Link `loop-claude` onto `PATH`: `ln -s ~/.claude/bin/loop-claude ~/.local/bin/loop-claude`. Run `loop-claude` only in a sandbox with no direct access to a production environment, such as a dedicated VM: every claude it starts, the interactive ones included, skips every permission prompt. diff --git a/bin/repo_checks/test_settings.py b/bin/repo_checks/test_settings.py index bd83f2ed..e769a22a 100644 --- a/bin/repo_checks/test_settings.py +++ b/bin/repo_checks/test_settings.py @@ -1,12 +1,15 @@ +import json import pathlib import sys import unittest sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[1])) +from settings_filter import cleaned from git_repo import git from repo_checks.test_python_floor import ROOT -from settings_filter import cleaned + +INSTALL = "git config filter.settings.clean bin/settings_filter.py" class Settings(unittest.TestCase): @@ -14,8 +17,9 @@ class Settings(unittest.TestCase): # The index, not the working file: the working file holds this machine's model in Claude Code's key order. stored = git("show", ":settings.json", cwd=str(ROOT)) self.assertIsInstance(stored, str, stored) - self.assertEqual(stored, cleaned(stored)) + self.assertNotIn("model", json.loads(stored)) + self.assertEqual(stored, cleaned(stored), f"commit settings.json with the filter on: {INSTALL}") - def test_the_readme_installs_the_filter_git_attributes_name(self): - self.assertIn("settings.json filter=settings\n", (ROOT / ".gitattributes").read_text(encoding="utf-8")) - self.assertIn("git config filter.settings.clean bin/settings_filter.py\n", (ROOT / "README.md").read_text(encoding="utf-8")) + def test_the_readme_installs_the_filter_git_attributes_names_for_the_root_settings_only(self): + self.assertEqual("/settings.json filter=settings\n", (ROOT / ".gitattributes").read_text(encoding="utf-8")) + self.assertIn(f"{INSTALL}\n", (ROOT / "README.md").read_text(encoding="utf-8")) diff --git a/bin/repo_checks/test_types.py b/bin/repo_checks/test_types.py index 161ab8f3..cd8bd7a4 100644 --- a/bin/repo_checks/test_types.py +++ b/bin/repo_checks/test_types.py @@ -15,5 +15,5 @@ class Types(unittest.TestCase): self.assertIsNotNone(floor, "README.md's Install names `Python 3.N or newer`") if shutil.which("uv") is None: self.fail("uv on PATH fetches mypy; see README.md's Test line") - ran = subprocess.run(["uv", "tool", "run", "--python", "%d.%d" % floor, "mypy==2.3.1", "--cache-dir=/dev/null", "--check-untyped-defs", "--disallow-untyped-defs", "--exclude", "/test_", "-p", "chunk_preflight", "-p", "claude_code", "-m", "comprehension_history", "-m", "git_repo", "-p", "judge_replay", "-p", "larv_review", "-p", "loop_claude", "-m", "markdown_text", "-p", "metric_bench", "-m", "project_key", "-m", "rank_todo", "-m", "round_titles", "-p", "reading_cost", "-p", "review_replay", "-p", "rule_hook", "-p", "rung_replay", "-p", "score_outcomes", "-p", "subagent_rung", "-m", "settings_filter", "-m", "shell_command", "-m", "statusline", "-m", "todo_table", "-p", "transcript_archive", "-m", "utc_stamp"], capture_output=True, cwd=ROOT / "bin", text=True) + ran = subprocess.run(["uv", "tool", "run", "--python", "%d.%d" % floor, "mypy==2.3.1", "--cache-dir=/dev/null", "--check-untyped-defs", "--disallow-untyped-defs", "--exclude", "/test_", "-p", "chunk_preflight", "-p", "claude_code", "-m", "comprehension_history", "-m", "git_repo", "-p", "judge_replay", "-p", "larv_review", "-p", "loop_claude", "-m", "markdown_text", "-p", "metric_bench", "-m", "project_key", "-m", "rank_todo", "-p", "reading_cost", "-p", "review_replay", "-m", "round_titles", "-p", "rule_hook", "-p", "rung_replay", "-p", "score_outcomes", "-m", "settings_filter", "-m", "shell_command", "-m", "statusline", "-p", "subagent_rung", "-m", "todo_table", "-p", "transcript_archive", "-m", "utc_stamp"], capture_output=True, cwd=ROOT / "bin", text=True) self.assertEqual(ran.returncode, 0, ran.stdout + ran.stderr) diff --git a/bin/settings_filter.py b/bin/settings_filter.py index b1c7b1ec..4f9ab157 100755 --- a/bin/settings_filter.py +++ b/bin/settings_filter.py @@ -3,22 +3,30 @@ Claude Code rewrites settings.json, in its own key order, whenever a model is picked or a plugin installed. Each machine owns its model, so git stores the -file without it, and neither write shows as a change. +file without it, and neither write reaches a commit. """ import json import sys def cleaned(written: str) -> str: - """settings.json as git stores it: without "model", every key sorted.""" + """settings.json as git stores it: without "model", every key sorted. ValueError where it holds no JSON object.""" settings = json.loads(written) + if not isinstance(settings, dict): + raise ValueError("settings.json holds no JSON object") settings.pop("model", None) return json.dumps(settings, ensure_ascii=False, indent=2, sort_keys=True) + "\n" -def main() -> None: - sys.stdout.write(cleaned(sys.stdin.read())) +def main() -> int: + # On a non-zero exit git warns and stores the file as written. + try: + sys.stdout.write(cleaned(sys.stdin.read())) + except ValueError as error: + print(f"settings_filter.py: {error}", file=sys.stderr) + return 1 + return 0 if __name__ == "__main__": - main() + sys.exit(main()) diff --git a/bin/test_settings_filter.py b/bin/test_settings_filter.py index 580b7f61..0bfb633a 100644 --- a/bin/test_settings_filter.py +++ b/bin/test_settings_filter.py @@ -1,4 +1,5 @@ import json +import os import pathlib import subprocess import sys @@ -8,8 +9,11 @@ import unittest sys.path.insert(0, str(pathlib.Path(__file__).resolve().parent)) from settings_filter import cleaned +from test_env import isolated_env FILTER = pathlib.Path(__file__).resolve().parent / "settings_filter.py" +ROOT = FILTER.parents[1] +PICKED = json.dumps({"theme": "dark", "model": "opus[1m]", "env": {}}, indent=2) class Clean(unittest.TestCase): @@ -20,36 +24,60 @@ class Clean(unittest.TestCase): def test_keeps_text_outside_ascii(self): self.assertEqual(cleaned('{"name": "Lilleman på Larv"}'), '{\n "name": "Lilleman på Larv"\n}\n') + def test_refuses_json_that_is_no_object(self): + with self.assertRaises(ValueError): + cleaned("[]") + + def test_a_broken_file_exits_1_naming_the_tool(self): + ran = subprocess.run([sys.executable, FILTER], input="{", capture_output=True, text=True) + self.assertEqual((ran.returncode, ran.stdout), (1, "")) + self.assertIn("settings_filter.py: ", ran.stderr) + class Checkout(unittest.TestCase): - def test_a_model_pick_in_claude_codes_key_order_leaves_nothing_to_commit_and_outlasts_an_update(self): - with tempfile.TemporaryDirectory() as repo: - def git(*args): - return subprocess.run(["git", "-C", repo, "-c", "user.name=t", "-c", "user.email=t@t", *args], capture_output=True, check=True, text=True).stdout + """A repo as README → Install leaves it, at tag v1, and v2, which leaves settings.json alone.""" - git("init", "-q") - (pathlib.Path(repo) / "bin").mkdir() - (pathlib.Path(repo) / "bin" / "settings_filter.py").symlink_to(FILTER) - (pathlib.Path(repo) / ".gitattributes").write_text("settings.json filter=settings\n") - git("config", "filter.settings.clean", "bin/settings_filter.py") - settings = pathlib.Path(repo) / "settings.json" - settings.write_text(cleaned('{"env": {}, "theme": "dark"}')) - git("add", ".") - git("commit", "-qm", "settings") - git("tag", "v1") - (pathlib.Path(repo) / "other").write_text("") - git("add", "other") - git("commit", "-qm", "a tag that leaves settings.json alone") - git("tag", "v2") - git("checkout", "-q", "v1") - picked = json.dumps({"theme": "dark", "model": "opus[1m]", "env": {}}, indent=2) - settings.write_text(picked) - self.assertEqual(git("diff"), "") - # README → Update: git status lists a file whose size changed until it is staged; staging adds no change, and keeps the model through the move. - git("add", "settings.json") - self.assertEqual(git("status", "--porcelain"), "") - git("checkout", "-q", "-f", "v2") - self.assertEqual(settings.read_text(), picked) + def setUp(self): + temp = tempfile.TemporaryDirectory() + self.addCleanup(temp.cleanup) + self.repo = pathlib.Path(temp.name) + self.env = {**isolated_env(), "GIT_CONFIG_GLOBAL": os.devnull, "GIT_CONFIG_NOSYSTEM": "1"} + self.git("init", "-q") + (self.repo / "bin").mkdir() + (self.repo / "bin" / "settings_filter.py").symlink_to(FILTER) + (self.repo / ".gitattributes").write_text((ROOT / ".gitattributes").read_text()) + self.git("config", "filter.settings.clean", "bin/settings_filter.py") + self.settings = self.repo / "settings.json" + self.settings.write_text(cleaned('{"env": {}, "theme": "dark"}')) + (self.repo / ".claude").mkdir() + (self.repo / ".claude" / "settings.json").write_text('{\n "model": "claude-opus-5-5"\n}\n') + self.git("add", ".") + self.git("commit", "-qm", "settings") + self.git("tag", "v1") + (self.repo / "other").write_text("") + self.git("add", "other") + self.git("commit", "-qm", "a tag that leaves settings.json alone") + self.git("tag", "v2") + self.git("checkout", "-q", "v1") + + def git(self, *args): + return subprocess.run(["git", "-C", self.repo, "-c", "user.name=t", "-c", "user.email=t@t", *args], capture_output=True, check=True, env=self.env, text=True).stdout + + def test_a_model_pick_in_claude_codes_key_order_leaves_nothing_to_commit(self): + self.settings.write_text(PICKED) + self.assertEqual(self.git("diff"), "") + # git status lists a file whose size changed until it is staged; staging adds no change. + self.git("add", "settings.json") + self.assertEqual(self.git("status", "--porcelain"), "") + + def test_a_staged_pick_outlasts_an_update_to_a_tag_that_leaves_settings_json_alone(self): + self.settings.write_text(PICKED) + self.git("add", "settings.json") + self.git("checkout", "-q", "-f", "v2") + self.assertEqual(self.settings.read_text(), PICKED) + + def test_the_repos_own_harness_settings_keep_their_model(self): + self.assertEqual(self.git("show", ":.claude/settings.json"), '{\n "model": "claude-opus-5-5"\n}\n') if __name__ == "__main__": From 1f8edb8e2e3d879bfa8261998a4fd53403f88786 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Wed, 21 Oct 2026 21:59:53 +0200 Subject: [PATCH 38/47] =?UTF-8?q?Answer=20principles=20round=201:=202=20?= =?UTF-8?q?=F0=9F=94=B4,=205=20=F0=9F=9F=A1;=20the=20stability=20round's?= =?UTF-8?q?=20commit=20holds=20the=20fixes,=20and=20the=20filter=20now=20e?= =?UTF-8?q?xits=201=20on=20a=20file=20that=20holds=20no=20JSON=20object,?= =?UTF-8?q?=20AGENTS.md=20reads=20staged=20changes=20too,=20and=20the=20my?= =?UTF-8?q?py=20targets=20are=20sorted?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From 80270c6b170b2fbff4eb7e4248ca102316a1c215 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Wed, 21 Oct 2026 21:59:53 +0200 Subject: [PATCH 39/47] =?UTF-8?q?Answer=20product-owner=20round=201:=201?= =?UTF-8?q?=20=F0=9F=94=B4,=201=20=F0=9F=9F=A1;=20the=20stability=20round'?= =?UTF-8?q?s=20commit=20holds=20the=20fixes,=20and=20Install=20now=20says?= =?UTF-8?q?=20to=20pick=20a=20model=20on=20each=20new=20machine?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From d08a128d0fd76cfa170477f2e1051206a3a78b00 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Wed, 21 Oct 2026 21:59:53 +0200 Subject: [PATCH 40/47] =?UTF-8?q?Answer=20security=20round=201:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=200=20=F0=9F=9F=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From b7261987ad3884af4e86156ceadd5715c3798e3b Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Wed, 21 Oct 2026 22:14:24 +0200 Subject: [PATCH 41/47] =?UTF-8?q?Answer=20principles=20round=202:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=201=20=F0=9F=9F=A1;=20main=20parses=20and=20check?= =?UTF-8?q?s=20settings.json,=20so=20cleaned=20takes=20a=20dict=20and=20ne?= =?UTF-8?q?ver=20raises?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/repo_checks/test_settings.py | 5 +++-- bin/settings_filter.py | 21 +++++++++++---------- bin/test_settings_filter.py | 21 +++++++++------------ 3 files changed, 23 insertions(+), 24 deletions(-) diff --git a/bin/repo_checks/test_settings.py b/bin/repo_checks/test_settings.py index e769a22a..debbcfca 100644 --- a/bin/repo_checks/test_settings.py +++ b/bin/repo_checks/test_settings.py @@ -17,8 +17,9 @@ class Settings(unittest.TestCase): # The index, not the working file: the working file holds this machine's model in Claude Code's key order. stored = git("show", ":settings.json", cwd=str(ROOT)) self.assertIsInstance(stored, str, stored) - self.assertNotIn("model", json.loads(stored)) - self.assertEqual(stored, cleaned(stored), f"commit settings.json with the filter on: {INSTALL}") + fix = f"commit settings.json with the filter on: {INSTALL}" + self.assertNotIn("model", json.loads(stored), fix) + self.assertEqual(stored, cleaned(json.loads(stored)), fix) def test_the_readme_installs_the_filter_git_attributes_names_for_the_root_settings_only(self): self.assertEqual("/settings.json filter=settings\n", (ROOT / ".gitattributes").read_text(encoding="utf-8")) diff --git a/bin/settings_filter.py b/bin/settings_filter.py index 4f9ab157..7c60b1cf 100755 --- a/bin/settings_filter.py +++ b/bin/settings_filter.py @@ -2,29 +2,30 @@ """Git's clean filter for settings.json: drop "model" and sort every key. Claude Code rewrites settings.json, in its own key order, whenever a model is -picked or a plugin installed. Each machine owns its model, so git stores the -file without it, and neither write reaches a commit. +picked or a plugin installed. Each machine owns its model, so neither the +model nor Claude Code's key order reaches a commit. """ import json import sys -def cleaned(written: str) -> str: - """settings.json as git stores it: without "model", every key sorted. ValueError where it holds no JSON object.""" - settings = json.loads(written) - if not isinstance(settings, dict): - raise ValueError("settings.json holds no JSON object") - settings.pop("model", None) - return json.dumps(settings, ensure_ascii=False, indent=2, sort_keys=True) + "\n" +def cleaned(settings: dict[str, object]) -> str: + """settings.json as git stores it: without "model", every key sorted.""" + kept = {key: value for key, value in settings.items() if key != "model"} + return json.dumps(kept, ensure_ascii=False, indent=2, sort_keys=True) + "\n" def main() -> int: # On a non-zero exit git warns and stores the file as written. try: - sys.stdout.write(cleaned(sys.stdin.read())) + settings = json.loads(sys.stdin.read()) except ValueError as error: print(f"settings_filter.py: {error}", file=sys.stderr) return 1 + if not isinstance(settings, dict): + print("settings_filter.py: settings.json holds no JSON object", file=sys.stderr) + return 1 + sys.stdout.write(cleaned(settings)) return 0 diff --git a/bin/test_settings_filter.py b/bin/test_settings_filter.py index 0bfb633a..d0d8cb28 100644 --- a/bin/test_settings_filter.py +++ b/bin/test_settings_filter.py @@ -18,24 +18,21 @@ PICKED = json.dumps({"theme": "dark", "model": "opus[1m]", "env": {}}, indent=2) class Clean(unittest.TestCase): def test_drops_the_model_and_sorts_every_key(self): - written = '{"theme": "dark", "model": "opus[1m]", "env": {"B": "1", "A": "2"}}' + written = {"theme": "dark", "model": "opus[1m]", "env": {"B": "1", "A": "2"}} self.assertEqual(cleaned(written), '{\n "env": {\n "A": "2",\n "B": "1"\n },\n "theme": "dark"\n}\n') def test_keeps_text_outside_ascii(self): - self.assertEqual(cleaned('{"name": "Lilleman på Larv"}'), '{\n "name": "Lilleman på Larv"\n}\n') + self.assertEqual(cleaned({"name": "Lilleman på Larv"}), '{\n "name": "Lilleman på Larv"\n}\n') - def test_refuses_json_that_is_no_object(self): - with self.assertRaises(ValueError): - cleaned("[]") - - def test_a_broken_file_exits_1_naming_the_tool(self): - ran = subprocess.run([sys.executable, FILTER], input="{", capture_output=True, text=True) - self.assertEqual((ran.returncode, ran.stdout), (1, "")) - self.assertIn("settings_filter.py: ", ran.stderr) + def test_a_file_that_holds_no_json_object_exits_1_naming_the_tool(self): + for written in ("{", "[]"): + ran = subprocess.run([sys.executable, FILTER], input=written, capture_output=True, text=True) + self.assertEqual((ran.returncode, ran.stdout), (1, ""), written) + self.assertIn("settings_filter.py: ", ran.stderr) class Checkout(unittest.TestCase): - """A repo as README → Install leaves it, at tag v1, and v2, which leaves settings.json alone.""" + """A repo as README → Install leaves it, checked out at tag v1; tag v2 doesn't change settings.json.""" def setUp(self): temp = tempfile.TemporaryDirectory() @@ -48,7 +45,7 @@ class Checkout(unittest.TestCase): (self.repo / ".gitattributes").write_text((ROOT / ".gitattributes").read_text()) self.git("config", "filter.settings.clean", "bin/settings_filter.py") self.settings = self.repo / "settings.json" - self.settings.write_text(cleaned('{"env": {}, "theme": "dark"}')) + self.settings.write_text(cleaned({"env": {}, "theme": "dark"})) (self.repo / ".claude").mkdir() (self.repo / ".claude" / "settings.json").write_text('{\n "model": "claude-opus-5-5"\n}\n') self.git("add", ".") From 651695a6955a6b9a1beb2dfd942373a28d2cc0ba Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Wed, 21 Oct 2026 22:14:24 +0200 Subject: [PATCH 42/47] =?UTF-8?q?Answer=20prose=20round=201:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=208=20=F0=9F=9F=A1;=20one=20copy=20of=20the=20git?= =?UTF-8?q?=20steps,=20in=20README,=20true=20claims=20about=20the=20synced?= =?UTF-8?q?=20effort=20and=20the=20filter,=20and=20the=20trust=20entry=20a?= =?UTF-8?q?dded=20to=20item=20190?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AGENTS.md | 2 +- CHANGELOG.md | 4 ++-- README.md | 12 +++++++----- docs/decisions.md | 4 ++-- todo.md | 6 +++--- 5 files changed, 15 insertions(+), 13 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index f50aab7a..fbba6a54 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -53,7 +53,7 @@ Decisions live in `docs/decisions.md`: ## Working rules - `routing-calls-raised.md` sits at the root of loop-claude's archive (`$LOOP_CLAUDE_TRANSCRIPTS`, default `~/.claude/loop-claude-transcripts`). Each of its lines is a call or a `Reset`, with a stamp. A call is new when it is stamped after the latest `Reset` and after the latest stamp that `todo.md` or `docs/decisions.md` → `routing:` cites. When there are new calls, file one `todo.md` item to settle them, or refresh the item already filed. Its detail quotes those calls with their stamps, and the routed-chunks table of `routing-figures.md` beside it, never the project names its other tables hold. A change to the ladder, its steps or the delegation rule is the human's. The chunk that settles the calls cites the latest stamp it settled in `docs/decisions.md` → `routing:`, whatever the human decided, so they are not filed again. Once a chunk that changes the ladder, its steps or the delegation rule has merged, append `- Reset` to `routing-calls-raised.md`: the figures then count only chunks finished after it, and its calls may be raised again. -- When `~/.claude/settings.json` has uncommitted changes, commit them on a branch of their own and merge them through a PR: Claude Code writes that file from any session. Read their diff first with `git diff HEAD -- settings.json`, which shows staged changes too: an empty one is a model pick, which `git add settings.json` clears. When it holds a credential, such as a token in `env` or `mcpServers`, ask the human to move it out of the file, and commit only once it is gone. A token in `env` moves to the shell profile; a server in `mcpServers` moves to `~/.claude.json` with `claude mcp add --scope user`. +- When `~/.claude/settings.json` has uncommitted changes, commit them on a branch of their own and merge them through a PR: Claude Code writes that file from any session. Read their diff first: `git diff HEAD -- settings.json`, which shows staged changes too. An empty diff means only the model or the key order changed: `git add settings.json` takes the file off `git status`, with nothing to commit. When the diff holds a credential, such as a token in `env` or `mcpServers`, ask the human to move it out of the file, and commit only once it is gone. A token in `env` moves to the shell profile; a server in `mcpServers` moves to `~/.claude.json` with `claude mcp add --scope user`. ## Scoring run diff --git a/CHANGELOG.md b/CHANGELOG.md index b23d6c5b..bb79e7d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,9 +2,9 @@ ## Unreleased -- `settings.json` no longer carries a model: each machine keeps the one you pick with `/model`. Git's clean filter `bin/settings_filter.py` drops `"model"` and sorts the keys, so neither a pick nor Claude Code's key order can reach a commit. After a pick, `git status` may still list `settings.json`; `git add settings.json` clears it, with nothing to commit. Update now starts with that `git add`: without it, the move drops the machine's model. An update to a release that changes `settings.json` drops the model either way. On upgrade, on each machine: +- `settings.json` no longer carries a model: each machine keeps the one you pick with `/model`. Git's clean filter `bin/settings_filter.py` drops `"model"` and sorts the keys, so neither a pick nor Claude Code's key order can reach a commit. Update now starts with `git add settings.json`: without it, Update's `git checkout -f` drops the machine's model. On upgrade, on each machine: 1. Turn the filter on in `~/.claude`: `git config filter.settings.clean bin/settings_filter.py`. - 2. Pick a model with `/model`. Until you do, Claude Code runs its default model, where this repo set `opus` before. + 2. Pick a model with `/model`. Until you do, Claude Code runs its default model; this repo set `opus` before. - larv-review's "Re-entry" is now one table of which passes a fix reruns, and the pass table's triggers say only when a pass first runs. The rule is unchanged; a fix for a 🟢, a ❓ or a prose finding still reruns no pass. ## 0.2.0 diff --git a/README.md b/README.md index 4b589776..2d9692d7 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ git init git remote add origin ssh://git@gitea.larvit.se:21022/lilleman/claude-config.git ``` -Then run Update's commands, from `git fetch` on: a new checkout has no model pick to stage. +Then run Update's commands, skipping `git add settings.json`: the new repository tracks no file yet. Have Python 3.11 or newer as `python3` on `PATH`, and for Rust projects `rust-analyzer` on `PATH`, which the `rust-analyzer-lsp` plugin needs. Install every plugin `settings.json` enables: @@ -60,13 +60,15 @@ Have git store `settings.json` without `"model"`, so a model you pick with `/mod git config filter.settings.clean bin/settings_filter.py ``` -After a pick, `git status` may still list `settings.json`, and `git pull` refuses to update it. `git add settings.json` clears that, with nothing to commit. A pull that changes `settings.json` then drops the model. Pick one with `/model` on each new machine, and again after such a pull. +Then pick a model with `/model`. + +After a pick, `git status` may list `settings.json`, and a `git pull` that changes the file refuses to run. `git add settings.json` stages no change and clears both. Once it is staged, such a pull goes through and drops the model: pick it again. Link `loop-claude` onto `PATH`: `ln -s ~/.claude/bin/loop-claude ~/.local/bin/loop-claude`. Run `loop-claude` only in a sandbox with no direct access to a production environment, such as a dedicated VM: every claude it starts, the interactive ones included, skips every permission prompt. ## Update -Move a machine that takes tagged releases to the latest tag. The move discards every uncommitted change to a file the latest tag tracks, such as a hook Claude Code wrote into `settings.json`. Git counts a model pick as such a change until `git add settings.json`, so stage it first. Where the tag changes `settings.json`, the move still drops this machine's model; pick it again with `/model`. List the uncommitted changes to files the checkout tracks, and the tag it is on: +Move a machine that takes tagged releases to the latest tag. The move discards every uncommitted change to a file the latest tag tracks, such as a hook Claude Code wrote into `settings.json`. Git counts a model pick as such a change until `git add settings.json`, so stage it first. List the uncommitted changes to files the checkout tracks, and the tag it is on: ```sh cd ~/.claude @@ -81,7 +83,7 @@ To keep an uncommitted change, merge it per `AGENTS.md` → "Working rules" and git checkout -f "$(git tag -l 'v*' --sort=-v:refname | head -n 1)" ``` -Then do what `CHANGELOG.md` asks of each version since the old tag, such as a new step under Install. +Then, where the tag changed `settings.json`, pick the model again with `/model`, and do what `CHANGELOG.md` asks of each version since the old tag, such as a new step under Install. ## Release @@ -101,7 +103,7 @@ Install puts only `loop-claude` on `PATH`; call the others by their path, such a - `review-replay ` replays a review pass's archived rounds from the projects run on the model, on the code each reviewed, and prints the lowest rung below the project's that, like each rung above it, finds every 🔴 and 🟡 the project's rung finds again; `review-replay --help` states the replay. Run it only in a sandbox, like loop-claude: each replayed reviewer skips every permission prompt, stability-reviewer has Bash, and an archived prompt may name paths on the host. - `rule-hook [overrides]` blocks a tool call that breaks a rule a program can check, unless the call overrides the rule; `settings.json` → `hooks` runs it before each Bash, Edit, MultiEdit, Write and Agent call, and `rule-hook --help` states the rules and the override. - `score-outcomes [L E I S]` lists the finished items whose guessed scores sit nearest the given ones, and the shipped items the project's `docs/score-anchors.md` names for each level of L, E and I, each with what its chunk measured; then the median outcome at each guessed R and S, and how well L, E and I each order the chunks by review rounds and 🔴 findings; `score-outcomes --help` states the measures. -- `settings_filter.py` is git's clean filter for `settings.json`: it drops `"model"` and sorts the keys. `.gitattributes` names it, and Install turns it on. +- `settings_filter.py` is git's clean filter for `settings.json`: it drops `"model"` and sorts the keys. `.gitattributes` sets the filter `settings` on `settings.json`, and Install's `git config` line makes this script that filter. - `statusline.py` renders Claude Code's status line; `settings.json` → `statusLine` runs it. - `subagent-rung [--plan] ` prints the Agent tool's model and effort for a subagent's task, picked by its L from the project's model, and with `--plan` never below the project's rung; `subagent-rung --help` states the rule. diff --git a/docs/decisions.md b/docs/decisions.md index d12f75df..d63ce45f 100644 --- a/docs/decisions.md +++ b/docs/decisions.md @@ -164,7 +164,7 @@ Three places carry the rule. `rules/todo-items.md` states it and loads with `tod ## settings.json: each machine owns its model, and git's clean filter `bin/settings_filter.py` keeps it, and Claude Code's key order, out of every commit -2026-10-21, lilleman. Serves goal 2: Claude Code rewrites `"model"` in `settings.json` on every `/model` and plugin install, so a tracked model let one machine's pick override every other's. lilleman chose a model per machine over a synced one in `env.ANTHROPIC_MODEL`, which `/model` could not outlast past one session: it is simpler, and loop-claude picks each project's model in `~/.claude/loop-claude-models.json` anyway. The filter also sorts the keys, since each write puts them back in Claude Code's order. Git still lists `settings.json` after a pick that changes the file's size, and `git pull` refuses to update it, until `git add settings.json`, which stages no change. Until then, Update's `git checkout -f` rewrites the file and drops the model, so Update stages it first. A move or pull that changes `settings.json` drops the machine's model either way. The effort keys, `effortLevel` and `modelSettings`, stay synced: the routing decision on a chunk's worker rung relies on `settings.json` running every interactive session at xhigh effort. Valid while Claude Code writes the model it picks into `settings.json`. +2026-10-21, lilleman. Serves goal 2: Claude Code rewrites `"model"` in `settings.json` on every `/model` and plugin install, so a tracked model let one machine's pick override every other's. lilleman chose a model per machine over one synced in `env.ANTHROPIC_MODEL`, which would override a `/model` pick from the next session on. A model per machine is simpler, and loop-claude picks each project's model in `~/.claude/loop-claude-models.json` anyway. The filter also sorts the keys, since each write puts them back in Claude Code's order. The cost: a move or pull that changes `settings.json` drops the machine's model. The effort keys, `effortLevel` and `modelSettings`, stay synced: the routing decision on a chunk's worker rung relies on the effort `settings.json` gives every interactive session. Valid while Claude Code writes the model it picks into `settings.json`. ## the repo may name bender, bender-infra and ai-sandbox @@ -272,7 +272,7 @@ Valid while the index ranks these models, and while no newer model joins the cat 2026-10-14, lilleman. Serves goals 1.1 and 1.4. -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 would spend on work that never 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 comprehension seat and the security pass's subagent on the project's rung, and each reviewer there too unless the highest E + I among its items picks a higher rung or a replay lowered its pass, through the Agent tool's model and effort. The worker 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. lilleman chose the project's rung, medium, knowing `settings.json` runs Opus 5.5 at xhigh, so a routed worker runs below the effort an interactive session takes. +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 would spend on work that never 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 comprehension seat and the security pass's subagent on the project's rung, and each reviewer there too unless the highest E + I among its items picks a higher rung or a replay lowered its pass, through the Agent tool's model and effort. The worker 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. lilleman chose the project's rung, medium, knowing `settings.json` then ran every interactive session on Opus 5.5 at xhigh, so a routed worker ran below the effort an interactive session took. 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 never run below the worker's rung while it runs above the project's: a worker climbs because its chunk proved harder than its score said, which is when a cheaper reviewer is the bigger risk. 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`. diff --git a/todo.md b/todo.md index e65f39e9..c01e75c0 100644 --- a/todo.md +++ b/todo.md @@ -37,7 +37,7 @@ | 204 | 0.5.0 | | | **Read the status line's branch through `git_repo.git`, so no tool in `bin/` runs git outside it.** | 1 | 2 | 1 | 2 | 1 | code health by 3 | 21.6 | | 125 | 0.5.0 | | decision | **Give "record", "outcome" and "places" one meaning each across `bin/`, and rename `bin/larv_review/git.py` by what it holds.** | 3 | 1 | 3 | 5 | 5 | code health by 9, 1.4 by 9 | 19.7 | | 172 | 0.5.0 | | | **Name the project's rung `project` across `bin/loop_claude`, in place of `anchor`, as `bin/model_routing/ladder.py` names it.** | 2 | 1 | 3 | 4 | 3 | code health by 3, 1.4 by 3 | 16.5 | -| 190 | 0.5.0 | | | **Rewrite the `docs/decisions.md` entries `todo.md: one table …` and `loop-claude: a judge decides …` as the current state, so a reader no longer replays superseded paragraphs to learn what holds.** | 2 | 2 | 1 | 3 | 3 | code health by 3, 1.4 by 2 | 15.5 | +| 190 | 0.5.0 | | | **Rewrite the `docs/decisions.md` entries `todo.md: one table …`, `loop-claude: a judge decides …` and `loop-claude: before it opens claude …` as the current state, so a reader no longer replays superseded paragraphs to learn what holds.** | 2 | 2 | 1 | 3 | 3 | code health by 3, 1.4 by 2 | 15.5 | | 82 | 0.5.0 | | principle | **Sort `AGENTS.md`'s decision titles and `docs/decisions.md`'s entries by title.** | 2 | 2 | 1 | 3 | 4 | code health by 4, 1.4 by 4 | 14.6 | | 137 | 0.5.0 | | | **Archive a chunk's route as a record loop-claude reads back field by field, in place of the `Worker:` prose `ROUTED` parses, and name `stepped` and the judge's `bundled` by what they do.** | 4 | 2 | 3 | 7 | 4 | code health by 4, 1.4 by 4 | 14.6 | | 205 | 0.5.0 | | | **Rewrite the comprehension-floor decision's 2026-10-15 paragraph as the rule that holds, so it no longer scores G 9 after PR #283 replaced G.** | 1 | 2 | 1 | 2 | 1 | code health by 2 | 14.4 | @@ -197,9 +197,9 @@ The inherited architect of PR #257's scoring run named `bin/reading_cost/measure The architecture pass of PR #296 found one rung under two names: `bin/model_routing/ladder.py` calls it `project`, while `bin/loop_claude/routing.py`, `cycle/prompts.py`, `cycle/run.py`'s `Cycle.anchor` and `loop/main.py` call it `anchor`, and gloss it as "anchor, the project's rung" in docstring after docstring. A reader works out that the two are one rung each time. Make `bin/loop_claude/routing.py`'s `first_route` easier to read. -### 190. Rewrite the `docs/decisions.md` entries `todo.md: one table …` and `loop-claude: a judge decides …` as the current state, so a reader no longer replays superseded paragraphs to learn what holds. +### 190. Rewrite the `docs/decisions.md` entries `todo.md: one table …`, `loop-claude: a judge decides …` and `loop-claude: before it opens claude …` as the current state, so a reader no longer replays superseded paragraphs to learn what holds. -Found by the prose review of PR #312, which judged both entries to read as amendment logs, each paragraph correcting an earlier one. The rewrite keeps each paragraph's date and reason only where it still explains a rule that holds, and drops superseded states. It covers items 157 and 183, which reshape paragraphs of the same two entries. +Found by the prose review of PR #312, which judged both entries to read as amendment logs, each paragraph correcting an earlier one. The rewrite keeps each paragraph's date and reason only where it still explains a rule that holds, and drops superseded states. It covers items 157 and 183, which reshape paragraphs of the same two entries. The prose review of PR #335 found the trust entry, `loop-claude: before it opens claude …`, made of four dated paragraphs, and a 2026-10-21 paragraph on item 120 that records a move which changed no rule; drop that paragraph. ### 82. Sort `AGENTS.md`'s decision titles and `docs/decisions.md`'s entries by title. From 250b29bc665d5bf5a2399c970d7f5dde30466b0b Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Wed, 21 Oct 2026 22:14:24 +0200 Subject: [PATCH 43/47] =?UTF-8?q?Answer=20stability=20round=202:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=200=20=F0=9F=9F=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From b580d3991e4a82e0cfb6bac340df54ed470f681d Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Wed, 21 Oct 2026 22:14:24 +0200 Subject: [PATCH 44/47] =?UTF-8?q?Answer=20product-owner=20round=202:=200?= =?UTF-8?q?=20=F0=9F=94=B4,=200=20=F0=9F=9F=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From 8e0c2d50f852f29e620b5463f5eb75f1a1e0b41b Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Wed, 21 Oct 2026 22:18:18 +0200 Subject: [PATCH 45/47] =?UTF-8?q?Answer=20principles=20round=203:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=200=20=F0=9F=9F=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From 33645b00e4066427abc90683483b91dd6a325787 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Wed, 21 Oct 2026 22:18:18 +0200 Subject: [PATCH 46/47] =?UTF-8?q?Answer=20stability=20round=203:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=200=20=F0=9F=9F=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From 1dd65de56f1dad776283aa8baa683425362178eb Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Wed, 21 Oct 2026 22:20:15 +0200 Subject: [PATCH 47/47] Record the comprehension check: paired ruling better against dec19c5 --- docs/comprehension-history.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/docs/comprehension-history.md b/docs/comprehension-history.md index 7f941c45..c1eaf682 100644 --- a/docs/comprehension-history.md +++ b/docs/comprehension-history.md @@ -2462,3 +2462,27 @@ Inherited architect, decided by: - Self-sufficiency: `CLAUDE.md:105` "Vocabulary": defines the comprehension terms the charter used without defining, and rules.py's OVERRIDE gains its explanation - Self-sufficiency: `bin/metric_bench/main.py:114` `run_scores`: a small cost, "item 204's" points to a plan item a code reader can't resolve - Locality: `bin/rule_hook/git.py:7` `git`: a small cost, the guards no longer sit beside the hook that needs them, though both docstrings say why + +## 2026-10-21T20:20:12Z, PR #335 at 33645b0, against dec19c5 + +Ruling: better + +| Seat | Navigation | Locality | Shape | Self-sufficiency | Overall | +|---|---|---|---|---|---| +| Mid A | better | same | better | same | better | +| Inherited architect | better | same | better | same | better | + +Mid A, decided by: + +- Navigation, Shape: `skills/larv-review/SKILL.md:73` "Re-entry": one table now answers which passes a fix reruns, where five Trigger cells and three bullets did, with a worked example under it +- Shape: `skills/larv-review/SKILL.md:86` "What a round reviews": the round-2 scope left "Round cap", which now holds only counting and capping, as its name promises +- Locality: `bin/settings_filter.py:12` `cleaned`: hidden state, since the stored and the working file differ and a per-clone git setting turns the filter on, with an ordering rule for Update; it balances the Re-entry table's gain +- Self-sufficiency: `bin/settings_filter.py:2` module docstring: the tool explains itself, but the steps to run it live in README and AGENTS.md + +Inherited architect, decided by: + +- Navigation, Shape: `skills/larv-review/SKILL.md:73` "Re-entry": "which passes does this fix rerun" is answered in one table where it was split between Trigger-cell clauses and a Rerun bullet +- Shape: `skills/larv-review/SKILL.md:31` pass table's Trigger column: each cell now says only when the pass first runs +- Navigation: `skills/larv-review/SKILL.md:86` "What a round reviews": a named paragraph beside Re-entry, where a reader asking what round 2 looked at searches +- Locality: `.gitattributes:1` the settings filter: committed behaviour depends on an untracked per-machine git setting, and README's Install and Update steps work only in order +- Self-sufficiency: `bin/settings_filter.py:2` module docstring: the script stands alone, but cannot say it is inert unless Install's git config line ran