2026-02-21 19:41:50 -05:00
|
|
|
---
|
|
|
|
|
description: Execute an epic to completion using swarm for parallel wave execution
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
# /crank
|
|
|
|
|
|
|
|
|
|
Runs an entire epic through waves of parallel execution until ALL children are CLOSED.
|
|
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
/crank <epic-id>
|
|
|
|
|
/crank ao-epic-123
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Architecture
|
|
|
|
|
|
|
|
|
|
Crank is the autonomous orchestrator that uses swarm for each wave:
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
Crank (orchestrator) Swarm (executor)
|
|
|
|
|
| |
|
docs(destale): wave 2 + ratchet — all live docs off retired tech (age-docs-staleness-remediation-cko)
Completes the staleness epic. 42 P2/P3 files converged to current truth
(bd→br, gascity/gt-sling/mayor→NTM+Agent Mail, daemon→substrate, hooks→hookless,
CI-authoritative→push-to-main local Go gate); GLOSSARY's 18 dead skills/* links
repaired to ../skills/<name>/SKILL.md (19 links, 0 broken); contracts/runbooks
that freeze retired-system nouns bannered RETIRED/HISTORICAL rather than rewritten.
Adds the Arc-7 ratchet — scripts/check-docs-no-retired-tech.sh — which scans all
live docs (260) for retired-subsystem commands/phrases and fails on regression.
A doc opts out by carrying a RETIRED/HISTORICAL/SUPERSEDED banner (or being an
ADR / migration / upgrade / index doc), and lines that describe a removal are not
flagged. Running it caught 12 stale refs the deep-read sweep missed — a
"CI is the authoritative gate" cluster (agentops-brief, primitive-chains,
INCIDENT-RUNBOOK, knowledge-flywheel, philosophy, software-factory), stale
hook-smoke in release-e2e-checklist, and GasCity descriptors in
contracts/index + SCHEMAS + strategic-direction — now fixed. Gate: PASS.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-17 10:23:02 -04:00
|
|
|
+-> br ready (wave issues) |
|
2026-02-21 19:41:50 -05:00
|
|
|
| |
|
|
|
|
|
+-> TaskCreate from beads --->+-> Spawn agents (fresh context)
|
|
|
|
|
| |
|
|
|
|
|
+-> /swarm --->+-> Execute in parallel
|
|
|
|
|
| |
|
docs(destale): wave 2 + ratchet — all live docs off retired tech (age-docs-staleness-remediation-cko)
Completes the staleness epic. 42 P2/P3 files converged to current truth
(bd→br, gascity/gt-sling/mayor→NTM+Agent Mail, daemon→substrate, hooks→hookless,
CI-authoritative→push-to-main local Go gate); GLOSSARY's 18 dead skills/* links
repaired to ../skills/<name>/SKILL.md (19 links, 0 broken); contracts/runbooks
that freeze retired-system nouns bannered RETIRED/HISTORICAL rather than rewritten.
Adds the Arc-7 ratchet — scripts/check-docs-no-retired-tech.sh — which scans all
live docs (260) for retired-subsystem commands/phrases and fails on regression.
A doc opts out by carrying a RETIRED/HISTORICAL/SUPERSEDED banner (or being an
ADR / migration / upgrade / index doc), and lines that describe a removal are not
flagged. Running it caught 12 stale refs the deep-read sweep missed — a
"CI is the authoritative gate" cluster (agentops-brief, primitive-chains,
INCIDENT-RUNBOOK, knowledge-flywheel, philosophy, software-factory), stale
hook-smoke in release-e2e-checklist, and GasCity descriptors in
contracts/index + SCHEMAS + strategic-direction — now fixed. Gate: PASS.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-17 10:23:02 -04:00
|
|
|
+-> Verify + br update <---+-> Results
|
2026-02-21 19:41:50 -05:00
|
|
|
| |
|
|
|
|
|
+-> 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:
|
|
|
|
|
|
2026-06-19 21:35:50 -04:00
|
|
|
1. **FIND**: `BEADS_DIR="$(ao beads dir)" br ready` - get unblocked beads issues
|
2026-02-21 19:41:50 -05:00
|
|
|
2. **IGNITE**: Create TaskList tasks, invoke `/swarm`
|
|
|
|
|
3. **REAP**: Swarm collects results, crank syncs to beads
|
|
|
|
|
4. **ESCALATE**: Fix blockers, retry failures
|
|
|
|
|
5. Loop until all children are CLOSED
|
|
|
|
|
|
|
|
|
|
## Output
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
/crank ao-epic-123
|
|
|
|
|
|
|
|
|
|
Epic: "Add user dashboard"
|
|
|
|
|
Total: 8 issues
|
|
|
|
|
|
docs(destale): wave 2 + ratchet — all live docs off retired tech (age-docs-staleness-remediation-cko)
Completes the staleness epic. 42 P2/P3 files converged to current truth
(bd→br, gascity/gt-sling/mayor→NTM+Agent Mail, daemon→substrate, hooks→hookless,
CI-authoritative→push-to-main local Go gate); GLOSSARY's 18 dead skills/* links
repaired to ../skills/<name>/SKILL.md (19 links, 0 broken); contracts/runbooks
that freeze retired-system nouns bannered RETIRED/HISTORICAL rather than rewritten.
Adds the Arc-7 ratchet — scripts/check-docs-no-retired-tech.sh — which scans all
live docs (260) for retired-subsystem commands/phrases and fails on regression.
A doc opts out by carrying a RETIRED/HISTORICAL/SUPERSEDED banner (or being an
ADR / migration / upgrade / index doc), and lines that describe a removal are not
flagged. Running it caught 12 stale refs the deep-read sweep missed — a
"CI is the authoritative gate" cluster (agentops-brief, primitive-chains,
INCIDENT-RUNBOOK, knowledge-flywheel, philosophy, software-factory), stale
hook-smoke in release-e2e-checklist, and GasCity descriptors in
contracts/index + SCHEMAS + strategic-direction — now fixed. Gate: PASS.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-17 10:23:02 -04:00
|
|
|
[Wave 1] br ready → [ao-1, ao-2, ao-3]
|
2026-02-21 19:41:50 -05:00
|
|
|
TaskCreate for each
|
|
|
|
|
/swarm → 3 agents spawned
|
|
|
|
|
ao-1 DONE, ao-2 DONE, ao-3 BLOCKED
|
|
|
|
|
|
docs(destale): wave 2 + ratchet — all live docs off retired tech (age-docs-staleness-remediation-cko)
Completes the staleness epic. 42 P2/P3 files converged to current truth
(bd→br, gascity/gt-sling/mayor→NTM+Agent Mail, daemon→substrate, hooks→hookless,
CI-authoritative→push-to-main local Go gate); GLOSSARY's 18 dead skills/* links
repaired to ../skills/<name>/SKILL.md (19 links, 0 broken); contracts/runbooks
that freeze retired-system nouns bannered RETIRED/HISTORICAL rather than rewritten.
Adds the Arc-7 ratchet — scripts/check-docs-no-retired-tech.sh — which scans all
live docs (260) for retired-subsystem commands/phrases and fails on regression.
A doc opts out by carrying a RETIRED/HISTORICAL/SUPERSEDED banner (or being an
ADR / migration / upgrade / index doc), and lines that describe a removal are not
flagged. Running it caught 12 stale refs the deep-read sweep missed — a
"CI is the authoritative gate" cluster (agentops-brief, primitive-chains,
INCIDENT-RUNBOOK, knowledge-flywheel, philosophy, software-factory), stale
hook-smoke in release-e2e-checklist, and GasCity descriptors in
contracts/index + SCHEMAS + strategic-direction — now fixed. Gate: PASS.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-17 10:23:02 -04:00
|
|
|
[Wave 2] br ready → [ao-4, ao-5, ao-3]
|
2026-02-21 19:41:50 -05:00
|
|
|
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
|
|
|
|
|
|
2026-07-01 17:51:23 -04:00
|
|
|
- `/validate` - Runs automatically at end
|
2026-02-21 19:41:50 -05:00
|
|
|
- `/post-mortem` - Extract learnings after epic completes
|