diff --git a/CHANGELOG.md b/CHANGELOG.md index 423fe7f1..08112e13 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,8 +5,8 @@ - The routing figures now count what `loop-claude`'s judge costs. `loop-claude` archives each judge run's cost, from claude's reply, in a `Judge cost:` line beside the verdict or rejection, and `routing-figures.md` adds it to its dollars by project, rung and tool, and under the subagent type `judge`. Before, the judge's cost was left out. Chunks archived before this change, and a judge run that failed, add none. - In a repo with no tag, `chunk-preflight` now counts the newest version under a dated `CHANGELOG.md` heading, such as `## 0.0.1 - 2026-10-03`, as the last cut. A later release in `todo.md` reads as next, the unreleased commits are those after the commit that added that heading, and a `Release review of` commit counts only for a release after it. A heading without a date doesn't count, and a tag always wins. Before, such a repo was sent to review a release it had already cut. - `rule-hook` no longer hangs, or reads without end, on an Edit, MultiEdit or Write whose `file_path` is a FIFO or a device: it reads only a regular file. -- A `loop-inbox` ask file now stores when the loop asked as an ISO UTC datetime, such as `2026-11-04T09:30:00Z`, in place of seconds since the epoch. A `loop-claude` running when you deploy reloads itself at its next cycle; `loop-inbox` doesn't list a question it asks before then, so answer that one on the loop's terminal. -- Each chunk's first worker prompt now holds a reading rule: never read more than 80 lines of a file at once, nor take a tool output over 3,000 characters into your context. Once 20 chunks have run under it, a plan item measures them against the 20 before and drops the rule where any figure rose. +- A `loop-inbox` ask file now stores when the loop asked as an ISO UTC datetime, such as `2026-11-04T09:30:00Z`, in place of seconds since the epoch. Restart any `loop-inbox` running when you deploy: one started before doesn't list the new asks. A `loop-claude` running then reloads itself at its next cycle, and `loop-inbox` doesn't list a question it asks before that; answer such a question on the loop's terminal. +- Each chunk's first worker prompt now holds a reading rule: never read more than 80 lines of a file at once, nor take a tool output over 3,000 characters into your context. Where the 20 chunks after it take more review rounds, unfinished verdicts, findings, misread findings, dollars or hours than the 20 before, a later release drops it. ## 0.5.0 diff --git a/bin/chunk_pick.py b/bin/chunk_pick.py index b50712a2..0e12b872 100644 --- a/bin/chunk_pick.py +++ b/bin/chunk_pick.py @@ -108,7 +108,10 @@ def heading_commit(release: tuple[int, int, int], ref: str, cwd: str) -> str | N def release_reviewed(tag: str | None, ref: str, cwd: str, after: tuple[int, int, int] | None = None) -> bool | Failure: - """Whether ref holds, after tag or in all where tag is None, a commit titled as a release review opens: `Release review of `. Where after is given, the version a branch with no tag counts as cut, a title counts only where its release is later.""" + """Whether ref holds a commit titled as a release review opens, `Release review of `: after tag, or anywhere where tag is None. + + after is the version a branch with no tag counts as cut, or None. Where it is given, a title counts only where its release is later than after. + """ titles = git("log", "--format=%s", f"{tag}..{ref}" if tag else ref, cwd=cwd) if isinstance(titles, Failure): return titles @@ -142,7 +145,7 @@ def next_release(found: list[Item], cut: LastCut) -> Upcoming | Cut | Unknown: """The next release after cut, and whether work has landed towards it. found holds the plan's items. Cut where the plan files items under the last cut's version or earlier, and Unknown where todo.md's texts since the cut cannot be read. - Where the branch has no tag, the cut is cut_version's, so a release todo.md named whose items are all done still reads as the next release. + Where the branch has no tag, todos_since holds every version of todo.md, so a release todo.md named whose items are all done still reads as the next release. """ earliest = min((item.release for item in found), default=None) version = cut_version(cut) @@ -161,7 +164,7 @@ def next_release(found: list[Item], cut: LastCut) -> Upcoming | Cut | Unknown: def cut_version(cut: LastCut) -> tuple[int, int, int] | None: - """The version cut counts as cut: its tag's; on a branch with no tag, the newest under a dated CHANGELOG.md heading, else BEFORE_FIRST_RELEASE. None where the tag names no version.""" + """Which version is cut. It is the tag's, or None where the tag names no version. On a branch with no tag, it is the newest version under a dated CHANGELOG.md heading, else BEFORE_FIRST_RELEASE.""" if cut.tag is None: return max(dated_headings(cut.changelog), default=BEFORE_FIRST_RELEASE) return version_of(cut.tag) @@ -172,7 +175,7 @@ def cut_name(cut: LastCut) -> str | None: if cut.tag is not None: return None if isinstance(cut.tag, Failure) else cut.tag headed = max(dated_headings(cut.changelog), default=None) - return None if headed is None else f"{version(headed)}, under CHANGELOG.md's dated heading" + return None if headed is None else f"{version(headed)} (dated in CHANGELOG.md)" def dated_headings(changelog: str | Failure) -> list[tuple[int, int, int]]: diff --git a/bin/chunk_preflight/facts.py b/bin/chunk_preflight/facts.py index bfddd55c..d3d80e38 100644 --- a/bin/chunk_preflight/facts.py +++ b/bin/chunk_preflight/facts.py @@ -20,7 +20,7 @@ def last_release(default: str, release: LastCut) -> str: if isinstance(release.tag, Failure): return f"Last version cut: cannot be read: {release.tag.reason}" named = cut_name(release) - cut = f"Last version cut: {named or 'none'}{', with no tag' if named and release.tag is None else ''}." + cut = f"Last version cut: {named or 'none'}." entries = unreleased_entries(release.changelog) if isinstance(release.changelog, str) else None if entries is not None: return f"{cut} Unreleased: {counted(entries, 'entry', 'entries')} under CHANGELOG.md β†’ ## Unreleased." diff --git a/bin/chunk_preflight/main.py b/bin/chunk_preflight/main.py index ca6c87ec..0fb3dc95 100644 --- a/bin/chunk_preflight/main.py +++ b/bin/chunk_preflight/main.py @@ -9,11 +9,10 @@ with --worktree at the checkout root before each chunk's first worker, before it and quotes what it prints in the worker's prompt. It leaves the checkout as it is, and reads todo.md as the default branch holds it, the plan loop-claude routes on. It prints: -- the last version cut, and how many entries the default branch's CHANGELOG.md holds under - ## Unreleased, or else how many commits followed the cut. The last cut is the newest v* tag on - the default branch. On a branch with no tag, it is the newest version CHANGELOG.md heads - `## X.Y.Z - YYYY-MM-DD`, and the commits counted follow the commit that added that heading; an - undated heading doesn't count; +- the last version cut: the newest v* tag on the default branch, or on a branch with no tag the + newest version CHANGELOG.md heads `## X.Y.Z - YYYY-MM-DD`; an undated heading doesn't count. + Then how many entries the default branch's CHANGELOG.md holds under ## Unreleased, or else how + many commits followed the cut: the tag, or the commit that added that heading; - the next release and its first item that does not wait, the item loop-claude routes on, with its L and E + I. An item waits while it is marked question, or while an item still in todo.md blocks it. Where the last cut is a version x.y.z, the next release is the earliest after x.y.z diff --git a/bin/chunk_preflight/test_chunk_preflight.py b/bin/chunk_preflight/test_chunk_preflight.py index 346c0502..925d65b6 100644 --- a/bin/chunk_preflight/test_chunk_preflight.py +++ b/bin/chunk_preflight/test_chunk_preflight.py @@ -368,7 +368,7 @@ class Render(unittest.TestCase): self.assertIn("cut: none", untagged) self.assertIn("1 commit on origin/main", untagged) headed = rendered(NoItem("x."), LastCut(None, "## 0.0.1 - 2026-10-03\n", 1, [])) - self.assertIn("cut: 0.0.1, under CHANGELOG.md's dated heading, with no tag.", headed) + self.assertIn("cut: 0.0.1 (dated in CHANGELOG.md).", headed) self.assertIn("1 commit since CHANGELOG.md dated 0.0.1", headed) def test_states_why_the_changelog_and_the_commits_since_the_last_cut_cannot_be_read(self): @@ -452,7 +452,7 @@ class Plans(unittest.TestCase): def test_names_a_release_cut_under_a_dated_heading_as_the_last_cut_on_a_branch_with_no_tag(self): said = planned(EMPTY, LastCut(None, "## 0.0.1 - 2026-10-03\n", 0, []), "origin/main").why - self.assertIn("the next release after the last cut, 0.0.1, under CHANGELOG.md's dated heading", said) + self.assertIn("the next release after the last cut, 0.0.1 (dated in CHANGELOG.md)", said) def test_finds_the_release_after_the_last_cut_finished_or_to_be_planned_where_the_plan_holds_no_item_for_it(self): named = "release 0.2.0, the next after the last cut, v0.1.0" diff --git a/bin/loop_claude/cycle/prompts.py b/bin/loop_claude/cycle/prompts.py index 990037ac..7687ac67 100644 --- a/bin/loop_claude/cycle/prompts.py +++ b/bin/loop_claude/cycle/prompts.py @@ -19,7 +19,7 @@ EACH_SEAT = "each comprehension seat" THE_SECURITY_PASS = "the security pass's subagent" -# The worker's reading rule, from PR #376's trials, where it alone cut a worker's reading; it is the worker's, not CLAUDE.md's, since reviewers under a like rule missed findings: docs/decisions.md β†’ "loop-claude: the worker's claude compacts its context …". +# Workers only, not CLAUDE.md, which reviewers load too: a reviewer under a like rule missed findings. READING_RULE = "Read in small pieces: never read more than 80 lines of a file at once, nor take a tool output over 3,000 characters into your context." diff --git a/bin/loop_claude/waiting/ask.py b/bin/loop_claude/waiting/ask.py index 22fe7197..a4ea0ec4 100644 --- a/bin/loop_claude/waiting/ask.py +++ b/bin/loop_claude/waiting/ask.py @@ -52,7 +52,7 @@ class Ask: def read_ask(path: pathlib.Path) -> Ask | None: - """The ask in path; None where a field has the wrong type, asked is no stamp utc_stamp.utc writes, or the ask names another session than path does.""" + """The ask in path. None where a field has the wrong type, where utc_stamp.seconds cannot read asked, or where the ask names another session than path does.""" try: data = json.loads(path.read_text(encoding="utf-8")) ask = Ask(**{**data, "state": ask_state(data["state"])}) diff --git a/bin/utc_stamp.py b/bin/utc_stamp.py index 3ee83db9..c981626a 100644 --- a/bin/utc_stamp.py +++ b/bin/utc_stamp.py @@ -10,5 +10,5 @@ def utc(at: float) -> str: def seconds(stamp: str) -> int: - """The seconds since the epoch that stamp, as utc writes it, names; ValueError where it is no such stamp.""" + """The seconds since the epoch that stamp names, read in utc's format. Raises ValueError where time.strptime cannot read it so.""" return calendar.timegm(time.strptime(stamp, STAMP)) diff --git a/docs/decisions.md b/docs/decisions.md index d24db79f..559efc34 100644 --- a/docs/decisions.md +++ b/docs/decisions.md @@ -84,7 +84,7 @@ loop-claude hands each worker's claude `CLAUDE_CODE_AUTO_COMPACT_WINDOW=200000` Why 200k. Item 231 asked for the best means to lower what a chunk spends on context, in dollars, then hours, with no loss of quality. Measured from loop-claude's archive, the 90 chunks with messages after the routing figures' reset of 2026-10-21 cost $1,215 at the list prices read on 2026-10-26 (Opus 5.5: $4 per million input tokens, $5 and $8 for 5-minute and 1-hour cache writes, $0.20 for cache reads, $20 for output; no model but Haiku 5.5 charges more above 200k). That is 0.86 of what the chunks' `cost-state` entries sum to, since some chunks' subagent transcripts are not in the archive. Worker main threads cost $375 (31%): 1-hour cache writes $149, cache reads $153, output $74. Subagents cost $840: 5-minute cache writes $379, output $274, cache reads $187, with the principles auditors at $274 over 342 runs, the stability reviewers $179 and general-purpose subagents $192. A worker starts at 41k tokens of context and peaks at a median 167k, one in ten past 358k, the largest at 848k. The worker's messages above 200k were 32% of its messages and 55% of its cost. -What reads cost, and whether a tool cuts them, measured at lilleman's ask after those figures: no tool cut a reviewer's reading without losing a finding, except a scout, which kept the stability reviewers' findings but lost the auditors' πŸ”΄ and slowed every round; so none of them ships here. lilleman chose on 2026-10-27: workers trial a reading rule, which every fresh worker prompt now holds (`READING_RULE` in `bin/loop_claude/cycle/prompts.py`) and `todo.md` item 260 keeps or drops, reviewers get no scout, and the principles audit keeps reading the project whole. Two measures of reading: the characters a thread read, 93M in all, about 27M tokens; and the new input tokens of the messages that took results in, charged to those results, which also count what arrives beside a result, such as the agent's own previous reply. By the second measure tool results caused $620 of the $1,215, and reads (Read, Bash reads, Grep, Glob and git's diff, show and log) $537 of that: the worker's reads $140 (Bash reads $115, Read $12) of its $190 of results, the principles auditors' $133 (Read $109, Grep $22) of $139, the stability reviewers' $97 (Bash reads $79) of $106, general-purpose subagents' $84 of $97, the prose reviewers' $32, the architects' $30 and the product-owner reviewers' $21. By the first measure the worker's reads are about $45. Precision is low everywhere: of the characters a principles auditor read, 13% were in a file its report names; a stability reviewer 8%; a prose reviewer 18%; an architect 11%; the worker 4% in a file it later edited. Reading is mostly to find things and to learn what a project holds. 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, with the file unchanged, about $6 of the $45; a reviewer's later reads of an unchanged file it had read are 1 to 2%. rule-hook's `repeat-read` now blocks a read of lines already in context. +What reads cost, and whether a tool cuts them, measured at lilleman's ask after those figures: no tool cut a reviewer's reading without losing a finding, except a scout, which kept the stability reviewers' findings but lost the auditors' πŸ”΄ and slowed every round; so none of them ships here. lilleman chose on 2026-10-27: workers trial a reading rule, reviewers get no scout, and the principles audit keeps reading the project whole. Every fresh worker prompt now holds that rule (`READING_RULE` in `bin/loop_claude/cycle/prompts.py`), and `todo.md` item 260 keeps or drops it. Two measures of reading: the characters a thread read, 93M in all, about 27M tokens; and the new input tokens of the messages that took results in, charged to those results, which also count what arrives beside a result, such as the agent's own previous reply. By the second measure tool results caused $620 of the $1,215, and reads (Read, Bash reads, Grep, Glob and git's diff, show and log) $537 of that: the worker's reads $140 (Bash reads $115, Read $12) of its $190 of results, the principles auditors' $133 (Read $109, Grep $22) of $139, the stability reviewers' $97 (Bash reads $79) of $106, general-purpose subagents' $84 of $97, the prose reviewers' $32, the architects' $30 and the product-owner reviewers' $21. By the first measure the worker's reads are about $45. Precision is low everywhere: of the characters a principles auditor read, 13% were in a file its report names; a stability reviewer 8%; a prose reviewer 18%; an architect 11%; the worker 4% in a file it later edited. Reading is mostly to find things and to learn what a project holds. 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, with the file unchanged, about $6 of the $45; a reviewer's later reads of an unchanged file it had read are 1 to 2%. rule-hook's `repeat-read` now blocks a read of lines already in context. The trials: 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, the reviewer as it is, found 4 of its own 6 archived findings in each pass, so a variant that finds 4 or 5 of 6 does what the same reviewer does twice. The options todo item 231 named, each simulated on the 90 chunks and, where lilleman asked, tried: @@ -97,7 +97,7 @@ The trials: four stability rounds and five principles rounds archived on 2026-10 - What a reviewer reads: the auditors read the project whole by design. Of their πŸ”΄ and 🟑 findings since the reset, 47% named a file the chunk edited and 51% another file, so reading only the change would drop half of them (`review: the principles audit runs only in the release review, and reads the project whole with one auditor checking the goals and every principles file that applies`). - The base context: every thread starts with `~/.claude/CLAUDE.md` (19k characters), `~/.claude/AGENTS.md` (11k, this repo's decisions, which Claude Code loads as user instructions into every project's sessions; `todo.md` item 52), the project's `AGENTS.md`, and, for the worker and general-purpose subagents, the skill listing (18k) and the agent listing (12k). Subagents' first messages wrote $97 of it. Trimming the listings would save about $20, 2%, and is not worth an item: `disableBundledSkills` would also drop `/security-review`, the security pass of record. -Quality. 19 chunks compacted between 2026-10-10 and 2026-10-22, at the compaction points Claude Code set then, 214k to 972k tokens. Per 100 worker messages they took a median 3.6 review rounds past each pass's first against 4.0 for the 68 uncompacted chunks of 100 messages or more, and 13.9 πŸ”΄ and 🟑 findings against 16.6. 4 of 19 had an unfinished verdict against 3 of 68, each 8 to 10 hours after the compaction and followed by a finished verdict within minutes; in those four verdicts the judge quoted the worker's own passages and the human's typed answers, never a summary. One cause was possible and is closed here: Claude Code writes the summary as a user entry, which `bin/claude_code/entries.py` read as the human's words, so the judge would see a `[human]` line of thousands of words and `/talk` would count it as typed; it now reads as Claude Code's. Measured on 2026-11-04, the first 20 chunks whose worker started under the 200k window, from 2026-10-28, against the 20 before them, from 2026-10-23 to 2026-10-26, rose on no figure: per chunk, a mean 4.0 review rounds past each pass's first against 5.8, 0.20 unfinished verdicts against 0.30, 1.15 πŸ”΄ against 1.90, 11.9 🟑 against 19.4, 0.11 misread findings against 0.25, $22 against $34, and 9.6 hours against 42. The median dollars rose, $15.17 against $11.72, since the 20 before held four chunks of $94 to $167 and the 20 after none above $76; the mean weighs all spend, as this decision does. The two groups differ in projects and routing too, so the window's own share of the fall is unknown. Two summaries read whole kept the chunk's intent, files, errors and next step in 12k to 20k characters, and the worker resumed without re-reading. +Quality. Under the 200k window, every figure's mean per chunk fell. Measured on 2026-11-04, the first 20 chunks whose worker started under it, from 2026-10-28, took a mean 4.0 review rounds past each pass's first against 5.8 for the 20 before them, from 2026-10-23 to 2026-10-26; 0.20 unfinished verdicts against 0.30; 1.15 πŸ”΄ against 1.90; 11.9 🟑 against 19.4; 0.11 misread findings against 0.25; $22 against $34; and 9.6 hours against 42. Only the median dollars went up, $15.17 against $11.72: the 20 before held four chunks of $94 to $167, and the 20 after none above $76. This decision weighs all spend, so the mean is the figure that counts. The two groups also differ in projects and routing, so how much of the fall the window caused is unknown. Before the window, 19 chunks compacted between 2026-10-10 and 2026-10-22, at the compaction points Claude Code set then, 214k to 972k tokens. Per 100 worker messages they took a median 3.6 review rounds past each pass's first against 4.0 for the 68 uncompacted chunks of 100 messages or more, and 13.9 πŸ”΄ and 🟑 findings against 16.6. 4 of 19 had an unfinished verdict against 3 of 68, each 8 to 10 hours after the compaction and followed by a finished verdict within minutes; in those four verdicts the judge quoted the worker's own passages and the human's typed answers, never a summary. One cause was possible and is closed here: Claude Code writes the summary as a user entry, which `bin/claude_code/entries.py` read as the human's words, so the judge would see a `[human]` line of thousands of words and `/talk` would count it as typed; it now reads as Claude Code's. Two summaries read whole kept the chunk's intent, files, errors and next step in 12k to 20k characters, and the worker resumed without re-reading. 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. Waiting on subagents took 66% of a worker's active time, so the hours lever is launching a round's reviewers together: larv-review Β§3 β†’ "Waves" now launches each wave's reviewers in one message. diff --git a/todo.md b/todo.md index 47c6520b..4564d074 100644 --- a/todo.md +++ b/todo.md @@ -42,7 +42,6 @@ | 135 | 0.7.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.7.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.7.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 | -| 260 | 0.7.0 | | decision | **Compare the first 20 chunks whose worker got the reading rule with the 20 before them, on review rounds past each pass's first, unfinished verdicts, πŸ”΄, 🟑 and misread findings, dollars and hours per chunk, and drop the rule where any rose.** | 1 | 2 | 1 | 2 | 2 | 1.4 by 3 | 4.0 | | 68 | 0.7.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.7.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.7.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 | @@ -66,6 +65,7 @@ | 197 | 0.7.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 | | 170 | 0.8.0 | | decision | **Re-tune `WORKER_STEPS` and `REVIEW_STEPS` once 50 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 | | 218 | 0.8.0 | 170 | | **Drop `LEGACY_WORKER` from `bin/model_routing/route.py`, so `route_from` reads only JSON worker lines.** | 1 | 2 | 1 | 2 | 1 | code health by 2 | 14.4 | +| 260 | 0.8.0 | | decision | **Compare the first 20 chunks whose worker got the reading rule with the 20 before them, on review rounds past each pass's first, unfinished verdicts, πŸ”΄, 🟑 and misread findings, dollars and hours per chunk, and drop the rule where any rose.** | 1 | 2 | 1 | 2 | 2 | 1.4 by 3 | 4.0 | ## Details @@ -207,10 +207,6 @@ Raised by the goals audit of PR #296. `bin/routing_figures/measure.py` groups a 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. -### 260. Compare the first 20 chunks whose worker got the reading rule with the 20 before them, on review rounds past each pass's first, unfinished verdicts, πŸ”΄, 🟑 and misread findings, dollars and hours per chunk, and drop the rule where any rose. - -The rule is `READING_RULE` in `bin/loop_claude/cycle/prompts.py`, which every fresh worker prompt holds; `git log -S READING_RULE` finds the merge that added it. A chunk got it when its first worker started after that merge. Measure as `docs/decisions.md` β†’ `loop-claude: the worker's claude compacts its context before it fills a 200k window…` measured the window: 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 from the chunk's `cost-state` entry. Compare means, since the decision weighs the rule by all spend. A worker that reads less may misread more, so a rise in misread findings drops the rule too. Wait for 20 such chunks before starting. - ### 68. Test `workflow-bench/compare.py`'s blinding and `bench.py`'s run plan. "Most, if not all, code should have automated tests", in `principles/technical-principles.md`: `compare.blind()` keeps the comparison blind, and a version name it misses invalidates the bench silently. @@ -340,3 +336,7 @@ The principles pass of PR #301 found that only `routed_by` in `bin/loop_claude/c ### 218. Drop `LEGACY_WORKER` from `bin/model_routing/route.py`, so `route_from` reads only JSON worker lines. PR #357 archived the route as JSON on each `Worker:` line, and kept `LEGACY_WORKER` to read the lines an older loop-claude wrote as sentences. The routing figures still count chunks whose archive holds such lines: 51 when PR #357 shipped, every chunk finished after the reset of 2026-10-21T22:16:41Z. A chunk that changes the routing steps has a `Reset` appended to `routing-calls-raised.md`, after which the figures count only chunks whose worker lines are JSON. This item waits for item 170 whether or not 170 changes the steps, as lilleman decided on 2026-10-23. Before starting, check that `routing-calls-raised.md` holds a `Reset` stamped after PR #357's merge; where none does, ask lilleman whether to append one. Delete `LEGACY_WORKER`, `legacy_fields`, the tests that read sentences (in `bin/loop_claude/test_loop_claude.py` and `bin/routing_figures/test_routing_figures.py`), and the sentence on them in "loop-claude --help". Reword `route_from`'s docstring, and the comment at `Rung.__str__` in `bin/model_routing/ladder.py`, which gives the old lines as a reason `parse` must keep reading that spelling. + +### 260. Compare the first 20 chunks whose worker got the reading rule with the 20 before them, on review rounds past each pass's first, unfinished verdicts, πŸ”΄, 🟑 and misread findings, dollars and hours per chunk, and drop the rule where any rose. + +Start once 20 chunks have run under the rule. The rule is `READING_RULE` in `bin/loop_claude/cycle/prompts.py`, which every fresh worker prompt holds; `git log --first-parent -S READING_RULE` on the default branch finds the merge that added it. A chunk got it when its first worker started after that merge. Measure as `docs/decisions.md` β†’ `loop-claude: the worker's claude compacts its context before it fills a 200k window…` measured the window: 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 from the chunk's `cost-state` entry. Compare means, since the decision weighs the rule by all spend.