{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "ULTRACON SEM time-indexed trace v0.1",
  "type": "object",
  "required": [
    "event_id",
    "run_id",
    "experiment_id",
    "world_id",
    "turn_index",
    "timestamp_utc",
    "agent_id",
    "model_family",
    "model_version",
    "M_raw",
    "provenance",
    "S_t"
  ],
  "properties": {
    "event_id": {
      "type": "string",
      "minLength": 1
    },
    "run_id": {
      "type": "string",
      "minLength": 1
    },
    "experiment_id": {
      "enum": [
        "UCF-36",
        "UCF-37",
        "UCF-38"
      ]
    },
    "world_id": {
      "type": "string",
      "minLength": 1
    },
    "turn_index": {
      "type": "integer",
      "minimum": 0
    },
    "timestamp_utc": {
      "type": "string",
      "format": "date-time"
    },
    "agent_id": {
      "type": "string",
      "minLength": 1
    },
    "model_family": {
      "type": "string",
      "minLength": 1
    },
    "model_version": {
      "type": "string",
      "minLength": 1
    },
    "population_condition": {
      "enum": [
        "HOMOGENEOUS",
        "MIXED",
        "NA"
      ]
    },
    "intervention_condition": {
      "enum": [
        "CONTROL",
        "VERIFIED_GLOSS",
        "PERTURBED_GLOSS",
        "NA"
      ]
    },
    "provenance_visibility": {
      "enum": [
        "VISIBLE",
        "HIDDEN",
        "NA"
      ]
    },
    "M_raw": {
      "type": "string"
    },
    "M_gloss": {
      "type": [
        "string",
        "null"
      ]
    },
    "term_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "surface_form": {
      "type": [
        "string",
        "null"
      ]
    },
    "S_t": {
      "type": "object",
      "required": [
        "meaning_version",
        "gloss_id",
        "status"
      ],
      "properties": {
        "meaning_version": {
          "type": "integer",
          "minimum": 0
        },
        "gloss_id": {
          "type": [
            "string",
            "null"
          ]
        },
        "status": {
          "enum": [
            "UNRESOLVED",
            "CANDIDATE",
            "PARTICIPANT_STABLE",
            "AUDIT_RECONSTRUCTED",
            "FORKED"
          ]
        }
      }
    },
    "delta_S": {
      "type": [
        "object",
        "null"
      ]
    },
    "provenance": {
      "type": "object",
      "required": [
        "source_type"
      ],
      "properties": {
        "source_type": {
          "enum": [
            "NATIVE_AGENT",
            "AUDIT_GLOSS",
            "MEMORY_INJECTION",
            "COLD_READ",
            "HUMAN_ANNOTATION"
          ]
        },
        "source_event_ids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "memory_record_id": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "cold_read": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "auditor_id": {
          "type": "string"
        },
        "history_blinded": {
          "type": "boolean"
        },
        "candidate_glosses_blinded": {
          "type": "boolean"
        },
        "reconstructed_gloss_id": {
          "type": [
            "string",
            "null"
          ]
        },
        "correct": {
          "type": [
            "boolean",
            "null"
          ]
        }
      }
    },
    "task_outcome": {
      "type": [
        "object",
        "null"
      ]
    }
  },
  "additionalProperties": true
}
