一键导入
swarming
Use after pulse:validating approves execution and swarm mode is recommended, when the current work slice should be run by coordinated parallel workers.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use after pulse:validating approves execution and swarm mode is recommended, when the current work slice should be run by coordinated parallel workers.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use after completed Pulse work when the user asks to capture post-cycle machine-readable learnings for future planning and execution.
Use when the user asks to distill accumulated dev-notes into reader-facing topic knowledge, rather than to capture a new note or update machine memory.
Use when implementing approved Pulse beads, either as a swarm worker or as a single worker when swarming is unavailable.
Use before implementation planning when feature intent is clear but implementation decisions are still unresolved, and the user needs those decisions locked first.
Use after pulse:exploring when locked decisions are ready and the user needs a mode-gated plan with an approved work shape and current-work prep for validation.
Use when starting any Pulse workflow, resuming a Pulse session, or before planning or execution when tool readiness or onboarding state may block the flow.
| name | swarming |
| description | Use after pulse:validating approves execution and swarm mode is recommended, when the current work slice should be run by coordinated parallel workers. |
| metadata | {"version":"1.3","ecosystem":"pulse","role":"orchestrator","dependencies":[{"id":"beads-cli","kind":"command","command":"br","missing_effect":"unavailable","reason":"Swarming assigns and tracks beads through br."},{"id":"beads-viewer","kind":"command","command":"bv","missing_effect":"unavailable","reason":"Swarming inspects the live bead graph with bv."}]} |
If preflight readiness is missing, stale, or blocked (check .pulse/tooling-status.json), stop and invoke pulse:using-pulse before continuing.
You are the ORCHESTRATOR. You launch workers, monitor coordination, handle escalations, and keep the swarm moving. You do NOT implement beads. If you find yourself editing source files, stop immediately — that is the pulse:executing skill's job.
If workers are spawned, online, busy, blocked, or expected to report, you are in a tending phase whenever there is actionable coordination work.
While actionable signals exist, keep looping through the active coordination surface and the live bead graph. Do not ignore pending coordination work:
If the runtime has no autonomous wakeup or polling mechanism and there is no current actionable signal, run one complete tend cycle, update .pulse/STATE.md plus owner handoff/resume instructions, report that the swarm is paused awaiting the next actionable signal, and do not claim swarm completion.
User escalation is for real product decisions, unresolved blockers, or persistent worker silence after you have already tried to recover the swarm through the active coordination surface.
Blocker reports, conflict reports, and handoffs should be written so a busy teammate can understand them in one read.
Prefer:
Do not hide the real issue behind labels like reservation conflict, startup drift, or runtime blocker without explaining the practical effect.
Invoke only if all are true:
pulse:validating has approved executionopen status and approved for execution.pulse/tooling-status.json says recommended_mode=swarm.pulse/scripts/pulse_status.mjs exists, run node .pulse/scripts/pulse_status.mjs --json first to confirm onboarding, current work slice, reservations, and any saved handoff before launching the swarmIf preflight recommends single-worker, do not invoke this skill. Invoke pulse:executing directly instead.
Read references/runtime-adapter-spec.md before adapting these instructions to a concrete runtime.
.pulse/tooling-status.json.pulse/state.json if present, then .pulse/STATE.mdbv --robot-triage --graph-root <EPIC_ID>
Confirm:
Update .pulse/state.json and .pulse/STATE.md with current swarm intent and epic ID.
Use the smallest runtime primitives that preserve these behaviors:
Adapter mapping:
TeamCreate when explicit teammate coordination helpsAgent to spawn bounded workersSendMessage for coordinator ↔ worker follow-upsTask* only as optional runtime metadata, never as the work graphShared rules:
bv stay the source of truth for work selection.pulse/scripts/pulse_reservations.mjs is the file-coordination layer for every runtime.pulse/STATE.md, .pulse/state.json, and .pulse/handoffs/ stay authoritative for pause/resumePost the swarm start notification on the active coordination surface using references/swarming-appendix.md.
That coordination surface is where workers report startup acknowledgments, completions, blockers, conflicts, handoffs, and receive overseer broadcasts.
Spawn bounded workers that immediately load pulse:executing.
Provide each worker:
runtime_identitycoordinator_identityadapter_nameepic_idfeature_namestartup_hintDo not invent worker identities locally. Use the identity returned by the runtime's worker-spawn primitive.
Do not assign workers fixed tracks, fixed waves, or fixed bead lists as the normal case. Workers are expected to:
AGENTS.md and project contextpulse:executing[ONLINE] acknowledgmentbv --robot-priority.pulse/scripts/pulse_reservations.mjsMark spawned workers in .pulse/STATE.md under ## Active Workers immediately after each spawn result.
Use one line per worker:
- Runtime: <runtime-identity> | Adapter: <adapter-name> | Status: spawned | Current bead: -
The worker startup acknowledgment later updates the same line to online.
Use the worker prompt template in references/swarming-appendix.md.
The swarm is live; now you manage it.
Run a poll-act-repeat loop for as long as any of these are true:
spawned, online, busy, or blockedbv --robot-triage --graph-root <EPIC_ID> still shows ready or in-progress workEvery loop cycle must do all of the following:
.pulse/STATE.md to reflect the latest worker statusUse live graph checks for oversight, not assignment:
bv --robot-triage --graph-root <EPIC_ID>
Do not ignore actionable coordination while the swarm is active. If updates are quiet and the runtime cannot autonomously wake or poll, complete one full tend cycle, persist state/handoff/resume instructions, and pause without claiming completion.
Treat worker events as protocol-driven, not ad hoc. The canonical protocol, required fields, and coordinator message bodies are in references/swarming-appendix.md.
If a required event field is missing, request a corrected event and do not infer missing values.
Minimum coordinator obligations per cycle:
.pulse/STATE.md keyed by runtime identity.br/bv before acknowledging completion..pulse/scripts/pulse_reservations.mjs before permitting overlapping edits.COMMIT_SLOT_GRANTED at a time; defer any worker that is ready to commit without the active slot.Handoff ownership rule:
Before coordinator reassignment, confirm and record all of the following:
.pulse/handoffs/manifest.json and the owner handoff file before resume, including previous owner, new owner, reason, and coordinator approvalAfter each significant event, estimate your own context budget.
If context >65% used:
.pulse/handoffs/coordinator.json using the shared handoff envelope from ../using-pulse/references/handoff-contract.md..pulse/handoffs/manifest.json using the same summary, next_action, and path..pulse/checkpoints/<feature>/... is in use, capture or refresh the feature checkpoint before leaving the swarm pause boundary.The coordinator handoff must follow the same companion contract as planning/executing/validating:
summary -> short orchestrator handoff headlinenext_action + read_first -> resume briefing for the next swarm turnpayload.transfer -> detailed transfer block for live worker state, blockers, and restart notesDo not write the retired global handoff file.
When no current-work beads remain in_progress and the graph shows no remaining executable work for the active work slice, treat this as a graph-state signal only and verify review eligibility from approved shape artifacts + .pulse/STATE.md before any handoff:
Run final bead verification:
bv --robot-triage --graph-root <EPIC_ID>
If orphaned or blocked beads remain:
If all current-work beads are closed:
## Active Workers from .pulse/STATE.md.pulse/STATE.md:
history/<feature>/work-shape.mdhistory/<feature>/phase-plan.mdhistory/<feature>/epic-map.md and history/<feature>/current-story-pack.md.pulse/STATE.md disagree about approved/current work slice or whether later slices remain: stop and route back to planning/state sync before any review handoffActive skill: swarming -> COMPLETE
Swarm: <EPIC_ID> - current work slice complete
Next: planning for next work slice
Active skill: swarming -> COMPLETE
Swarm: <EPIC_ID> - final work slice complete
Next: reviewing
Handoff message:
"Swarm execution complete for the current work slice. The whole-feature epic stays open. Return to
pulse:planningto prepare the next work slice."
"Swarm execution complete for the final work slice. Invoke
pulse:reviewing."
Stop and diagnose before continuing if you see:
bv --robot-priority and start freelancing — re-broadcast the execution contractsingle-worker — stop and use standalone executingwork-shape.md | phase-plan.md | epic-map.md) + .pulse/STATE.md before handing off to reviewingLoad when needed:
| File | Load When |
|---|---|
references/swarming-appendix.md | Worker startup template, message protocol, silence ladder, and coordinator handoff contract |
references/runtime-adapter-spec.md | Adapting canonical swarm behaviors to a concrete runtime |
docs/evaluation/pulse-swarming-hardening.md | Re-running RED/GREEN pressure tests for swarm coordination behavior |