An agent organization structured as a company — 15+ departments, 125+ skills, each independently installable, citing the standards and regulators that settle the question. Runs in Claude Code and ChatGPT.
Bootstrap prompt
Paste this into a fresh Claude Code session in the target repo. Fill the four bracketed fields first; leave everything else alone.
Set up an orchestrator → specialist-subagent hierarchy in this repository, following
references/playbook.md (read it first, in full, before doing anything else).
Context:
- What this repo builds: [e.g. a portfolio of iOS/Android/Amazon casual games]
- Shared code it depends on or provides: [e.g. packages/core, consumed by the apps portfolio too — or "none"]
- What this codebase cannot afford to get wrong: [e.g. store-policy compliance, IAP/receipt validation, save-file compatibility across versions]
- Non-repo outputs: [e.g. App Store / Play / Amazon submissions, store listing copy, ad creative]
Do these in order. Do not reorder them, and do not start writing agent charters early — the order is the whole method.
Inventory the real trees. Run
git ls-files | sed 's|/[^/]*$||' | sort -uand read the actual directory structure. Report what you found before proposing anything.Propose a roster. Smallest set of agents where no two share a file. For each: id, class (
builderorreviewer), one-line remit, and the exact globs it would own. If you cannot state an agent's surface in globs, it is not an agent — fold it into a neighbor and say so. Pair every builder with a reviewer that did not write the thing. Number this proposal as a decision with lettered options and give me an explicit recommendation. Stop here and wait for my answer.Write
docs/AGENT-SURFACES.mdin the playbook's format — arosterblock plus onesurface:<id>block per agent, every agent starting atplanned. Assign every tracked path. No catch-all globs. Expect the exclusions to outnumber the inclusions; that is correct. Add the orchestrator's own surface for the context artifacts and the guard scripts themselves.Install
agent-guard.mjs, wire two scripts (agents:check,agents:diff), and iterate on the map untilcheckpasses. Paste the real passing output. Do not write a single charter until this passes — you now have a working control before any agent exists, which is the point.Wire the guard into CI and into whatever pre-merge script this repo has. Show me the diff of the workflow file.
Write the charters, one per roster row, using the playbook's §12 format. Every builder charter must contain the words "You never commit, push, or open a PR" and the six-section return contract verbatim. Reviewers get
tools: Read, Grep, Glob, Bashand no write tools. Flip each roster rowplanned→installedin the same commit as its charter; the guard checks both directions.Create
docs/DECISION-LOG.mdwith the numbering discipline from playbook §7.Write the orchestrator instructions (
CLAUDE.md): which agents exist, when to dispatch each, that builders never commit and the orchestrator is the sole committer, and that the live agent count comes fromagents:checkand is never written into prose.Prove it. Dispatch one builder on a small real task, run
agents:diff <agent>on its output before committing, and show me the result. If it fails, that is the system working — report the failure rather than fixing the map to accommodate it.
Rules for you while doing this:
- Write the map before the charters. Every path owned on paper before any agent exists to fight over it.
- No claim without output. When you say a check passes, paste the line it printed. "I could not verify X" and "X is clean" are different answers and must never be blurred.
- Never write an agent count into prose — not in
CLAUDE.md, not in the map, not in a comment. Print it from the check. - A comment claiming a guard ships with the guard, in the same edit. Never "next pass".
- Surface decisions to me as numbered items with lettered options and a bold recommendation. Never a bare question; never options with no recommendation.
- If the playbook and this repo's existing conventions conflict, say so and ask — do not silently pick one.
Follow-up prompt: dispatching work afterwards
Once the hierarchy exists, use this shape for every task:
Dispatch
<agent-id>to<task>. It writes inside its own surface and does not commit. When it returns, runagents:diff <agent-id>before you commit anything, and show me theVERIFIEDsection of its report. If it touched a path outside its surface, that is a bug in the dispatch or the map — tell me which, do not just fix the file.
And for anything customer-visible or irreversible:
Before this merges, run
<gauntlet-reviewer>and<domain-reviewer>in parallel. If they disagree, give me both readings and name the agent behind each — do not pick one.