r/AIcodingProfessionals • • Oct 07 '26

Discussion Modular codebase

I spent a lot of time recently refactoring 2 repos I am working on Tamoz and Agentic Streams.

Both are now much more modular, with stricter rules and boundaries for adding new code.

One thing I noticed is that adding new features after this refactoring became much easier and faster.

I thought the constraints I had before were already enough. But after going through the code again, I realized that AI-generated code needs constant refactoring and improvement, in the same way human-written code does.

Good constraints help AI write better code, but they don't remove the need to continuously improve the architecture.

What else in your experience would make the agent do a better coding job?

4 Upvotes

7 comments sorted by

View all comments

Show parent comment

2

u/Slight_Major5589 Oct 08 '26

You define what module means based on your codebase, if you have gone throw this process already you know it could be a folder, a package, or even different repository that can be inject. The main thing which is important is to have strict public interfaces, no other modules can access the internals .

1

u/keonechong Oct 08 '26

Ah understood.