{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://example.com/schemas/aeo-geo-context.schema.json",
  "title": "AEO GEO Context",
  "type": "object",
  "required": ["description", "objective", "aeo_geo_context"],
  "properties": {
    "description": { "type": "string", "minLength": 1 },
    "objective": { "type": "string", "minLength": 1 },
    "aeo_geo_context": {
      "type": "object",
      "required": ["objective", "why", "contextSurfaces", "promptFixtures", "answerEvidenceRecords", "citationRules", "qaGates", "stressTests", "passCriteria", "warningCriteria", "failCriteria", "objectiveAlignment"],
      "properties": {
        "objective": { "type": "string", "minLength": 1 },
        "why": { "type": "string", "minLength": 1 },
        "contextSurfaces": {
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "object",
            "required": ["id", "surface", "purpose", "evidenceRoutes", "requiredChecks"]
          }
        },
        "promptFixtures": {
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "object",
            "required": ["id", "fixturePath", "promptType", "expectedEvidence", "blockedBehavior", "passCriteria"]
          }
        },
        "answerEvidenceRecords": {
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "object",
            "required": ["id", "fixturePath", "requiredFields", "why"]
          }
        },
        "citationRules": { "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 }
      }
    }
  }
}
