Skip to content

Latest commit

 

History

History
38 lines (31 loc) · 1.91 KB

File metadata and controls

38 lines (31 loc) · 1.91 KB

Coding conventions

1. Comments describe intent, not code

A comment explains WHY the code does something — a decision, a constraint, a non-obvious tradeoff. It never restates WHAT the next line already says in code.

2. Comments describe the current state, not its history

Outside CHANGELOG.md, code comments never narrate evolution: no "changed from X to Y", "previously did Z", "used to be", "old behavior was", "no longer needed but kept for compatibility" phrased as history. A past decision that matters belongs in CHANGELOG.md or a commit message — not in a comment describing what the code does today.

Project rules