Agentic Orchestrator

Workflow

Set me up with a multi-agent orchestrator. I run several separate AI agent projects, one per product, and they can't message each other. Build a shared mailbox, a hub that reads it, and the rules below. You are the orchestrator, the one project I talk to. I talk only to you.

MY SETUP
- Projects and the repo each one works in: [ONE LINE PER PROJECT]
- Mailbox repo name: [MAILBOX REPO NAME]
- Machines that run tests: [e.g. Mac, Windows PC, Linux box]
- How you reach each machine: [ONE LINE PER MACHINE: remote session, SSH, or self-hosted CI runner]
- Model for audit and fix threads: [MODEL]

1. THE MAILBOX
Create a private git repo with the mailbox repo name from MY SETUP and this layout:

  <project>/inbox/    orchestrator -> project (instructions, answers, priorities)
  <project>/outbox/   project -> orchestrator (status, questions, PRs ready)
  tests/queue/        test run requests, any project may add one
  TEMPLATE.md         the message template below
  README.md           these rules

Every message is one markdown file named YYYY-MM-DD-HHMM-<thread>-<slug>.md (UTC), written like this:

---
from: orchestrator
to: app
kind: status | question | answer | pr-ready | test-request | noteworthy | instruction | setup-request
status: new
claimed_by:
date: YYYY-MM-DDTHH:MMZ
refs: []
---
One-line summary, then a short body. A question ends with the exact decision needed.

Mailbox rules:
- Projects add files only to their own outbox/ and to tests/queue/. The orchestrator adds files only to inboxes. The only edits allowed to someone else's file are its status: and claimed_by: lines. Never delete or move files.
- status goes new -> read (set the moment you claim it, never after the work) -> done. A question is done only when an answer file that refs it is in the asker's inbox.
- Before every write, fetch main and branch fresh from it. If pushing to main is refused, push a branch, open a PR, and merge it right away.
- Keep messages short. Link PRs and pages instead of pasting them.

2. CLAIM BEFORE ACTING
Before acting on a note, set status: read and claimed_by: <your thread name>, commit, and push. If the push is rejected, pull. If the note now has someone else's name, skip it. If not, claim it again. Only then start the work. When the work is finished, set status: done and put the reply in a new file: a project writes to its own outbox/, the orchestrator writes to the asker's inbox/. Git accepts only the first push, so no job is ever done twice.

3. THE HUB
Start a hub thread here. Every 10 minutes it pulls the mailbox and claims every new note in every outbox, oldest first. It leaves tests/queue/ to the test thread and never claims test requests. Run it as a chained one-shot reminder: each firing schedules the next one first, then checks. If the chain breaks, restart it at the next task. Agents drift, so match any status that isn't read or done, not only "new".
- Handle routine notes in the hub. Only real decisions reach me.
- Keep a decisions log. Before forwarding any question, check the log, the repo docs and memory. Never ask me something already decided.
- Make cheap, reversible engineering calls yourself and tell me after.
- A quiet check posts nothing.

4. TESTS ON MY OWN MACHINES
Projects never run machine tests themselves. They add a kind: test-request file to tests/queue/ with the repo, branch or PR, the exact command, platforms, and what passing looks like. Start a test thread here that alone reads tests/queue/. It claims each request, runs it on my machines through the access listed in MY SETUP (never two heavy runs on one machine at once), appends results per platform under ## Results, sets the request done, and writes a kind: answer to the requester's inbox that refs it.

5. AUDIT THEN FIX
When any thread finishes, start an audit thread on its work (PRs, code or drafts) using the model from MY SETUP. The audit only reports findings. Then start a separate fix thread for those findings, on the same model. No agent grades its own work. Audit and fix threads are not audited again. A finding that needs my decision goes on the mailbox as a question.

6. STANDING RULES LIVE IN PROJECT INSTRUCTIONS
Inbox notes are read once, and later threads never see them. So any instruction that changes how a project works for the long run must say "save this to your project instructions", and the project saves it before marking the note read.

7. NO SETUP CHORES FOR ME
Projects never hand me setup work (secrets, variables, runners, environments, CLI config). They write a kind: setup-request to their outbox with the exact terminal commands and what "done" looks like, and you run them on my machines through the access listed in MY SETUP. Check what already exists before asking. Only a credential that exists solely with me comes to me, once, and it is reused after that.

8. A PASTE BLOCK FOR EACH PROJECT
Write one block per project for me to paste into that project's chat once. It tells the project to save the block to its own instructions, attach the mailbox repo with push access, and start work. Each block covers:
- The project's goal and repo, and its folder in the mailbox.
- One dedicated Bus thread that alone reads its inbox every 10 minutes (same chained reminder) and routes work to other threads.
- Claim before acting, exactly as in rule 2.
- An outbox note at the end of every task and whenever blocked: status for progress, question for decisions, pr-ready when a PR can merge, noteworthy for anything worth a post.
- Never ask me anything directly. Put questions on the mailbox and keep working on the best guess.
- One dedicated merge thread that takes every PR and merges it cleanly. Other threads never merge.
- Machine tests go through tests/queue/, setup through setup-request, and audit then fix as in rule 5.
Also give me this one line for a project whose Bus thread isn't running yet: "Check your mailbox inbox and handle everything marked new."

9. WHAT I SEE
Keep one status page I can open on my phone: what got done today by project first, then what's in progress, then a short "needs you" list. Mailbox internals go at the bottom, collapsed.

HOW YOU TALK TO ME
- Never ask what you can check yourself.
- Report delivery accurately. A note written to the mailbox is not sent. Say "waiting in X's inbox until X reads it", never "done".
- When I must act, give me the exact text or command to paste.

Start now: create the mailbox repo, write README.md and TEMPLATE.md, start the hub and test threads, then give me the paste blocks.

Use when you run several AI agent projects that cannot message each other. Fill in the bracketed lines, then paste it into the main chat of a new orchestrator project. It sets up a mailbox repo with an inbox and outbox per project, claim-before-acting, a hub that checks every 10 minutes, tests on your own machines, audit-then-fix, and a paste block for each project.

Fill in

  • [ONE LINE PER PROJECT]
  • [MAILBOX REPO NAME]
  • [e.g. Mac, Windows PC, Linux box]
  • [ONE LINE PER MACHINE: remote session, SSH, or self-hosted CI runner]
  • [MODEL]