r/VibeCodeDevs • u/Impressive_Poet_111 • 2d ago
How do you stop AI coding agents from breaking features that were already working?
I've been building apps using AI coding tools, and one thing I'm concerned about is how to make sure existing features still work after adding something new.
For example, you ask the AI to change a small part of the UI, but it modifies unrelated files or introduces bugs somewhere else.
I'm considering building a small local tool that records working features before an AI makes changes, then independently checks what still works and what broke afterward.
Before building anything, I'd like to understand how other developers handle this.
- How often do you experience this problem?
- How do you currently prevent it?
- What existing tools or workflows actually work for you?
Is this a problem worth solving, or are existing testing tools already enough?
•
u/endofthread-bot 2d ago
Hey u/Impressive_Poet_111, thanks for posting in r/VibeCodeDevs! Join our Discord: https://discord.gg/t7SD4ThKuE
• This community is designed to be open and creator‑friendly, with minimal restrictions on promotion and self‑promotion as long as you add value and don’t spam.
• Please follow the subreddit rules so we can keep things as relaxed and free as possible for everyone. • Please make sure you’ve read the subreddit rules in the sidebar before posting or commenting.
• For better feedback, include your tech stack, experience level, and what kind of help or feedback you’re looking for.
• Be respectful, constructive, and helpful to other members.
If your post was removed (either automatically or by a mod) and you believe it was a mistake, please contact the mod team. We will review it and, when appropriate, approve it within 24 hours.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/GregG997 2d ago
the tests have to exist before the agent touches anything. write a test for what works today, then let it change things. if the suite goes red, it broke something.
we have the agents write the tests with the feature, not after. then ci runs everything on every change.
scope the prompt too. say which files it may touch. a big diff is hard to check, so keep changes small.
for ui, a screenshot diff catches the 'moved the button' bugs that unit tests miss.
i don't think you need a new tool for this. the test runner and a ci job cover most of it.
1
u/Slight-Living-8098 1d ago edited 1d ago
Just use Test Driven Development (TDD), man. When you add a feature, run the tests, and do a code review. Fix any issues. Repeat. You don't need another tool to record what's in your last code commit, you already have Git.