Hi everyone!
I’ve reached a point in my workflow where I barely write code line-by-line anymore, I orchestrate AI agents. I use tools like Superpower, detailed specs, and a structured prompt architecture: a folder with specific .md rules for different scopes (Front, Back, Git...) and a global claude.md for overall context.
My rules are supposed to be rock solid. The high-level architecture stays fine. But I'm hitting a massive pain point: localized spaghetti code and micro-debt.
The reality is: Sometimes, if I don't take 45 minutes to really review the code, I miss the spaghetti code. Then later, when I actually open the file, I'm just like “shit, wtf is this?!”
It feels like sub-agents lose the memory/context of the parent rules the moment they spawn for a micro-task, and they still write shit or over-complex code.
So I am wondering, am I missing something?
How can I make Superpower run sub-agents without losing context/Rules, or is there a better approach to coding with agents?
Would love to hear how you guys keep your codebase clean without having to create a specific task to spot messy code three weeks after it's done just to fix it.
I just want the AI to write good code directly from the start.
Top comments (2)
@0x2e73 my code felt like spaghetti when I let the model decide file structure. Forcing it against an existing module boundary kept output legible. Treating tests as the design doc the model reads first helped too.
Sorry if my English sounds weird!!
so in the claude rules you force a specific file structure ?