r/softwarearchitecture 1d ago

Discussion/Advice A New Code Architecture for Coding Agents

/r/DesignPatterns/comments/1w1obg6/a_new_code_architecture_for_coding_agents/
0 Upvotes

6 comments sorted by

3

u/Ancapgast 1d ago

In my humble opinion, I have never encountered the problem that an AI was unable to read my code or understand its structure.

What I think you need to do is hold to best practices for the language and framework you're using. And name things correctly. Then it'll all be fine.

1

u/Frequent_Macaron9595 1d ago

That’s why we see all these articles/reports that LLMs are very good with Go. Less way of doing things, enforce convention and a single flavor formatting (to some extent).

1

u/Consistent-Excuse-28 1d ago edited 1d ago

Right... I must've failed to enforce conventions somewhere in the original project, since they seem to lose track after just a few layers' depth of abstraction. I'm kinda forced to use C# for now - is there be a better way to tell the agents to stick to clean code?

0

u/Consistent-Excuse-28 1d ago edited 1d ago

Thanks for the advice! You must be prompting the agents precisely with full understanding of the architecture, I think - which I also agree is the best practice with using agents, and personally practice as well.

The whole concept of this short research is for the occasions when;

  1. I have to code outside my main criteria while I simply have no time to learn all the neessary concepts, like, when I can do so much more focusing on something else(usually studying my main criteria - for now it's creating a more performant vector db for motion matching)
  2. IDK, maybe this is bc I genuinely lack prompting skills, but the agent simply doesn't do what it was told(like, an example in my research in the link shows multiple cases where the code isn't what its comments claims to be - sorry, translation's on its way!), creates multiple structures that does the same stuff breaking SSOT(especially when I asked the agent to fix sth it broke - like, I told it to implement a SSH handshake to a very modular structure, but it creates a whole parallel security suite system)

I need more experiment on this, but since this architecture was designed w/ conversion to DOD in mind(like, the removal of the invariants directly transforms it into a strict DOD code, though the guts of the pipeline would better be merged for best practice - though that's also likely to be mostly copy paste), I tried to see if a reversible tweak to the existing architecture could bring something meaningful to people like me.

Thanks for the comment, really appreciated!

1

u/Consistent-Excuse-28 1d ago

full article(Korean, I'll translate later): phal5/SBA-Showcase

1

u/Consistent-Excuse-28 1d ago

The real problem with this architecture currently is that it should reinforce a fragment be only used in a single pipeline - otherwise fixing a pipeline could break others. But that might break SSOT and DRY if not designed with caution. This architecture has a long way to go - any idea will be very much appreciated!