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:
@@ -15,9 +15,10 @@ Exit 1, saying why, on bad arguments.
|
||||
import re
|
||||
import sys
|
||||
|
||||
from model_routing.ladder import floored, project_rung, worker_rung
|
||||
from todo_table import LEVELS
|
||||
from model_routing.ladder import planning_rung, project_rung, worker_rung
|
||||
|
||||
USAGE = "usage: subagent-rung [--plan] <model> <L>, L a level from 1 to 4"
|
||||
USAGE = f"usage: subagent-rung [--plan] <model> <L>, L a level from 1 to {LEVELS['L']}"
|
||||
|
||||
|
||||
def agent_args(model: str, likelihood: int, planning: bool = False) -> str | None:
|
||||
@@ -25,7 +26,7 @@ def agent_args(model: str, likelihood: int, planning: bool = False) -> str | Non
|
||||
anchor = project_rung(model)
|
||||
if anchor is None:
|
||||
return None
|
||||
return (floored if planning else worker_rung)(anchor, likelihood).agent_args()
|
||||
return (planning_rung if planning else worker_rung)(anchor, likelihood).agent_args()
|
||||
|
||||
|
||||
def main(argv: list[str]) -> int:
|
||||
@@ -34,7 +35,7 @@ def main(argv: list[str]) -> int:
|
||||
return 0
|
||||
planning = argv[:1] == ["--plan"]
|
||||
operands = argv[1:] if planning else argv
|
||||
if len(operands) != 2 or not re.fullmatch(r"[1-4]", operands[1]):
|
||||
if len(operands) != 2 or not re.fullmatch(r"[1-9][0-9]*", operands[1]) or int(operands[1]) > LEVELS["L"]:
|
||||
print(f"subagent-rung: cannot read the arguments{' ' + ' '.join(argv) if argv else ''}; {USAGE}", file=sys.stderr)
|
||||
return 1
|
||||
model, likelihood = operands
|
||||
|
||||
Reference in New Issue
Block a user