{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://paloframework.org/schemas/palo-evidence-claim.schema.json",
  "title": "PALO Atomic Evidence Claim",
  "type": "object",
  "required": ["format", "schemaVersion", "claimId", "artifactId", "target", "scope", "statement", "integrityReference", "createdAt", "status", "appendOnly"],
  "properties": {
    "format": { "const": "palo-evidence-claim" },
    "schemaVersion": { "const": "1.0.0" },
    "claimId": { "type": "string", "pattern": "^evidence-claim-[a-z0-9][a-z0-9-]{5,80}$" },
    "artifactId": { "type": "string", "pattern": "^evidence-artifact-[a-z0-9][a-z0-9-]{5,80}$" },
    "target": {
      "type": "object",
      "required": ["targetType", "targetId"],
      "properties": {
        "targetType": { "enum": ["gate-instance", "control-implementation", "metric-observation", "decision-record", "assessment-run", "agentic-execution"] },
        "targetId": { "type": "string", "minLength": 1 }
      },
      "additionalProperties": false
    },
    "scope": {
      "type": "object",
      "required": ["caseId", "validFrom"],
      "properties": {
        "caseId": { "type": "string", "pattern": "^case-[a-z0-9][a-z0-9-]{5,63}$" },
        "validFrom": { "type": "string", "format": "date-time" },
        "validTo": { "type": "string", "format": "date-time" }
      },
      "additionalProperties": false
    },
    "statement": { "type": "string", "minLength": 1 },
    "integrityReference": { "$ref": "#/$defs/digest" },
    "createdAt": { "type": "string", "format": "date-time" },
    "status": { "enum": ["asserted", "under-review", "accepted", "rejected", "superseded"] },
    "supersedesClaimId": { "type": "string", "pattern": "^evidence-claim-[a-z0-9][a-z0-9-]{5,80}$" },
    "appendOnly": { "const": true }
  },
  "$defs": { "digest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" } },
  "additionalProperties": false
}
