ai-slop/generic-naming manual fix
Generic naming.
Variables and parameters named `data`, `result`, `value`, `temp`, `obj`, `info`, `item`. Names that say "this is a noun" without saying which noun.
Bad — what an agent ships
function process(data: any) {
const result = data.map((item: any) => item.value * 2)
return result
} Good — what aislop hands back
function doublePrices(products: Product[]): number[] {
return products.map(p => p.price * 2)
} Why an AI agent produces this
Without seeing how the value is used downstream, agents fall back to generic placeholders. The reader has to infer the role from context — every time.
Provenance
How this rule is justified.
Rule id
ai-slop/generic-naming
Enforcing engine
ai-slop
Detector strategy
Deterministic AST match against a placeholder-name list, scoped to declarations the rule can rename safely.
Legitimate code that is NOT flagged
Conventional loop indices, generic type parameters, and short-lived locals in trivial scopes are not flagged.
Evidence
Naming-verbosity signals derive from SlopCodeBench, which tracked structural erosion in long-horizon tasks.