Answer architecture round 1: 1 🔴, 5 🟡; track bin/model_routing, hand over the route by its rung, share the R + C mapping, record the routing item, and have the judge report R + C plainly

This commit is contained in:
2026-10-14 22:56:03 +02:00
parent a387e62e78
commit c75e576773
15 changed files with 258 additions and 111 deletions
+6 -8
View File
@@ -1,8 +1,6 @@
from loop_claude.project.records import HUMAN_RULE_NAMES, RECORD_FILES
from todo_table import Item
from markdown_text import quoted
from loop_claude.cycle.routing import risk_and_complexity
from model_routing.ladder import Rung
from loop_claude.loop.routing import Route
def either(names: tuple[str, ...]) -> str:
"""The names as `a, b or c`."""
@@ -16,13 +14,13 @@ ANSWER_DESTINATIONS = "README.md's Goals or Audience, " + ", ".join(RECORD_FILES
ANSWERS_RECORDED = f"every answer the human typed in it that a later chunk could need is recorded in {ANSWER_DESTINATIONS} at the one place it governs"
def fresh(task: str, premises: str, routed: str = "") -> str:
route = f"{routed}\n\n" if routed else ""
return f"{task}\n\nContinue any open draft PR or worktree for the chunk before creating a new one.\n\n{route}The chunk's todo.md items, or else the task above, set its scope. The goals below choose between ways to deliver that scope, and never widen it.\n\nFrom README.md:\n{premises}"
def fresh(task: str, premises: str, route: Route) -> str:
routed = f"{routed_by(route)}\n\n" if route.item else ""
return f"{task}\n\nContinue any open draft PR or worktree for the chunk before creating a new one.\n\n{routed}The chunk's todo.md items, or else the task above, set its scope. The goals below choose between ways to deliver that scope, and never widen it.\n\nFrom README.md:\n{premises}"
def routed(worker: Rung, item: Item) -> str:
return f"loop-claude runs you on {worker}, the rung item {item.id}'s R + C of {risk_and_complexity(item)} picks. When the chunk takes in a todo.md item whose R + C is higher, say so, naming that item and its R + C."
def routed_by(route: Route) -> str:
return f"loop-claude runs you on {route.rung}, the rung item {route.item}'s R + C of {route.risk_and_complexity} picks. When the chunk takes in another todo.md item, say so, naming that item and its R + C."
def resumed(unfinished_evidence: str) -> str: