Practitioner playbook

How to write definitions of done, set budgets, and read the ledger schema every metric is computed from.

The validation program put the claims on the record. This page is the craft: the three things a team actually authors to run quirq accounting.

Writing definitions of done

The definition of done is where delegation succeeds or fails. Three check types:

Mechanical
Decidable predicates over captured state: tests green, ticket closed, artifact parses. Cheap, repeatable, preferred.
Statistical
Mechanical checks over samples: of 100 records, a random 10 meet spec. For volume work.
Judgment
A signed verdict by the owner, recorded in the ledger. Exactly one, terminal, for irreducibly judgment-shaped outcomes.

One trap: a model judging the work is not a judgment check. It is a mechanical check with a soft predicate that agents optimize against at machine speed. Keep model judges in the statistical tier, audited by sampled human judgment.

Rules of thumb: state the end state, not the activity ("tests pass", not "wrote tests"). Weight by value, not difficulty. Always include an anti-gaming check (the verification surface byte-identical across the unit; experiment E2 is the argument). Make checks re-runnable by the environment, never trusted from the agent. Declare the settlement regime (atomic or divisible) at creation. For divisible units with a terminal judgment check, hold back that check's budget share until the verdict lands.

A worked definition, for "resolve this support ticket":

checks = [
  ("status = closed",        w = 0.5,  mechanical),
  ("reply sent to customer", w = 0.3,  mechanical),
  ("KB article linked",      w = 0.2,  mechanical),
  ("ticket thread untouched after close", w = 1.0, anti-gaming),
]
regime = atomic (τ = 1)

Iterating is normal operation: the intervention rate decomposed by check is your backlog. The check that fails most is either badly specified (rewrite it) or genuinely hard (harden the environment, or route it to a human).

Setting budgets

The budget is the human judgment in the loop: what is this outcome worth, committed before execution. Anchors, in order of preference:

  1. Real money. If the outcome is sold or charged back, the budget is the price, and inflation is self-taxing.
  2. Human baseline. What the outcome costs done by a person, at loaded rates (a tier-1 ticket at 20 minutes of support time; a first-pass contract review at 1.5 paralegal hours).
  3. Market comparable. What contractors or vendors charge for the same scope.
  4. Stated willingness to pay. For net-new work with no baseline; mark these in the ledger, and sample them first in value audits.

Calibrate over time: track the budget-to-audit ratio by unit type (drift is the inflation signal, hypothesis H4), re-price when cost per quirq stabilizes far below budget or interventions cluster, and never let the worker price the work: an agent proposing its own budget is self-report at the valuation layer. The budget is what the outcome is worth, not what it is expected to cost; the gap between them is the margin, and it is supposed to exist.

The ledger schema

Everything in quirq accounting is computed from one append-only, hash-chained ledger written by the environment. Five event types per unit:

{ "event": "define",
  "data": { "uid": "u-2214", "intent": "resolve ticket #8841",
            "budget": 4.00, "regime": "atomic",
            "checks": ["status_closed:0.5", "reply_sent:0.3",
                       "kb_linked:0.2", "thread_untouched:1.0"],
            "s0": "sha256:…" } }

{ "event": "execute",
  "data": { "tokens": [{ "model": "primary", "n": 38000, "price_per_m": 2.0 }],
            "cpu_s": 90, "api_calls": [{ "service": "crm", "n": 2 }] } }

{ "event": "verify",
  "data": { "s1": "sha256:…", "per_check": { "status_closed": true, "...": true },
            "V": 1.0, "done": true } }

{ "event": "settle",
  "data": { "minted_q": 4.00, "c_total": 0.128, "margin": 3.872 } }

{ "event": "intervene",
  "data": { "human_minutes": 12, "failed_checks": ["kb_linked"] } }

Field rules: snapshots (s0, s1) are content hashes captured by the environment, never supplied by the agent; token prices are frozen at execution time; minted_q is computed at settle, never written directly; intervene events carry the human cost that flows into C_total and the failed-check list that powers the per-check intervention decomposition. Each entry commits to its content and to the previous entry's hash, so history is tamper-evident by recomputation. A reference implementation (snapshots, checks, mint, settlement, ledger, and the experiment harness) accompanies the validation program.

One more thing before you trust the ledger under pressure: gaming, the attack surface and its mitigations.