fix(docs): clarify Stop event matcher is optional, not disallowed

Validator (scripts/ci/validate-hooks.js line 182-184) only errors when
matcher is missing for non-EVENTS_WITHOUT_MATCHER events. For Stop (in
EVENTS_WITHOUT_MATCHER), matcher is optional — presence is allowed and
validated for type correctness, absence is also accepted.
This commit is contained in:
Hawthorn 2026-06-10 18:21:12 +05:30
parent 08f66b4909
commit f65ab491be

View File

@ -20,7 +20,7 @@ Add this hook to `hooks/hooks.json` to remind the agent to self-evaluate at the
}
```
`Stop` events do not use a `matcher` field. Keep the hook object limited to `hooks` and metadata such as `description`.
`Stop` events do not require a `matcher` field (it is optional for `Stop`, `Notification`, `UserPromptSubmit`, and `SubagentStop` per `scripts/ci/validate-hooks.js`). If omitted, the hook object only needs `hooks` and metadata such as `description`.
## Integration with the Python Evaluator