diff --git a/CHANGELOG.md b/CHANGELOG.md index a7f49406..b57a708f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ## Unreleased -- loop-claude no longer runs the judge of an Opus 5.5 project on Fable 5.2: from an E + I of 5 the judge runs on Opus 5.5 at xhigh, since a replay found each Fable 5.2 rung missing an interrupt. `judge-replay` now also replays each rung above the project's that a review climbs to, and reports what each misses. +- loop-claude no longer runs the judge of an Opus 5.5 project on Fable 5.2: from an E + I of 5 the judge runs on Opus 5.5 at xhigh, since a replay found each Fable 5.2 rung it tried, at low, medium and high, missing an interrupt. `judge-replay` now also replays each rung above the project's that a review climbs to, and reports what each misses. ## 0.8.0 diff --git a/README.md b/README.md index 515c792c..497fedcb 100644 --- a/README.md +++ b/README.md @@ -101,7 +101,7 @@ Install puts only `loop-claude` and `loop-inbox` on `PATH`; call the others by t - `chunk-preflight` finds the mechanical facts a chunk starts from, and with `--worktree` makes its worktree; `loop-claude` runs it with `--worktree` before it routes each chunk, and `chunk-preflight --help` lists the facts. - `command-patterns []` prints a table of the shell command patterns a release's archived chunks ran, such as `tea pr create`, for an audit of the release; `command-patterns --help` states its columns. - `deploy-release [--cut] []` moves `~/.claude`, or the checkout named, to the newest release, as Update says; with `--cut`, run in the development clone, it first cuts the next release, as Release says. -- `judge-replay ` replays loop-claude's judge on archived verdicts of the projects run on the model, and prints what each rung a review climbs to misses, and the lowest rung that, like each rung above it, returns them; `judge-replay --help` states the replay. +- `judge-replay ` replays loop-claude's judge on archived verdicts of the projects run on the model, and prints what each rung a review climbs to misses, and the lowest rung below them that, like each candidate above it, returns them; `judge-replay --help` states the replay. - `larv-review ` holds larv-review's mechanical rules: the chunk's review folder, the paired ruling's base and vote count, each pass's round count, the scoring run's trigger; the comprehension history's format, its latest places and its count of how often seats agree; and each reviewer's prompt header. `larv-review --help` states them. - `loop-claude ` runs a project's next chunk cycle after cycle; `loop-claude --help` states its contract. - `loop-inbox` shows the interrupts of every loop-claude on the machine, oldest first, takes each one's answer, `/talk` included, and lists every running loop with the `todo.md` items its chunk takes; `loop-inbox --help` states how. diff --git a/bin/judge_replay/main.py b/bin/judge_replay/main.py index 84844c75..78b254ad 100644 --- a/bin/judge_replay/main.py +++ b/bin/judge_replay/main.py @@ -11,15 +11,18 @@ with the task, premises and records each project holds now. It first replays every verdict on the reference judge: the model at xhigh effort, the rung the judge ran on before loop-claude routed it. A verdict the reference judge returns another kind on may rest on records or judge rules that have changed since; either way no rung is held to it. It -then replays the rest on each rung above the model's cheapest that a chunk's E + I climbs a -review to, the reference judge's rung aside. Then it replays them on each candidate rung, highest -first: from the model's cheapest rung down to the lowest rung a worker routes to. It stops at the -first candidate that misses one. It prints each verdict the reference judge did not reproduce, -each verdict a rung missed, and the lowest candidate that, like each candidate above it, missed -none. A climbed rung that misses no interrupt is the evidence to let judge_rung in -bin/loop_claude/routing.py climb the judge onto it, which today keeps the judge to its model's rungs. A rung it names is the evidence to add the model to -JUDGE_REPLAYED in bin/loop_claude/routing.py, which routes that model's judge, and to record the -run in docs/decisions.md → `routing: on a model judge-replay covered`. +then replays the rest on each rung above the model's cheapest that a chunk's E + I raises a +review to, except the reference judge's rung. Then it replays them on each candidate rung, +highest first: from the model's cheapest rung down to the lowest rung a worker routes to. It stops +at the first candidate that misses one. It prints each verdict the reference judge did not +reproduce, each verdict a rung missed, and the lowest candidate that, like each candidate above +it, missed none. + +Record each run in docs/decisions.md → `routing: on a model judge-replay covered`. Where the +model's cheapest rung misses no interrupt, the run is the evidence to add the model to +JUDGE_REPLAYED in bin/loop_claude/routing.py, which routes that model's judge. judge_rung there +keeps the judge to its own model's rungs; a rung above them that misses no interrupt is the +evidence to let the judge climb onto it. Like the loop, it tries a judge three times running before it counts the reply as failed. A verdict whose project or transcript cannot be read replays as failed too. Exit 1, saying why, on @@ -77,7 +80,7 @@ def model_argument(argv: list[str]) -> Rung | None: def climbs(project: Rung, reference: Rung) -> list[Rung]: - """The rungs above the project's rung that an E + I climbs a review to, lowest first, the reference's aside: those the judge would climb to as a review does.""" + """The rungs above the project's rung that an E + I raises a review to, except the reference's, lowest first.""" return sorted({review_floor(project, score) for score in REVIEW_STEPS} - {project, reference}, key=position) diff --git a/bin/judge_replay/replay.py b/bin/judge_replay/replay.py index 74ac8d6d..112003ac 100644 --- a/bin/judge_replay/replay.py +++ b/bin/judge_replay/replay.py @@ -83,7 +83,7 @@ def report(model: str, reference: Rung, cases: list[Case], replay: Replay[Case, lines.append("No rung tried: the reference judge reproduced no verdict to hold one to.") else: lowest = replay.lowest or "none, the project's rung misses one" - lines.append(f"Lowest rung that, like each rung above it, returns every verdict the reference judge reproduces: {lowest}") + lines.append(f"Lowest candidate that, like each candidate above it, returns every verdict the reference judge reproduces: {lowest}") return "\n".join(lines) diff --git a/bin/judge_replay/test_judge_replay.py b/bin/judge_replay/test_judge_replay.py index 031c1ec7..86d8715f 100644 --- a/bin/judge_replay/test_judge_replay.py +++ b/bin/judge_replay/test_judge_replay.py @@ -77,11 +77,11 @@ class Report(unittest.TestCase): "claude-sonnet-5-5 at high effort missed 0.", "claude-haiku-5-5 at xhigh effort missed 1:", " /code/p 2026-10-14T10:00:01Z: archived Verdict: interrupt, replayed Verdict: finished", - "Lowest rung that, like each rung above it, returns every verdict the reference judge reproduces: claude-sonnet-5-5 at high effort", + "Lowest candidate that, like each candidate above it, returns every verdict the reference judge reproduces: claude-sonnet-5-5 at high effort", ]) missed_all = report("claude-opus-5-5", REFERENCE, cases, Replay([FINISHED, INTERRUPTED], [Tried(MIDDLE, [Miss(cases[1], INTERRUPTED, FINISHED)])], None)).splitlines() self.assertEqual(missed_all[1], "The reference judge, claude-opus-5-5 at xhigh effort, reproduced 2.") - self.assertEqual(missed_all[-1], "Lowest rung that, like each rung above it, returns every verdict the reference judge reproduces: none, the project's rung misses one") + self.assertEqual(missed_all[-1], "Lowest candidate that, like each candidate above it, returns every verdict the reference judge reproduces: none, the project's rung misses one") self.assertEqual(report("claude-opus-5-5", REFERENCE, cases, Replay([UNFINISHED, FINISHED], [], None)).splitlines()[-1], "No rung tried: the reference judge reproduced no verdict to hold one to.") def test_names_each_miss_of_each_rung_the_judge_climbs_to_before_the_search_down(self): diff --git a/bin/loop_claude/routing.py b/bin/loop_claude/routing.py index 7e55495d..2f871f0c 100644 --- a/bin/loop_claude/routing.py +++ b/bin/loop_claude/routing.py @@ -20,7 +20,7 @@ from model_routing.route import Route UNFINISHED_PER_STEP = 2 # How many rungs above item_rung an escalation trigger takes the worker or a task without the human's yes, as escalation_cap counts them. ESCALATION_CAP = 2 -# The models whose cheapest rung `judge-replay` found missing no interrupt the reference judge reproduced: docs/decisions.md → `routing: on a model judge-replay covered`. +# The models whose cheapest rung, in a `judge-replay` run, returned every interrupt the reference judge reproduced: docs/decisions.md → `routing: on a model judge-replay covered`. JUDGE_REPLAYED = ("claude-opus-5-5",) @@ -138,7 +138,7 @@ def one_rung_up(route: Route, rung: Rung, escalated_at: int) -> Route: def judge_rung(judge_model: str, route: Route) -> Rung: - """The lowest of the judge model's own rungs at or above the rung the route's reviewed_on E + I picks for a review, else the model's highest; counted from the model's cheapest rung, whatever rung the worker stepped to. + """The lowest of the judge model's own rungs at or above the rung a review gets from the route's reviewed_on E + I, counted from the model's cheapest rung. Where that review rung is above all the model's rungs, the model's highest. The worker's rung doesn't change it. The judge keeps to its model's rungs, since every Fable 5.2 rung judge-replay tried missed an interrupt: docs/decisions.md → `routing: on a model judge-replay covered`. A model off the ladder, or not in JUDGE_REPLAYED, gets no effort flag, so claude runs it at the effort its settings give. """ diff --git a/bin/rung_replay/search.py b/bin/rung_replay/search.py index 3e86d08d..594f3b8d 100644 --- a/bin/rung_replay/search.py +++ b/bin/rung_replay/search.py @@ -35,7 +35,7 @@ class Tried(typing.Generic[Case, Aim, Answer]): @dataclasses.dataclass(frozen=True) class Replay(typing.Generic[Case, Aim, Answer]): - """on_reference holds the reference's reply on each case; tried, each candidate tried, highest first; lowest, the lowest rung that, like each candidate above it, missed nothing, or None; climbed, each climb tried, in the order given.""" + """on_reference holds the reference's reply on each case; tried, each candidate tried, highest first; lowest, the lowest candidate that, like each candidate above it, didn't miss anything, or None; climbed, each climb tried, in the order given.""" on_reference: list[Answer] tried: list[Tried[Case, Aim, Answer]] lowest: Rung | None @@ -51,15 +51,17 @@ def replayed( what: str, climbs: typing.Sequence[Rung] = (), ) -> Replay[Case, Aim, Answer] | Limited: - """Replays the cases on the reference rung, then each climb, then each candidate, highest first, on the cases where the reference reproduced anything, until a candidate misses an item it reproduced. + """Replays the cases on the reference rung, then on each climb and each candidate, on the cases where the reference reproduced anything. - Going down, every rung at or above the one named was tried and missed nothing, so the result needs no assumption that a higher rung does at least as well; and a miss high up spares the cheaper rungs their replays. A climb is a rung above the candidates that a route can still pick, so each is tried whatever another misses. + A climb is a rung above the candidates, such as one a chunk's E + I raises a review to. The rungs a route picks there don't follow from one another, so each climb is tried whatever another misses. + + The candidates are tried highest first, until one misses an item the reference reproduced. Going down, every candidate at or above the one named was tried and didn't miss anything, so the result needs no assumption that a higher rung does at least as well; and a miss high up spares the cheaper rungs their replays. """ on_reference = replayed_on(cases, reference, replay_one, what) if isinstance(on_reference, Limited): return on_reference held = [(case, aim) for case, reply in zip(cases, on_reference) if (aim := reproduced(case, reply))] - # With nothing to hold a rung to, every rung would miss nothing. + # With nothing to hold a rung to, no rung would miss anything. if not held: return Replay(on_reference, [], None) climbed: list[Tried[Case, Aim, Answer]] = [] @@ -88,7 +90,7 @@ def tried_on( reproduced: typing.Callable[[Case, Answer], list[Aim]], what: str, ) -> Tried[Case, Aim, Answer] | Limited: - """rung's replies on the held cases, with each item the reference reproduced that a reply missed.""" + """rung and each item, of those the reference reproduced in the held cases, that its replies missed.""" replies = replayed_on([case for case, _ in held], rung, replay_one, what) if isinstance(replies, Limited): return replies diff --git a/docs/decisions.md b/docs/decisions.md index 2be2ded3..89d80a59 100644 --- a/docs/decisions.md +++ b/docs/decisions.md @@ -454,13 +454,13 @@ Valid while workers write the line when asked, and while `todo.md` on the defaul 2026-10-15, lilleman's plan, settled by the replays below. Serves goals 1.2 and 1.4, under the ladder and steps of `routing: one ladder`. -On a model listed in `JUDGE_REPLAYED` in `bin/loop_claude/routing.py`, the judge runs on the lowest of its model's own rungs at or above the rung a review would get from the highest E + I among its chunk's items: the routed item and those the worker takes in. Where that rung is above all of them, it runs on its model's highest. So on an Opus 5.5 project it runs on Opus 5.5 at medium below an E + I of 5, and at xhigh from 5. It never runs below the project's rung, and keeps its rung when the worker steps up. Without an item, it runs on the project's rung. Each archived verdict names the judge's rung on a `Judge:` line. +On a model listed in `JUDGE_REPLAYED` in `bin/loop_claude/routing.py`, the judge runs on the lowest of its model's own rungs at or above the rung a review would get from the highest E + I among its chunk's items: the routed item and those the worker takes in. Where that rung is above all its model's rungs, it runs on its model's highest. So on an Opus 5.5 project it runs on Opus 5.5 at medium below an E + I of 5, and at xhigh from 5. It never runs below the project's rung, and keeps its rung when the worker steps up. Without an item, it runs on the project's rung. Each archived verdict names the judge's rung on a `Judge:` line. On 2026-10-15, `bin/judge-replay claude-opus-5-5` replayed the latest 15 archived verdicts of each kind from the Opus 5.5 projects, 39 in all. The reference judge, Opus 5.5 at the xhigh effort `settings.json` gave every judge before, reproduced 31 of them. The other 8 may rest on records or judge rules that have changed since; either way no rung is held to them. On the 31, Haiku 5.5 missed 7 at xhigh and 8 at max. That run tried each judge once. 4 of Haiku's misses, 1 at xhigh and 3 at max, misquoted the transcript, which the loop and `judge-replay` now retry; without them it missed 6 and 5. Sonnet 5.5 at high returned another kind on 3 interrupts, and Opus 5.5 at medium missed none. A missed interrupt lets the worker settle a decision that is lilleman's (goal 1.2), so the judge never runs below the project's rung. -On 2026-11-12, `bin/judge-replay claude-opus-5-5` replayed 60 verdicts, 15 of each kind, and also tried each rung above the project's that a review climbs to by E + I. The reference judge reproduced 46. On those 46, Fable 5.2 missed 2 interrupts and 6 other verdicts at low, 1 interrupt and 4 others at medium, and 1 interrupt and 2 others at high. Every Fable 5.2 rung it tried misses an interrupt, so the judge keeps to its own model's rungs (goal 1.2). That rule also keeps it off Fable 5.2 at max, which no replay tried. Between Opus 5.5's two rungs it climbs to xhigh, not back to medium, since a chunk of E + I 5 or more needs a judge above the project's rung, as it needs reviewers above it. Opus 5.5 at medium missed no interrupt, but returned another kind on 4 quoted answers, 3 of them as finished; `todo.md` item 333 weighs that. +Only Opus 5.5 was replayed, so the judge of a project on another model keeps the effort its settings give until `judge-replay` covers that model (goal 1.1). Every routed chunk on record had an item of R + C 9, so the 2026-10-15 replay could not show that the project's rung suffices for harder items, and the judge climbs with the routed item. Since 2026-10-16, lilleman's call, it climbs with the item's E + I, as a review does: the judge checks the worker's decisions as the reviewers check its code, and a decision the judge lets through reaches lilleman, as a defect that review lets through reaches the users (goal 1.2). It runs above the project's rung only on an E + I of 5 or more (goal 1.4). It counts a taken-in item from the next cycle on. -Only Opus 5.5 was replayed, so the judge of a project on another model keeps the effort its settings give until `judge-replay` covers that model (goal 1.1). Every routed chunk on record had an item of R + C 9, so the replay could not show that the project's rung suffices for harder items, and the judge climbs with the routed item. Since 2026-10-16, lilleman's call, it climbs with the item's E + I, as a review does: the judge checks the worker's decisions as the reviewers check its code, and a decision the judge lets through reaches lilleman, as a defect that review lets through reaches the users (goal 1.2). It runs above the project's rung only on an E + I of 5 or more (goal 1.4). It counts a taken-in item from the next cycle on. +On 2026-11-12, `bin/judge-replay claude-opus-5-5` replayed 60 verdicts, 15 of each kind, and also tried each rung above the project's that a review climbs to by E + I. The reference judge reproduced 46. On those 46, Fable 5.2 missed 2 interrupts and 6 other verdicts at low, 1 interrupt and 4 others at medium, and 1 interrupt and 2 others at high. Every Fable 5.2 rung it tried misses an interrupt, so the judge keeps to its own model's rungs (goal 1.2). That rule also keeps it off Fable 5.2 at max, which no replay tried. Between Opus 5.5's two rungs it climbs to xhigh, not back to medium, since a chunk of E + I 5 or more needs a judge above the project's rung, as it needs reviewers above it. Opus 5.5 at medium missed no interrupt, but returned another kind on 4 quoted answers, 3 of them as finished; `todo.md` item 333 weighs that. Valid while the archived verdicts show what a judge should return, and until a new model joins the ladder: replay then. diff --git a/todo.md b/todo.md index b2af5ae1..5dcd1598 100644 --- a/todo.md +++ b/todo.md @@ -14,7 +14,7 @@ |---|---|---|---|---|---|---|---|---|---|---|---| | 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 | **Keep the judge of an Opus 5.5 project below E + I 5 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 | +| 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 | @@ -92,13 +92,13 @@ lilleman asked, on 2026-10-16, for a standing audit each release, so the loop ke 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. Keep the judge of an Opus 5.5 project below E + I 5 on a rung that returns every quoted answer the reference judge reproduces. +### 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. On 2026-11-12, `bin/judge-replay claude-opus-5-5` replayed 60 archived verdicts, 15 of each kind, and the reference judge reproduced 46. On those, Opus 5.5 at medium missed no interrupt, but returned another kind on 4 quoted answers: as finished on adf-codec 2026-10-21T20:33:37Z, claude-config 2026-11-08T10:15:04Z and plainpages 2026-11-08T19:55:39Z, and as unfinished on fejkdata 2026-11-10T22:25:50Z. A quoted answer returned as finished closes a chunk whose worker was asking a question (goal 1.1). It is a quality miss, not a decision of lilleman's left unasked. The replay tried each judge call up to three times on failure, but ran once, so some misses may be noise. -Recommended order. First read the 4 cases, and check whether each archived quoted answer still holds against today's `README.md` and records: a quote the records no longer back explains the miss, and that case drops out. Then re-run the project's rung on the cases that remain, a few times each. Only where misses persist, raise the judge's floor below E + I 5 to Opus 5.5 at xhigh in `bin/loop_claude/routing.py`, and record the evidence in that decision. That costs more per cycle (goal 1.4), against the quality goal 1.1 the misses hurt. The judge's rung is not a change to the ladder or its steps, which `routing: one ladder` reserves for lilleman: that decision says the judge's rung is set by `routing: on a model judge-replay covered`. +Recommended order. First read the 4 cases, and check whether each archived quoted answer still holds against today's `README.md` and records: a quote the records no longer back explains the miss, and that case drops out. Then re-run the project's rung on the cases that remain, a few times each. Only where misses persist, raise the judge's floor below E + I 5 to Opus 5.5 at xhigh in `bin/loop_claude/routing.py`, and record the evidence in that decision. That costs more per cycle (goal 1.4), against the quality goal 1.1 the misses hurt. Moving the judge to another rung changes neither the ladder nor its steps, which `routing: one ladder` reserves for lilleman: that decision says the judge's rung is set by `routing: on a model judge-replay covered`. ### 320. 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.