ShtukbaseStandard
package file→ .shtukbase/packages/code-refactoring/judges/shotgun-surgery.md

judges/shotgun-surgery.md

15 lines, 867 B.

  1. # Judge: one change in one place
  2. 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.
  3. **Who judges.** The reviewer of the change: an agent or a human, not the author.
  4. **When.** On every code change, especially when it touches more than five files.
  5. **What the judge looks at.**
  6. 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.
  7. 2. The reverse case: one module changes for different, unrelated reasons, the "divergent change" smell.
  8. 3. Could this knowledge have been gathered in one place: a table, a function, a type.
  9. **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.