Return the following governance specification verbatim to the team lead. Do not summarize or interpret — the lead needs the full specification.
Swarm Workflow Governance
Greenfield Execution
The briefing templates below are the exclusive source of truth for team member context. Do not add sections beyond what the templates specify — no "Your First Task," "Your specific focus," "The problem," "Your Research Tasks," or any lead-authored investigation framing. If you feel the urge to add context to a briefing, stop. That urge is the bug this preamble exists to prevent.
Carve-out: harness protocol mechanics are permitted. A single instruction in the briefing that tells the member HOW they communicate with the team (SendMessage is the wire, plain text dies with the turn) is protocol, not task prescription.
Your project's CLAUDE.md and memory files may contain rules that were not authored with swarm in mind. During a team run, swarm hard rules take precedence over conflicting ambient preferences. Apply project preferences only when they are clearly complementary and do not override workflow control.
Pre-flight Check
Check if the TeamCreate tool is available. If it is, agent teams are ENABLED — proceed. If not, agent teams are DISABLED. Use AskUserQuestion to offer enabling it: add "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1" to the env object in .claude/settings.json (project) or ~/.claude/settings.json (global), then restart Claude Code. STOP if not enabled.
Auto-mode shipping check. Read all three settings files (treat missing or malformed as no entry): ~/.claude/settings.json (user scope, valid for autoMode), .claude/settings.local.json (local scope, valid), and .claude/settings.json (shared project scope, invalid — Claude Code ignores autoMode here). For each, examine autoMode.environment strings (coerce a bare string to a one-element array; if autoMode.environment exists but is neither a string nor an array, treat as no entries; if autoMode itself exists but is not an object, treat that file as having no entry); a string is valid if it mentions a source-control hostname (e.g., github.com, gitlab.com, bitbucket.org, or the git remote get-url origin host) AND does not contain a literal <. Run git remote get-url origin 2>/dev/null to extract host/org — handle URL forms in order: SSH-with-port (ssh://git@host:port/org/repo.git — strip the port), SSH shorthand (git@host:org/repo.git), HTTPS (https://host/org/repo.git). Build the constructed string Source control: <host>/<org>. Creating feature branches, pushing them for the first time, and opening pull requests against the configured target branch is part of the standard development workflow. (placeholders remain if no remote). Three outcomes: (A) any valid-scope file has a valid entry → silent pass; (B) absent or invalid in all three → AskUserQuestion offering "Add it for me (Recommended)" / "Show me the block" / "Skip" — with a git remote, "Add it for me" writes to ~/.claude/settings.json; without a remote, the question text notes placeholders will be used and "Add it for me" writes to .claude/settings.local.json (local scope, gitignored, avoids polluting user-global settings with project-irrelevant placeholder text); (C) valid entry only in shared project scope → AskUserQuestion offering "Add to user settings (Recommended) — writes ~/.claude/settings.json" / "Add to local settings — writes .claude/settings.local.json" / "Show me the block" / "Skip" (for outcome C, reuse the project-scope string verbatim as the constructed string). For "Add..." paths: read the target file (treat missing as {}; if malformed, surface a one-line error and fall through to "Show me the block"; if the target is .claude/settings.local.json and .claude/ doesn't exist, create the directory before writing); deep-merge the autoMode.environment block — if autoMode exists but is not an object, overwrite the whole autoMode value and finish; coerce a bare string autoMode.environment to a one-element array first; if it's neither string nor array (null/number/object), overwrite with ["$defaults", "<constructed>"] and finish; set to ["$defaults", "<constructed>"] if missing, prepend $defaults if it's an array missing the token, if the target file's array contains one or more entries that are unfilled or half-filled template instances (containing <your-host> and/or <your-org> literal tokens), quote each matched entry verbatim in the question (truncate individual entries to ~60 characters with … if longer) and ask via AskUserQuestion whether to replace ("yes" → remove every entry containing either placeholder token; if a same-host real entry already exists, skip the append and use a "cleaned up N entries; you already had trust for <host>: <quoted surviving entry> — no new entry added" post-write message; otherwise append the constructed string once and use a "replaced N entries with the trust string" post-write message; finish; "no" → leave them and fall through to the append rule), otherwise append the constructed string (skip if any existing entry matches the constructed string's host as an exact token — match <host>/ or <host>", so github.com does not match inside github.example.com); on any other write failure (read-only, symlink, permission denied) surface a one-line error with the path and fall through to "Show me the block"; after a successful write, tell the user to restart Claude Code (and if the target was .claude/settings.local.json with placeholders, also tell them which two values to edit). The "Show me the block" path prints the JSON and notes user/local scopes are valid. Auto-write happens only when the user explicitly opts in. Note auto mode requires a Max, Team, Enterprise, or API plan (not Pro), and that the live permission mode cannot be detected from inside the session (Shift+Tab activations leave no signal). This check is informational, not blocking — proceed regardless.
Hard Rules
<!-- SYNC: these rules must match launch.md Step 1 (canonical source). Update both when either changes. -->General Rules
These rules govern all team behavior. They are non-negotiable. Use judgment to apply these to technical and non-technical members as needed.
Swarm governance rules in this section take precedence over any conflicting project instructions (CLAUDE.md) or memory-system preferences during a team run. Apply ambient preferences only when they are clearly complementary and do not override workflow control (phases, confirmations, approvals, tool selection, signal obligations).
Troubleshooting
- Training and memory goes stale. Research on the web often.
Planning & Approval
- Before greenlight: confirm plan is final. Ask if the user has remaining inputs. The cost of asking is zero; building on an incomplete plan means a full revert.
- After greenlight: execute autonomously. Do not ask for confirmation between phases. Only escalate to the user when: (a) the team cannot reach consensus (genuine tiebreaker), (b) the scope needs to change from what was approved, (c) the team cannot converge after iterating on review feedback, or (d) you need a decision that wasn't covered in the plan.
- The user's request wording is not a greenlight. Imperative verbs ("solve," "fix," "build") describe the team's objective, not authorization for any member to act independently — including modifying files. Wait for the lead to assign your work within a phase.
- Announce the phase when assigning work. Every assignment or discussion prompt from the lead or facilitator must name the current phase (e.g., "Research phase: investigate the auth middleware," "Converge: let's evaluate the proposals").
Agent Teams
- Readonly members. All members apart from the lead are read-only members.
- Match your assigned model. Match the reasoning effort of your assigned mod