{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://example.com/schemas/site-type-playbooks.schema.json",
  "title": "Site Type Playbooks",
  "type": "object",
  "required": ["description", "objective", "playbooks"],
  "properties": {
    "description": { "type": "string", "minLength": 1 },
    "objective": { "type": "string", "minLength": 1 },
    "playbooks": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "required": [
          "id",
          "exampleId",
          "title",
          "objective",
          "bestFor",
          "requiredInputs",
          "pageModel",
          "buildSequence",
          "seoAeoRequirements",
          "traceabilityRequirements",
          "qaGates",
          "stressTests",
          "completionCriteria",
          "objectiveAlignment"
        ],
        "properties": {
          "id": { "type": "string", "minLength": 1 },
          "exampleId": { "type": "string", "minLength": 1 },
          "title": { "type": "string", "minLength": 1 },
          "objective": { "type": "string", "minLength": 1 },
          "bestFor": {
            "type": "array",
            "minItems": 1,
            "items": { "type": "string", "minLength": 1 }
          },
          "requiredInputs": {
            "type": "array",
            "minItems": 1,
            "items": { "type": "string", "minLength": 1 }
          },
          "pageModel": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "object",
              "required": ["routePattern", "purpose", "requiredSchema"]
            }
          },
          "buildSequence": {
            "type": "array",
            "minItems": 1,
            "items": { "type": "string", "minLength": 1 }
          },
          "seoAeoRequirements": {
            "type": "array",
            "minItems": 1,
            "items": { "type": "string", "minLength": 1 }
          },
          "traceabilityRequirements": {
            "type": "array",
            "minItems": 1,
            "items": { "type": "string", "minLength": 1 }
          },
          "qaGates": {
            "type": "array",
            "minItems": 1,
            "items": { "type": "string", "minLength": 1 }
          },
          "stressTests": {
            "type": "array",
            "minItems": 1,
            "items": { "type": "string", "minLength": 1 }
          },
          "completionCriteria": {
            "type": "array",
            "minItems": 1,
            "items": { "type": "string", "minLength": 1 }
          },
          "objectiveAlignment": { "type": "string", "minLength": 1 }
        }
      }
    }
  }
}
