Answer architecture round 2: 2 🔴, 3 🟡; route from the ladder by rung, keep a stepped-up rung across reruns and reloads, test the judge's bundled range, and file item 136 for routing on the item taken
This commit is contained in:
@@ -10,6 +10,7 @@ from claude_code.entries import hit_limit, limit_said, parse_entry, structured_o
|
||||
from loop_claude.project.records import HUMAN_RULE_NAMES
|
||||
from loop_claude.cycle.retry import Limited, retried
|
||||
from loop_claude.stop import Stop
|
||||
from todo_table import TOP_SCORE
|
||||
|
||||
# Routes the next cycle's worker; loop-claude never steps it down, so the item the chunk was routed on may count too.
|
||||
BUNDLED = "The highest R + C the agent states for a todo.md item it took into this chunk; 0 when it states none."
|
||||
@@ -61,8 +62,7 @@ class Reply:
|
||||
|
||||
REPLY_TYPES = typing.get_type_hints(Reply)
|
||||
JSON_TYPES = {bool: "boolean", int: "integer", str: "string"}
|
||||
# R and C each run from 1 to 10.
|
||||
HIGHEST_R_PLUS_C = 20
|
||||
HIGHEST_R_PLUS_C = 2 * TOP_SCORE
|
||||
JUDGE_SCHEMA = {
|
||||
"properties": {field.name: {**field.metadata, "type": JSON_TYPES[REPLY_TYPES[field.name]]} for field in dataclasses.fields(Reply)},
|
||||
"required": list(REPLY_TYPES),
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from loop_claude.project.records import HUMAN_RULE_NAMES, RECORD_FILES
|
||||
from markdown_text import quoted
|
||||
from loop_claude.loop.routing import Route
|
||||
from loop_claude.routing import Route
|
||||
|
||||
def either(names: tuple[str, ...]) -> str:
|
||||
"""The names as `a, b or c`."""
|
||||
|
||||
@@ -14,7 +14,7 @@ from loop_claude.paths import Paths
|
||||
from loop_claude.cycle import prompts
|
||||
from claude_code.transcript import read_transcript, render
|
||||
from loop_claude.cycle.retry import retried
|
||||
from loop_claude.loop.routing import Route
|
||||
from loop_claude.routing import Route
|
||||
from loop_claude.cycle.worker import run_worker, worker_args
|
||||
from loop_claude.stop import Stop
|
||||
|
||||
@@ -50,7 +50,7 @@ def run_cycle(cycle: Cycle) -> Stop | Finished | Unfinished:
|
||||
|
||||
def stopped(cycle: Cycle, stop: Stop, why: str) -> Stop:
|
||||
path = transcript_file(cycle.session)
|
||||
failure = archive(cycle.project_archive, path, cycle.task, outcomes.stopped(why), cycle.effects.now()) if path else None
|
||||
failure = archive(cycle.project_archive, path, cycle.task, outcomes.stopped(str(cycle.route), why), cycle.effects.now()) if path else None
|
||||
# A failed archive exits 1 whatever the stop; when the stop was this archive failing, its reason is said once.
|
||||
return Stop(1, f"{failure.reason}\n{stop.reason}".rstrip()) if failure and failure.reason != stop.reason else stop
|
||||
|
||||
|
||||
Reference in New Issue
Block a user