{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://docs.demiton.io/registers/platform_obligation/v1.json",
  "title": "platform_obligation contract v1",
  "type": "object",
  "required": [
    "applies_to_form",
    "citation_access_date",
    "consequence",
    "disease",
    "dispute_type",
    "duty",
    "evidence_kind",
    "grade",
    "instrument_id",
    "jurisdiction",
    "kind",
    "protection_type",
    "register",
    "severity",
    "source",
    "source_title",
    "source_url",
    "standard_key"
  ],
  "properties": {
    "duty": {
      "type": "string",
      "description": "the duty in one sentence",
      "x-demiton-requiredness": "required"
    },
    "kind": {
      "type": "string",
      "description": "ENGINE ROUTING, not published: how the duty is measured against a project's registers - a cadence (`periodic`), a window after an anchor event (`event_bound`), a retention period (`retention`) or a standing condition (`state`)",
      "enum": [
        "periodic",
        "event_bound",
        "retention",
        "state"
      ],
      "x-demiton-requiredness": "required"
    },
    "grade": {
      "type": "string",
      "description": "how close to the primary source the reading was",
      "enum": [
        "primary_read",
        "primary_via_secondary",
        "demiton_default",
        "inherited"
      ],
      "x-demiton-requiredness": "required"
    },
    "anchor": {
      "type": "object",
      "description": "ENGINE ROUTING, not published: for an `event_bound` row, the event its window runs from (`register`, `date_field`, `target_date_field`)",
      "x-demiton-requiredness": "optional"
    },
    "caveat": {
      "type": "string",
      "description": "what bounds this obligation",
      "x-demiton-requiredness": "optional"
    },
    "source": {
      "type": "string",
      "description": "which of the seven sources the instrument belongs to",
      "enum": [
        "contract",
        "law",
        "principal",
        "approvals",
        "counterparties",
        "workforce",
        "own_commitments"
      ],
      "x-demiton-requiredness": "required"
    },
    "disease": {
      "type": "string",
      "description": "which of the five diseases this obligation guards against",
      "enum": [
        "rework",
        "overrun",
        "forfeited_entitlements",
        "disputes",
        "non_compliance"
      ],
      "x-demiton-requiredness": "required"
    },
    "measure": {
      "type": "string",
      "description": "ENGINE ROUTING, not published: the computation that judges this row, `kind` unless a named strategy overrides it",
      "x-demiton-requiredness": "optional"
    },
    "trigger": {
      "type": "string",
      "description": "the event that starts this obligation's clock: the obligation's `trigger`, a key of vocab/event_types.json. Empty when the window is not anchored to an event",
      "x-demiton-requiredness": "optional"
    },
    "register": {
      "type": "string",
      "description": "ENGINE ROUTING, not published: the tenant register this obligation is evaluated against",
      "x-demiton-requiredness": "required"
    },
    "severity": {
      "type": "integer",
      "description": "the contract-risk tier (1-4)",
      "x-demiton-requiredness": "required"
    },
    "duty_shape": {
      "type": "string",
      "description": "the duty this row states across instruments: the obligation's `duty_shape`, a key of vocab/duty_shapes.json",
      "x-demiton-requiredness": "optional"
    },
    "source_url": {
      "type": "string",
      "description": "the primary source for this exact duty",
      "x-demiton-requiredness": "required"
    },
    "consequence": {
      "type": "string",
      "description": "what missing the duty costs, as the source states it",
      "enum": [
        "barred",
        "reduced_per_day",
        "costs_excluded",
        "liable_full_amount",
        "damages_only",
        "offence",
        "breach",
        "guidance"
      ],
      "x-demiton-requiredness": "required"
    },
    "window_unit": {
      "type": "string",
      "description": "unit of `window_value`",
      "enum": [
        "hours",
        "days",
        "business_days",
        "working_days",
        "months"
      ],
      "x-demiton-requiredness": "optional"
    },
    "dispute_type": {
      "type": "string",
      "description": "ENGINE ROUTING, not published: which of the five SM026 dispute-type buckets this obligation was transcribed from - a narrower, internal taxonomy the anchor map is keyed on, distinct from `disease`",
      "x-demiton-requiredness": "required"
    },
    "jurisdiction": {
      "type": "jurisdiction",
      "description": "where this obligation applies: the ISO 3166-1/3166-2 code",
      "x-demiton-requiredness": "required"
    },
    "research_row": {
      "type": "string",
      "description": "the row id in Demiton's own research record this obligation was transcribed from",
      "x-demiton-requiredness": "optional"
    },
    "source_title": {
      "type": "string",
      "description": "the instrument's title",
      "x-demiton-requiredness": "required"
    },
    "standard_key": {
      "type": "string",
      "description": "the obligation's stable key, e.g. `payment.schedule_due.au-qld`",
      "x-demiton-requiredness": "required"
    },
    "window_value": {
      "type": "number",
      "description": "the cadence or window length in `window_unit`",
      "x-demiton-requiredness": "optional"
    },
    "evidence_kind": {
      "type": "string",
      "description": "how this obligation is evidenced once switched on",
      "enum": [
        "built_in",
        "record_in_demiton",
        "register",
        "not_collected"
      ],
      "x-demiton-requiredness": "required"
    },
    "in_force_from": {
      "type": "string",
      "description": "the date this version starts to apply (ISO); absent on the original version",
      "x-demiton-requiredness": "optional"
    },
    "instrument_id": {
      "type": "string",
      "description": "the instrument this obligation belongs to, e.g. `bif_act_2017_qld`",
      "x-demiton-requiredness": "required"
    },
    "source_clause": {
      "type": "string",
      "description": "the clause, section or paragraph",
      "x-demiton-requiredness": "optional"
    },
    "trigger_event": {
      "type": "object",
      "description": "the `trigger`'s entry in vocab/event_types.json, resolved beside it: register, date field, subject, and the match, requires_item and reference fields that say which records count",
      "x-demiton-requiredness": "optional"
    },
    "approval_class": {
      "type": "string",
      "description": "what kind of sign-off this obligation's evidence needs: the obligation's `approval_class`, a member of vocab/approval_classes.json",
      "enum": [
        "geotechnical",
        "quality",
        "safety_environment",
        "variations_claims",
        "payments",
        "general"
      ],
      "x-demiton-requiredness": "optional"
    },
    "in_force_until": {
      "type": "string",
      "description": "the last date this version applies (ISO); derived from the next version's start, or the end of a repealed duty",
      "x-demiton-requiredness": "optional"
    },
    "register_match": {
      "type": "object",
      "description": "ENGINE ROUTING, not published: equality predicate on `register` selecting the evidence",
      "x-demiton-requiredness": "optional"
    },
    "threshold_unit": {
      "type": "string",
      "description": "unit of `threshold_value`, e.g. `percent`",
      "x-demiton-requiredness": "optional"
    },
    "applies_to_form": {
      "type": "string",
      "description": "the contract form this obligation is written for; `statute` for a legislative rule, `any` when form-independent",
      "x-demiton-requiredness": "required"
    },
    "protection_type": {
      "type": "string",
      "description": "the engine that runs this obligation once switched on",
      "enum": [
        "watch",
        "countdown",
        "check",
        "threshold"
      ],
      "x-demiton-requiredness": "required"
    },
    "threshold_value": {
      "type": "number",
      "description": "for a `threshold` obligation: the limit, or the labelled default when `threshold_set_by` is `org`",
      "x-demiton-requiredness": "optional"
    },
    "in_force_from_by": {
      "type": "string",
      "description": "the selecting date that decides `in_force_from`: a key of vocab/selecting_dates.json",
      "x-demiton-requiredness": "optional"
    },
    "threshold_set_by": {
      "type": "string",
      "description": "`library` (the limit is the instrument's) or `org` (the contractor sets its own at switch-on, and it is never published)",
      "enum": [
        "library",
        "org"
      ],
      "x-demiton-requiredness": "optional"
    },
    "evidence_register": {
      "type": "string",
      "description": "for evidence_kind=record_in_demiton|register|not_collected: the shelf_type",
      "x-demiton-requiredness": "optional"
    },
    "in_force_until_by": {
      "type": "string",
      "description": "the selecting date that decides `in_force_until`: a key of vocab/selecting_dates.json",
      "x-demiton-requiredness": "optional"
    },
    "obligation_version": {
      "type": "string",
      "description": "which dated version of this key the row states: its `in_force.from` date, or `original` when the key has no dated version (SM052)",
      "x-demiton-requiredness": "optional"
    },
    "threshold_direction": {
      "type": "string",
      "description": "for a `threshold` obligation: `max` (a ceiling) or `min` (a floor), the side of the line that is strict",
      "enum": [
        "max",
        "min"
      ],
      "x-demiton-requiredness": "optional"
    },
    "window_source_field": {
      "type": "string",
      "description": "the `contract_terms` field whose value overrides `window_value` when the contract states its own window (SM030 decision 5: strictest wins)",
      "x-demiton-requiredness": "optional"
    },
    "citation_access_date": {
      "type": "string",
      "description": "when the primary source was read",
      "x-demiton-requiredness": "required",
      "format": "date",
      "x-demiton-type": "date"
    },
    "evidence_system_type": {
      "type": "string",
      "description": "for evidence_kind=register only: the system type that would fill it",
      "enum": [
        "finance",
        "site_and_field",
        "document_store"
      ],
      "x-demiton-requiredness": "optional"
    }
  },
  "x-demiton-register-type": "platform_obligation",
  "x-demiton-contract-version": "1.4.1",
  "x-demiton-store": "platform",
  "x-demiton-axes": [],
  "x-demiton-measures": [],
  "x-demiton-provenance": {
    "standards": []
  },
  "description": "The Platform obligation 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/platform_obligation/",
  "x-demiton-register-catalog": "https://docs.demiton.io/concepts/register-catalog"
}