diff options
| author | Craig Jennings <c@cjennings.net> | 2026-07-19 21:04:43 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-07-19 21:04:43 -0500 |
| commit | 94e54f69453dea0feda4722347ba3c60c9822c2b (patch) | |
| tree | 33ecdef82afc8819dd8ef1dc1b587de046719550 /languages/go/claude/scripts | |
| parent | 33c6d7b8f497ba103d3a949e7f3cadc3d2e100ae (diff) | |
| download | rulesets-94e54f69453dea0feda4722347ba3c60c9822c2b.tar.gz rulesets-94e54f69453dea0feda4722347ba3c60c9822c2b.zip | |
feat(hooks): soft-nudge pending inbox handoffs at task boundaries
The "check inbox/ at every task boundary" rule was prose-only in protocols.org, so it held only as well as the agent remembered it and a handoff could pass a turn unseen. inbox-boundary-check.sh is a Stop hook that backs the rule: when inbox-status -q reports pending items it blocks the yield once and injects the count, so the agent processes them before returning.
It soft-nudges rather than hard-blocks. On the harness re-entry (stop_hook_active: true) the hook steps aside and lets the turn end, so a mid-task pause to ask a question, or an item the agent genuinely can't process, never wedges the session. A hard block would instead push inbox processing ahead of that clarifying question.
The hook self-skips where it doesn't apply: no inbox/ dir, no inbox-status, or a clean inbox each exit 0 silently, so one global hook covers every project with no config. It prefers the project-local .ai/scripts/inbox-status and falls back to one on PATH. It's wired into the Stop array ahead of ai-wrap-teardown in both the tracked settings.json (which the live ~/.claude/settings.json symlinks to) and the documented snippet. bats covers pending, clean, the re-entry step-aside, no-inbox, and the absent-status degrade.
Diffstat (limited to 'languages/go/claude/scripts')
0 files changed, 0 insertions, 0 deletions
