Specialist Multi-Agent Wings Responsibilities & Namespace Routing
| Wing Identifier | Namespace Route | Core Responsibility | Input Ingest Context | Primary Handoff Targets |
|---|---|---|---|---|
| Architect Wing | wing:architect | PRD authoring, system boundary planning, and API contracts | High-level user requirements and project architecture guidelines | Reviewer, QA, and Security specialist wings |
| Reviewer Wing | wing:reviewer | Code quality audits, SOLID enforcement, pattern adherence | Git diffs, file leases, and architectural PRD specifications | Architect and QA specialist wings |
| QA Wing | wing:qa | Test suite authoring, edge cases, regression coverage checks | Feature contracts, component APIs, and test runner logs | Ops and Reviewer specialist wings |
| Security Wing | wing:security | Vulnerability scanning, secret detection, OWASP compliance audits | PR diffs, dependency manifests, and authentication logic | Architect and Ops specialist wings |
| Ops Wing | wing:ops | CI/CD pipelines, container orchestration, deployment telemetry | Deployment scripts, infrastructure configs, and release logs | Architect and QA specialist wings |
The Multi-Agent Context Trap: Why Monolithic Prompts Fail
When organizations attempt to build multi-agent teams by packing multiple role descriptions into a single massive prompt or shared chat transcript, agents suffer from identity confusion. A QA agent reading code review comments from the architect often second-guesses its test plan, while a security scanner gets distracted by refactoring proposals. In addition, sharing the entire history across five agents multiplies token costs fivefold on every step.
- Shared context prompts cause agents to blur role boundaries and responsibilities.
- Token consumption scales linearly with the number of participating agents on every step.
- Noisy execution scratchpads from one role contaminate the reasoning of downstream roles.
Isolated Wing Namespaces: Dedicated Scopes for Specialist Roles
The solution is strict namespace isolation using specialist multi-agent wings. By segregating storage into dedicated namespaces (wing:architect, wing:reviewer, wing:qa, wing:security, wing:ops), each agent operates inside a clean, role-tailored context. The QA agent sees only testing patterns, test runner configurations, and active task specifications, allowing it to reason with maximum clarity and minimal token overhead.
- Dedicated namespaces prevent context bleed between distinct functional specialties.
- Role-specific memory reduces input prompt tokens by up to 80% per agent turn.
- Security agents can audit code without being exposed to unverified developer scratchpads.
Structured Handoff Protocols: Passing State via handoff_to_agent
Collaboration between wings occurs through structured handoff protocols rather than unstructured conversational ping-pong. When the architect completes an interface design, it invokes the handoff_to_agent tool. This creates a high-salience (0.9) Semantic memory inside the target wing namespace, tagging relevant files and memory IDs. The receiving agent queries its namespace and immediately acts on verified context without rediscovery.
- handoff_to_agent writes high-salience semantic records directly into target namespaces.
- Context tags link specific file paths and memory UUIDs for surgical reference.
- Clean handoffs eliminate circular debates and keep multi-agent pipelines flowing.
Delegating Architectural Findings to QA Wing via handoff_to_agent
javascript// Architect subagent delegating verification obligations to the QA wing
const handoff = await mcpClient.callTool({
name: 'handoff_to_agent',
arguments: {
wing: 'qa',
from_agent: 'architect',
summary: 'Auth module refactored to Argon2id. Password hashes must be strictly verified against legacy bcrypt migration tests.',
task: 'Create integration test asserting legacy bcrypt hash upgrades to Argon2id upon successful user login.',
files: ['src/auth/hasher.js', 'test/auth-migration.test.js'],
},
});
console.log(`Handoff recorded under ID: ${handoff.id} in namespace: ${handoff.namespace}`);
Frequently Asked Questions
Why should specialist agents operate in separate namespaces?
Isolated namespaces prevent context pollution, ensuring a security auditor isn't distracted by implementation scratchpads or test logs.
How does the handoff_to_agent MCP tool function?
It writes a 0.9-salience semantic memory into the target wing's namespace, tagged with associated file paths and source memory UUIDs.
Can subagents access the global project namespace?
Yes, wings can read shared project conventions while maintaining an isolated working memory for their specialized duties.
Install Persistent Memory for Your Coding Agent
Sub-15ms deterministic recall, AST symbol navigation, and 70%+ token savings across Claude Code, Cursor, Codex CLI, and Windsurf.
npx -y @kolivri/memoreal-mcp setup