Loops, swarms, and teams powered by Claude Code's built-in Task System. Loop, swarm, and team are three execution modes. Loop runs sequentially. Swarm runs parallel subagents. Team spawns full Claude Code instances with shared contracts via Agent Teams.
FAQ
essentials-claude-code is a Claude Code plugin with 5 hand-picked skills for automation work, indexed on Flowy. Install it with the command on its page. It includes beads-schema, github-cli, gitlab-cli. Its skills do not fire on their own yet. Request auto-invocation to have Flowy route them as you prompt. Free and open source.
> /plugin marketplace add GantisStorm/essentials-claude-code> /plugin install essentials@essentials-claude-code
Repo: GantisStorm/essentials-claude-code
Loops, swarms, and teams powered by Claude Code's built-in Task System.
Loop, swarm, and team are three execution modes. Loop runs sequentially. Swarm runs parallel subagents. Team spawns full Claude Code instances with shared contracts via Agent Teams. All use Claude's native task dependencies, ctrl+t progress, and automatic persistence.
Plans define exit criteria. Loops run until tests pass. Done means actually done.
You: "Add authentication"
AI: *writes code* "Done!"
You: *runs tests* β 3 failing
You: "Fix these"
AI: "Fixed!"
You: *runs tests* β still failing
[repeat until you give up]
# Option A: Discuss in chat, then execute from context
You: "I need to fix this auth bug..." [back and forth discussion]
You: /implement-loop fix the auth bug we discussed
AI: *implements, tests fail, fixes, tests fail, fixes...*
AI: "Exit criteria passed" β
# Option B: Create plan first, then execute
You: /plan-creator Add authentication
You: /plan-loop .claude/plans/auth-plan.md # Sequential
You: /plan-swarm .claude/plans/auth-plan.md # Parallel subagents
You: /plan-team .claude/plans/auth-plan.md # Agent Teams with contracts
AI: "Exit criteria passed" β
# Install
/plugin marketplace add GantisStorm/essentials-claude-code
/plugin install essentials@essentials-claude-code
mkdir -p .claude/plans .claude/prompts .claude/prd
# Option A: From conversation (after discussing a bug/feature)
/implement-loop fix the auth bug we discussed # Sequential
/implement-swarm refactor the API handlers # Parallel subagents
/implement-team build the full-stack feature # Agent Teams with contracts
# Option B: With plan file
/plan-creator Add user authentication with JWT
/plan-loop .claude/plans/user-auth-3k7f2-plan.md # Sequential
/plan-swarm .claude/plans/user-auth-3k7f2-plan.md # Parallel subagents
/plan-team .claude/plans/user-auth-3k7f2-plan.md # Agent Teams with contracts
# Visual progress
ctrl+t # Toggle task tree view
Zero external dependencies. All three modes enforce exit criteria. Swarm defaults to 3 concurrent workers. Team requires tmux and CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1.
Our loop, swarm, and team commands use Claude Code's built-in Task Management System (v2.1.19+).
Ralph TUI and Beads integrate seamlessly. Use Ralph TUI for dashboard visualization. Use Beads for persistent task tracking across sessions.
The community built Ralph Wiggum loops with workarounds:
.sh files) that ran after each Claude response, grepping output for keywords like "complete" or "done" to decide whether to continue the loopClaude Code v2.1.19+ provides native tools that replace all of this:
| Old Workaround | Native Replacement | Why It's Better |
|---|---|---|
| Stop hooks (shell scripts) | TaskUpdate({ status: "completed" }) | No external scripts, status is structured data |
| External plan.md for state | ~/.claude/tasks/ storage | Survives context compaction automatically |
| TodoWrite flat lists | TaskUpdate({ addBlockedBy: [...] }) | Dependencies enforced β tasks can't run out of order |
| Manual session coordination | CLAUDE_CODE_TASK_LIST_ID env var | Same task list across sessions |
| Single agent | TaskList + parallel workers | Multiple agents coordinate via shared state |
The core loop is unchanged: Plan β Implement β Verify β Loop if fail β Done when pass.
ctrl+t to see live task tree with status~/.claude/tasks/TaskList shows ID, subject, status, and blockedBy β but NOT description. To see implementation details, you must call TaskGet for each task individually.
This is why we still use plan files. Tasks track status. Plans hold implementation details.
Plan file (.claude/plans/) β Full implementation code (50-200+ lines per task)
Task System (~/.claude/tasks/) β Status tracking, dependencies, parallel coordination
| Tool | Purpose |
|---|---|
TaskCreate | Create task with subject, description, activeForm |
TaskUpdate | Change status, set owner, add blockedBy dependencies |
TaskGet | Get full details of ONE task (including description) |
TaskList | See ALL tasks (but only subject, status, blockedBy) |
Dependencies flow through the entire pipeline:
Plan Creator Converter Executor
ββββββββββββββββ βββββββββββββββββββββββββββ ββββββββββββββββββββββββ
β Dependency β β β dependsOn (prd.json) β β β addBlockedBy (task β
β Graph β β depends_on (beads) β β primitive) β
β β β β β β
β Phase 1: A,B β β US-003: ["US-001","002"]β β taskId "3": β
β Phase 2: C β β β β blockedBy: ["1","2"]β
ββββββββββββββββ βββββββββββββββββββββββββββ ββββββββββββββββββββββββ
Plan creators write a ## Dependency Graph table. Converters read it to build dependsOn (prd.json) or depends_on (beads). Loop/swarm commands translate those to addBlockedBy using an ID map.
Task lifecycle: pending β (blocked until deps complete) β in_progress β completed
A task with non-empty blockedBy shows as blocked in ctrl+t. When a blocking task is marked completed, it's automatically removed from the blocked list. A task becomes ready (executable) when its blockedBy list is empty.
TaskCreate({ subject: "Set up database" }) // β task "1"
TaskCreate({ subject: "Create auth middleware" }) // β task "2"
TaskUpdate({ taskId: "2", addBlockedBy: ["1"] }) // #2 waits for #1
Task #2 cannot start until #1 completes. The system enforces this.
ctrl+t)Tasks (2 done, 1 in progress, 3 open)
β #1 Set up database schema
β #2 Create auth middleware (Worker-1)
β‘ #3 Add login routes > blocked by #2
β‘ #4 Write tests > blocked by #3
Main agent controls a queue of background agents:
Main: Mark #1-3 in_progress β Spawn Agent-1, Agent-2, Agent-3
β
Main: Stop and wait β background agents notify on completion
β
Agent-1: Completes Task #1 β notifies main β exits
β
Main: Woken β Mark #1 completed β TaskList β #4 unblocked β Mark #4 in_progress β Spawn Agent-4
β
Main: Stop and wait β next notification
... repeat until all tasks complete ...
Each agent does ONE task then exits. No racing. No stuck loops. Main agent marks tasks in_progress on spawn, completed on return, and refills queue as slots open.
Tasks persist across sessions with CLAUDE_CODE_TASK_LIST_ID:
# Per terminal session
CLAUDE_CODE_TASK_LIST_ID="my-project" claude
# Or in .claude/settings.json
{ "env": { "CLAUDE_CODE_TASK_LIST_ID": "my-project" } }
Start a new session tomorrow β your task list is still there.
| Workflow | Best For | Converter | Loop | Swarm | Team |
|---|---|---|---|---|---|
| Simple | 80% of tasks | β | /implement-loop, /plan-loop | /implement-swarm, /plan-swarm | /implement-team, /plan-team |
| Tasks | prd.json format | /tasks-converter | /tasks-loop | /tasks-swarm | β |
| Beads | Persistent memory | /beads-converter | /beads-loop | /beads-swarm | β |
Converters transform plans into executable formats. /tasks-converter creates prd.json files with dependsOn arrays. /beads-converter creates beads with epicβtask hierarchy and depends_on via bd dep add. Both read the plan's ## Dependency Graph table to build dependencies that maximize parallel execution.
All use Claude Code's built-in Task System for dependencies, ctrl+t progress, and persistence.
Alternative executor: Ralph TUI runs Tasks/Beads with the classic Ralph Wiggum loop style (community approach before Claude Code had native tasks).
| Aspect | Loop | Swarm | Team |
|---|---|---|---|
| Executor | Main agent (foreground) | Background subagents | Full Claude Code instances (tmux panes) |
| Concurrency | 1 task at a time | Up to N tasks (--workers) | All agents in parallel |
| Context | Full conversation history | Each agent gets task description only | Each agent gets contracts + ownership scope |
| Communication | N/A (single agent) | Workers isolated | Agents message each other via lead |
| Lead role | Implements directly | Queue manager | Contract author + coordinator (no coding) |
| Pre-work | Parse plan, create tasks | Parse plan, create tasks | Parse plan, define contracts, create tasks |
| Visibility | See work live | Check with ctrl+t or TaskList | Each agent visible in tmux pane |
| Best for | Sequential tasks | Independent parallel tasks | Multi-component builds requiring integration |
| Task system | Same | Same | Same |
| Dependencies | Same | Same | Same |
All three use the same task graph with dependencies. Loop executes sequentially. Swarm spawns isolated subagents for independent parallel work. Team defines integration contracts upfront and spawns full Claude Code instances that can communicate β use when components must agree on interfaces (frontend + backend + database).
# From conversation context (after discussing)
/implement-loop fix the auth bug # Sequential
/implement-swarm refactor API handlers # Parallel subagents
/implement-team build the dashboard # Agent Teams with contracts
# Or with plan file
/plan-creator Add JWT authentication
/plan-loop .claude/plans/jwt-auth-plan.md # Sequential
/plan-swarm .claude/plans/jwt-auth-plan.md # Parallel subagents
/plan-team .claude/plans/jwt-auth-plan.md # Agent Teams with contracts
/plan-creator Add JWT authentication
/tasks-converter .claude/plans/jwt-auth-plan.md
# Execute with Claude Code's Task System (recommended)
/tasks-loop .claude/prd/jwt-auth.json # Sequential
/tasks-swarm .claude/prd/jwt-auth.json # Parallel
# Or execute with Ralph TUI (classic Ralph loop)
ralph-tui run --prd .claude/prd/jwt-auth.json
bd init
/plan-creator Add JWT authentication
/beads-converter .claude/plans/jwt-auth-plan.md
# Execute with Claude Code's Task System (recommended)
/beads-loop # Sequential
/beads-swarm # Parallel
# Or execute with Ralph TUI (classic Ralph loop)
ralph-tui run --tracker beads --epic <epic-id>
βββββββββββββββββββ
β Read Source β
β (plan/context) β
ββββββββββ¬βββββββββ
β
βΌ
βββββββββββββββββββ
β Create Tasks β
β + Dependencies β
β (from Dep Graph)β
ββββββββββ¬βββββββββ
β
ββββββββββββββββββββββ΄βββββββββββββββββββββ
β MAIN AGENT β
β β
β βββββββββββββββββββ β
β β TaskList βββββββββ β
β β (find unblocked)β β β
β ββββββββββ¬βββββββββ β β
β β β β
β βΌ β β
β βββββββββββββββββββ β β
β β Mark task β β β
β β in_progress β β β
β ββββββββββ¬βββββββββ β β
β β β β
β βΌ β β
β βββββββββββββββββββ β β
β β Implement β β β
β β (read, edit) β β β
β ββββββββββ¬βββββββββ β β
β β β β
β βΌ β β
β βββββββββββββββββββ β β
β β Mark task β β β
β β completed β β β
β ββββββββββ¬βββββββββ β β
β β β β
β βββββββ΄ββββββ β β
β β β β β
β More tasks All done β β
β β β β β
β βββββββββββββΌβββββββββββ β
β β β
ββββββββββββββββββββΌβββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββ
β Run Exit β
β Criteria β
ββββββββββ¬βββββββββ
β
βββββββ΄ββββββ
β β
FAIL PASS
β β
β βΌ
β βββββββββββββββββββ
β β Loop complete β β
β βββββββββββββββββββ
β
βΌ
βββββββββββββββββββ
β Fix issues β
β (loop back) β
βββββββββββββββββββ
Sequential execution. Main agent works through tasks one at a time in dependency order. Blocked tasks wait until their dependencies complete. Exit criteria verified at end. Loops until all tests pass.
βββββββββββββββββββ
β Read Source β
β (plan/context) β
ββββββββββ¬βββββββββ
β
βΌ
βββββββββββββββββββ
β Create Tasks β
β + Dependencies β
β (from Dep Graph)β
ββββββββββ¬βββββββββ
β
βΌ
βββββββββββββββββββ
β Spawn up to N β
β background agentsβ
β (ready tasks) β
ββββββββββ¬βββββββββ
β
βββββββββββββββββββββΌββββββββββββββββββββ
β β β
βΌ βΌ βΌ
βββββββββββββββ βββββββββββββββ βββββββββββββββ
β Agent 1 β β Agent 2 β β Agent N β
βββββββββββββββ βββββββββββββββ βββββββββββββββ
β implement β β implement β β implement β
β EXIT β β EXIT β β EXIT β
ββββββββ¬βββββββ ββββββββ¬βββββββ ββββββββ¬βββββββ
β β β
βββββββββββββββββββββΌββββββββββββββββββββ
β
ββββββββββββββββββββββ΄βββββββββββββββββββββ
β MAIN AGENT β
β β
β βββββββββββββββββββ β
β β Stop & wait βββββββββ β
β β (notification) β β β
β ββββββββββ¬βββββββββ β β
β β β β
β βΌ β β
β βββββββββββββββββββ β β
β β Agent done β β β
β β Mark completed β β β
β ββββββββββ¬βββββββββ β β
β β β β
β βΌ β β
β βββββββββββββββββββ β β
β β Find ready β β β
β β (pending+empty β β β
β β blockedBy) β β β
β β Mark in_progressβ β β
β β Spawn workers β β β
β ββββββββββ¬βββββββββ β β
β β β β
β βββββββ΄ββββββ β β
β β β β β
β More tasks All done β β
β β β β β
β βββββββββββββΌβββββββββββ β
β β β
ββββββββββββββββββββΌβββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββ
β Swarm complete ββ
βββββββββββββββββββ
Queue-based parallel execution (default: 3 workers). Main agent marks tasks in_progress and spawns up to N background agents. Each agent does ONE task then exits. On completion notification, main agent marks the task completed, checks TaskList for newly unblocked tasks (status=pending, empty blockedBy), marks them in_progress, and spawns workers. Dependencies enforced β blocked tasks wait until all their blockers complete.
βββββββββββββββββββ
β Read Source β
β (plan/context) β
ββββββββββ¬βββββββββ
β
βΌ
βββββββββββββββββββ
β Determine Team β
β Structure β
β (2-5+ agents) β
ββββββββββ¬βββββββββ
β
βΌ
βββββββββββββββββββ
β Define Contractsβ
β (exact URLs, β
β JSON shapes, β
β status codes) β
ββββββββββ¬βββββββββ
β
βΌ
βββββββββββββββββββ
β Enter Delegate β
β Mode + Spawn β
β all agents β
ββββββββββ¬βββββββββ
β
βββββββββββββββββββββΌββββββββββββββββββββ
β β β
βΌ βΌ βΌ
βββββββββββββββ βββββββββββββββ βββββββββββββββ
β Agent 1 β β Agent 2 β β Agent N β
β (Backend) β β (Database) β β (Frontend) β
βββββββββββββββ βββββββββββββββ βββββββββββββββ
β contracts + β β contracts + β β contracts + β
β ownership ββββββΊβ ownership ββββββΊβ ownership β
β scope βrelayβ scope βrelayβ scope β
ββββββββ¬βββββββ ββββββββ¬βββββββ ββββββββ¬βββββββ
β β β
βββββββββββββββββββββΌββββββββββββββββββββ
β
ββββββββββββββββββββββ΄βββββββββββββββββββββ
β LEAD AGENT β
β (Delegate Mode) β
β β
β βββββββββββββββββββ β
β β Relay messages β β
β β Mediate changes β β
β β Resolve conflictsβ β
β ββββββββββ¬βββββββββ β
β β β
β βΌ β
β βββββββββββββββββββ β
β β Contract diff β β
β β (built vs spec) β β
β ββββββββββ¬βββββββββ β
β β β
ββββββββββββββΌβββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββ
β End-to-end β
β validation β
ββββββββββ¬βββββββββ
β
βββββββ΄ββββββ
β β
FAIL PASS
β β
β βΌ
β βββββββββββββββββββ
β β Team complete β β
β βββββββββββββββββββ
β
βΌ
βββββββββββββββββββ
β Re-spawn agent β
β with fix β
βββββββββββββββββββ
Contract-first parallel execution. Lead agent reads the plan, defines exact integration contracts (API URLs, JSON shapes, status codes, SSE formats), then spawns full Claude Code instances in tmux panes via Delegate Mode. Each agent gets contracts it produces, contracts it consumes, and ownership boundaries. Agents communicate through the lead for contract changes. After all agents complete, lead runs a contract diff and end-to-end validation.
Key difference from swarms: Swarm workers are isolated β they can't talk to each other. Team agents share contracts and communicate through the lead, making teams ideal for multi-component builds where interfaces must align.
| Command | Use For |
|---|---|
/plan-creator <feature> | New features (brownfield development) |
/bug-plan-creator <error> <desc> | Bug fixes, root cause analysis |
/code-quality-plan-creator <files> | Refactoring, dead code, security |
All three produce plans with the same structure: per-file implementation details, ## Dependency Graph table, and exit criteria. Pass a code map, design doc, or any reference file as additional context. Any plan can be fed to any converter or executed directly via /plan-loop, /plan-swarm, or /plan-team.
| Command | Source |
|---|---|
/implement-loop <task> | Conversation context |
/plan-loop <plan> | Plan file (required) |
/tasks-loop [prd.json] | prd.json |
/beads-loop [--label] | Beads DB |
Cancel any loop: /cancel-loop
| Command | Source |
|---|---|
/implement-swarm <task> | Conversation context |
/plan-swarm <plan> | Plan file (required) |
/tasks-swarm [prd.json] | prd.json |
/beads-swarm [--epic] | Beads DB |
Cancel any swarm: /cancel-swarm
| Command | Source |
|---|---|
/implement-team <task> | Conversation context |
/plan-team <plan> | Plan file (required) |
Cancel any team: /cancel-team
Requires: tmux + CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1. Lead defines integration contracts, spawns full Claude Code instances in tmux panes via Delegate Mode. Agents communicate through the lead. Based on Cole Medin's build-with-agent-team pattern.
| Command | Output | Dependency Source |
|---|---|---|
/tasks-converter <plan> | prd.json with dependsOn arrays | Plan's ## Dependency Graph table |
/beads-converter <plan> | Beads issues with bd dep add | Plan's ## Dependency Graph table |
Converters read the plan's ## Dependency Graph to build fileβtask/bead ID maps and translate file dependencies to task dependencies. Falls back to per-file Dependencies/Provides for older plans without a Dependency Graph.
| Command | Purpose |
|---|---|
/plan-schema [validate <path>] | Plan file format β sections, per-file format, dependency graph rules |
/prd-schema [validate <path>] | prd.json schema β required fields, rejected fields, examples |
/beads-schema [validate] | Beads CLI β issue types, statuses, priorities, commands |
Invoke without arguments for a quick reference. Invoke with validate to check an existing file against the schema.
| Command | Purpose |
|---|---|
/codemap-creator <dir> | Create JSON code map via LSP |
/codemap-creator --update <map> [--diff|--mr|--pr] | Update existing codemap with changed files |
/document-creator <dir> | DEVGUIDE.md generation |
/mr-description-creator | PR/MR descriptions via gh/glab |
/show-status <json|beads> [path|epic-id] | Task/bead status dashboard |
/reset-prd <path> | Reset prd.json to initial state |
/reset-beads <epic-id> | Reopen all tasks in a beads epic |
/ralph-config <json|beads> | Write RalphTUI config for workflow |
Plans are markdown files in .claude/plans/ with structured sections:
## Implementation Plan
### src/types/auth.ts [create]
[Complete code β not pseudocode]
Dependencies: β
Provides: AuthToken type, validateToken() function
### src/services/auth.ts [create]
[Complete code]
Dependencies: src/types/auth.ts
Provides: AuthService class
## Dependency Graph
| Phase | File | Action | Depends On |
|-------|-------------------------|--------|-------------------------|
| 1 | `src/types/auth.ts` | create | β |
| 2 | `src/services/auth.ts` | create | `src/types/auth.ts` |
## Exit Criteria
npm test -- auth && npm run typecheck
Self-Contained Rule: Each task must be implementable with ONLY its description. No "see design.md" allowed.
Dependency Graph Rule: The ## Dependency Graph table is the source of truth for execution order. Converters read it to build dependsOn/depends_on. Files in the same phase can execute in parallel. Only real code dependencies should create phase boundaries.
your-project/
βββ .claude/
β βββ plans/ # Source of truth (plan files with Dependency Graphs)
β βββ prd/ # prd.json files (from /tasks-converter)
β βββ maps/ # Code maps (from /codemap-creator)
β βββ prompts/ # Generated prompts
βββ .ralph-tui/ # RalphTUI config (if using)
β βββ config.toml # Tracker, agent settings
βββ .beads/ # Beads DB (if using)
RalphTUI setup: Run ralph-tui setup per project. See Managing .ralph-tui/ for config details and switching trackers.
| Tool | Required? | Purpose |
|---|---|---|
| None | β | Simple workflow (loop/swarm) works out of the box |
| tmux | For Team mode | Agent Teams use tmux for split-pane visualization |
| Beads CLI | For Beads workflow | Persistent memory across sessions |
| Ralph TUI | Optional | Classic Ralph loop executor with TUI dashboard |
Simple workflow has zero dependencies for loop and swarm. Team mode requires tmux and CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1. Add Beads for persistent memory. Add Ralph TUI if you prefer the classic Ralph Wiggum loop style.
Edit YAML frontmatter in essentials/commands/*.md or essentials/agents/*.md:
---
model: opus # opus | sonnet | haiku
---
| Problem | Solution |
|---|---|
| Loop won't stop | Exit criteria must return exit code 0 |
| Wrong exit criteria | Edit plan directly, re-run loop |
| Context filling up | Plans persist outside conversation |
| prd.json not found | Use userStories and passes fields |
| Beads CLI missing | brew tap steveyegge/beads && brew install bd |
| Swarm runs sequentially | Check plan's Dependency Graph β every task chained to previous degrades swarm to sequential. Only declare real code dependencies. |
git checkout -b feature/thing)Plans define exit criteria. Loops, swarms, and teams run until tests pass. Done means actually done.
.claude/
.claude-plugin/
marketplace.json
templates/
AGENT_TEMPLATE.md
COMMAND_TEMPLATE.md
.gitignore
COMPARISON.md
essentials/
agents/
beads-converter-default.md
bug-plan-creator-default.md
code-quality-plan-creator-default.md
codemap-creator-default.md
document-creator-default.md
mr-description-creator-default.md
plan-creator-default.md
tasks-converter-default.md
commands/
beads-converter.md
beads-loop.md
beads-swarm.md
bug-plan-creator.md
cancel-loop.md
cancel-swarm.md
cancel-team.md
code-quality-plan-creator.md
codemap-creator.md
document-creator.md
implement-loop.md
implement-swarm.md
implement-team.md
mr-description-creator.md
plan-creator.md
plan-loop.md
plan-swarm.md
plan-team.md
ralph-config.md
reset-beads.md
reset-prd.md
show-status.md
tasks-converter.md
tasks-loop.md
tasks-swarm.md
skills/
beads-schema/
SKILL.md
github-cli/
SKILL.md
gitlab-cli/
SKILL.md
plan-schema/
SKILL.md
prd-schema/
SKILL.md
logo.png
README.md
UNLICENSE
WORKFLOW-BEADS.md
WORKFLOW-SIMPLE.md
WORKFLOW-TASKS.mdΒ© 2026 Flowy Β· Free and open source
Built for Claude Code Β· Not affiliated with Anthropic