use case

Consistency in a codebase: filenames, indentation, and the phantom diffs they cause

the short answer

Consistency matters more than which convention you pick: mixed indentation renders differently in every editor and produces phantom diffs when editors 'fix' it, multiple filename conventions make files unfindable, and competing lockfiles mean two package managers fighting over your dependency tree — the fix is to let tools own the decisions (a formatter, an .editorconfig, one package manager), and cleanvibes's consistency & style category flags each of these with the file and a one-paste fix.

No reader ever failed to understand a codebase because it used camelCase instead of kebab-case. Plenty have lost an afternoon to a diff where 400 lines "changed" because someone's editor silently converted tabs to spaces. That's the real argument for consistency: it isn't aesthetics, it's noise reduction — in diffs, in reviews, in the simple act of finding a file.

Vibe-coded apps drift inconsistent by construction: every generation session is a fresh roll of stylistic dice, and AI tools happily mirror whichever convention the nearest example used. One session writes UserCard.tsx, the next writes user-profile.tsx, a third adds userSettings.ts — and now nobody can predict a filename. This page covers the three inconsistencies that actually cost you, and the tooling that ends each one.

0 argumentsthe goal of consistency tooling — a formatter and one lockfile end the debates permanently

Mixed indentation and the phantom diff

Tabs and spaces mixed in one file is the classic silent saboteur: the file renders differently at every tab-width setting, alignment that looked deliberate in one editor looks drunk in another, and the moment someone's editor is configured to "fix" whitespace on save, the next commit buries a two-line change under hundreds of whitespace conversions. Reviewers either wade through it or rubber-stamp it; both are failures.

The fix is never discipline — it's configuration. Run the language's standard formatter (prettier, black, gofmt) once across the repo and commit the result as its own commit, then add an .editorconfig so every editor agrees on the basics before the formatter even runs. After that, indentation is simply not a thing that can vary, which is the only stable end state.

Filename conventions and findability

Filename style sounds trivial until you're looking for the date-formatting helper and it could be DateUtils.ts, date-utils.ts, or dateUtils.ts — three plausible names, two of which are wrong, in a tooling world that's often case-sensitive. A single convention makes filenames predictable, which makes the codebase navigable by guess — a quietly enormous quality-of-life feature.

Which convention you pick matters far less than picking one: kebab-case is a safe default for new web projects (it sidesteps case-sensitivity trouble across operating systems), but matching your framework's ecosystem norm is just as good. cleanvibes flags repos where multiple conventions are mixed across source files; the rename pass is mechanical and a coding agent can do it in one sweep, updating imports as it goes.

Competing lockfiles: two package managers, one repo

A package-lock.json and a yarn.lock (or pnpm-lock.yaml) in the same repo means two package managers have both been used, and whichever one a contributor reaches for, the other lockfile silently goes stale. The result is the "works on my machine" dependency tree: two people install the same package.json and run different transitive versions.

Pick the package manager you actually use, delete the other lockfile(s), and commit. cleanvibes flags competing lockfiles under consistency, and a missing lockfile under hygiene — the two failure modes of the same discipline. Honest scope note: cleanvibes's consistency checks target the high-cost, reliably-detectable inconsistencies (indentation, filename conventions, lockfiles); it doesn't enforce a style guide inside your code — that's the formatter's job, and the report will tell you to run it.

The consistency problems that cost real time, and the tool that ends each

InconsistencyWhat it costsThe fix that sticks
Tabs + spaces in one filePhantom diffs, broken alignment in other editorsFormatter + .editorconfig, committed once
Multiple filename conventionsUnfindable files, case-sensitivity bugs across OSesPick one; agent-rename the rest, imports included
Competing lockfilesTwo dependency trees, 'works on my machine'One package manager; delete the other lockfile
Per-session style driftEvery AI session rolls new stylistic diceFormatter on save + a convention the prompts can see

frequently asked

Which filename convention should I pick?
The one your framework's ecosystem already uses, or kebab-case if you're free to choose — it avoids cross-OS case-sensitivity surprises. The choice matters far less than there being exactly one.
Is a giant reformat commit safe?
Yes, if it's only the formatter: run it across the repo with no other changes and commit it alone, so reviewers can skip it with confidence and git blame stays useful via --ignore-rev. Never mix reformatting with logic changes.
Why do AI coding tools drift styles between sessions?
Each session generates from whatever context it sees, and style is weakly constrained — the nearest example file, the most common pattern in training data, the phrasing of your prompt all nudge it. A formatter neutralises the drift after the fact, which beats trying to prompt it away.
How does cleanvibes score consistency issues?
Mixed indentation and filename-convention mixes are individually low-severity findings, competing lockfiles medium — they deduct from the consistency & style subscore, which carries weight 15. Low weight per finding, but they're also the cheapest category to fix completely: one formatter run and one lockfile deletion usually clears most of it.

Last updated June 10, 2026

ready to try cleanvibes?

score your repo