DocsSupervision (zirv ctx)
Verbs
| Command | What it does |
|---|---|
zirv ctx score --transcript <path> | Rot-scores a transcript and prints JSON |
zirv ctx loop --prompt <text> | Runs a fresh headless session per cycle, so the orchestrator cannot rot |
zirv ctx exec -- <agent command> | Supervises one headless run: kill, distill, restart |
zirv ctx wrap -- claude | Supervises an interactive TUI through a PTY |
zirv ctx handoff --transcript <path> | Distills a handoff and stores it |
zirv ctx resume | Starts a clean session with the latest handoff injected |
zirv ctx hook <stop|prompt|pre-compact|pretool|notify|session-start|install> | Agent hook entrypoints; install <agent> wires zirv's own guard/compaction hooks into a non-claude agent's native hooks file (copilot, droid, gemini) |
zirv ctx status [--json] [--agents] | Shows supervised sessions, the resolved chat agent, unread mail, recent decisions, handoffs, and (issue #358) a cross-harness capacity/pool section; --json emits the pool view plus the orchestrator seat as structured JSON; --agents (issue #490) emits the native dashboard's own agent/task overview, usage-and-health provenance strip and a limitations list, built from the identical reducers the TUI renders through, plus (issue #723) a delegation_conditions map of delegation id to its typed condition list, alongside (never replacing) each agent's coarse phase |
zirv ctx models [refresh] [--json] | Lists account-discovered models, ladder placement, availability, effective price provenance, retirements and the per-model scorecard (avoid-list warnings included); refresh reads local Codex/Claude evidence and conditionally fetches public price catalogues |
zirv ctx mcp serve [--stdio] [--repo <path>] [--session <id>] | Serves seven read-only MCP tools for one repository/worktree; optionally binds inbox reads to a registered session. See MCP bridge |
zirv ctx mcp doctor [--repo <path>] [--session <id>] [--timeout-seconds <1..60>] | Launches this executable as a stdio server, checks tool discovery and a snapshot call, and prints JSON; default deadline 10 seconds |
zirv ctx usage | Shows usage-window state, or usage tee to collect it from the statusline |
zirv ctx optimize | Reports redundancy, contradictions and dead references in the files that steer your sessions |
zirv ctx provider init|list|check|credential set | Coming soon; native provider setup is unavailable in this release |
zirv ctx chat [--pin-harness] [--proxy|--no-proxy] | Starts an interactive orchestrator session on the resolved adapter (also zirv chat, or bare zirv; see Just Run zirv). --pin-harness (same as ZIRV_CTX_SEAT_PIN=1) opts this session's orchestrator seat out of automatic rollover (issue #358) — a manual zirv ctx handover still works on a pinned seat. --proxy/--no-proxy overrides cfg.proxy.enabled for this launch — see Harness proxy; skipped with --resume or --simple. --runtime native reports coming soon and refuses to start — see The native conversation pane |
zirv ctx agent <name> <prompt> [--name <label>] [--manifest <path>] [--worktree] [--worktree-reuse] [--workspace <name>] [--goal <text>] | Delegates one task to a supervised worker on another enabled harness — a dashboard pane when one is live, otherwise inline in this terminal; workflow reviewers run inline because their caller must consume completed review evidence synchronously. A selected declarative workspace is fully prepared before either path launches; --runtime native reports coming soon and refuses to start (also zirv agent). --manifest resolves a YAML file's brief/agent/task/group/workdir/mode/budget_tokens/max_tool_calls/path_scope/no_network/result into the same launch instead of typing each one; agent contributes default skills and read-only/capability floors. Untrusted manifest input can only narrow: a field it shares with an explicit CLI flag is a hard error on disagreement, except narrowing-capable fields, where the stricter value wins. --worktree --worktree-reuse (issue #718, opt-in, default off) tries the warm pool first: an Idle tree from a prior reuse allocation whose base commit and ordered [[workspace]].setup list digest the same is reset to that base and reused with its untracked build cache intact. A digest mismatch or proof refusal falls back to a cold worktree; matched setup receipts retain the same checkout identity and resume only unchanged successful steps. On release, eligible trees remain Idle up to [worktree] idle_pool_max; [worktree] idle_ttl_secs expires them through proof-required GC/reconcile. --goal forces an inline launch and first runs one bounded, depth-zero environment-preparation bootstrap in the selected checkout; it must exit zero and report explicit Done JSON before the main worker may start. The bootstrap uses the operator's configured Fast tier when present, otherwise leaves model selection to the harness. A read-only worker (--mode read-only, a read-only manifest, a workflow reviewer or a read-only dashboard spawn) fails closed: when the chosen harness has no enforced read-only floor for its launch mode, the launch is refused up front naming the harnesses that can enforce it, and automatic harness rerouting skips harnesses without a floor. |
zirv ctx proxy [--json] [--headless] [--execution MODE] [--tier TIER] [--validation GATES] [REQUEST] / zirv ctx proxy stats [--json] | Runs the harness-proxy intake decision and prints it without launching anything (the override flags preview zirv ctx chat's); stats reports per-task-class token cost and verified-pass rate; reads REQUEST from stdin when omitted and stdin is not a tty; --json prints the full decision — see Harness proxy |
zirv ctx send [--to-session <prefix>] / zirv ctx inbox | Leaves or reads short notes between agent sessions on this machine, scoped to the repo, optionally addressed to one live session |
zirv ctx nudge <prefix> --message <text> | Wakes a live supervised session early with a message, instead of waiting for it to poll |
zirv ctx remember --key <k> --text <t> / zirv ctx recall / zirv ctx forget <k> | Reads and writes this repo's cross-session memory bank |
zirv ctx handover [--agent <name>] [--model <tier|id>] [--dry-run] [--force] | Swaps the orchestrator seat's harness or model in place mid-session, carrying a handoff packet across the swap — see Cross-harness fallback and handover below |
zirv ctx permissions audit|compile|propose | Audits, compiles, or (operator opt-in) proposes command-permission approvals from recent transcripts — see Permission auditing below |
zirv ctx api schema [--json] / zirv ctx api serve / zirv ctx api call <method> | Prints the local runtime protocol v1 contract, binds its endpoint, or calls one method over it — see Runtime protocol v1 below |
zirv ctx capabilities [--probe] [--require <id>] [--json] | Reports every configured integration (MCP, web search/fetch, browser, diagnostics, artifact and frontend rendering) as available, unavailable or unverified, with the diagnosis for anything missing — see Native configured capabilities below |
zirv ctx jev status [--json] | Reports whether Jev is enabled: the advisory gates, the credential env var name and presence (never the value), the endpoint and model, why it is or is not active, and a 7-day per-site usage rollup (calls, cache-hit rate, p50/p95 wall_ms, errors, effect size) folded from jev-decisions.jsonl/jev-effects.jsonl/jev-skips.jsonl — distinguishes "no gate enabled" from "gate enabled but credential missing" — see [jev] below |
zirv ctx jev probe --site <SITE> --case <case.json> --reps <K> [--repo <dir>] | Measurement only: asks one Jev site's real production question(s) for a fixture input K times (1..=20) with the cache disabled, applies that site's production floor and answer-to-action rule, and prints what production would have DONE on each rep — spends real Jev calls and writes the normal decision/spend log rows, never any other side effect — see Measuring floor determinism below |
zirv ctx doctor [--role <role>] [--live] [--json] | Diagnoses native readiness: the resolved backend and route per role, and every problem classified as missing auth material, inaccessible model, missing tool, unsupported isolation, service failure or upstream entitlement limit — see Native setup, diagnosis and rollback below |
zirv ctx config get <key> [--json] / show [key] [--json] | Prints one key's effective value, built-in default, winning source and reload timing exactly as /settings get does, or the stored ~/.zirv/ctx.toml (optionally one key) as TOML or JSON |
zirv ctx config migrate [--to harness|native] [--downgrade] [--dry-run] | Versions ~/.zirv/ctx.toml with a backup and a documented way back; idempotent in both directions — see Native setup, diagnosis and rollback below |
zirv ctx reconcile [--dry-run] [--json] | One level-triggered pass over every opportunistic sweep (stuck task claims, dead-owner permits/reservations, worktree GC) plus the one resource with no automatic reclaim at all, an abandoned machine-wide work group (issue #720 -- <state>/groups carries no repo dimension, unlike task/worktree state); a group closes on coordinator liveness alone, since no on-disk record attributes a live session to its work group, so a still-running child of a dead coordinator can no longer admit nested children once its group is closed; --dry-run mutates nothing (it never reaches the sweeping sessions::list, even for the group check); --json prints one object per resource kind. A resource failing does not abort the others -- every id already healed is still reported alongside the error; exits non-zero if any did |
Declarative worker workspaces#
The harness runtime can prepare a repeatable worker environment before the
worker receives its first turn. Repository-owned .zirv/ctx.toml may declare
only inert requirements:
[[workspace]]
name = "backend"
mcp_servers = ["linear"]
skills = [{ id = "systematic-debugging" }]Clone URLs and shell commands are executable on the operator's machine, so
they are accepted only from ~/.zirv/ctx.toml:
[[workspace]]
name = "backend-with-dependencies"
git = [
{ repo = "https://github.com/example/api-contracts.git", branch = "main", dir = "deps/api-contracts" },
]
setup = ["cargo fetch", "cargo build --workspace"]zirv ctx agent claude "implement the API change" --worktree --workspace backend-with-dependenciesWith --worktree, extra repositories and setup commands run inside the fresh
linked worktree. Without it, the explicit --workdir or current checkout is
the workspace root. Repositories are cloned in declaration order and setup
commands run sequentially after every clone is ready. Each successful setup
step is recorded append-only by checkout, index and command digest, so retrying
a failed setup skips only unchanged successes; a changed command reruns. A
failed clone or setup command aborts the delegation; the worker never starts. Clones time out after
five minutes and each setup step after ten minutes. Both run with credentials,
all ZIRV_* authority/session variables, and inherited git-control variables
removed from their environment. Existing clone directories are accepted only
when their origin and current branch match the declaration, and symlinks in
any destination component are refused. Because materialization happens before
the worker harness, executable workspaces require an unexpired writing, shell,
network, and root-path delegation envelope; Zirv refuses them when it cannot
enforce a narrower grant.
mcp_servers contains names only—never commands, endpoints, or secrets. Zirv
checks the final routed harness's own MCP configuration (including Claude
--mcp-config/.mcp.json and Codex mcp_servers configuration) and refuses
the delegation if any name is absent. Claude project MCP files and disable
settings follow the headless launch's normal precedence; Codex project config
is counted only below a path the operator's user config marks trusted. A
workspace with MCP requirements runs inline on the validated harness with
cross-harness fallback disabled for that launch. skills are resolved through the normal
SkillRegistry, including version pins and dependencies, and are attached as
labelled instructions that grant no authority. A delegation manifest may name
an AgentManifest with agent: <id>; its skills are defaults only, and an
explicit workspace skills list replaces them. This does not apply the
manifest's model, role, or runtime settings; its read-only and required
capability constraints still gate the launch.
Workspace arrays from the operator and repository layers are additive. Names
must be unique, unknown fields are rejected, git destinations must be relative
children outside .zirv, and the repository layer cannot replace an
operator-defined workspace. Repository entries containing git or setup
are rejected as security errors; selecting a workspace name is deliberately
not treated as authorization because an autonomous seat can select one too.