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
+4 -3
View File
@@ -11,6 +11,8 @@ from loop_claude.project.records import HUMAN_RULE_NAMES
from loop_claude.cycle.retry import Limited, retried
from loop_claude.stop import Stop
# Routes the next cycle's worker; loop-claude never steps it down, so the item the chunk was routed on may count too.
BUNDLED = "The highest R + C the agent states for a todo.md item it took into this chunk; 0 when it states none."
# At 3 to 4 characters a token, 100,000 to 133,000 tokens, which leaves a 200,000-token context room for the reply; the largest session rendered here was 364,000 characters on 2026-10-03.
JUDGE_PROMPT_CHARS = 400000
JUDGE_RULES = (
@@ -43,15 +45,14 @@ JUDGE_RULES = (
f"the transcript shows the agent writing it into {ANSWER_DESTINATIONS}; writing it into "
f"{either(HUMAN_RULE_NAMES)} does not count. finished=false when work remains that a further run can "
"continue: an open PR, a review not yet run, CI not yet reported, an answer not yet recorded.\n"
"bundled is the highest R + C the agent says a todo.md item it took into this chunk scores, where that is "
"higher than the R + C loop-claude's first prompt says it routed the chunk on; 0 otherwise."
f"bundled: {BUNDLED}"
)
@dataclasses.dataclass(frozen=True)
class Reply:
answer: str = dataclasses.field(metadata={"description": "With interrupt false, the passage of README.md or the records that answers the agent's question, quoted verbatim, without elisions. Empty otherwise."})
bundled: int = dataclasses.field(metadata={"description": "The highest R + C the agent says a todo.md item it took into this chunk scores, where that is higher than the R + C loop-claude's first prompt says it routed the chunk on. 0 otherwise."})
bundled: int = dataclasses.field(metadata={"description": BUNDLED})
evidence: str = dataclasses.field(metadata={"description": "A verbatim quote of the one transcript passage the verdict rests on, without elisions: what triggers the interrupt; for a quoted answer, the agent's question; else what shows the chunk finished or the work remaining."})
finished: bool = dataclasses.field(metadata={"description": "Whether the chunk is finished."})
interrupt: bool = dataclasses.field(metadata={"description": "Whether the human must now be interrupted."})