{
  "openapi": "3.1.0",
  "info": {
    "title": "Bound by Fear corpus API",
    "version": "1",
    "description": "Read-only, build-time-generated static JSON API over the Bound by Fear corpus. There is no server at runtime — every path below resolves to a static file published alongside the site (Cloudflare Pages, direct upload). Regenerated by scripts/build-api.mjs on every `npm run build` from the same src/lib/data/cases.js that powers the on-site case pages. Component schemas are derived from, and kept consistent with, schema/boundbyfear.schema.json.",
    "license": {
      "name": "See /data/COVERAGE.md for dataset terms and coverage limits."
    }
  },
  "servers": [
    {
      "url": "/api/v1",
      "description": "Static JSON, same-origin."
    }
  ],
  "paths": {
    "/index.json": {
      "get": {
        "summary": "API discovery document",
        "operationId": "getIndex",
        "responses": {
          "200": {
            "description": "List of available endpoints.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IndexDocument"
                }
              }
            }
          }
        }
      }
    },
    "/cases.json": {
      "get": {
        "summary": "Light index of all case records",
        "description": "One entry per record in cases[]. Excludes sources/proceedings/scopeNote/spiritualNexus/appellateHistory to keep payload small; fetch /cases/{slug}.json for full detail.",
        "operationId": "listCases",
        "responses": {
          "200": {
            "description": "Array of light case entries.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CaseIndexEntry"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/cases/{slug}.json": {
      "get": {
        "summary": "Full detail for a single case record",
        "operationId": "getCase",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            },
            "description": "Case slug, e.g. '1959-haiti'."
          }
        ],
        "responses": {
          "200": {
            "description": "Full case record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaseRecord"
                }
              }
            }
          },
          "404": {
            "description": "No static file exists for this slug (Cloudflare Pages default 404; not a JSON error body).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/stats.json": {
      "get": {
        "summary": "Computed corpus aggregates for on-page charts",
        "operationId": "getStats",
        "responses": {
          "200": {
            "description": "Aggregate counts and percentages.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Stats"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "IndexDocument": {
        "type": "object",
        "properties": {
          "generatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "endpoints": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "path": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "CaseIndexEntry": {
        "type": "object",
        "description": "One entry in the light index served at /cases. Excludes sources/proceedings/scopeNote/spiritualNexus/appellateHistory — fetch /cases/{slug} for full detail.",
        "required": [
          "slug",
          "year",
          "title",
          "place",
          "lat",
          "lng",
          "tradition",
          "traditionDetailId",
          "type",
          "recordClass",
          "evidenceStatus",
          "pretextCategoryIds"
        ],
        "properties": {
          "slug": {
            "type": "string",
            "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
          },
          "year": {
            "type": "integer",
            "minimum": 1000,
            "maximum": 2100
          },
          "title": {
            "type": "string",
            "minLength": 1
          },
          "place": {
            "type": "string",
            "minLength": 1
          },
          "lat": {
            "type": "number",
            "minimum": -90,
            "maximum": 90
          },
          "lng": {
            "type": "number",
            "minimum": -180,
            "maximum": 180
          },
          "tradition": {
            "type": "string",
            "enum": [
              "juju",
              "haitian-vodou",
              "santeria",
              "palo",
              "muti",
              "fraud-us",
              "western-occult",
              "judaism",
              "hinduism",
              "buddhism",
              "sikhism",
              "jainism",
              "fraternal",
              "islam",
              "christian",
              "nrm",
              "spiritual-healing",
              "left-hand-path",
              "afro-brazilian",
              "new-age",
              "northern-traditional",
              "indigenous-spiritual"
            ]
          },
          "traditionDetailId": {
            "type": "string",
            "minLength": 1
          },
          "type": {
            "type": "string",
            "enum": [
              "trafficking",
              "ritual-murder",
              "ritual-crime",
              "child-abuse",
              "death",
              "state-terror",
              "fraud",
              "sexual-abuse",
              "honor-killing",
              "intervention",
              "forced-marriage",
              "institutional-abuse",
              "persecution",
              "physical-abuse",
              "retaliation"
            ]
          },
          "recordClass": {
            "type": "string",
            "enum": [
              "core",
              "institutional-event",
              "historical",
              "context"
            ]
          },
          "evidenceStatus": {
            "type": "string",
            "enum": [
              "convicted",
              "charged",
              "civil-finding",
              "official-finding",
              "active-investigation",
              "official-hearing",
              "closed-without-charge"
            ]
          },
          "pretextCategoryIds": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "string",
              "enum": [
                "healing-treatment",
                "curse-witchcraft",
                "exorcism-deliverance",
                "prophecy-divine-command",
                "pastoral-clerical-authority",
                "guru-teacher-authority",
                "ritual-initiation",
                "spiritual-consequence",
                "sacred-sex-purity",
                "religious-marriage-family",
                "institutional-obedience",
                "prosperity-divination",
                "violent-occult-ideology",
                "other-spiritual-authority"
              ]
            }
          }
        },
        "additionalProperties": false
      },
      "CaseRecord": {
        "type": "object",
        "description": "A single record in cases[] / cases.json's light index. Full shape here; the light index (cases.json) only carries a subset — see the /cases path description.",
        "required": [
          "slug",
          "year",
          "place",
          "lat",
          "lng",
          "title",
          "tradition",
          "traditionDetailId",
          "type",
          "recordClass",
          "evidenceStatus",
          "sources",
          "spiritualNexus",
          "pretextCategoryIds",
          "authorityRoles",
          "coercionMechanisms",
          "organizations",
          "organizationIds",
          "clusterIds",
          "aliases",
          "proceedings",
          "appellateHistory",
          "scopeNote",
          "sourceAuditStatus",
          "acquittals",
          "appellate_history",
          "non_admission",
          "favorable_findings",
          "subject_response",
          "disposition_status",
          "disposition_last_checked",
          "figure_status",
          "provenance",
          "additionIndex",
          "legacyRecord"
        ],
        "properties": {
          "slug": {
            "type": "string",
            "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
          },
          "year": {
            "type": "integer",
            "minimum": 1000,
            "maximum": 2100
          },
          "place": {
            "type": "string",
            "minLength": 1
          },
          "lat": {
            "type": "number",
            "minimum": -90,
            "maximum": 90
          },
          "lng": {
            "type": "number",
            "minimum": -180,
            "maximum": 180
          },
          "title": {
            "type": "string",
            "minLength": 1
          },
          "tradition": {
            "type": "string",
            "enum": [
              "juju",
              "haitian-vodou",
              "santeria",
              "palo",
              "muti",
              "fraud-us",
              "western-occult",
              "judaism",
              "hinduism",
              "buddhism",
              "sikhism",
              "jainism",
              "fraternal",
              "islam",
              "christian",
              "nrm",
              "spiritual-healing",
              "left-hand-path",
              "afro-brazilian",
              "new-age",
              "northern-traditional",
              "indigenous-spiritual"
            ]
          },
          "traditionDetailId": {
            "type": "string",
            "minLength": 1
          },
          "type": {
            "type": "string",
            "enum": [
              "trafficking",
              "ritual-murder",
              "ritual-crime",
              "child-abuse",
              "death",
              "state-terror",
              "fraud",
              "sexual-abuse",
              "honor-killing",
              "intervention",
              "forced-marriage",
              "institutional-abuse",
              "persecution",
              "physical-abuse",
              "retaliation"
            ]
          },
          "status": {
            "type": "string",
            "description": "Legacy free-text disposition label. Not authoritative; see evidenceStatus."
          },
          "recordClass": {
            "type": "string",
            "enum": [
              "core",
              "institutional-event",
              "historical",
              "context"
            ]
          },
          "evidenceStatus": {
            "type": "string",
            "enum": [
              "convicted",
              "charged",
              "civil-finding",
              "official-finding",
              "active-investigation",
              "official-hearing",
              "closed-without-charge"
            ]
          },
          "authorityRoles": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "coercionMechanisms": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "organizations": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "organizationIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "clusterIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "aliases": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "proceedings": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "jurisdiction",
                "stage",
                "outcome"
              ],
              "properties": {
                "jurisdiction": {
                  "type": "string"
                },
                "stage": {
                  "type": "string"
                },
                "outcome": {
                  "type": "string"
                },
                "date": {
                  "type": "string",
                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                }
              },
              "additionalProperties": true
            }
          },
          "appellateHistory": {
            "type": "array",
            "items": {}
          },
          "acquittals": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "summary"
                  ],
                  "properties": {
                    "summary": {
                      "type": "string",
                      "minLength": 1
                    },
                    "date": {
                      "type": "string",
                      "format": "date"
                    },
                    "source_refs": {
                      "type": "array",
                      "items": {
                        "type": "integer",
                        "minimum": 0
                      }
                    }
                  },
                  "additionalProperties": false
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "appellate_history": {
            "oneOf": [
              {
                "type": "array",
                "items": {}
              },
              {
                "type": "null"
              }
            ]
          },
          "non_admission": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "summary"
                  ],
                  "properties": {
                    "summary": {
                      "type": "string",
                      "minLength": 1
                    },
                    "date": {
                      "type": "string",
                      "format": "date"
                    },
                    "source_refs": {
                      "type": "array",
                      "items": {
                        "type": "integer",
                        "minimum": 0
                      }
                    }
                  },
                  "additionalProperties": false
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "favorable_findings": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "summary"
                  ],
                  "properties": {
                    "summary": {
                      "type": "string",
                      "minLength": 1
                    },
                    "date": {
                      "type": "string",
                      "format": "date"
                    },
                    "source_refs": {
                      "type": "array",
                      "items": {
                        "type": "integer",
                        "minimum": 0
                      }
                    }
                  },
                  "additionalProperties": false
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "subject_response": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "body"
                  ],
                  "properties": {
                    "body": {
                      "type": "string",
                      "minLength": 1
                    },
                    "responder": {
                      "type": "string"
                    },
                    "received_date": {
                      "type": "string",
                      "format": "date"
                    },
                    "source": {
                      "type": "string",
                      "format": "uri"
                    }
                  },
                  "additionalProperties": false
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "disposition_status": {
            "description": "Latest disposition stated by a cited source; not an independent docket-currentness guarantee.",
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "disposition_last_checked": {
            "description": "Most recent date on which a cited source for the pending matter was retrieved.",
            "oneOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          },
          "figure_status": {
            "type": "string",
            "enum": [
              "public",
              "private",
              "unknown"
            ]
          },
          "provenance": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "source",
                    "accessed_date",
                    "verifier",
                    "tier_basis",
                    "verification_scope",
                    "retrieval_status",
                    "content_sha256",
                    "final_url"
                  ],
                  "properties": {
                    "source": {
                      "type": "string",
                      "format": "uri"
                    },
                    "accessed_date": {
                      "type": "string",
                      "format": "date"
                    },
                    "verifier": {
                      "type": "string",
                      "minLength": 1
                    },
                    "tier_basis": {
                      "type": "string",
                      "minLength": 1
                    },
                    "verification_scope": {
                      "type": "string",
                      "enum": [
                        "retrieval-and-integrity",
                        "substantive-review"
                      ]
                    },
                    "retrieval_status": {
                      "type": "string",
                      "enum": [
                        "saved",
                        "failed",
                        "skipped-robots",
                        "skipped-large"
                      ]
                    },
                    "content_sha256": {
                      "oneOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "final_url": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uri"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "additionalProperties": false
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "route": {
            "type": "object",
            "required": [
              "from",
              "to",
              "provenance"
            ],
            "properties": {
              "from": {
                "type": "array",
                "items": {
                  "type": "number"
                },
                "minItems": 2,
                "maxItems": 2
              },
              "to": {
                "type": "array",
                "items": {
                  "type": "number"
                },
                "minItems": 2,
                "maxItems": 2
              },
              "label": {
                "type": "string"
              },
              "fromLabel": {
                "type": "string"
              },
              "toLabel": {
                "type": "string"
              },
              "provenance": {
                "type": "string",
                "minLength": 1,
                "description": "Coordinate provenance statement; required."
              }
            },
            "additionalProperties": false
          },
          "spiritualNexus": {
            "type": "string",
            "minLength": 1
          },
          "pretextCategoryIds": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "string",
              "enum": [
                "healing-treatment",
                "curse-witchcraft",
                "exorcism-deliverance",
                "prophecy-divine-command",
                "pastoral-clerical-authority",
                "guru-teacher-authority",
                "ritual-initiation",
                "spiritual-consequence",
                "sacred-sex-purity",
                "religious-marriage-family",
                "institutional-obedience",
                "prosperity-divination",
                "violent-occult-ideology",
                "other-spiritual-authority"
              ]
            }
          },
          "sources": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "link",
                "citation",
                "body"
              ],
              "properties": {
                "link": {
                  "type": "string",
                  "format": "uri",
                  "pattern": "^https?://",
                  "description": "Live URL of the source."
                },
                "archive": {
                  "type": "string",
                  "description": "Wayback Machine (or similar) archive URL. Empty string when none exists."
                },
                "citation": {
                  "type": "string",
                  "minLength": 1,
                  "description": "Human-readable citation string; may contain inline HTML."
                },
                "body": {
                  "type": "string",
                  "minLength": 1,
                  "description": "Quoted or paraphrased excerpt supporting the record."
                },
                "tier": {
                  "type": "string",
                  "description": "Open vocabulary describing evidentiary weight (e.g. 'prosecuting-authority', 'court-reporting'). Not a closed enum."
                },
                "kind": {
                  "type": "string",
                  "description": "Open vocabulary describing document type (e.g. 'sentencing-report'). Not a closed enum."
                }
              },
              "additionalProperties": false
            }
          },
          "scopeNote": {
            "type": "string"
          },
          "sourceAuditStatus": {
            "type": "string"
          },
          "additionIndex": {
            "type": "integer",
            "minimum": 0
          },
          "legacyRecord": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "HistoricalCaseRecord": {
        "type": "object",
        "description": "A record in the separate register (historicalCases): a dossier, not a single charged offense. Never counted in the core tally.",
        "required": [
          "slug",
          "year",
          "title",
          "place",
          "recordClass",
          "evidenceStatus",
          "tradition",
          "summary",
          "status",
          "publicationStatus",
          "sources",
          "acquittals",
          "appellate_history",
          "non_admission",
          "favorable_findings",
          "subject_response",
          "disposition_status",
          "disposition_last_checked",
          "figure_status",
          "provenance"
        ],
        "properties": {
          "slug": {
            "type": "string",
            "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
          },
          "year": {
            "type": "integer"
          },
          "title": {
            "type": "string",
            "minLength": 1
          },
          "place": {
            "type": "string",
            "minLength": 1
          },
          "lat": {
            "type": "number",
            "minimum": -90,
            "maximum": 90
          },
          "lng": {
            "type": "number",
            "minimum": -180,
            "maximum": 180
          },
          "coordinateProvenance": {
            "type": "string"
          },
          "recordClass": {
            "const": "historical"
          },
          "evidenceStatus": {
            "type": "string",
            "enum": [
              "convicted",
              "charged",
              "civil-finding",
              "official-finding",
              "active-investigation",
              "official-hearing",
              "closed-without-charge"
            ]
          },
          "tradition": {
            "type": "string"
          },
          "summary": {
            "type": "string",
            "minLength": 1
          },
          "status": {
            "type": "string"
          },
          "publicationStatus": {
            "type": "string",
            "enum": [
              "published",
              "research"
            ]
          },
          "sources": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "link",
                "citation",
                "body"
              ],
              "properties": {
                "link": {
                  "type": "string",
                  "format": "uri",
                  "pattern": "^https?://",
                  "description": "Live URL of the source."
                },
                "archive": {
                  "type": "string",
                  "description": "Wayback Machine (or similar) archive URL. Empty string when none exists."
                },
                "citation": {
                  "type": "string",
                  "minLength": 1,
                  "description": "Human-readable citation string; may contain inline HTML."
                },
                "body": {
                  "type": "string",
                  "minLength": 1,
                  "description": "Quoted or paraphrased excerpt supporting the record."
                },
                "tier": {
                  "type": "string",
                  "description": "Open vocabulary describing evidentiary weight (e.g. 'prosecuting-authority', 'court-reporting'). Not a closed enum."
                },
                "kind": {
                  "type": "string",
                  "description": "Open vocabulary describing document type (e.g. 'sentencing-report'). Not a closed enum."
                }
              },
              "additionalProperties": false
            }
          },
          "scopeNote": {
            "type": "string"
          },
          "acquittals": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "summary"
                  ],
                  "properties": {
                    "summary": {
                      "type": "string",
                      "minLength": 1
                    },
                    "date": {
                      "type": "string",
                      "format": "date"
                    },
                    "source_refs": {
                      "type": "array",
                      "items": {
                        "type": "integer",
                        "minimum": 0
                      }
                    }
                  },
                  "additionalProperties": false
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "appellate_history": {
            "oneOf": [
              {
                "type": "array",
                "items": {}
              },
              {
                "type": "null"
              }
            ]
          },
          "non_admission": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "summary"
                  ],
                  "properties": {
                    "summary": {
                      "type": "string",
                      "minLength": 1
                    },
                    "date": {
                      "type": "string",
                      "format": "date"
                    },
                    "source_refs": {
                      "type": "array",
                      "items": {
                        "type": "integer",
                        "minimum": 0
                      }
                    }
                  },
                  "additionalProperties": false
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "favorable_findings": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "summary"
                  ],
                  "properties": {
                    "summary": {
                      "type": "string",
                      "minLength": 1
                    },
                    "date": {
                      "type": "string",
                      "format": "date"
                    },
                    "source_refs": {
                      "type": "array",
                      "items": {
                        "type": "integer",
                        "minimum": 0
                      }
                    }
                  },
                  "additionalProperties": false
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "subject_response": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "body"
                  ],
                  "properties": {
                    "body": {
                      "type": "string",
                      "minLength": 1
                    },
                    "responder": {
                      "type": "string"
                    },
                    "received_date": {
                      "type": "string",
                      "format": "date"
                    },
                    "source": {
                      "type": "string",
                      "format": "uri"
                    }
                  },
                  "additionalProperties": false
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "disposition_status": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "disposition_last_checked": {
            "oneOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          },
          "figure_status": {
            "type": "string",
            "enum": [
              "public",
              "private",
              "unknown"
            ]
          },
          "provenance": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "source",
                    "accessed_date",
                    "verifier",
                    "tier_basis",
                    "verification_scope",
                    "retrieval_status",
                    "content_sha256",
                    "final_url"
                  ],
                  "properties": {
                    "source": {
                      "type": "string",
                      "format": "uri"
                    },
                    "accessed_date": {
                      "type": "string",
                      "format": "date"
                    },
                    "verifier": {
                      "type": "string",
                      "minLength": 1
                    },
                    "tier_basis": {
                      "type": "string",
                      "minLength": 1
                    },
                    "verification_scope": {
                      "type": "string",
                      "enum": [
                        "retrieval-and-integrity",
                        "substantive-review"
                      ]
                    },
                    "retrieval_status": {
                      "type": "string",
                      "enum": [
                        "saved",
                        "failed",
                        "skipped-robots",
                        "skipped-large"
                      ]
                    },
                    "content_sha256": {
                      "oneOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "final_url": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uri"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "additionalProperties": false
                }
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "Source": {
        "type": "object",
        "required": [
          "link",
          "citation",
          "body"
        ],
        "properties": {
          "link": {
            "type": "string",
            "format": "uri",
            "pattern": "^https?://",
            "description": "Live URL of the source."
          },
          "archive": {
            "type": "string",
            "description": "Wayback Machine (or similar) archive URL. Empty string when none exists."
          },
          "citation": {
            "type": "string",
            "minLength": 1,
            "description": "Human-readable citation string; may contain inline HTML."
          },
          "body": {
            "type": "string",
            "minLength": 1,
            "description": "Quoted or paraphrased excerpt supporting the record."
          },
          "tier": {
            "type": "string",
            "description": "Open vocabulary describing evidentiary weight (e.g. 'prosecuting-authority', 'court-reporting'). Not a closed enum."
          },
          "kind": {
            "type": "string",
            "description": "Open vocabulary describing document type (e.g. 'sentencing-report'). Not a closed enum."
          }
        },
        "additionalProperties": false
      },
      "Proceeding": {
        "type": "object",
        "required": [
          "jurisdiction",
          "stage",
          "outcome"
        ],
        "properties": {
          "jurisdiction": {
            "type": "string"
          },
          "stage": {
            "type": "string"
          },
          "outcome": {
            "type": "string"
          },
          "date": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          }
        },
        "additionalProperties": true
      },
      "Route": {
        "type": "object",
        "required": [
          "from",
          "to",
          "provenance"
        ],
        "properties": {
          "from": {
            "type": "array",
            "items": {
              "type": "number"
            },
            "minItems": 2,
            "maxItems": 2
          },
          "to": {
            "type": "array",
            "items": {
              "type": "number"
            },
            "minItems": 2,
            "maxItems": 2
          },
          "label": {
            "type": "string"
          },
          "fromLabel": {
            "type": "string"
          },
          "toLabel": {
            "type": "string"
          },
          "provenance": {
            "type": "string",
            "minLength": 1,
            "description": "Coordinate provenance statement; required."
          }
        },
        "additionalProperties": false
      },
      "Stats": {
        "type": "object",
        "description": "Computed aggregates for on-page charts. Every value is derived from the corpus at build time.",
        "properties": {
          "generatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "totals": {
            "type": "object",
            "properties": {
              "allRecords": {
                "type": "integer"
              },
              "coreRecords": {
                "type": "integer"
              },
              "historicalRegisterRecords": {
                "type": "integer"
              },
              "totalSources": {
                "type": "integer"
              }
            }
          },
          "yearRange": {
            "type": "object",
            "properties": {
              "coreStart": {
                "type": "integer"
              },
              "coreEnd": {
                "type": "integer"
              },
              "corpusStart": {
                "type": "integer"
              },
              "corpusEnd": {
                "type": "integer"
              }
            }
          },
          "conviction": {
            "type": "object",
            "properties": {
              "count": {
                "type": "integer"
              },
              "percentOfAll": {
                "type": "number"
              },
              "percentOfCore": {
                "type": "number"
              }
            }
          },
          "byTradition": {
            "type": "object",
            "additionalProperties": {
              "type": "integer"
            }
          },
          "byType": {
            "type": "object",
            "additionalProperties": {
              "type": "integer"
            }
          },
          "byDecade": {
            "type": "object",
            "additionalProperties": {
              "type": "integer"
            }
          },
          "byCountry": {
            "type": "object",
            "additionalProperties": {
              "type": "integer"
            },
            "description": "Heuristic: last comma-separated segment of the free-text `place` field. Not a normalized jurisdiction count."
          },
          "byRecordClass": {
            "type": "object",
            "additionalProperties": {
              "type": "integer"
            }
          },
          "byEvidenceStatus": {
            "type": "object",
            "additionalProperties": {
              "type": "integer"
            }
          },
          "byPretextCategory": {
            "type": "object",
            "additionalProperties": {
              "type": "integer"
            }
          },
          "sourcesInCaseRecords": {
            "type": "integer"
          }
        }
      },
      "Error": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}