{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://ravenstrike.local/schemas/module_common.schema.json",
  "title": "Module Common",
  "type": "object",
  "properties": {
    "header": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "agent": { "type": "string", "const": "RAVENSTRIKE" },
        "module": { "type": "string" },
        "platform": { "type": "string" },
        "technique": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "id": { "type": "string", "pattern": "^T\\d{4}(\\.\\d{3})?$" },
            "name": { "type": "string", "minLength": 1 }
          },
          "required": ["id", "name"]
        },
        "confidence": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "level": { "type": "string", "enum": ["HIGH", "MEDIUM", "LOW"] },
            "rationale": { "type": "string", "minLength": 1 }
          },
          "required": ["level", "rationale"]
        },
        "status": { "type": "string", "enum": ["OK", "INSUFFICIENT_DATA", "INSUFFICIENT_PUBLIC_DATA", "ERROR"] }
      },
      "required": ["agent", "module", "platform", "technique", "confidence", "status"]
    },
    "assumptions": { "type": "array", "items": { "type": "string" } },
    "blind_spots": { "type": "array", "items": { "type": "string" } }
  },
  "required": ["header", "assumptions", "blind_spots"]
}
