{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Q10 citation_check input schema",
  "description": "Strict input shape. Blank templates are preparation scaffolds, not runnable inputs.",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "draft_version",
    "citations",
    "sources",
    "source_pages"
  ],
  "properties": {
    "draft_version": {
      "type": "string",
      "minLength": 1
    },
    "citations": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "citation_id",
          "draft_locator",
          "source_id",
          "cited_reference",
          "cited_page_label",
          "quoted_text",
          "has_editorial_changes"
        ],
        "properties": {
          "citation_id": {
            "type": "string",
            "minLength": 1
          },
          "draft_locator": {
            "type": "string",
            "minLength": 1
          },
          "source_id": {
            "type": "string",
            "minLength": 1
          },
          "cited_reference": {
            "type": "string"
          },
          "cited_page_label": {
            "type": "string",
            "minLength": 1
          },
          "quoted_text": {
            "type": "string"
          },
          "has_editorial_changes": {
            "type": "boolean"
          }
        }
      }
    },
    "sources": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "source_id",
          "canonical_reference",
          "verified_source_url",
          "reviewer_verified"
        ],
        "properties": {
          "source_id": {
            "type": "string",
            "minLength": 1
          },
          "canonical_reference": {
            "type": "string"
          },
          "verified_source_url": {
            "type": "string"
          },
          "reviewer_verified": {
            "type": "boolean"
          }
        }
      }
    },
    "source_pages": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "source_id",
          "page_label",
          "pdf_page_1based",
          "text",
          "text_visually_verified"
        ],
        "properties": {
          "source_id": {
            "type": "string",
            "minLength": 1
          },
          "page_label": {
            "type": "string",
            "minLength": 1
          },
          "pdf_page_1based": {
            "type": "integer",
            "minimum": 1
          },
          "text": {
            "type": "string"
          },
          "text_visually_verified": {
            "type": "boolean"
          }
        }
      }
    }
  }
}
