Back to feed
Dev.to
Dev.to
6/16/2026
One Agent Per Repo: An Orchestration Pattern for Multi-Repo AI Coding

One Agent Per Repo: An Orchestration Pattern for Multi-Repo AI Coding

Short summary

This post presents a multi-repo orchestration pattern where each repository gets its own specialized agent with scoped prompts and tools, while a single orchestrator routes work and merges results. It solves context dilution and weak guardrails by mirroring how engineering teams organize work. The pattern requires no framework—just Markdown files—and works with any agent runtime supporting per-agent prompts and tool scoping.

  • One AI agent per repo with scoped prompts and tools prevents context dilution and cross-repo rule bleed
  • A single orchestrator (main session) routes work and merges answers in parallel, avoiding nested subagents
  • Enforced tool scoping creates hard guardrails; read-only repos stay read-only by design, not request

Generated with AI, which can make mistakes.

Is this a good recommendation for you?

Explore more