Have each reviewer write its full report to a file and return the worker only its findings' one-line summaries

This commit is contained in:
2026-10-18 00:11:08 +02:00
parent fdd48bb1cd
commit 9207566328
19 changed files with 111 additions and 30 deletions
+4 -1
View File
@@ -11,6 +11,8 @@ class Call:
tool: str
given: dict[str, typing.Any]
cwd: str
# The subagent the call comes from, such as prose-reviewer; empty for the session's own agent.
agent: str = ""
def parsed_call(hook_input: object) -> Call | Failure:
@@ -19,7 +21,8 @@ def parsed_call(hook_input: object) -> Call | Failure:
tool, given, cwd = hook_input.get("tool_name"), hook_input.get("tool_input"), hook_input.get("cwd")
if not isinstance(tool, str) or not isinstance(given, dict) or not isinstance(cwd, str):
return Failure("the hook input has no string tool_name and cwd and object tool_input")
return Call(tool, given, cwd)
agent = hook_input.get("agent_type")
return Call(tool, given, cwd, agent if isinstance(agent, str) else "")
def text(given: dict[str, typing.Any], key: str) -> str: