{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://sneakoscope.dev/schemas/search-visibility/finding-ledger.schema.json",
  "title": "SKS Search Visibility Finding Ledger",
  "type": "object",
  "required": ["schema", "mission_id", "route", "findings", "counts"],
  "properties": {
    "schema": { "enum": ["sks.search-visibility.seo-findings.v1", "sks.search-visibility.geo-findings.v1"] },
    "mission_id": { "type": "string" },
    "route": { "const": "$SEO-GEO-OPTIMIZER" },
    "findings": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["id", "ruleId", "domain", "category", "severity", "confidence", "blocking", "summary", "evidence", "affected", "remediation", "autoFixable"],
        "properties": {
          "id": { "type": "string" },
          "ruleId": { "type": "string" },
          "domain": { "enum": ["seo", "geo", "shared"] },
          "category": { "type": "string" },
          "severity": { "enum": ["info", "low", "medium", "high", "critical"] },
          "confidence": { "type": "number" },
          "blocking": { "type": "boolean" },
          "summary": { "type": "string" },
          "evidence": { "type": "array", "minItems": 1 },
          "affected": { "type": "array" },
          "remediation": { "type": "string" },
          "autoFixable": { "type": "boolean" }
        },
        "additionalProperties": true
      }
    },
    "counts": { "type": "object" }
  },
  "additionalProperties": true
}
