{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://iarpg.com/world-context-2025.schema.json",
  "title": "IARPG World Context Atlas — 2025 archival snapshot",
  "type": "object",
  "required": [
    "$schema",
    "id",
    "release",
    "version",
    "status",
    "updated_utc",
    "title",
    "purpose",
    "truth_boundary",
    "source",
    "fairness_rules",
    "public_lenses",
    "counts",
    "source_categories",
    "code_collisions",
    "field_availability",
    "roadmap_coverage",
    "profiles"
  ],
  "properties": {
    "$schema": {
      "const": "https://iarpg.com/world-context-2025.schema.json"
    },
    "id": {
      "const": "https://iarpg.com/world-context-2025.json"
    },
    "release": {
      "const": "IARPG-OPS-2"
    },
    "version": {
      "const": "2.0.21-wip"
    },
    "status": {
      "const": "work-in-progress-archival-context-dataset"
    },
    "updated_utc": {
      "type": "string",
      "format": "date-time"
    },
    "title": {
      "type": "string",
      "minLength": 1
    },
    "purpose": {
      "type": "string",
      "minLength": 80
    },
    "truth_boundary": {
      "type": "string",
      "minLength": 120
    },
    "source": {
      "type": "object"
    },
    "fairness_rules": {
      "type": "array",
      "minItems": 8,
      "items": {
        "type": "string"
      }
    },
    "public_lenses": {
      "type": "array",
      "minItems": 6,
      "items": {
        "type": "object"
      }
    },
    "counts": {
      "type": "object"
    },
    "source_categories": {
      "type": "object",
      "additionalProperties": {
        "type": "integer",
        "minimum": 0
      }
    },
    "code_collisions": {
      "type": "array",
      "items": {
        "type": "object"
      }
    },
    "field_availability": {
      "type": "object",
      "additionalProperties": {
        "type": "integer",
        "minimum": 0
      }
    },
    "roadmap_coverage": {
      "type": "array",
      "minItems": 195,
      "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",
          "profile_status",
          "source_row_count",
          "published_fact_count",
          "available_lenses",
          "summary",
          "facts",
          "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"
            ]
          },
          "profile_status": {
            "const": "archival-context-not-current-assessment"
          },
          "source_row_count": {
            "type": "integer",
            "minimum": 1
          },
          "published_fact_count": {
            "type": "integer",
            "minimum": 1
          },
          "available_lenses": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "summary": {
            "type": "object"
          },
          "facts": {
            "type": "object",
            "additionalProperties": {
              "type": "object",
              "required": [
                "id",
                "label",
                "category",
                "lens",
                "content",
                "display",
                "source_field"
              ],
              "properties": {
                "id": {
                  "type": "string",
                  "pattern": "^[a-z0-9_]+$"
                },
                "label": {
                  "type": "string",
                  "minLength": 1
                },
                "category": {
                  "type": "string",
                  "minLength": 1
                },
                "lens": {
                  "enum": [
                    "place",
                    "place",
                    "place",
                    "place",
                    "place",
                    "place",
                    "place",
                    "place",
                    "place",
                    "place",
                    "place",
                    "people",
                    "people",
                    "people",
                    "people",
                    "people",
                    "people",
                    "people",
                    "people",
                    "people",
                    "people",
                    "institutions",
                    "institutions",
                    "institutions",
                    "institutions",
                    "institutions",
                    "institutions",
                    "institutions",
                    "economy",
                    "economy",
                    "economy",
                    "economy",
                    "economy",
                    "economy",
                    "economy",
                    "economy",
                    "economy",
                    "economy",
                    "infrastructure",
                    "infrastructure",
                    "infrastructure",
                    "infrastructure",
                    "infrastructure",
                    "infrastructure",
                    "infrastructure",
                    "infrastructure",
                    "infrastructure",
                    "environment",
                    "environment",
                    "environment",
                    "environment",
                    "environment"
                  ]
                },
                "content": {
                  "type": "string",
                  "minLength": 1
                },
                "display": {
                  "type": "string",
                  "minLength": 1
                },
                "source_field": {
                  "type": "string",
                  "minLength": 1
                },
                "value": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "estimate_year": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "minimum": 1800,
                  "maximum": 2100
                }
              },
              "additionalProperties": false
            }
          },
          "profile_url": {
            "type": "string",
            "pattern": "^/world-context/entities/[a-z0-9-]+\\.json$"
          }
        },
        "additionalProperties": false
      }
    }
  },
  "additionalProperties": false
}
