Enforce code simplicity, KISS and YAGNI principles to reduce complexity
Целевые файлы
Файл
Формат
.cursorrules
plaintext
CLAUDE.md
markdown
Содержимое
Follow KISS: every function or module should do one thing and do it well.
Apply YAGNI: do not implement features until they are actually needed.
Prefer flat code over deeply nested conditionals; max nesting depth is 3.
Extract a helper only when logic is reused 3+ times, not speculatively.
Avoid premature abstraction: duplication is cheaper than the wrong abstraction.
Delete dead code immediately; do not comment it out and leave it.
Prefer small functions under 30 lines; split when a function grows beyond that.
Resist adding configuration knobs for problems that have not yet occurred.
Choose boring, well-understood solutions over clever or exotic ones.
Prefer standard library utilities over custom implementations when equivalent.
Name things clearly so comments are unnecessary for basic intent.
Remove any TODO older than one sprint; either do it or delete it.
Each file should have a single clear responsibility; split otherwise.
Avoid over-engineering: solve the problem in front of you, not imagined future ones.
Review PRs for accidental complexity: unused params, speculative generics, dead branches.