Owner's Manual — Refactored Edition
cab4a7a, published 2026-09-16.
For current behavior, see the repository README.
single_user mode, "verified" is advisory — only uid_isolated means independent identity../operator --help for current list.A local-first control plane for AI coding work. Its center of gravity is a repository-local ledger that records claims, evidence, verification, and the doctor audit trail. It is a trust record for work, not a generic workspace or hosted service.
The roles are distinct:
| Role | What they do |
|---|---|
| Builder | Creates claims and drafts evidence |
| Verifier | Establishes trusted sign-off from a distinct OS identity |
| Administrator | Handles enrolled authority boundary and host prerequisites |
| Harness | Runs delegated or study work — not a trust authority |
| Owner | The person reading this manual and deciding what the product should promise |
pip install -r requirements.txt # runtime: just PyYAML
pip install -r requirements-dev.txt # tests/lint: pytest, ruff, black, isort
./operator --help
mkdir /tmp/operator-demo && cd /tmp/operator-demo
/path/to/operator init # creates .operator/ ledger in current dir
/path/to/operator doctor # consistency check → "All records consistent."
python3 -m pytest tests/test_operator.py -q # repo CLI, ledger layout, identity, doctor, usage
python3 -m pytest tests/ -q # everything (some suites need Linux)
The ledger (.operator/) is gitignored — it's your work history, not the tool. Its durable local event history is stored in .operator/ledger.sqlite3.
Operator enforces a strict partition: an agent's claim ("I did X") is only trustworthy if it has evidence attached and is verified by a distinct identity. The system records: task → claim → evidence → verification → session → usage.
Work is not trusted until it passes from builder output into verifier judgment. Doctor keeps checking the result afterward — it is a continuing audit, not the step that creates trust.
Work → Builder → Draft claim + Evidence → Verifier → Trusted record → Doctor (ongoing)
The same problem (e.g., missing evidence) is warning-level on a draft but a blocking failure on a verified record. A warning on draft material is not proof that the trust boundary has failed.
The everyday loop is the local path. By default, the product stays local:
test_passes, file_exists, numeric_measurement).# Open a task
./operator task-create --objective "Add retry to the uploader" --id up-retry
# Builder registers a claim
./operator claim-add --task up-retry --type test_passes \
--text "uploader retries 3x on 5xx" --gate tests/test_upload.py
# Evidence + advisory verification
./operator evidence-attach tests/out/upload.log --task up-retry --claim claim-0001 \
--type test_output --status verified --verified-by reviewer \
--verify-cmd "pytest -q tests/test_upload.py"
# Doctor reads the record
./operator doctor
# Track session cost, generate handoff
./operator session-start --task up-retry --harness claude
./operator session-end usage-0001 --outcome useful --cost 12.50
./operator handoff-add --task up-retry --changed "uploader.py" --verified "retry test" --open "tune backoff"
./operator export-brief --for codex --task up-retry
A runnable version of this lives at examples/verified-work/run.sh and is executed on every CI run.
false. Draft output can warn about the same problems that would block a verified record, but only verified records are enforced.The ledger is the product's memory: it decides what work exists, which evidence supports it, and what can be trusted later.
| Surface | Durable? | Can be rebuilt? | Backup this? |
|---|---|---|---|
ledger.sqlite3 — append-only event history | ✅ Yes | No — it's the source | Yes, critical |
| YAML projections | ✅ Yes (read-only) | Yes — from SQLite | Optional |
| Compatibility read surface | ✅ Yes | Yes — from SQLite | No |
| Read-only snapshots | ✅ Yes | Yes | No |
When the authority store or projection layer has been replaced, the system does not silently adopt the new incarnation. It requires explicit reset acknowledgment:
Doctor reports divergence but does not silently repair either side. A changed verified source or retained snapshot fails closed; an unavailable original source is reported separately when its retained snapshot is still current. Remote evidence without a local snapshot is explicitly uncheckable.
Enrolled authority is an optional privileged layer above the repo-local ledger. It matters when you need a separate host-managed trust boundary, not just local claim and evidence tracking.
| Local ledger (default) | Enrolled authority | |
|---|---|---|
| Trust boundary | Repository-local, per-repo | Host-managed, broker-enforced |
| Setup | ./operator init | Root-only, host preflight required |
| Role separation | Advisory (single_user) or enforced (distinct UIDs) | Broker-gated, OS-identity-bound |
| Recovery | Local restore | Explicit reconciliation step |
| Cost | Low — works immediately | Host prerequisites, operational surface |
Recovery follows the boundary that failed. Don't treat every stop the same way.
| When this happens | Use | What it does |
|---|---|---|
| Host or enrollment boundary failed | re-stage | Trust the machine again — check privileges, socket, policy, registry |
| Saved state changed underneath the product | reconcile | Explicitly adopt changed state with reset acknowledgment |
| Checkpointed run can continue on same validated plan | resume | Continue from stored run ID inside the cataloged plan |
Harness and study work freeze a concrete execution shape. They make a run more specific by binding it to named harness profiles and explicit phases. But this structure is support infrastructure, not a replacement for the ledger's claim-evidence-verification story.
| Execution path | Entry control | Replay rule | Scope |
|---|---|---|---|
| Main study run | Catalog validation, phase order, harness profile count, mutating vs. read-only shape | Completed phases replay idempotently; quota exhaustion pauses | Study execution with explicit phase states |
| Checkpointed dogfood | Saved phase checkpoints + approval and quota gates | Replay only when saved plan fingerprint matches; failed work needs quota-reset acknowledgment | Dogfood replay with retained checkpoints |
| Local A/B race | Only two local OpenCode arms | Local comparison only | Narrow comparison between two local arms |
| Confirmed here | Not proven here | |
|---|---|---|
| Harness support | 12 cataloged profiles seeded at operator init | Every named external provider binary works everywhere |
| Dogfood replay | Checkpointed, fingerprint-validated | Every interrupted host interaction can safely continue |
| Local A/B | Two local arms on one machine | General benchmark or provider matrix |
The operator CLI exposes ~23 subcommands across the task → claim → evidence → verification → session → usage lifecycle. Run ./operator <command> --help for full flags.
| Command | Purpose |
|---|---|
operator init | Create the .operator/ ledger in the current repo. Re-running on an existing YAML-only ledger baselines those records into SQLite. |
| Command | Purpose |
|---|---|
task-create --objective "..." [--id ID] [--repo R] [--assign A] [--review R] | Open a task |
task-show [ID] | Show a task's claims, evidence, and status |
task-route --task ID --review H / --clear-review | Append auditable correction to reviewer routing |
task-list | List all tasks with outcome summaries |
decide --claim ID --decision approve|reject|defer --rationale "..." | Operator ruling on a frozen proposal claim. Records UID; does not require a distinct verifier UID. |
| Command | Purpose |
|---|---|
claim-add --type TYPE --text "..." [--task ID] [--gate GATE] [--verify-cmd CMD] [--by WHO] | Register a claim. --gate is an artifact path; --verify-cmd is the command a verifier reruns. |
claim-show [ID] / claim-list [--task ID] | Inspect claims |
Claim types: file_exists, test_passes, numeric_measurement, real_data, model_output, firmware_behavior, deployment_state, supervision_credit, paper_or_report_claim
| Command | Purpose |
|---|---|
evidence-attach PATH --claim CID --type TYPE [--hash SHA256] [--status {verified,false,quarantined}] [--verified-by WHO] [--verify-cmd CMD] | Attach an artifact and optionally verify the claim. Local files copied into ledger, fingerprinted with SHA-256. |
verify RUN_DIR | Automated audit of a run directory's artifacts |
doctor [--audit] | Read-only consistency check. Flags unverified claims, self-verification, advisory verification, malformed UID-isolated metadata. Never executes anything. |
Evidence types: run_log, manifest, database_query, test_output, git_commit, screenshot, transcript, paper_section, external_doc, session_crystal
| Command | Purpose |
|---|---|
session-start --harness H [--task ID] [--force] | Open a coding session |
session-end usage-XXXX --outcome {useful,partial,no_go,quarantined,reverted,unknown} --cost N | Close session with outcome and cost |
session-list [--open] [--task ID] [--harness H] | List sessions |
| Command | Purpose |
|---|---|
usage-add --harness H [--model M] [--outcome ...] | Capture a pasted usage snippet |
usage-import --harness {claude,codex,gemini-agy,prime-agent} [--since ...] [--dry-run] | Auto-ingest token/usage from harness session-log adapters |
usage-summary [--by-task] [--by-harness] [--by-model] [--by-lane] [--offload-audit] [--metering] | Aggregated usage view |
usage-summary --by-lane). Transcript chores (summaries, rehydration) are "cheap-lane" work; don't run them in expensive seats.| Command | Purpose |
|---|---|
brief --for H [--task ID] / export-brief --for H [--task ID] | Generate a harness-specific brief (copy-paste for the next agent) |
handoff-add [--task ID] [--changed ...] [--verified ...] [--claimed ...] [--open ...] | Record a closeout |
./delegate-brief --task ID --brief FILE --harness {claude,codex,grok,gemini-agy,fable,openrouter} [options]
# Preserves brief under --deliver/.brief.md, optional --freeze path hashes, full log + exit code
# --record writes an Operator handoff (dispatch outcome only, not acceptance)
Operator is driven by files under .operator/ (created by init):
.operator/identity.yaml — Identity-enforcement policymode: enforced # or: single_user (advisory)
uids:
1001:
name: builder
roles: [builder]
1002:
name: reviewer
roles: [verifier]
In enforced mode, a verification only counts when the verifier's OS UID differs from the claim author's. A different harness name buys nothing. Two agents under one Unix user are one identity.
In single_user mode, status writes remain available and are recorded as advisory, never uid_isolated. A "verified" status is advisory — the builder's own assertion, not an independent check.
.operator/ledger.sqlite3Append-only, full-snapshot event versions for task, claim, evidence, handoff, and usage/session records. Event versions allocated transactionally, linked by per-record SHA-256 hashes, protected from UPDATE/DELETE through database triggers. Doctor reports divergence but does not silently repair.
Because both SQLite and YAML live on the same writable disk, this improves local durability and auditability — it is not an off-machine backup or an adversarial tamper-proof boundary.
.operator/{tasks,claims,evidence,handoffs,usage}/Current YAML projections (gitignored). These are compatibility read surfaces, not backup.
The operator-admin tool installs the standalone broker under fixed root-controlled paths. It supports strict generation-one install, append-only rotation, terminal revocation, audit, and conservative privilege preflight. This is not repo CLI integration — operator and existing .operator ledgers do not consult the external authority yet.
mode: enforced, a verification only counts when the verifier's OS UID differs from the claim author's. A different harness name buys nothing. Two agents under one Unix user are one identity.assigned_harness and review_harness describe where work goes. Neither confers the right to bless a claim.required_gate is an artifact path it checks for existence; the rerunnable command lives in verify_cmd and is run by a verifier, never by doctor.