Answer architecture round 1: 1 🔴, 7 🟡; give the planning subagent's rung one owner in subagent-rung --plan, share the floor with the judge in ladder.floored, check each rung's family name, and define the project's rung once

This commit is contained in:
2026-10-15 15:54:28 +02:00
parent 3f26e9f3ea
commit 4d70b7e5a3
12 changed files with 27 additions and 15 deletions
+2 -2
View File
@@ -28,9 +28,9 @@ def off_the_projects_rung(route: Route, anchor: Rung | None) -> str:
"""Which subagents to launch on the project's rung, anchor, while the worker runs off it; empty while it runs on it, as a chunk no item routed starts: `routing.first_route` starts it on anchor."""
if anchor is None or route.rung == anchor:
return ""
# Below the project's rung, the reviewers and the plan's scorer stay on it to hold quality; above it, the seats score every chunk on one rung, and the security pass spends no more than the project chose.
# Below the project's rung, the reviewers stay on it to hold quality; above it, the seats score every chunk on one rung, and the security pass spends no more than the project chose.
below = highest(route.rung, anchor) == anchor
launched = "each reviewer, each comprehension seat, the security pass's subagent and each subagent that files or scores todo.md items" if below else "each comprehension seat and the security pass's subagent"
launched = "each reviewer, each comprehension seat and the security pass's subagent" if below else "each comprehension seat and the security pass's subagent"
return f" Your rung is {'below' if below else 'above'} the project's, {anchor}: launch {launched} with the Agent tool set to {anchor.agent_args()}. Run a full scan only from such a subagent, since the scan's agents run on the model that starts them."
+3 -3
View File
@@ -2,7 +2,7 @@
import dataclasses
from failure import Failure
from model_routing.ladder import highest, LADDER, picked, project_rung, Rung, stepped_up
from model_routing.ladder import floored, highest, LADDER, picked, project_rung, Rung, stepped_up
from todo_table import Item, items
from model_routing.route import Route
@@ -34,7 +34,7 @@ def kept(route: Route, anchor: Rung) -> bool:
def item_rung(anchor: Rung, route: Route) -> Rung:
"""The rung the route's item's R + C picks from anchor, the project's rung, or anchor itself when no item routed it. The worker may run on a rung below anchor; judge_rung lifts the judge's rung to anchor."""
"""The rung the route's item's R + C picks from anchor, the project's rung, or anchor itself when no item routed it. The worker may run on a rung below anchor; judge_rung floors the judge's rung at anchor."""
return picked(anchor, route.risk_and_complexity) if route.item else anchor
@@ -58,4 +58,4 @@ def judge_rung(judge_model: str, route: Route) -> Rung:
anchor = project_rung(judge_model)
if anchor is None or judge_model not in JUDGE_REPLAYED:
return Rung(judge_model)
return highest(anchor, item_rung(anchor, route))
return floored(anchor, route.risk_and_complexity) if route.item else anchor
+1 -1
View File
@@ -406,7 +406,7 @@ class Cycles(unittest.TestCase):
ruling = next(call for call in run.calls if call["role"] == "judge")
self.assertEqual((argument(ruling, "--model"), argument(ruling, "--effort")), ("claude-opus-5-5", "medium"))
self.assertIn("Judge: claude-opus-5-5 at medium effort\nWorker: claude-sonnet-5-5 at high effort", "".join(checkout.archived().values()))
self.assertIn("Your rung is below the project's, claude-opus-5-5 at medium effort: launch each reviewer, each comprehension seat, the security pass's subagent and each subagent that files or scores todo.md items with the Agent tool set to model opus, effort medium", argument(first, "-p"))
self.assertIn("Your rung is below the project's, claude-opus-5-5 at medium effort: launch each reviewer, each comprehension seat and the security pass's subagent with the Agent tool set to model opus, effort medium", argument(first, "-p"))
def test_a_rerun_resumes_an_open_chunk_on_the_rung_it_last_ran(self):
checkout = Checkout(self)
+1 -1
View File
@@ -646,7 +646,7 @@ class WorkerArgs(unittest.TestCase):
def test_keeps_reviewers_on_the_projects_rung_while_the_worker_runs_below_it(self):
opus = Rung("claude-opus-5-5", "medium")
below = prompts.fresh("Do it.", "## Goals", Route(Rung("claude-sonnet-5-5", "high"), 3, 5), opus)
self.assertIn("whether or not it is item 3. Your rung is below the project's, claude-opus-5-5 at medium effort: launch each reviewer, each comprehension seat, the security pass's subagent and each subagent that files or scores todo.md items with the Agent tool set to model opus, effort medium. Run a full scan only from such a subagent, since the scan's agents run on the model that starts them.\n\n", below)
self.assertIn("whether or not it is item 3. Your rung is below the project's, claude-opus-5-5 at medium effort: launch each reviewer, each comprehension seat and the security pass's subagent with the Agent tool set to model opus, effort medium. Run a full scan only from such a subagent, since the scan's agents run on the model that starts them.\n\n", below)
self.assertNotIn("the project's", prompts.fresh("Do it.", "## Goals", Route(opus, 3, 9), opus))
def test_keeps_seats_and_the_security_pass_on_the_projects_rung_while_the_worker_runs_above_it(self):