{"slug": "your-ai-does-not-have-a-naming-convention-it-has-a-new-one-every-time-you-start", "title": "Your AI Does Not Have a Naming Convention. It Has a New One Every Time You Start a Session.", "summary": "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.", "body_md": "Open any React project where the AI has been generating code for a few months.\n\nSearch for how buttons are named. How handlers are named. How hooks are named. How the same concept appears across different features.\n\nChances 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.\n\nNaming looks consistent until you look closely. Then it looks like a project with no memory.\n\nNaming is one of the most context-dependent decisions in code.\n\nWhat 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.\n\nThe 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.\n\nSo 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.\n\nAll reasonable. All different. All adding to a codebase where the same concept has accumulated three names and nobody remembers which one was intentional.\n\nNaming inconsistency is not a cosmetic problem.\n\nWhen 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.\n\nMore 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.\n\nThe AI did not create this problem maliciously. It created it because naming decisions were never defined as rules.\n\nA naming rule does not have to cover every possible case. It has to cover the decisions that keep coming out differently.\n\nThe most common variations are usually handlers, hooks, and component props. Those are worth defining explicitly:\n\n```\nNaming rules that eliminate drift:\n1. Event handlers are always named handle followed by the action. handleSubmit, handleClick, handleChange. Never on, never process, never manage.\n2. Custom hooks are always named use followed by the feature they serve. useUserProfile, useCartItems. Never get, never fetch, never load.\n3. Boolean props are always named with is or has as a prefix. isLoading, hasError, isVisible. Never loading, never error, never visible alone.\n```\n\nThree rules. Written once. The AI stops inventing variations because the convention exists before the session starts.\n\nWhen naming rules exist, something interesting happens over time.\n\nThe 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.\n\nThat 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.\n\nThe 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.\n\nIt was. You just had to write that point of view down as rules.\n\nYour AI will name things every session. That is unavoidable.\n\nWhat 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.\n\nI 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.", "url": "https://wpnews.pro/news/your-ai-does-not-have-a-naming-convention-it-has-a-new-one-every-time-you-start", "canonical_source": "https://dev.to/avery_code/your-ai-does-not-have-a-naming-convention-it-has-a-new-one-every-time-you-start-a-session-kj9", "published_at": "2026-06-15 08:00:21+00:00", "updated_at": "2026-06-15 08:11:16.852462+00:00", "lang": "en", "topics": ["artificial-intelligence", "developer-tools", "large-language-models"], "entities": ["AI", "React"], "alternates": {"html": "https://wpnews.pro/news/your-ai-does-not-have-a-naming-convention-it-has-a-new-one-every-time-you-start", "markdown": "https://wpnews.pro/news/your-ai-does-not-have-a-naming-convention-it-has-a-new-one-every-time-you-start.md", "text": "https://wpnews.pro/news/your-ai-does-not-have-a-naming-convention-it-has-a-new-one-every-time-you-start.txt", "jsonld": "https://wpnews.pro/news/your-ai-does-not-have-a-naming-convention-it-has-a-new-one-every-time-you-start.jsonld"}}