{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://booplex.com/screenslop/finding.schema.json",
  "title": "Screenslop Finding",
  "type": "object",
  "required": [
    "id",
    "ruleId",
    "severity",
    "pillar",
    "title",
    "detail",
    "evidence",
    "suggestedFix",
    "verification",
    "confidence",
    "effort"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "severity": {
      "enum": [
        "P0",
        "P1",
        "P2",
        "P3"
      ]
    },
    "pillar": {
      "enum": [
        "accessibility",
        "hierarchy",
        "typography",
        "color",
        "layout",
        "interaction",
        "motion",
        "platform",
        "performance",
        "slop"
      ]
    },
    "title": {
      "type": "string"
    },
    "detail": {
      "type": "string"
    },
    "evidence": {
      "type": "object",
      "properties": {
        "artifact": {
          "type": "string"
        },
        "node": {
          "type": "object"
        },
        "screenshotRegion": {
          "type": "object"
        },
        "sourceHint": {
          "type": "string"
        },
        "note": {
          "type": [
            "string",
            "null"
          ]
        },
        "line": {
          "type": "number"
        },
        "snippet": {
          "type": "string"
        }
      }
    },
    "suggestedFix": {
      "type": "string"
    },
    "verification": {
      "type": "string"
    },
    "ruleId": {
      "type": "string"
    },
    "confidence": {
      "enum": [
        "high",
        "medium",
        "low"
      ]
    },
    "effort": {
      "enum": [
        "low",
        "medium",
        "high"
      ]
    },
    "kind": {
      "enum": [
        "measured",
        "design",
        "product-logic",
        "profile-gap"
      ]
    },
    "proofLevel": {
      "enum": [
        "measured",
        "runtime-informed",
        "profile-informed",
        "agent-judgment"
      ]
    },
    "requiresHumanReview": {
      "type": "boolean"
    },
    "profileRuleId": {
      "type": "string"
    },
    "judgment": {
      "type": "string"
    },
    "alternatives": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  }
}
