{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "@context": [
    "https://schemas.meta-aiml.org/v3.0.0/context.jsonld"
  ],
  "@id": "https://schemas.meta-aiml.org/v3.0.0/components/site_capabilities_extended.json",
  "@type": [
    "Thing",
    "ComponentSchema"
  ],
  "schemaVersion": "3.0.0",
  "aimlVersion": "3.0.0",
  "title": "Site Capabilities Format Component",
  "description": "Website/platform-level technical capabilities (what the site can do)",
  "type": "object",
  "$defs": {
    "SiteCapabilities": {
      "type": "object",
      "title": "Site Capabilities",
      "description": "Technical capabilities of the website/platform",
      "properties": {
        "supportedDevices": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "desktop",
              "mobile",
              "tablet",
              "smartwatch",
              "voiceAssistant"
            ]
          }
        },
        "responsiveDesign": {
          "type": "boolean"
        },
        "mobileApp": {
          "type": "object",
          "properties": {
            "ios": {
              "type": "boolean"
            },
            "android": {
              "type": "boolean"
            },
            "appStoreUrl": {
              "type": "string"
            }
          }
        },
        "languages": {
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^[a-z]{2}(-[A-Z]{2})?$"
          }
        },
        "accessibilityFeatures": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "keyboard_navigation",
              "screen_reader_compatible",
              "high_contrast_mode"
            ]
          }
        },
        "security": {
          "type": "object",
          "properties": {
            "https": {
              "type": "boolean"
            },
            "dataEncryption": {
              "type": "boolean"
            }
          }
        }
      }
    }
  },
  "validationMetadata": {
    "schemaVersion": "3.0.0",
    "phase": "phase_1",
    "status": "draft",
    "lastValidated": "2026-02-19",
    "validator": "META-AIML QA"
  },
  "semanticAnnotations": {
    "type": "object",
    "description": "Semantic notes on site capabilities vs entity capabilities.",
    "properties": {
      "distinction": {
        "type": "string",
        "const": "siteCapabilities = technical/platform-level features (device support, languages, performance). capabilities = functional/business features (booking, commerce, interaction). Do not conflate."
      },
      "applicability": {
        "type": "string",
        "const": "siteCapabilities apply to ALL entity types. They describe the technical wrapper (website/app) not the entity's business function."
      }
    }
  },
  "governanceMetadata": {
    "type": "object",
    "properties": {
      "componentVersion": {
        "type": "string",
        "const": "3.0.0"
      },
      "stabilityLevel": {
        "type": "string",
        "const": "stable"
      },
      "usageGuidelines": {
        "type": "array",
        "const": [
          "Include siteCapabilities at the root level of entity schemas alongside 'capabilities'.",
          "supportedDevices should list all devices tested/supported.",
          "accessibilityFeatures MUST be included for PhysicalEntity schemas (legal requirement in many jurisdictions).",
          "performanceOptimization is informational — used by AI parsers to assess technical quality."
        ]
      }
    }
  },
  "examples": {
    "type": "array",
    "examples": [
      {
        "scenario": "Restaurant website",
        "siteCapabilities": {
          "supportedDevices": [
            "desktop",
            "mobile",
            "tablet"
          ],
          "languages": [
            "en",
            "es"
          ],
          "accessibilityFeatures": [
            "keyboard_navigation",
            "screen_reader_compatible"
          ],
          "performanceOptimization": [
            "image_lazy_loading",
            "cdn_delivery"
          ]
        }
      },
      {
        "scenario": "SaaS platform",
        "siteCapabilities": {
          "supportedDevices": [
            "desktop",
            "mobile"
          ],
          "languages": [
            "en",
            "fr",
            "de",
            "ja"
          ],
          "accessibilityFeatures": [
            "wcag_aa_compliant",
            "high_contrast_mode"
          ],
          "performanceOptimization": [
            "cdn_delivery",
            "server_side_rendering",
            "api_caching"
          ]
        }
      }
    ]
  },
  "usageNotes": {
    "type": "object",
    "description": "Implementation notes for site capabilities in entity schemas.",
    "properties": {
      "mobileFirst": {
        "type": "string",
        "const": "In 2024+, mobile should be listed first in supportedDevices if the entity primarily serves mobile users (restaurant, event). Desktop-first for B2B/SaaS."
      },
      "accessibilityLegal": {
        "type": "string",
        "const": "ADA (US), EAA (EU 2025), and equivalent legislation requires certain accessibility features for commercial entities. Include accessibilityFeatures for all PhysicalEntity types."
      },
      "performanceImpact": {
        "type": "string",
        "const": "performanceOptimization fields are used by AI parsers to estimate technical quality. Better performance → higher quality score in SDK v3 architecturalConsistency."
      }
    }
  },
  "$id": "https://schemas.meta-aiml.org/v3.0.0/components/site_capabilities_extended.json"
}
