{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://design-frontier.dev/schemas/reference.schema.json",
  "title": "Design Frontier Catalog Reference",
  "type": "object",
  "required": [
    "id",
    "name",
    "kind",
    "status",
    "last_reviewed",
    "summary",
    "covers_layers",
    "recommended_for",
    "avoid_for",
    "boundaries",
    "evidence"
  ],
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^[a-z0-9-]+$"
    },
    "name": {
      "type": "string",
      "minLength": 1
    },
    "kind": {
      "enum": [
        "brand",
        "framework",
        "design-system",
        "pattern"
      ]
    },
    "status": {
      "enum": [
        "draft",
        "reviewed",
        "deprecated"
      ]
    },
    "official_design_system": {
      "type": "boolean"
    },
    "last_reviewed": {
      "type": "string",
      "format": "date"
    },
    "summary": {
      "type": "string",
      "minLength": 1
    },
    "covers_layers": {
      "type": "object",
      "propertyNames": {
        "enum": [
          "brand",
          "typography",
          "layout",
          "application_shell",
          "navigation",
          "density",
          "tables",
          "forms",
          "data_visualization",
          "feedback",
          "marketing_site",
          "documentation",
          "accessibility",
          "motion",
          "mobile"
        ]
      },
      "additionalProperties": {
        "type": "number",
        "minimum": 0,
        "maximum": 1
      }
    },
    "recommended_for": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "avoid_for": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "boundaries": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "string",
        "minLength": 1
      }
    },
    "implementation_notes": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "traits": {
      "type": "object",
      "additionalProperties": {
        "oneOf": [
          {
            "type": "string"
          },
          {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        ]
      }
    },
    "evidence": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "required": [
          "title",
          "url",
          "type"
        ],
        "properties": {
          "title": {
            "type": "string",
            "minLength": 1
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "type": {
            "enum": [
              "primary",
              "secondary"
            ]
          }
        },
        "additionalProperties": false
      }
    },
    "recipes": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "brand": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "principles": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "requirements": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "prohibitions": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "components": {
              "type": "object",
              "additionalProperties": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "metrics": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  }
                ]
              }
            }
          }
        },
        "typography": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "principles": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "requirements": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "prohibitions": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "components": {
              "type": "object",
              "additionalProperties": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "metrics": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  }
                ]
              }
            }
          }
        },
        "layout": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "principles": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "requirements": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "prohibitions": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "components": {
              "type": "object",
              "additionalProperties": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "metrics": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  }
                ]
              }
            }
          }
        },
        "application_shell": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "principles": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "requirements": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "prohibitions": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "components": {
              "type": "object",
              "additionalProperties": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "metrics": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  }
                ]
              }
            }
          }
        },
        "navigation": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "principles": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "requirements": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "prohibitions": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "components": {
              "type": "object",
              "additionalProperties": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "metrics": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  }
                ]
              }
            }
          }
        },
        "density": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "principles": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "requirements": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "prohibitions": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "components": {
              "type": "object",
              "additionalProperties": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "metrics": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  }
                ]
              }
            }
          }
        },
        "tables": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "principles": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "requirements": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "prohibitions": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "components": {
              "type": "object",
              "additionalProperties": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "metrics": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  }
                ]
              }
            }
          }
        },
        "forms": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "principles": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "requirements": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "prohibitions": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "components": {
              "type": "object",
              "additionalProperties": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "metrics": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  }
                ]
              }
            }
          }
        },
        "data_visualization": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "principles": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "requirements": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "prohibitions": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "components": {
              "type": "object",
              "additionalProperties": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "metrics": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  }
                ]
              }
            }
          }
        },
        "feedback": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "principles": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "requirements": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "prohibitions": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "components": {
              "type": "object",
              "additionalProperties": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "metrics": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  }
                ]
              }
            }
          }
        },
        "marketing_site": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "principles": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "requirements": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "prohibitions": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "components": {
              "type": "object",
              "additionalProperties": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "metrics": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  }
                ]
              }
            }
          }
        },
        "documentation": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "principles": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "requirements": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "prohibitions": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "components": {
              "type": "object",
              "additionalProperties": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "metrics": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  }
                ]
              }
            }
          }
        },
        "accessibility": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "principles": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "requirements": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "prohibitions": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "components": {
              "type": "object",
              "additionalProperties": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "metrics": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  }
                ]
              }
            }
          }
        },
        "motion": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "principles": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "requirements": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "prohibitions": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "components": {
              "type": "object",
              "additionalProperties": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "metrics": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  }
                ]
              }
            }
          }
        },
        "mobile": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "principles": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "requirements": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "prohibitions": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "components": {
              "type": "object",
              "additionalProperties": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "metrics": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  }
                ]
              }
            }
          }
        }
      }
    }
  },
  "additionalProperties": false
}
