Skip to main content
ai-slop/meta-commentmanual fix

Meta comment.

A comment about the task or the change rather than the code: "as per the requirements", "previously this called X", "no longer needed". It records the conversation that produced the code.

Flagged shape and clean shape.

Each example shows the exact code shape the rule is looking for, then the smallest version that keeps the intent without hiding risk or adding noise.

meta-comment.ts
✗ Flagged
export async function listInvoices(cursor?: string) {
  // Added pagination as per the requirements
  // Previously this returned every row in one query
  return db.invoice.findMany({ take: 50, cursor: cursor ? { id: cursor } : undefined })
}
Why this trips

Deterministic comment-block parse: flags blocks that reference a plan or spec (`step 2 of the plan`, `per the spec`, `from the task`) or narrate before/after state (`previously this`, `used to`, `no longer needed`, `replaced the old`).

meta-comment.ts
✓ Clean
export async function listInvoices(cursor?: string) {
  // Capped at 50 rows because the export worker times out on larger pages.
  return db.invoice.findMany({ take: 50, cursor: cursor ? { id: cursor } : undefined })
}
What changed

Move change history and plan context to the commit message or PR description. Keep source comments for what the code needs explained now.

Agents narrate their plan and their edits into the source. Once merged, the plan is gone and the comment is stale.

How this rule is justified.

Rule id

ai-slop/meta-comment

Enforcing engine

ai-slop

Detector strategy

Deterministic comment-block parse: flags blocks that reference a plan or spec (`step 2 of the plan`, `per the spec`, `from the task`) or narrate before/after state (`previously this`, `used to`, `no longer needed`, `replaced the old`).

Legitimate code that is NOT flagged

Comments with a why or TODO marker (because, since, otherwise, TODO, FIXME, HACK, note:, workaround), license headers, lint-suppression directives, JSDoc with meaningful tags, Rust doc comments, and non-production paths are not flagged.

Evidence

Introduced in aislop v0.9.5.