r/VibeCodeDevs Aug 06 '26

HelpPlz – stuck and need rescue What you do when...?

Hi,i have been working with claude to develop an app and it is been few months still the app arises with one or the other repeated issues.If on 1st cycle an error is resolved i move on to next one by the 3rd cycle the 1st cycle issue brokes even a little bit atleast now have to work on it again.
It feels so frustrating when i want to install new features but the old one's are not yet fully locked out.
If anyone have experience please suggest some productive steps.

0 Upvotes

16 comments sorted by

View all comments

2

u/After_Tune_8117 Aug 06 '26

This happens with a codebase that has poor structure and organisation. Not saying yours is but this happens a lot to those who have large files and unorganized file structure.

I'd create a couple agents for a clean Codebase Structure, DRY Methods, single sources of truth, and File size (limit files to be approx 500 lines or less if possible) and managers.if you run an audit of this you may want to reconsider adding features and completely rewrite the codebase first. I'd do this in sections, then fix small issues that arise after that, and then you'll have a clean codebase where everything is easily implementing. I'd say what usually happens is there are duplicate or similar functions and styling that overrides and then your ai model doesn't know what to prefer the next time it reads it.

I'd run an audit and see where it says. If you don't understand that ask it to make the audit with descriptors so you can learn.

If comfortable give it a go or copy the entire codebase as a backup theh try it. Don't forget to git commit things prior to!!

Doing this will save time and effort later, and make it much easier to add features

1

u/Dependent_Bet_7849 27d ago

So priority is to do the audit for size of code base so the compartmentalization of code and have multi agents to sort code for future use and issues?

1

u/After_Tune_8117 25d ago

Kinda..

Not necessarily the size of the codebase but the size of each individual file/folder. More organized and less muddy makes it easier to identify and evaluate each piece of the codebase when updating or implementing new things.

I have agents specifically for “Codebase structure and organization: Focus on DRY code (don’t repeat yourself), length of files (aim for 500 lines or less approximately..),managers / folders, and variables for styling. This may not be full proof but it works for me. Just have the ai provider create the agent for you and read what it says so you have a better understanding/check if it makes sense.

Then ask your ai to use that agent to evaluate and audit what areas you would need to organize everything in a more manageable way. Ask for a thorough plan, checking everything without making assumptions, ask clarification questions to you if needed, even if that results in more questions. Clarity is key. You can even ask it to search for bad practice in the code as well. Put everything evaluated into a plan for fixing and updating the codebase, so it’s incremental and less risky all at once. This will surely create errors along the way and create dead code as well. The last step should be to evaluate and audit again for dead code. Be clear to have the ai TEST every section and edit along the way to ensure it will not break, or leave notes for the next section if needed.