Vibe Coding in an Existing Codebase
"Add a login page" means something different in a fresh repo vs. a 50k-line one. See how naming context changes the result.
Intermediate12 min read
“Add a login page” means something very different in a fresh repo versus a 50,000-line one. In an existing codebase, the AI can only match your patterns if you tell it what they are. Click each card to see the difference.
Before you prompt, gather context
- →Which files are actually relevant, not just the one you're staring at?
- →Is there an existing pattern, component, or hook to point at?
- →What naming and styling conventions does this codebase already use?
- →What tests or checks should still pass after the change?
Key takeaways
- In a real repo, context is the whole game. The same prompt gets a different answer depending on what you attached.
- Point at the actual files. Do not make the model search for what you already know.
- Match the conventions that already exist rather than letting the AI invent new ones.
- Small, scoped changes are reviewable. Large ones are not.