From 3dda22672fc375376cf1ac4d9f5231d8b7e88c61 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Thu, 22 Oct 2026 00:05:23 +0200 Subject: [PATCH] Step a task's worker one rung down for L 1, as for L 2 --- CHANGELOG.md | 1 + bin/judge_replay/test_judge_replay.py | 12 ++++++------ bin/loop_claude/test_loop_claude.py | 8 ++++---- bin/model_routing/ladder.py | 2 +- bin/model_routing/test_ladder.py | 6 +++--- bin/subagent_rung/test_subagent_rung.py | 2 +- docs/decisions.md | 4 ++-- todo.md | 22 ---------------------- 8 files changed, 18 insertions(+), 39 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5bb4b27b..df1877a1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Unreleased +- A task scored L 1 now routes its worker, or a delegated subagent such as a search, one rung below the project's rung, as L 2 does, in place of two. On an Opus 5.5 project that is Sonnet 5.5 at high, not Haiku 5.5 at max: chunks started on Haiku 5.5 took more review rounds and unfinished verdicts. - loop-claude's worker now starts with `ScheduleWakeup` disallowed. A worker that scheduled a wakeup kept `claude -p` running after its turn ended, so loop-claude neither ran the judge nor asked you, and the chunk stalled until someone killed the worker. - Every project's audience now includes the contributor, the person who reads the code to change it. A README doesn't list them; only its `**Void:** code health` line drops them. larv-review's comprehension check now measures how hard the project is for them to read. - `score-outcomes` now also measures projects that merge by rebase: each run of commits that share one commit time counts as a chunk. Add `docs/score-anchors.md` to those projects too. A chunk that was pushed or fast-forwarded may hold only part of its pull request, so the medians and rank correlations leave it out. diff --git a/bin/judge_replay/test_judge_replay.py b/bin/judge_replay/test_judge_replay.py index 66ae1033..b0e79285 100644 --- a/bin/judge_replay/test_judge_replay.py +++ b/bin/judge_replay/test_judge_replay.py @@ -126,16 +126,16 @@ class Main(unittest.TestCase): return {"type": "result", "structured_output": output} def test_replays_the_models_projects_on_the_reference_then_from_the_projects_rung_down_and_prints_the_lowest_that_returns_all(self): - # Haiku misses the interrupt; Sonnet and Opus return both. + # Sonnet misses the interrupt; Opus returns both. def reply(rung, interrupted): - return self.verdict(interrupted and rung.model != "claude-haiku-5-5", f"said {INTERRUPTED if interrupted else FINISHED}") + return self.verdict(interrupted and rung.model != "claude-sonnet-5-5", f"said {INTERRUPTED if interrupted else FINISHED}") code, out, err = self.run_main(["claude-opus-5-5"], reply) self.assertEqual(code, 0, err) self.assertEqual({cwd for _, _, cwd in self.calls}, {str(self.home / "code" / "proj")}) - self.assertEqual([(model, effort) for model, effort, _ in self.calls[::2]], [("claude-opus-5-5", "xhigh"), ("claude-opus-5-5", "medium"), ("claude-sonnet-5-5", "high"), ("claude-haiku-5-5", "max")]) + self.assertEqual([(model, effort) for model, effort, _ in self.calls[::2]], [("claude-opus-5-5", "xhigh"), ("claude-opus-5-5", "medium"), ("claude-sonnet-5-5", "high")]) self.assertIn("The reference judge, claude-opus-5-5 at xhigh effort, reproduced 2.", out) - self.assertTrue(out.endswith("returns every verdict the reference judge reproduces: claude-sonnet-5-5 at high effort\n")) + self.assertTrue(out.endswith("returns every verdict the reference judge reproduces: claude-opus-5-5 at medium effort\n")) for said in ("The task an agent was given:\nDo it.", "1. Ship.", "From ~/.claude/CLAUDE.md:\nBe kind."): self.assertIn(said, self.prompts[0]) # The replay shows the judge the whole transcript, with no step-up marked in it. @@ -144,8 +144,8 @@ class Main(unittest.TestCase): def test_tries_no_rung_below_the_lowest_a_worker_routes_to_where_every_rung_returns_every_verdict(self): code, out, err = self.run_main(["claude-opus-5-5"], lambda rung, interrupted: self.verdict(interrupted, f"said {INTERRUPTED if interrupted else FINISHED}")) self.assertEqual(code, 0, err) - self.assertEqual([(model, effort) for model, effort, _ in self.calls[::2]][-1], ("claude-haiku-5-5", "max")) - self.assertTrue(out.endswith("returns every verdict the reference judge reproduces: claude-haiku-5-5 at max effort\n"), out) + self.assertEqual([(model, effort) for model, effort, _ in self.calls[::2]][-1], ("claude-sonnet-5-5", "high")) + self.assertTrue(out.endswith("returns every verdict the reference judge reproduces: claude-sonnet-5-5 at high effort\n"), out) def test_stops_at_the_projects_rung_and_names_none_when_it_misses(self): code, out, _ = self.run_main(["claude-opus-5-5"], lambda rung, interrupted: self.verdict(interrupted and rung == REFERENCE, f"said {INTERRUPTED if interrupted else FINISHED}")) diff --git a/bin/loop_claude/test_loop_claude.py b/bin/loop_claude/test_loop_claude.py index 53fa76dd..acfa2327 100644 --- a/bin/loop_claude/test_loop_claude.py +++ b/bin/loop_claude/test_loop_claude.py @@ -770,7 +770,7 @@ class Routing(unittest.TestCase): def test_starts_a_chunk_on_the_rung_its_items_l_picks_below_the_projects_too(self): self.assertEqual(routing.first_route(self.OPUS, routing.routed_item(TODO, NO_CUT)), Route(self.HIGH, 3, 4, 5)) cheap = routing.routed_item(TODO.replace("| 4 | 2 | 3 |", "| 1 | 2 | 3 |"), NO_CUT) - self.assertEqual(routing.first_route(self.OPUS, cheap), Route(Rung("claude-haiku-5-5", "max"), 3, 1, 5)) + self.assertEqual(routing.first_route(self.OPUS, cheap), Route(Rung("claude-sonnet-5-5", "high"), 3, 1, 5)) self.assertEqual(routing.first_route(self.OPUS, None), Route(self.OPUS)) def test_steps_up_a_rung_after_every_second_unfinished_verdict(self): @@ -785,10 +785,10 @@ class Routing(unittest.TestCase): self.assertEqual(routing.stepped(self.OPUS, Route(self.OPUS, unfinished=1), 4, None).rung, self.XHIGH) def test_steps_up_from_a_rung_below_the_projects_one_rung_at_a_time(self): - low = Route(Rung("claude-haiku-5-5", "max"), 3, 1, 3, unfinished=1) - self.assertEqual(routing.stepped(self.OPUS, low, 0, None).rung, self.SONNET) + low = Route(self.SONNET, 3, 1, 3, unfinished=1) + self.assertEqual(routing.stepped(self.OPUS, low, 0, None).rung, self.OPUS) self.assertEqual(routing.stepped(self.OPUS, Route(low.rung, 3, 1, 3), 0, None).rung, low.rung) - self.assertEqual(routing.stepped(self.OPUS, Route(low.rung, 3, 1, 3), 2, None).rung, self.SONNET) + self.assertEqual(routing.stepped(self.OPUS, Route(low.rung, 3, 1, 3), 3, None).rung, self.OPUS) def test_steps_up_a_rung_on_an_escalation_the_judge_found_up_to_two_above_the_items_rung_marking_the_transcript_entries_it_read(self): self.assertEqual(routing.stepped(self.OPUS, Route(self.HIGH, 3, 4, 5), 0, 7), Route(self.XHIGH, 3, 4, 5, escalated_at=7)) diff --git a/bin/model_routing/ladder.py b/bin/model_routing/ladder.py index b0f185dc..f3cf683a 100644 --- a/bin/model_routing/ladder.py +++ b/bin/model_routing/ladder.py @@ -62,7 +62,7 @@ LADDER = ( Rung("claude-fable-5-1", "max"), ) # The rungs a task's L steps its worker from the project's rung. -WORKER_STEPS = {1: -2, 2: -1, 3: 0, 4: 1} +WORKER_STEPS = {1: -1, 2: -1, 3: 0, 4: 1} # The rungs a task's E + I steps a review up from the project's rung; an E + I under 5 steps none. REVIEW_STEPS = {5: 1, 6: 2, 7: 3, 8: 4} # Each pass an agent under agents/ reviews, in the order of SKILL.md's pass table, and that agent. diff --git a/bin/model_routing/test_ladder.py b/bin/model_routing/test_ladder.py index 5a82b663..018b1985 100644 --- a/bin/model_routing/test_ladder.py +++ b/bin/model_routing/test_ladder.py @@ -28,7 +28,7 @@ class Ladder(unittest.TestCase): def test_steps_a_workers_rung_by_its_l_from_the_projects_rung(self): position = LADDER.index(OPUS) - self.assertEqual([LADDER.index(worker_rung(OPUS, likelihood)) - position for likelihood in range(1, 5)], [-2, -1, 0, 1]) + self.assertEqual([LADDER.index(worker_rung(OPUS, likelihood)) - position for likelihood in range(1, 5)], [-1, -1, 0, 1]) def test_steps_a_review_up_by_its_e_plus_i_from_the_projects_rung_and_never_down(self): position = LADDER.index(OPUS) @@ -36,7 +36,7 @@ class Ladder(unittest.TestCase): self.assertEqual(review_floor(OPUS, 0), OPUS) def test_a_step_past_either_end_stops_there(self): - self.assertEqual(worker_rung(OPUS, 1), Rung("claude-haiku-5-5", "max")) + self.assertEqual(worker_rung(OPUS, 1), Rung("claude-sonnet-5-5", "high")) self.assertEqual(worker_rung(LADDER[1], 1), LADDER[0]) self.assertEqual(review_floor(Rung("claude-opus-5-5", "xhigh"), 8), LADDER[-1]) self.assertEqual(stepped_up(LADDER[-1]), LADDER[-1]) @@ -46,7 +46,7 @@ class Ladder(unittest.TestCase): self.assertEqual(set(WORKER_STEPS), set(range(1, LEVELS["L"] + 1))) def test_names_the_lowest_rung_any_l_routes_a_worker_to(self): - self.assertEqual(lowest_worker_rung(OPUS), Rung("claude-haiku-5-5", "max")) + self.assertEqual(lowest_worker_rung(OPUS), Rung("claude-sonnet-5-5", "high")) def test_plans_on_the_rung_l_picks_but_never_below_the_projects(self): self.assertEqual(planning_rung(OPUS, 1), OPUS) diff --git a/bin/subagent_rung/test_subagent_rung.py b/bin/subagent_rung/test_subagent_rung.py index 6d884e0b..c8fdbb40 100644 --- a/bin/subagent_rung/test_subagent_rung.py +++ b/bin/subagent_rung/test_subagent_rung.py @@ -40,7 +40,7 @@ class SubagentRung(unittest.TestCase): off = self.run_tool("claude-opus-5", "4") self.assertEqual((off.returncode, off.stdout), (0, "")) self.assertEqual(off.stderr, "subagent-rung: claude-opus-5 is not on the routing ladder; pass the Agent tool no model or effort\n") - for bound, rung in (("1", "model haiku, effort max\n"), ("4", "model opus, effort high\n")): + for bound, rung in (("1", "model sonnet, effort high\n"), ("4", "model opus, effort high\n")): self.assertEqual(self.run_tool("claude-opus-5-5", bound).stdout, rung) for flag in ("-h", "--help"): self.assertIn("usage: subagent-rung [--plan] ", self.run_tool(flag).stdout) diff --git a/docs/decisions.md b/docs/decisions.md index 0d9346ef..e174724e 100644 --- a/docs/decisions.md +++ b/docs/decisions.md @@ -264,9 +264,9 @@ Valid while a mutation run on a chunk's changed lines stays cheap beside the rev The rungs, least competent first: Haiku 5.5 at low, medium, high, xhigh and max; Sonnet 5.5 at high; Opus 5.5 at medium, high, xhigh and max; Fable 5.1 at max. The order and the cut come from the Artificial Analysis Intelligence Index (https://artificialanalysis.ai/leaderboards/models, read 2026-10-14), which scores each model at each effort and gives a cost per task. A rung stays only where no cheaper rung scores as high, so a step up always buys more score (goal 1.4). That cut drops Sonnet 5.5 at low, medium, xhigh and max, Opus 5.5 at low, and every Fable 5.1 rung, and every tie in the index falls among the dropped rungs. lilleman put Fable 5.1 at max back on top: the index scores it under Opus 5.5 at high, but Anthropic's model catalog names Fable the most capable model, and for the hardest tasks lilleman wants the highest quality at any price. -A project's rung is its model's cheapest rung, which for Opus 5.5 is its default effort, medium. A model off the ladder routes nothing: claude runs it at the effort its settings give. A task's L steps its worker from the project's rung: 1 two rungs down, 2 one down, 3 none, 4 one up. Its E + I steps its reviewers up from the project's rung: 4 or less none, 5 one up, 6 two up, 7 three up, 8 four up. A step past either end stops there. A worker errs more the more it changes and the newer that is, which L scores; review must look harder the further a defect would escape and the more it would break, which E + I scores (goals 1.1 and 1.4). Size raises L, so a large change runs its worker higher. The steps spread the values this repo's plan held when rescored on 2026-10-16, L 1 to 4 and E + I 2 to 7, so a worker on most items runs at or below the project's rung, and a review climbs only where a defect would escape far or break much. lilleman approved these steps on 2026-10-16 as a first guess: `score-outcomes` reports how well L, E and I each order finished chunks by review rounds and 🔴 findings, and `todo.md` item 170 re-tunes the steps once 10 chunks have shipped under them. A change to the ladder or the steps is lilleman's. +A project's rung is its model's cheapest rung, which for Opus 5.5 is its default effort, medium. A model off the ladder routes nothing: claude runs it at the effort its settings give. A task's L steps its worker from the project's rung: 1 and 2 one down, 3 none, 4 one up. Its E + I steps its reviewers up from the project's rung: 4 or less none, 5 one up, 6 two up, 7 three up, 8 four up. A step past either end stops there. A worker errs more the more it changes and the newer that is, which L scores; review must look harder the further a defect would escape and the more it would break, which E + I scores (goals 1.1 and 1.4). Size raises L, so a large change runs its worker higher. The steps spread the values this repo's plan held when rescored on 2026-10-16, L 1 to 4 and E + I 2 to 7, so a worker on most items runs at or below the project's rung, and a review climbs only where a defect would escape far or break much. lilleman approved the first steps on 2026-10-16 as a guess: `score-outcomes` reports how well L, E and I each order finished chunks by review rounds and 🔴 findings, and `todo.md` item 170 re-tunes the steps once 10 chunks have shipped under them. A change to the ladder or the steps is lilleman's. -2026-10-21, lilleman ruled that L1 is to step the worker one rung down, as L2 does, so that an Opus 5.5 project runs no worker on Haiku 5.5. Until then, `WORKER_STEPS` in `bin/model_routing/ladder.py` still steps L1 two rungs down. The plan item filed for the routing calls of the figures measured at cycle 165 changes L1's step and appends a `Reset`, so the figures show whether the change worked. The ruling answers those calls. Chunks started on Haiku 5.5 at max took a mean 7.8 review rounds past each pass's first, against 2.8 on Sonnet 5.5 at high, and 0.2 unfinished verdicts, against 0.1. The figures also called for moving workers off Sonnet 5.5 at high, whose chunks took 0.1 unfinished verdicts against 0.0 on Opus 5.5 at medium. lilleman kept L2 on Sonnet 5.5, since that gap rests on one or two verdicts. +2026-10-21, lilleman, settling the routing calls stamped 2026-10-21T20:33:29Z: L1 steps one rung down, where it stepped two, so an Opus 5.5 project runs no worker on Haiku 5.5. A delegated subagent takes the same steps, so an L 1 search moves off Haiku 5.5 too: lilleman kept one ladder for every task. Chunks started on Haiku 5.5 at max took a mean 7.8 review rounds past each pass's first, against 2.8 on Sonnet 5.5 at high, and 0.2 unfinished verdicts, against 0.1. The figures also called for moving workers off Sonnet 5.5 at high, whose chunks took 0.1 unfinished verdicts against 0.0 on Opus 5.5 at medium. lilleman kept L2 on Sonnet 5.5, since that gap rests on one or two verdicts. Valid while the index ranks these models, and while no newer model joins the catalog. diff --git a/todo.md b/todo.md index 5575ea17..b639b883 100644 --- a/todo.md +++ b/todo.md @@ -12,7 +12,6 @@ | ID | Release | Blocked by | Exempt | Item | L | E | I | R | S | Moves | Score | |---|---|---|---|---|---|---|---|---|---|---|---| -| 206 | 0.3.0 | | | **Step a task's worker one rung down for L 1, as for L 2, so an Opus 5.5 project runs no worker or delegated subagent on Haiku 5.5.** | 1 | 1 | 3 | 3 | 1 | 1.1 by 4, 1.4 by 3 | 11.5 | | 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 | | 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 | @@ -89,27 +88,6 @@ ## Details -### 206. Step a task's worker one rung down for L 1, as for L 2, so an Opus 5.5 project runs no worker or delegated subagent on Haiku 5.5. - -lilleman's ruling of 2026-10-21 in `docs/decisions.md` → `routing: one ladder…` settles these calls from `routing-figures.md`, measured at cycle 165, 2026-10-21T20:33:29Z: - -- Chunks routed onto claude-haiku-5-5 at max effort took more review rounds past each pass's first than chunks routed onto claude-sonnet-5-5 at high effort. -- Chunks routed onto claude-haiku-5-5 at max effort took more unfinished verdicts than chunks routed onto claude-sonnet-5-5 at high effort. -- Chunks routed onto claude-sonnet-5-5 at high effort took more unfinished verdicts than chunks routed onto claude-opus-5-5 at medium effort. - -The routed-chunks table: - -| Rung | Chunks | Review rounds past each pass's first, mean | Unfinished verdicts, mean | -| --- | --- | --- | --- | -| claude-haiku-5-5 at xhigh effort | 2 | 4.5 | 0.0 | -| claude-haiku-5-5 at max effort | 6 | 7.8 | 0.2 | -| claude-sonnet-5-5 at high effort | 14 | 2.8 | 0.1 | -| claude-opus-5-5 at medium effort | 10 | 4.0 | 0.0 | -| claude-opus-5-5 at high effort | 6 | 7.3 | 0.0 | -| claude-opus-5-5 at xhigh effort | 1 | 11.0 | 0.0 | - -`WORKER_STEPS` in `bin/model_routing/ladder.py` goes from `{1: -2, …}` to `{1: -1, …}`. `bin/subagent-rung` reads the same steps, so delegated L 1 subagents, mostly searches, move too, as lilleman chose. The decision entry states the new steps and cites the stamp it settled. Once merged, append a `Reset` to `routing-calls-raised.md`. - ### 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.