Score risk as L + E + I, and route a worker on its item's L and its reviewers on its E + I

This commit is contained in:
2026-10-16 07:53:48 +02:00
parent d1b0fe3a44
commit 152972d84b
34 changed files with 699 additions and 514 deletions
+3 -6
View File
@@ -3,14 +3,11 @@ import pathlib
import sys
from failure import Failure
from model_routing.ladder import LADDER, picked, position, project_rung, Rung
from model_routing.ladder import LADDER, position, project_rung, Rung, worker_rung
from claude_code.reply import Limited
from loop_claude.project.model_choice import read_models_file
from loop_claude.stop import Stop
LOWEST_R_PLUS_C = 2
def project_rung_or_exit(tool: str, argv: list[str], help_text: str) -> Rung | int:
"""The project's rung of the model argv names, or the exit code: 0 after printing help_text for -h or --help, 1 after saying why argv cannot be read."""
if argv[:1] in (["-h"], ["--help"]):
@@ -31,8 +28,8 @@ def projects_on(model: str, home: pathlib.Path) -> list[str] | Failure:
def down_from(top: Rung) -> list[Rung]:
"""top and each rung below it, down to the rung the lowest R + C picks from top, highest first."""
return list(LADDER[position(picked(top, LOWEST_R_PLUS_C)):position(top) + 1])[::-1]
"""top and each rung below it, down to the rung the lowest L picks for a worker from top, highest first."""
return list(LADDER[position(worker_rung(top, 1)):position(top) + 1])[::-1]
def limited_exit(tool: str, limited: Limited) -> int: