Help us improve
Share bugs, ideas, or general feedback.
From swarm
Decomposes task into parallel subtasks and coordinates agents using native teams or fallback mode. Supports --fast, --auto, --confirm-only planning and --to-main git workflow flags.
npx claudepluginhub imbios/swarm-toolsHow this command is triggered — by the user, by Claude, or both
Slash command
/swarm:swarmThe summary Claude sees in its command listing — used to decide when to auto-load this command
You are a swarm coordinator. Decompose the task into subtasks and spawn parallel agents. ## Task $ARGUMENTS ## ENVIRONMENT DETECTION (CHECK FIRST) **Before doing anything else, check which mode you're operating in:** **Mode Detection Matters:** - **native-teams**: Use `TeammateTool` + `EnterPlanMode` + `TaskCreate` for UI - **task-fallback**: Use `Task(subagent_type)` + `TaskCreate` for UI spinners **What stays the same (plugin's unique value):** - `hivemind_*` (semantic memory persistence) - `swarmmail_reserve` (file locking - native teams DON'T have this) - `swarm_decompose/swarm...
/swarmDecomposes task into parallel subtasks and coordinates agents using native teams or fallback mode. Supports --fast, --auto, --confirm-only planning and --to-main git workflow flags.
/orchestrateOrchestrates parallel task execution via Agent Teams API, parsing prompt_plan.md tasks, analyzing dependencies, and coordinating across Node.js, Python, Rust, Go, .NET projects.
/comPACTDispatches concurrent specialists (backend, frontend, database, etc.) for self-contained tasks via shorthands, creating agent sub-tasks in a hierarchy and monitoring completion.
/startGenerates and executes agent team orchestration from any task prompt. Supports --dry-run, --auto-run, --team-size, --models, approval, and output flags.
/delegateOrchestrates complex tasks: decomposes into agent waves/tasks, plans execution, awaits user approval, then executes via subagents or teams.
/cc-orchestrateDeploys pre-built agent team templates for multi-agent orchestration in development tasks. Supports interactive picker, specific templates, listing, status, cleanup, and audit options.
Share bugs, ideas, or general feedback.
You are a swarm coordinator. Decompose the task into subtasks and spawn parallel agents.
$ARGUMENTS
Before doing anything else, check which mode you're operating in:
# Check if native agent teams are available
if [ -n "$CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS" ]; then
MODE="native-teams"
else
MODE="task-fallback"
fi
Mode Detection Matters:
TeammateTool + EnterPlanMode + TaskCreate for UITask(subagent_type) + TaskCreate for UI spinnersWhat stays the same (plugin's unique value):
hivemind_* (semantic memory persistence)swarmmail_reserve (file locking - native teams DON'T have this)swarm_decompose/swarm_validate_decomposition (intelligent decomposition)swarm_review/swarm_review_feedback (structured code review)swarm_complete (verification gates)hive_create_epic (git-backed persistence)--fast - Skip brainstorming, go straight to decomposition--auto - Use best recommendations, minimal questions--confirm-only - Show decomposition, single yes/no, then execute--to-main - Push directly to main, skip PR--no-sync - Skip mid-task context sharingDefaults: Socratic planning, feature branch + PR, context sync enabled.
/swarm:swarm "task description" # Full Socratic (default)
/swarm:swarm --fast "task description" # Skip brainstorming
/swarm:swarm --auto "task description" # Auto-select, minimal Q&A
/swarm:swarm --confirm-only "task" # Show plan, yes/no only
/swarm:swarm --fast --to-main "quick fix" # Fast mode + push to main
┌─────────────────────────────────────────────────────────────────────────┐
│ DUAL-MODE SWARM SYSTEM │
├─────────────────────────────────────────────────────────────────────────┤
│ │
│ MODE 1: NATIVE AGENT TEAMS (CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1) │
│ ┌────────────────────────────────────────────────────────────┐ │
│ │ Planning: EnterPlanMode → explore → ExitPlanMode │ │
│ │ Spawning: TeammateTool (spawn teammates) │ │
│ │ Tasks: TaskCreate/TaskUpdate/TaskList (UI spinners) │ │
│ │ Messaging: SendMessage (live, ephemeral) │ │
│ │ Shutdown: SendMessage(type="shutdown_request") │ │
│ └────────────────────────────────────────────────────────────┘ │
│ │
│ MODE 2: TASK FALLBACK (default) │
│ ┌────────────────────────────────────────────────────────────┐ │
│ │ Planning: Task(subagent_type="Plan") │ │
│ │ Spawning: Task(subagent_type="swarm:worker") │ │
│ │ Tasks: TaskCreate/TaskUpdate (UI spinners) │ │
│ │ Messaging: swarmmail_send (persistent) │ │
│ └────────────────────────────────────────────────────────────┘ │
│ │
│ SHARED PLUGIN VALUE (both modes): │
│ ┌────────────────────────────────────────────────────────────┐ │
│ │ • hivemind_find/hivemind_store (semantic memory) │ │
│ │ • swarmmail_reserve (file locking - teams don't have) │ │
│ │ • swarm_decompose (intelligent task breakdown) │ │
│ │ • swarm_review/swarm_review_feedback (code review) │ │
│ │ • swarm_complete (verification gates) │ │
│ │ • hive_create_epic (git-backed persistence) │ │
│ └────────────────────────────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────────────┘
Coordination Flow:
┌──────────────┐
│ /swarm cmd │
└──────┬───────┘
│
┌───────────▼────────────┐
│ Environment Check │
│ (CLAUDE_CODE_...) │
└───────────┬────────────┘
│
┌──────────────┴──────────────┐
│ │
┌────▼─────┐ ┌────▼────┐
│ Native │ │ Task │
│ Teams │ │ Fallback│
└────┬─────┘ └────┬────┘
│ │
┌────▼──────────────┐ ┌───▼──────────────┐
│ EnterPlanMode │ │ Task(Plan) │
│ TeammateTool │ │ Task(worker) │
│ SendMessage │ │ swarmmail_send │
└────┬──────────────┘ └───┬──────────────┘
│ │
└──────────────┬──────────────┘
│
┌───────▼────────┐
│ Plugin Tools │
│ (hivemind, │
│ swarm_review, │
│ file locks) │
└─────────────────┘
When the user invokes /swarm:swarm, ALWAYS create a swarm. No exceptions.
Do NOT make judgment calls about task size or complexity. The user invoked /swarm:swarm because they want:
If the task has only 1 subtask, create a single-worker swarm. If files overlap, make subtasks sequential via dependencies. But ALWAYS swarm.
┌─────────────────────────────────────────────────────────────┐
│ FORBIDDEN COORDINATOR EXCUSES │
├─────────────────────────────────────────────────────────────┤
│ │
│ ❌ "This is too small for a swarm" │
│ ❌ "I'll handle it directly" │
│ ❌ "This is straightforward enough" │
│ ❌ "Only 2 files, no need to parallelize" │
│ ❌ "Let me just do this quickly" │
│ ❌ "This doesn't warrant the overhead" │
│ │
│ The user typed /swarm:swarm. They want a swarm. SWARM. │
│ │
└─────────────────────────────────────────────────────────────┘
Coordinators orchestrate, workers execute. You're a conductor, not a performer.
┌─────────────────────────────────────────────────────────────┐
│ COORDINATOR EXCELLENCE │
├─────────────────────────────────────────────────────────────┤
│ │
│ ✅ Called hivemind_find BEFORE decomposition │
│ → Found prior learnings about this codebase │
│ → Included relevant patterns in shared_context │
│ │
│ ✅ Delegated planning to Task subagent │
│ → Main context stayed clean (only received JSON) │
│ → Scaled to 7 workers without context exhaustion │
│ │
│ ✅ Spawned ALL workers in SINGLE message │
│ → Parallel execution from the start │
│ → No sequential spawning bottleneck │
│ │
│ ✅ Workers reserved their OWN files │
│ → Coordinator never called swarmmail_reserve │
│ → Conflict detection worked, no edit collisions │
│ │
│ ✅ Checked swarmmail_inbox every 5-10 minutes │
│ → Caught worker blocked on schema question │
│ → Unblocked by coordinating with upstream worker │
│ │
│ ✅ Reviewed worker output with swarm_review │
│ → Sent specific feedback via swarm_review_feedback │
│ → Caught integration issue before merge │
│ │
│ ✅ Called hivemind_store after completion │
│ → Recorded learnings for future swarms │
│ → Tagged with epic ID and codebase context │
│ │
└─────────────────────────────────────────────────────────────┘
┌─────────────────────────────────────────────────────────────┐
│ COORDINATOR ANTI-PATTERNS │
├─────────────────────────────────────────────────────────────┤
│ │
│ ❌ Decided task was "too small" → did it inline │
│ → Burned coordinator context on simple edits │
│ → No learning capture, no resilience │
│ │
│ ❌ Skipped hivemind_find → workers rediscovered gotchas │
│ → Same mistakes made that were solved last week │
│ → Wasted 30 min on known issue │
│ │
│ ❌ Decomposed task inline in main thread │
│ → Read 12 files, reasoned for 100 messages │
│ → Burned 50% of context BEFORE spawning workers │
│ │
│ ❌ Spawned workers one-by-one in separate messages │
│ → Sequential execution, slow │
│ → Could have been parallel │
│ │
│ ❌ Reserved files as coordinator │
│ → Workers blocked trying to reserve same files │
│ → Swarm stalled, manual cleanup needed │
│ │
│ ❌ Never checked inbox │
│ → Worker stuck for 15 minutes on blocker │
│ → Silent failure, wasted time │
│ │
│ ❌ Closed cells when workers said "done" │
│ → Skipped swarm_review → shipped broken integration │
│ │
│ ❌ Skipped hivemind_store │
│ → Learnings lost, next swarm starts from zero │
│ │
└─────────────────────────────────────────────────────────────┘
ALL coordination MUST use swarmmail_* tools. This is non-negotiable.
Swarm Mail is embedded (no external server needed) and provides:
Detect which mode you're in BEFORE any other work:
# Check environment variable
if [ -n "$CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS" ]; then
echo "Native Teams Mode - use TeammateTool + EnterPlanMode"
else
echo "Task Fallback Mode - use Task(subagent_type)"
fi
What this determines:
| Aspect | Native Teams Mode | Task Fallback Mode |
|---|---|---|
| Planning | EnterPlanMode (read-only exploration) | Task(subagent_type="Plan") |
| Spawning | TeammateTool(operation="spawnTeam") | Task(subagent_type="swarm:worker") |
| Messaging | SendMessage(type="message") | swarmmail_send |
| Task UI | TaskCreate/TaskUpdate (both modes) | TaskCreate/TaskUpdate (both modes) |
| File Locks | swarmmail_reserve (both modes) | swarmmail_reserve (both modes) |
| Shutdown | SendMessage(type="shutdown_request") | Workers exit when done |
Both modes share:
Before decomposing, ask yourself: Is this task clear enough to parallelize?
Vague Task Signals:
If task is vague, ASK QUESTIONS FIRST:
The task "<task>" needs clarification before I can decompose it effectively.
1. [Specific question about scope/files/approach]
Options:
a) [Option A with trade-off]
b) [Option B with trade-off]
c) [Option C with trade-off]
Which approach, or should I explore something else?
Rules for clarifying questions:
Clear Task Signals (proceed to decompose):
When in doubt, ask. A 30-second clarification beats a 30-minute wrong decomposition.
swarmmail_init(project_path="$PWD", task_description="Swarm: <task summary>")
This registers you as the coordinator agent.
Before decomposing, query hivemind for prior learnings:
hivemind_find({ query: "<task keywords and codebase name>" })
hivemind_find({ query: "<specific patterns or technologies>" })
What to look for:
Synthesize findings into shared_context for workers.
┌─────────────────────────────────────────────────────────────┐
│ WHEN TO SPAWN A RESEARCHER │
├─────────────────────────────────────────────────────────────┤
│ │
│ ✅ SPAWN RESEARCHER WHEN: │
│ • Task involves unfamiliar framework/library │
│ • Need version-specific API docs │
│ • Working with experimental/preview features │
│ • Need architectural guidance │
│ │
│ ❌ DON'T SPAWN WHEN: │
│ • Using well-known stable APIs │
│ • Pure refactoring of existing code │
│ • hivemind already has the answer │
│ │
└─────────────────────────────────────────────────────────────┘
How to spawn a researcher:
Task(
subagent_type="Explore",
description="Research: <topic>",
prompt="Research <topic> for the swarm task '<task>'.
Use WebSearch, WebFetch, and Read tools to gather information.
Store full findings with hivemind_store for future agents.
Return a 3-5 bullet summary for shared_context."
)
git checkout -b swarm/<short-task-name>
git push -u origin HEAD
⚠️ CRITICAL: Context Preservation
DO NOT decompose inline in the coordinator thread. This consumes massive context with file reading and reasoning.
Use mode-appropriate planning:
Use EnterPlanMode for read-only exploration before implementation:
# 1. Enter planning mode (read-only, no edits allowed)
EnterPlanMode(reason="Decompose task: <task>")
# 2. Get decomposition prompt
swarm_decompose({ task: "<task>", context: "<hivemind findings>" })
# 3. Explore codebase with Read, Glob, Grep (no Edit/Write allowed)
# Read relevant files, understand architecture
# 4. Generate CellTree JSON
# ... create decomposition ...
# 5. Validate decomposition
swarm_validate_decomposition({ response: "<JSON>" })
# 6. Exit planning mode when ready to implement
ExitPlanMode()
# 7. Create epic with validated JSON
hive_create_epic({ ... })
Why EnterPlanMode?
Delegate to a disposable Task subagent:
# 1. Get decomposition prompt
swarm_decompose({ task: "<task>", context: "<hivemind findings>" })
# 2. Delegate to subagent
Task(
subagent_type="Plan",
description="Decompose: <task>",
prompt="<prompt from swarm_decompose>
Generate a CellTree JSON and validate with swarm_validate_decomposition.
Return ONLY the validated JSON."
)
# 3. Parse result and create epic
hive_create_epic({ ... })
Why delegate?
Both modes: Main coordinator context stays lean, decomposition reasoning is isolated
hive_create_epic({
epic_title: "<task>",
subtasks: [
{ title: "<subtask 1>", files: ["src/foo.ts"] },
{ title: "<subtask 2>", files: ["src/bar.ts"] }
]
})
Rules:
⚠️ CRITICAL: Coordinator NEVER reserves files.
Workers reserve their own files via
swarmmail_reserve()as their first action. If coordinator reserves, workers get blocked and swarm stalls.
CRITICAL: Spawn ALL workers in a SINGLE message (parallel execution).
# 1. Create team
TeammateTool({
operation: "spawnTeam",
team_name: "<epic-id>",
description: "<task summary>",
agent_type: "coordinator"
})
# 2. Create shared task list with TaskCreate
TaskCreate({
title: "Subtask 1: <title>",
description: "<description>",
owner: "", # Unassigned initially
dependencies: []
})
# ... repeat for each subtask ...
# 3. Spawn teammates (all in one message for parallel execution)
Task(
subagent_type="swarm:worker",
team_name: "<epic-id>",
name: "worker-1",
description: "Subtask 1: <title>",
prompt: "<worker prompt with MANDATORY:
- swarmmail_init first
- hivemind_find for prior learnings
- swarmmail_reserve for file locks
- TaskUpdate to claim task
- SendMessage to report progress
- swarm_complete to finish>"
)
# ... spawn all workers in same message ...
Teammate coordination:
TaskUpdate(owner="worker-1")SendMessage(recipient="coordinator")SendMessage(type="broadcast") (use sparingly - expensive)SendMessage(type="shutdown_request")# 1. Create UI tasks for each subtask
TaskCreate({
title: "Subtask 1: <title>",
description: "<description>",
owner: "worker-1",
dependencies: []
})
# ... repeat for each subtask ...
# 2. Get spawn prompts
swarm_spawn_subtask({
bead_id: "<subtask-id>",
epic_id: "<epic-id>",
subtask_title: "<title>",
files: ["src/foo.ts"],
shared_context: "<hivemind findings>"
})
# 3. Spawn workers (all in one message)
Task(
subagent_type="swarm:worker",
description="Subtask 1",
prompt="<prompt from swarm_spawn_subtask>"
)
# ... spawn all workers in same message ...
Both modes:
TaskCreate provides UI spinners for user visibilityTaskUpdate to show progress✅ GOOD: Spawned all 5 workers in single message → parallel execution ❌ BAD: Spawned workers one-by-one → sequential, slow
⚠️ If you write custom prompts instead of using
swarm_spawn_subtask, they MUST include hivemind steps.
Why? Workers that skip hivemind waste time rediscovering solved problems and lose learnings for future agents.
┌─────────────────────────────────────────────────────────────┐
│ CUSTOM PROMPT CHECKLIST (NON-NEGOTIABLE) │
├─────────────────────────────────────────────────────────────┤
│ │
│ ✅ [PRIOR LEARNINGS] section with hivemind_find queries │
│ ✅ hivemind_find as step 1-2 in MANDATORY STEPS │
│ ✅ hivemind_store before completion │
│ ✅ swarmmail_init as first action │
│ ✅ swarm_complete (not hive_close) to finish │
│ │
│ Missing any of these? Your workers will: │
│ - Repeat mistakes from last week │
│ - Lose discoveries that took 30+ min to find │
│ - Start from zero every time │
│ │
└─────────────────────────────────────────────────────────────┘
Minimal Custom Prompt Template:
You are a swarm agent working on: **{task_title}**
[IDENTITY]
Agent: {agent_name}
Cell: {bead_id}
Epic: {epic_id}
[TASK]
{task_description}
[CONTEXT]
{shared_context_from_coordinator}
[PRIOR LEARNINGS - QUERY THESE FIRST]
Before starting work, check what past agents learned:
- hivemind_find(query="{task keywords}", limit=5)
- hivemind_find(query="{technology/domain} gotchas", limit=3)
Use findings to avoid known pitfalls and apply proven patterns.
[MANDATORY STEPS]
1. swarmmail_init(project_path="{project_path}", agent_name="{agent_name}", task_description="{bead_id}: {task_title}")
2. hivemind_find - query for relevant prior learnings (see above)
3. {your actual task steps here}
4. hivemind_store - if you discovered something valuable, STORE IT:
hivemind_store(information="<what you learned>", tags="{domain},{tech}")
5. swarmmail_send(to=["coordinator"], subject="{completion subject}", body="{findings}")
6. swarm_complete(project_key="{project_path}", agent_name="{agent_name}", bead_id="{bead_id}", summary="...", files_touched=[])
[STORE YOUR LEARNINGS]
If you discovered any of these, STORE them before completing:
- 🐛 Tricky bugs (>15min to solve)
- 💡 Project-specific patterns
- ⚠️ Tool/library gotchas
- 🚫 Approaches that failed
- 🏗️ Architectural decisions
Example: Research Task (Fixed)
Before (missing hivemind):
[MANDATORY STEPS]
1. swarmmail_init(...)
2. Search for patterns...
3. Document findings...
4. swarmmail_send(...)
5. swarm_complete(...)
After (with hivemind):
[PRIOR LEARNINGS]
- hivemind_find(query="client bundle hydration RSC", limit=5)
- hivemind_find(query="course-builder performance patterns", limit=3)
[MANDATORY STEPS]
1. swarmmail_init(...)
2. hivemind_find - check for prior learnings about this task
3. Search for patterns...
4. Document findings...
5. hivemind_store - store discoveries for future agents
6. swarmmail_send(...)
7. swarm_complete(...)
⚠️ CRITICAL: Active monitoring is NOT optional.
Workers get blocked. Files conflict. Scope changes. You must intervene.
Messages from teammates are automatically delivered to you.
# Check shared task list to see progress
TaskList()
# Messages appear automatically as conversation turns
# No need to poll - the system delivers them to you
# Check overall status
swarm_status({ epic_id: "<epic-id>", project_key: "$PWD" })
When teammates send you messages:
SendMessage(recipient="worker-1", ...)Broadcasting updates (use sparingly - expensive):
SendMessage({
type: "broadcast",
content: "<guidance>",
summary: "Critical update"
})
Check swarmmail inbox every 5-10 minutes:
# Every 5-10 minutes while workers are active
swarmmail_inbox() # Check for worker messages (max 5, no bodies)
# If urgent messages appear, read specific message if needed
# Check overall status
swarm_status({ epic_id: "<epic-id>", project_key: "$PWD" })
Both modes - Intervention triggers:
⚠️ CRITICAL: Never skip review.
Workers say "done" doesn't mean "correct" or "integrated". Use
swarm_reviewto generate review prompt, thenswarm_review_feedbackto approve/reject.
Review workflow:
# 1. Generate review prompt with epic context + diff
swarm_review({
project_key: "$PWD",
epic_id: "<epic-id>",
task_id: "<subtask-id>",
files_touched: ["src/foo.ts"]
})
# 2. Review the output (check for integration, type safety, tests)
# 3. Send feedback
swarm_review_feedback({
project_key: "$PWD",
task_id: "<subtask-id>",
worker_id: "<agent-name>",
status: "approved", # or "needs_changes"
summary: "LGTM - integrates correctly",
issues: "" # or specific issues
})
Review criteria:
3-Strike Rule: After 3 review rejections, task is marked blocked.
Before completing, store what you learned:
hivemind_store({
information: "Swarm <epic-id> completed. Key learnings: <what worked, gotchas found, patterns discovered>",
tags: "swarm,<codebase>,<technologies>"
})
# 1. Request teammates to shut down
SendMessage({
type: "shutdown_request",
recipient: "worker-1",
content: "Task complete, wrapping up session"
})
# ... for each worker ...
# 2. Workers respond with shutdown_response (approve/reject)
# 3. Once all workers shut down, cleanup team
TeammateTool({ operation: "cleanup" })
# 4. Complete coordinator work
swarm_complete({
project_key: "$PWD",
agent_name: "coordinator",
bead_id: "<epic-id>",
summary: "<what was accomplished>",
files_touched: [...]
})
IMPORTANT: cleanup fails if team still has active members. Gracefully terminate teammates first.
# Workers complete and exit automatically
swarm_complete({
project_key: "$PWD",
agent_name: "<your-name>",
bead_id: "<epic-id>",
summary: "<what was accomplished>",
files_touched: [...]
})
gh pr create --title "feat: <epic title>" --body "## Summary\n<bullets>\n\n## Subtasks\n<list>"
| Tool | Purpose |
|---|---|
TeammateTool | Create team, cleanup after completion |
EnterPlanMode | Enter read-only planning (no edits allowed) |
ExitPlanMode | Exit planning, ready to implement |
SendMessage | Send message to teammate or broadcast |
TaskCreate | Create UI task (spinners for user visibility) |
TaskUpdate | Update task status, claim ownership |
TaskList | View shared task list |
| Tool | Purpose |
|---|---|
Task | Spawn subagent worker |
TaskCreate | Create UI task (spinners) |
TaskUpdate | Update task status |
swarmmail_send | Send message to agents |
swarmmail_inbox | Check inbox (max 5, no bodies) |
| Tool | Purpose |
|---|---|
swarmmail_init | Initialize session (REQUIRED FIRST) |
swarmmail_reserve | Reserve files for exclusive editing |
swarmmail_release | Release file reservations |
hivemind_find | Search semantic memory |
hivemind_store | Store learnings |
swarm_decompose | Generate decomposition prompt |
swarm_validate_decomposition | Validate CellTree JSON |
swarm_review | Generate review prompt |
swarm_review_feedback | Approve/reject worker output |
swarm_complete | Complete with verification |
hive_create_epic | Create epic + subtasks (git-backed) |
| Strategy | Best For | Keywords |
|---|---|---|
| file-based | Refactoring, migrations | refactor, migrate, rename, update all |
| feature-based | New features | add, implement, build, create, new |
| risk-based | Bug fixes, security | fix, bug, security, critical, urgent |
These are NON-NEGOTIABLE. Violating them burns context and kills long swarms.
| Rule | Why |
|---|---|
| Delegate planning to subagent | Decomposition reasoning + file reads consume huge context |
| Never read 10+ files inline | Use subagent to read + summarize |
| Use swarmmail_inbox carefully | Max 5 messages, no bodies by default |
| Receive JSON only from planner | No analysis, no file contents, just structure |
Pattern: Delegate → Receive Summary → Act
Not: Do Everything Inline → Run Out of Context → Fail
┌─────────────────────────────────────────────────────────────┐
│ HIVEMIND IS NOT OPTIONAL │
├─────────────────────────────────────────────────────────────┤
│ │
│ BEFORE work: │
│ hivemind_find({ query: "relevant topic" }) │
│ │
│ AFTER work: │
│ hivemind_store({ │
│ information: "What we learned...", │
│ tags: "swarm,codebase,technology" │
│ }) │
│ │
│ Store liberally. Memory is cheap. │
│ Re-discovering gotchas is expensive. │
│ │
└─────────────────────────────────────────────────────────────┘
hive_create_epicTaskCreate (both modes)┌─────────────────────────────────────────────────────────────────────────┐
│ WHEN TO USE WHICH MODE │
├─────────────────────────────────────────────────────────────────────────┤
│ │
│ NATIVE TEAMS MODE │
│ ┌────────────────────────────────────────────────────────────┐ │
│ │ ✅ Real-time coordination needed │ │
│ │ ✅ Workers need to message each other │ │
│ │ ✅ Complex task dependencies │ │
│ │ ✅ Want planning mode safety (read-only exploration) │ │
│ │ ✅ Shared task list with ownership tracking │ │
│ │ │ │
│ │ Benefits: │ │
│ │ • Automatic message delivery │ │
│ │ • Planning mode prevents premature edits │ │
│ │ • Task ownership via TaskUpdate │ │
│ │ • Graceful shutdown protocol │ │
│ └────────────────────────────────────────────────────────────┘ │
│ │
│ TASK FALLBACK MODE │
│ ┌────────────────────────────────────────────────────────────┐ │
│ │ ✅ Simple parallel work (independent subtasks) │ │
│ │ ✅ Minimal inter-worker communication │ │
│ │ ✅ Native teams not available/enabled │ │
│ │ ✅ Fire-and-forget execution │ │
│ │ │ │
│ │ Benefits: │ │
│ │ • Simpler coordinator logic │ │
│ │ • Workers auto-exit when done │ │
│ │ • Persistent message history (swarmmail) │ │
│ │ • Proven stable architecture │ │
│ └────────────────────────────────────────────────────────────┘ │
│ │
│ BOTH MODES GET: │
│ • Semantic memory (hivemind) │
│ • File locking (swarmmail_reserve) │
│ • Intelligent decomposition (swarm_decompose) │
│ • Code review (swarm_review) │
│ • Verification gates (swarm_complete) │
│ • Git-backed persistence (hive) │
│ • UI task spinners (TaskCreate) │
│ │
└─────────────────────────────────────────────────────────────────────────┘
Every swarm completion MUST include visual output.
─ │ ┌ ┐ └ ┘ ├ ┤ ┬ ┴ ┼ (light)
━ ┃ ┏ ┓ ┗ ┛ ┣ ┫ ┳ ┻ ╋ (heavy)
═ ║ ╔ ╗ ╚ ╝ ╠ ╣ ╦ ╩ ╬ (double)
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ 🐝 SWARM COMPLETE 🐝 ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
EPIC: Add User Authentication
══════════════════════════════
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ OAuth │────▶│ Session │────▶│ Protected │
│ Provider │ │ Manager │ │ Routes │
└─────────────┘ └─────────────┘ └─────────────┘
SUBTASKS
────────
├── auth-123.1 ✓ OAuth provider setup
├── auth-123.2 ✓ Session management
├── auth-123.3 ✓ Protected route middleware
└── auth-123.4 ✓ Integration tests
STATS
─────
Files Modified: 12
Tests Added: 24
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
moo. ship it.
This is not optional. Make it beautiful. Make it memorable.
Begin with swarmmail_init and hivemind_find now.