Record the read pricing, precision and tool trials in item 231's decision, and file questions 240 and 241

This commit is contained in:
2026-10-27 02:11:05 +01:00
parent 34a623e261
commit d96e5c35ef
2 changed files with 19 additions and 1 deletions
+8
View File
@@ -93,6 +93,14 @@ Quality. 19 chunks compacted between 2026-10-10 and 2026-10-22, at the compactio
Hours. A chunk ran a median 0.7 hours from its first message to its last, one in ten past 12 hours, mostly waiting for the human or a usage limit. No option here changes that: a compaction takes 51 to 83 seconds, under a minute per chunk at 0.7 each, and a smaller context saves seconds per turn at most. The hours lever is item 232, since waiting on subagents took 66% of a worker's active time.
Reads and tools, measured the same day at lilleman's ask, on the same 90 chunks:
- What reads cost. The messages that took in tool results carried $537 of the $1,215, 44%: the worker's $190 (Bash reads $115, Read $12), the principles auditors' $139 (Read $109, Grep $22), the stability reviewers' $106 (Bash reads $79), general-purpose subagents' $97, the prose reviewers' $34, the architects' $31 and the product-owner reviewers' $23. These figures charge a message's new input tokens to the results it took in, so they include what arrives beside a result, such as the agent's own previous reply; the 93M characters read alone are about 27M tokens.
- Precision. Of the characters a principles auditor read, 13% were in a file its report names; a stability reviewer 8%; the worker 4% in a file it later edited; a prose reviewer 18%; an architect 11%. Reading is mostly to find things and to learn what a project holds, as lilleman read it. The worker's `sed` ranges are small, median 25 lines, one in ten over 80. Of the worker's read characters, 49% were of a file it had read earlier in the thread: 36% within three messages, paging through it, and 13% later and unchanged, about $6 of the $45 its reads cost; reviewers 1 to 2% (item 239).
- Tool results. Claude Code caps a Bash result at about 30k characters. Subagents' Read results, 59.9M characters, have 58% of their characters in results over 12k.
- Trials on this repo. Four stability rounds and five principles rounds archived on 2026-10-23, each holding 🔴 or 🟡 findings, replayed on the project's rung as `review-replay` replays them, with the reviewer's definition changed through `--agents`; and three worker-like tasks, a search, a rename and an explanation, run on fresh clones at the project's rung. The baseline reviewers found 4 of their own 6 archived findings in each pass, the spread a sample this small sits in. The LSP tool, through a pyright plugin built from the marketplace manifest with `pyright-langserver` on PATH, answers a file's symbols, a definition or the references in a few hundred characters; the stability reviewers and the workers never called it under a rule telling them to, and the auditors who did read as much or more and missed the one 🔴 (0 of 1 against the baseline's 1 of 1). An `outline` script printing a file's symbols with line ranges: never called by workers; stability reviewers under its rule found 2 of 6 findings. A PostToolUse hook capping a Bash result at 12k characters: 3 of 6, two lost in one round. A scout, Haiku 5.5 reading raw content and returning facts and line ranges: as an in-session agent its first request writes 37k tokens, $0.005, and a read of a 38KB file costs $0.008 in 8 seconds; as a slim headless `claude -p` with its own system prompt, no setting sources and no dynamic sections, 6k tokens, $0.0003 and 3 to 5 seconds of startup, its prefix cached across calls, and the same read $0.004 in 7 seconds. Stability reviewers with the agent scout found 5 of 6 findings and read 29% fewer characters at 6% less cost and 14% more time; with the CLI scout 4 of 6, 38% fewer characters, 17% less cost and 39% more time; the auditors with the agent scout 3 of 6 at the same cost and twice the time. Workers offered the scout never called it, but its reading rule alone, never read more than 80 lines of a file yourself, cut their reading 45% to 60% at the same or lower cost, with all three tasks done as well.
- What follows. On this sample no tool cuts a reviewer's reading without losing a finding, except the scout, whose saving sits within the baseline's own spread; so none of them ships here. lilleman decides two trials: a reading rule for workers (item 240) and a scout for reviewers (item 241). A direct API call and `claude --bare` are out, since both need an API key where lilleman's login is a subscription.
Valid while cache reads cost a twentieth of input and Claude Code's compaction keeps the worker's task.
## machine load: a heavy command waits for one of the machine's heavy slots, one for every 4 CPUs, which every session shares, and loop-claude starts a worker only while at least a quarter of the machine's memory is available
+11 -1
View File
@@ -6,7 +6,7 @@
`Bar = 0.1`
`Next ID = 240`
`Next ID = 242`
## Items
@@ -18,7 +18,9 @@
| 234 | 0.4.0 | | | **Report the routing figures in dollars, cache reads included, from the cost each archived run records.** | 2 | 2 | 2 | 4 | 3 | 1.4 by 3 | 3.0 |
| 239 | 0.4.0 | | owner | **Block a Read, `cat`, `sed` or `head` of a file range the session already read while the file is unchanged, with a note that the content is in context, and let it through after a compaction or a change to the file.** | 3 | 2 | 3 | 6 | 4 | 1.4 by 3 | 2.0 |
| 236 | 0.5.0 | | question | **Answer whether the principles audit keeps reading the whole project, or reads only the files the chunk changed and their callers, now that half of its 🔴 and 🟡 findings name a file the chunk did not edit.** | 1 | 1 | 1 | 1 | 1 | 1.4 by 4 | 6.4 |
| 240 | 0.5.0 | | question | **Answer whether workers get a reading rule in `CLAUDE.md`, never reading more than 80 lines of a file at once, which cut three worker tasks' reading 45% to 60% at the same quality.** | 1 | 2 | 3 | 4 | 1 | 1.4 by 3 | 4.8 |
| 226 | 0.5.0 | | question | **Answer whether rule-hook's `run-heavy` rule should also catch a mutation run or docker build behind `uv run`, `poetry run`, `python3 -m`, `sudo`, `docker image build` and `docker compose up --build`, or narrow the `machine load:` decision's wording.** | 2 | 2 | 3 | 5 | 3 | 1.2 by 2, 1.5 by 2 | 4.0 |
| 241 | 0.5.0 | | question | **Answer whether reviewers hand a read over 80 lines to a Haiku scout, which cut a stability reviewer's reading 29% to 38% and its cost 6% to 17% on four replayed rounds, at 14% to 39% more time and findings within the baseline's own spread.** | 2 | 2 | 3 | 5 | 3 | 1.4 by 3 | 3.0 |
| 235 | 0.5.0 | | | **Compare the first 20 chunks whose worker ran under the 200k compaction window with the 20 before them, on review rounds past each pass's first, unfinished verdicts, 🔴, 🟡 and misread findings, dollars and hours per chunk, and file an item where any rose.** | 1 | 2 | 1 | 2 | 2 | 1.1 by 2, 1.4 by 3 | 6.8 |
| 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 |
| 167 | 0.5.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 |
@@ -104,10 +106,18 @@ lilleman's call, 2026-10-27, filed from PR #376's measurement of loop-claude's a
Since 2026-10-21, 342 principles-auditor runs cost $274 at list prices, 23% of all spend, and 176 of their 🔴 and 🟡 findings named a file: 83 a file the chunk edited, 90 another. `docs/decisions.md` → `review: the principles audit runs on every chunk…` holds the whole-project audit valid while its findings are drift a chunk would otherwise merge, and calls a repeat a question on the audit's scope for the human. Reading only the changed files and their callers would cut most of the auditors' $129 of cache writes and drop the findings elsewhere, unless the same findings come back chunk after chunk: read a sample of the 90 before answering. Item 233 merges the auditors either way.
### 240. Answer whether workers get a reading rule in `CLAUDE.md`, never reading more than 80 lines of a file at once, which cut three worker tasks' reading 45% to 60% at the same quality.
lilleman's question, from PR #376's trials (`docs/decisions.md` → `loop-claude: the worker's claude compacts its context before it fills a 200k window…`, "Reads and tools"). Three worker-like tasks on this repo, a search, a rename and an explanation, run under the rule "never read more than 80 lines of a file yourself, and never take a tool output you expect to exceed 3,000 characters into your context" read 45% to 60% fewer characters at the same or lower cost and answered as well; the rename under it was the only one that also kept the import names sorted. Only 4% of what a worker reads is in a file it later edits. The rule is one line in `CLAUDE.md` that every session loads, so its effect on real chunks, misread findings above all, is unmeasured: a yes trials it and item 235's figures over the next 20 chunks measure it.
### 226. Answer whether rule-hook's `run-heavy` rule should also catch a mutation run or docker build behind `uv run`, `poetry run`, `python3 -m`, `sudo`, `docker image build` and `docker compose up --build`, or narrow the `machine load:` decision's wording.
Found by review of PR #370. Today `uv run mutmut run`, `poetry run mutmut run`, `python3 -m mutmut run`, `sudo docker build .`, `docker image build .` and `docker compose up --build` pass the rule, which `docs/decisions.md` → `machine load: …` and `RULES["run-heavy"]` describe as blocking docker builds and mutation runs. The rule's own text says a gate script isn't checked since no program can tell it from a light one, so the human decides where the line sits. Say what the rule's "checked" text promises either way. Where the answer widens the rule, the change touches `heavy` in `bin/rule_hook/heavy_command.py`, which the comprehension seats found hard: make it easier to read.
### 241. Answer whether reviewers hand a read over 80 lines to a Haiku scout, which cut a stability reviewer's reading 29% to 38% and its cost 6% to 17% on four replayed rounds, at 14% to 39% more time and findings within the baseline's own spread.
lilleman's question, from PR #376's trials (`docs/decisions.md` → `loop-claude: the worker's claude compacts its context before it fills a 200k window…`, "Reads and tools"). A scout is Haiku 5.5 reading raw content, whole files or long output, and returning facts as path:line and the ranges worth reading. In session, as an agent under `agents/`, its first request writes 37k tokens, $0.005, and a read of a 38KB file costs $0.008 in 8 seconds; as a slim headless `claude -p --model claude-haiku-5-5 --system-prompt … --tools "" --setting-sources "" --no-session-persistence`, which keeps the subscription login, 6k tokens, $0.0003, 3 to 5 seconds of startup with its prefix cached across calls, and the same read $0.004 in 7 seconds. On four replayed stability rounds the agent scout found 5 of 6 archived findings against the baseline's 4 and read 29% fewer characters at 6% less cost and 14% more time; the CLI scout 4 of 6, 38% fewer, 17% less, 39% more; the auditors with the agent scout 3 of 6 at the same cost and twice the time. The reviewers' spend is $840 of $1,215, so a 10% cut is about $85 per 90 chunks. `AGENTS.md` makes a change to the delegation rule lilleman's call. A yes names the shape, agent or CLI, and which reviewers; item 235's figures then measure it.
### 235. Compare the first 20 chunks whose worker ran under the 200k compaction window with the 20 before them, on review rounds past each pass's first, unfinished verdicts, 🔴, 🟡 and misread findings, dollars and hours per chunk, and file an item where any rose.
`docs/decisions.md` → `loop-claude: the worker's claude compacts its context before it fills a 200k window…` expects a saving of about 6% of all spend with no rise in the other figures. Measure from loop-claude's archive as that decision did: rounds past each pass's first and the 🔴, 🟡 and misread counts from the round commit titles, unfinished verdicts from the outcomes files, hours from the worker's first message to its last, and dollars at list prices, cache reads included, from the chunk's `cost-state` entry, which counts the compaction calls that no message's usage records; item 234 puts such dollars into the routing figures. A chunk ran under the window when its first worker started after that decision merged.