Multi-Agent AI Team Context Architecture

Source: Ivan Steshov (LinkedIn, 31/12/2025)

Problem: Context Drift in Multi-Agent Development

In the era of multi-vendor AI development, teams use various tools like Cursor, Augment, GitHub Copilot, Claude Code, and Gemini. The challenge is preventing these agents from hallucinating different project rules, which requires maintaining multiple MD files with duplicated content.

Solution: Universal Context Architecture

The “Governor & Consumer” pattern uses Spec-Kit where each vendor-specific configuration file points to a central hub AGENT.md

Vendor Configuration Mapping

ToolConfig File
Cursor.cursorrules
Windsurf.windsurfrules
Roo Code.clinerules
GitHub Copilot.github/copilot-instructions.md
Claude CodeCLAUDE.md
Gemini CLIGEMINI.md
Amazon Q DeveloperAMAZON_Q.md
Auggie CLI.auggie.md
CodeBuddy.codebuddy
Qoder.qoder/context.md
OpenCode.opencode
Amp.amp.md
Kilo Code.kilo
Qwen Code.qwen
IBM Bob.bob/config
Jules.jules
SHAI.shai
Codex CLICODEX.md

Improved Enterprise Structure

.  
├── AGENT.md                              # Entry point — agents read this first  
│  
└── .agent/  
    │  
    ├── memory/                           # Long-term context and governance  
    │   ├── constitution.md               # Immutable rules: tech stack, code standards  
    │   ├── general-context.md            # Shared context for ALL teams  
    │   └── teams/                        # Team-specific domain knowledge  
    │       └── _template.md              # Copy and rename for each team  
    │  
    ├── skills/                           # Atomic knowledge modules (HOW-TO)  
    │   ├── git.md                        # Version control: commits, branches, conventions  
    │   ├── test.md                       # Testing: commands, coverage requirements  
    │   ├── db.md                         # Database: migrations, queries, safety rules  
    │   └── review-checklist.md           # Code review: correctness, style, security  
    │  
    └── sub-agents/                       # Specialized personas (WHO + WHAT)  
        ├── me.md                         # User identity: team membership (gitignored)  
        ├── backend-developer.md          # Backend: APIs, services, database logic  
        ├── frontend-developer.md         # Frontend: UI components, pages, client logic  
        ├── tech-lead.md                  # Reviews code: fetch → review → approve/reject  
        ├── qa.md                         # Tests & debugs: reproduce → isolate → fix → verify  
        └── devops.md                     # Deploys: lint → build → test → ship  

Key Changes

  1. Constitution
    • Constitution.md now located in .agent/memory
    • Spec-kit (or alternatives) constitution can have a soft link to the common constitution
    • Allows teams to use their preferred framework
  2. Removed plan.md
    • Each developer maintains their own plan
    • Plans can be kept anywhere useful
    • Not necessary to commit to git repository unless there’s only one contributor
  3. Added Business Context Storage
    • Missing component for mapping business to code
    • Now stored in .agent/memory/general-context.md
  4. Multi-Team Support
    • Each team has its own context.md (.agent/memory/_template.md)
    • Agent identifies developer’s team via .agent/sub-agents/me.md
    • References appropriate team context
  5. Removed Workflows
    • Fewer files = easier maintenance
    • Workflow information moved to skills or sub-agent MD files
    • Complexity-dependent placement (e.g., DevOps workflows in sub-agent files)
  6. Renamed AI.md → AGENT.md
    • Aligns with format selected by several frameworks

Resources