| name | scope-discipline |
| description | Use when implementing any change in existing code — when tempted to fix nearby code, add unrequested validation or options, fix something "arguably in scope", or when the diff is growing past what was asked. |
Scope Discipline
Build exactly what was asked: deep enough to fix the cause, narrow enough to touch
nothing else. Unrequested improvements are unreviewed risk inside someone else's
diff. The injected form is the card at
hooks/cards/scope-discipline.md.
The rules
- The ask's words define the file set. List the files before editing; edit only
those.
git diff --name-only beyond the set → stop and shrink.
- Adjacency is not scope. "Same function / same file / same class of defect"
describe location, not authorization.
- The argument test. Constructing a case for why an extra change is "arguably
part of the fix" proves it is its own task. Put the argument in the report.
- The open-question test. An extra fix with an unresolved design choice (raise
or clamp? rename to what?) is its own task by definition.
- Root cause, within scope — not a symptom patch; not a rewrite. No drive-by
renames, reformatting, refactors, or dependency bumps the change doesn't require.
- Discoveries go in the report. One line each — never silently fixed, never
silently dropped.
Rationalizations
| Thought | Reality |
|---|
| "It's the same class of defect" | Classification is taxonomy, not authorization. |
| "Every one of these improvements is uncontroversial" | Asked-for is the bar. Improvements travel in their own reviewable diff. |
Done when
The diff's file list matches the ask; every extra finding is a report line.