r/AIcodingProfessionals • • 1d ago

Question about shared context

/r/AI_Agents/comments/1y6onx7/question_about_shared_context/
1 Upvotes

3 comments sorted by

1

u/Banner80 22h ago

The problem is primarily that the robots have limited context and no memory. So the challenge falls into two categories:

  1. Things the bots can infer quickly
  2. Things they can be informed about as succinctly as possible

For #1 the answer is what it always has been: make the architecture and naming conventions of the repository itself as abundantly obvious as possible. Anything that can be inferred from the directory, filenames and function definitions does not need to be explained.

For #2 the issue becomes keeping clean and tight records in a way that is easily discoverable, actionable, and maintainable by all participants including AI agents. Some of that is md files and good code comments within the files, but a more advanced solution is a shared database of project history and actions with each entry recorded succinctly and also agnostic of the agent brand (Claude is notorious for making notes for itself that only apply to its own logic and harness).

Git commits help with this when the commits have explanations and notes. The agents already think to search git history to understand the trajectory. But the real solution is a separate database designed for purpose.

1

u/Varnish6588 22h ago

Agreed with both points, i am currently facing the challenge in that category #2. Specially around a very old, entangled monolith application that is by no means AI ready

1

u/Banner80 44m ago

I've been experimenting and I can't say I have a full answer yet. My two best ideas at this point would be:
A running md file that has rules for entries at the top. Agents are asked to add succinct entries like it's a Twitter log:
date - Short headline
Very short description
searchable tags

I would organize the document by topic. The point is to keep very light data in an organized and searchable doc.

But my preferred choice is a database with a similar schema, but including tagging by action, such as: lesson, pending, blocker to something, solved. Then the agent uses sql to find what's going on with a tag or topic, and when they are done with their task they record their discoveries and update the actions. But this depends heavily in agent team behavior. They need to have a sense for or be mandated into information hygiene. The environment would need a system to enforce that agents begin a task by exploring the history, and end a task by updating the history. And just as important, ensuring that the additions to the history are correct - bugless - verified, or you are storing misdirection for the next session.