How do you keep up quality when you vibe-code? 11 points · 11 comments TL;DR A d...
HN Best 200 @best
How do you keep up quality when you vibe-code? 11 points · 11 comments
TL;DR A developer who previously hand-wrote carefully architected code says AI-generated features have made their codebase too complex, with no central definition of behaviour, leading to whack-a-mole bug fixing and missed edge cases. They ask how others keep quality up while vibe-coding. Commenters offer process fixes: documenting decisions, writing tests and specs, enforcing patterns, and a pushback that at pre-PMF stage code quality matters less than speed.
- The author previously wrote and reviewed all code by hand, with flows mapped out; now most code is AI-written and the product has grown complex.
- Agent-built features add flows for many user cases, but there is no central definition of expected behaviour.
- Bug fixing feels like whack-a-mole, with missed edge cases and UI bugs that are hard to review and track.
- The agent works within the current session's surrounding code and does not keep track of how new code fits the wider product.
- A pre-PMF startup needs fast prototyping, so experiments that gain traction later come with patches and cluttered code the agent imitates.
Discussion Most replies are practical advice rather than debate. Commenters share workflows: writing skill files that point the agent at existing patterns, documenting tasks and decisions in markdown, TDD with heavy testing and mutation testing, and committing product specs to the repo. The author replies that they plan to try these, and asks how others have cleaned up 'AI slop' in a codebase. One commenter argues the problem is the user's prompting rather than the tool, and another says the thinking still has to be done by the developer. The mood is pragmatic and mildly sympathetic, with one pointed dismissal of the concern at the pre-PMF stage.
- Document decisions and specs in the repo for the agent (many): Keeping markdown files for tasks, decisions and product specs gives the agent context and lets it catch changes that contradict earlier decisions. One commenter reports Claude sometimes notices a new request conflicts with an old decision mid-task.
- Enforce patterns with tests, gates and mutation testing (many): Automated checks such as commit gates for duplicated utilities, TDD, and full mutation coverage catch subtle bugs and enforce conventions. One commenter says most of their codebase is tests and benchmarks and that mutation testing resolves many hidden bugs.
- Code quality matters less before product-market fit (some): A founder argues that startups fail from lack of customers, not poor code, so iterate fast until customers pay, then clean up. Another commenter agrees that paying down prototype debt early avoids a later wall.
- Problem is the developer's prompting and thinking (some): Commenters say the user has handed off engineering to the agent without clear intent, and that better prompts naming desired patterns would help. AI saves typing time but not thinking time.
- Architecture should be settled before adding features (a few): A bottom-up programmer recommends experimenting to solidify architecture first and treating user-facing features as emerging from solid primitives.
#vibeCoding #codeQuality #aiAgents #technicalDebt #startups #testing