{
  "type": "object",
  "properties": {
    "schema_version": {
      "type": "integer",
      "const": 1
    },
    "synthetic": {
      "type": "boolean"
    },
    "as_of": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      "description": "Real UTC calendar date, YYYY-MM-DD, from 1900 through 2199."
    },
    "contracts": {
      "type": "array",
      "minItems": 1,
      "maxItems": 12,
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "vendor": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "owner": {
            "type": "string",
            "maxLength": 1000
          },
          "backup_owner": {
            "type": "string",
            "maxLength": 1000
          },
          "reviewer": {
            "type": "string",
            "maxLength": 1000
          },
          "source_ref": {
            "type": "string",
            "maxLength": 1000,
            "description": "Controlling document version, clause and reviewed amendment references."
          },
          "clause_text": {
            "type": "string",
            "maxLength": 1000
          },
          "reviewed": {
            "type": "boolean",
            "description": "True only after human confirmation of controlling terms, amendments, date interpretation and delivery requirements. Missing earliest_notice_date means the reviewer confirmed no lower window bound."
          },
          "renewal_date": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "description": "Real UTC calendar date, YYYY-MM-DD, from 1900 through 2199."
          },
          "notice_basis": {
            "type": "string",
            "enum": [
              "calendar_days",
              "explicit_date",
              "unresolved"
            ],
            "description": "Calendar-day subtraction or human-confirmed explicit deadline. Never infer business-day, month-based or conflicting clauses."
          },
          "notice_days": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 730
              },
              {
                "type": "null"
              }
            ]
          },
          "notice_deadline": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                "description": "Real UTC calendar date, YYYY-MM-DD, from 1900 through 2199."
              },
              {
                "type": "null"
              }
            ]
          },
          "earliest_notice_date": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                "description": "Real UTC calendar date, YYYY-MM-DD, from 1900 through 2199."
              },
              {
                "type": "null"
              }
            ]
          },
          "lead_days": {
            "type": "integer",
            "minimum": 0,
            "maximum": 365
          },
          "delivery_method": {
            "type": "string",
            "maxLength": 1000
          },
          "recipient": {
            "type": "string",
            "maxLength": 1000
          },
          "requirement": {
            "type": "string",
            "enum": [
              "receipt",
              "dispatch",
              "unknown"
            ]
          },
          "unresolved": {
            "type": "array",
            "maxItems": 20,
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          "conflicts": {
            "type": "array",
            "maxItems": 20,
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          }
        },
        "required": [
          "id",
          "vendor",
          "owner",
          "backup_owner",
          "reviewer",
          "source_ref",
          "clause_text",
          "reviewed",
          "renewal_date",
          "notice_basis",
          "notice_days",
          "notice_deadline",
          "earliest_notice_date",
          "lead_days",
          "delivery_method",
          "recipient",
          "requirement",
          "unresolved",
          "conflicts"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "schema_version",
    "synthetic",
    "as_of",
    "contracts"
  ],
  "additionalProperties": false
}
