feat(contract-validator): add breaking change detection hook (#230)
Implements PostToolUse hook to warn about breaking interface changes: - Detects changes to plugin.json, hooks.json, .mcp.json, agents/*.md - Compares with git HEAD to find removed/changed elements - Warns on: removed hooks, changed matchers, removed MCP servers - Warns on: plugin name changes, major version bumps - Non-blocking, configurable via CONTRACT_VALIDATOR_BREAKING_WARN Depends on #229 (SessionStart auto-validate infrastructure). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
21
plugins/contract-validator/hooks/hooks.json
Normal file
21
plugins/contract-validator/hooks/hooks.json
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"hooks": {
|
||||
"SessionStart": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/auto-validate.sh"
|
||||
}
|
||||
],
|
||||
"PostToolUse": [
|
||||
{
|
||||
"matcher": "Edit|Write",
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/breaking-change-check.sh"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user