Hacker News new | ask | show | jobs
by CaptainOfCoit 248 days ago
Best way I've found to deal with moderately complex codebases and LLMs is to almost go overboard with splitting things into libraries/reusable components, and let the LLM go wild on each individual component, but I'm 100% of the owner of how all the pieces fit together.

Seems when a project goes beyond a certain scope, LLMs lose the ability of separating what they come across, so everything "blends into a global state" or something, and it'll indirectly be inspired by unrelated things. All LLMs/agents seems to suffer from this more or less, as far as I can tell.

2 comments

This is the approach I've been taking in some research projects - Conceptually thinking of the project as a large number of custom npm or nuget modules with a thin orchestration layer over them (but not actually deploying as npm or nuget modules).

It definitely seems to help the LLM retain focus and architectural integrity.

There was a "movement" in the late 70s or early 80s called structured system design that basically advocated for this approach (though 100% human). You may want to pick up a book or read more about it, as it outlines approaches and things to think about when splitting things up so much.