Decision tree
Run every comment through this checklist before keeping it.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.
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.
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.| Keep | Why |
|---|---|
@deprecated | Editors and type tooling can warn callers |
@see / @link | Typed references survive renames better than prose |
@example | Useful for public APIs and library exports |
@param / @returns | Useful only when the semantic meaning is not obvious from the name and type |
Rules involved
| Rule | What it flags | Fixable |
|---|---|---|
ai-slop/trivial-comment | Adjacent comments that restate code | Yes |
ai-slop/narrative-comment | Decorative banners, phase headers, JSDoc preambles without meaningful tags, and AI-narration prose | Yes |
ai-slop/meta-comment | Comments about implementation phases, generated-code process, or agent behavior | Usually |
