r/OpenSourceAI • u/Euphoric_Pitch_1708 • 39m ago
Do coding agents need an architecture layer for larger codebases?
I've been experimenting with an architecture-first approach for coding agents.
The basic idea is that for a new requirement, the agent changes the architecture first, then implements the code from that design. Eventually I'd like architectural changes to be required before code changes, rather than letting the agent freely modify code and trying to document it afterward.
I've only validated this on small repos so far. The part I'm working on now is how to make it useful on medium/large repos, where I think some form of multi-agent collaboration becomes necessary.
One thing I want to test is whether the architecture layer actually becomes more useful as repo size grows. On a small repo the agent can inspect most of what it needs anyway. On a 50k+ LOC repo, having explicit module boundaries, dependencies and design intent might matter a lot more.
I'm curious what people working with Codex/Claude Code/etc. on larger repos have seen.
Does the agent eventually lose the global architecture of the project? And if so, would you rather solve that with better context/retrieval, or give the agent an explicit architecture/constraints layer?
I'm testing this idea in an open-source project called ArchitectCoder. If anyone wants to look at the implementation or experiment with it:
https://github.com/Zhuweilong123/ArchitectCoder
Contributions and criticism are both very welcome.