orchestrate
Installation
SKILL.md
Orchestrate
Treat the current session as the control tower. Keep decomposition, worker routing, integration, user communication, and final review in this session. Use orchestrate.sh to control detached agent-CLI workers in tmux or cmux.
Resolve ORCH to the absolute orchestrate.sh adjacent to the SKILL.md that loaded this skill. Verify that it is executable before continuing. Use the output of "$ORCH" help as the authority for command syntax, supported profiles, and defaults; the current help command exits with status 1 after printing that output.
Control invariants
- Launch full-auto workers only in directories the user has entrusted to autonomous edits and commands.
- Record the active
ORCH_HOMEand choose a unique run prefix. Start every worker ID with that prefix so concurrent control towers sharing the state directory cannot collide. - Record each worker's ID, directory, workstream, and latest state. Pass explicit ledger IDs to
waitallandstop; reserve no-IDwaitall,stop --all, andgcfor recovery after confirming the entireORCH_HOMEis in scope. - Route human decisions to the user. Treat
--answeras an assertion that the user chose the supplied response, and pass it only after receiving that choice. - Interpret
DONEas a settled worker screen. Establish task completion separately by reading the logs, checking for trailing questions or unfinished plans, reviewing the result, and running verification. - Interpret
TIMEOUTas a live worker that needs inspection or more time. Inspect withpollorlogs, then wait again. - Run commands that may exceed the host's foreground limit (
spawn,run,wait,waitall, andstop) through the host's non-blocking execution facility, retaining the handle until stdout is collected.
For two or more concurrent workers, read references/fan-out.md completely before creating any worker, then apply it alongside the loop below.