From 75c9c2718a9fb8827937e623f5dc37a2411125ea Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Thu, 12 Nov 2026 02:10:29 +0100 Subject: [PATCH] Audit 0.8.0's chunks: file 4 scripted steps, and the audit again for 0.10.0 --- docs/reading-cost.md | 17 ++++++++++++++ todo.md | 56 +++++++++++++++++++++++++++++++++++++------- 2 files changed, 65 insertions(+), 8 deletions(-) diff --git a/docs/reading-cost.md b/docs/reading-cost.md index 67da88cb..ac746f20 100644 --- a/docs/reading-cost.md +++ b/docs/reading-cost.md @@ -1674,3 +1674,20 @@ Read most (opens and searches): - `docs/decisions.md` 2 - `todo.md` 2 - `bin/model_routing/ladder.py` 1 + +## Reading cost, chunk bb58cf91ab1f, finished 2026-11-12T01:03:54Z + +162283 new input tokens before the first commit. + +Read most (opens and searches): + +- `todo.md` 12 +- `README.md` 7 +- `docs/decisions.md` 7 +- `bin/judge_replay/test_judge_replay.py` 4 +- `bin/loop_claude/routing.py` 4 +- `bin/judge_replay/replay.py` 3 +- `bin/loop_claude/test_loop_claude.py` 3 +- `bin/model_routing/ladder.py` 3 +- `bin/rung_replay/search.py` 3 +- `CHANGELOG.md` 2 diff --git a/todo.md b/todo.md index 5dcd1598..07fbc287 100644 --- a/todo.md +++ b/todo.md @@ -6,20 +6,20 @@ `Bar = 0.1` -`Next ID = 334` +`Next ID = 339` ## Items | ID | Release | Blocked by | Exempt | Item | L | E | I | R | S | Moves | Score | |---|---|---|---|---|---|---|---|---|---|---|---| | 331 | 0.9.0 | | question | **Reword four decisions to expire when the rungs their replays tested change, not whenever a model joins the ladder.** | 1 | 1 | 1 | 1 | 2 | 1.4 by 2 | 0.9 | -| 328 | 0.9.0 | | owner | **Script each step that 0.8.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.** | 1 | 2 | 1 | 2 | 2 | 1.4 by 3, 1.5 by 3 | 2.6 | | 333 | 0.9.0 | | decision | **For an Opus 5.5 project's chunks under E + I 5, run the judge on a rung that returns every quoted answer the reference judge reproduces.** | 2 | 2 | 3 | 5 | 3 | 1.1 by 3, 1.2 by 2 | 2.1 | | 320 | 0.9.0 | | | **Bench a worker below the project's rung with the advisor tool against the same worker alone and the project's rung, and file the switch if it wins.** | 2 | 2 | 2 | 4 | 3 | 1.4 by 3, 1.1 by 2 | 2.0 | | 315 | 0.9.0 | | | **Start each reviewer under `agents/` without `CLAUDE.md`, and hand it the vocabulary, the prose rules and the project's decision titles.** | 3 | 2 | 3 | 6 | 4 | 1.4 by 6 | 2.0 | | 312 | 0.9.0 | | | **Research the tooling agents read, search and run commands with, and file an item for each tool that cuts tokens a replay shows keep quality.** | 1 | 2 | 1 | 2 | 3 | 1.4 by 3, 1.5 by 2 | 2.0 | | 325 | 0.9.0 | | | **Give this repo's test suite one command that runs it as README โ†’ Test says, prints the failing tests and pytest's summary line, and saves the whole log to a file whose path it prints.** | 3 | 2 | 2 | 5 | 3 | 1.4 by 3, 1.5 by 2 | 2.0 | | 305 | 0.9.0 | | | **Record with each archived verdict the claude-config commit that ran it, the raw tokens each model spent by kind, and each choice of the worker's that the human reversed, so a change to the setup can be judged before and after.** | 3 | 2 | 3 | 6 | 5 | 1.4 by 4, 1.2 by 3 | 1.8 | +| 335 | 0.9.0 | | | **Print an item's row and detail with `todo-item show `.** | 1 | 1 | 2 | 2 | 2 | 1.4 by 3, 1.5 by 1 | 1.8 | | 318 | 0.9.0 | | | **Let `review-replay` qualify a rung whose recall is no lower than the project's rung's own replay, and replay Opus 5.5 at low effort on the prose pass.** | 3 | 2 | 3 | 6 | 4 | 1.4 by 5 | 1.7 | | 308 | 0.9.0 | | | **Skip a stability round 2 whose every must-fix finding named a surviving mutant or a failing test, both of which the worker now checks before review.** | 3 | 2 | 3 | 6 | 4 | 1.4 by 3, 1.5 by 2 | 1.6 | | 295 | 0.9.0 | | | **Have `chunk-pr merge` wait for the forge's required checks itself, and give workers one command that waits for a background log or report file.** | 2 | 2 | 3 | 5 | 3 | 1.4 by 2, 1.5 by 2 | 1.6 | @@ -31,13 +31,17 @@ | 310 | 0.9.0 | | | **Compact a waiting worker's session shortly before its prompt cache expires, only when the human has not answered an interrupt by then.** | 3 | 2 | 3 | 6 | 4 | 1.4 by 3 | 1.0 | | 298 | 0.9.0 | | | **Send the judge only the decision entries and the transcript tail a verdict needs, and keep the cut only where `judge-replay` changes no verdict kind.** | 3 | 3 | 3 | 7 | 4 | 1.4 by 2, 1.5 by 1 | 1.0 | | 326 | 0.9.0 | | | **Let `chunk-pr ready` take the pull request's final title and set it as it marks the pull request ready.** | 2 | 1 | 3 | 4 | 2 | 1.4 by 1, 1.5 by 1 | 0.9 | +| 337 | 0.9.0 | | | **Write each Bash call of a release's chunks to a file of JSON lines with `command-patterns --calls `.** | 1 | 1 | 1 | 1 | 2 | 1.4 by 1, 1.5 by 1 | 0.9 | | 332 | 0.9.0 | | defect | **Let `deploy-release` move a checkout whose `settings.json` differs from the release only by a `/model` pick or the key order Claude Code writes.** | 2 | 2 | 2 | 4 | 2 | 1.5 by 2 | 0.9 | +| 336 | 0.9.0 | | | **Bring a chunk's branch level with origin's default branch, and print the rank check, with one `chunk-pr sync`.** | 2 | 2 | 3 | 5 | 3 | 1.4 by 1, 1.5 by 1 | 0.8 | +| 334 | 0.9.0 | | | **Set up a scoring run with one `larv-review` command that makes the scoring worktree, writes each seat's prompt file, and removes both once `record-scoring` has run.** | 3 | 2 | 2 | 5 | 5 | 1.4 by 2, 1.5 by 1 | 0.7 | | 327 | 0.9.0 | | | **Have `larv-review` print a round commit's title prefix, counted from the round's report, and have rule-hook refuse a round title whose counts differ from it.** | 3 | 2 | 3 | 6 | 4 | 1.1 by 1, 1.4 by 1 | 0.7 | | 303 | 0.10.0 | | defect | **Archive each judge run's prompt and json reply beside the verdict it gave, so judge cost, replays and backups cover the judge as they cover the worker.** | 2 | 2 | 3 | 5 | 3 | 1.4 by 3, 3 by 2 | 4.8 | | 304 | 0.10.0 | 303 | defect | **Archive each review-replay and judge-replay run's transcript beside its result, so a replay that decided a rung can be checked and re-priced later.** | 2 | 2 | 2 | 4 | 3 | 1.4 by 2, 3 by 2 | 4.4 | | 306 | 0.10.0 | | | **Set a strategy that keeps loop-claude's archive and larv-review's review folders backed up and small over the years, compressing older entries without losing any.** | 3 | 2 | 4 | 7 | 5 | 3 by 5 | 3.9 | | 302 | 0.10.0 | | | **Call a scoring run for an item whose tagline makes the comprehension floor its target, and not for one that only names the floor, such as in a quoted decision title.** | 2 | 2 | 3 | 5 | 3 | code health by 2 | 3.6 | | 287 | 0.10.0 | | | **Move the forge helpers `Forge`, `forge_of`, `runner`, `open_pull`, `merged_pull`, `pull_at` and `gitea` into one module that `chunk_preflight`, `chunk_pr`, `deploy_release` and `larv_review` all import from, so no tool imports another tool's internals for them.** | 3 | 1 | 3 | 5 | 5 | code health by 3 | 3.4 | +| 338 | 0.10.0 | | owner | **Script each step that 0.9.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.** | 1 | 2 | 1 | 2 | 2 | 1.4 by 3, 1.5 by 3 | 2.6 | | 288 | 0.10.0 | | | **Point the two reading-cost decisions at code health and goal 1.4's counter-signal, in place of the goal 1.1 they cite.** | 1 | 2 | 1 | 2 | 1 | code health by 1, 1.4 by 1 | 2.6 | | 77 | 0.10.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 | 2.4 | | 321 | 0.10.0 | 318 | | **Evaluate the review passes that run on a rung item 318 qualified, against the chunks before them, and revert any pass whose findings or later fixes worsened.** | 1 | 2 | 1 | 2 | 2 | 1.1 by 3, 1.4 by 2 | 2.3 | @@ -86,12 +90,6 @@ The architect's ๐Ÿ”€ answer on PR #493 (item 292): four decisions expire "when a Recommendation: reword all four as above. They are decisions the repo held before item 292, so the rewording is lilleman's call. -### 328. Script each step that 0.8.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. - -lilleman asked, on 2026-10-16, for a standing audit each release, so the loop keeps moving work a program does as well from the model to scripts (goals 1.4 and 1.5). This audit reads the archived transcripts of the chunks that shipped release 0.8.0 for every step that chunks repeated by hand, before, during or after review. It keeps the steps whose answer a program computes the same way each time, such as a lookup, a check, a prompt assembled for a reviewer, a cleanup. File one item per such step, with the time and tokens it cost, into the next release with items left. Leave a step that needs judgement with the model. Run `command-patterns 0.8.0` first; its table names the patterns, and `read_threads` and `calls` in `bin/command_patterns/tally.py` open the calls of one pattern. The 0.7.0 audit found that most steps its chunks repeated were already scripted by that release's own tools, so a step a shipped item already covers is not filed. - -The chunk that ships this item files a copy of this audit in release 0.10.0, the release after this item's own, to audit release 0.9.0, rewording "0.8.0" to "0.9.0", and marks the copy `owner`, so the audit recurs each release until lilleman drops it. - ### 333. For an Opus 5.5 project's chunks under E + I 5, run the judge on a rung that returns every quoted answer the reference judge reproduces. The judge returns one verdict kind per cycle: finished, unfinished, interrupt, or quoted answer, which answers the worker's question from `README.md` or the records so the worker resumes without lilleman. `routing: on a model judge-replay covered` puts the judge of an Opus 5.5 project on Opus 5.5 at medium, the project's rung, below E + I 5, and at xhigh from 5. It rests on the 2026-10-15 replay, where Opus 5.5 at medium missed none of the 31 verdicts the reference judge, Opus 5.5 at xhigh, reproduced. @@ -136,6 +134,14 @@ Three records the archive lacks, asked for by lilleman on 2026-11-11 after the t Build on item 303's archive layout for the judge's part. +### 335. Print an item's row and detail with `todo-item show `. + +Found by item 328's audit of release 0.8.0. All 9 of its chunks looked items up in `todo.md` by hand: `grep -n '^### N'`, `awk '/^### N\./,/^### [0-9]+\./'` ranges, `sed -n` offsets computed from a grep, and several retries to find the `## Details` line first. About 29 calls did only that, costing 1.3k command tokens and 15.9k result tokens; a looser grep over the audit's calls finds 40 such calls in all 9 chunks, many of them compound with other reads. Most of the result tokens went on reading far more than the one item, such as `sed -n 1,140p todo.md`. + +`todo-item show ` prints the item's table row, under the table's header line, and its detail, from `### .` to the next heading, and fails, saying so, where the ID has no row. It reads only `todo.md`, so it fits beside `add` and `finish` in `bin/todo_item/main.py`. `CLAUDE.md` โ†’ "Working loop" tells a worker to read the details of the items its chunk takes; that line names the command once it ships. + +Left with the model: reading the item and judging what it asks. + ### 318. Let `review-replay` qualify a rung whose recall is no lower than the project's rung's own replay, and replay Opus 5.5 at low effort on the prose pass. Today a rung qualifies only if it re-finds every finding the project's rung found. The project's rung itself re-finds only 69 to 73% of its own findings on a replay (29 of 40, 27 of 39, 20 of 29), so even a reviewer exactly as good would fail, and "no pass has such a rung" says less than it seems. Qualify a rung when its share of the archived findings is no lower than the project's rung's own replay share, within a margin, over enough rounds, and it misses no ๐Ÿ”ด that both project-rung runs found. Then replay Opus 5.5 at low effort on the prose pass first, the pass whose misses cost least; the `effort` frontmatter key sets it per reviewer. @@ -200,12 +206,38 @@ Let `chunk-pr ready` take an optional final title and set it as it marks the pul Left with the model: wording the title. +### 337. Write each Bash call of a release's chunks to a file of JSON lines with `command-patterns --calls `. + +Found by item 328's audit of release 0.8.0. `command-patterns ` prints only a table of patterns, so an audit that must read the calls behind a pattern writes its own script. This audit wrote a 20-line Python script over `read_threads` and `calls` to dump 0.8.0's 2,317 calls, one per line, with the chunk, the pattern, the seconds, the command's and the result's sizes, and the command's text. Item 284's chunk, the 0.7.0 audit, wrote `/tmp/audit284/calls.jsonl` the same way. Each audit pays for writing and checking that script again, and item 328 recurs every release. + +`--calls ` writes one JSON object per Bash call to ``, besides printing the table: the chunk's number in the window, the pattern `pattern` in `bin/command_patterns/tally.py` gives it, its seconds, its command's and its result's characters, and the command's text. It needs `Call` to carry its pattern and its chunk, or `main.py` to pair them as it tallies. `command-patterns --help` and item 328's recurring detail name the flag. + +Left with the model: reading the calls and judging which steps a program computes the same way each time. + ### 332. Let `deploy-release` move a checkout whose `settings.json` differs from the release only by a `/model` pick or the key order Claude Code writes. On 2026-11-12, moving `~/.claude` from v0.7.0 to v0.8.0, `deploy-release` failed at `git checkout --quiet --detach v0.8.0`: "Your local changes to the following files would be overwritten by checkout: settings.json". Claude Code had rewritten the file with `"model": "opus"` and its keys in another order. The `settings` clean filter drops the model and sorts the keys, so `git diff` showed no change and the tool's own check passed, but checkout compares the file as it is on disk. `deploy-release --help` says a model picked with `/model` doesn't block the move. The move worked after `git checkout -- settings.json`, with the model added back by hand. Have the tool set aside a change the clean filter removes, move, and restore the model pick, or tell the user to pick it again, as it already does when the move changes `settings.json`. Test it with a working file that differs from HEAD only by the model and the key order. +### 336. Bring a chunk's branch level with origin's default branch, and print the rank check, with one `chunk-pr sync`. + +Found by item 328's audit of release 0.8.0. 8 of its 9 chunks synced with the default branch by hand before the merge, in 13 calls (about 2.4k tokens, 6 s): `git fetch -q origin && git merge-base --is-ancestor origin/main HEAD && echo holds-main`, then, where that failed, `git merge -q origin/main`, then `rank_todo.py --check todo.md`. + +`chunk-pr sync` fetches origin, merges its default branch into the chunk's branch where the branch does not already hold it, and prints one line saying which it did. Then it runs `rank_todo.py --check` where the worktree has a `todo.md`, and prints its result. On a merge conflict it stops with the merge in progress and names the conflicted files. chunk-pr already finds origin's default branch for `open`, so `sync` reuses that; where the change touches `bin/chunk_pr/main.py:42` `forge`, which the comprehension seats found hard because its helpers live in other packages, make it easier to read. `chunk-pr --help` and `larv-review` ยง4 step 1, which merges origin's default branch in before the gate, name the command. + +Left with the model: resolving a conflict, such as one in `todo.md`, and fixing what the rank check reports. + +### 334. Set up a scoring run with one `larv-review` command that makes the scoring worktree, writes each seat's prompt file, and removes both once `record-scoring` has run. + +Found by item 328's audit of release 0.8.0. Of its 9 chunks, only item 296's ran a scoring run, since scoring runs are rare, and it set the run up by hand in about 20 Bash calls: 7 reads of `skills/comprehension-panel/SKILL.md`, `seat-prompts.md` and the scoring-run values (ls, wc, sed; about 12k result tokens); `git worktree add --detach ../claude-config-scoring origin/main`, then `git checkout -b scoring-item-301`; one `mkdir /tmp/seat296` and three heredocs writing shared.txt, report-plain.txt and report-arch.txt (6.6k chars); two heredocs writing scores.md (4.5k and 3.6k chars); `larv-review record-scoring`; and `rm -rf /tmp/seat296`. About 16k tokens in all. + +The prompt text is fixed: `seat-prompts.md` says to copy the opening, each seat's background, the shared brief and the report for its kind of seat verbatim, and lists each `{placeholder}`. A program fills most of them: `{checkout}`, `{branch}`, `{main}` and `{git}` from the worktree it makes, `{forbidden}` from fixed text, `{files}` from `git ls-files`, `{anchors}` and `{dimensions}` from `SKILL.md` โ†’ "The score", and `{language}`, `{kind}`, `{domain}`, `{domain docs}` and `{3am question}` from the project's scoring-run values (claude-config's in `seat-prompts.md` โ†’ "claude-config's values"). Where one needs judgement, such as `{preloaded}`, the command takes it as an argument. It refuses, writing nothing, where the project has no scoring-run values. Where the prompt files land, a folder under the chunk's review folder or the state folder, is the implementer's call. + +The command makes the detached scoring worktree on origin's default branch, writes one prompt file per seat of the four `SKILL.md` โ†’ "The scoring run" names, and prints their paths. A second form, or `record-scoring` itself, removes the worktree and the prompt folder after recording. + +Left with the model: launching the seats, reading their reports and writing the scores. Item 316 (the seats' own agent type) and item 309 (two seats in the second pass) change who reads these prompts and how many, not how they are built, so this item does not overlap them. + ### 327. Have `larv-review` print a round commit's title prefix, counted from the round's report, and have rule-hook refuse a round title whose counts differ from it. The 0.8.0 audit (item 284) measured, over the 35 chunks that shipped 0.7.0: 72 commit calls in 33 chunks titled `Answer round : R ๐Ÿ”ด, Y ๐ŸŸก (K misread); `, about 11k command tokens, most of them the summary. Each worker counts R, Y and K by hand. All three are in the round's report, `-round-.md` in the review folder: R and Y are its finding headings, and K counts the findings the reviewer marked `[misread]`, as `bin/review_rules/round_titles.py` says. That module parses the counts for `score-outcomes`, which reports them as goal 1.1's signal, and rule-hook's `round_cap.py` checks only the round number, so nothing checks today that the counts match the report. Of the 8 titles whose report the audit could match, none miscounted; one report wrote its markers at line start rather than in `###` headings, so the reports' format varies by reviewer. @@ -252,6 +284,14 @@ Both comprehension seats of PR #453's paired ruling (2026-11-09) named this web Put the seven helpers in a folder named by what it holds, such as `bin/forge/`, and import them from there. Keep each helper's behaviour and its tests. `chunk_preflight/choices.py` keeps `pulls_command`, which is preflight's own. Check `docs/decisions.md` for a mention of where a helper lives, and update it. +### 338. Script each step that 0.9.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. + +lilleman asked, on 2026-10-16, for a standing audit each release, so the loop keeps moving work a program does as well from the model to scripts (goals 1.4 and 1.5). This audit reads the archived transcripts of the chunks that shipped release 0.9.0 for every step that chunks repeated by hand, before, during or after review. It keeps the steps whose answer a program computes the same way each time, such as a lookup, a check, a prompt assembled for a reviewer, a cleanup. File one item per such step, with the time and tokens it cost, into the next release with items left. Leave a step that needs judgement with the model. Run `command-patterns 0.9.0` first; its table names the patterns, and `read_threads` and `calls` in `bin/command_patterns/tally.py` open the calls of one pattern, or `--calls ` dumps them once item 337 ships. The 0.7.0 audit found that most steps its chunks repeated were already scripted by that release's own tools, so a step a shipped item already covers is not filed. + +The 0.8.0 audit filed four steps, items 334, 335, 336 and 337, and found most other repeated steps already covered by items 295, 312, 325, 326 and 327. + +The chunk that ships this item files a copy of this audit in release 0.11.0, the release after this item's own, to audit release 0.10.0, rewording "0.9.0" to "0.10.0", and marks the copy `owner`, so the audit recurs each release until lilleman drops it. + ### 288. Point the two reading-cost decisions at code health and goal 1.4's counter-signal, in place of the goal 1.1 they cite. Both `docs/decisions.md` entries under `reading cost: a rise is โ€ฆ` and `reading cost: larv-review measures each finished chunk โ€ฆ` open "Serves goal 1.1: comprehension โ€ฆ". No goal says that any more: code health (`CLAUDE.md` โ†’ "Shared goal") holds comprehension, and since PR #455 a rising reading cost is goal 1.4's first counter-signal. Raised by the stability review of PR #455 as a ๐ŸŸข outside that change. -- 2.52.0