The Stop hook referenced a non-existent "internal queue" for tracking documentation drift. Each hook runs in isolation with no way to pass data between invocations, so the queue concept couldn't work. The hook was causing errors on every session end: "Stop hook error: Prompt hook condition was not met..." Changes: - Removed the Stop hook entirely - Updated PostToolUse hook to report drift immediately when found (instead of referencing non-existent queue) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
16 lines
659 B
JSON
16 lines
659 B
JSON
{
|
|
"hooks": {
|
|
"PostToolUse": [
|
|
{
|
|
"matcher": "Write|Edit|MultiEdit",
|
|
"hooks": [
|
|
{
|
|
"type": "prompt",
|
|
"prompt": "A file was just modified. Silently check if this change affects any documentation:\n\n1. If a code file changed: check if README, CLAUDE.md, docstrings, or API docs reference the modified functions/classes/configs\n2. If drift detected: briefly mention it to the user (e.g., 'Note: This change may require updating X documentation')\n3. Do NOT block the workflow - just inform\n\nDo NOT announce this check unless drift is found. Work silently."
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|