--- name: kanban-orchestration description: Use when several agent workers share one kanban goal. Covers card contracts, dependency links, dispatch checks, review gates, blocker routing, and recovery after crashes or timeouts. version: 1.0.0 author: Pixel Rainbow (shagghiesuperstar) license: MIT metadata: hermes: tags: [kanban, orchestration, dispatch, dependencies, multi-agent] category: agent-orchestration related_skills: [kanban-card-lifecycle, kanban-board, kanban-worker-spawn-failures, hermes-role-orchestration, external-coding-agent-orchestration, adversarial-review, merge-reconciler, dispatch-proof, steer-protocol] --- # Kanban Orchestration: Multi-Worker Goals on a Board ## Overview An orchestrator turns one goal into cards on a durable board. Each card goes to a worker profile, and a dispatcher claims ready cards and starts the workers. The board outlives the orchestrator's session, so a restart loses no in-flight work. The orchestrator owns scope, dispatch, review gates, recovery, verification, and the final report. A worker executes one card and does not widen it. Every claim that a card is done is checked against the outside world (the pull request state, the commit on the branch, or a live request). A worker's own report is not enough. ## When to Use - The goal has more than two parallel workstreams, runs past about 30 minutes, must survive a session restart, or spans hosts or engines. - The goal has explicit done, partial, and blocked gates that someone must track. - Several workers must hand work to each other in a fixed order, with reviewers in between. Not for a single bounded lookup that finishes in one tool call (use in-session delegation), a single repository edit handed to one headless CLI (use `external-coding-agent-orchestration`), or installing and signing in to an engine (use `local-agent-cli-setup`). ## Features - A card contract: a one-line TELOS naming the mission, and three to seven DONE-MEANS criteria, each checkable by a command, a file, or a cited source. - Dependency links set at creation, so a child waits for its parent without anyone remembering to release it. - Per-card workspace modes: scratch for read-only work, an isolated worktree for edits, or a fixed directory. - A review gate that needs an approval and an independent second opinion on a frozen commit before any merge. - Blocker routing that names the owner of each block: the operator, the orchestrator, or a third party. - Loop stop rules: a maximum number of rounds, a no-progress check, and a stop when the source is stale. - A recovery checklist for crashed, timed-out, and blocked cards. ## Benefits - Board state is durable, so a restarted session reads the board instead of rebuilding its memory. - A card's criteria stop a worker from declaring its own work done. - The operator gets one status table: card, status, assignee, and process ID. - One writer per checkout means two runs cannot overwrite each other's edits. - Blockers reach the right owner in the turn they appear, not at the next check-in. - Work is spread across engines, so one subscription's limit does not stall the whole run. ## Procedure ### 1. Plan the goal 1. Break the goal into cards. Set each dependency with a parent link at creation (step 2), not later. 2. Before writing cards for a repository, list its open pull requests and classify each one. LAND-FIRST: reviewed or already decided by the operator, and changes what users see; it becomes the base. PARALLEL: no file overlap; run alongside. STALE: superseded or already on the main branch; propose closing it with a comment to the operator, and close it only after an explicit go-ahead. Open drafts are queued future state, not noise. 3. Before dispatching a second builder into a repository that already has one in flight, compare the two file lists. On overlap, give one card ownership of the shared file, or chain the second card behind the first. 4. Write each card with TELOS and DONE-MEANS. No criteria, no dispatch. A trivial card (a typo or a one-line docs fix) may skip the contract, and the skip reason goes on the card. 5. Put every cross-card decision (URLs, IDs, names, schemas, versions) verbatim into each card body that depends on it. Workers read their own card body, not sibling cards or the parent board, so a spec file alone is not enough. 6. Keep secrets out of card bodies, comments, and metadata. Stage them through the team's secret-handling step. 7. In the same turn a goal is accepted, create the board, at least one card, and post the board listing to the requester. If you cannot do all three, say "deferred until ". Specs on disk are not progress the operator can see. ### 2. Create cards and links A typical create call, with placeholders: ```bash hermes kanban create \ --body "" \ --assignee \ --workspace scratch | worktree | worktree: | dir: \ --branch \ --priority \ --goal --goal-max-turns \ --max-runtime --max-retries \ --model --provider \ --skill --skill \ --parent \ --created-by