Skip to Content
MeowKit
Skills

mk:orchestrate

Splits a job across agent CLIs and subagents in worktrees, with live routing, an arbiter review and a resumable run directory.

Source.claude/skills/orchestrate/SKILL.md
Ownerlifecycle
Runtimeclaude-code
Riskmedium
Phaseon-demand

What it does

Coordinates a job across several agent CLIs and in-session subagents as a staged, captured, resumable run. It is a skill-level coordinator with no daemon or scheduler; it drives runtimes already on the machine. Use it when work needs several runtimes, or several parallel writers each in its own worktree. If a single agent would do, the skill says so and does not invent jobs.

When not to use

For one scoped feature use mk:cook. For parallel work inside one session, mk:cook follows .claude/skills/cook/references/parallel-execution-rules.md.

Usage

/mk:orchestrate "research three implementation options and compare them"
/mk:orchestrate tasks/plans/orchestrate-jobs.yaml [--yes]
/mk:orchestrate --resume tasks/reports/orchestrate-<timestamp>
Input or flagEffect
Job spec YAMLA repeatable run. Schema in references/job-spec.md
Task descriptionThe skill writes a temporary jobs.yaml in the run directory first
--internalPrefer in-session subagents for jobs without an explicit runtime:. A live-verified CLI fallback is still allowed
--yesPre-approves only the destructive scope the spec already describes
--resume <run-dir>Reload jobs.yaml and state.json, keep successful outputs, redispatch interrupted jobs

An explicit runtime, model or agent pin is never overridden silently.

Steps

  1. Intake: clarify outcome, constraints and acceptance evidence. Refuse any plan that puts secrets into prompts, commands or captures.
  2. Build the job graph: each job has a task, cwd, timeout, expected output and file ownership. depends_on forms stages. Parallel writers get isolation: worktree.
  3. Discover and route: probe the live runtimes (references/runtime-matrix.md), profile them (harness-profiles.md) and choose a route by capability tier C1 to C3 and risk tier R0 to R3 (model-routing.md). A job with no qualifying candidate is marked blocked.
  4. Safety check: least privilege, permission-bypass modes off, explicit confirmation for destructive, deploy, release, delete or credentialed work. Every CLI process gets an external timeout.
  5. Dispatch and capture: create worktrees through mk:worktree, start jobs up to the concurrency limit, update state.json on every transition and capture redacted output. At most 3 internal agents run at once (references/internal-routing.md).
  6. Arbiter review: a separate C3 route compares each result with expected_output and the intent, runs the spec's checks and flags contradictions and unsupported claims. Unverified work is not reported as complete.
  7. Report: per-job status, resolved routes, artifacts, verdict, reproduction commands and unresolved questions.

Worktrees stop edit collisions but are not an OS sandbox. Integration happens only after the arbiter pass, with mk:worktree merge and an integration test. Orchestrate never pushes, merges, releases or deploys on its own.

Outputs

tasks/reports/orchestrate-<timestamp>/
  jobs.yaml  runtimes.json  state.json  report.md
  worktrees/<job-id>/
  <job-id>/  status.json  artifacts/  attempt-<n>/
             command.txt stdout.txt stderr.txt   (CLI jobs)
             result.md                           (internal jobs)
tasks/reports/orchestrate-history.jsonl

status.json records the resolved runtime, model or agent, tiers, status, exit code and duration. Metrics in the history file are advisory and never change routing policy.

Gotchas

Runtime and model names change often, so resolve every route from live evidence and never copy one from this page or an older report. An unknown flag or model fails the attempt and is not replaced by a guess. A permission prompt stops the job and reports the approval boundary. If the references disagree the run stops and reports the mismatch. mk:delegate builds each job's subagent prompt, and mk:task-queue enforces ownership in long multi-session runs.

On this page