{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.mdc-berlin.de/system/files/document/mdc-ai-brand.schema.json",
  "title": "Max Delbrück Center AI Brand Layer",
  "type": "object",
  "required": [
    "metadata",
    "naming",
    "tokens",
    "assets",
    "usage_rules",
    "templates",
    "ai_guidelines"
  ],
  "properties": {
    "$schema": {
      "type": "string",
      "format": "uri",
      "pattern": "^https?://"
    },
    "metadata": {
      "type": "object",
      "required": [
        "name",
        "schema_version",
        "brand_version",
        "status",
        "last_updated",
        "guideline_page_url",
        "machine_readable_files",
        "support_contact"
      ],
      "properties": {
        "status": {
          "enum": [
            "draft_for_internal_review",
            "active",
            "deprecated"
          ]
        },
        "last_updated": {
          "type": "string",
          "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
        },
        "brand_version": {
          "type": "string",
          "pattern": "^\\d+\\.\\d+(\\.\\d+)?$"
        },
        "guideline_page_url": {
          "type": "string",
          "format": "uri",
          "pattern": "^https?://"
        }
      }
    },
    "naming": {
      "type": "object",
      "required": [
        "short_name",
        "forbidden"
      ],
      "properties": {
        "short_name": {
          "const": "Max Delbrück Center"
        }
      }
    },
    "tokens": {
      "type": "object",
      "required": [
        "colors",
        "typography"
      ],
      "properties": {
        "colors": {
          "type": "object",
          "required": [
            "primary",
            "secondary",
            "neutral"
          ],
          "properties": {
            "primary": {
              "type": "object",
              "minProperties": 3,
              "additionalProperties": {
                "type": "object",
                "required": [
                  "name",
                  "hex",
                  "rgb"
                ],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "hex": {
                    "type": "string",
                    "pattern": "^#[0-9A-F]{6}$"
                  },
                  "rgb": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 255
                    },
                    "minItems": 3,
                    "maxItems": 3
                  }
                }
              }
            },
            "secondary": {
              "type": "object",
              "minProperties": 6,
              "additionalProperties": {
                "type": "object",
                "required": [
                  "name",
                  "hex",
                  "rgb"
                ],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "hex": {
                    "type": "string",
                    "pattern": "^#[0-9A-F]{6}$"
                  },
                  "rgb": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 255
                    },
                    "minItems": 3,
                    "maxItems": 3
                  }
                }
              }
            },
            "neutral": {
              "type": "object",
              "required": [
                "white"
              ],
              "additionalProperties": {
                "type": "object",
                "required": [
                  "name",
                  "hex",
                  "rgb"
                ],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "hex": {
                    "type": "string",
                    "pattern": "^#[0-9A-F]{6}$"
                  },
                  "rgb": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 255
                    },
                    "minItems": 3,
                    "maxItems": 3
                  }
                }
              }
            }
          }
        },
        "typography": {
          "type": "object",
          "required": [
            "standard",
            "highlight",
            "fallback",
            "fallback_chain"
          ],
          "properties": {
            "standard": {
              "type": "object",
              "required": [
                "family"
              ]
            },
            "highlight": {
              "type": "object",
              "required": [
                "family",
                "license",
                "never_for"
              ]
            },
            "fallback": {
              "type": "object",
              "required": [
                "family"
              ]
            },
            "fallback_chain": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "minItems": 2
            }
          }
        }
      }
    },
    "assets": {
      "type": "object",
      "required": [
        "logo",
        "claim",
        "sub_brands"
      ],
      "properties": {
        "logo": {
          "type": "object",
          "required": [
            "files",
            "allow_modification",
            "clear_space",
            "size",
            "forbidden_actions"
          ],
          "properties": {
            "allow_modification": {
              "const": false
            },
            "files": {
              "type": "array",
              "minItems": 3,
              "items": {
                "type": "object",
                "required": [
                  "id",
                  "role",
                  "svg",
                  "png"
                ],
                "properties": {
                  "svg": {
                    "type": "string",
                    "format": "uri",
                    "pattern": "^https?://"
                  },
                  "png": {
                    "type": "string",
                    "format": "uri",
                    "pattern": "^https?://"
                  }
                }
              }
            },
            "forbidden_actions": {
              "type": "array",
              "minItems": 5,
              "items": {
                "type": "string"
              }
            }
          }
        },
        "claim": {
          "type": "object",
          "required": [
            "text",
            "language"
          ],
          "properties": {
            "text": {
              "const": "Discovery for tomorrow's medicine"
            },
            "language": {
              "const": "en"
            }
          }
        }
      }
    },
    "usage_rules": {
      "type": "object",
      "required": [
        "color",
        "accessibility",
        "typography_roles",
        "layout"
      ]
    },
    "templates": {
      "type": "object",
      "required": [
        "presentation"
      ]
    },
    "ai_guidelines": {
      "type": "object",
      "required": [
        "always",
        "never",
        "delivery_checklist",
        "role_prompts"
      ],
      "properties": {
        "role_prompts": {
          "type": "object",
          "required": [
            "presentation",
            "document",
            "social_media_and_web",
            "image_generation"
          ],
          "additionalProperties": {
            "type": "string"
          }
        },
        "delivery_checklist": {
          "type": "array",
          "minItems": 5,
          "items": {
            "type": "string"
          }
        }
      }
    }
  }
}
