{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://example.com/schemas/real-site-comparisons.schema.json",
  "title": "Real Site Comparisons",
  "type": "object",
  "required": ["description", "objective", "real_site_comparisons"],
  "properties": {
    "description": { "type": "string", "minLength": 1 },
    "objective": { "type": "string", "minLength": 1 },
    "real_site_comparisons": {
      "type": "object",
      "required": ["objective", "why", "comparisonDimensions", "scoringModel", "comparisonProfiles", "comparisonWorkflow", "qaGates", "stressTests", "passCriteria", "warningCriteria", "failCriteria", "objectiveAlignment"],
      "properties": {
        "objective": { "type": "string", "minLength": 1 },
        "why": { "type": "string", "minLength": 1 },
        "comparisonDimensions": {
          "type": "array",
          "minItems": 1,
          "items": { "type": "object", "required": ["id", "label", "why", "evidenceSources", "scoringQuestion"] }
        },
        "scoringModel": {
          "type": "array",
          "minItems": 1,
          "items": { "type": "object", "required": ["score", "meaning"] }
        },
        "comparisonProfiles": {
          "type": "array",
          "minItems": 1,
          "items": { "type": "object", "required": ["id", "referenceStudyId", "target", "why", "reusablePatterns", "gapsToPrevent", "mappedContracts", "followUpTasks"] }
        },
        "comparisonWorkflow": { "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 } },
        "passCriteria": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 } },
        "warningCriteria": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 } },
        "failCriteria": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 } },
        "objectiveAlignment": { "type": "string", "minLength": 1 }
      }
    }
  }
}
