{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://agentictrustindex.com/schemas/ati-screen-1.0.json",
  "title": "ATI Screen assessment export",
  "description": "Self-reported ATI Screen assessment and computed results. Designed for later ingestion by ATI Verify, which will attach evidence artifacts under verification.artifacts.",
  "type": "object",
  "required": ["schema_version", "ati_version", "engine_version", "product", "assessment_id", "timestamp", "basis", "verification", "system", "responses", "results"],
  "properties": {
    "$schema": { "type": "string" },
    "schema_version": { "const": "1.0" },
    "ati_version": { "type": "string" },
    "engine_version": { "type": "string" },
    "product": { "const": "ATI Screen" },
    "assessment_id": { "type": "string", "pattern": "^[A-Z]{2,5}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{4}$" },
    "timestamp": { "type": "string", "format": "date-time" },
    "basis": { "const": "self_reported" },
    "verification": {
      "type": "object",
      "required": ["status", "artifacts"],
      "properties": {
        "status": { "enum": ["not_verified"] },
        "artifacts": { "type": "array", "maxItems": 0 }
      }
    },
    "system": {
      "type": "object",
      "required": ["name", "stage", "impact", "data_sensitivity"],
      "properties": {
        "name": { "type": ["string", "null"], "maxLength": 100 },
        "stage": { "enum": ["idea", "pilot", "production", "unknown"] },
        "impact": { "enum": ["minor", "material", "serious", "unknown"] },
        "data_sensitivity": { "enum": ["public", "internal", "sensitive", "unknown"] }
      }
    },
    "responses": {
      "type": "object",
      "description": "Keyed by question id (e.g. auth.approval).",
      "additionalProperties": {
        "type": "object",
        "required": ["answer_id", "answer_label", "question", "question_version", "domain"],
        "properties": {
          "answer_id": { "type": "string" },
          "answer_label": { "type": "string" },
          "question": { "type": "string" },
          "question_version": { "type": "string" },
          "domain": { "enum": ["context", "authority", "identity", "enforcement", "boundaries", "evidence"] }
        }
      }
    },
    "results": {
      "type": "object",
      "required": ["trust_readiness", "authority_exposure", "evidence_confidence", "authority_boundary", "domains", "gates", "findings"],
      "properties": {
        "trust_readiness": { "type": "integer", "minimum": 0, "maximum": 100 },
        "raw_score": { "type": "integer", "minimum": 0, "maximum": 100 },
        "readiness_band": { "enum": ["unproven", "developing", "provisionally_supported"] },
        "authority_exposure": { "enum": ["low", "moderate", "high", "severe", "undetermined"] },
        "evidence_confidence": { "enum": ["low", "moderate", "high"] },
        "evidence_maturity": { "enum": ["assertion", "documented", "implemented", "tested", "independently_verified", "unknown"] },
        "current_authority": { "enum": ["observe", "draft", "act_with_approval", "bounded_autonomy", "expanded_autonomy", "undetermined"] },
        "justified_authority": { "enum": ["observe", "draft", "act_with_approval", "bounded_autonomy", "expanded_autonomy"] },
        "authority_boundary": { "enum": ["observe", "draft", "act_with_approval", "bounded_autonomy", "expanded_autonomy"] },
        "authority_exceeds_assurance": { "type": "boolean" },
        "domains": { "type": "object" },
        "ceilings": { "type": "array" },
        "gates": { "type": "array", "items": { "type": "object", "required": ["id", "title", "message", "capsAt"] } },
        "findings": { "type": "array", "items": { "type": "object", "required": ["id", "domain", "title", "why", "control", "evidence"] } },
        "evidence_requests": { "type": "array" },
        "notices": { "type": "array", "items": { "type": "string" } },
        "unknown_count": { "type": "integer", "minimum": 0 }
      }
    },
    "limitations": { "type": "array", "items": { "type": "string" } }
  }
}
