{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://stratalens.co/ledger-schema.json",
  "title": "StrataLens quotes.json verification ledger",
  "description": "The machine-readable verification ledger that ships with every Coverage Audit report. One row per grounded analysis layer: how many quotes were checked and verified against the source, plus the exact text of any quote that FAILED verification. Verified quote text lives in the report itself; failures are what the ledger prints. Invariant: quotes_checked - quotes_verified == unverified.length for every row.",
  "type": "array",
  "items": {
    "type": "object",
    "required": ["layer", "article_url", "quotes_checked", "quotes_verified", "unverified"],
    "properties": {
      "layer": {
        "type": "string",
        "description": "\"base\" (per-article PRISM pass), \"deep:<SECTION>\" (one per deep-analysis layer), \"trends\", or \"recommendations\"."
      },
      "article_url": {
        "type": ["string", "null"],
        "description": "Source article for per-article layers; null for the cross-article trends/recommendations layers."
      },
      "quotes_checked": { "type": "integer", "minimum": 0 },
      "quotes_verified": { "type": "integer", "minimum": 0 },
      "unverified": {
        "type": "array",
        "items": { "type": "string" },
        "description": "Exact text of each quote that failed verbatim verification against its source — these are what the Checkable-Claim Guarantee pays on."
      }
    }
  }
}
