Source comments explain what the DELIVERED code does, in the present tense — never the change history: no issue/PR numbers, no maintainer @handles, no "the previous code did X", no "confirmed by", no "aligned per". Change-narrative in source is a top AI tell, and it rots in the codebase; that context belongs in the PR body and commit message. Grep the diff's added comment lines before every push. Use before committing any code change to a repo you don't own. Trigger terms: code comment, "// previously", issue number in comment, @handle in source, over-explaining, AI smell, delivered documentation.
A source comment is read by someone opening the file cold in a year — not by
someone following your PR. So it must describe what the code does and why, in the
present tense, as if it were always this way. The moment a comment references the
change that produced it — an issue number, a PR number, a maintainer's @handle,
"the previous code did X", "close-enough mistake", "aligned per #NNNN" — it stops
being documentation and becomes change-narrative that belongs in the PR and commit,
where it is contextual and doesn't rot. Maintainers across projects call this out
as a top AI tell; it's a cheap, high-frequency source of "this reads like slop".
Exception: a test that guards a specific regression MAY cite the issue number in
a comment — that links the test to what it protects, and projects do this. Even
there, keep it to the ticket ref, not a change-narrative or an @handle.
When to use
Before committing any code change to a repo you don't own.
Any time you write a comment that only makes sense to someone reading the PR.
When NOT to use
Docstrings/comments that explain behavior — even long ones — are fine; this only bans change-narrative (issue#, @handle, "previously"), not thorough documentation.
The practice (checklist)
Write comments in the present tense, describing behavior and the reason
for it — as if the code were always this way.
Keep OUT of source: issue numbers, PR numbers, maintainer @handles,
"confirmed by X", "the previous code did Y", "aligned per", "close-enough".
Before pushing, grep the diff's added (+) comment lines for #[0-9],
@[a-z], "previously", "used to", "was a mistake", "aligned", "confirmed by".
Done when the grep has been run over the real diff and returns nothing, or
every hit is a regression test's ticket ref (the one exception below).
Move any change-context you find to the PR description / commit message.
Test-only exception: a regression test may cite its ticket ref, nothing more.
Treat the pre-push comment grep as mandatory, not a "remember to" — this is a
pattern people regress on across projects even after learning it.
Rationalizations
Shortcut
Why it fails
"One // see #NNNN is harmless."
It's the #1 AI tell; a reviewer greps the diff and the whole PR reads as slop.
"This context is useful — the reader should know what changed."
The reader opens the file cold in a year; change-context rots. It belongs in the PR body and commit, where it stays contextual.
"It's a test, so an issue ref is fine everywhere."
Only a regression test may cite its ticket ref — and only the ref, never an @handle or a change-narrative.
"this wording here is indicative of a bug fix in the process of development but
isn't useful in the delivered documentation. Of course 'not just the first'. AI
loves to do this."
Cross-project confirmation (journal) — a universal OSS norm, not one reviewer's
taste:
Solr — AGENTS.md §52: "changes shouldn't have code comments communicating the
change."
Jetty — a maintainer's first review comment on PR #15435: "Please remove this
comment as the git history should be all the context needed."
OpenSearch — #17140: an advance() comment shipped with "aligned per #17140…
confirmed by @[maintainer]"; it was the only issue#/@handle comment in the whole file
(zero precedent), rewritten to terse present-tense behavior.
Lifecycle
Signals it worked: no reviewer flags a comment as change-narrative or "AI
loves to do this"; comments still make sense read cold, out of PR context.
What to log on a misfire: the exact comment text a maintainer flagged and the
file — recurring offenders (issue#, @handle, "previously") sharpen the grep list.
Record it in LEDGER.md.
Death criterion: none foreseeable; it's a stable cross-project norm.
Relates to: sibling to verify-before-a-committer-comment (both are "don't put
unverified/irrelevant narrative in front of a maintainer"). This one governs source
comments specifically, not the PR text.
1---2name: comments-about-code-not-change3description: Source comments explain what the DELIVERED code does, in the present tense — never the change history: no issue/PR numbers, no maintainer @handles, no "the previous code did X", no "confirmed by", no "aligned per". Change-narrative in source is a top AI tell, and it rots in the codebase; that context belongs in the PR body and commit message. Grep the diff's added comment lines before every push. Use before committing any code change to a repo you don't own. Trigger terms: code comment, "// previously", issue number in comment, @handle in source, over-explaining, AI smell, delivered documentation.4---56# Comments about the code, not the change78## Purpose910A source comment is read by someone opening the file cold in a year — not by11someone following your PR. So it must describe what the code *does and why*, in the12present tense, as if it were always this way. The moment a comment references the13change that produced it — an issue number, a PR number, a maintainer's @handle,14"the previous code did X", "close-enough mistake", "aligned per #NNNN" — it stops15being documentation and becomes change-narrative that belongs in the PR and commit,16where it is contextual and doesn't rot. Maintainers across projects call this out17as a top AI tell; it's a cheap, high-frequency source of "this reads like slop".1819Exception: a **test** that guards a specific regression MAY cite the issue number in20a comment — that links the test to what it protects, and projects do this. Even21there, keep it to the ticket ref, not a change-narrative or an @handle.2223## When to use2425- Before committing any code change to a repo you don't own.26- Any time you write a comment that only makes sense to someone reading the PR.2728## When NOT to use2930Docstrings/comments that explain *behavior* — even long ones — are fine; this only bans change-narrative (issue#, @handle, "previously"), not thorough documentation.3132## The practice (checklist)3334- [ ] Write comments in the **present tense**, describing behavior and the reason35 for it — as if the code were always this way.36- [ ] Keep OUT of source: issue numbers, PR numbers, maintainer @handles,37 "confirmed by X", "the previous code did Y", "aligned per", "close-enough".38- [ ] Before pushing, **grep the diff's added (`+`) comment lines** for `#[0-9]`,39 `@[a-z]`, "previously", "used to", "was a mistake", "aligned", "confirmed by".40 *Done when* the grep has been run over the real diff and returns nothing, or41 every hit is a regression test's ticket ref (the one exception below).42- [ ] Move any change-context you find to the PR description / commit message.43- [ ] Test-only exception: a regression test may cite its ticket ref, nothing more.4445Treat the pre-push comment grep as **mandatory**, not a "remember to" — this is a46pattern people regress on across projects even after learning it.4748## Rationalizations4950| Shortcut | Why it fails |51|---|---|52| "One `// see #NNNN` is harmless." | It's the #1 AI tell; a reviewer greps the diff and the whole PR reads as slop. |53| "This context is useful — the reader should know what changed." | The reader opens the file cold in a year; change-context rots. It belongs in the PR body and commit, where it stays contextual. |54| "It's a test, so an issue ref is fine everywhere." | Only a regression test may cite its ticket ref — and only the ref, never an @handle or a change-narrative. |5556## RECEIPT5758**A Solr committer, apache/solr PR #4632** (`corpus-solr-prs/pr-solr-4632.json`, review59comment) — verbatim:6061> "this wording here is indicative of a bug fix in the process of development but62> isn't useful in the delivered documentation. Of course 'not just the first'. AI63> loves to do this."6465**Cross-project confirmation (journal) — a universal OSS norm, not one reviewer's66taste:**67- **Solr** — AGENTS.md §52: "changes shouldn't have code comments communicating the68 change."69- **Jetty** — a maintainer's first review comment on PR #15435: "Please remove this70 comment as the git history should be all the context needed."71- **OpenSearch** — #17140: an `advance()` comment shipped with "aligned per #17140…72 confirmed by @[maintainer]"; it was the only issue#/@handle comment in the whole file73 (zero precedent), rewritten to terse present-tense behavior.7475## Lifecycle7677- **Signals it worked:** no reviewer flags a comment as change-narrative or "AI78 loves to do this"; comments still make sense read cold, out of PR context.79- **What to log on a misfire:** the exact comment text a maintainer flagged and the80 file — recurring offenders (issue#, @handle, "previously") sharpen the grep list.81 Record it in [`LEDGER.md`](../../LEDGER.md).82- **Death criterion:** none foreseeable; it's a stable cross-project norm.83- **Relates to:** sibling to verify-before-a-committer-comment (both are "don't put84 unverified/irrelevant narrative in front of a maintainer"). This one governs source85 comments specifically, not the PR text.
Run npx skillmds@latest add serhiy-bzhezytskyy/comments-about-code-not-change in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Source comments explain what the DELIVERED code does, in the present tense — never the change history: no issue/PR numbers, no maintainer @handles, no "the previous code did X", no "confirmed by", no "aligned per". Change-narrative in source is a top AI tell, and it rots in the codebase; that context belongs in the PR body and commit message. Grep the diff's added comment lines before every push. Use before committing any code change to a repo you don't own. Trigger terms: code comment, "// previously", issue number in comment, @handle in source, over-explaining, AI smell, delivered documentation. It is listed under Docs & Writing on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
serhiy-bzhezytskyy (@serhiy-bzhezytskyy) published this skill. Their other Agent Skills are listed on their SkillMD profile.