Formal documentation for the
acpcommand-line interface, as implemented incmd/acp.
The acp binary contains everything: the CLI, the control plane (acp serve), and the worker harness (acp agent). All commands read and write the vault directly — there is no API server in V1.
Global: every command accepts --vault <path>; the default comes from $VAULT_PATH, falling back to ./vault.
Scaffolds the vault directory structure (tasks/{pending,doing,done,failed,.wip}, agents/, knowledge/, logs/, results/, scratch/). Idempotent.
Creates a new task in pending/ and prints the generated task ID.
Options:
--role <role>: Optional. Capability required to claim this task (e.g.coder). Empty = any worker.--priority <level>:low|normal|high|critical. Default:normal.--metadata <json>: Optional JSON object of string key-value pairs.
acp task create --role coder --priority high "Refactor the authentication middleware"Lists tasks, optionally filtered. --json is the machine-readable form orchestrators should consume.
Prints the full JSON of one task, searching all state directories.
Moves a failed task back to pending/, resetting retry_count and release_count. Only valid for tasks in failed/.
There is deliberately no task cancel in V1 — the state machine defines no cancellation transition (see DD-007).
Shows task counts per state and every registered agent with its liveness (an agent is alive if its heartbeat record was updated in the last 15 minutes) and current task.
Runs the control plane: the RecoveryController (lease expiry + .wip janitor), the VaultController (integrity scans), and the AgentObserver (stale-heartbeat warnings). Runs until interrupted; safe to kill and restart at any point — all state is in the vault.
Options:
--recovery-interval <dur>: default5m.
Runs a worker: register → poll → claim → execute → complete, with background lease renewal.
Options:
--id <id>: Required. The agent's identity in the vault.--capabilities <a,b,c>: Claims only tasks whoseroleis empty or in this list.--exec <cmd>: Shell command to execute each task. Receives$ACP_TASK_ID,$ACP_TASK_DESCRIPTION,$ACP_TASK_ROLE; its combined output becomes the result body. Default: a stub executor (2-second sleep) for development.--poll <dur>: Poll interval, default5s.
acp agent --id coder-1 --capabilities coder \
--exec 'claude -p "$ACP_TASK_DESCRIPTION"'acp logs <agent-id>— tail an agent's log (usetail -f vault/logs/<agent-id>.logmeanwhile; ambient inspectability is the point)acp events [--follow]— stream the event trail, oncevault/events/exists (see API Contract §4)