How do you keep up quality when you vibe-code?
39 pointsI'm having a really hard time working with claude. In the past when I wrote all the code manually, it was always carefully reviewed and architected, with all possible flows carefully mapped out. Now, my code is mostly AI written which has led to things going out of control. Since it's easy to add new features and support many user flows, we went ahead and implemented flows that support a lot of cases our users run into. But now, I feel like things are getting too complex with no central notion of behaviour definitions, which causes every bug-fixing session to feel like a game of whack-a-mole, and results in missing edge cases and UI bugs that are becoming impossible to review and keep track of.
Every time I build anything new, it adds more complexity and the agent only seems to focus on the surrounding code within that session without keeping track of how it fits into the rest of the code base/product.
How do you all deal with this? Any suggestions for improving?
Comments (39) 68 threads
Earlier comments0. You need a very very clear vision of what you build. If it's fuzzy in your mind, the result will be a mess.
1. Write a very strict AGENTS.md. Emphasize that all design decisions are yours, agents are allowed to implement already specified behaviour. Also no new dependencies, interfaces, seams, etc, are allowed by the agent.
2. Work at one thing at a time and be on top of it. Every conversation followed, anything out of the ordinary checked immediately.
3. Keep a detailed TODO list shared between you and the agent. Every task you work on should be an item there, we scoped and specified. Anything that goes beyond a few commints is split (sub items, separate items, etc). Agents can propose nee items never file them automatically. Many can be open but work is always on a single item.
4. Extensive testing. Not bloated, need to be careful, but I'd say at least 3x or more the number of tests you'd write yourself. And tests for code quality (lint, dependency checks, etc)
1- Ensure you have Changelogs.md, Agents.md properly written to your likings.
2- Depending on what you are building there is always a way to add actual UI tests and takes screenshots of before and after. If its a related to web UI, you can use playwright and or similar but there is always an option to test UI. Worst case scnerio is when none of libs help you and in those cases, you can add automated tests for UI using computer control from agents and take screenshots.
3- When reviewing PRs, always use a totally different agent. For example if you use claude code for creating PR, then perhaps ask Codex or Cursor to review the PR in depth.
4- Prefer smaller multiple PRs over larger ones.
5- Last resort: If you don't have to review and check PRs yourself, perhaps consider hiring a QA engineer if you can afford one.
Last but not least, learn to freeze the scope and remember not all bugs and edge cases are worth covering.
All comments shown.
Couldn't load more comments. Check your connection and try again.