{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://oda3.org/schemas/airf/aiis-v1.0.schema.json",
  "title": "AI-IRF Implementation Schema (AIIS) v1.0",
  "version": "1.0.0",
  "description": "Published by ODA3 Institute under the GAISSF Ecosystem Licence (GEL v1.0). Machine-readable implementation schema for AI-IRF® v1.0 (AI Incident Response Framework). Defines structured control records, playbook definitions, and severity classification for the 79 controls across 19 domains. The schema reserves an optional conformance_test structure for embedded test vectors; this is planned for a future AIIS release and is not populated in v1.0.0. Companion machine-readable artifact to UAIS v1.0 (oda3.org/schemas/uaif/uais-v1.0.schema.json). Attribution: GAISSF Ecosystem © ODA3 Institute, GEL v1.0 | https://oda3.org/airf",
  "type": "object",
  "definitions": {
    "ControlRecord": {
      "type": "object",
      "description": "Canonical machine-readable representation of a single AI-IRF® v1.0 control. One ControlRecord exists for each of the 79 published controls. Embedded conformance_test objects are reserved for a future AIIS release and are not present in v1.0.0.",
      "required": [
        "control_id",
        "domain_code",
        "domain_name",
        "minimum_tier",
        "requirement_type",
        "shall_statement",
        "evidence_type"
      ],
      "properties": {
        "control_id": {
          "type": "string",
          "pattern": "^[A-Z][A-Z0-9]{1,3}(-[A-Z]+)?-?(RPT|CLS)?-?[0-9]*$",
          "description": "Canonical control identifier, e.g. 'MCP-1', 'SEV-CLS', 'PQC-1'. Matches IDs published in ODA3-2026-06-TCR-HAI-001 and ECO-011/013/014/015."
        },
        "domain_code": {
          "type": "string",
          "enum": [
            "MCP",
            "A2A",
            "SAI",
            "MSR",
            "REL",
            "MEX",
            "BOM",
            "APA",
            "APT",
            "REG",
            "PHY",
            "MLC",
            "ZTA",
            "SEV",
            "CSS",
            "FL",
            "MMD",
            "QBS",
            "HAL",
            "PQC"
          ],
          "description": "One of the 19 normative AI-IRF® v1.0 domains."
        },
        "domain_name": {
          "type": "string",
          "description": "Full domain name, e.g. 'Machine-Speed Response', 'Content Safety'."
        },
        "minimum_tier": {
          "type": "string",
          "enum": [
            "T1+",
            "T2+",
            "T3",
            "T3+"
          ],
          "description": "Minimum AI IRF CERT® organisational tier at which this control becomes mandatory. T1+ = Tier 1 Regulatory Baseline and above. T3 = Tier 3 Autonomous Security only."
        },
        "requirement_type": {
          "type": "string",
          "enum": [
            "preventive",
            "detective",
            "corrective",
            "governance"
          ],
          "description": "Functional category of the control, aligned to NIST AI RMF Govern/Map/Measure/Manage where applicable."
        },
        "shall_statement": {
          "type": "string",
          "description": "The normative SHALL requirement text as published in the Technical Report."
        },
        "evidence_type": {
          "type": "string",
          "enum": [
            "log_record",
            "configuration_attestation",
            "test_report",
            "policy_document",
            "audit_trail",
            "signed_artifact"
          ],
          "description": "Primary evidence artifact type a CB auditor or automated conformance tool inspects to verify this control."
        },
        "time_bound_sla": {
          "type": [
            "object",
            "null"
          ],
          "description": "Present only for controls with an explicit time requirement (e.g. MLC-2 15-minute rollback, MSR-5 2-second MTTC).",
          "properties": {
            "metric": {
              "type": "string",
              "enum": [
                "MTTC",
                "MTTD",
                "rollback_sla",
                "response_sla",
                "notification_sla"
              ]
            },
            "threshold_seconds": {
              "type": "number"
            },
            "unit_display": {
              "type": "string"
            }
          }
        },
        "playbook_ref": {
          "type": [
            "string",
            "null"
          ],
          "description": "Reference to a PlaybookDefinition id, if this control is operationalised as an automatable playbook step (primarily MSR, APT, APA, MMD domains)."
        },
        "regulatory_mapping": {
          "type": "array",
          "description": "List of regulation+article pairs this control satisfies, drawn from ODA3-2026-06-RPT-GOV-027 and ODA3-2026-06-RPT-GOV-033.",
          "items": {
            "type": "object",
            "properties": {
              "regulation": {
                "type": "string"
              },
              "article": {
                "type": "string"
              }
            }
          }
        },
        "conformance_test": {
          "type": "object",
          "description": "Structured test vector for automated conformance checking by a CB tool or self-assessment script. NOT YET POPULATED in aiis-control-records-v1.0.json (v1.0.0 release) — reserved for a future AIIS release. Records validate without this field in v1.0.0.",
          "required": [
            "test_id",
            "test_method",
            "pass_criteria"
          ],
          "properties": {
            "test_id": {
              "type": "string"
            },
            "test_method": {
              "type": "string",
              "enum": [
                "document_review",
                "log_inspection",
                "live_simulation",
                "configuration_scan",
                "interview"
              ]
            },
            "pass_criteria": {
              "type": "string"
            },
            "evidence_tier": {
              "type": "string",
              "enum": [
                "T1",
                "T2",
                "T3",
                "T4"
              ]
            }
          }
        }
      }
    },
    "PlaybookDefinition": {
      "type": "object",
      "description": "A structured, machine-executable incident response playbook definition. Designed for direct ingestion by SOAR platforms (e.g. Palo Alto XSOAR, Microsoft Sentinel, IBM Resilient) per the AI-IRF® v1.0 OEM technology licensing model (ODA3-2026-06-STR-COM-001 Stage 6).",
      "required": [
        "playbook_id",
        "name",
        "trigger_domain",
        "trigger_condition",
        "steps"
      ],
      "properties": {
        "playbook_id": {
          "type": "string",
          "pattern": "^PB-[A-Z]{2,4}-[0-9]{3}$"
        },
        "name": {
          "type": "string"
        },
        "trigger_domain": {
          "type": "string",
          "enum": [
            "MSR",
            "APT",
            "APA",
            "MMD",
            "SAI",
            "MEX"
          ],
          "description": "The domain whose control breach initiates this playbook. These six domains contain the AI-IRF® v1.0 controls with automatable, time-bound response logic."
        },
        "trigger_condition": {
          "type": "object",
          "properties": {
            "control_id": {
              "type": "string"
            },
            "condition_expression": {
              "type": "string",
              "description": "Boolean expression evaluated against live telemetry, e.g. 'ensemble_agreement >= 0.7 AND signal_count >= 3'."
            },
            "confidence_threshold": {
              "type": "number",
              "minimum": 0,
              "maximum": 1
            }
          }
        },
        "human_in_the_loop": {
          "type": "object",
          "description": "HITL gate per MSR-4 / APA-4. Required for blast radius exceeding the defined thresholds.",
          "properties": {
            "required": {
              "type": "boolean"
            },
            "blast_radius_threshold_users": {
              "type": "integer"
            },
            "financial_impact_threshold_usd": {
              "type": "number"
            }
          }
        },
        "steps": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "step_order",
              "action",
              "control_ref"
            ],
            "properties": {
              "step_order": {
                "type": "integer"
              },
              "action": {
                "type": "string",
                "enum": [
                  "isolate",
                  "quarantine",
                  "revoke_token",
                  "rate_limit",
                  "alert_soc",
                  "rollback_model",
                  "escalate_human",
                  "log_evidence",
                  "notify_regulator"
                ]
              },
              "control_ref": {
                "type": "string",
                "description": "control_id this step operationalises"
              },
              "max_duration_seconds": {
                "type": "number"
              }
            }
          }
        },
        "severity_classification_ref": {
          "type": "string",
          "description": "Reference to a SeverityClassification object (SEV-CLS) used to determine escalation path."
        }
      }
    },
    "SeverityClassification": {
      "type": "object",
      "description": "Machine-readable severity scoring object for SEV-CLS / SEV-RPT controls. Structurally parallel to UAIS severity_presentation_score but scoped to AI-IRF® v1.0 incident classes rather than UAIF's cross-framework harm taxonomy.",
      "required": [
        "incident_class",
        "severity_level",
        "severity_score",
        "regulatory_trigger"
      ],
      "properties": {
        "incident_class": {
          "type": "string",
          "enum": [
            "prompt_injection",
            "model_extraction",
            "agentic_runaway",
            "model_drift",
            "supply_chain_compromise",
            "hallucination_high_stakes",
            "federated_poisoning",
            "quantization_backdoor",
            "content_safety_violation",
            "physical_safety_failure",
            "shadow_ai_exposure",
            "credential_overreach"
          ]
        },
        "severity_level": {
          "type": "integer",
          "minimum": 1,
          "maximum": 4,
          "description": "SEV-1 (low) through SEV-4 (critical), per AI-IRF® v1.0 §6."
        },
        "severity_score": {
          "type": "number",
          "minimum": 0,
          "maximum": 10
        },
        "score_bands": {
          "type": "object",
          "description": "AI-IRF® v1.0 severity score bands, structurally aligned to UAIF's corrected level_4_high band (6.5-8.4) per UAIF TCR-STD-002 §4.8.",
          "properties": {
            "level_1_low": {
              "type": "string",
              "const": "0.0-2.4"
            },
            "level_2_moderate": {
              "type": "string",
              "const": "2.5-4.9"
            },
            "level_3_elevated": {
              "type": "string",
              "const": "5.0-6.4"
            },
            "level_4_high": {
              "type": "string",
              "const": "6.5-8.4"
            },
            "level_4_critical": {
              "type": "string",
              "const": "8.5-10.0"
            }
          }
        },
        "regulatory_trigger": {
          "type": "boolean",
          "description": "True when severity_score >= 6.5, mirroring UAIF's regulatory_trigger threshold (TCR-STD-002 §4.7) for cross-framework consistency."
        },
        "notification_routing": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "jurisdiction": {
                "type": "string"
              },
              "regulator": {
                "type": "string"
              },
              "notification_window_hours": {
                "type": "number"
              }
            }
          },
          "description": "Populated from REG-1/REG-4 jurisdiction mapping logic, e.g. DORA 4h, GDPR 72h, NIS2 24h/72h, EU AI Act Art. 73 15-day."
        }
      }
    },
    "ConformanceProfile": {
      "type": "object",
      "description": "Defines an adoption profile, structurally parallel to UAIF's 5 adoption profiles (Core, Enterprise, Regulatory, SOC/SIEM, AI Security Extension).",
      "properties": {
        "profile_name": {
          "type": "string",
          "enum": [
            "Foundation",
            "Operational",
            "Autonomous",
            "SOAR_Integration",
            "Regulatory_Evidence"
          ]
        },
        "tier_equivalent": {
          "type": "string",
          "enum": [
            "Tier 1",
            "Tier 2",
            "Tier 3",
            "N/A"
          ]
        },
        "required_domains": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "required_control_count": {
          "type": "integer"
        }
      }
    }
  }
}
