Scope Guard
Hooks quality-gates 229
Scope guard that detects files modified outside the declared scope of a specification. When a .spec.md file contains a 'Files to Create/Modify' section, this hook compares git-modified files against the declared list. Files outside scope trigger a warning (non-blocking). Automatically excludes test files, config files, infrastructure files, and documentation. Essential for Spec-Driven Development to prevent scope creep during implementation.
npx claude-code-templates@latest --hook quality-gates/scope-guard claude-code — scope-guard
Content
JSON
{
"description": "Scope guard that detects files modified outside the declared scope of a specific..."
"supportingFiles": [
{3 keys}
]
"hooks": {
"Stop": [1 item]
}
}