AI Joe
← Blog· AI Axiom

Three Names, One Concept: The Search That Fails at Midnight

July 29, 2026

A grep for every place your code touches customer identity can miss two thirds of the real hits, not because the search tool is broken but because someone typed customerId in one file and accountId in another.

The Details:

  • AI assistants pick names by pattern matching on whatever is visible in the current file. If a function already has userId in scope, the assistant will happily introduce customerId next door because that reads naturally in that context. Nobody made a wrong call locally, but the codebase now holds three spellings of one idea and no record of which one is correct.

  • This drift compounds instead of averaging out. Every inconsistent name that lands in the codebase becomes evidence for the next session that inconsistency is the house style, so each new addition reinforces the mess rather than correcting it. A codebase teaches its own bad habits to whatever writes code inside it next.

  • The cost is invisible at the moment of choice and expensive months later. A search returns results, looks complete, and a fix gets shipped on top of a false picture of the system. That gap between looking correct and being correct is exactly where production incidents hide.

  • The fix is not a style guide nobody reads. It is picking the three or four concepts used most often, writing down one canonical name for each in a spot the next session will actually open, and where possible enforcing it with a type alias or linter rule so the convention is structural rather than advisory.

Bottom Line: Naming decided before the code is nearly free; the same decision retrofitted across a codebase months later is not, so write the canonical names down on day one.

Enjoy this article?

Listen to the Claude Code Conversations radio show or join the community.