{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://xematix.org/hrai-compliance-cam/schema-v0.1.json",
  "title": "HRAI Compliance CAM Pilot Schema",
  "type": "object",
  "required": ["id", "title", "version", "status", "scope", "cam", "authorityMapping", "pilot", "provenance"],
  "properties": {
    "id": { "type": "string" },
    "title": { "type": "string" },
    "version": { "type": "string" },
    "status": { "enum": ["pilot-template", "draft", "reviewed", "superseded"] },
    "scope": { "type": "object" },
    "cam": {
      "type": "object",
      "required": ["mission", "vision", "strategy", "tactics", "reflectiveGovernance"],
      "properties": {
        "mission": { "type": "object" },
        "vision": { "type": "object" },
        "strategy": { "type": "object" },
        "tactics": { "type": "array" },
        "reflectiveGovernance": { "type": "object" }
      }
    },
    "authorityMapping": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["authority", "topic", "camLink", "requiredRecord", "owner", "evidence", "status"],
        "properties": {
          "authority": { "type": "string" },
          "topic": { "type": "string" },
          "camLink": { "type": "array", "items": { "type": "string" } },
          "requiredRecord": { "type": "string" },
          "owner": { "type": "string" },
          "evidence": { "type": "array", "items": { "type": "string" } },
          "status": { "enum": ["evidenced", "partial", "gap", "conditional", "not-applicable"] }
        }
      }
    },
    "pilot": { "type": "object" },
    "provenance": { "type": "object" }
  }
}
