← All evidence
P-008 · Cost Attribution

Cost is a field on every task. Not a line on an invoice.

Reproducible

Every model call is tagged with WO · phase · role · model · action and rolled up in PostgreSQL at write time. Sub-penny precision per call. Fail-closed at the boundary when a contract's budget is exhausted.

Source of truth

Cost-attribution layer in AgentOS. Each call writes a row to the cost ledger with the full attribution tuple; aggregation is at write-time, not month-end batch.

Mechanism

Cost = tokens × rate, computed per call. Budget is a required field on every execution contract. When consumed budget reaches the contract limit, the task halts at the boundary — it does not silently borrow from the next task or phase.

Evidence
COST IS A FIELD ON EVERY TASK · NOT A LINE ON AN INVOICE

  Per work order        ✓ rolled up at write time
  Per phase             ✓ planning · arch · dev · QA · governance
  Per role              ✓ architect · dev · witness · reviewer · gatekeeper
  Per model             ✓ frontier-share is a KPI, not a year-end finding
  Per action            ✓ sub-penny precision

  Budget:               required field on every contract
  When exhausted:       fail-closed at the boundary
  Reconciliation:       none — spend rolls up on write
Reproduction
Source artifact
cost ledger table in PostgreSQL (one row per model call)
Command
SELECT wo_id, phase, role, model_id, SUM(cost) FROM cost_ledger GROUP BY 1,2,3,4;
Expected output
aggregated spend broken down per WO · phase · role · model; sum across all rows for a WO equals the WO's reported cost
Verification
cross-check: budget on the execution contract vs budget consumed in the ledger should match within the rate-sheet precision; an over-budget task should show a fail-closed event in the audit log
Caveats
Cost figures are per-deployment and surface inside each design partner's own AgentOS console — not on this site. What's public is the mechanism: per-task attribution at sub-penny precision, real-time roll-up to WO · phase · role · model, fail-closed at the contract boundary.