{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "verse numbering scheme",
  "description": "A numbering scheme as data: how a counting tradition assigns ordinal verse numbers to a surah's segments. A new tradition is a new file of this shape in numbering/, consumed by the same generic applier — never new code. See docs/numbering.md.",
  "type": "object",
  "required": [
    "id",
    "name",
    "source",
    "is_default",
    "rules"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "full_name": {
      "type": "string"
    },
    "source": {
      "type": "object",
      "description": "Bibliographic citation for the tradition."
    },
    "is_default": {
      "type": "boolean"
    },
    "note": {
      "type": "string"
    },
    "rules": {
      "type": "object",
      "required": [
        "order",
        "reset_per",
        "start_at",
        "counts"
      ],
      "properties": {
        "order": {
          "enum": [
            "textual"
          ]
        },
        "reset_per": {
          "enum": [
            "surah"
          ]
        },
        "start_at": {
          "type": "integer"
        },
        "counts": {
          "type": "object",
          "description": "segment kind -> whether this scheme counts it as a verse",
          "additionalProperties": {
            "type": "boolean"
          }
        }
      }
    }
  }
}
