{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://docs.connectsoft.ai/reference/schemas/blueprint-frontend.schema.json",
  "title": "Frontend Blueprint (blueprint-frontend-v1)",
  "description": "Descriptor document of the Frontend Blueprint kind (BC-02). Validated by BlueprintService; metadata per blueprint-common.schema.json; generation outputs and validation rules per model/blueprints.yaml.",
  "type": "object",
  "required": [
    "metadata",
    "shell",
    "screens",
    "locales",
    "accessibility"
  ],
  "additionalProperties": false,
  "properties": {
    "metadata": {
      "$ref": "blueprint-common.schema.json#/$defs/Metadata"
    },
    "shell": {
      "type": "object",
      "required": [
        "template",
        "version"
      ],
      "properties": {
        "template": {
          "type": "string"
        },
        "version": {
          "type": "string"
        },
        "theme": {
          "type": "string"
        },
        "microfrontends": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "additionalProperties": false
    },
    "screens": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "title",
          "readModels",
          "states",
          "roles"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "workArea": {
            "type": "string"
          },
          "readModels": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "commands": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "states": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "roles": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "additionalProperties": false
      }
    },
    "stateFamilies": {
      "type": "array",
      "items": {
        "enum": [
          "asset-readiness",
          "deployment-availability",
          "run",
          "approval",
          "usage",
          "freshness"
        ]
      }
    },
    "locales": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "rtlLocales": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "accessibility": {
      "type": "object",
      "required": [
        "wcag"
      ],
      "properties": {
        "wcag": {
          "enum": [
            "2.2-AA"
          ]
        },
        "keyboard": {
          "type": "boolean"
        },
        "reducedMotion": {
          "type": "boolean"
        }
      },
      "additionalProperties": false
    }
  }
}
