{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://uaix.org/spec/ai-ready-web-manifest.schema.json",
  "title": "UAIX AI-Ready Web Manifest v1",
  "description": "Public-safe manifest for a website's AI-Ready Web posture. This schema records discovery, capability, policy, evidence, and support-boundary data; it does not grant runtime authority.",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "profileId",
    "version",
    "generatedAtUtc",
    "site",
    "readinessProfiles",
    "discovery",
    "capabilities",
    "policies",
    "evidence",
    "agentImplementationContract",
    "unsupportedClaims",
    "supportBoundary"
  ],
  "properties": {
    "profileId": {
      "const": "uaix.ai-ready-web.manifest.v1"
    },
    "version": {
      "type": "string",
      "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$"
    },
    "generatedAtUtc": {
      "type": "string",
      "format": "date-time",
      "pattern": "Z$"
    },
    "site": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "name",
        "url",
        "canonicalLocale",
        "ownerReviewUrl"
      ],
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "canonicalLocale": {
          "type": "string",
          "minLength": 2
        },
        "ownerReviewUrl": {
          "type": "string",
          "format": "uri"
        }
      }
    },
    "readinessProfiles": {
      "type": "array",
      "minItems": 1,
      "uniqueItems": true,
      "items": {
        "enum": [
          "ARW-F0",
          "ARW-F1",
          "ARW-F2",
          "ARW-F3",
          "ARW-F4"
        ]
      }
    },
    "discovery": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "robots",
        "sitemap",
        "wellKnown",
        "routeInventory"
      ],
      "properties": {
        "robots": {
          "type": "string",
          "format": "uri"
        },
        "sitemap": {
          "type": "string",
          "format": "uri"
        },
        "wellKnown": {
          "type": "array",
          "minItems": 1,
          "uniqueItems": true,
          "items": {
            "type": "string",
            "format": "uri"
          }
        },
        "llmsTxt": {
          "type": "string",
          "format": "uri"
        },
        "llmsFullTxt": {
          "type": "string",
          "format": "uri"
        },
        "routeInventory": {
          "type": "string",
          "format": "uri"
        },
        "schemas": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string",
            "format": "uri"
          }
        }
      }
    },
    "capabilities": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "publicRead",
        "apiActions",
        "delegatedActions",
        "maturityRegister"
      ],
      "properties": {
        "publicRead": {
          "type": "boolean"
        },
        "apiActions": {
          "type": "boolean"
        },
        "delegatedActions": {
          "type": "boolean"
        },
        "openApi": {
          "type": "string",
          "format": "uri"
        },
        "capabilityMatrix": {
          "type": "string",
          "format": "uri"
        },
        "maturityRegister": {
          "type": "string",
          "format": "uri"
        },
        "highestSupportedProfile": {
          "enum": [
            "ARW-F0",
            "ARW-F1",
            "ARW-F2",
            "ARW-F3",
            "ARW-F4"
          ]
        },
        "noOpBehavior": {
          "type": "string",
          "minLength": 8
        }
      }
    },
    "policies": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "accessibility",
        "privacy",
        "security",
        "contentRights"
      ],
      "properties": {
        "accessibility": {
          "type": "string",
          "format": "uri"
        },
        "privacy": {
          "type": "string",
          "format": "uri"
        },
        "security": {
          "type": "string",
          "format": "uri"
        },
        "contentRights": {
          "type": "string",
          "format": "uri"
        }
      }
    },
    "evidence": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "requirements",
        "readinessResult",
        "changelog"
      ],
      "properties": {
        "requirements": {
          "type": "string",
          "format": "uri"
        },
        "readinessResult": {
          "type": "string",
          "format": "uri"
        },
        "changelog": {
          "type": "string",
          "format": "uri"
        },
        "manualReview": {
          "type": "string"
        }
      }
    },
    "agentImplementationContract": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "rule",
        "applyTo",
        "doNot"
      ],
      "properties": {
        "rule": {
          "type": "string",
          "minLength": 40
        },
        "applyTo": {
          "type": "array",
          "minItems": 1,
          "uniqueItems": true,
          "items": {
            "type": "string",
            "minLength": 3
          }
        },
        "doNot": {
          "type": "array",
          "minItems": 1,
          "uniqueItems": true,
          "items": {
            "type": "string",
            "minLength": 3
          }
        },
        "expectedEvidence": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string",
            "minLength": 3
          }
        }
      }
    },
    "unsupportedClaims": {
      "type": "array",
      "minItems": 1,
      "uniqueItems": true,
      "items": {
        "type": "string",
        "minLength": 3
      }
    },
    "supportBoundary": {
      "type": "string",
      "minLength": 40
    }
  }
}
