{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://iarpg.com/world-context-2025-index.schema.json",
  "title": "IARPG World Context Explorer index",
  "type": "object",
  "required": [
    "$schema",
    "id",
    "release",
    "version",
    "status",
    "updated_utc",
    "truth_boundary",
    "counts",
    "public_lenses",
    "profiles"
  ],
  "properties": {
    "$schema": {
      "const": "https://iarpg.com/world-context-2025-index.schema.json"
    },
    "id": {
      "const": "https://iarpg.com/world-context-2025-index.json"
    },
    "release": {
      "const": "IARPG-OPS-2"
    },
    "version": {
      "const": "2.0.21-wip"
    },
    "status": {
      "const": "work-in-progress-archival-context-index"
    },
    "updated_utc": {
      "type": "string",
      "format": "date-time"
    },
    "truth_boundary": {
      "type": "string",
      "minLength": 120
    },
    "counts": {
      "type": "object"
    },
    "public_lenses": {
      "type": "array",
      "minItems": 6,
      "items": {
        "type": "object"
      }
    },
    "profiles": {
      "type": "array",
      "minItems": 250,
      "items": {
        "type": "object",
        "required": [
          "entity_id",
          "name",
          "source_code",
          "source_entity_class",
          "source_region",
          "roadmap_country",
          "coverage_region",
          "roadmap_status",
          "published_fact_count",
          "available_lenses",
          "summary",
          "profile_url"
        ],
        "properties": {
          "entity_id": {
            "type": "string",
            "pattern": "^[a-z0-9-]+$"
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "source_code": {
            "type": "string",
            "minLength": 1
          },
          "source_entity_class": {
            "type": "string",
            "minLength": 1
          },
          "source_region": {
            "type": [
              "string",
              "null"
            ]
          },
          "roadmap_country": {
            "type": [
              "string",
              "null"
            ]
          },
          "coverage_region": {
            "type": [
              "string",
              "null"
            ]
          },
          "roadmap_status": {
            "enum": [
              "matched",
              "component",
              "additional"
            ]
          },
          "published_fact_count": {
            "type": "integer",
            "minimum": 1
          },
          "available_lenses": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "summary": {
            "type": "object"
          },
          "profile_url": {
            "type": "string",
            "pattern": "^/world-context/entities/[a-z0-9-]+\\.json$"
          }
        },
        "additionalProperties": false
      }
    }
  },
  "additionalProperties": false
}
