Your Architecture Is Why Your Coding Agent Keeps Writing Bad Code

A few months ago I realized that as the code and modules inside the structure we’d built kept growing, it was starting to become a problem, and developing with AI was getting really hard. I’d ask Cursor or Claude Code to make a very simple change to a frontend module. At first glance it looked great. Then I’d open the PR and inspect it: it had done state management differently from the rest of the app, it had written copies of helper functions that already existed, it had pulled some random third-party package we never use into the project, and it had completely ignored the configs we’d added for design. At first I thought it was the LLM’s fault, because everyone around me was complaining
…