mirror of
https://github.com/boshu2/agentops.git
synced 2026-09-14 15:08:13 +08:00
4a7c6a0701
Add an --all-docs mode to check-doc-skill-refs.sh that scans the union of the pinned doctrine files PLUS the full LIVE docs/** set (scripts/lib/docs-scope.sh), ratcheted by a new filename-pinned shrink baseline (scripts/.docs-skill-refs-baseline). Two-way ratchet: a non-baselined live doc with a dead `/skill` ref FAILS; a baselined file that no longer offends FAILS demanding a prune. Detection stays slash-syntax + headings only (never bare skill names). Default (no-flag) behavior is byte-identical. docs/SKILL-ROUTER.md (the curated router) is covered by --all-docs (a live docs/** file, never baselined) so a dead ref there FAILS strict, without perturbing the byte-identical default doc count. seed.go docs.skill-refs row: Match widened to docs/** + the baseline + the lib; Args set to [--all-docs --strict]. Burn-down (long-tail only): repointed retired `/retro`->/post-mortem, `/vibe`->/validate, `/ratchet`->/flywheel, `/research-multi`->/research, `/implement-wave`->/crank, and reworded the retired `/dream` across 13 docs/levels + docs/workflows + docs/philosophy pages, then pruned them from the baseline (91 -> 78 offenders). Owner-locked pages (comparisons/getting-started/positioning) stay baselined. Bats twin tests/scripts/check-doc-skill-refs-all-docs.bats covers all the modes.
2.4 KiB
2.4 KiB
description
| 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)
| |
+-> br ready (wave issues) |
| |
+-> TaskCreate from beads --->+-> Spawn agents (fresh context)
| |
+-> /swarm --->+-> Execute in parallel
| |
+-> Verify + br 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:
BEADS_DIR="$(ao beads dir)" br 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
/crank ao-epic-123
Epic: "Add user dashboard"
Total: 8 issues
[Wave 1] br 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] br 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
/validate- Runs automatically at end/post-mortem- Extract learnings after epic completes