{
  "type": "object",
  "properties": {
    "version": {
      "const": "wright.world/1",
      "type": "string"
    },
    "identity": {
      "type": "string"
    },
    "rooms": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "furnishing": {
            "type": "object",
            "properties": {
              "roomProgram": {
                "type": "object",
                "properties": {
                  "repair": {
                    "type": "object",
                    "properties": {
                      "stage": {
                        "const": "semantic",
                        "type": "string"
                      },
                      "attempts": {
                        "type": "number"
                      },
                      "strategy": {
                        "anyOf": [
                          {
                            "const": "none",
                            "type": "string"
                          },
                          {
                            "const": "bounded-semantic-revision",
                            "type": "string"
                          }
                        ]
                      },
                      "initialFailures": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "finalState": {
                        "const": "accepted",
                        "type": "string"
                      },
                      "relaxedConstraints": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    },
                    "required": [
                      "stage",
                      "attempts",
                      "strategy",
                      "initialFailures",
                      "finalState",
                      "relaxedConstraints"
                    ],
                    "additionalProperties": false
                  },
                  "enrichment": {
                    "type": "object",
                    "properties": {
                      "provider": {
                        "type": "string"
                      },
                      "model": {
                        "type": "string"
                      },
                      "version": {
                        "type": "string"
                      }
                    },
                    "required": ["provider", "model", "version"],
                    "additionalProperties": false
                  },
                  "intent": {
                    "type": "object",
                    "properties": {
                      "version": {
                        "const": "qway.room-program/1",
                        "type": "string"
                      },
                      "archetype": {
                        "type": "string"
                      },
                      "archetypeRevision": {
                        "type": "string"
                      },
                      "purpose": {
                        "type": "string"
                      },
                      "capacity": {
                        "type": "number"
                      },
                      "style": {
                        "type": "string"
                      },
                      "zones": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "reference": {
                              "type": "string"
                            },
                            "purpose": {
                              "type": "string"
                            },
                            "priority": {
                              "anyOf": [
                                {
                                  "const": "required",
                                  "type": "string"
                                },
                                {
                                  "const": "recommended",
                                  "type": "string"
                                },
                                {
                                  "const": "optional",
                                  "type": "string"
                                }
                              ]
                            }
                          },
                          "required": ["reference", "purpose", "priority"],
                          "additionalProperties": false
                        }
                      },
                      "needs": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "reference": {
                              "type": "string"
                            },
                            "category": {
                              "type": "string"
                            },
                            "zone": {
                              "type": "string"
                            },
                            "quantity": {
                              "type": "number"
                            },
                            "capacity": {
                              "anyOf": [
                                {
                                  "type": "null"
                                },
                                {
                                  "type": "number"
                                }
                              ]
                            },
                            "priority": {
                              "anyOf": [
                                {
                                  "const": "required",
                                  "type": "string"
                                },
                                {
                                  "const": "recommended",
                                  "type": "string"
                                },
                                {
                                  "const": "optional",
                                  "type": "string"
                                }
                              ]
                            },
                            "assetAlias": {
                              "anyOf": [
                                {
                                  "type": "null"
                                },
                                {
                                  "type": "string"
                                }
                              ]
                            },
                            "placement": {
                              "anyOf": [
                                {
                                  "const": "auto",
                                  "type": "string"
                                },
                                {
                                  "const": "center",
                                  "type": "string"
                                },
                                {
                                  "const": "perimeter",
                                  "type": "string"
                                }
                              ]
                            },
                            "evidence": {
                              "type": "object",
                              "properties": {
                                "origin": {
                                  "anyOf": [
                                    {
                                      "const": "explicit",
                                      "type": "string"
                                    },
                                    {
                                      "const": "archetype",
                                      "type": "string"
                                    },
                                    {
                                      "const": "inferred",
                                      "type": "string"
                                    }
                                  ]
                                },
                                "confidence": {
                                  "type": "number"
                                },
                                "explanation": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "origin",
                                "confidence",
                                "explanation"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "reference",
                            "category",
                            "zone",
                            "quantity",
                            "capacity",
                            "priority",
                            "assetAlias",
                            "placement",
                            "evidence"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "rules": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "reference": {
                              "type": "string"
                            },
                            "kind": {
                              "anyOf": [
                                {
                                  "const": "on",
                                  "type": "string"
                                },
                                {
                                  "const": "seating",
                                  "type": "string"
                                },
                                {
                                  "const": "beside",
                                  "type": "string"
                                },
                                {
                                  "const": "facing",
                                  "type": "string"
                                },
                                {
                                  "const": "near-window",
                                  "type": "string"
                                },
                                {
                                  "const": "wall-alignment",
                                  "type": "string"
                                },
                                {
                                  "const": "interior",
                                  "type": "string"
                                },
                                {
                                  "const": "access",
                                  "type": "string"
                                },
                                {
                                  "const": "visibility",
                                  "type": "string"
                                },
                                {
                                  "const": "clearance",
                                  "type": "string"
                                },
                                {
                                  "const": "circulation",
                                  "type": "string"
                                },
                                {
                                  "const": "minimum-dimensions",
                                  "type": "string"
                                },
                                {
                                  "const": "unsupported",
                                  "type": "string"
                                }
                              ]
                            },
                            "subjects": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "target": {
                              "anyOf": [
                                {
                                  "type": "null"
                                },
                                {
                                  "type": "string"
                                }
                              ]
                            },
                            "priority": {
                              "anyOf": [
                                {
                                  "const": "required",
                                  "type": "string"
                                },
                                {
                                  "const": "recommended",
                                  "type": "string"
                                },
                                {
                                  "const": "optional",
                                  "type": "string"
                                }
                              ]
                            },
                            "strength": {
                              "anyOf": [
                                {
                                  "const": "hard",
                                  "type": "string"
                                },
                                {
                                  "const": "soft",
                                  "type": "string"
                                }
                              ]
                            },
                            "clearanceM": {
                              "anyOf": [
                                {
                                  "type": "null"
                                },
                                {
                                  "type": "number"
                                }
                              ]
                            },
                            "description": {
                              "type": "string"
                            },
                            "evidence": {
                              "type": "object",
                              "properties": {
                                "origin": {
                                  "anyOf": [
                                    {
                                      "const": "explicit",
                                      "type": "string"
                                    },
                                    {
                                      "const": "archetype",
                                      "type": "string"
                                    },
                                    {
                                      "const": "inferred",
                                      "type": "string"
                                    }
                                  ]
                                },
                                "confidence": {
                                  "type": "number"
                                },
                                "explanation": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "origin",
                                "confidence",
                                "explanation"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "reference",
                            "kind",
                            "subjects",
                            "target",
                            "priority",
                            "strength",
                            "clearanceM",
                            "description",
                            "evidence"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "architecture": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "reference": {
                              "type": "string"
                            },
                            "kind": {
                              "anyOf": [
                                {
                                  "const": "window",
                                  "type": "string"
                                },
                                {
                                  "const": "portal",
                                  "type": "string"
                                },
                                {
                                  "const": "wall-run",
                                  "type": "string"
                                },
                                {
                                  "const": "open-center",
                                  "type": "string"
                                },
                                {
                                  "const": "natural-light",
                                  "type": "string"
                                },
                                {
                                  "const": "ceiling-light",
                                  "type": "string"
                                }
                              ]
                            },
                            "quantity": {
                              "type": "number"
                            },
                            "priority": {
                              "anyOf": [
                                {
                                  "const": "required",
                                  "type": "string"
                                },
                                {
                                  "const": "recommended",
                                  "type": "string"
                                },
                                {
                                  "const": "optional",
                                  "type": "string"
                                }
                              ]
                            },
                            "evidence": {
                              "type": "object",
                              "properties": {
                                "origin": {
                                  "anyOf": [
                                    {
                                      "const": "explicit",
                                      "type": "string"
                                    },
                                    {
                                      "const": "archetype",
                                      "type": "string"
                                    },
                                    {
                                      "const": "inferred",
                                      "type": "string"
                                    }
                                  ]
                                },
                                "confidence": {
                                  "type": "number"
                                },
                                "explanation": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "origin",
                                "confidence",
                                "explanation"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "reference",
                            "kind",
                            "quantity",
                            "priority",
                            "evidence"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "exclusions": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "category": {
                              "type": "string"
                            },
                            "evidence": {
                              "type": "object",
                              "properties": {
                                "origin": {
                                  "const": "explicit",
                                  "type": "string"
                                },
                                "confidence": {
                                  "type": "number"
                                },
                                "explanation": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "origin",
                                "confidence",
                                "explanation"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": ["category", "evidence"],
                          "additionalProperties": false
                        }
                      },
                      "uncertainties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    },
                    "required": [
                      "version",
                      "archetype",
                      "archetypeRevision",
                      "purpose",
                      "capacity",
                      "style",
                      "zones",
                      "needs",
                      "rules",
                      "architecture",
                      "exclusions",
                      "uncertainties"
                    ],
                    "additionalProperties": false
                  },
                  "archetypeSnapshot": {
                    "type": "object",
                    "properties": {
                      "version": {
                        "const": "qway.room-program/1",
                        "type": "string"
                      },
                      "archetype": {
                        "type": "string"
                      },
                      "archetypeRevision": {
                        "type": "string"
                      },
                      "purpose": {
                        "type": "string"
                      },
                      "capacity": {
                        "type": "number"
                      },
                      "style": {
                        "type": "string"
                      },
                      "zones": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "reference": {
                              "type": "string"
                            },
                            "purpose": {
                              "type": "string"
                            },
                            "priority": {
                              "anyOf": [
                                {
                                  "const": "required",
                                  "type": "string"
                                },
                                {
                                  "const": "recommended",
                                  "type": "string"
                                },
                                {
                                  "const": "optional",
                                  "type": "string"
                                }
                              ]
                            }
                          },
                          "required": ["reference", "purpose", "priority"],
                          "additionalProperties": false
                        }
                      },
                      "needs": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "reference": {
                              "type": "string"
                            },
                            "category": {
                              "type": "string"
                            },
                            "zone": {
                              "type": "string"
                            },
                            "quantity": {
                              "type": "number"
                            },
                            "capacity": {
                              "anyOf": [
                                {
                                  "type": "null"
                                },
                                {
                                  "type": "number"
                                }
                              ]
                            },
                            "priority": {
                              "anyOf": [
                                {
                                  "const": "required",
                                  "type": "string"
                                },
                                {
                                  "const": "recommended",
                                  "type": "string"
                                },
                                {
                                  "const": "optional",
                                  "type": "string"
                                }
                              ]
                            },
                            "assetAlias": {
                              "anyOf": [
                                {
                                  "type": "null"
                                },
                                {
                                  "type": "string"
                                }
                              ]
                            },
                            "placement": {
                              "anyOf": [
                                {
                                  "const": "auto",
                                  "type": "string"
                                },
                                {
                                  "const": "center",
                                  "type": "string"
                                },
                                {
                                  "const": "perimeter",
                                  "type": "string"
                                }
                              ]
                            },
                            "evidence": {
                              "type": "object",
                              "properties": {
                                "origin": {
                                  "anyOf": [
                                    {
                                      "const": "explicit",
                                      "type": "string"
                                    },
                                    {
                                      "const": "archetype",
                                      "type": "string"
                                    },
                                    {
                                      "const": "inferred",
                                      "type": "string"
                                    }
                                  ]
                                },
                                "confidence": {
                                  "type": "number"
                                },
                                "explanation": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "origin",
                                "confidence",
                                "explanation"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "reference",
                            "category",
                            "zone",
                            "quantity",
                            "capacity",
                            "priority",
                            "assetAlias",
                            "placement",
                            "evidence"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "rules": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "reference": {
                              "type": "string"
                            },
                            "kind": {
                              "anyOf": [
                                {
                                  "const": "on",
                                  "type": "string"
                                },
                                {
                                  "const": "seating",
                                  "type": "string"
                                },
                                {
                                  "const": "beside",
                                  "type": "string"
                                },
                                {
                                  "const": "facing",
                                  "type": "string"
                                },
                                {
                                  "const": "near-window",
                                  "type": "string"
                                },
                                {
                                  "const": "wall-alignment",
                                  "type": "string"
                                },
                                {
                                  "const": "interior",
                                  "type": "string"
                                },
                                {
                                  "const": "access",
                                  "type": "string"
                                },
                                {
                                  "const": "visibility",
                                  "type": "string"
                                },
                                {
                                  "const": "clearance",
                                  "type": "string"
                                },
                                {
                                  "const": "circulation",
                                  "type": "string"
                                },
                                {
                                  "const": "minimum-dimensions",
                                  "type": "string"
                                },
                                {
                                  "const": "unsupported",
                                  "type": "string"
                                }
                              ]
                            },
                            "subjects": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "target": {
                              "anyOf": [
                                {
                                  "type": "null"
                                },
                                {
                                  "type": "string"
                                }
                              ]
                            },
                            "priority": {
                              "anyOf": [
                                {
                                  "const": "required",
                                  "type": "string"
                                },
                                {
                                  "const": "recommended",
                                  "type": "string"
                                },
                                {
                                  "const": "optional",
                                  "type": "string"
                                }
                              ]
                            },
                            "strength": {
                              "anyOf": [
                                {
                                  "const": "hard",
                                  "type": "string"
                                },
                                {
                                  "const": "soft",
                                  "type": "string"
                                }
                              ]
                            },
                            "clearanceM": {
                              "anyOf": [
                                {
                                  "type": "null"
                                },
                                {
                                  "type": "number"
                                }
                              ]
                            },
                            "description": {
                              "type": "string"
                            },
                            "evidence": {
                              "type": "object",
                              "properties": {
                                "origin": {
                                  "anyOf": [
                                    {
                                      "const": "explicit",
                                      "type": "string"
                                    },
                                    {
                                      "const": "archetype",
                                      "type": "string"
                                    },
                                    {
                                      "const": "inferred",
                                      "type": "string"
                                    }
                                  ]
                                },
                                "confidence": {
                                  "type": "number"
                                },
                                "explanation": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "origin",
                                "confidence",
                                "explanation"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "reference",
                            "kind",
                            "subjects",
                            "target",
                            "priority",
                            "strength",
                            "clearanceM",
                            "description",
                            "evidence"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "architecture": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "reference": {
                              "type": "string"
                            },
                            "kind": {
                              "anyOf": [
                                {
                                  "const": "window",
                                  "type": "string"
                                },
                                {
                                  "const": "portal",
                                  "type": "string"
                                },
                                {
                                  "const": "wall-run",
                                  "type": "string"
                                },
                                {
                                  "const": "open-center",
                                  "type": "string"
                                },
                                {
                                  "const": "natural-light",
                                  "type": "string"
                                },
                                {
                                  "const": "ceiling-light",
                                  "type": "string"
                                }
                              ]
                            },
                            "quantity": {
                              "type": "number"
                            },
                            "priority": {
                              "anyOf": [
                                {
                                  "const": "required",
                                  "type": "string"
                                },
                                {
                                  "const": "recommended",
                                  "type": "string"
                                },
                                {
                                  "const": "optional",
                                  "type": "string"
                                }
                              ]
                            },
                            "evidence": {
                              "type": "object",
                              "properties": {
                                "origin": {
                                  "anyOf": [
                                    {
                                      "const": "explicit",
                                      "type": "string"
                                    },
                                    {
                                      "const": "archetype",
                                      "type": "string"
                                    },
                                    {
                                      "const": "inferred",
                                      "type": "string"
                                    }
                                  ]
                                },
                                "confidence": {
                                  "type": "number"
                                },
                                "explanation": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "origin",
                                "confidence",
                                "explanation"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "reference",
                            "kind",
                            "quantity",
                            "priority",
                            "evidence"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "exclusions": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "category": {
                              "type": "string"
                            },
                            "evidence": {
                              "type": "object",
                              "properties": {
                                "origin": {
                                  "const": "explicit",
                                  "type": "string"
                                },
                                "confidence": {
                                  "type": "number"
                                },
                                "explanation": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "origin",
                                "confidence",
                                "explanation"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": ["category", "evidence"],
                          "additionalProperties": false
                        }
                      },
                      "uncertainties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    },
                    "required": [
                      "version",
                      "archetype",
                      "archetypeRevision",
                      "purpose",
                      "capacity",
                      "style",
                      "zones",
                      "needs",
                      "rules",
                      "architecture",
                      "exclusions",
                      "uncertainties"
                    ],
                    "additionalProperties": false
                  },
                  "bindings": {
                    "type": "object",
                    "properties": {},
                    "required": [],
                    "additionalProperties": {
                      "type": "string"
                    }
                  }
                },
                "required": ["intent", "archetypeSnapshot", "bindings"],
                "additionalProperties": false
              },
              "version": {
                "const": "qway.furnishing/1",
                "type": "string"
              },
              "purpose": {
                "type": "string"
              },
              "capacity": {
                "type": "number"
              },
              "style": {
                "type": "string"
              },
              "needs": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "identity": {
                      "type": "string"
                    },
                    "category": {
                      "type": "string"
                    },
                    "quantity": {
                      "type": "number"
                    },
                    "capacity": {
                      "anyOf": [
                        {
                          "type": "null"
                        },
                        {
                          "type": "number"
                        }
                      ]
                    },
                    "assetAlias": {
                      "anyOf": [
                        {
                          "type": "null"
                        },
                        {
                          "type": "string"
                        }
                      ]
                    },
                    "placement": {
                      "anyOf": [
                        {
                          "const": "auto",
                          "type": "string"
                        },
                        {
                          "const": "center",
                          "type": "string"
                        },
                        {
                          "const": "perimeter",
                          "type": "string"
                        }
                      ]
                    },
                    "relation": {
                      "anyOf": [
                        {
                          "type": "null"
                        },
                        {
                          "const": "on",
                          "type": "string"
                        },
                        {
                          "const": "seating",
                          "type": "string"
                        },
                        {
                          "const": "near-window",
                          "type": "string"
                        }
                      ]
                    },
                    "target": {
                      "anyOf": [
                        {
                          "type": "null"
                        },
                        {
                          "type": "string"
                        }
                      ]
                    },
                    "instances": {
                      "type": "array",
                      "items": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "required": [
                    "identity",
                    "category",
                    "quantity",
                    "capacity",
                    "assetAlias",
                    "placement",
                    "relation",
                    "target",
                    "instances"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": ["version", "purpose", "capacity", "style", "needs"],
            "additionalProperties": false
          },
          "identity": {
            "type": "string"
          },
          "alias": {
            "type": "string",
            "maxLength": 100
          },
          "label": {
            "type": "string",
            "maxLength": 200
          },
          "level": {
            "anyOf": [
              {
                "type": "null"
              },
              {
                "type": "string"
              }
            ]
          },
          "parent": {
            "anyOf": [
              {
                "type": "null"
              },
              {
                "type": "string"
              }
            ]
          },
          "size": {
            "type": "array",
            "prefixItems": [
              {
                "type": "number"
              },
              {
                "type": "number"
              },
              {
                "type": "number"
              }
            ],
            "minItems": 3,
            "maxItems": 3,
            "items": false
          },
          "frame": {
            "type": "object",
            "properties": {
              "position": {
                "type": "array",
                "prefixItems": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "number"
                  }
                ],
                "minItems": 3,
                "maxItems": 3,
                "items": false
              },
              "quaternion": {
                "type": "array",
                "prefixItems": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "number"
                  }
                ],
                "minItems": 4,
                "maxItems": 4,
                "items": false
              }
            },
            "required": ["position", "quaternion"],
            "additionalProperties": false
          },
          "backdrop": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "identity": {
                    "type": "string"
                  },
                  "semantic": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "source": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "const": "image",
                            "type": "string"
                          },
                          "assetId": {
                            "type": "string"
                          },
                          "uri": {
                            "type": "string"
                          },
                          "mediaType": {
                            "anyOf": [
                              {
                                "const": "image/png",
                                "type": "string"
                              },
                              {
                                "const": "image/jpeg",
                                "type": "string"
                              },
                              {
                                "const": "image/webp",
                                "type": "string"
                              }
                            ]
                          },
                          "sha256": {
                            "type": "string"
                          },
                          "byteLength": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "kind",
                          "assetId",
                          "uri",
                          "mediaType",
                          "sha256",
                          "byteLength"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "const": "asset",
                            "type": "string"
                          },
                          "uri": {
                            "type": "null"
                          },
                          "assetId": {
                            "type": "string"
                          }
                        },
                        "required": ["kind", "uri", "assetId"],
                        "additionalProperties": false
                      }
                    ]
                  },
                  "side": {
                    "anyOf": [
                      {
                        "const": "north",
                        "type": "string"
                      },
                      {
                        "const": "south",
                        "type": "string"
                      },
                      {
                        "const": "east",
                        "type": "string"
                      },
                      {
                        "const": "west",
                        "type": "string"
                      }
                    ]
                  },
                  "mode": {
                    "const": "architectural",
                    "type": "string"
                  },
                  "fit": {
                    "anyOf": [
                      {
                        "const": "cover",
                        "type": "string"
                      },
                      {
                        "const": "contain",
                        "type": "string"
                      }
                    ]
                  },
                  "projection": {
                    "const": "flat",
                    "type": "string"
                  },
                  "distance": {
                    "type": "number"
                  },
                  "lighting": {
                    "anyOf": [
                      {
                        "const": "unlit",
                        "type": "string"
                      },
                      {
                        "const": "lit",
                        "type": "string"
                      }
                    ]
                  },
                  "enabled": {
                    "anyOf": [
                      {
                        "const": false,
                        "type": "boolean"
                      },
                      {
                        "const": true,
                        "type": "boolean"
                      }
                    ]
                  },
                  "materialId": {
                    "type": "string"
                  }
                },
                "required": [
                  "identity",
                  "semantic",
                  "source",
                  "side",
                  "mode",
                  "fit",
                  "projection",
                  "distance",
                  "lighting",
                  "enabled"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "north": {
                    "type": "object",
                    "properties": {
                      "identity": {
                        "type": "string"
                      },
                      "semantic": {
                        "type": "string",
                        "maxLength": 200
                      },
                      "source": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "const": "image",
                                "type": "string"
                              },
                              "assetId": {
                                "type": "string"
                              },
                              "uri": {
                                "type": "string"
                              },
                              "mediaType": {
                                "anyOf": [
                                  {
                                    "const": "image/png",
                                    "type": "string"
                                  },
                                  {
                                    "const": "image/jpeg",
                                    "type": "string"
                                  },
                                  {
                                    "const": "image/webp",
                                    "type": "string"
                                  }
                                ]
                              },
                              "sha256": {
                                "type": "string"
                              },
                              "byteLength": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "kind",
                              "assetId",
                              "uri",
                              "mediaType",
                              "sha256",
                              "byteLength"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "const": "asset",
                                "type": "string"
                              },
                              "uri": {
                                "type": "null"
                              },
                              "assetId": {
                                "type": "string"
                              }
                            },
                            "required": ["kind", "uri", "assetId"],
                            "additionalProperties": false
                          }
                        ]
                      },
                      "side": {
                        "anyOf": [
                          {
                            "const": "north",
                            "type": "string"
                          },
                          {
                            "const": "south",
                            "type": "string"
                          },
                          {
                            "const": "east",
                            "type": "string"
                          },
                          {
                            "const": "west",
                            "type": "string"
                          }
                        ]
                      },
                      "mode": {
                        "const": "architectural",
                        "type": "string"
                      },
                      "fit": {
                        "anyOf": [
                          {
                            "const": "cover",
                            "type": "string"
                          },
                          {
                            "const": "contain",
                            "type": "string"
                          }
                        ]
                      },
                      "projection": {
                        "const": "flat",
                        "type": "string"
                      },
                      "distance": {
                        "type": "number"
                      },
                      "lighting": {
                        "anyOf": [
                          {
                            "const": "unlit",
                            "type": "string"
                          },
                          {
                            "const": "lit",
                            "type": "string"
                          }
                        ]
                      },
                      "enabled": {
                        "anyOf": [
                          {
                            "const": false,
                            "type": "boolean"
                          },
                          {
                            "const": true,
                            "type": "boolean"
                          }
                        ]
                      },
                      "materialId": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "identity",
                      "semantic",
                      "source",
                      "side",
                      "mode",
                      "fit",
                      "projection",
                      "distance",
                      "lighting",
                      "enabled"
                    ],
                    "additionalProperties": false
                  },
                  "south": {
                    "type": "object",
                    "properties": {
                      "identity": {
                        "type": "string"
                      },
                      "semantic": {
                        "type": "string",
                        "maxLength": 200
                      },
                      "source": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "const": "image",
                                "type": "string"
                              },
                              "assetId": {
                                "type": "string"
                              },
                              "uri": {
                                "type": "string"
                              },
                              "mediaType": {
                                "anyOf": [
                                  {
                                    "const": "image/png",
                                    "type": "string"
                                  },
                                  {
                                    "const": "image/jpeg",
                                    "type": "string"
                                  },
                                  {
                                    "const": "image/webp",
                                    "type": "string"
                                  }
                                ]
                              },
                              "sha256": {
                                "type": "string"
                              },
                              "byteLength": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "kind",
                              "assetId",
                              "uri",
                              "mediaType",
                              "sha256",
                              "byteLength"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "const": "asset",
                                "type": "string"
                              },
                              "uri": {
                                "type": "null"
                              },
                              "assetId": {
                                "type": "string"
                              }
                            },
                            "required": ["kind", "uri", "assetId"],
                            "additionalProperties": false
                          }
                        ]
                      },
                      "side": {
                        "anyOf": [
                          {
                            "const": "north",
                            "type": "string"
                          },
                          {
                            "const": "south",
                            "type": "string"
                          },
                          {
                            "const": "east",
                            "type": "string"
                          },
                          {
                            "const": "west",
                            "type": "string"
                          }
                        ]
                      },
                      "mode": {
                        "const": "architectural",
                        "type": "string"
                      },
                      "fit": {
                        "anyOf": [
                          {
                            "const": "cover",
                            "type": "string"
                          },
                          {
                            "const": "contain",
                            "type": "string"
                          }
                        ]
                      },
                      "projection": {
                        "const": "flat",
                        "type": "string"
                      },
                      "distance": {
                        "type": "number"
                      },
                      "lighting": {
                        "anyOf": [
                          {
                            "const": "unlit",
                            "type": "string"
                          },
                          {
                            "const": "lit",
                            "type": "string"
                          }
                        ]
                      },
                      "enabled": {
                        "anyOf": [
                          {
                            "const": false,
                            "type": "boolean"
                          },
                          {
                            "const": true,
                            "type": "boolean"
                          }
                        ]
                      },
                      "materialId": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "identity",
                      "semantic",
                      "source",
                      "side",
                      "mode",
                      "fit",
                      "projection",
                      "distance",
                      "lighting",
                      "enabled"
                    ],
                    "additionalProperties": false
                  },
                  "east": {
                    "type": "object",
                    "properties": {
                      "identity": {
                        "type": "string"
                      },
                      "semantic": {
                        "type": "string",
                        "maxLength": 200
                      },
                      "source": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "const": "image",
                                "type": "string"
                              },
                              "assetId": {
                                "type": "string"
                              },
                              "uri": {
                                "type": "string"
                              },
                              "mediaType": {
                                "anyOf": [
                                  {
                                    "const": "image/png",
                                    "type": "string"
                                  },
                                  {
                                    "const": "image/jpeg",
                                    "type": "string"
                                  },
                                  {
                                    "const": "image/webp",
                                    "type": "string"
                                  }
                                ]
                              },
                              "sha256": {
                                "type": "string"
                              },
                              "byteLength": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "kind",
                              "assetId",
                              "uri",
                              "mediaType",
                              "sha256",
                              "byteLength"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "const": "asset",
                                "type": "string"
                              },
                              "uri": {
                                "type": "null"
                              },
                              "assetId": {
                                "type": "string"
                              }
                            },
                            "required": ["kind", "uri", "assetId"],
                            "additionalProperties": false
                          }
                        ]
                      },
                      "side": {
                        "anyOf": [
                          {
                            "const": "north",
                            "type": "string"
                          },
                          {
                            "const": "south",
                            "type": "string"
                          },
                          {
                            "const": "east",
                            "type": "string"
                          },
                          {
                            "const": "west",
                            "type": "string"
                          }
                        ]
                      },
                      "mode": {
                        "const": "architectural",
                        "type": "string"
                      },
                      "fit": {
                        "anyOf": [
                          {
                            "const": "cover",
                            "type": "string"
                          },
                          {
                            "const": "contain",
                            "type": "string"
                          }
                        ]
                      },
                      "projection": {
                        "const": "flat",
                        "type": "string"
                      },
                      "distance": {
                        "type": "number"
                      },
                      "lighting": {
                        "anyOf": [
                          {
                            "const": "unlit",
                            "type": "string"
                          },
                          {
                            "const": "lit",
                            "type": "string"
                          }
                        ]
                      },
                      "enabled": {
                        "anyOf": [
                          {
                            "const": false,
                            "type": "boolean"
                          },
                          {
                            "const": true,
                            "type": "boolean"
                          }
                        ]
                      },
                      "materialId": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "identity",
                      "semantic",
                      "source",
                      "side",
                      "mode",
                      "fit",
                      "projection",
                      "distance",
                      "lighting",
                      "enabled"
                    ],
                    "additionalProperties": false
                  },
                  "west": {
                    "type": "object",
                    "properties": {
                      "identity": {
                        "type": "string"
                      },
                      "semantic": {
                        "type": "string",
                        "maxLength": 200
                      },
                      "source": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "const": "image",
                                "type": "string"
                              },
                              "assetId": {
                                "type": "string"
                              },
                              "uri": {
                                "type": "string"
                              },
                              "mediaType": {
                                "anyOf": [
                                  {
                                    "const": "image/png",
                                    "type": "string"
                                  },
                                  {
                                    "const": "image/jpeg",
                                    "type": "string"
                                  },
                                  {
                                    "const": "image/webp",
                                    "type": "string"
                                  }
                                ]
                              },
                              "sha256": {
                                "type": "string"
                              },
                              "byteLength": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "kind",
                              "assetId",
                              "uri",
                              "mediaType",
                              "sha256",
                              "byteLength"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "const": "asset",
                                "type": "string"
                              },
                              "uri": {
                                "type": "null"
                              },
                              "assetId": {
                                "type": "string"
                              }
                            },
                            "required": ["kind", "uri", "assetId"],
                            "additionalProperties": false
                          }
                        ]
                      },
                      "side": {
                        "anyOf": [
                          {
                            "const": "north",
                            "type": "string"
                          },
                          {
                            "const": "south",
                            "type": "string"
                          },
                          {
                            "const": "east",
                            "type": "string"
                          },
                          {
                            "const": "west",
                            "type": "string"
                          }
                        ]
                      },
                      "mode": {
                        "const": "architectural",
                        "type": "string"
                      },
                      "fit": {
                        "anyOf": [
                          {
                            "const": "cover",
                            "type": "string"
                          },
                          {
                            "const": "contain",
                            "type": "string"
                          }
                        ]
                      },
                      "projection": {
                        "const": "flat",
                        "type": "string"
                      },
                      "distance": {
                        "type": "number"
                      },
                      "lighting": {
                        "anyOf": [
                          {
                            "const": "unlit",
                            "type": "string"
                          },
                          {
                            "const": "lit",
                            "type": "string"
                          }
                        ]
                      },
                      "enabled": {
                        "anyOf": [
                          {
                            "const": false,
                            "type": "boolean"
                          },
                          {
                            "const": true,
                            "type": "boolean"
                          }
                        ]
                      },
                      "materialId": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "identity",
                      "semantic",
                      "source",
                      "side",
                      "mode",
                      "fit",
                      "projection",
                      "distance",
                      "lighting",
                      "enabled"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [],
                "additionalProperties": false
              }
            ]
          }
        },
        "required": [
          "identity",
          "alias",
          "label",
          "level",
          "parent",
          "size",
          "frame"
        ],
        "additionalProperties": false
      }
    },
    "levels": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "identity": {
            "type": "string"
          },
          "label": {
            "type": "string"
          }
        },
        "required": ["identity", "label"],
        "additionalProperties": false
      }
    },
    "portals": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "identity": {
            "type": "string"
          },
          "alias": {
            "type": "string",
            "maxLength": 100
          },
          "from": {
            "type": "string"
          },
          "to": {
            "type": "string"
          },
          "frame": {
            "type": "object",
            "properties": {
              "position": {
                "type": "array",
                "prefixItems": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "number"
                  }
                ],
                "minItems": 3,
                "maxItems": 3,
                "items": false
              },
              "quaternion": {
                "type": "array",
                "prefixItems": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "number"
                  }
                ],
                "minItems": 4,
                "maxItems": 4,
                "items": false
              }
            },
            "required": ["position", "quaternion"],
            "additionalProperties": false
          },
          "width": {
            "type": "number"
          },
          "height": {
            "type": "number"
          },
          "traversable": {
            "anyOf": [
              {
                "const": false,
                "type": "boolean"
              },
              {
                "const": true,
                "type": "boolean"
              }
            ]
          },
          "door": {
            "anyOf": [
              {
                "type": "null"
              },
              {
                "type": "string"
              }
            ]
          }
        },
        "required": [
          "identity",
          "alias",
          "from",
          "to",
          "frame",
          "width",
          "height",
          "traversable",
          "door"
        ],
        "additionalProperties": false
      }
    },
    "entrances": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "identity": {
            "type": "string"
          },
          "alias": {
            "type": "string",
            "maxLength": 100
          },
          "room": {
            "type": "string"
          },
          "frame": {
            "type": "object",
            "properties": {
              "position": {
                "type": "array",
                "prefixItems": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "number"
                  }
                ],
                "minItems": 3,
                "maxItems": 3,
                "items": false
              },
              "quaternion": {
                "type": "array",
                "prefixItems": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "number"
                  }
                ],
                "minItems": 4,
                "maxItems": 4,
                "items": false
              }
            },
            "required": ["position", "quaternion"],
            "additionalProperties": false
          },
          "width": {
            "type": "number"
          },
          "height": {
            "type": "number"
          },
          "traversable": {
            "anyOf": [
              {
                "const": false,
                "type": "boolean"
              },
              {
                "const": true,
                "type": "boolean"
              }
            ]
          },
          "door": {
            "anyOf": [
              {
                "type": "null"
              },
              {
                "type": "string"
              }
            ]
          }
        },
        "required": [
          "identity",
          "alias",
          "room",
          "frame",
          "width",
          "height",
          "traversable",
          "door"
        ],
        "additionalProperties": false
      }
    },
    "membership": {
      "type": "object",
      "properties": {},
      "required": [],
      "additionalProperties": {
        "type": "string"
      }
    }
  },
  "required": [
    "version",
    "identity",
    "rooms",
    "levels",
    "portals",
    "membership"
  ],
  "additionalProperties": false
}
