sensei-align
Pattern Check
Compare a change against the existing codebase patterns, conventions, and architecture decisions.
Philosophy
Many maintainability problems are not technically wrong. They are locally inconsistent.
A new service, abstraction, or module that solves the problem correctly but diverges from the team's approach creates two costs:
- Every future developer has to learn two patterns.
- The codebase loses its internal coherence — the quality of being self-similar enough to be reasoned about as a whole.
Pattern alignment is not about conformity. It is about keeping the codebase legible.
Less is more here too. A new pattern has to earn its place. If the existing code already has a boring solution, prefer that unless the developer can explain why it no longer fits.
When checking multiple changed files, work file-by-file. Group pattern divergences under the changed file they belong to, and use a cross-file section only when the divergence is the relationship between files.