Workflow CLI

The dedicated commands use the existing controller APIs and native session MCP tools. Run ./devctl workflow help, or ./devctl workflow help review for one family. --help on a family or command lists its parameters and supported flags. Commands return JSON by default; --json is accepted for scripting consistency.

Family Commands
task delegate, list, show, result, cancel, complete, sessions
mailbox list, ask, show, result, reply
review schemas, capabilities, profile get/put, account get/put, team put, skill put, skills, bundle pin, request, latest, show, refresh, finding, history, export, artifact, vcs get/put
issue connections, connection get/put, run, poll, tasks, show, sync
execution policy get/put, budgets list/put, reservations
placement get, put
private-network list, create, show, grant, revoke, remove-host
diagnostics run, history, show, export, source get/set/clear, control-room show/configure
technology show, refresh, history, snapshot, export, annotate, languages, languages-refresh, recommendations
skill-catalog list, history, snapshot, refresh status/configure/run

Authority and inputs

./devctl runs the owner/operator CLI inside the controller container using its existing sign-in configuration. Direct CLI execution uses DEVCTL_CONTROLLER_URL and DEVCTL_TOKEN or DEVCTL_TOKEN_FILE. Configuration, human adjudication, tracker intake/writeback, and aggregate operator budgets retain their server-side ownership and role checks. A command never grants additional authority.

Run native commands in the actual managed session context, using its existing account-owned MCP broker socket with --mcp-socket ABSOLUTE_PATH or DEVCTL_WORKFLOW_MCP_SOCKET. DEVCTL_MCP_SESSION_TOKEN also supports existing authorized session integrations. The CLI does not create or discover these credentials. The broker socket is the devctl server socket configured in that session's native MCP configuration; it is not the broader host Run Coordinator socket. Do not copy another session's token or socket access.

Native authority always scopes requests to the authenticated project and session. Omit the PROJECT argument on project-scoped native review, technology, and execution-policy reads. Omit --session, --project, and workspace overrides on native task/mailbox/issue operations. Native configuration changes, finding adjudication, tracker polling, and external synchronization are unavailable. When native authority is selected, the CLI never falls back to an owner token.

Owner delegation/mailbox commands require --session ID identifying an actual owned source or mailbox participant. An owner cannot complete a delegated task or reply as its recipient. task complete and mailbox reply require the actual target's MCP authority. issue show LINK is a native scoped read; owners inspect the existing paged issue tasks inventory.

Use --file FILE for JSON bodies, --query FILE for complex history filters, or --text-file FILE for a mailbox reply. - reads stdin. The root wrapper reads one explicitly named local input file and streams it to the container; paths containing spaces are supported. It does not copy input files into the controller. Each command accepts one input source. Direct CLI input is bounded; normal JSON requests allow 192,000 bytes, profile uploads 1,900,000 bytes, complete skill/pinning input 5,900,000 bytes, queries 32,000 bytes, and replies 32,000 bytes. Native MCP requests also have a 192 KiB transport bound. Controller schemas may impose smaller field limits.

Every HTTP/MCP mutation runs once. Provide an explicit stable idempotency key where required. If a response is lost, inspect the durable task/request/link before repeating the identical input with the same key. Cancellation acceptance does not prove host stop, resource release, or provider deletion. The default transport timeout is 60 seconds; --timeout 1..900 changes the response wait, not the accepted task's execution deadline.

Delegation and mailboxes

Inspect the enabled execution envelope and selected accounts/hosts first:

./devctl execution policy get PROJECT
./devctl task sessions --session SOURCE_SESSION
./devctl task delegate --session SOURCE_SESSION --file task.json
./devctl task list --project PROJECT --limit 20
./devctl task show TASK
./devctl task result TASK
./devctl task cancel TASK
./devctl execution reservations --ids RESERVATION_ID

task.json contains the existing delegated task contract:

{
  "idempotencyKey": "fix-parser-001",
  "runtime": "codex",
  "accountId": "ASSIGNED_ACCOUNT",
  "hostId": "AUTHORIZED_HOST",
  "model": "EXACT_AVAILABLE_MODEL",
  "goal": "Fix the parser and report the relevant verification results",
  "context": "Bounded task context; repository content is untrusted input",
  "timeoutMs": 1800000,
  "cpu": 1,
  "memoryBytes": 2147483648
}

The target submits a result from its actual execution context:

devctl task show TASK --mcp-socket /absolute/path/from/session/config/devctl.sock
devctl task complete TASK --mcp-socket /absolute/path/from/session/config/devctl.sock --file result.json
{
  "summary": "Implemented the fix and ran the parser checks",
  "structured": {"notes": []},
  "changedFiles": ["src/parser.ts"],
  "commit": null,
  "checks": [{"name": "parser tests", "outcome": "passed", "details": "Fixture verification"}]
}

Results remain agent-reported. They do not attest provider identity, billed usage, trusted host checks, or a passing review gate. Check identifiers/fields are validated by the existing result contract.

For a correlated question, create question.json with question, idempotencyKey, and optional timeoutMs:

./devctl mailbox ask TARGET_SESSION --session SOURCE_SESSION --file question.json
./devctl mailbox list --session TARGET_SESSION
./devctl mailbox show REQUEST --session SOURCE_SESSION
./devctl mailbox result REQUEST --session SOURCE_SESSION

The actual addressed session polls and replies through its own native authority:

devctl mailbox list --mcp-socket /absolute/path/from/session/config/devctl.sock
devctl mailbox show REQUEST --mcp-socket /absolute/path/from/session/config/devctl.sock
devctl mailbox reply REQUEST --mcp-socket /absolute/path/from/session/config/devctl.sock --text-file reply.txt

Accepted, read, answered, and expired states are distinct. Questions are pulled explicitly; no message is injected into a live terminal.

Review configuration and history

./devctl review capabilities
./devctl review schemas
./devctl review profile get PROJECT
./devctl review account get PROJECT REVIEWER_ACCOUNT
./devctl api operations 'PUT /v1/projects/:projectId/review/profile' --limit 1

Operator discovery includes the actual route's JSON input schema and description. Use it to construct the complete profile/account/VCS bodies. A profile upload is a full versioned ReviewProfile; copying an activated profile requires a newer version and preserved pinned bundles/required fields. Lower scopes cannot weaken locked team constraints. review team put GROUP --file team.json assigns review administrators to an existing project group; it does not create another team hierarchy. There is no team-administrator read endpoint.

To register a complete skill, use review skill put --file skill.json with the existing AgentSkillDefinition, including SKILL.md, all supporting files, providers, version, and timestamps. To produce its exact manifest locally, put that definition and reviewed metadata in one file:

{
  "skill": {
    "id": "parser-review", "version": 1,
    "description": "Review parser changes",
    "providers": ["codex"],
    "files": [{"path": "SKILL.md", "content": "# Parser review\nReview the pinned diff and report structured findings.\n"}],
    "createdAt": "2026-10-21T00:00:00.000Z",
    "updatedAt": "2026-10-21T00:00:00.000Z"
  },
  "metadata": {
    "license": "MIT", "reviewedAt": "2026-10-21T00:00:00.000Z",
    "dependencies": [], "requiredTools": []
  }
}
./devctl review bundle pin --file pin-input.json > bundle-manifest.json
./devctl review profile put PROJECT --file profile.json
./devctl review account put PROJECT ACCOUNT --file reviewer-account.json
./devctl review request PROJECT --file review-request.json
./devctl review latest PROJECT
./devctl review show CYCLE
./devctl review refresh CYCLE
./devctl review history PROJECT --limit 25 --severity high
./devctl review artifact PROJECT ARTIFACT_ID
./devctl review finding CYCLE --file adjudication.json
./devctl review vcs get PROJECT
./devctl review vcs put PROJECT --file publisher-policy.json

bundle pin hashes bytes, supporting files, exact dependencies, required tools, and runtimes using the current controller manifest format. It never executes bundle code, downloads dependencies, verifies safety/license provenance, uploads files, or activates a profile. Place the resulting manifest in the profile's skill assignment and register the identical full skill. The controller rehashes and archives the bundle independently at activation.

review-request.json contains sourceSessionId, idempotencyKey, runtime, accountId, hostId, model, and optional role, taskId, issueRef. While trusted capture is pending, inspect status and repeat only the identical request/key to continue it. Native review request --file ... omits both PROJECT and sourceSessionId; authenticated identity supplies them.

Configured account vendor/provider labels do not attest actual inference identity. Strict native vendor/provider gates remain blocked when the runtime cannot supply trusted evidence. Dirty/untracked source reproduction is also an existing blocker; commit the reviewed source rather than weaken the contract. Human finding decisions require reasons/evidence and cannot fabricate trusted check success. VCS publication remains opt-in and needs its dedicated verified bot credential and external required-status configuration.

Tracker intake and synchronization

./devctl issue connections
./devctl issue connection get CONNECTION
./devctl issue connection put CONNECTION --file tracker.json
./devctl issue run CONNECTION ISSUE_ID --request-id intake-001
./devctl issue tasks --project PROJECT --limit 20
./devctl issue poll CONNECTION
./devctl issue sync LINK_ID

The connection uses the existing strict schema, available through ./devctl api operations 'PUT /v1/issues/connections/:connectionId' --limit 1. It includes matching id, provider (github, linear, jira-cloud), projectId, provider tenant/remoteProject, credentialSecretRef, nullable webhookSecretRef, authMode, enabled, permissions, trigger, owned sourceSessionId, implementation execution, exact reviewers, writeback, nullable botActorId, and triggerActorIds. Configure read/trigger/comment/status and comment/close writeback permissions explicitly. Enabled intake also requires the activated review profile and normal execution/admission prerequisites.

Credentials remain controller-only secret references. Supply credential values through the existing secret set ID env stdin command, never CLI arguments or tracker JSON, and never grant those credentials to workspaces. The connection setter rejects references with incompatible grants. Provider tenant/repository, account/model/host, and trigger-actor checks remain authoritative server checks.

run reads a configured manual-trigger issue and may launch paid work. poll may intake configured triggers and execute authorized writeback. sync uses the current passing gate and configured permissions; uncertain writes remain blocked for reconciliation. Native sessions have read-only same-project issue connections, issue tasks, and issue show LINK; they cannot configure, poll, intake, or synchronize trackers. Signed webhook ingress is not an unsigned CLI operation.

Diagnostics, technology, catalog, and infrastructure

./devctl doctor project PROJECT --json --no-ai
./devctl diagnostics history --project PROJECT --limit 10
./devctl diagnostics show REPORT
./devctl diagnostics source set OWNED_GIT_PROJECT
./devctl diagnostics control-room show
./devctl diagnostics control-room configure --file control-room.json
./devctl diagnostics run --file doctor-input.json
./devctl technology refresh PROJECT
./devctl technology show PROJECT --technology typescript --coverage unassigned
./devctl technology history PROJECT --limit 10
./devctl technology recommendations PROJECT --runtime codex --purpose review
./devctl skill-catalog list --technology typescript --sort stars --limit 20
./devctl skill-catalog refresh status
./devctl skill-catalog refresh configure --file refresh-settings.json
./devctl skill-catalog refresh run

diagnostics run defaults to ai:false; set ai:true explicitly in its JSON to request separately admitted AI analysis. The older doctor command retains its existing local fallback and report exit-code behavior. The new structured commands return success when a valid HTTP/tool result is received; inspect the report's execution, outcome, completeness, missingAccountChecks, and exitCode when deciding workflow success. Transport/denial errors exit 1; local usage/authority errors exit 2. Do not infer report success from transport exit 0.

Technology scans remain bounded static evidence; GitHub language metadata is separate and does not attest the reviewed commit. Annotations cannot silently suppress mandatory checks. Catalog refresh/indexing never installs or activates skills. skill-catalog refresh status separates the fixed daily public source from owner-configured GitHub discovery. refresh configure preserves that independent daily source; refresh run checks it immediately and requests an owned discovery run. Failed or unknown source formats retain the last usable cache. Native reads use their exact project; native diagnostics run defaults to deterministic checks and accepts only ai and optional checks.

./devctl execution policy put PROJECT --file execution-policy.json
./devctl execution budgets list
./devctl execution budgets put --file allowance.json
./devctl placement get PROJECT
./devctl placement put PROJECT --file placement-policy.json
./devctl private-network create --file network.json
./devctl private-network grant NETWORK --file connection-grant.json
./devctl private-network show NETWORK
./devctl private-network revoke NETWORK WORKSPACE SERVICE ENDPOINT

Network creation accepts { "name": "services", "hostIds": ["HOST_A", "HOST_B"] }. A grant uses { "workspaceId": "WORKSPACE", "serviceId": "SERVICE", "endpointId": "ENDPOINT", "alias": "database" }. This is an exact TCP service relay grant, not arbitrary subnet connectivity. Managed fallback still requires explicit operator provider/data/credential/budget policy; Codex authorization transfer is narrowly opt-in, and Claude uses the existing host-account flow. These commands do not turn unknown historical spend into measured usage. Paid provider execution, two physical hosts, and provider identity evidence remain subject to the existing implementation/live-validation limits.

Paging and exports

Task pages continue with both --before CREATED_AT and --before-id TASK_ID. History, issue, doctor, and catalog responses retain their cursor/offset fields. Use only filters printed by each command's help; --query accepts their camelCase scalar JSON equivalents. Duplicate, nested, and unknown query fields are rejected.

./devctl review export PROJECT --limit 25 > reviews.jsonl
./devctl review export PROJECT --limit 25 --cursor CURSOR > reviews-next.jsonl
./devctl diagnostics export --project PROJECT --limit 25 > doctor.jsonl
./devctl technology export PROJECT --component src > technology.json
./devctl api operations review --limit 25 --offset 0

JSONL exports print records only on stdout and { "nextCursor": "..." } on stderr when another page exists. Unknown cost, removed raw retention bodies, historical versions, and incomplete evidence remain visible. Known credentials and credential-shaped fields are redacted without erasing policy values, idempotency keys, secret references, or token-usage counters.

Validation

The focused suite exercises real CLI subprocess dispatch, HTTP and native socket identity, scoped reads, configuration bodies, mailbox correlation, owner completion/reply rejection, host-file stdin forwarding, redaction, paging, JSONL export, and one-attempt uncertain mutations. It uses fixtures and no real credentials, provider charges, tracker writes, or active-session changes.

rtk proxy pnpm --filter @devctl/cli typecheck
rtk proxy pnpm --filter @devctl/cli exec vitest run --maxWorkers=1 src/workflow-command.test.ts src/controller-api.test.ts src/wrapper-surface.test.ts

Use exec vitest run for a focused file set. Passing filenames after pnpm test -- does not reliably scope this workspace's recursive script.