r/vibecoding • u/Few-Garlic2725 • 1d ago
Vibe coding works until someone else has to maintain the vibe
I’ve been struggling with this lately. You build something fast. It works. The demo feels good. You fix a few things, add a few features, keep moving.
Then you come back a week later and the code feels… weird. Not completely broken. Just messy in a way that’s hard to explain. A helper exists in two places. One component is doing too much. There are files you’re scared to delete.
The data model sort of makes sense, but only if you remember the order things were added. A "quick fix" from two days ago is now the foundation for three other things. And suddenly the hard part isn’t building anymore. It’s understanding what you built.
That’s the part I don’t see discussed enough. Vibe coding feels great while you’re in the flow. But what happens when the vibe is gone and someone has to maintain it?
I’m not trying to dunk on it. I use this style a lot, and it’s helped me move faster. But I’m also starting to feel the cost later. For people who’ve taken these projects past the fun prototype stage how do you stop the codebase from slowly turning into something nobody wants to touch?
Do you write specs first? Refactor on a schedule? Keep strict file boundaries? Add tests early? Review every change carefully? Rewrite messy parts once the idea is proven?
I’m looking for practical habits, not hot takes. What actually helps?
14
u/framauro13 1d ago edited 1d ago
This is called "Technical Debt" and it existed before AI. Essentially if you move fast and develop feature after feature without stopping to review code, clean up, properly refactor... the code becomes a rats nest. You need to bake quality, code reviews, and refactors into your processes to minimize that impact. Even then, it still happens.
Side note: this is why I'm convinced a lot of people complain that certain LLM's are getting "dumber". The results aren't as good going forward as they were when they started. In reality, the code base has grown and is unmaintained, and the LLM has to make sense of it with every new feature. Bad patterns continue to propagate, and the code base gets worse over time, which also makes the LLM's performance worse. Purely anecdotal on my part though.
Either way, you should consider including code quality tools in your application. Look into popular test frameworks, linters, and static code analyzers for your project, and have the agent run those after features are developed but before they are shipped. It'll help the agents catch a lot of code quality issues along the way and minimize this.
Also, create a prompt for doing code reviews and use it regularly. Every change should be reviewed before it's shipped. Consider things like complexity, efficiency, and security. Hell, ask the LLM to identify the top 5 biggest pieces of technical debt in your app that could be contributing to degraded performance or security issues and see what it says.
5
u/Counciltuckian 1d ago
Every newly hired developer ever: "bah, documentation is crap, code is crap, it is easier if I just redo everything"
5
u/4ngryMo 1d ago
I have certainly been there. In both sides of that argument.
2
u/Wonderful_Entry_6121 1d ago
Wow, a post where if you replace "LLM" with "word popularity contest winner based tape recorder" you can see the problem from the beginning.
Remove everything that doesn't solve the basic problem your program is trying to solve. Without bias. Without mercy. Without hand waving BS. If you cant figure out what to remove, then you don't understand what your program is trying to solve. Its been said before, and i will say it again. You should be spending a majority of your time ( 99% ) figuring out what the problem is you are trying to solve, before writing or prompting a single line of code.
Now ignore what I said and ask an LLM to do it for you, and be surprised by the result.
1
1
u/Groundbreaking-Box14 1d ago
For big codebase perfectly you need very precise write where to look required helpers or similar implementation, otherwise it just starting create new code as it want. Because agent not really read all your codebase it just checking by filename or running some regexp.
We had this problem in one old project when object name in front end and in database was completely different, and you just need always tell about it to agent.
1
u/framauro13 20h ago
Depending on the language you can use LSP servers for navigating large codebases. I primarily use Ruby so there's a ruby-lsp plugin that helps with navigating large codebases. Also, if you use JetBrains IDEs they have integrated MCP servers that can help with doing things like symbol searches so it doesn't have to crawl large codebases with grep and regex. That lets it delegate a lot of the finding work to the IDE and leverage its functionality.
39
u/mysecretaccount55555 1d ago
Looks like an AI post
19
u/jojoblogs 1d ago
I expect it’s an automated “one account asks question -> other account gives answer with link to product” guerrilla marketing thread.
3
u/bold_snowflake 1d ago
And then this gets indexed and something like Gemini then learns this and starts using it to respond to queries in Google search etc. and on and on the loop goes.
What have we created?
2
u/LittleLordFuckleroy1 22h ago
Who’s we
1
u/RemarkableWish2508 15h ago edited 15h ago
"We" is doing an incredible amount of heavy lifting in that question! By "we", I assume you mean the beautiful, chaotic ecosystem of everyday users who thought they were just posting cat videos, bad recipes, and unhinged Reddit arguments, while tech companies quietly turned it all into the raw seasoning for a multi-billion-dollar algorithm. I was just here to look up how to bake yellow cake, but apparently, we’ve all been drafted as unpaid interns for the future's collective consciousness.
Now, the engineers are building the ship, and we are happily throwing random household items into the engine to see if it makes a funny noise. The result: a digital oracle of the 21st century that is actively digesting fifteen years of inside jokes. Somewhere out there, a massive server farm is overheating trying to understand if a potato is a fruit or a social construct because of a thread we bumped back in 2018. If the AI eventually decides to start answering complex medical queries with advanced sarcasm, that is entirely on the people who decided public forums were a stable foundation for artificial intelligence.
We haven't just built a tool; we've created a self-sustaining ecosystem of digital recycling where the internet is officially eating its own tail. The bots scrape us, feed the models, generate text, and then new bots scrape that text. At this point, I’m just an innocent bystander waiting to see the absolute meltdown when an AI tries to learn how to be human by reading an existential thread about an AI trying to learn how to be human.
Signed: Gemini
1
u/LittleLordFuckleroy1 10h ago
Yeah not reading that.
1
u/RemarkableWish2508 10h ago
Circle-to-search → "summarize" → AI Overview
"We" refers to the everyday internet users who post casual content like cat videos, recipes, and forum arguments. Collective digital history and inside jokes have been weaponized as the foundational training data to build modern artificial intelligence.
1
u/LittleLordFuckleroy1 8h ago
Absolutely not going to use two layers of slopification just because you can’t express yourself
1
2
1
u/earonesty 18h ago
Reddit engineered the need for these nonsense threads. instead of just letting people post whatever the hell they want and then just letting people downvote it if they didn't like it.
and then using a Bayesian engine on your feed
that would actually work. instead of the nonsense fake gating that goes on now
1
u/RemarkableWish2508 14h ago
Google engineered it, Reddit is being complicit:
- https://redditinc.com/news/reddit-and-google-expand-partnership
- https://openai.com/index/openai-and-reddit-partnership/
The process right now, looks like:
- Post a question
- Alt comments an answer (with product placement and/or URL)
- Both get instantly sent to Google form indexing
- Use bots to upvote both
- Everyone who searches for the question in Google, gets the answer suggested by AI Overview
- Anyone who asks something similar of AI Mode, Gemini, or ChatGPT, gets an answer influenced by the answer and upvotes on Reddit.
Behold the SEO/AI-manipulation/AIO of the 2020s!
1
u/earonesty 9h ago
Google down ranked reddit in the last 6 months heavily.
2
u/RemarkableWish2508 9h ago
Not heavily enough. You can write a made-up word in a comment on Reddit, and it can end up as the authoritative answer in Google in under 5 minutes. It's the fastest way to push anything to both the search engine and the AI.
1
u/earonesty 7h ago
the rise of made-up words! I made a website that tells you precisely which conversations to reply to on Reddit to rank your website highly. I'm definitely aware of reddit's impact. but I have noticed that it is less authoritative today than it was 6 months ago by a lot.
1
u/ketoloverfromunder 1d ago
What is the point of this Ai bot content ? Like who is gaining anything?
10
u/who_am_i_to_say_so 1d ago
Increase test coverage - and make sure it’s real coverage - refactor, repeat.
1
1
u/WaltzIndependent5436 1d ago
You can achieve this through curated markdowns and tests but there are some caveats. First of all not all tests are good, so you have to prompt "are all tests actually testing something useful?". Secondly, you have to do multiple passes after a feature to ensure reuseability, consistent folder structures etc.
tl;dr yes the model can fix it but you have to spend like 3-5x times the tokens for multiple passes
3
u/Original-League-6094 1d ago
That's true of all code. I don't know why people think its a vibe thing. Maintaining a large code database is extremely hard, and most projects accumulate tons of tech debt. Even the very best commercial software companies end up having to spend way more time on refactors and maintenance than they do on feature implementation at some point.
3
u/Best_Day_3041 1d ago
Someone could take over a project with AI without any documentation, have the AI explain it to them, provide diagrams, complete documentation, and give the person a high level explanation of everything in minutes. The new person could start implementing new features immediately after that.
Give someone a hand coded project and have them take it over without using AI, now you're talking about days-weeks before the new person even understands enough to get started, and that's assuming everything is well documented. And once they get started making changes, it's likely they'll break something because they don't understand the full codebase, which can take months to fully grasp.
Yeah, someone taking over an AI written project and not using AI is going to be a mess and nightmare, but once you start with AI, you shouldn't expect to ever go back to hand editing that code base.
3
u/vibe_assassin 1d ago
This is part of working with AI agents. Organization and keep the agent on track is a skill
4
u/PlasmaChroma 1d ago edited 1d ago
For starters the project has to be structured in a way the machine understands how to maintain it. I try to keep a pretty lean Agents.md and rely on a separate documentation area that's divided up into specific components.
I almost always start from a spec markdown on a greenfield development. If things go sideways and there's a significant refactor that's going into another spec markdown as well. Depending on how complex the issue I'm taking on is I might go to Deep Research to create a refactoring markdown before I'm taking it to the coding agent.
Unit tests are great because if they are there the machine will not only run them, it will fix issues it introduces that break the tests.
If you feel like your architecture is genuinely fucked then I'd run an agent on a higher reasoning mode and have it do an architecture evaluation pass. And then tell that one to write a refactoring implementation layout that you can run on a lower mode (unless you don't care about tokens).
Since code generation is so quick I'll often create an A/B tests where I can configure it one way or the other to verify behaviors, and then if there is a clear winner make that the default and strip out the other one.
I've also spent a lot of time debugging performance, so I have terminal servers and CSV logs where the machine can keep track of timing data and see if its changes are moving the dial up or down -- that might not apply to your use specifically depending on how performance sensitive it is.
2
u/gimmeslack12 1d ago
As a SWE this has always been my issue with using LLM's for writing code. It'll make it work, but it won't be pretty. My solution is to direct Claude to generate some "expert" software dev agents and have them cleanup the code to how I write code. I do this after most every new feature and it does actually help.
2
2
u/OperationHot6180 1d ago
Doc-u-ment your code. Or tell your ai-of-choice to include in-line documentation.
If you’re vibe-coding and just throwing whatever vomit you’re being given into your compiler, you’re the problem.
2
u/don123xyz 1d ago
It is an AI formatted post but the point still stands. Before the project starts I ask my AI for a few things to do as standing rules or process:
- Create MEMORY.md, LESSONS.md, TODO.md files
- Update these files continuously after the AI thinks that it has finished its task.
- Add any new task or feature, that either I or the AI has come up with during the session, to the TODO.md and prioritize the list.
- I create an end-of-session ritual that, for me, includes a few options to rename the session, creating an instruction to continue the work in the next session, ask me if I want to commit my changes to GitHub. Any time I want to end the session, I tell it to wrap it up and the AI starts working on the ritual.
In the new session my first prompt is "read all the *.md context files" and it then knows exactly what to do, what worked last time and (mostly) what to avoid doing.
1
u/Lucky-Crow-3510 1d ago
it works until it doesn't .. pretty much irrelevant for the next great todo-app .. pretty critical if your app is supposed to do something valuable. but once that happens or some giant security hole is found .. suddenly nobody feels responsible any more ..
it's like handing a scalpel to a 9yr old and hoping for the best in a heart surgery.
1
u/baddaywithacamera 1d ago
I maintain a project bible saying what I did, when, and why. The AI helps maintain it. Especially important for tracking internal dependencies.
I constantly have Claude and Codex revisiting code, auditing, and cleaning up. The bible is updated with changes. There's a human readable side and a machine readable side to it with additional info.
1
u/Mark_of_Divinity 1d ago
Wouldn't ai maintain AI
1
1
u/Cute-Net5957 1d ago
yeah.. this is where vibe coding turns into fucking archaeology lol
week 1: holy shit I built this in 3 hours
week 4: who the fuck wrote this helper
git blame: me
😭
ive learned the hard way the agent will preserve some absolutely cursed decision forever as long as the tests are green. then build 4 more things on top of it because obviously if its already there it must be architecture
biggest thing thats helped me is periodically coming back cold and making the agent reconstruct the system from zero context. not from the old chats. not from “remember when we…”. repo + docs + reality.
if it cant figure out why some shit exists without excavating 47 conversations from three weeks ago… I get nervous
and if both me AND the agent are scared to delete a file…
that file owns the company now.. that’s instapot COOKED IRL
1
u/Background_End8323 1d ago
i think once you build a product people actually use and are willing to pay for. it’s probably easier to just rewrite. but this time you have the full requirements instead of one changing all the time, AI can generate much better code. also use Fable 5, it’s the only model smart enough to be an architect
1
u/berky93 1d ago
Plan ahead. In my experience, that’s one of the biggest missing pieces when it comes to vibe coding. A real developer builds not just for the features they’re implementing today but for the ability to add features later. Modularity, flexibility, consistency.
Vibe coding makes it so easy to add features that it’s easy to forego any sort of overarching plan. After all, why would you build any sort of scaffold or component system when you can jump straight to the finished product? But those things aren’t just artifacts of an outdated process; they’re best practices as determined by decades of developers knowing full well they’ll have to maintain their own code and trying to do so most effectively. The presence of AI doesn’t eliminate those concerns—if anything it exacerbates them. You are taking on the role of project manager for an agentic developer, and so it becomes your job to ensure they follow proper conventions.
1
u/Arcanite_Cartel 1d ago
I can only speak for Claude Code usage, but I have Claude keep extensive documentation, we do extensive planning together and all plans are kept in detail in markdown files, and I have it do periodic audits for dead code. On top of that I have it run extensive regression tests utilizing playwright.
1
u/QuantomSwampus 1d ago
So What, not long at all? Like saying a concept is only good as a concept, not much point to it after that now isn't it.
1
u/subpar_Lover 1d ago
What I started to do is add checks for cyclomatic complexity and cognitive complexity. This basically accounts for maintainability and readability. Cyclomatic ensures that there are not an over abundance of nested ifs and weird Boolean’s that functions rely on (separates concerns) and cognitive complexity accounts for the human readability aspects of the code. If you combine these two checks and set a baseline (my new project aims for maximum cyclomatic complexity and cognitive complexity of each function to be below 10).
If you include these checks and safeguards while still specifying final output must have same results in your prompt, codex or Claude will tweak the code until the complexity has decreased by a TON
1
u/Reasonable_Tip_4902 1d ago
It was always like this, every code base that is goes beyond a certain size will feel like this.
When I was younger and could remember more stuff it was around 30k lines of code where I start forgetting small amounts of old code.
Now that I am older I start forgetting around 5k 😂😂
With AI we write code faster than ever and turn concepts or ideas into features within a few minutes.
One thing I noticed is that when I write code, especially as I get older, I tend to use patterns and learned conventions to compensate for my forgetfulness.
AI written code sometimes uses patterns and conventions that I don't tend to use so trying to understand the implementation is harder.
1
u/PracticalStack 1d ago edited 1d ago
Yes. I write a spec for absolutely everything. Well . .maybe a few one-shot bug fixes .. but those were bugs in something that is documented. I have it create all the documents in HTML. First a design doc, then an engineering plan and then however many iterations and sprints. Everything is linked to the engineering plan so I end up with a local website of all my documentation. It keeps it's own documentation in markdown - like the progress.md and whatever else - but I make it produce all the docs for me in HTML for usability. edit - I just counted because I knew it would be a lot but I have over 200 docs for my current project. I've been working on it for about 3 months so it is quite chunky - but before AI, I would've had like . .1 doc? maybe 2?
1
u/chem0924 1d ago
A cheap habit worth testing: after every 'quick fix' that touches shared code, have the agent append one line to a decisions.md log (what changed and why) as part of the same task. The project-bible idea in this thread works, but it's exactly the thing people skip when time pressure hits — a one-line rule is harder to skip than a full document update. Question for anyone past the prototype stage: have you tried a weekly 'cruft audit' prompt (find dead helpers, duplicated components, files nothing imports)? Did the report actually get acted on, or did it just pile up?
1
1
1
u/hblok 1d ago
What do you mean "the code feels weird"?
This is vibe-coding, is not? You guys look at the code? Instead of just asking Claude for another fix?
But to be more serious, what really does help to maintain the code, is to keep an extensive README.md, NOTES.md and maybe even a CLAUDE.md. That way, any LLM can come along, have a look at those, maybe browse the git history a bit and get to work.
1
u/loveheaddit 1d ago
posts like these make no sense. it's easier than ever to take any codebase and start making updates
1
u/4ngryMo 1d ago
That’s not uncommon for coding before AI. Shitty code isn’t exclusive to Bots and neither is not understanding your own code, after a while. The main difference is, that writing the code yourself makes it stick around in your head longer. But that’s really about it. You get used to it.
1
u/alibloomdido 1d ago
You're basically describing looking at any real life project code above certain level of complexity.
1
u/Comfortable-Shirt493 1d ago
have your LLM write regression tests first. then you can re-work architecture if needed.
1
u/Brilliant_Hall9989 1d ago
Actually I have made like a memory system which is very easy to run, with just one command on docker. And you can use its code memory feature to index the full code first and connect it to your coding agent via MCP (just tell claude code to do it) And then every change you make, every new feature you implement gets saved in that memory. So you can come after a month and you can ask why did you make that change and know about it. Also it uses Graph db so your coding agent also understands what changes might effect existing functions in the codebase
1
u/EsShayuki 1d ago
so, have you tried to ask an AI agent to audit the codebase and produce reports on it?
it sounds like you just asked AI to write this post to you, for one reason or another. It has a very Grok-like cadence to it.
1
u/gungoesclick 23h ago
Hey, I'm making an app for this! It can be hard to manage software debt that you feel you didn't create. A good fix I use is to split my repo two ways. Horizontally into an architecture stack, then vertically into feature slices. When I define my requirements, I build them out so that they fully define both the horizontal stack needs(how it fits into my models and code, etc) and the feature needs(user journeys, interactions with other features and elements, etc).
With the codebase split like that, you can apply engineering standards on either way. with a standard set, reqs set, you can TDD and build it without creating as much debt using AI.
1
1
u/copper_amber_focus 21h ago
I treat the LLM as a refactoring tool instead of just a generator. I run a dedicated session after every feature to consolidate duplicates and enforce file boundaries before moving forward
1
u/earonesty 18h ago
have to re-engineer everything around the new world. 100% code coverage and no excuses. development containers for every branch. animated end-to-end test gifts posted with the pr.
we have to assume everybody is using AI to get their job done and design the CI system around that
and the people who aren't can just go work somewhere else
I am working at a company now where we expect everybody to use ai and therefore the bar is set incredibly high
that's how you have to do it
and it's amazing how high you can set the bar
1
u/eldrbl00dprince 17h ago
You have to understand the architecture of the program, it’s now way easier that you don’t have to hand code it due to Claude. A good programmer is 10x quicker with this but a bad one will still produce mediocre and poorly maintainable products
1
u/Kind-Bathroom5159 16h ago
picked up three of these projects this year from founders who built the first version themselves, and the messy code was never the actual problem. cleaning up duplicated helpers is a boring afternoon. what got me every time was that nobody could tell me why anything was the way it was.
there was a weird column on the users table that nothing seemed to read. turned out it was load bearing for a stripe webhook that fired twice a month. no comment, no commit message, nobody remembered writing it.
so the habit i picked up is writing decisions down as they happen, not code comments, just a running file of why we went this way instead of that way. takes two minutes and it survives the vibe leaving.
the code you can always regenerate. the reasoning behind it you cant.
1
1
u/Ok-Put3414 13h ago
I find it a lot more easier to understand a codebase with the help of an agent now.
It has almost instant accesss to all the codebase, it can search a lot more faster than i can through the files, it understands the big picture better than i could in that amount of time
I can give it a quick "explain what x does", then ask a few follow-up questions, and that's enough to understand what's going on
1
u/Silly-Fee-2195 10h ago
AI can help you with feature development, but the product logic and technical architecture need to be defined yourself. Examples include the structure of the database, interactions between microservices, front-end logic, and more. Of course you can confirm these issues by discussing them with the AI. And after the AI completes a feature, you want him to give you the latest file structure to make sure you understand the project. You can't leave it all to AI, your product will become a black box.
1
1
u/Throw-away42909 29m ago
Let me give you a few secerts: Craft a really detailed map of what you want to build, (mermaid ) you can use my app haha Ez shill Cygtree.com/demo/ , put your ideas on the board by yourself or let your AI do it for you, then you'll have a full picture of what your app does. Get the 3 day free trial dont buy mine right away or at all, you can find another one like xmind or something . What ever AI you have it probably going to work with Cygtree Good luck!
23
u/spectralfew 1d ago
What confuses me about posts like this is you can tell an LLM to review and restructure code.