Orchestrator API Reference
spec-kitty orchestrator-api is the host-side contract for external orchestration providers.
- Core CLI does not include
spec-kitty orchestrate. - External providers (for example
spec-kitty-orchestrator) must use this API. - Commands are JSON-first: exactly one JSON envelope on stdout; non-zero exit on failure.
Contract Version
CONTRACT_VERSION:1.0.0- Command:
spec-kitty orchestrator-api contract-version --json
Canonical Envelope
All commands return:
{
"contract_version": "1.0.0",
"command": "orchestrator-api.feature-state",
"timestamp": "2026-02-23T18:03:22.152177+00:00",
"correlation_id": "corr-9b9385...",
"success": true,
"error_code": null,
"data": {}
}
Field meanings:
contract_version: Host API contract version.command: Fully qualified command name (orchestrator-api.<subcommand>).timestamp: Host generation timestamp (ISO 8601).correlation_id: Unique request/response correlation token.success: Success/failure indicator.error_code: Machine-readable error identifier on failure, otherwisenull.data: Command-specific payload.
Lanes and Mapping
Public API lane model:
plannedin_progressfor_reviewdoneblockedcanceled
Host internal lane compatibility:
- API
in_progressmaps to internaldoing. - API
for_review,planned, anddonemap directly.
Policy Contract (Mutation Commands)
Run-affecting operations require --policy JSON and validate it server-side.
Required fields:
orchestrator_idorchestrator_versionagent_familyapproval_modesandbox_modenetwork_modedangerous_flags(array)
Validation rules:
- Missing required fields fail with
POLICY_VALIDATION_FAILED. - Non-array
dangerous_flagsfails validation. - Secret-like values (
token,secret,key,password,credential) are rejected.
Subcommands
contract-version
spec-kitty orchestrator-api contract-version --json [--provider-version <semver>]
Returns host api_version and minimum supported provider version.
feature-state
spec-kitty orchestrator-api feature-state --feature <slug> --json
Returns WP states, dependency data, and lane summary.
list-ready
spec-kitty orchestrator-api list-ready --feature <slug> --json
Returns WPs in planned with all dependencies in done.
start-implementation
spec-kitty orchestrator-api start-implementation \
--feature <slug> --wp <WP##> --actor <actor-id> --policy '<json>' --json
Composite transition into in_progress for implementation. Returns workspace_path and prompt_path.
start-review
spec-kitty orchestrator-api start-review \
--feature <slug> --wp <WP##> --actor <actor-id> --policy '<json>' \
--review-ref <ref> --json
Moves a rejected WP from for_review back to in_progress.
transition
spec-kitty orchestrator-api transition \
--feature <slug> --wp <WP##> --to <lane> --actor <actor-id> \
[--note <text>] [--policy '<json>'] [--review-ref <ref>] [--force] --json
Applies one lane transition with deterministic validation errors.
append-history
spec-kitty orchestrator-api append-history \
--feature <slug> --wp <WP##> --actor <actor-id> --note <text> --json
Appends an activity entry to the WP prompt history.
accept-feature
spec-kitty orchestrator-api accept-feature --feature <slug> --actor <actor-id> --json
Accepts a feature when all WPs are done.
merge-feature
spec-kitty orchestrator-api merge-feature \
--feature <slug> [--target main] [--strategy merge|squash] [--push] --json
Runs preflight and merges WP branches in dependency order.
Common Error Codes
CONTRACT_VERSION_MISMATCHFEATURE_NOT_FOUNDWP_NOT_FOUNDTRANSITION_REJECTEDWP_ALREADY_CLAIMEDPOLICY_METADATA_REQUIREDPOLICY_VALIDATION_FAILEDFEATURE_NOT_READYPREFLIGHT_FAILEDMERGE_FAILEDPUSH_FAILEDUNSUPPORTED_STRATEGY
Integration Notes
- Treat
error_codeas the stable failure discriminator. - Do not parse human-readable
messagetext for control flow. - Do not mutate
kitty-specs/state directly from external providers.