Armory
Source
Browse
Hooks

scope-guard

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.

Score
Unranked
Evidence
No signals yet
Last commit
Not known
Listed

Install

armory install scope-guard --cli claude

writes the file to.claude/hooks/scope-guardListed as compatible

Configuration
# fetches the hook script into:
.claude/hooks/scope-guard
# then register it in your settings.json "hooks" block.

↳ Add the hook entry to settings.json, then restart the harness.

Needs the armory CLI · not on npm yet, build it from cli/ in the repository

What it is

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.

When to use it

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.

How to install / invoke

# Wire this hook script into .claude/settings.json
curl -sL https://raw.githubusercontent.com/davila7/claude-code-templates/main/cli-tool/components/hooks/quality-gates/scope-guard.json -o .claude/hooks/scope-guard.json

Notes

Extracted from davila7/claude-code-templates, quality-gates category.