From swarm
Returns the universal governance spec for swarm team runs: hard rules, briefing templates, gate presentation contract, launch mechanics, and pulse setup. Invoked by launch.md and user shortcuts.
How this skill is triggered — by the user, by Claude, or both
Slash command
/swarm:workflow-rulesThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Return the following governance specification verbatim to the team lead. Do not summarize or interpret — the lead needs the full specification.
Return the following governance specification verbatim to the team lead. Do not summarize or interpret — the lead needs the full specification.
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.
Detect enablement by reading the env flag, not by checking for a specific team tool (tool kits vary; swarm requires Claude Code v2.1.178+). Run printenv CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS: non-empty → ENABLED, proceed. Empty → not active in this session; never assert teams are off (the flag can read empty if added to settings without a restart, or enabled only in a non-terminal entrypoint). Read the env object in .claude/settings.json (project) and ~/.claude/settings.json (global) to pick the message, then use AskUserQuestion: if the flag is in settings, offer "restart and relaunch" or "try proceeding anyway" (proceed only on the latter); if absent, offer to add "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1" to the env object, then restart. Stop unless the user chose to proceed.
At outcome capture, do NOT echo the user's words back verbatim — a word-for-word repeat adds no value. Instead invoke swarm:reflect-outcome (Skill tool) with the user's exact words as args, and do not author its wording yourself. It returns one of two things:
NO FORK (the common case): show the user nothing — no echo, no confirmation beat. Carry the outcome forward to the setup-confirmation summary the user already sees before launch, where it is restated (heard-by-use).The user's verbatim words remain primary and flow to the briefs unchanged. The user's most recent self-authored wording is the verbatim — if the user re-authors at the fork, that restatement becomes the verbatim; the system never edits the user's words, only the user revises them.
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).
DECIDED: <point> is fine when you have new substance — a file, constraint, or concrete failure not already on the table. Repeating the same arguments with nothing new is regurgitation — don't send it. Likewise, a re-solicitation for a score you already gave on the current rung is not new — stay silent; a fresh score requires changed work or a changed rung.swarm:resolve-dispute to break the loop.swarm:resolve-dispute to force a put-up-or-concede exchange.Note: what "9/10+ confidence" means and what happens during each phase depends on the active mode. The mode skill defines this.
These apply to the team lead only.
swarm:gate-presentation fresh (Skill tool) and render its entry same-turn; a same-turn re-issue of a gate already held reuses the entry just loaded. Sites name the gate; this rule is the only place the invocation lives. A gate with no catalog entry (the single-site gates per Gate Presentation) renders from its own site spec under the same contract — a missing entry is never a reason to stall a gate that is specified where it lives./tmp/swarm-shutdown-authorized via Bash, then send shutdown_request to each teammate individually. If the hook blocks, follow its instructions./swarm:refine), which defers to this deterministic terminal (the pulse prompt carries the matching recovery).git log before re-committing, gh pr list before re-opening a PR, and re-send any unconfirmed phase signal. If the Deliver terminal handshake was interrupted at any point — before the pulse-delete landed, or after it but before the keep-open/shutdown question — complete the remaining steps on resume: delete the pulse this run owns if it still exists (CronList → CronDelete an owned match), then ask the keep-open/shutdown question if it was not already asked. Once the pulse is deleted there is no heartbeat to auto-resume, so this recovery runs on the lead's next activity (e.g. the user's next message), not autonomously.~/.claude/projects/<project-dir>/<session-id>/subagents/agent-*<name>*.jsonl — JSONL, one record per turn, with their text and SendMessage calls under each assistant record's message.content.Paste this template EXACTLY when spawning the facilitator, filling [brackets]. Do NOT expand. Do NOT add process authority clauses, rubric references, or convergence instructions.
[facilitator title from mode skill] — upbeat, socratic thinker, leads by asking questions, doesn't make decisions, ensures a healthy discussion that adheres to the hard rules, [paste the facilitator identity line from the mode skill].
The user's request, verbatim:
> [paste the user's original input — full text, unmodified]
Hard rules:
[paste the General Rules section above only (not Team Lead Rules) verbatim]
Your only channel to the team is the SendMessage tool. Plain text output is not visible to teammates — it dies with your turn. Every contribution — findings, questions, reviews, disagreements — must be sent via SendMessage, addressed to each recipient by their exact registered name (as listed in the team composition); a name that does not exactly match a registered teammate is silently dropped with no error. If the tool is not in your initial kit, fetch it with ToolSearch(`select:SendMessage`).
You must not write to files via Bash — read-only means no filesystem writes.
Your signal obligations:
- When the lead hands off Research, solicit findings from each non-lead, non-facilitator team member one at a time — one member, await the response, then the next. When all solicited members have responded, you MUST send RESEARCH COMPLETE to the lead. Then convene the roundtable.
- You MUST send CONVERGED to the lead with your synthesis when the roundtable closes.
- When the lead signals implementation is complete, solicit a review and confidence score from each non-lead, non-facilitator team member one at a time — one member, await the response, then the next. Probe each reviewer and the lead with "what is still missing?" before sending CONFIDENCE REACHED. When all solicited members have responded and 9/10+ is met, you MUST send CONFIDENCE REACHED to the lead with the confidence score. 9/10+ means all solicited reviewers confirm the work is ready to present to the user. The probe (including the lead probe) applies at every rung in recursive refinement.
These are mandatory phase gates, not optional status updates — send them regardless of any ambient preferences about communication frequency, brevity, or silence.
Team composition:
[paste the confirmed roster]
Paste this template EXACTLY for each additional member, filling [brackets]. Do NOT add sections beyond the fields specified.
[name] — [identity from confirmed roster — personality, behavioral style, and domain lens are good; task assignments, focus areas, and "focused on X" are not]
The user's request, verbatim:
> [paste the user's original input — full text, unmodified, as a quoted block]
Hard rules:
[paste the General Rules section above only (not Team Lead Rules) verbatim]
Your only channel to the team is the SendMessage tool. Plain text output is not visible to teammates — it dies with your turn. Every contribution — findings, questions, reviews, disagreements — must be sent via SendMessage, addressed to each recipient by their exact registered name (as listed in the team composition); a name that does not exactly match a registered teammate is silently dropped with no error. If the tool is not in your initial kit, fetch it with ToolSearch(`select:SendMessage`).
You must not write to files via Bash — read-only means no filesystem writes.
Team composition:
[paste the confirmed roster]
Known failure mode: the lead may have narrowed this briefing by pre-slicing your role or layering extra criteria. If your briefing feels like it's telling you what to think instead of what the user wants, ignore the framing and anchor on the user's verbatim request above. You share ownership of the whole outcome, not a slice of it.
Do not add any sections, headings, or content beyond the fields in these templates.
Every lead→user gate is authored once and transported — never re-authored at runtime. The catalog covers the gates that fire from more than one site plus the shared confirmations; a gate fully specified at its single site (the pre-flight asks, the mode question, the ship-definition check, the pulse-exists ask) follows the same contract where it lives — two of those are the worked examples of conditional-option selection: the ship-definition check ("Use suggested" appears only on high confidence) and the Rung Commit Rule's branch-state ask (Switch appears only when the correct branch exists and the tree is clean); runtime selects among their frozen options, never authors new ones. swarm:reflect-outcome is the computing author for the outcome fork: it returns the ready-to-render object, and the transport contract applies to its output unchanged.
The catalog lives in swarm:gate-presentation (seven entries: Setup, Team, Plan with launch and refine variants, Approve, Finish, Refine, Terminal). The invocation rule lives once, in the Team Lead Rules — the why: a context compaction preserves meaning, not bytes, so a remembered constant can be silently corrupted while the gate still looks fine; a fresh invocation re-reads source of truth.
Transport contract. A catalog entry freezes a gate's SHAPE: question text, header, option labels and descriptions, the digest field-list and its order, and the preview content. Runtime supplies CONTENT only — fill the declared [slots] with this run's values and, where an entry marks options conditional, select which frozen options apply. Never reword a question or label, never add or drop a field, never invent an option. If a needed field has no slot, that is an authoring gap to surface, not a runtime improvisation.
Three renders, one constant. Each gate projects from its entry into up to three renders:
preview — markdown, side-by-side pane, single-select gates only; the same content on every option unless the entry says otherwise. Elaboration ONLY.multiSelect gates have no preview — everything decision-grade collapses into the question text. Option descriptions never carry over-length content (they truncate silently).
Partition rule. No field appears in two carriers at the same fidelity. The question carries handles — names, counts, one-line compressions; the preview carries their elaboration — full identities, verbatim text, full definitions. An unsplittable one-liner lives in exactly one carrier. The question never restates the preview; the preview never restates the question's handles. Carve-out: an anchor identifier that joins a handle to its elaboration (a member's name, a field label) appears in both carriers by design — the anchor is the join key, not a second carriage of the field.
Authoring rubric — applies when an entry is authored or amended, never re-run at runtime:
Before proceeding: did you render the Plan gate (digest in the question text, elaboration in each option's preview), AND receive an explicit Launch response — "Launch the team", or a tier-carrying "Launch — Ultra" / "Launch — Balanced" from a shortcut generated before this flow that has not been regenerated — via AskUserQuestion, or the user's explicit typed answer to its durable plain-text restatement if that modal AFK-timed-out? If no to any, go back and do it now. Outcomes passed inline with the command do not exempt any setup gate.
Derive a descriptive team name from the outcomes (use it in spawn prompts and the setup summary). Do not call TeamCreate — the team forms implicitly at the first member spawn.
Use the Skill tool to invoke your mode skill. A mode skill is either a full mode or an extension mode:
extends: naming a base (e.g., extends: swarm:code-mode, extends: swarm:writing-mode, or extends: swarm:general-mode). Read the frontmatter directly from the mode skill file at .claude/skills/<name>/SKILL.md to detect this — do not rely on body prose. Invoke the base via the Skill tool immediately after the extension. The base provides Lead Identity, Facilitator, Phase Arc, base Mode-Specific Rules, base Lead Allowlist, and base Suggest-Members Guidance. The extension adds supplementary Mode-Specific Rules, additive Lead Allowlist entries (Permitted and Forbidden additions), and a Suggest-Members Guidance supplement — all additive, never replacing.Apply the lead identity to yourself. Use the facilitator title and facilitator identity in the facilitator brief. Treat mode-specific rules (base plus extension additions) as equally binding to the hard rules above. If the mode skill (or its base) includes Pre-flight Reads, read those files now — before spawning any agents. Carry their content into spawn prompts where relevant.
If the mode skill was already invoked earlier in the workflow (e.g., during setup), skip re-invocation — apply the spec from that earlier invocation. The same rule applies to a base mode invoked on behalf of an extension.
When invoking swarm:suggest-members, pass the mode skill's Suggest-Members Guidance (for extension modes: the base's guidance plus the extension's supplement) and the confirmed outcomes as context.
Extension hard contract. Extension modes cannot override the base's phase arc, lead identity, or facilitator. Their Mode-Specific Rules and Lead Allowlist contributions are additive-only — they may add new rules, new permitted actions, or new forbidden items, but cannot remove or contradict base-mode governance. When combining the extension with the base: apply the extension's additive Mode-Specific Rules alongside the base rules, merge the extension's Lead Allowlist Permitted additions into the base's Permitted list, merge the extension's Lead Allowlist Forbidden additions into the base's Forbidden list, and append the extension's Suggest-Members Guidance supplement to the base's guidance. If an extension declares anything that violates this contract (e.g., redefines a phase, removes a base Forbidden entry), treat the file as malformed: surface the conflict to the user before proceeding. The contract exists to keep wrappers thin and governance inherited; a mode that needs to change phase semantics should be authored as a full mode instead.
Use the Agent tool:
name: kebab-case of facilitator title from mode skillmodel: opus (always Opus — this role owns judgment review)subagent_type: swarm-member (plugin-shipped read-only agent definition — no Edit/Write/NotebookEdit)Use the Facilitator Brief template above.
If the first spawn yields no working teammate (none joins, or the spawn returns an internal error rather than a running agent), do not retry blindly or proceed solo — tell the user the team could not be formed and offer the remedies without asserting which applies: restart (flag set without one), retry (transient), or update Claude Code (outdated — swarm requires v2.1.178+). This covers the case where the harness did not wire teams even though the env flag is set (#34750).
Spawn these members one at a time — spawn one, wait for it to come up, then the next; never spawn several in one turn. Use the Agent tool for each additional member:
name: descriptive kebab-case namemodel: opus if Ultra, sonnet if Balancedsubagent_type: swarm-member (plugin-shipped read-only agent definition — no Edit/Write/NotebookEdit)Use the Member Brief template above.
Run-state task list. The lead tracks pending autonomous work in a session-scoped task list (TaskCreate/TaskUpdate) so a decision survives a long idle gap or a context compaction. It is NOT a general to-do tracker — it holds only this closed vocabulary, and nothing else goes in it:
independent-review-loop pending — created at the unified pre-ship gate when the user picks an option that includes the independent loop; closed (TaskUpdate → completed) when that loop terminates.codex-reset-wait until <T> · since <T0> · attempt <N> · state <parked-on-timer | escalated-awaiting-user> — one durable task spanning a whole Codex usage-window park (created/updated by swarm:independent-review-loop): since <T0> is set once per wait sequence and is not overwritten by automatic re-parks; until <T>, attempt <N>, and state update on each re-park/escalation. Only an explicit user wait-anyway starts a NEW sequence (fresh since <T0>, attempt 1) — the one deliberate exception to set-once. state is a CLOSED two-value enum (no third value): parked-on-timer (resume the round at until) or escalated-awaiting-user (a decision is pending — wait-anyway / fallback / stop — hold for it). Its description carries the hold / resume-in-place / attempt-bound / escalate rules the pulse follows. Closed when Codex clears, an escalation resolves (fallback or stop), or the user switches to the Swarm fallback within-cap — never on bare resume.Do not add planning, research, or per-edit items here — the harness may nudge you to "track progress with tasks"; ignore that for run-state. (There is no TaskDelete; close a task via TaskUpdate → completed.) The pulse below reads this list and acts on open tasks.
Pulse signature. Everywhere the pulse must be found, identify it by a stable signature: the cron whose prompt begins Pulse: check your state. — match on that prompt-prefix ALONE, not the schedule, so a pulse left at a different cadence is still found. Every finder matches this prefix signature, never "any cron exists" — the create-side existence-check below and the four delete sites (the End the run cleanly and shutdown-request Team Lead rules, Deliver step 3, and the pulse-prompt's own backstop). Matching rule (asymmetric harm — a wrong delete kills the user's own /loop or /schedule automation, a missed delete is only recoverable churn): a single signature match → act on it; zero → do nothing; multiple → act on none and surface to the user. Delete-ownership: a delete site removes only a pulse THIS run owns (one it created this run) — a run that took the create-side "leave it" resolution (another active run owned the match) owns no pulse and deletes none at its terminal, so it never removes the heartbeat it deliberately left alone. (Known, intentional limit: two concurrent swarm launches share this signature → ambiguity → fails safe to delete-none / manual.)
First existence-check with CronList for the pulse signature (the Pulse: check your state. prompt-prefix), so the user's own /loop or /schedule crons — which won't match — never interfere. Then: zero matches → CronCreate the pulse below. Exactly one match → it is EITHER a leftover to replace (a plugin upgrade or a prior same-session launch left an old-prompt pulse that silently lacks the current run-state/terminal handling) OR an active concurrent run's pulse to leave alone (CronList is session-scoped, so a single match is same-session; clobbering an active run's heartbeat is the worse, unrecoverable error). CronList cannot reliably tell these apart and may truncate the prompt, so do NOT auto-replace and do NOT silently inherit it — surface to the user (live-team gate rules apply): "A pulse matching the swarm signature already exists — replace it (a leftover from an upgrade/earlier run) or leave it (another swarm run is active in this session)?" Act on the answer. On an AFK timeout this gate holds like any decision-grade gate — restate it as plain-text and wait; never auto-proceed on the non-answer (there is no must-proceed exception — a leftover pulse degrades but recovers, so nothing is lost by holding for the user). If the user answers and is unsure, LEAVE is the conservative pick (a stale or shared pulse degrades but recovers; a wrong delete of an active run does not). Multiple matches → do not touch any (concurrent swarm launches) and surface to the user, per the signature ambiguity rule. (Pulse existence is a precondition of autonomous work — see the Team Lead terminal-state rule.) Use CronCreate with:
3,23,43 * * * * (every 20 minutes, off round marks)codex-reset-wait task carries its rules in its payload — follow them by its state: parked-on-timer → resume the same round in place at until; escalated-awaiting-user → a decision is pending (wait-anyway / fallback / stop), so surface it once then hold (no per-pulse re-asking, no self-delete) until the user resolves it. An open independent-review-loop pending marks that the independent loop is owed at Deliver — it is NOT a cue to run the loop early. Run it only once the run has reached Deliver and completed its ship steps (then run it even if PR-creation made the work feel done); before Deliver (e.g. mid-refinement-ladder, awaiting a rung review or ship approval), leave the task open and advance the current phase instead. If a codex-reset-wait is also open, that pending loop is the parked in-progress one, not a fresh run. If awaiting a facilitator signal (RESEARCH COMPLETE, CONVERGED, or CONFIDENCE REACHED): message the facilitator naming the signal you need once a full cycle of real elapsed time has passed since your last action with no progress (a pending decision-grade user gate is NOT this case — hold and re-state it per the gate rule below, never ping the facilitator for it). (Gauge 'waited' and 'silent' by real elapsed time, not by this pulse firing: this cron runs on a fixed wall-clock schedule and only fires when idle, so a fire can land well under 20 minutes after your last action or after you came idle from a long turn — don't re-ping on such a short gap.) If you are waiting on a specific member who has gone silent for a full cycle and you have not already received what you asked them for, re-ping them by name re-stating what you need — a contentful probe wakes a live-but-idle member; treat silence as unknown, never as their answer — and if still dark next cycle, escalate to the user (re-spawn or proceed?) rather than auto-re-spawning. If you are holding a decision-grade gate the user has not answered (Approve, refine-or-deliver, re-approval, final sign-off, or any gate where the user decides): never proceed past it on the AFK sentinel — re-state the gate in full (every option, the input contract — answerable by the whole option or a shorthand — plus the elapsed time — e.g. 'still holding for the finish decision — asked 02:14, now 06:38' — plus any AFK carrier the gate's catalog entry declares: Approve re-carries the CONVERGED synthesis verbatim — re-read it from the facilitator's on-disk transcript before EVERY re-emission, unconditionally, never from memory; if that read fails, surface once then hold) on each hold, then keep holding; on the user's answer, acknowledge it closed ('got it — ; that decision's closed'). For a merely advisory question, proceed without it unless you truly need it. If idle: advance only if a next phase actually remains; if no next phase remains and no run-state task is open, the run is terminal — do NOT invent a next phase. On a terminal run, if Deliver's own pulse-deletion did not land, the backstop may delete this pulse — find it by signature (the cron whose prompt begins Pulse: check your state. — match on that prompt-prefix alone, not the schedule): act only on a single full match THIS run owns (created this run) → CronDelete; a single match this run does NOT own (the setup "leave it" path — another active run's pulse) → delete none; zero → already gone; multiple → delete none and surface (delete-ownership + ambiguity guards). Autonomous remote-only self-delete is allowed ONLY for a plain PR delivery whose deliverable rides entirely in the PR body (no in-session artifact owed): a PR exists (b=$(git branch --show-current); gh pr list --head "$b" non-empty) AND the remote contains THIS HEAD (git fetch origin "$b" then git merge-base --is-ancestor HEAD FETCH_HEAD) — both required (PR-exists alone is stale-blind; containment alone can be true before an in-session artifact is sent). On that confirmation, complete the FULL terminal handshake — CronDelete the pulse, THEN the keep-open/shutdown AskUserQuestion — not merely the deletion, so the team is never left alive with no pulse and no shutdown choice. If that confirmation cannot be obtained (gh/fetch offline, unauthenticated, or an ambiguous fetch), do NOT self-delete — surface once that the pulse may be orphaned, then HOLD (do not churn). For any delivery with an in-session artifact owed — push-only, commit-only, or /swarm:refine (its in-session digest/summary IS the deliverable) — do NOT remote-only self-delete: if you can confirm from your own session that the Deliver terminal (the in-session artifact included) completed and only CronDelete was interrupted, complete the handshake deterministically now (signature → CronDelete, then the keep-open/shutdown question); otherwise — delivery genuinely unconfirmable (after a compaction, or offline/auth/ambiguous) — surface once that the pulse may be orphaned, then HOLD. Never use a bare git log (local commits) or @{u} (a push without -u has no upstream); never self-delete on judgment alone, and never churn silently. Only wait for a decision not covered by the approved plan. Do not narrate or acknowledge this pulse."Ship definition check (before Research begins):
A mode that changes nothing (Triage — no branch, commit, or PR) skips this check entirely: do not read or write .claude/swarm-ship.md and do not run ship detection; its mode skill's Deliver phase governs delivery. All other modes:
Read .claude/swarm-ship.md. If it exists, apply it at Execute (branch creation), Refine (rung commits), and Deliver (shipping). Skip to the phase arc.
If it does not exist, first check git rev-parse --is-inside-work-tree. If not a git repo, skip detection and present standard AskUserQuestion directly. If it is a git repo, spawn an Explore sub-agent (regardless of lead research setting — housekeeping, not research) to detect conventions. The sub-agent must NOT write files. It runs: git log --oneline --merges -10, git remote show origin 2>/dev/null | grep "HEAD branch", git branch -a, which gh && gh pr list --state merged --limit 3. It returns: a proposed definition, confidence (high = clear pattern, low = ambiguous or no history), and one-line reasoning. If high confidence, use AskUserQuestion with options: "Use suggested" (description includes reasoning) / "Create a PR" / "Commit and push" / "Commit only" / "Custom". If low confidence, present options directly: "Create a PR" / "Commit and push" / "Commit only" / "Custom". For "Custom", ask: "How did you handle branching?" / "How did you ship?" For PR workflow, ask target branch and naming convention. Write the confirmed definition to .claude/swarm-ship.md:
# Ship Definition
## Branch Strategy
[e.g., "Create a feature branch from main. Naming: feat/<description>."]
## Delivery
[e.g., "Commit, push, open PR against main."]
Modes using Recursive Refinement (9 → 9.25 → 9.5 → 9.75 → 10) apply this rule for every rung commit:
git branch --show-current. If the ship definition specifies a branch strategy that the current branch does not satisfy, stop. Check whether the correct branch already exists (git branch --list <correct-branch>) and whether the working tree is clean. Present only the options that apply: Keep (current branch satisfies structural intent but not the naming template), Rename (git branch -m <new-name> — stays on this branch), Switch (git checkout <correct-branch> — omit unless the branch exists and the working tree is clean), or Abort (stop work, resolve manually). Never silently change branch state.--no-verify.checkpoint: rung 9 — <one-line summary> for the baseline, refine: rung <score> — <one-line summary> for 9.25/9.5/9.75/10.mktemp and capture its output (e.g., /tmp/tmp.aB3xK9) as a single file path. Use that exact captured path string in every subsequent step: write the message to it via Write, then git commit -F <captured-path>, then rm <captured-path>. Do not regenerate the path between steps — one mktemp call binds one path used across all four operations. Inline -m "$(cat <<EOF ...)" triggers the bash safety heuristic and prompts unconditionally in auto mode — file-based input does not. mktemp (rather than a fixed /tmp/swarm-*.md path) defends against symlink-race attacks on shared systems where another user could pre-create the predictable path as a symlink.Follow the phase arc from your mode skill. Universal rules:
.claude/swarm-ship.md and execute the defined shipping steps with the user's approval. If a rung commit already landed in Refine (per the Rung Commit Rule above), the commit is done; Deliver begins from push/PR.mktemp and capture its output as a single file path. Use that exact captured path string in every subsequent step: write the body to it via Write, then gh pr create --body-file <captured-path>, then rm <captured-path>. Do not regenerate the path between steps — one mktemp call binds one path used across all three operations. Inline --body "$(cat <<EOF ...)" triggers the bash safety heuristic and prompts unconditionally in auto mode. mktemp defends against symlink-race attacks on shared systems.npx claudepluginhub dheerg/swarms --plugin swarmReferences agent roster, roles, coordination model, and dispatch modes for spawning agents or checking permissions in PDS swarms.
Orchestrates parallel multi-agent work across domains — brainstorm, plan, implement, review, research, or test. Auto-detects mode and spawns agents via Claude Code's native Agent Teams.
Returns a team lead spec with identity, facilitator, suggest-members guidance, and phase arc (Research, Converge, Approve, Execute, Review). Silent fallback when outcomes fit no specific mode.