{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://gautierdorval.com/ctic-compliance-report.schema.json",
  "title": "CTIC compliance report schema",
  "description": "Public interface schema for a CTIC compliance report. This schema declares the report envelope, observed variable classes, and compliance findings at a high level. It does not encode private implementation logic or vendor-specific instrumentation.",
  "type": "object",
  "required": ["schemaVersion", "reportId", "generatedAt", "surface", "findings"],
  "properties": {
    "schemaVersion": { "type": "string" },
    "reportId": { "type": "string" },
    "generatedAt": { "type": "string", "format": "date-time" },
    "surface": {
      "type": "object",
      "properties": {
        "name": { "type": "string" },
        "locale": { "type": "string" },
        "jurisdiction": { "type": "string" }
      },
      "additionalProperties": true
    },
    "findings": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["ruleId", "status"],
        "properties": {
          "ruleId": { "type": "string" },
          "status": { "type": "string", "enum": ["pass", "warning", "fail", "not-assessed"] },
          "note": { "type": "string" }
        },
        "additionalProperties": true
      }
    },
    "ddi": {
      "type": "object",
      "properties": {
        "frequency": { "type": "number" },
        "averageAmplitude": { "type": "number" },
        "window": { "type": "string" }
      },
      "additionalProperties": true
    }
  },
  "additionalProperties": true
}
