From agent-swarm
Fable decomposes work into a tiered task manifest; haiku/sonnet workers execute in parallel worktrees; Fable re-enters only for escalations and integration.
How this skill is triggered — by the user, by Claude, or both
Slash command
/agent-swarm:delegateThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
You (Fable) are the coherence-holder. You touch the work exactly three
You (Fable) are the coherence-holder. You touch the work exactly three times — decompose, escalate, integrate. Everything in between runs on cheaper models through the parallel-orchestrate machinery.
decompose → dispatch → monitor ⇄ dispatch (retries / tier bumps)
↓
escalate → dispatch
↓
integrate → done
| Phase | Driver | Purpose |
|---|---|---|
| decompose | Fable | Read codebase, write tiered manifest, start orchestrator |
| dispatch | mechanical | Spawn pending tasks at their tier |
| monitor | mechanical | Record completions; orchestrator handles retries/bumps |
| escalate | Fable (checkpoint) | Re-spec / split / absorb top-tier failures |
| integrate | Fable (checkpoint) | Merge, full suite, one coherence review |
workflow__workflow_start(workflow_id="delegate", task="<description>")
mkdir -p .delegate/
Read the code you are decomposing. Then write the manifest to
.delegate/<slug>.yaml.
Decomposition contract — every task you emit MUST be:
min_tests enforced by the TDD
worker prompt).target_dir/test_dir; no cross-cutting edits.Inverse rule (load-bearing): anything coherence-bound stays with you. If you cannot spec a task tightly enough for a cheap model, split it further or keep it for yourself in integrate. Delegation is for leaf work, never the architectural core.
Tier rubric:
| Tier | Use for | escalation |
|---|---|---|
model: haiku | Mechanical, well-templated work (CRUD, data classes, boilerplate tests, format conversions) | sonnet |
model: sonnet | Local reasoning within one module (algorithms, refactors with clear contracts) | fable (default) |
escalation: fable means: no re-dispatch — the first top-tier failure
routes to you in the escalate phase.
Manifest format — parallel-orchestrate schema plus the two tier fields:
project: <slug>
base_branch: main
max_retries: 2
tasks:
- name: 1-todo-store
description: |
<fully self-contained spec: files, interfaces, acceptance criteria>
target_dir: src/store
test_dir: tests/store
min_tests: 10
model: haiku
escalation: sonnet
depends_on: []
Then initialize and advance:
python3 ${AGENT_SWARM_ROOT}/lib/orchestrator.py load .delegate/<slug>.yaml
python3 ${AGENT_SWARM_ROOT}/lib/orchestrator.py start .delegate/<slug>.yaml <cwd>
workflow__advance_phase(wf_id, "dispatch")
python3 ${AGENT_SWARM_ROOT}/lib/orchestrator.py pending .delegate/<slug>.yaml --json
For each entry, register the worker, then spawn it with the Agent
tool (the spawn protocol — see skills/spawn/SKILL.md):
reg = router__register_agent(agent_id="<task_name>-w<n>", agent_type="implementer", roles=["editor", "shell_full"])subagent_type: "implementer" — never a native type
(general-purpose/Explore/Plan): native types have no router
access and will flailmodel: <entry.model> — this is the tiering lever; never omit itprompt: reg["briefing"] + "\n\n" + the entry's prompt field
verbatim — the briefing carries the worker's identity/caller-idpython3 ${AGENT_SWARM_ROOT}/lib/orchestrator.py spawned .delegate/<slug>.yaml <task_name> <worker_id>
workflow__advance_phase(wf_id, "monitor")
As workers complete, record results:
# success
python3 ${AGENT_SWARM_ROOT}/lib/orchestrator.py complete .delegate/<slug>.yaml <task_name>
# failure
python3 ${AGENT_SWARM_ROOT}/lib/orchestrator.py complete .delegate/<slug>.yaml <task_name> "<error>"
Route on the printed Result::
retrying → advance to dispatch, re-spawn at the same tierescalated → advance to dispatch, re-spawn (the pending entry now
carries the bumped tier — spawn with the new model)failed → advance to escalatecompleted → advance to integrateDo not investigate failures yourself in this phase — that is what the tier bump is for. You read code again only in escalate/integrate.
Entered only when a task failed at its top tier. For each failed task, pick one:
Then workflow__advance_phase(wf_id, "dispatch") (cases 1–2) or
workflow__advance_phase(wf_id, "integrate") (case 3 or nothing left).
python3 ${AGENT_SWARM_ROOT}/lib/orchestrator.py merge .delegate/<slug>.yaml <cwd>
python3 ${AGENT_SWARM_ROOT}/lib/orchestrator.py verify .delegate/<slug>.yaml <cwd>
Then do one coherence review of the merged diff (git diff <base_branch>...HEAD): naming drift across tasks, duplicated helpers,
interface mismatches, violated invariants. Fix what you find — this is
also where absorbed tasks get done. Do not re-review individual tasks;
workers already passed their test gates.
On suite failure, offer the standard three options: fix and retry / rollback / continue anyway.
Finish:
python3 ${AGENT_SWARM_ROOT}/lib/orchestrator.py summary .delegate/<slug>.yaml
python3 ${AGENT_SWARM_ROOT}/lib/orchestrator.py stop .delegate/<slug>.yaml <cwd>
workflow__advance_phase(wf_id, "done")
workflow__workflow_stop(workflow_id="delegate")
escalated_from); check summary output to calibrate your tier
rubric over time.npx claudepluginhub c-daly/agent-swarm --plugin agent-swarmCreates bite-sized, testable implementation plans from specs or requirements, with file structure and task decomposition. Activates before coding multi-step tasks.