{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/clment-com/json-schema/clment-com-rulebook-schema.json",
  "title": "Rulebook",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/clment-com-rulebooks-api-openapi.yml#/components/schemas/Rulebook",
  "type": "object",
  "required": [
    "id",
    "name",
    "description",
    "instructions",
    "status",
    "version",
    "tags",
    "createdAt",
    "updatedAt"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "description": {
      "type": [
        "string",
        "null"
      ]
    },
    "instructions": {
      "type": "string"
    },
    "status": {
      "$ref": "#/$defs/RulebookStatus"
    },
    "version": {
      "type": "integer"
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time"
    }
  },
  "$defs": {
    "RulebookStatus": {
      "type": "string",
      "description": "Whether a rulebook is a working draft or available to run reviews against.",
      "enum": [
        "draft",
        "published"
      ]
    }
  }
}