diff --git a/AGENTS.md b/AGENTS.md index a11b079e..26a67bf9 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -8,7 +8,7 @@ Decisions live in `docs/decisions.md`: - loop-claude: before an interrupt, it marks the checkout and each of its worktrees trusted in `~/.claude.json` - bin/: the tests rerun themselves on a `uv`-fetched Python at README Install's floor - bin/: the tools and their tests run on the host's Python, with no container -- comprehension floor: every dimension and the overall at 7.0 or above, and 0.2.0 waits on it +- comprehension floor: every dimension and the overall at 7.0 or above, and 0.3.0 waits on it - 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 fix for a πŸ”΄ or 🟑 reruns the pass that found it and each pass whose trigger names fixes like it; a fix for a 🟒, a ❓ or a prose finding reruns none diff --git a/docs/decisions.md b/docs/decisions.md index 1c7302e7..a3707c1a 100644 --- a/docs/decisions.md +++ b/docs/decisions.md @@ -34,9 +34,9 @@ 2026-09-24, larv-review. Serves goals 1 and 2. The tools drive the host's claude CLI and read the host's session files, which a container cannot see; the tests run on the same host Python the tools meet. Valid while claude runs on the host. -## comprehension floor: every dimension and the overall at 7.0 or above, and 0.2.0 waits on it +## comprehension floor: every dimension and the overall at 7.0 or above, and 0.3.0 waits on it -2026-09-27, lilleman, restating the 2026-09-24 target and extending it to the overall. Serves goal 1. Valid while the scoring run keeps its four seats. The decisions to ship under the floor, listed below, stand until `todo.md` item 62 lifts the project to it. 2026-10-12, lilleman: item 62 moves to 0.2.0, after the task routing in 0.1.0. The chunk that ends 0.1.0 merges under the floor only once lilleman ships it under the floor, listed below. +2026-09-27, lilleman, restating the 2026-09-24 target and extending it to the overall. Serves goal 1. Valid while the scoring run keeps its four seats. The decisions to ship under the floor, listed below, stand until `todo.md` item 62 lifts the project to it. 2026-10-12, lilleman: item 62 moves to 0.2.0, after the task routing in 0.1.0. The chunk that ends 0.1.0 merges under the floor only once lilleman ships it under the floor, listed below. 2026-10-12, lilleman: 0.1.0 becomes the CLAUDE.md, hook and reviewer rework, and item 62 moves to 0.3.0 with every other item. lilleman decided to ship each of these under the floor on the day listed. Each line gives its last scores (Navigation, Locality, Shape, Self-sufficiency, overall): diff --git a/todo.md b/todo.md index b2d7b77b..c13c127a 100644 --- a/todo.md +++ b/todo.md @@ -6,7 +6,7 @@ `Bar = 9` -`Next ID = 95` +`Next ID = 99` | Goal | W | |---|---| @@ -24,42 +24,70 @@ | ID | Release | Exempt | Item | R | S | A | G | Goals | Score | |---|---|---|---|---|---|---|---|---|---| -| 93 | 0.1.0 | | **Let a chunk's worker start below the project's model, once the archive shows chunks on a lower rung took no more review rounds than chunks on the project's model.** | 3 | 2 | 6 | 7 | 1.1, 1.4 | 22.4 | -| 87 | 0.1.0 | | **Score every `todo.md` item's complexity C from 1 to 10, and have `rank_todo.py` fail on an item without one.** | 3 | 4 | 6 | 7 | 1.1, 1.4 | 21.9 | -| 94 | 0.1.0 | | **Every 20th cycle, have loop-claude measure token spend and routing outcomes, file them here, and interrupt the human only when they call for a routing change.** | 3 | 5 | 6 | 7 | 1.1, 1.4 | 21.6 | -| 88 | 0.1.0 | | **Define one routing ladder of (model, effort) rungs ordered by a published ranking of their competence, and map a task's R + C to a rung relative to the project's model.** | 3 | 4 | 6 | 7 | 1.4 | 21.4 | -| 90 | 0.1.0 | | **Route each reviewer by the chunk's R + C, once a replay of past chunks shows the routed reviewer finds the πŸ”΄ and 🟑 findings on record.** | 4 | 5 | 6 | 7 | 1.4 | 20.2 | -| 91 | 0.1.0 | | **Start each chunk's worker on the rung its item's R + C picks, never below the project's model, and step it one rung up after two unfinished verdicts on one chunk.** | 4 | 5 | 6 | 7 | 1.4 | 20.2 | -| 92 | 0.1.0 | | **Have the worker route each subagent by its task's R + C, and delegate a task only when the worker needs just its conclusion.** | 2 | 2 | 5 | 6 | 1.4 | 19.0 | -| 89 | 0.1.0 | | **Run the judge on the rung its chunk's R + C picks, once a replay of archived transcripts shows it returns the verdicts on record.** | 3 | 4 | 5 | 6 | 1.4 | 17.5 | -| 1 | 0.2.0 | question | **Say in README β†’ Install how the transcript archive is backed up, once bender-infra backs up ai-sandbox's data volume.** | 3 | 5 | 8 | 9 | 3, 4 | 27.0 | -| 62 | 0.2.0 | defect | **Lift Locality, Self-sufficiency and the overall to the comprehension floor, at the places the seats name.** | 4 | 6 | 6 | 8 | 1.1 | 22.3 | -| 21 | 0.2.0 | | **Give `settings.json`'s model one writer, and sort its keys.** | 3 | 3 | 6 | 7 | 1.3 | 21.8 | -| 86 | 0.2.0 | | **Make `CLAUDE.md` β†’ "README" send cross-cutting decisions to `docs/decisions.md`, and reword two unclear sentences on recording choices.** | 1 | 1 | 5 | 6 | 1.3 | 20.4 | -| 49 | 0.2.0 | principle | **Check that `AGENTS.md` lists exactly the titles of `docs/decisions.md`.** | 1 | 2 | 5 | 6 | 1.3 | 20.1 | -| 59 | 0.2.0 | | **Bound a run of unfinished verdicts on one chunk, so a worker and judge that disagree cannot cycle unattended without end.** | 3 | 3 | 6 | 6 | 1.4 | 19.8 | -| 12 | 0.2.0 | | **Run the test suite in CI on every PR, or record in `docs/decisions.md` why the local run is enough.** | 2 | 4 | 4 | 6 | 1.1 | 16.9 | -| 80 | 0.2.0 | | **State in README β†’ Install that every machine taking this checkout must be a sandbox, as `settings.json`'s auto mode assumes.** | 1 | 1 | 5 | 5 | 4 | 16.8 | -| 5 | 0.2.0 | decision | **Key a project on its checkout's full path, and refuse to start while another session uses that key.** | 5 | 5 | 5 | 6 | 1.1 | 15.6 | -| 84 | 0.2.0 | | **Check, at each release's scoring run, that seats in a paired ruling agree more often than two scoring runs on near-identical code do, as the paired-ruling decision assumes.** | 2 | 2 | 4 | 5 | 1.4 | 15.1 | -| 67 | 0.2.0 | principle | **Point stability-reviewer at the technical principles in place of its own restatement of them.** | 2 | 3 | 4 | 5 | 1.3 | 14.9 | -| 66 | 0.2.0 | principle | **Hold systems-architect's method thresholds only while the comprehension panel finds the flagged code hard.** | 3 | 3 | 4 | 5 | 1.1 | 14.2 | -| 69 | 0.2.0 | principle | **Measure test coverage, so a chunk that lowers it is seen.** | 3 | 4 | 4 | 5 | 1.1 | 13.9 | -| 29 | 0.2.0 | | **Make the contributor a standing member of every project's audience, unless its `## Audience` says maintainability does not matter.** | 2 | 2 | 3 | 5 | 1.1, 1.4 | 13.4 | -| 68 | 0.2.0 | principle | **Test `workflow-bench/compare.py`'s blinding and `bench.py`'s run plan.** | 2 | 4 | 3 | 5 | 1.1 | 12.9 | -| 65 | 0.2.0 | | **Archive each judge reply the loop rejects.** | 3 | 4 | 4 | 5 | 3 | 12.5 | -| 82 | 0.2.0 | principle | **Sort `AGENTS.md`'s decision titles and `docs/decisions.md`'s entries by title.** | 1 | 2 | 3 | 4 | 1.3 | 12.3 | -| 73 | 0.2.0 | | **Have each reviewer write its full report to a file and return the worker only its findings' one-line summaries.** | 3 | 4 | 4 | 4 | 1.4 | 11.7 | -| 6 | 0.2.0 | decision | **Move what `loop-claude` writes out of `~/.claude.json`, and ask the human about each write that must stay.** | 5 | 5 | 4 | 5 | 1.1 | 11.7 | -| 51 | 0.2.0 | principle | **Hand loop-claude's terminal output to an injected effect, so no storage or retry function prints.** | 3 | 5 | 3 | 5 | 1.1 | 11.7 | -| 50 | 0.2.0 | principle | **Grant the bench's runs only the tools a review needs, in place of skipping every permission.** | 2 | 2 | 3 | 4 | 4 | 9.9 | -| 81 | 0.2.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.** | 2 | 2 | 3 | 4 | 4 | 9.9 | -| 4 | 0.2.0 | | **Name each chunk's archive folder by the chunk's start time, so `/` lists chunks in the order they ran.** | 3 | 2 | 4 | 3 | 3 | 9.6 | -| 52 | 0.2.0 | principle | **Record why this checkout lives in Claude Code's own directory, or move it out and link it in.** | 6 | 6 | 3 | 5 | 2 | 7.5 | -| 77 | 0.3.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.** | 3 | 6 | 6 | 7 | 1.1, 1.4 | 21.4 | +| 95 | 0.1.0 | | **Make `CLAUDE.md` a short router: only the rules every session needs, and a pointer to where each topic's rules load.** | 6 | 6 | 8 | 8 | 1.1, 1.3, 1.4 | 24.3 | +| 96 | 0.1.0 | | **Enforce each rule a program can check in a hook or in CI, with one recorded override the agent may use, and delete those rules from `CLAUDE.md`.** | 5 | 6 | 7 | 8 | 1.1, 1.3 | 23.3 | +| 97 | 0.1.0 | | **Have the per-diff reviewers report only correctness and requirement gaps, run the prose pass only on documentation changes, and have every architecture finding name a change the PR makes harder.** | 5 | 4 | 7 | 7 | 1.1, 1.4, 1.5 | 21.9 | +| 98 | 0.2.0 | | **Score R and S from a measurement wherever one exists, and calibrate each guessed score against the finished chunk's measured outcome.** | 2 | 5 | 6 | 7 | 1.1, 1.4 | 22.6 | +| 93 | 0.2.0 | | **Let a chunk's worker start below the project's model, once the archive shows chunks on a lower rung took no more review rounds than chunks on the project's model.** | 3 | 2 | 6 | 7 | 1.1, 1.4 | 22.4 | +| 87 | 0.2.0 | | **Score every `todo.md` item's complexity C from 1 to 10, and have `rank_todo.py` fail on an item without one.** | 3 | 4 | 6 | 7 | 1.1, 1.4 | 21.9 | +| 94 | 0.2.0 | | **Every 20th cycle, have loop-claude measure token spend and routing outcomes, file them here, and interrupt the human only when they call for a routing change.** | 3 | 5 | 6 | 7 | 1.1, 1.4 | 21.6 | +| 88 | 0.2.0 | | **Define one routing ladder of (model, effort) rungs ordered by a published ranking of their competence, and map a task's R + C to a rung relative to the project's model.** | 3 | 4 | 6 | 7 | 1.4 | 21.4 | +| 90 | 0.2.0 | | **Route each reviewer by the chunk's R + C, once a replay of past chunks shows the routed reviewer finds the πŸ”΄ and 🟑 findings on record.** | 4 | 5 | 6 | 7 | 1.4 | 20.2 | +| 91 | 0.2.0 | | **Start each chunk's worker on the rung its item's R + C picks, never below the project's model, and step it one rung up after two unfinished verdicts on one chunk.** | 4 | 5 | 6 | 7 | 1.4 | 20.2 | +| 92 | 0.2.0 | | **Have the worker route each subagent by its task's R + C, and delegate a task only when the worker needs just its conclusion.** | 2 | 2 | 5 | 6 | 1.4 | 19.0 | +| 89 | 0.2.0 | | **Run the judge on the rung its chunk's R + C picks, once a replay of archived transcripts shows it returns the verdicts on record.** | 3 | 4 | 5 | 6 | 1.4 | 17.5 | +| 1 | 0.3.0 | question | **Say in README β†’ Install how the transcript archive is backed up, once bender-infra backs up ai-sandbox's data volume.** | 3 | 5 | 8 | 9 | 3, 4 | 27.0 | +| 62 | 0.3.0 | defect | **Lift Locality, Self-sufficiency and the overall to the comprehension floor, at the places the seats name.** | 4 | 6 | 6 | 8 | 1.1 | 22.3 | +| 21 | 0.3.0 | | **Give `settings.json`'s model one writer, and sort its keys.** | 3 | 3 | 6 | 7 | 1.3 | 21.8 | +| 86 | 0.3.0 | | **Make `CLAUDE.md` β†’ "README" send cross-cutting decisions to `docs/decisions.md`, and reword two unclear sentences on recording choices.** | 1 | 1 | 5 | 6 | 1.3 | 20.4 | +| 49 | 0.3.0 | principle | **Check that `AGENTS.md` lists exactly the titles of `docs/decisions.md`.** | 1 | 2 | 5 | 6 | 1.3 | 20.1 | +| 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.** | 3 | 3 | 6 | 6 | 1.4 | 19.8 | +| 12 | 0.3.0 | | **Run the test suite in CI on every PR, or record in `docs/decisions.md` why the local run is enough.** | 2 | 4 | 4 | 6 | 1.1 | 16.9 | +| 80 | 0.3.0 | | **State in README β†’ Install that every machine taking this checkout must be a sandbox, as `settings.json`'s auto mode assumes.** | 1 | 1 | 5 | 5 | 4 | 16.8 | +| 5 | 0.3.0 | decision | **Key a project on its checkout's full path, and refuse to start while another session uses that key.** | 5 | 5 | 5 | 6 | 1.1 | 15.6 | +| 84 | 0.3.0 | | **Check, at each release's scoring run, that seats in a paired ruling agree more often than two scoring runs on near-identical code do, as the paired-ruling decision assumes.** | 2 | 2 | 4 | 5 | 1.4 | 15.1 | +| 67 | 0.3.0 | principle | **Point stability-reviewer at the technical principles in place of its own restatement of them.** | 2 | 3 | 4 | 5 | 1.3 | 14.9 | +| 66 | 0.3.0 | principle | **Hold systems-architect's method thresholds only while the comprehension panel finds the flagged code hard.** | 3 | 3 | 4 | 5 | 1.1 | 14.2 | +| 69 | 0.3.0 | principle | **Measure test coverage, so a chunk that lowers it is seen.** | 3 | 4 | 4 | 5 | 1.1 | 13.9 | +| 29 | 0.3.0 | | **Make the contributor a standing member of every project's audience, unless its `## Audience` says maintainability does not matter.** | 2 | 2 | 3 | 5 | 1.1, 1.4 | 13.4 | +| 68 | 0.3.0 | principle | **Test `workflow-bench/compare.py`'s blinding and `bench.py`'s run plan.** | 2 | 4 | 3 | 5 | 1.1 | 12.9 | +| 65 | 0.3.0 | | **Archive each judge reply the loop rejects.** | 3 | 4 | 4 | 5 | 3 | 12.5 | +| 82 | 0.3.0 | principle | **Sort `AGENTS.md`'s decision titles and `docs/decisions.md`'s entries by title.** | 1 | 2 | 3 | 4 | 1.3 | 12.3 | +| 73 | 0.3.0 | | **Have each reviewer write its full report to a file and return the worker only its findings' one-line summaries.** | 3 | 4 | 4 | 4 | 1.4 | 11.7 | +| 6 | 0.3.0 | decision | **Move what `loop-claude` writes out of `~/.claude.json`, and ask the human about each write that must stay.** | 5 | 5 | 4 | 5 | 1.1 | 11.7 | +| 51 | 0.3.0 | principle | **Hand loop-claude's terminal output to an injected effect, so no storage or retry function prints.** | 3 | 5 | 3 | 5 | 1.1 | 11.7 | +| 50 | 0.3.0 | principle | **Grant the bench's runs only the tools a review needs, in place of skipping every permission.** | 2 | 2 | 3 | 4 | 4 | 9.9 | +| 81 | 0.3.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.** | 2 | 2 | 3 | 4 | 4 | 9.9 | +| 4 | 0.3.0 | | **Name each chunk's archive folder by the chunk's start time, so `/` lists chunks in the order they ran.** | 3 | 2 | 4 | 3 | 3 | 9.6 | +| 52 | 0.3.0 | principle | **Record why this checkout lives in Claude Code's own directory, or move it out and link it in.** | 6 | 6 | 3 | 5 | 2 | 7.5 | +| 77 | 0.4.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.** | 3 | 6 | 6 | 7 | 1.1, 1.4 | 21.4 | ## Details +### 95. Make `CLAUDE.md` a short router: only the rules every session needs, and a pointer to where each topic's rules load. + +`CLAUDE.md` holds about 4,300 words and 150 or more rules, and every session loads it whole. Anthropic's memory docs (code.claude.com/docs/en/memory) say a longer file "reduce[s] adherence", and its best-practices page says to keep a line only if "removing this would cause Claude to make mistakes". IFScale (arxiv.org/abs/2507.11538) measures adherence falling as the instruction count grows, with earlier instructions followed more. Count instructions, not lines. + +Keep in it what every session needs and nothing else loads: the vocabulary, the working loop's order, and one line per topic naming the skill, agent or doc that holds its rules. Move each topic's rules to the place that loads it when the topic comes up, such as "Prose" and "Comments and documentation" to what a writer or prose-reviewer loads, "Todo items" to `rank_todo.py --help` and larv-review. Delete every rule Claude already follows unasked. 28 references in `skills/`, `agents/` and `bin/loop_claude/` name a `CLAUDE.md` section, and loop-claude's judge answers the worker from this file: each reference and the judge's reading follow the rule they point at. The PR states the instruction count before and after. Item 86's findings apply to whatever text survives. + +Needs 96. + +### 96. Enforce each rule a program can check in a hook or in CI, with one recorded override the agent may use, and delete those rules from `CLAUDE.md`. + +Anthropic's best-practices page: CLAUDE.md is advisory, hooks are deterministic, so a rule that must hold every time belongs in a hook. Candidates include one-line commit messages without authorship trailers, container images pinned to a full patch version, sorted ignore files, and `rank_todo.py --check` on `todo.md`. + +A blocking hook exits 2 with a message that names the rule, why it holds, and the override. The override is one marker, the same for every hook and check, that names the rule and gives a reason. A CI check accepts it too, as a trailer on the commit. larv-review's PR summary lists every override in the chunk, and loop-claude's judge counts an override as a choice the human makes, so an unattended run cannot make breaking a rule its habit. Rules a project sets for itself, such as fejkdata's Go-only-in-compose, stay that project's own hooks. + +### 97. Have the per-diff reviewers report only correctness and requirement gaps, run the prose pass only on documentation changes, and have every architecture finding name a change the PR makes harder. + +Anthropic's best-practices page: "A reviewer prompted to find gaps will usually report some, even when the work is sound… Chasing every finding leads to over-engineering." 320 of this repo's 876 commits answer a review round. + +Stability and product-owner report a defect, a broken requirement from the plan or the goals, or a breach of a technical principle, and nothing else. Prose runs when a chunk changes prose a reader reads, such as docs, comments, help text and the plan, and skips a code-only chunk. The architecture pass and the comprehension check keep their whole-project view, which guards goal 1.1 as a project grows. Each architecture finding names a concrete later change the PR makes harder, such as "a second forge needs edits in four modules", so a finding is checkable and a vague one is dropped. + +### 98. Score R and S from a measurement wherever one exists, and calibrate each guessed score against the finished chunk's measured outcome. + +Size and risk cannot be measured before the work exists. They can be estimated from finished work, the way reference-class forecasting estimates a project from earlier projects like it. When a chunk merges, record its measured outcome beside the item's guessed R and S: lines and files changed, review rounds, πŸ”΄ and 🟑 findings, and fixes the code needed later. Show the scorer, when it files an item, the finished items whose guessed scores sat nearest and what they measured. Once enough chunks are recorded, report how far each guess was from its outcome, so a scorer whose S runs high can be corrected. A score that can be computed from the code it touches, such as the files an item names, comes from that computation. Item 87's C is scored and calibrated the same way. + ### 93. Let a chunk's worker start below the project's model, once the archive shows chunks on a lower rung took no more review rounds than chunks on the project's model. Goal 1.1 asks for proven quality, so stepping down waits on the archive's evidence.