Answer stability round 1: 0 🔴, 1 🟡 (0 misread); the comparison leaves out a round a replay failed on

This commit is contained in:
2026-11-12 07:57:04 +01:00
parent 2db70062dc
commit 9bc6abdf91
7 changed files with 78 additions and 36 deletions
+3 -3
View File
@@ -39,7 +39,7 @@ def starts_bare(agent: str, home: pathlib.Path) -> bool:
return "omitClaudeMd: true" in frontmatter.splitlines()
def hook_reply(given: str, home: pathlib.Path) -> str | Failure:
def hook_reply(given: str, home: pathlib.Path) -> str:
"""What the SubagentStart hook prints for its input given: the context for a reviewer that starts without the instruction files, nothing for any other agent."""
try:
read = json.loads(given)
@@ -49,13 +49,13 @@ def hook_reply(given: str, home: pathlib.Path) -> str | Failure:
return ""
context = reviewer_context(home)
if isinstance(context, Failure):
return context
# Claude Code starts the subagent whatever a SubagentStart hook exits with, and shows its stderr to no headless run, so the reviewer's report is where the worker can see the failure.
context = f"You start without `~/.claude/CLAUDE.md`, and the hook that hands you three of its sections failed: {context.reason}. Open your report by saying so."
return json.dumps({"hookSpecificOutput": {"hookEventName": "SubagentStart", "additionalContext": context}})
def principles_line(worktree: str) -> str | None:
"""The line of a reviewer's header that names where the project in worktree keeps its principles and decision titles, or None where it keeps neither file."""
# The header names the file rather than quoting it, since the worker types the header into each reviewer's prompt.
what = "for the project principles and the decision titles"
if (pathlib.Path(worktree) / "AGENTS.md").is_file():
return f"Principles: read {worktree}/AGENTS.md first, {what}."