feat(hooks): register enforce-chain-recommendation as PreToolUse block-mode
Activates the chain-recommendation hook landed in d1d53080. Matcher covers all mutating tools (Edit/Write/MultiEdit/NotebookEdit/Bash/Task/Agent). Block-mode per owner's choice — when router gave recommended_chain length ≥2, controller MUST either invoke at least one chain node or write inline 'chain-override: <reason>' or have a global override-phrase in user prompt.
Pipe-test verified: empty event → exit 0 (no chain → pass). JSON syntax + jq schema validated.
This commit is contained in:
@@ -66,6 +66,16 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": "Edit|Write|MultiEdit|NotebookEdit|Bash|Task|Agent",
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "node tools/enforce-chain-recommendation.mjs",
|
||||
"timeout": 5
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": "Edit|Write|MultiEdit",
|
||||
"hooks": [
|
||||
|
||||
Reference in New Issue
Block a user