{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "macro_civilizations.schema.json",
  "title": "Macro Civilizations Taxonomy v2 (hyper-detailed, B_doc <-> B_vec hinge)",
  "type": "object",
  "required": ["version", "policy", "bibliography", "civilizations"],
  "properties": {
    "version": { "type": "string" },
    "applicable_unit_types": {
      "type": "array",
      "items": { "type": "string", "enum": ["state", "adm1"] }
    },
    "policy": {
      "type": "object",
      "properties": {
        "raw_vector_is_source_of_truth": { "type": "boolean" },
        "normalized_vector_visualization_only": { "type": "boolean" },
        "adm1_subdivision_required_later": { "type": "boolean" },
        "two_bases_coupled": { "type": "boolean" }
      }
    },
    "bibliography": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["id", "type", "citation"],
        "properties": {
          "id": { "type": "string" },
          "type": { "type": "string", "enum": ["book", "article", "dataset", "chapter", "report"] },
          "citation": { "type": "string" },
          "url": { "type": ["string", "null"] },
          "license": { "type": ["string", "null"] }
        }
      }
    },
    "civilizations": {
      "type": "array",
      "minItems": 11,
      "maxItems": 11,
      "items": {
        "type": "object",
        "required": [
          "id",
          "label",
          "short_description",
          "long_description",
          "huntington_label",
          "iw_clusters",
          "hofstede_archetype_states",
          "member_states",
          "sub_clusters",
          "ambiguous_cases",
          "citation_ids",
          "low_archetype_coverage",
          "extension_to_huntington"
        ],
        "properties": {
          "id": { "type": "string" },
          "label": { "type": "string" },
          "short_description": { "type": "string" },
          "long_description": { "type": "string" },
          "huntington_label": { "type": ["string", "null"] },
          "huntington_page_refs": { "type": "array", "items": { "type": "string" } },
          "iw_clusters": { "type": "array", "items": { "type": "string" } },
          "iw_quadrant": { "type": ["string", "null"] },
          "hofstede_archetype_states": {
            "type": "array",
            "items": { "type": "string", "minLength": 3, "maxLength": 3 }
          },
          "hofstede_typical_range": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "minItems": 2,
              "maxItems": 2,
              "items": { "type": "number" }
            }
          },
          "member_states": {
            "type": "array",
            "items": {
              "type": "object",
              "required": ["iso3", "role", "rationale", "citation_ids"],
              "properties": {
                "iso3": { "type": "string", "minLength": 3, "maxLength": 3 },
                "role": { "type": "string", "enum": ["core", "periphery", "ambiguous", "interface"] },
                "rationale": { "type": "string" },
                "citation_ids": { "type": "array", "items": { "type": "string" } }
              }
            }
          },
          "sub_clusters": {
            "type": "array",
            "items": {
              "type": "object",
              "required": ["id", "label", "states"],
              "properties": {
                "id": { "type": "string" },
                "label": { "type": "string" },
                "states": { "type": "array", "items": { "type": "string" } },
                "citation_ids": { "type": "array", "items": { "type": "string" } }
              }
            }
          },
          "ambiguous_cases": {
            "type": "array",
            "items": {
              "type": "object",
              "required": ["iso3", "civilizations_competing", "discussion"],
              "properties": {
                "iso3": { "type": "string" },
                "civilizations_competing": { "type": "array", "items": { "type": "string" } },
                "discussion": { "type": "string" },
                "citation_ids": { "type": "array", "items": { "type": "string" } }
              }
            }
          },
          "sources": {
            "type": "array",
            "items": { "type": "string" }
          },
          "citation_ids": {
            "type": "array",
            "minItems": 1,
            "items": { "type": "string" }
          },
          "mu_viz": {
            "type": "array",
            "minItems": 2,
            "maxItems": 2,
            "items": { "type": "number" }
          },
          "sigma_viz": {
            "type": "array",
            "minItems": 2,
            "maxItems": 2,
            "items": {
              "type": "array",
              "minItems": 2,
              "maxItems": 2,
              "items": { "type": "number" }
            }
          },
          "mu_score": {
            "type": "array",
            "minItems": 6,
            "maxItems": 6,
            "items": { "type": "number", "minimum": 0, "maximum": 100 }
          },
          "sigma_score": {
            "type": "array",
            "minItems": 6,
            "maxItems": 6,
            "items": { "type": "number", "minimum": 0 }
          },
          "low_archetype_coverage": { "type": "boolean" },
          "extension_to_huntington": { "type": "boolean" }
        }
      }
    }
  }
}
