Answer principles round 1: 0 🔴, 5 🟡; make the routing.py and prompts.py module docstrings true and short, drop the routing_check copy of the figures, rename judge_rung's local, and keep the help's 20

This commit is contained in:
2026-10-23 03:10:31 +02:00
parent aa9a4cb78b
commit a81f878f92
6 changed files with 18 additions and 24 deletions
+8 -10
View File
@@ -1,13 +1,11 @@
"""Which ladder rung a chunk's worker and judge run on: docs/decisions.md → `routing:`.
The worker, and the session /talk opens, run on a Route (model_routing/route.py) that a model on the ladder gets as follows. A model off the ladder has no route to step: its worker runs on it.
The worker, and the session /talk opens, run on a Route (model_routing/route.py); a model off the ladder has no route to step, and its worker runs on it.
- Start. routed_item is the plan item chunk_pick.chunk_item picks from todo.md on the default branch, as the preflight just fetched it; it is none when the next release is not the earliest, or the item lacks L, E or I. first_route picks the worker's rung from its L, ladder.worker_rung; without an item, the chunk runs on the project's rung.
- Rerun. A rerun resumes an open chunk on the route its archive last names, counting its unfinished verdicts afresh. kept drops a route whose rung is off the ladder or below the one its item's L picks, and the chunk starts afresh.
- Step-up. after_unfinished and after_ruling raise the route after a verdict: by the highest L and E + I the worker took in, by every second unfinished verdict (UNFINISHED_PER_STEP), and by an escalation, up to escalation_cap.
- Judge. judge_rung runs the judge of a JUDGE_REPLAYED model on the rung the route's reviewed_on E + I picks, whatever rung the worker stepped to.
ladder.review_rungs picks the reviewers' rungs; cycle/prompts.py tells the worker which.
- Start. routed_item is the plan item that routes a fresh chunk, none without one; first_route picks the worker's rung from its L, and the project's rung stands where there is no item.
- Rerun. kept decides whether a rerun resumes the route its archive last names.
- Step-up. after_unfinished raises the route after an unfinished verdict, after_ruling after an interrupt or a quoted answer that carries an escalation; escalation_cap bounds an escalation.
- Judge. judge_rung picks the rung of the judge of a JUDGE_REPLAYED model.
"""
import dataclasses
@@ -117,7 +115,7 @@ def judge_rung(judge_model: str, route: Route) -> Rung:
A model off the ladder, or not in JUDGE_REPLAYED, gets no effort flag, so claude runs it at the effort its settings give.
"""
project = project_rung(judge_model)
if project is None or judge_model not in JUDGE_REPLAYED:
cheapest = project_rung(judge_model)
if cheapest is None or judge_model not in JUDGE_REPLAYED:
return Rung(judge_model)
return review_floor(project, route.reviewed_on())
return review_floor(cheapest, route.reviewed_on())