Bug Fixes
-
hooks: Use
hookSpecificOutput.additionalContextinstead of invalidmessagefield (#205)All hook scripts were using a
messagefield in their JSON output which is not part of the Claude Code hooks API. This caused hook messages to be silently dropped — keyword detection, skill injection, session restore, pre-tool reminders, and post-tool verification were all non-functional.Fixed 5 scripts to use the documented format:
keyword-detector.mjs(UserPromptSubmit) - 16 instances fixedskill-injector.mjs(UserPromptSubmit) - 1 instance fixedsession-start.mjs(SessionStart) - 1 instance fixedpre-tool-enforcer.mjs(PreToolUse) - 1 instance fixedpost-tool-verifier.mjs(PostToolUse) - 2 instances fixed
Documentation
- Added RULE 5 (Documentation-First Development) to CLAUDE.md
- Requires consulting official documentation before implementing with SDKs/frameworks/APIs
- Prevents future assumptions about undocumented API behavior
Upgrade
After upgrading, restart Claude Code for the hook changes to take effect (hooks are snapshotted at startup).