Rule 31 of 38 · Chapter V — Complexity Has a Cost
Consistency beats cleverness
Why this rule exists
A codebase is read far more than it's written, and consistency is what lets a reader predict where things live and how they behave. A clever, one-off solution forces everyone who meets it to stop and decode it, and it quietly licenses the next person to be clever too. Uniform, slightly-less-optimal code is usually cheaper for the team than a patchwork of local brilliance.
In practice
Follow the conventions already in the file, even when you'd have chosen differently on a blank page. Let a formatter and linter settle style so nobody argues about it. When you genuinely need to break the pattern, make the exception obvious and explain why in a comment. If you want to change a convention, change it everywhere, not just where you happen to be working.
When it doesn't apply
Consistency shouldn't preserve a genuinely bad pattern forever. When the established way is causing real harm, make the case and migrate deliberately. And never stay consistent with a security flaw or a known bug just for uniformity's sake.