{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://docs.demiton.io/registers/compliance_gate_verdict/v1.json",
  "title": "compliance_gate_verdict contract v1",
  "type": "object",
  "required": [
    "days_until_due",
    "due_date",
    "obligation_ref",
    "obligation_type",
    "source_fact_id",
    "source_shelf_type",
    "verdict"
  ],
  "properties": {
    "verdict": {
      "type": "string",
      "description": "The countdown state: COMPLIANT (>90 days out), EXPIRING_90, EXPIRING_30, EXPIRING_7, or EXPIRED (days_until_due < 0 - stays EXPIRED, never silently reverts, until the source record itself renews/retires).",
      "x-demiton-requiredness": "required"
    },
    "due_date": {
      "type": "string",
      "description": "The obligation's expiry/next_due date the countdown is measured against, as an ISO 8601 date.",
      "x-demiton-requiredness": "required",
      "x-demiton-unit": "ISO 8601 date"
    },
    "cause_category": {
      "type": "string",
      "description": "The subcategory of the verdict's disease: the stage or control that failed. One of that disease's `causes[].key` in vocab/diseases.json, checked by the writer. Absent when the detector does not determine it.",
      "x-demiton-requiredness": "optional"
    },
    "days_until_due": {
      "type": "integer",
      "description": "due_date minus the assessment date, in days. Negative once overdue - the alert cites how overdue, not just that it is (SD027 1's proof line).",
      "x-demiton-requiredness": "required",
      "x-demiton-unit": "days (signed)"
    },
    "obligation_ref": {
      "type": "string",
      "description": "A human-readable label for the specific obligation (holder + credential type, or insured party + policy number) - what the alert names.",
      "x-demiton-requiredness": "required"
    },
    "source_fact_id": {
      "type": "integer",
      "description": "The specific feeder Fact row this verdict tracks - the citation's derived_from anchor.",
      "x-demiton-requiredness": "required"
    },
    "obligation_type": {
      "type": "string",
      "description": "What kind of compliance obligation this is, e.g. certification, insurance. One value per wired feeder register.",
      "x-demiton-requiredness": "required"
    },
    "source_shelf_type": {
      "type": "string",
      "description": "Which feeder register this verdict was derived from (certification_register, insurance_certificate, ...) - lets the alert cite its source (SD027 1's proof line: every number proves itself).",
      "x-demiton-requiredness": "required"
    }
  },
  "x-demiton-register-type": "compliance_gate_verdict",
  "x-demiton-contract-version": "1.1.0",
  "x-demiton-store": "tenant",
  "x-demiton-axes": [],
  "x-demiton-measures": [],
  "x-demiton-provenance": {
    "standards": []
  },
  "description": "The Compliance gate verdict register contract, version 1. JSON Schema (draft 2020-12); x-demiton-* keywords carry Demiton's own meaning and standard validators ignore them.",
  "x-demiton-contract-url": "https://docs.demiton.io/registers/compliance_gate_verdict/",
  "x-demiton-register-catalog": "https://docs.demiton.io/concepts/register-catalog"
}