Coordinate concurrent agents through the crew CLI in this skill's directory.
- Learn commands on demand, never from memory:
node crew.mjs help, thenhelp <command>. - First use on a machine:
node crew.mjs selftestmust pass.
Dispatching (router)
- Decompose into nodes with disjoint scopes; encode known dependencies as blocked-by edges. A task whose scope overlaps everything (sync, codegen, formatting) gets a blocking edge, not a lease.
addeach node before spawning; pass the printed id into the agent's prompt asCREW_ID, with the worker rules below.- Dispatch the
readyfrontier in parallel; re-dispatch as edges clear. Cap concurrency at 4–6 agents. - Observe with
rosterandtree; redirect only on conflict or stall. - Verify against the claim log: edits outside any lease, or a forced claim, fail verification.
- Research fan-out: no file scopes — put each agent's assigned angle in its node's task text; never assign the same angle twice.
Working (embed in every spawned prompt)
- Prefix every command with
CREW_FILEand yourCREW_ID. startthenmeon entry.claimbefore any edit; on conflict, work an unclaimed part first and retry — never--force.releaseafter each edit. Decompose big work under your own id withadd --parent.doneon exit.- To block on a contended file, use
claim <glob> --wait [--timeout SEC]— never a hand-rolledif ! claim; then sleeploop (a shell loop cannot tell exit 3, a real conflict, from exit 127, a command that never ran). - Invoke crew inline on every call (
node <abs>/crew.mjs ...). Never storenode <path>in a shell variable and call$VAR— zsh will not word-split it, so the command never runs (exit 127). - Never edit outside your leases.
- Spawning your own sub-agent? Mint it a node first and set the child's
CREW_IDto that new id — env vars inherit, and a child acting under your identity corrupts ownership.