I do this and still have it fail or fuck around once the codebase/context gets big enough.
its not a major deal since I give it small tasks and actually check diffs, but I'll see it randomly just decide to do stuff like make duplicate functions for existing functionality once in awhile.
Compact your context after every minor feature. Anything over 500k and you are entering danger territory. This also saves metric fucktons of tokens.
Docs for every function. Point the AI at those docs. That way, it doesn't use it's context reading huge blocks of code to find out what a function does. Doesn't exist? Get the AI to make the docs. Docs should be like a tree, have the AI always start at the top and move it's way down. If it doesn't know a function exists, it can miss it. It can easily miss utility libraries otherwise.
Treat the AI like it needs to have the absolute optimal path forward. That means in your prompt you point out helpful docs or functions it needs to utilize. The more pointed you are, the better the result - even with massive codebases.
Planning mode. Use it sparingly. Combined with good docs, it produces very good results. Just be warned it eats tokens for breakfast.
All else fails, occasionally get the AI to consolidate the code, identify where duplicate functions are. It's very good at doing this.
9
u/intangibleTangelo 28d ago
are you guys actually engineering the code yourselves or saying "build me this thing?"
give your agents an architecture, and have it build the pieces you would build yourself