{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://platoskallipolis.com/schemas/resource-contradiction-evidence.v1.json",
  "title": "Plato's Kallipolis Resource Contradiction Evidence",
  "description": "Identity-free, public-evidence state transition bound to one resource version and claim. This contract does not prove that the evidence URL was independently fetched.",
  "type": "object",
  "additionalProperties": false,
  "required": ["schema", "contradictionId", "resourceId", "version", "contentHash", "claimId", "transition", "observedAt", "evidenceUrl", "evidenceHash", "resolution"],
  "properties": {
    "schema": {"const": "kallipolis.resource-contradiction-evidence.v1"},
    "contradictionId": {"type": "string", "pattern": "^contradiction\\.[a-f0-9]{64}$"},
    "resourceId": {"type": "string", "pattern": "^resource\\.[a-z0-9]+(?:[.-][a-z0-9]+)*$"},
    "version": {"type": "string", "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$"},
    "contentHash": {"type": "string", "pattern": "^sha256:[a-f0-9]{64}$"},
    "claimId": {"type": "string", "pattern": "^[a-z][a-z0-9]*(?:[.-][a-z0-9]+)*$"},
    "transition": {"enum": ["opened", "confirmed", "resolved", "withdrawn"]},
    "observedAt": {"type": "string", "format": "date-time"},
    "evidenceUrl": {"type": "string", "format": "uri", "pattern": "^https://"},
    "evidenceHash": {"type": "string", "pattern": "^sha256:[a-f0-9]{64}$"},
    "resolution": {
      "type": ["string", "null"],
      "enum": [null, "resource-corrected", "evidence-refuted", "scope-clarified", "source-withdrawn"]
    }
  }
}
