-
Notifications
You must be signed in to change notification settings - Fork 0
improvement: document hook exit code 2 vs 1 semantics #455
Copy link
Copy link
Open
Labels
P2High / next-up, important but not blockingHigh / next-up, important but not blockingdocumentationImprovements or additions to documentationImprovements or additions to documentationroadmap:automation-hardeningv0.7 automation contract — registry, verify tiers, agent checks, Zod runtime validationv0.7 automation contract — registry, verify tiers, agent checks, Zod runtime validationtrack:specorator-improvementImprovement to the Specorator template itselfImprovement to the Specorator template itself
Metadata
Metadata
Assignees
Labels
P2High / next-up, important but not blockingHigh / next-up, important but not blockingdocumentationImprovements or additions to documentationImprovements or additions to documentationroadmap:automation-hardeningv0.7 automation contract — registry, verify tiers, agent checks, Zod runtime validationv0.7 automation contract — registry, verify tiers, agent checks, Zod runtime validationtrack:specorator-improvementImprovement to the Specorator template itselfImprovement to the Specorator template itself
Context
Part of the plugin audit in #444 (§3, §8 Quick Wins). The Claude Code hook system inverts the standard Unix exit-code convention in a way that is not obvious and has caused production bugs:
Hook scripts that
exit 1on invalid input are silently passing through. This is a common source of branch guard failures.Work
docs/hooks.md(or updatedocs/branching.md/ relevant doc) with:0= success,1= non-blocking error,2= blocking vetoasyncRewake: trueexplained — runs hook in background but allows a delayed blocking vetoonce: trueexplained — runs exactly once per session then removes itselfCLAUDE.mdor the branch guard hook comment referencing this docDefinition of Done
docs/hooks.md(or updated equivalent) documents the exit-code inversion prominentlyexit 2requirementReferences