From swarm-loop
Explains Swarm Loop multi-agent iterative development system, its workflow phases, and commands like /swarm-loop for autonomous coding loops with completion promises.
How this skill is triggered — by the user, by Claude, or both
Slash command
/swarm-loop:swarm-helpThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Swarm Loop (v2.0) is an orchestrated multi-agent iterative development system. It uses a persistent agent team, hook-based safety controls, and a sentinel-file mechanism to drive autonomous loops until a user-defined completion promise is fulfilled.
Swarm Loop (v2.0) is an orchestrated multi-agent iterative development system. It uses a persistent agent team, hook-based safety controls, and a sentinel-file mechanism to drive autonomous loops until a user-defined completion promise is fulfilled.
/swarm-loop GOAL --completion-promise 'TEXT'.claude/swarm-loop/<id>/ and generates safety hooks in settings.local.json--verify command passes)/swarm-loop GOAL --completion-promise 'TEXT'Start a new loop. The --completion-promise is required — it is the only exit mechanism.
Options:
--completion-promise 'TEXT' (required) — Statement that must be true for the loop to end--mode NAME — Execution profile: default, leanswarm, deepplan, or async (default: default)--soft-budget N — Iteration count for a progress checkpoint (default: 10, not a hard limit)--min-iterations N — Hard minimum — promise suppressed until N iterations complete (default: 0, disabled)--max-iterations N — Hard ceiling — force-stops loop after N iterations (default: 0, unlimited)--verify 'CMD' — Shell command that must also pass before the loop exits (e.g., npm test)--safe-mode true|false — Enable/disable autonomous safe mode (default: true)Examples:
/swarm-loop Build a REST API with auth and tests --completion-promise 'All endpoints work and tests pass'
/swarm-loop Refactor auth to JWT --completion-promise 'JWT auth working' --verify 'npm test'
/swarm-loop Migrate to TypeScript --completion-promise 'All files converted' --soft-budget 20
/swarm-loop Thorough refactor --completion-promise 'All refactored' --min-iterations 3 --max-iterations 10
/swarm-statusView the current progress dashboard: iteration count, phase, mode, task status, team roster, and recent log entries.
/cancel-swarmStop the loop, shut down the active team (TeamDelete is called here and only here), and clean up the sentinel file and state file. The instance log file (.claude/swarm-loop/<id>/log.md) is preserved for reference.
/swarm-helpShow this help text.
/swarm-settingsConfigure safety controls, teammate count, compact mode, and notification preferences. Changes take effect on the next /swarm-loop start.
/deepplanAlias for /swarm-loop with --mode deepplan. Runs multi-agent planning with explore/synthesize/critique/deliver phases.
/async-swarmAlias for /swarm-loop with --mode async. Runs background agent orchestration for independent parallel tasks.
Select an execution profile with --mode NAME:
default — Persistent Teams with TaskCreate coordination. Best for complex multi-file implementation.leanswarm — Lean 4-concern orchestration (WORK/MONITOR/VERIFY/SIGNAL). Same Teams coordination as default with less prescriptive scaffolding. Best for capable models on complex tasks.deepplan — Multi-agent planning with explore/synthesize/critique/deliver phases. Best for codebase analysis and structured plans. Alias: /deepplanasync — Background agent orchestration with run_in_background. Best for independent parallel tasks. Alias: /async-swarm<promise>TEXT</promise> when the statement is genuinely true. The loop will not exit on a soft budget alone.--min-iterations N forces at least N iterations (promise suppressed until then). --max-iterations N force-stops the loop after N iterations regardless of promise. Both are optional and independent of --soft-budget./cancel-swarm tears the team down.settings.local.json: PermissionRequest (auto-approve safe operations), PreToolUse (classifier blocks dangerous operations), SubagentStart (injects context into each teammate). Additionally, three team coordination hooks enforce task discipline:
hooks.json) — forces teammates to complete tasks + send results before going idle (up to 3 retries)progress.jsonl + deepplan artifact verification via task metadata--safe-mode false for supervised sessions./compact at the end of an iteration to manage context growth. Enabled via swarm-loop.local.md config (compact_on_iteration: true).heartbeat.json file is updated after each iteration for external monitoring and health checks.log.md file is the orchestrator's memory across iterations. Failed approaches must be documented here so they are not retried./swarm-loop| Option | Description | Default |
|---|---|---|
--completion-promise 'TEXT' | Exit condition (required) | — |
--mode NAME | Execution profile: default, leanswarm, deepplan, async | default |
--soft-budget N | Reflection checkpoint at N iterations | 10 |
--min-iterations N | Hard minimum — promise suppressed until N | 0 (disabled) |
--max-iterations N | Hard ceiling — force-stop after N iterations | 0 (unlimited) |
--verify 'CMD' | Shell command that must pass for exit | none |
--safe-mode true|false | Enable autonomous safety hooks | true |
| Path | Purpose |
|---|---|
.claude/swarm-loop/<id>/state.json | Structured state: goal, iteration, phase, team name, autonomy health |
.claude/swarm-loop/<id>/log.md | Narrative history — all iterations, decisions, and failed approaches |
.claude/swarm-loop/<id>/progress.jsonl | Append-only progress: one JSON line per task completion (written by TaskCompleted gate) |
.claude/swarm-loop/<id>/heartbeat.json | Timestamp and iteration count for external monitoring |
.claude/swarm-loop/<id>/next-iteration | Sentinel file written by orchestrator; consumed by Stop hook |
.claude/swarm-loop.local.md | Per-project config: teammate count, model overrides, compact mode (shared across all instances) |
.claude/swarm-loop.local.lock | Concurrent setup guard: prevents two /swarm-loop invocations from racing during initialization |
Each /swarm-loop invocation creates an isolated instance directory under .claude/swarm-loop/<id>/ where <id> is derived from the session. This allows multiple loops to run concurrently in the same repo from different terminal sessions.
Use /swarm-status to see all active instances. Use /cancel-swarm to select and stop a specific instance.
teammates.isolation is set to worktree via /swarm-settings. Not needed for the default shared-checkout mode.npx claudepluginhub und3rf10w/claude-litter --plugin swarm-loopLaunches multi-agent Agentic SDLC workflows for parallel task decomposition, dispatch to tiered agents (lite/med/heavy), and validation. Use for complex tasks with parallel subtasks.
Designs and configures autonomous AI developer workflows (loops) with verification gates, persistent state, and stop conditions. Use when building agentic SDLC pipelines, self-iterating agents, or scheduled/automated development cycles.
Launches parallel agents that each process a story through an SDLC pipeline (design, test, dev, verify, docs) using isolated git worktrees. Useful for multi-story feature development with automated verification loops.