Skills
Coordinate verified agent jobs with ak-orchestrate
Route staged or parallel jobs through live-verified runtimes, isolate writers, capture evidence, resume interrupted work, and require independent arbitration.
Use ak-orchestrate when one outcome benefits from staged dependencies,
parallel work, runtime diversity, or an independent arbiter. Every worker is an
independent, resumable session of the runtime you are already using; other
runtimes join only when you opt in. The Skill verifies every runtime and
control at execution time, isolates risky writers, captures
bounded evidence, and refuses to call unverified work complete. The Skill owns
routing and judgment; ak orchestrate owns deterministic plan state, process
supervision, and observable evidence.
Choose ak-orchestrate for a job graph
Use ak-orchestrate when
- Several independent jobs can run in parallel with distinct ownership.
- Later jobs depend on explicit artifacts or checks from earlier jobs.
- You need to route research, implementation, tests, and review by capability and risk.
- A long run needs durable state and bounded resume behavior.
- An independent judgment pass should reconcile conflicting outputs.
Choose another workflow when
- One agent can complete the task without useful fan-out or arbitration.
- Teammates need ongoing direct discussion and shared multi-session state. Use
ak-teamwhen the live runtime supports it. - You only need a fast read-only code map. Use
ak-scout. - You have one accepted implementation plan. Use
ak-cookunless routing diversity or isolation is material.
Prepare the workspace and runtimes
Before you start:
- Complete Onboarding, and confirm Engineer Kit is installed for the runtime and scope you are using.
- Use a Git repository when any job requires worktree isolation.
- Define the outcome, constraints, non-goals, acceptance evidence, allowed files, and external-effect boundary.
- Ensure each candidate CLI runtime is already installed and authenticated. Discovery does not install, update, log in, or change configuration.
- Keep credentials and unrelated private data out of prompts and capture.
| Runtime | Invocation | Availability boundary |
|---|---|---|
| Claude Code | /ak-orchestrate ... | The Skill starts independent Claude Code sessions and its own verified headless CLI. Exact routes and controls are discovered during this run. |
| Cursor | /ak-orchestrate ... | Slash invocation follows the user-verified Engineer Skill spelling. Sessions are eligible only when the current Cursor surface proves the required dispatch and controls. |
| Codex | $ak-orchestrate ... | Native Skill discovery is supported. Sessions require the surface to expose session creation; otherwise a verified Codex CLI route, an opted-in runtime, or a blocked result is used. |
By default the candidates are sessions of the invoking runtime and its own supervised headless CLI. Other runtimes are considered only through the opt-ins in Dispatch sessions first.
Check platform support
ak-orchestrate is not macOS-only. Only external process supervision by
ak orchestrate requires Darwin.
| Capability | Darwin | Linux, Windows, other |
|---|---|---|
probe, prepare, advance, accept, plan-status | Yes | Yes |
events, output, diagnose | Yes | Yes, but only for runs recorded on a supervising host |
runtime: internal jobs (current-runtime sessions) | Yes, when the live runtime can start a session | Yes, when the live runtime can start a session |
CLI and Pi jobs supervised by ak orchestrate | Yes | No: advance settles the job blocked with error class unsupported_platform and exits 1; internal jobs in the same run are still dispatched |
Executable verification: checks in a job spec | Yes | No: accept settles the job blocked with error class unsupported_platform; prepare a new run without executable verification |
start, status, resume, stop for supervisor runs | Yes | No: each command's help lists its unsupported-platform exit code |
On a non-Darwin host, the Skill routes qualified jobs through
runtime: internal sessions. A job that needs a supervised CLI or Pi process stays out
of the prepared spec and is reported blocked with the platform reason. A
verification: that you declare, or that a supplied spec declares, is an
acceptance constraint: that job is blocked, never converted. Only in a spec the
Skill authors does it list check commands under checks:, run them in the
harness, and record them as harness-attested. The Skill never bypasses the
supervision gate, launches an unsupervised process instead, or re-advances a
job already stuck on it. When no current-runtime session qualifies either, the run
blocks and says why.
Run the Skill
/ak-orchestrate "Map the session boundary, propose two designs, implement the accepted low-risk change in isolated ownership, then run an independent review"/ak-orchestrate "Map the session boundary, propose two designs, implement the accepted low-risk change in isolated ownership, then run an independent review"$ak-orchestrate "Map the session boundary, propose two designs, implement the accepted low-risk change in isolated ownership, then run an independent review"For repeatable work, pass a YAML job-spec path. For interrupted work, pass the
existing run directory with --resume. Dispatch CLI jobs with
ak orchestrate prepare <jobs.yaml> <run-dir> then
ak orchestrate advance <run-dir> --json. Do not bypass an uncertain attempt
by calling start manually. Read status, events --after <cursor>, and
output --offset <bytes> until all_settled. Use diagnose --json for an
observation bundle; never export private graph.json or job specs.
graph.json may contain argv and environment.
| Input or option | Behavior | Boundary |
|---|---|---|
| Free-form task | Converts the accepted outcome into a durable job graph before dispatch | The generated graph must still pass validation and safety gates |
| Job-spec path | Uses explicit jobs, dependencies, timeouts, ownership, checks, and expected outputs | Runtime, model, Agent, and control pins remain unverified until live preflight |
--cross-runtime | Admits other installed runtimes that pass live probes, authentication, controls, quota, and cost checks | Opt-in only; a missing or unauthenticated named runtime runs its onboarding as a visible setup step |
--internal | Deprecated: accepted as "prefer current-runtime sessions", which is already the default | The Skill prints one line asking you to drop it; it never selects a nested subagent |
--yes | Carries approval only for the exact destructive or external scope already described | It does not authorize broader credentials, files, release, or deployment |
--resume <run-dir> | Reuses successful outputs and redispatches interrupted work as new attempts | Routes, authentication, controls, and approvals are revalidated |
Dispatch sessions first
Every worker runs outside the coordinator's turn, as a session with its own
native handle, context, model, and lifecycle, or as a supervised headless
process. A session of the current runtime is runtime: internal in a job
spec. Nested in-harness subagents are not workers.
- Scope defaults to the current runtime. The candidates are sessions of the runtime you invoke the Skill from and that runtime's own supervised CLI.
- Other runtimes need an opt-in. Pass
--cross-runtime, give a job afallback_runtimechain in the spec, pin aruntime:, or name the runtime in the request (for example "as pi sessions"). Each is an equivalent opt-in for that runtime. A named runtime that is missing or unauthenticated runs its onboarding as a visible setup step, then is probed again. - Unavailable is visible. When the current runtime cannot start a
qualifying session and no opted-in candidate qualifies, the job is reported
blockedwith the probe evidence. The Skill never widens scope silently or overrides an explicit runtime, model, or role-profile pin. - Permission fallback is the only subagent route. When the runtime refuses
to start a session because the coordinator lacks permission (standing policy
or permission mode, not a prompt you declined), the job may run as a nested
agent. Its own prompts are still answered by you, isolated high-impact writers
keep their own worktree, external or destructive jobs stay blocked, and
arbiter and review jobs, which need independence a subagent cannot prove,
never use it. The report records
fallback: subagent, the refusal evidence, and the reduced guarantees: no independent resume, shared quota and permissions, and an accounting-only timeout. Quota, budget, resource, missing-runtime, and crash failures never fall back to a subagent.
ak orchestrate probe caches its capability metadata under
AGENTKIT_HOME/cache/orchestrate/probe. The command is classified read-only:
it runs version and help probes, never installs or authenticates a runtime, and
only updates that cache. See ak orchestrate probe.
Describe the jobs clearly
Each job needs:
- Intent: A task class such as scout, architecture, implementation, review, audit, security, test, documentation, or mechanical work.
- Workspace: An exact working directory inside the authorized workspace.
- Ownership: Files it may write, or an explicit read-only scope.
- Dependencies: Jobs that must succeed before this one can start.
- Expected output: A verifiable report, diff, test result, or artifact.
- Checks: Commands or evidence the arbiter must inspect.
- Risk: Read-only, scoped write, isolated high-impact write, or external/destructive effect.
- Bounds: A timeout and any explicit runtime, model, Agent, tool, or budget constraint.
An explicit runtime or model is a constraint, not proof that it is present or safe. If the live candidate cannot satisfy the required capability and control floors, the job blocks rather than silently weakening them.
Understand the workflow
- The Skill accepts the contract. It confirms the outcome, boundaries, expected evidence, dependencies, and external intent.
- The Skill builds and validates the graph. It rejects duplicate IDs, dependency cycles, unsafe working directories, missing bounds, and parallel write overlap.
- The Skill inventories live candidates. It starts with the current runtime, adds opted-in runtimes, and verifies executable or session availability, authentication readiness, current command shape, selectable routes, permissions, isolation, timeouts, capture, resume behavior, and host limitations.
- The Skill classifies capability and risk. Read-only extraction, implementation, and independent judgment receive different minimum floors. Safety controls are filtered before cost or latency.
- The Skill applies the approval gate. Destructive, release, deployment, deletion, credentialed, and other external effects require exact approval and a recovery plan.
- The Skill dispatches by stage. Independent jobs run together only within
the
concurrency:the Skill admits from quota and host headroom (see Size parallelism and recover from failures). Parallel writers use separate worktrees and disjoint ownership. - The Skill captures durable evidence. State transitions, bounded output,
artifacts, errors, duration, and reliably reported usage remain available
for diagnosis and resume. Supervised CLI and Pi processes require Darwin;
on other hosts, qualified session jobs continue through the same
prepare,advance, andacceptloop, as described in Check platform support. - The Skill runs an arbiter. A separate session on the strongest live-verified judgment model checks expected outputs, contradictions, safety gaps, failed checks, unsupported claims, and unresolved questions.
- The Skill reports without integrating silently. Worktree diffs remain awaiting review; merge or cherry-pick is a separate action.
Size parallelism and recover from failures
Admission. The Skill sizes the spec's concurrency: from evidence, not a
fixed worker count. It reads provider usage windows with ak usage limits,
keeps headroom below the reported limits (runtimes on one upstream account
share one pool), and checks host CPU, memory, and disk. Heavy checks such as
full preflights, browser suites, and builds run serially; cheap scouts run in
parallel. Unknown quota or cost is not unlimited: the Skill admits serially or
asks for a policy. Under pressure it stops calling advance for new work and
settles every job already handed out, without stopping processes the run did
not start. The reason for any reduced concurrency is recorded in the report.
Failure classes. Each failed or stuck attempt is classified before any
action. The coordinator class stays in status.json and the report, and the
plan engine's mapped error_class goes in the accept receipt (for example
rate_limited maps to rate-limit, and a transient failure maps to timeout
when the bound expired):
| Class | Examples | Retry |
|---|---|---|
transient, rate_limited | Short network loss, timeout with a confirmed stopped writer, retryable provider limit | Only through the job's retry: policy |
quota_exhausted, budget_exhausted | Usage window spent, cost ceiling reached | No; wait for the reset or report the blocker |
runtime_missing, auth_unavailable, model_unavailable, unsupported_capability | Runtime absent or unauthenticated, model not in the live set | No |
host_resource_pressure | Low memory or disk | No |
process_crash, lost_handle, message_unavailable | Worker died or its session cannot be resolved | No, until the old writer is proven stopped |
verification_failure, merge_conflict, task_spec_error | Checks fail, worktrees conflict | No |
permission_denied, security_risk, external_effect_requires_approval | Refused action, unsafe input, effect without approval | No; stop and report the approval boundary |
Fallback ladder. The Skill climbs only as far as needed, within the run's time and cost limits. A prepared run fixes each job's runtime, model, and invocation, so a failed job is never re-routed inside the same run.
- Reattach to the original attempt or session when its handle and ownership are proven.
- Retry on the same route through the job's
retry:policy, after the previous writer has settled. - Adapt within the current runtime: lower
concurrency:or wait for a usage window for jobs not yet dispatched, or prepare a new run directory with another live model or effort. - Cross runtimes, only when opted in, by preparing a new run directory that routes the job to a freshly probed candidate. Model identifiers and flags are never carried between runtimes.
- Pause, replan, or block with an actionable blocker or approval request.
No step raises permissions, skips checks, ignores a pin, or leaves the authorized roots.
Understand arbiter and review models
Arbiter, advisor, review, audit, and security jobs resolve the strongest model the active route can actually use, and the arbiter runs in a fresh, separate session. The Skill starts from the models the live runtime lists as selectable for your account, drops any that you, the project, or your organization disallow, then applies precedence: an explicit pin, then a model policy, then the strongest remaining candidate by the runtime's catalog rank. Earlier run metrics never reorder that ranking. When the route cannot select a model, its default is used and the report says no override happened.
The report discloses the runtime and model that actually served each judgment job, plus the selection and any fallback reason. A different-family reviewer is preferred when live evidence proves it; a same-family fallback is disclosed. A Pi arbiter counts as independent only when its resolved model family differs.
Optional shadow comparison
Routing applies every capability and risk floor and your pins first. The
default path never invokes a semantic command or reads provider configuration.
Only for an experiment you request, or a trusted opt-in from you already in
context, can the Skill run ak eval decision. It supplies only compact facts
(the task, its effect, importance, and whether it runs in parallel) plus its
existing risk and capability classification, never job prompts, logs, or
credentials.
The command checks consent and produces a shadow comparison only. It cannot change the selected runtime or model, lower risk controls or capability floors, grant approval, or unblock an unavailable route. The Skill follows its existing routing result on every disagreement or provider failure.
Keep approval and safety with you
A worktree is collision isolation, not a sandbox
Separate worktrees keep concurrent Git edits apart. They do not contain processes, network access, credentials, or writes outside the worktree. A job still needs runtime controls that meet its risk tier.
Every CLI process receives a coordinator-owned timeout. Session timeouts are only accounting limits unless the live harness proves cancellation; the Skill must not launch another writer into the same ownership while a timed-out Agent may still be running.
Permission bypasses stay off by default. A headless runtime that auto-approves writes is constrained to read/report work or stronger isolated treatment. No job may place tokens, cookies, private keys, raw environment values, or secret arguments in its request or capture.
Verify the result
A complete run should provide:
- A validated job graph with dependencies, ownership, bounds, expected outputs, and checks.
- A live runtime inventory showing verified, constrained, unavailable, and unverified candidates without secret values.
- Per-job status, resolved route, risk and capability classification, artifacts, errors, timeouts, and attempts.
- Preserved failed or interrupted evidence rather than silent retries.
- An arbiter verdict that checks every required artifact and contradiction.
- A final report naming successful, failed, and blocked jobs, checks, worktree diffs awaiting integration, and unresolved questions.
The run is successful only when every required job succeeds, checks pass, claims have evidence, contradictions are resolved, and the arbiter passes.
Troubleshoot or resume
| Symptom | Safe next step |
|---|---|
| The agent says orchestrate needs macOS | Only external CLI supervision needs Darwin. The Skill routes the jobs through current-runtime sessions; jobs that need a supervised CLI are reported blocked. |
A session cannot start and the job is blocked | Read the probe evidence. Opt in another runtime with --cross-runtime or a fallback_runtime chain, or fix the current runtime's session surface. |
The Skill prints that --internal is deprecated | Drop the flag. Current-runtime sessions are already the default. |
| A runtime is missing or unauthenticated | Evaluate opted-in fallbacks in a new run directory through the same live gate, or complete setup outside the run and preflight again. |
| A model or flag is rejected | Return to live help or current official documentation; do not guess or carry identifiers across runtimes. |
| A permission prompt appears | Stop the job and resolve the exact approval boundary. Do not retry with a bypass. |
| A job times out | Preserve bounded partial evidence, mark the job failed, and block dependents until a recovery decision. |
| Parallel writers need the same file | Sequence them or redesign ownership; separate worktrees do not resolve the integration conflict. |
| A run is interrupted | Resume from its durable state, revalidate live routes, and rerun only interrupted work plus the required arbiter. |
| The arbiter fails | Address missing artifacts, failed checks, contradictions, or unsupported claims before integration. |
| The runtime does not recognize the Skill | Confirm target and scope, restart the runtime session, then follow Runtime cannot find a Skill or Agent. |
Compare ak-team for live multi-session collaboration, or continue with the
Engineer Kit overview and
Runtime adapters.
Know the current limits
- Runtime and model catalogs, authentication, flags, and safety controls drift; every run must verify them live.
- Session jobs may lack force cancellation, per-job sandboxing, or model selection; each is probed per run. A permission-fallback subagent also lacks independent resume and shares the coordinator's quota and permissions.
- Quota and resource admission is coordinator judgment over observed evidence, not an enforced reservation.
- Jobs share no implicit memory; dependencies must pass explicit artifacts.
- Worktrees require Git and disk headroom, and integration remains a separate reviewed action.
- Usage and cost appear only when the selected harness reports them reliably.
- The Skill coordinates existing runtimes; it does not create a daemon, dashboard, account pool, or provider adapter.
- Supervised CLI and Pi jobs, executable
verification:checks, and thestart,status,resume, andstopsupervisor commands require Darwin. Other hosts run qualifiedruntime: internalsession jobs and block the rest.
Discover the right capability with ak-find-skills
Route to an installed AgentKit Skill first, or search the external Skills ecosystem and install a reviewed package with explicit approval.
Coordinate live teammates with ak-team
Run research, implementation, review, or debugging through independent teammate sessions with shared work, direct communication, ownership, verification, and cleanup.