Answer architecture round 1: 3 🔴, 4 🟡; hand interrupts the rungs, derive the rung rule once, and give each rung one spelling

This commit is contained in:
2026-10-16 06:46:38 +02:00
parent 5c65e725fc
commit e07c20bd60
18 changed files with 192 additions and 51 deletions
+4 -4
View File
@@ -1,4 +1,4 @@
from model_routing.ladder import climbed, highest, LADDER, Rung
from model_routing.ladder import climbed, LADDER, review_rung, Rung
from model_routing.route import ESCALATION_MARKER, Route
from loop_claude.routing import escalation_rungs
from loop_claude.project.records import HUMAN_RULE_NAMES, RECORD_FILES
@@ -31,7 +31,7 @@ def off_the_projects_rung(route: Route, anchor: Rung | None) -> str:
if anchor is None or route.rung == anchor:
return ""
# 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
below = review_rung("reviewer", anchor, route.rung) == anchor
launched = "each reviewer, each comprehension seat and the security pass's subagent" if below else "each comprehension seat and the security pass's subagent"
planning = f" Launch each subagent that files or scores todo.md items on the rung `~/.claude/bin/subagent-rung --plan {anchor.model} <R+C>` prints." if below else ""
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.{planning}"
@@ -56,8 +56,8 @@ def reruns(route: Route, anchor: Rung | None) -> str:
if anchor is None or route.rung not in LADDER:
return ""
# The rungs off_the_projects_rung launches them on: the seats always on anchor, the reviewers on anchor only while the worker runs below it.
reviewer = highest(route.rung, anchor)
rerun = {name: climbed(rung, 1) for name, rung in (("reviewer", reviewer), ("comprehension seat", anchor)) if rung != LADDER[-1]}
launched = (("reviewer", review_rung("reviewer", anchor, route.rung)), ("comprehension seat", review_rung("seat", anchor, route.rung)))
rerun = {name: climbed(rung, 1) for name, rung in launched if rung != LADDER[-1]}
if not rerun:
return ""
if len(set(rerun.values())) == 1: