{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://uaix.org/spec/ai-ready-web-readiness-result.schema.json",
  "title": "UAIX AI-Ready Web Readiness Result v1",
  "description": "Assessment result model for AI-Ready Web checks. Results are evidence records, not certification or endorsement.",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "profileId",
    "version",
    "generatedAtUtc",
    "siteUrl",
    "assessedProfiles",
    "summary",
    "checks",
    "blockers",
    "warnings",
    "skippedChecks",
    "supportBoundary"
  ],
  "properties": {
    "profileId": {
      "const": "uaix.ai-ready-web.readiness-result.v1"
    },
    "version": {
      "type": "string",
      "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$"
    },
    "generatedAtUtc": {
      "type": "string",
      "format": "date-time",
      "pattern": "Z$"
    },
    "siteUrl": {
      "type": "string",
      "format": "uri"
    },
    "assessedProfiles": {
      "type": "array",
      "minItems": 1,
      "uniqueItems": true,
      "items": {
        "enum": [
          "ARW-F0",
          "ARW-F1",
          "ARW-F2",
          "ARW-F3",
          "ARW-F4"
        ]
      }
    },
    "summary": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "status",
        "score",
        "manualReviewRequired"
      ],
      "properties": {
        "status": {
          "enum": [
            "pass",
            "pass_with_warnings",
            "blocked",
            "not_assessed"
          ]
        },
        "score": {
          "type": "integer",
          "minimum": 0,
          "maximum": 100
        },
        "manualReviewRequired": {
          "type": "boolean"
        },
        "publicationStatus": {
          "type": "string"
        }
      }
    },
    "checks": {
      "type": "array",
      "minItems": 1,
      "items": {
        "$ref": "#/$defs/check"
      }
    },
    "blockers": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "warnings": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "skippedChecks": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/skippedCheck"
      }
    },
    "supportBoundary": {
      "type": "string",
      "minLength": 40
    }
  },
  "$defs": {
    "check": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "requirementId",
        "category",
        "status",
        "evidence"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 3
        },
        "requirementId": {
          "type": "string",
          "pattern": "^ARW-[0-9]{3}$"
        },
        "category": {
          "type": "string",
          "minLength": 3
        },
        "status": {
          "enum": [
            "pass",
            "warning",
            "blocked",
            "not_applicable"
          ]
        },
        "evidence": {
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "string"
          }
        },
        "notes": {
          "type": "string"
        }
      }
    },
    "skippedCheck": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "reason",
        "residualRisk"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "reason": {
          "type": "string",
          "minLength": 3
        },
        "residualRisk": {
          "type": "string",
          "minLength": 3
        }
      }
    }
  }
}
