package file→ .shtukbase/packages/code-refactoring/judges/shotgun-surgery.md
judges/shotgun-surgery.md
15 lines, 867 B.
- # Judge: one change in one place
- Norm RF-R07. One change of meaning does not require small edits in many files; if it does, the shared knowledge is gathered in one place.
- **Who judges.** The reviewer of the change: an agent or a human, not the author.
- **When.** On every code change, especially when it touches more than five files.
- **What the judge looks at.**
- 1. How many files the change edits for one idea. The same small edit in many places (a new field, a new kind, a new name) is the "shotgun surgery" smell.
- 2. The reverse case: one module changes for different, unrelated reasons, the "divergent change" smell.
- 3. Could this knowledge have been gathered in one place: a table, a function, a type.
- **Result.** "holds" or "violated: <files, what to gather in one place>". A proposal for the rework goes in a separate task if the change is already large.