File naming convention consistency
Why it matters
Inconsistent file naming is a reliable signal of multi-session AI drift: each coding session inherits different conventions from different examples in context. A codebase split between UserCard.tsx, user-card.tsx, and userCard.tsx makes IDE autocomplete unreliable, grep patterns ambiguous, and code review cognitively expensive. ISO 25010 maintainability specifically covers naming consistency as a factor in modifiability — a 50/50 split means every developer mentally translates style before navigating. At scale, this compounds: a new engineer writes to the wrong convention, the next AI session reinforces whichever style it sees first, and the drift widens.
Severity rationale
Low because inconsistent naming degrades maintainability and developer velocity without introducing runtime failures or security exposure.
Remediation
Pick one convention, document it, and rename the outliers. PascalCase (UserCard.tsx) matches React community norms; kebab-case (user-card.tsx) aligns with Next.js App Router conventions.
# Rename PascalCase outliers to kebab-case in bulk
for f in src/components/**/*.tsx; do
base=$(basename "$f" .tsx)
kebab=$(echo "$base" | sed 's/\([A-Z]\)/-\1/g' | sed 's/^-//' | tr '[:upper:]' '[:lower:]')
[ "$base" != "$kebab" ] && mv "$f" "$(dirname $f)/$kebab.tsx"
done
Document the choice in CONTRIBUTING.md and add "unicorn/filename-case": ["error", { "case": "kebabCase" }] to .eslintrc to enforce it on future commits.
DetectionPro
The detection method for this pattern is part of AuditBuffet Pro.
The full method (what to look for, pass and fail conditions, and how results get reported) ships inside the Multi-Session Drift Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
External references
- iso-25010:2011 · maintainability — Analysability — inconsistent naming impedes codebase navigation
Taxons
History
- 2026-04-18·v1.0.0·Initial import from ai-slop-code-drift·automated