Files
viettranx 95bdb23a36 docs(hooks): user guide + example configs + changelog + Make targets
- docs/agent-hooks.md: handler reference, lifecycle events, security model
- examples/hooks/: 5 runnable JSON configs (audit, lint, block-rm-rf,
  Discord notify, context injector)
- docs/17-changelog.md: Wave 0 entry
- Makefile: hooks-specific test targets
- CLAUDE.md: cross-reference
2026-04-16 14:17:47 +07:00

20 lines
452 B
JSON

{
"event": "pre_tool_use",
"handler_type": "command",
"scope": "agent",
"matcher": "^(exec|shell)$",
"if_expr": "",
"config": {
"command": "grep -qE 'rm +-[rR][fF]? +/' && exit 2 || exit 0"
},
"timeout_ms": 2000,
"on_timeout": "block",
"priority": 100,
"enabled": true,
"source": "api",
"metadata": {
"notes": "Blocks `rm -rf /` style commands before exec. Lite edition only.",
"tags": ["safety", "command"]
}
}