idle_poll wrote the worktree path into the prompt text but never
updated wt_ctx["path"], so the teammate's bash/read/write tools
still ran in the main repo instead of the bound worktree.
Change idle_poll to return (result, claimed_task_id) tuple, and
update wt_ctx in the caller when a worktree-bound task was claimed.
s20 already handles this correctly by passing worktree_context into
idle_poll directly.
Closes#475
Split the single protocol row into two distinct flows:
- Protocol A (yellow): shutdown, initiated by Lead via request_shutdown
- Protocol B (blue): plan approval, initiated by Teammate via submit_plan
request_plan is now shown as a plain message (grey dashed box/arrow),
not a protocol action. review_plan is added to the diagram. All three
language SVGs updated with the same layout.
Closes#373
PROMPT_SECTIONS["memory"] was defined but never referenced, and
update_context() collected enabled_tools and workspace that
assemble_system_prompt() ignored, using hardcoded strings instead.
Now assemble_system_prompt reads tools and workspace from the
context dict, and PROMPT_SECTIONS only holds the identity line.
All three README code snippets are synchronized.
Closes#471
The original phrasing "more aggressive than compact_history" was
ambiguous: the code shows reactive_compact is actually more
conservative in compression (keeps ~5 recent messages vs replacing
everything with a summary). The real difference is the trigger
mechanism — reactive_compact is an emergency response to a 413
error, not a proactive threshold-based trigger.
Clarify in all three README languages that the aggressiveness is
about the trigger, not the compression strategy.
Closes#467
The table had several inaccurate entries for the s16 column. s16
already had a WORK→IDLE→SHUTDOWN state machine, handled
shutdown_request during IDLE, and used consume_lead_inbox for
protocol routing and history injection — but the table described
s16 as having none of these.
This updates the table so the s16 column reflects what s16
actually does, verified against s16_team_protocols/code.py.
All three README languages are synchronized.
Closes#480
- Delete safe_path entirely (following PR #483 approach) — no dead code
- Update all 3 READMEs per module to reflect read_file in Gate 2
- s04: also update permission_hook snippet in READMEs
- s20: remove safe_path (already replaced with inline resolution)
Closes#482
s04_hooks: permission_hook checks path + asks user, but safe_path
still raised hard ValueError — user approval was ineffective, same
root cause as s03 (#482).
s20_comprehensive: permission_hook used safe_path directly inside
try/except, silently denying all writes outside workspace without
ever asking the user. Now uses is_relative_to check + user prompt.
Both files also add read_file to the permission coverage.
s05-s08 intentionally NOT changed: their permission_hook does not
check paths at all — safe_path is their only path-safety defense.
safe_path hard-raised on out-of-workspace paths while Gate 2 asked about the same condition, so approving an out-of-workspace write never took effect. Make the permission pipeline the sole boundary authority: drop safe_path, resolve paths directly in the file tools, and extend the Gate 2 rule to read_file. Sync all three READMEs.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>