{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://schemas.oda3.org/uaif/core/v1.0/uaif-core-v1.0.json",
  "title": "UAIF Core Profile Schema v1.0",
  "type": "object",
  "required": [
    "incident_uuid",
    "incident_title",
    "incident_summary",
    "reporting_timestamp",
    "deduplication_hash",
    "remediation_status",
    "record_type",
    "root_cause_primary_domain",
    "root_cause_specific_type",
    "sector_code",
    "jurisdiction_country_code",
    "severity_justification"
  ],
  "properties": {
    "incident_uuid": {
      "type": "string",
      "format": "uuid"
    },
    "incident_title": {
      "type": "string",
      "minLength": 5,
      "maxLength": 255
    },
    "incident_summary": {
      "type": "string",
      "minLength": 20,
      "maxLength": 4000
    },
    "reporting_timestamp": {
      "type": "string",
      "format": "date-time"
    },
    "reporter_confidence_level": {
      "type": "integer",
      "minimum": 1,
      "maximum": 5
    },
    "deduplication_hash": {
      "type": "string",
      "pattern": "^[a-fA-F0-9]{64}$"
    },
    "remediation_status": {
      "type": "string",
      "enum": [
        "Detected",
        "Investigating",
        "Mitigated",
        "Resolved"
      ]
    },
    "record_type": {
      "type": "string",
      "enum": [
        "Incident",
        "Vulnerability",
        "Observation"
      ]
    },
    "root_cause_primary_domain": {
      "type": "string",
      "enum": [
        "Human",
        "System",
        "Data",
        "External"
      ]
    },
    "root_cause_specific_type": {
      "type": "string",
      "pattern": "^(Adversarial_Attack|Prompt_Injection|Model_Poisoning|Data_Poisoning|RAG_Leakage|Hallucination|Agent_Escalation|Policy_Violation|System_Failure|Human_Error|Supply_Chain_Compromise|Unauthorised_Access|Data_Breach|Denial_of_Service|Misuse|x_[A-Za-z0-9_]+)$"
    },
    "root_cause_confidence": {
      "type": "string",
      "enum": [
        "LOW",
        "MEDIUM",
        "HIGH"
      ]
    },
    "exploit_path_description": {
      "type": "string",
      "minLength": 20,
      "maxLength": 4000
    },
    "severity_analytical_score": {
      "type": "number",
      "minimum": 0.0,
      "maximum": 10.0,
      "multipleOf": 0.1
    },
    "severity_presentation_score": {
      "type": "number",
      "minimum": 0.0,
      "maximum": 10.0,
      "multipleOf": 0.1
    },
    "severity_level": {
      "type": "integer",
      "minimum": 1,
      "maximum": 5
    },
    "severity_justification": {
      "type": "string",
      "minLength": 20,
      "maxLength": 2000
    },
    "severity_rationale": {
      "type": "object",
      "required": [
        "calibration_status"
      ],
      "properties": {
        "dominant_harm": {
          "type": "string",
          "enum": [
            "Physical_Harm",
            "Environmental_Harm",
            "Security_Integrity",
            "Privacy_Violation",
            "Financial_Loss",
            "Psychological_Harm",
            "Property_Damage",
            "Reputational_Harm"
          ]
        },
        "dominant_weight": {
          "type": "number"
        },
        "secondary_harms": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "Physical_Harm",
              "Environmental_Harm",
              "Security_Integrity",
              "Privacy_Violation",
              "Financial_Loss",
              "Psychological_Harm",
              "Property_Damage",
              "Reputational_Harm"
            ]
          }
        },
        "secondary_contribution": {
          "type": "number"
        },
        "context_modifiers_applied": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "context",
              "base_value",
              "contribution_factor",
              "effective_contribution"
            ],
            "properties": {
              "context": {
                "type": "string"
              },
              "base_value": {
                "type": "number"
              },
              "contribution_factor": {
                "type": "number"
              },
              "effective_contribution": {
                "type": "number"
              }
            },
            "additionalProperties": false
          }
        },
        "context_modifier_sum": {
          "type": "number"
        },
        "population_multiplier": {
          "type": "number"
        },
        "blast_radius_multiplier": {
          "type": "number"
        },
        "impact_scale": {
          "type": "number"
        },
        "confidence_factor": {
          "type": "number"
        },
        "temporal_reduction": {
          "type": "number"
        },
        "temporal_adjustment": {
          "type": "number"
        },
        "calibration_status": {
          "type": "string",
          "enum": [
            "provisional",
            "sector_validated",
            "custom"
          ]
        },
        "calibration_source": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri"
        },
        "weight_provisional_notice": {
          "type": [
            "string",
            "null"
          ]
        },
        "assumptions": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "precision_notes": {
          "type": "string"
        }
      },
      "additionalProperties": true
    },
    "harm_acute": {
      "type": "boolean"
    },
    "harm_chronic_proxy": {
      "type": "boolean"
    },
    "realized_harm_categories": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "Physical_Harm",
          "Environmental_Harm",
          "Security_Integrity",
          "Privacy_Violation",
          "Financial_Loss",
          "Psychological_Harm",
          "Property_Damage",
          "Reputational_Harm"
        ]
      },
      "minItems": 1,
      "uniqueItems": true
    },
    "cumulative_bias_index": {
      "type": "number",
      "minimum": 0.0,
      "maximum": 1.0
    },
    "linked_vulnerability_id": {
      "type": "string"
    },
    "exposure_duration_hours": {
      "type": "number",
      "minimum": 0
    },
    "ai_system_type": {
      "type": "string",
      "enum": [
        "LLM",
        "VLM",
        "RAG_Pipeline",
        "Agentic",
        "Multi_Agent",
        "Traditional_ML",
        "Other"
      ]
    },
    "non_adversarial_failure_type": {
      "type": "string"
    },
    "agent_escalation_chain": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "mcp_endpoint_ids": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "oauth_pivot_chain": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "policy_enforcement_point": {
      "type": "string"
    },
    "atlas_technique_id": {
      "type": "string",
      "pattern": "^AML\\.T[0-9]{4}(\\.[0-9]{3})?$"
    },
    "sector_code": {
      "type": "string",
      "enum": [
        "ENERGY",
        "TRANSPORT",
        "BANKING",
        "FINANCIAL_MARKETS",
        "HEALTH",
        "DRINKING_WATER",
        "WASTE_WATER",
        "DIGITAL_INFRA",
        "ICT_SERVICES",
        "PUBLIC_ADMIN",
        "SPACE",
        "POSTAL",
        "WASTE_MGMT",
        "CHEMICALS",
        "FOOD",
        "MANUFACTURING",
        "TELECOM",
        "RESEARCH",
        "OTHER"
      ]
    },
    "nace_code_actual": {
      "type": "string",
      "pattern": "^[A-Z](\\d{2}(\\.\\d{1,2})?)?$"
    },
    "naics_code_actual": {
      "type": "string",
      "pattern": "^\\d{2,6}$"
    },
    "jurisdiction_country_code": {
      "type": "string",
      "pattern": "^[A-Z]{2}(-[A-Z0-9]{1,3})?$"
    },
    "regulatory_obligations": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "EU_AI_Act_Article_73",
          "GDPR_Article_33",
          "NIS2_Article_23",
          "DORA_Article_19",
          "Sectoral_Reporting",
          "None"
        ]
      },
      "minItems": 1,
      "uniqueItems": true
    },
    "regulatory_trigger": {
      "type": "boolean"
    },
    "trigger_confidence": {
      "type": "string",
      "enum": [
        "LOW",
        "MEDIUM",
        "HIGH"
      ]
    },
    "human_review_recommended": {
      "type": "boolean"
    },
    "sensitive_data": {
      "type": "boolean"
    },
    "critical_sector": {
      "type": "boolean"
    },
    "vulnerable_population": {
      "type": "boolean"
    },
    "x_extensions": {
      "type": "object",
      "additionalProperties": true
    }
  },
  "allOf": [
    {
      "if": {
        "properties": {
          "record_type": {
            "const": "Incident"
          }
        },
        "required": [
          "record_type"
        ]
      },
      "then": {
        "required": [
          "severity_analytical_score",
          "severity_presentation_score",
          "severity_level",
          "severity_rationale",
          "realized_harm_categories"
        ]
      }
    },
    {
      "if": {
        "properties": {
          "regulatory_trigger": {}
        },
        "required": [
          "regulatory_trigger"
        ]
      },
      "then": {
        "required": [
          "trigger_confidence",
          "human_review_recommended"
        ]
      }
    },
    {
      "if": {
        "properties": {
          "root_cause_specific_type": {
            "const": "Adversarial_Attack"
          }
        },
        "required": [
          "root_cause_specific_type"
        ]
      },
      "then": {
        "required": [
          "exploit_path_description"
        ]
      }
    },
    {
      "if": {
        "properties": {
          "severity_rationale": {
            "properties": {
              "calibration_status": {
                "const": "provisional"
              }
            },
            "required": [
              "calibration_status"
            ]
          }
        },
        "required": [
          "severity_rationale"
        ]
      },
      "then": {
        "properties": {
          "severity_rationale": {
            "required": [
              "weight_provisional_notice"
            ]
          }
        }
      }
    }
  ],
  "unevaluatedProperties": false
}