{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://www.trinityaccord.org/api/claim-registry-schema.v1.json",
  "title": "Trinity Accord Claim Registry Schema v1",
  "description": "Schema for api/claim-registry.json — machine-readable claim traceability registry.",
  "type": "object",
  "required": [
    "schema",
    "version",
    "source_digest_algorithm",
    "source_digest",
    "non_amending_boundary",
    "canonical_authority",
    "purpose",
    "claim_type_definitions",
    "claims",
    "limitations",
    "does_not_prove"
  ],
  "properties": {
    "schema": {
      "type": "string",
      "const": "trinity-accord.claim-registry.v1"
    },
    "version": {
      "type": "string",
      "const": "v1"
    },
    "source_digest_algorithm": {
      "type": "string"
    },
    "source_digest": {
      "type": "string",
      "pattern": "^[0-9a-f]{16}$|^[0-9a-f]{64}$"
    },
    "non_amending_boundary": {
      "type": "boolean",
      "const": true
    },
    "canonical_authority": {
      "type": "string",
      "const": "Bitcoin Originals only"
    },
    "purpose": {
      "type": "string"
    },
    "claim_type_definitions": {
      "type": "object",
      "required": [
        "NOTARIZED_EVIDENCE_CLAIM",
        "SCARCITY_OR_FIRSTNESS_CLAIM",
        "AI_INDEPENDENT_VERIFICATION_CLAIM"
      ],
      "additionalProperties": {
        "type": "object",
        "required": ["description"],
        "properties": {
          "description": { "type": "string" },
          "counts_as_independent_attestation_by_default": { "type": "boolean" }
        },
        "additionalProperties": true
      }
    },
    "claims": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "required": [
          "claim_id",
          "claim_type",
          "claim_text",
          "public_surfaces",
          "source_files",
          "evidence_files",
          "digest_or_hash_binding",
          "validators",
          "limitations",
          "does_not_prove",
          "corrections_path",
          "current_status",
          "traceability_status"
        ],
        "properties": {
          "claim_id": { "type": "string" },
          "claim_type": { "type": "string" },
          "claim_text": { "type": "string" },
          "public_surfaces": { "type": "array", "items": { "type": "string" } },
          "source_files": { "type": "array", "items": { "type": "string" } },
          "evidence_files": { "type": "array", "items": { "type": "string" } },
          "digest_or_hash_binding": { "type": "array", "items": { "type": "string" } },
          "validators": { "type": "array", "items": { "type": "string" } },
          "limitations": { "type": "array", "items": { "type": "string" }, "minItems": 1 },
          "does_not_prove": { "type": "array", "items": { "type": "string" }, "minItems": 1 },
          "corrections_path": { "type": "string" },
          "current_status": {
            "type": "string",
            "enum": ["current", "historical_only", "superseded", "revoked", "invalidated", "deferred", "planned"]
          },
          "traceability_status": {
            "type": "string",
            "enum": ["complete", "partial", "deferred", "missing"]
          },
          "notes": { "type": "string" },
          "counts_as_independent_attestation": { "type": "boolean" },
          "formal_attestation_gate_required": { "type": "boolean" },
          "method_boundary": { "type": "object" }
        },
        "additionalProperties": true
      }
    },
    "limitations": {
      "type": "array",
      "items": { "type": "string" },
      "minItems": 1
    },
    "does_not_prove": {
      "type": "array",
      "items": { "type": "string" },
      "minItems": 1
    }
  },
  "additionalProperties": false
}
