cd /news/artificial-intelligence/your-ai-does-not-have-a-naming-conve… · home topics artificial-intelligence article
[ARTICLE · art-27704] src=dev.to ↗ pub= topic=artificial-intelligence verified=true sentiment=· neutral

Your AI Does Not Have a Naming Convention. It Has a New One Every Time You Start a Session.

A developer warns that AI-generated code often creates naming inconsistencies because the AI invents new conventions each session. The solution is to define explicit naming rules for handlers, hooks, and props, which the AI can then apply consistently across the codebase.

read3 min publishedJun 15, 2026

Open any React project where the AI has been generating code for a few months.

Search for how buttons are named. How handlers are named. How hooks are named. How the same concept appears across different features.

Chances are you will find three or four variations of the same thing. Not because different developers made different choices. Because the AI made a different choice every session and nobody defined what the convention was supposed to be.

Naming looks consistent until you look closely. Then it looks like a project with no memory.

Naming is one of the most context-dependent decisions in code.

What something is called depends on the domain, the existing conventions, the patterns already established in the project, and a shared understanding of what words mean in this specific codebase.

The AI has access to some of that context in each session. It can see the files around the current work. It can infer patterns from what it reads. But it cannot see the entire codebase at once. It cannot remember what it called something three sessions ago. And it has no definition of what the naming convention actually is unless someone wrote it down.

So it invents. Each session produces names that make sense in isolation. Button handler today. Handle button click tomorrow. On button press the session after that.

All reasonable. All different. All adding to a codebase where the same concept has accumulated three names and nobody remembers which one was intentional.

Naming inconsistency is not a cosmetic problem.

When the same concept has different names in different parts of the codebase, developers spend time figuring out whether they are the same thing or different things. New developers spend longer onboarding because the vocabulary is not consistent. Search becomes unreliable because you have to know which variation to look for.

More subtly, inconsistent naming signals that no standard exists. And a codebase that signals no standard invites more inconsistency. The next developer sees the variation and adds a fourth version because there was no single correct answer to follow.

The AI did not create this problem maliciously. It created it because naming decisions were never defined as rules.

A naming rule does not have to cover every possible case. It has to cover the decisions that keep coming out differently.

The most common variations are usually handlers, hooks, and component props. Those are worth defining explicitly:

Naming rules that eliminate drift:
1. Event handlers are always named handle followed by the action. handleSubmit, handleClick, handleChange. Never on, never process, never manage.
2. Custom hooks are always named use followed by the feature they serve. useUserProfile, useCartItems. Never get, never fetch, never load.
3. Boolean props are always named with is or has as a prefix. is, hasError, isVisible. Never , never error, never visible alone.

Three rules. Written once. The AI stops inventing variations because the convention exists before the session starts.

When naming rules exist, something interesting happens over time.

The codebase develops a vocabulary. The same words appear in the same patterns across every feature. A new developer joins and learns the vocabulary once. From that point they can navigate any part of the project because the language is consistent.

That vocabulary is not created by the AI. It is created by the rules that define what the AI names things. The AI then applies those rules consistently across every session, every feature, every developer who uses it.

The codebase starts to feel like it has a voice. Like it was written by someone with a clear point of view about what things should be called.

It was. You just had to write that point of view down as rules.

Your AI will name things every session. That is unavoidable.

What is avoidable is letting it invent a new convention every time. Write the naming rules once. Give them to the AI before every session. And stop spending time renaming things that should have been named right the first time.

I built a free 24 point checklist that helps you find exactly that. The structural gaps where your AI has been inventing conventions instead of following one.

── more in #artificial-intelligence 4 stories · sorted by recency
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/your-ai-does-not-hav…] indexed:0 read:3min 2026-06-15 ·