Decision tree
Run every comment through this checklist before keeping it.1
Check the name first
If the function, variable, or file name already says what the comment says, delete the comment. Rename the symbol if the name is weak.
2
Delete what-comments
Comments that describe what the next line does are usually redundant. The code is already the source of truth for what happens.
3
Keep why-comments
Keep short notes that explain a non-obvious reason: a third-party bug, a protocol constraint, a compatibility workaround, or an invariant reviewers cannot infer locally.
Bad and good examples
Trivial restatement
Bad:Narrative JSDoc
Bad:Decorative separators
Bad:Phase headers
Bad:JSDoc that earns its place
Keep JSDoc when it has machine-readable value or explains a public contract.
Delete JSDoc that summarizes an internal helper, repeats parameter names, or narrates implementation steps.
Rules involved
Run:
