Answer architecture round 2: 0 🔴, 1 🟡 (0 misread); the answer destinations and the help say the plan, and the notice of releases a plan outside the checkout hides prints once per chunk

This commit is contained in:
2026-11-16 14:54:27 +01:00
parent f58250d0ce
commit a60bfdbc1c
4 changed files with 14 additions and 9 deletions
+5 -5
View File
@@ -57,8 +57,8 @@ def archived_route(archive_folder: pathlib.Path, loop: Loop) -> Route | None:
def chunk_start(loop: Loop) -> tuple[str, DefaultPlan | Failure]:
"""The facts for a fresh worker's prompt, empty where the session is open, and what the default branch holds, read once for the cycle: it routes the chunk, through plan_item, and scores the items the worker names, through scored_plan. It reads the default branch as last fetched: for a fresh chunk, by the preflight that runs first; for an open session, which runs none, by whatever fetched last."""
facts = "" if session_open(loop.session) else chunk_facts(loop)
return facts, fetched_plan(loop)
fresh = not session_open(loop.session)
return chunk_facts(loop) if fresh else "", fetched_plan(loop, fresh)
def chunk_facts(loop: Loop) -> str:
@@ -70,12 +70,12 @@ def chunk_facts(loop: Loop) -> str:
return facts + (prompts.held_by_others(held) if held else "")
def fetched_plan(loop: Loop) -> DefaultPlan | Failure:
"""What the default branch, as last fetched, holds for routing; the plan and the changelog as they stand where the project's config puts them outside the checkout. It says UNSEEN_RELEASES for such a plan."""
def fetched_plan(loop: Loop, announce: bool = True) -> DefaultPlan | Failure:
"""What the default branch, as last fetched, holds for routing; the plan and the changelog as they stand where the project's config puts them outside the checkout. Where announce is True, as when a chunk starts, it says UNSEEN_RELEASES for such a plan, so the human reads it once per chunk, not every cycle."""
config = located(loop.root, loop.paths.home)
if isinstance(config, Failure):
return config
if config.tracked("plan") is None:
if announce and config.tracked("plan") is None:
say(UNSEEN_RELEASES, loop.effects)
ref = default_ref(loop.root, ORIGIN_TIMEOUT, run=loop.effects.git)
return ref if isinstance(ref, Failure) else project_plan(config, ref, loop.root, loop.effects.git)
+2 -2
View File
@@ -14,7 +14,7 @@ end, the premises, and the records: the project's AGENTS.md and docs/decisions.m
the project's config sets, where they exist. It rules whether the chunk, the work of one PR, is
finished. A chunk stays unfinished until each answer the human typed in it that a later chunk could
need is recorded: the premises or the records hold it, or the transcript shows the worker writing it
into the premises, AGENTS.md, docs/decisions.md, todo.md or a code comment. A choice the worker made
into the premises, AGENTS.md, docs/decisions.md, the plan or a comment. A choice the worker made
that the premises or the records settle is not asked about. When the worker asks a question they
answer, the judge quotes the answer, loop-claude prints it, and the worker resumes with it. A quote
they do not hold word for word is dropped, and the question goes to the human. So does a question
@@ -104,7 +104,7 @@ each review's rung in bin/model_routing/review_choice.py, and the prompts' wordi
bin/loop_claude/cycle/prompts.py. Each verdict, interrupt, quoted answer, stop and
step-up in the archive ends with a Worker: line, the route as JSON (Route.worker_line in
bin/model_routing/route.py); a rerun resumes an open chunk on the latest route named there. A
todo.md or an archive that cannot be read or parsed is said on stderr, and the chunk is routed
plan or an archive that cannot be read or parsed is said on stderr, and the chunk is routed
without it.
The ladder is a JSON file, each rung a model's full name and an effort of low, medium, high, xhigh