Answer architecture round 1: 0 🔴, 8 🟡; read old routes' rungs, write R in rank_todo, route reviews through review_rungs, file item 168

This commit is contained in:
2026-10-16 12:11:25 +02:00
parent 149108e8d8
commit 12909f233d
20 changed files with 141 additions and 94 deletions
+14 -13
View File
@@ -70,19 +70,19 @@ def project_rung(model: str) -> Rung | None:
return next((rung for rung in LADDER if rung.model == model), None)
def worker_rung(anchor: Rung, likelihood: int) -> Rung:
"""The rung a task's L picks for its worker from anchor, the project's rung, stopping at either end of the ladder."""
return climbed(anchor, WORKER_STEPS[likelihood])
def worker_rung(project: Rung, likelihood: int) -> Rung:
"""The rung a task's L picks for its worker, counted from the project's rung, stopping at either end of the ladder."""
return climbed(project, WORKER_STEPS[likelihood])
def floored(anchor: Rung, likelihood: int) -> Rung:
"""The rung a task's L picks from anchor, the project's rung, never below anchor."""
return highest(anchor, worker_rung(anchor, likelihood))
def planning_rung(project: Rung, likelihood: int) -> Rung:
"""The rung of a task that files or scores todo.md items: the one its L picks, never below the project's rung."""
return highest(project, worker_rung(project, likelihood))
def review_floor(anchor: Rung, escape_and_impact: int) -> Rung:
"""The rung a task's E + I picks for a review from anchor, the project's rung, never below anchor. An E + I of 0, for no task, picks anchor."""
return climbed(anchor, REVIEW_STEPS.get(escape_and_impact, 0))
def review_floor(project: Rung, escape_and_impact: int) -> Rung:
"""The rung a task's E + I picks for a review, counted up from the project's rung. An E + I of 0, for no task, picks the project's rung."""
return climbed(project, REVIEW_STEPS.get(escape_and_impact, 0))
def stepped_up(rung: Rung) -> Rung:
@@ -90,13 +90,14 @@ def stepped_up(rung: Rung) -> Rung:
return climbed(rung, 1)
def reviewers_rung(project: Rung, worker: Rung, escape_and_impact: int) -> Rung:
"""The rung a chunk's reviewers run on: the higher of the worker's rung and the one its item's E + I picks, which is never below the project's."""
return highest(worker, review_floor(project, escape_and_impact))
def review_rungs(project: Rung, worker: Rung, escape_and_impact: int) -> dict[ReviewKind, Rung]:
"""The rung each kind of review in a chunk runs on, where its worker runs on worker and its item has that E + I. The reviewers run on the higher of the worker's rung and review_floor's."""
reviewers = highest(worker, review_floor(project, escape_and_impact))
return {kind: review_rung(kind, project, reviewers) for kind in typing.get_args(ReviewKind)}
def review_rung(kind: ReviewKind, project: Rung, reviewers: Rung) -> Rung:
"""The rung a review runs on: a reviewer on reviewers, which reviewers_rung picks; a seat or the security pass on the project's."""
"""The rung a review of kind runs on: a reviewer on the reviewers' rung; a seat or the security pass on the project's, so the seats score every chunk on one rung, and the security pass spends no more than the project chose."""
return reviewers if kind == "reviewer" else project