{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://event.nowonacra.com/schemas/lab-trace.schema.json",
  "title": "Organizational Event Lab Trace — Research Schema v0.1",
  "description": "A preliminary schema for auditing what a bounded Organizational Event case does and does not support.",
  "type": "object",
  "required": ["trace_id", "source_event_id", "observations", "evidence_items", "supports", "does_not_establish", "audit_status"],
  "properties": {
    "trace_id": { "type": "string" },
    "source_event_id": { "type": "string" },
    "recorded_at": { "type": "string", "format": "date-time" },
    "observations": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["statement", "class"],
        "properties": {
          "statement": { "type": "string" },
          "class": { "type": "string", "enum": ["observed", "inferred", "hypothesized"] },
          "evidence_item_ids": { "type": "array", "items": { "type": "string" } }
        },
        "additionalProperties": false
      }
    },
    "evidence_items": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["id", "label", "content_hash", "availability"],
        "properties": {
          "id": { "type": "string" },
          "label": { "type": "string" },
          "content_hash": { "type": "string" },
          "availability": { "type": "string", "enum": ["public", "restricted", "private", "missing"] },
          "location": { "type": ["string", "null"] }
        },
        "additionalProperties": false
      }
    },
    "supports": { "type": "array", "items": { "type": "string" } },
    "does_not_establish": { "type": "array", "items": { "type": "string" } },
    "audit_status": {
      "type": "string",
      "enum": ["pending", "semantically-sufficient", "partially-sufficient", "insufficient"]
    },
    "audit_note": { "type": ["string", "null"] },
    "public_summary": { "type": ["string", "null"] }
  },
  "additionalProperties": false,
  "x-research-status": "preliminary",
  "x-warning": "The schema is intentionally evidence-oriented and may change as the manual laboratory produces additional traces."
}
