Answer product-owner round 1: 0 🔴, 2 🟡 (0 misread); each cycle on a project's own ladder says so and says where the worker's model is off it, and the errors name a model's full name and the ladder's file

This commit is contained in:
2026-11-15 19:42:49 +01:00
parent 2ecec90ec5
commit a62992d877
7 changed files with 60 additions and 27 deletions
+6 -5
View File
@@ -7,8 +7,8 @@ a defect, a level from 1 to 4 scored as for a todo.md item. It prints the rung t
the model's cheapest rung, the project's rung, in the Agent tool's words, such as `model sonnet,
effort high`. --plan, for a task that files or scores todo.md items, prints the project's rung where
that L picks a lower one, as ~/.claude/rules/todo-items.md lets only the project's rung or above
plan. For a model off the routing ladder, the tool doesn't print anything on stdout, says so on stderr and
exits 0; launch the subagent with no model or effort.
plan. For a model off the routing ladder, the tool doesn't print anything on stdout, says so on stderr,
naming the ladder's file, and exits 0; launch the subagent with no model or effort.
It reads the routing ladder of the project whose checkout it runs in: routing-ladder.json in the
folder of the project's config, ~/.claude-projects/<key>/, or else the one this setup ships, as in
@@ -24,7 +24,7 @@ import sys
from failure import Failure
from model_routing.ladder import Ladder
from release_plan.todo_table import LEVELS
from model_routing.ladder_file import project_ladder
from model_routing.ladder_file import project_ladder_file, read_ladder
USAGE = f"usage: subagent-rung [--plan] <model> <L>, L a level from 1 to {LEVELS['L']}"
@@ -47,13 +47,14 @@ def main(argv: list[str], home: pathlib.Path) -> int:
print(f"subagent-rung: cannot read the arguments{' ' + ' '.join(argv) if argv else ''}; {USAGE}", file=sys.stderr)
return 1
model, likelihood = operands
ladder = project_ladder(None, home)
file = project_ladder_file(None, home)
ladder = file if isinstance(file, Failure) else read_ladder(file)
if isinstance(ladder, Failure):
print(f"subagent-rung: {ladder.reason}", file=sys.stderr)
return 1
args = agent_args(ladder, model, int(likelihood), planning)
if args is None:
print(f"subagent-rung: {model} is not on the routing ladder; pass the Agent tool no model or effort", file=sys.stderr)
print(f"subagent-rung: {model} is not on the routing ladder {file}; pass the Agent tool no model or effort", file=sys.stderr)
else:
print(args)
return 0