/crank¶
Runs an entire epic through waves of parallel execution until ALL children are CLOSED.
Usage¶
Text Only
/crank <epic-id>
/crank ao-epic-123
Architecture¶
Crank is the autonomous orchestrator that uses swarm for each wave:
Text Only
Crank (orchestrator) Swarm (executor)
| |
+-> bd ready (wave issues) |
| |
+-> TaskCreate from beads --->+-> Spawn agents (fresh context)
| |
+-> /swarm --->+-> Execute in parallel
| |
+-> Verify + bd update <---+-> Results
| |
+-> Loop until epic DONE |
Separation of concerns: - Crank = Beads-aware orchestration, epic lifecycle, knowledge flywheel - Swarm = Fresh-context parallel execution (Ralph Wiggum pattern)
How It Works¶
The FIRE Loop:
- FIND:
bd ready- get unblocked beads issues - IGNITE: Create TaskList tasks, invoke
/swarm - REAP: Swarm collects results, crank syncs to beads
- ESCALATE: Fix blockers, retry failures
- Loop until all children are CLOSED
Output¶
Text Only
/crank ao-epic-123
Epic: "Add user dashboard"
Total: 8 issues
[Wave 1] bd ready → [ao-1, ao-2, ao-3]
TaskCreate for each
/swarm → 3 agents spawned
ao-1 DONE, ao-2 DONE, ao-3 BLOCKED
[Wave 2] bd ready → [ao-4, ao-5, ao-3]
TaskCreate for each
/swarm → 3 agents spawned
...
[Final Vibe] Running /vibe on recent changes...
All checks passed.
<promise>DONE</promise>
Epic: ao-epic-123
Issues completed: 8
Waves: 4/50
Limits¶
- MAX_EPIC_WAVES = 50 - Prevents infinite loops
- Swarm handles parallelism per wave (no max agent limit in swarm)
Failure Handling¶
Crank handles failures automatically: - Retry failed issues in next wave - Skip blocked issues (revisit when unblocked) - Escalate persistent failures after 3 retries
When to Use¶
| Scenario | Skill |
|---|---|
| Execute entire epic autonomously | /crank |
| Just parallel execution (no beads) | /swarm directly |
| Single issue | /implement |
Next¶
/vibe- Runs automatically at end/post-mortem- Extract learnings after epic completes