{
  "schema": "csoai.revenue/0.1",
  "contract": {
    "derivation": "Counts read from counters.json (the counter canon) and, where bound, the REVENUE_KV tallies. Nothing is fetched over HTTP and no count is typed by hand.",
    "null_rule": "A count is null, never 0, when there is no source. There is no live settle path yet (x402 fail-closed, manifest mode:mock), so every count is honestly null until a receipt settles.",
    "north_of_truth": "settled_usdc is the honest revenue number: USDC that cleared to the estate pay_to on Base, single-use. Chain adjudicates, not the CRM.",
    "no_prices": "This surface never publishes a price. Metered amounts appear only in an x402 402 challenge (the accepts array), never here and never on the free board.",
    "not_a_grade": "Revenue is earned on issuance, assembly, and a durable signature — never a grade."
  },
  "skus": {
    "issuance": {
      "sku": "SKU-1",
      "id": "revenue_issuances",
      "count": null,
      "status": "UNMEASURED",
      "source": "counters.json",
      "owner": "Revenue",
      "note": "SKU-1. No live settle path (x402 is fail-closed, mode:mock). value is null, never 0 — 0 would assert a measured count. Instrumented by functions/api/revenue.ts; source of truth is settled receipts on-chain, not intent."
    },
    "proofs": {
      "sku": "SKU-2",
      "id": "revenue_proofs",
      "count": null,
      "status": "UNMEASURED",
      "source": "counters.json",
      "owner": "Revenue",
      "note": "SKU-2. Split new vs quarterly-recompute. Null until a bundle is actually delivered and settled; never inferred from a quote."
    },
    "licences": {
      "sku": "SKU-3",
      "id": "revenue_licences",
      "count": null,
      "status": "UNMEASURED",
      "source": "counters.json",
      "owner": "Revenue",
      "note": "SKU-3. Meter on issuances/bundles, never seats. Null until a rail is licensed."
    }
  },
  "settled_usdc": {
    "id": "revenue_settled_usdc",
    "count": null,
    "status": "UNMEASURED",
    "source": "counters.json",
    "owner": "Revenue",
    "note": "The north-of-truth revenue number: bytes/chain adjudicate, not the CRM. Null until X402_PAY_TO + a facilitator are provisioned and a receipt settles. Fail-closed by design.",
    "unit": "USDC atomic (6dp) on Base"
  },
  "provisioning": {
    "kv_bound": false,
    "gated": false,
    "owner_switches": [
      "bind REVENUE_KV (replay + tally store)",
      "set X402_PAY_TO + choose facilitator (turns the rail live; see functions/api/_x402.ts)"
    ]
  },
  "note": "Aggregate-only. NO telemetry, NO per-user data, NO fabricated counts. Measurement, never certification."
}