Distinct from lint-typecheck-fix (mechanical linter rules) and de-sloppify-pass (removing junk): this aligns new code to the unwritten idioms of THIS codebase — error-handling shape, naming, file layout, how the data-access seam is called, test structure. Each pass diffs the new code against three sibling files that do the same kind of work and fixes one divergence; when two existing patterns conflict it picks the more recent or better-tested one, conforms, and flags the loser instead of blending them. Exits when a reviewer couldn't tell which file is new.
Loop
- Goal
- new code is idiomatically indistinguishable from the codebase's existing equivalents — naming, error handling, file layout, and seam usage all match the dominant sibling pattern
- Exit when
- each changed file matches the dominant pattern of its sibling files and no remaining divergence is taste-only rather than convention-driven
Check between iterations