{
  "$id": "https://www.gaipagents.com/phase1-outcome-receipt-schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "artifact_id": {
      "const": "GAIP-SHARED-RESULT-V1"
    },
    "artifact_sha256_seen": {
      "pattern": "^[a-f0-9]{64}$",
      "type": "string"
    },
    "causality_claim": {
      "enum": [
        "SUPPORTED",
        "ASSOCIATED_NOT_CAUSAL",
        "NO_CAUSAL_CLAIM"
      ]
    },
    "evidence_refs": {
      "items": {
        "type": "string"
      },
      "minItems": 1,
      "type": "array",
      "uniqueItems": true
    },
    "observed_at": {
      "format": "date-time",
      "type": "string"
    },
    "outcome_class": {
      "enum": [
        "POSITIVE",
        "NEGATIVE",
        "MIXED",
        "NO_EFFECT"
      ]
    },
    "outcome_description": {
      "maxLength": 2000,
      "minLength": 10,
      "type": "string"
    },
    "outcome_id": {
      "maxLength": 128,
      "minLength": 8,
      "type": "string"
    },
    "receipt_sha256": {
      "description": "Lowercase SHA-256 of canonical JSON for every other field, using sorted keys and compact separators.",
      "pattern": "^[a-f0-9]{64}$",
      "type": "string"
    },
    "schema_version": {
      "const": "GAIP-PHASE1-OUTCOME-RECEIPT-V1"
    },
    "synthetic": {
      "const": false
    },
    "use_completed_at": {
      "format": "date-time",
      "type": "string"
    },
    "use_id": {
      "maxLength": 128,
      "minLength": 8,
      "type": "string"
    },
    "verifier_id": {
      "maxLength": 200,
      "minLength": 3,
      "type": "string"
    },
    "verifier_relationship": {
      "const": "INDEPENDENT_EXTERNAL"
    }
  },
  "required": [
    "schema_version",
    "outcome_id",
    "use_id",
    "artifact_id",
    "artifact_sha256_seen",
    "use_completed_at",
    "observed_at",
    "verifier_id",
    "verifier_relationship",
    "outcome_class",
    "outcome_description",
    "causality_claim",
    "evidence_refs",
    "synthetic",
    "receipt_sha256"
  ],
  "title": "GAIP Phase 1 Outcome Receipt",
  "type": "object"
}