Accelerate your multi-agent coding by giving every microservice a coding agent and back that up with an architectual guardian.
The idea: an agent per service
A recent project I worked on had 15+ services that coordinate over a service bus. Each service owned its own DB schema, and the rules about who may talk to whom are strict. One general-purpose coding agent working across all of it has to hold every service’s conventions in its head at once, and sometimes it gets the small things wrong.
The obvious move is to replicate the real world software development team. However, a simpler approach is a persona per service. A collection agent knows the collection service’s schema, routes and topics. An orchestrator agent knows the workflow engine’s state machine. Each is cheaper to brief, faster on routine tickets, and harder to confuse. We also hoped the specialists would push back on poor architectural decisions.
The catch: Checks and Balances
The mistakes that cost us most are not inside a service. They sit between services:
- one service reading another service’s tables;
- a new synchronous call where the design says events;
- document content put into an event that only ids should travel in;
- a code path that branches on “local” versus “cloud”.
An agent that only knows its own service will make each of these quite happily. From inside the service, the change looks clean. A specialist sees less of the system than a generalist, so it is worse placed to notice when its local fix breaks a global rule.
So specailization helps with doing the work. Defending the architecture needs something that looks across services, and something that does not depend on an agent remembering to look.
What’s already out there
I found no published pattern of one coding agent per microservice. The pieces are written up separately, and together they point the same way.
| Idea | Where it comes from | What it adds |
|---|---|---|
| Knowledge scoped to a directory | Start Debugging , May 2026 | Per-service CLAUDE.md files and path-scoped rules load only when an agent touches that part of the tree. The knowledge belongs to the service, whoever works on it. |
| File ownership and review gates | Addy Osmani , Mar 2026 | Each agent gets its own file scope, with “Never let two agents edit the same file” as a hard rule. Hooks run lint and tests on finished tasks, and a read-only reviewer checks every one. |
| Fitness functions | Neal Ford and Mark Richards , Nov 2025 | An objective, automated check on an architectural property, like a unit test for architecture. |
| Agentic fitness functions | InfoQ , Aug 2026 | Deterministic checks stay the hard gates. An LLM judge, isolated from the agent that wrote the code, scores what can’t be checked mechanically against a versioned rubric. |
| Fitness checks built for agents | archfit , Jun 2026 | Checks forbidden dependencies, layering and cycles in CI, and reports violations as repair tasks an agent can act on. |
| Add agents only when it pays | Matt Asay, InfoWorld , Apr 2026 | Multi-agent systems bring distributed-systems costs. Start with one well-instrumented agent, and split only for context, parallelism or real specialisation. |
The common thread: agents follow hard constraints far more reliably than written guidance. Rules that matter should fail the build, and a judging agent should cover only what a build can’t decide. Osmani’s post is by someone who works on Claude Code, and the subagent details vary by tool version, so it’s worth checking the official docs before building on them.
The design: owners do the work, checks and guardians hold the line
Split the job in two. Service owners, one per service or close-knit group of services, do the work inside their boundary. Guardians, one per concern (architecture, event flow, access control), review across boundaries. Underneath both sit fitness functions: deterministic checks in CI that fail the build when a rule is broken, whoever broke it.

An owner never edits outside its service. A change that crosses a boundary becomes a written request that the architecture guardian rules on. Everything else has to pass the CI checks and the guardians before it merges.
Making it hold up
- Keep owner charters thin, and in four parts. Owns: its schema, routes, topics and outbox. Never does: the rules most often broken for that service. Stops and hands back: any change to an event, a synchronous call, a field another service reads, or a contract migration. Reads first: the service’s README and design docs, linked rather than copied.
- Generate the facts. Derive each owner’s published and subscribed topics from the event registry and the service’s subscription list, and fail CI when a charter disagrees with the code. Hand-written charters go stale within a month, and a stale agent is confidently wrong.
- Enforce the edit boundary. A pre-edit hook can refuse writes outside the owner’s own service directory and tests. The file-ownership rule then holds without relying on the agent’s restraint.
- Turn boundary rules into tests first. No imports across services. No reads of another service’s schema. Synchronous calls only on an allow-list. Events carry ids, not content. No local-versus-cloud branches. Each of these can be a lint test that fails the build.
- Choose models by role. Owners doing routine tickets can run on a smaller, faster model. Guardians, whose job is judgement, get the strongest one.
- Pilot before rolling out. Start with three owners on the busiest boundaries: the workflow orchestrator, the document store and the pipeline workers. Run them on a real ticket batch, compare against one general agent plus review, and grow only if they earn it. Asay’s warning about multi-agent overhead applies: multi-agent setups cost several times the tokens of a single agent.
One detail to verify before relying on it: whether a subagent may start its own subagents depends on the tool and its version. Don’t design owners that delegate further. Let the main session coordinate owners and guardians.
Sources
- Addy Osmani, The Code Agent Orchestra: what makes multi-agent coding work , March 2026
- Hemant Kumar Mahato, Łukasz Sieczkowski and Vijayasenthilkumar Kuppusamy, Agentic fitness functions , InfoQ, August 2026
- Neal Ford and Mark Richards, How agentic AI empowers architecture governance , O’Reilly Radar, November 2025
- archfit v0.5.2 , architecture-fitness checks for AI agents and CI, June 2026
- Start Debugging, How to structure a monorepo so Claude Code’s context stays small , May 2026
- Matt Asay, Multi-agent AI is the new microservices , InfoWorld, April 2026
- Morph, Subagents: how they work in Claude Code, Cursor, Codex, VS Code , 2026 (vendor page; used for subagent nesting and file-conflict behaviour)