sara. PT

Writing

An orchestrator that dispatches work across repos and never publishes

· agentic workflows· multi-repo· orchestration· release process

A feature that lives in one repo is a solved problem for us. The agent loop (spec, tests, implementation, review gates) works well inside a single codebase. The harder case is a feature that spans several: a shared API contract, a core package, a design system and the products that consume them. Each repo has its own session with its own context, and someone has to keep them coherent.

I’ve been building that someone. It’s a coordinating session that implements nothing itself. It dispatches.

The flow

The feature starts with a command that points at a file describing the dependencies between repos. From there:

  1. The orchestrator writes a briefing and a spec per repo.
  2. It shows me the status of everything and waits for confirmation. Nothing is sent before I say so.
  3. Wave 1, in parallel: the foundations. That’s the repo that owns the API contract, the core package and the design system.
  4. Wave 2, after wave 1 replies: the products, which depend on the core and the design system.
  5. Each session reports back its branch, commits, test results and any deviation from what the briefing proposed. Each repo gets its own item in the tracker.

The waves follow the dependency graph. The orchestrator isn’t smart about this; the dependency file is what makes the order obvious.

Picking the session is not a judgment call

The part I spent the most time on is the least glamorous: which session receives the message. A repo maps to a session, and the orchestrator lists the interactive sessions that match that repo’s naming pattern and counts them.

  • Zero matching sessions: it asks me to open one and sends nothing.
  • One: it shows the name and state, asks for approval, sends a single message and logs it.
  • Two or more: it stops and asks which one. It never chooses by age, state or order in the list.

That last rule came out of testing. In a real dispatch, three repos received the message and replied that they had it. Two others stopped, because each had two sessions open. That was exactly the intended behavior, and it’s the case where a “reasonable” tiebreaker would have sent work to a session holding the wrong context.

Building in parallel, publishing in sequence

Development runs in parallel, ordered by dependency. Publishing runs in sequence, and the order is fixed:

  1. The core package gets a tag.
  2. The design system is published to the private registry.
  3. The products bump their dependency versions.

Every tag and every publish needs my explicit authorization, every time.

What it is not allowed to do

This is the list I care about most:

  • Publish anything. Pushes, PRs, tags, registry publishes and deploys stay with me. A message from one session to another does not count as authorization, which closes the door on one agent telling another to go ahead.
  • Choose or create sessions on its own.
  • Copy the cross-repo contract. There is one owner file for it, and the briefings reference that file instead of restating it. Two copies of a contract are two contracts waiting to diverge.
  • Put personal data, tokens or keys in a briefing or in the tracker.

The pattern is the same one I use elsewhere: the agent can do the work, but the irreversible, outward-facing steps need a person. For an orchestrator that’s more important, not less, because it’s the one component that can reach every repo at once.

What’s proven and what isn’t

I try to keep this split honest, because it’s easy to blur.

Proven

  • The change was merged to the development branch.
  • 33 requirements were audited by a verifier agent that did not write the code, with a pass.
  • 20 injected mutations were all caught by the tests.
  • A real dispatch test ran end to end, as described above.
  • A previous feature already ran in this format.

One qualification: the test and mutation counts come from each repo agent’s own report. I haven’t re-run them independently.

Still missing

  • The tracker state cycle. The tracker’s MCP server wasn’t connected to the orchestrator session, so that part is unverified.
  • The zero-session case and the look-alike-name case (a repo whose name is a prefix of another’s) were only simulated.
  • A follow-up that adjusts for how the head office wants it: local branch, no push.
  • A decision on whether the tracker needs an “in review” state for this project.

Why bother

The alternative is me, copy-pasting context between terminals and remembering which repo is waiting on which. That fails quietly: a product gets built against a design system version that has since changed, and nobody notices until integration.

An orchestrator that only writes briefings and refuses to publish is a small amount of machinery. It turns “keep five repos in sync in my head” into “read a status table and say yes or no”, and it keeps the decisions that can’t be undone where they belong.