{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://example.com/schemas/page-patterns.schema.json",
  "title": "Page Patterns",
  "type": "object",
  "required": ["description", "objective", "patterns"],
  "properties": {
    "description": { "type": "string", "minLength": 1 },
    "objective": { "type": "string", "minLength": 1 },
    "patterns": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "required": [
          "id",
          "title",
          "routeExamples",
          "purpose",
          "requiredSections",
          "requiredSchema",
          "seoRequirements",
          "aeoRequirements",
          "traceabilityRequirements",
          "qaGates",
          "antiPatterns",
          "stressTests",
          "completionCriteria"
        ],
        "properties": {
          "id": { "type": "string", "minLength": 1 },
          "title": { "type": "string", "minLength": 1 },
          "routeExamples": {
            "type": "array",
            "minItems": 1,
            "items": { "type": "string", "minLength": 1 }
          },
          "purpose": { "type": "string", "minLength": 1 },
          "requiredSections": {
            "type": "array",
            "minItems": 1,
            "items": { "type": "string", "minLength": 1 }
          },
          "requiredSchema": {
            "type": "array",
            "minItems": 1,
            "items": { "type": "string", "minLength": 1 }
          },
          "seoRequirements": {
            "type": "array",
            "minItems": 1,
            "items": { "type": "string", "minLength": 1 }
          },
          "aeoRequirements": {
            "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 }
          },
          "antiPatterns": {
            "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 }
          }
        }
      }
    }
  }
}
