{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "$id": "incident.schema.json",
 "title": "Frontier AI safety incident record, v1 (public fields)",
 "description": "One record of the Frontier AI Safety Incidents Tracker data, or a withdrawn record, which keeps only its id, title and withdrawn. Field meanings: the method page.",
 "oneOf": [
  {
   "$ref": "#/$defs/record"
  },
  {
   "$ref": "#/$defs/withdrawn"
  }
 ],
 "$defs": {
  "record": {
   "type": "object",
   "additionalProperties": false,
   "required": [
    "title",
    "summary",
    "developer",
    "systems",
    "reporter",
    "reporter_type",
    "setting",
    "behaviour",
    "harm_status",
    "oecd_class",
    "mit_subdomains",
    "iaisr",
    "source_label",
    "date_event",
    "date_disclosed",
    "date_added",
    "status",
    "primary",
    "excerpt",
    "excerpt_locator",
    "hedge",
    "related",
    "external_ids",
    "changes",
    "id",
    "last_checked",
    "version_date"
   ],
   "properties": {
    "id": {
     "type": "string",
     "pattern": "^INC-[0-9]{4}$"
    },
    "title": {
     "type": "string",
     "maxLength": 100
    },
    "summary": {
     "type": "string"
    },
    "developer": {
     "type": "array",
     "minItems": 1,
     "items": {
      "type": "string"
     }
    },
    "systems": {
     "type": "array",
     "minItems": 1,
     "items": {
      "type": "string"
     }
    },
    "reporter": {
     "type": "string"
    },
    "reporter_type": {
     "type": "string",
     "enum": [
      "developer",
      "other-developer",
      "government-evaluator",
      "independent-evaluator",
      "individual-researcher",
      "academic-researchers",
      "affected-operator",
      "regulator",
      "court"
     ]
    },
    "setting": {
     "type": "string",
     "enum": [
      "A1",
      "A2",
      "A3",
      "A4",
      "A5",
      "A6",
      "A7",
      "A8"
     ]
    },
    "behaviour": {
     "type": "array",
     "items": {
      "type": "string",
      "enum": [
       "B1",
       "B2",
       "B3",
       "B4",
       "B5",
       "B6",
       "B7",
       "B8",
       "B9",
       "B10"
      ]
     },
     "description": "Ordered, first code is the main one. Empty only for settings A5, A6 and A7 when the source reports no system behaviour (SCHEMA.md section 2)."
    },
    "capability_domain": {
     "type": "array",
     "items": {
      "type": "string",
      "enum": [
       "cbrn",
       "cyber",
       "ai-rnd",
       "manipulation",
       "nuclear-radiological"
      ]
     }
    },
    "harm_status": {
     "type": "string",
     "enum": [
      "C0",
      "C1",
      "C2"
     ]
    },
    "defined_term": {
     "type": "object",
     "additionalProperties": false,
     "required": [
      "term",
      "applied_by",
      "url"
     ],
     "properties": {
      "term": {
       "type": "string"
      },
      "applied_by": {
       "type": "string"
      },
      "url": {
       "type": "string"
      }
     },
     "description": "An incident term a developer, a government evaluator or a regulator applied to this event, stored verbatim, with who applied it and the document that applies it; shown as a badge beside the harm level, which it never sets (SCHEMA.md section 2, axis C)."
    },
    "oecd_class": {
     "type": "string",
     "enum": [
      "incident",
      "hazard"
     ]
    },
    "mit_subdomains": {
     "type": "array",
     "minItems": 1,
     "items": {
      "type": "string",
      "pattern": "^[1-7]\\.[1-6]$"
     }
    },
    "iaisr": {
     "type": "string",
     "enum": [
      "Malfunctions › Loss of control",
      "Malfunctions › Reliability challenges",
      "Malicious use › Cyberattacks",
      "Malicious use › Biological and chemical risks",
      "Malicious use › Influence and manipulation",
      "Systemic risks",
      "Outside the report's families"
     ]
    },
    "source_label": {
     "type": "object",
     "additionalProperties": false,
     "required": [
      "text",
      "as_of"
     ],
     "properties": {
      "text": {
       "type": "string"
      },
      "as_of": {
       "type": "string",
       "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
      }
     }
    },
    "external_ids": {
     "type": "object",
     "additionalProperties": false,
     "required": [
      "aiid",
      "oecd_aim"
     ],
     "properties": {
      "aiid": {
       "type": "array",
       "items": {
        "type": "integer"
       }
      },
      "oecd_aim": {
       "type": "array",
       "items": {
        "type": "string"
       }
      }
     }
    },
    "date_event": {
     "type": "string",
     "pattern": "^(unstated|[0-9]{4}-[0-9]{2}(-[0-9]{2})?(/[0-9]{4}-[0-9]{2}(-[0-9]{2})?)?)$"
    },
    "date_disclosed": {
     "type": "string",
     "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
    },
    "date_added": {
     "type": "string",
     "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
    },
    "last_checked": {
     "type": "string",
     "pattern": "^([0-9]{4}-[0-9]{2}-[0-9]{2})?$"
    },
    "status": {
     "type": "string",
     "enum": [
      "index-only",
      "body-read",
      "checked-independent"
     ]
    },
    "primary": {
     "type": "object",
     "additionalProperties": false,
     "required": [
      "url",
      "publisher",
      "title",
      "date"
     ],
     "properties": {
      "url": {
       "type": "string",
       "pattern": "^https://"
      },
      "publisher": {
       "type": "string"
      },
      "title": {
       "type": "string"
      },
      "date": {
       "type": "string",
       "pattern": "^([0-9]{4}-[0-9]{2}(-[0-9]{2})?)?$"
      }
     }
    },
    "archive_url": {
     "type": "string",
     "pattern": "^(https://web\\.archive\\.org/web/[0-9]+/.+)?$"
    },
    "excerpt": {
     "type": "string"
    },
    "excerpt_locator": {
     "type": "string"
    },
    "hedge": {
     "type": "string"
    },
    "related": {
     "type": "array",
     "items": {
      "type": "object",
      "additionalProperties": false,
      "required": [
       "url",
       "role",
       "publisher",
       "title",
       "date"
      ],
      "properties": {
       "url": {
        "type": "string",
        "pattern": "^https://"
       },
       "role": {
        "type": "string",
        "enum": [
         "index-entry",
         "follow-up",
         "investigation",
         "lab-response",
         "regulator",
         "dataset-entry",
         "coverage"
        ]
       },
       "publisher": {
        "type": "string"
       },
       "title": {
        "type": "string"
       },
       "date": {
        "type": "string",
        "pattern": "^([0-9]{4}-[0-9]{2}(-[0-9]{2})?)?$"
       }
      }
     }
    },
    "note": {
     "type": "string"
    },
    "changes": {
     "type": "array",
     "items": {
      "type": "object",
      "additionalProperties": false,
      "required": [
       "date",
       "text"
      ],
      "properties": {
       "date": {
        "type": "string",
        "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
       },
       "text": {
        "type": "string"
       }
      }
     }
    },
    "version_date": {
     "type": "string",
     "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
     "description": "The later of last_checked and the latest change-log date; date_added when neither exists"
    }
   }
  },
  "withdrawn": {
   "type": "object",
   "additionalProperties": false,
   "required": [
    "id",
    "title",
    "withdrawn"
   ],
   "properties": {
    "id": {
     "type": "string",
     "pattern": "^INC-[0-9]{4}$"
    },
    "title": {
     "type": "string",
     "maxLength": 100
    },
    "withdrawn": {
     "type": "object",
     "additionalProperties": false,
     "required": [
      "date",
      "reason"
     ],
     "properties": {
      "date": {
       "type": "string",
       "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
      },
      "reason": {
       "type": "string"
      }
     },
     "description": "Set when a published record is taken down: its ID stays reserved and its address shows a stub page with this date and reason."
    }
   }
  }
 }
}
