Back to Hooks

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.

Install Command
npx claude-code-templates@latest --hook quality-gates/scope-guard
View on GitHub
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]
}
}

Stack Builder

0 components

Your stack is empty

Browse components and click the + button to add them to your stack for easy installation.