how do you keep your codebase clean when relying heavily on ai code generators?
by•
I have been using automated coding assistants for rapid prototyping over the past few weeks, and while it speeds up building initial ui screens tremendously, it also generates a lot of redundant utility classes and messy state logic.
every time i clean up the code manually, i wonder if there is a better prompt pattern or workflow to force cleaner output from the start.
for those building full products with ai tools, how do you prevent your repository from becoming an unmaintainable nightmare after a few weeks of fast iteration?
25 views
Replies
prompts didn't fix it for me.. what helped was one worktree per agent so every diff is one session's work, and i read that diff before it merges. when the same mess kept coming back i moved the rule out of the rules file into a hook, the hook runs every time, the line in the file gets skipped. are the duplicate utils coming from fresh sessions that don't know the old ones exist?