Lurker News
I'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

Show all comments

Showing thread 5 of 68

chatziko#
Tips that work for me:

0. 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)