Answer prose round 1: 0 🔴, 14 🟡; keep each routing reason in one entry, retitle the stability reviewer's decision, and say what each help line and comment means

This commit is contained in:
2026-10-16 18:08:38 +02:00
parent 81bd8e6705
commit be855a7a03
19 changed files with 58 additions and 54 deletions
+1 -1
View File
@@ -61,7 +61,7 @@ LADDER = (
)
# The rungs a task's L steps its worker from the project's rung.
WORKER_STEPS = {1: -2, 2: -1, 3: 0, 4: 1}
# The rungs a task's E + I steps a review up from the project's rung; one under 5 steps none.
# The rungs a task's E + I steps a review up from the project's rung; an E + I under 5 steps none.
REVIEW_STEPS = {5: 1, 6: 2, 7: 3, 8: 4}
+3 -3
View File
@@ -8,7 +8,7 @@ from model_routing.ladder import Rung
# How a worker opens the prompt of a subagent it escalates a task to, `Escalation trigger 2: …`: docs/decisions.md → `routing: a worker hands a task one rung up`.
ESCALATION_MARKER = "Escalation trigger"
# An archived worker line: the rung, then the item and the levels that routed it, if any. resume reads only LEVELS_ROUTED's levels, so a line an older loop-claude wrote, naming an R + C, routes its chunk afresh; the figures still read its rung.
# An archived worker line: the rung, then the item and the levels that routed it, if any. route_from reads only LEVELS_ROUTED's levels, so a line an older loop-claude wrote, naming an R + C, routes its chunk afresh; archived_worker still reads its rung for the routing figures.
ROUTED = re.compile(r"(?P<rung>.+?)(?:, routed by item (?P<item>[0-9]+)'s (?P<levels>.+))?")
LEVELS_ROUTED = re.compile(r"L of (?P<likelihood>[0-9]+) and E \+ I of (?P<escape_and_impact>[0-9]+)")
@@ -32,7 +32,7 @@ def levels_fit(item: int, likelihood: int, escape_and_impact: int) -> bool:
@dataclasses.dataclass(frozen=True)
class Route:
"""A chunk's worker rung, and the plan item that picked it, 0 for none, with its L, which picked the worker's rung, and its E + I, which picks its reviewers'. A route holds only levels that levels_fit, so no rung is picked from a level off its scale.
"""A chunk's worker rung and the plan item that picked it, 0 for none. The item's L picked the worker's rung; its E + I picks the reviewers'. A route holds only levels that levels_fit, so no rung is picked from a level off its scale.
unfinished counts the unfinished verdicts towards the next one-rung step; a reload hands it over with the rung.
"""
@@ -45,7 +45,7 @@ class Route:
unfinished: int = 0
def __post_init__(self) -> None:
# A guard against a programming error, which nothing catches: route_from and the reload decoder check fits before they build a route.
# Raises on a programming error only, so nothing catches it: route_from and the reload decoder check levels_fit before they build a route.
if not levels_fit(self.item, self.likelihood, self.escape_and_impact):
raise ValueError(f"a route by item {self.item} cannot hold an L of {self.likelihood} and an E + I of {self.escape_and_impact}")