code wiki / (root) / nx_obligation_lib.nx

nx_obligation_lib.nx

buildroot/runtime/nx_obligation_lib.nx

5541 B112 linesdepth 7pulls 12 transitivereach 2 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_obligation_lib.nx -- POST-SIGNATURE OBLIGATION MANAGEMENT (the DocuSign IAM / Ironclad Jurist class). nx_clm catches the auto-renewal trap BEFORE a term ends. This is the other 95% of a contract's life: the obligations it created. Most contract value leaks after signature, because the executed document goes into a folder and the duties inside it are tracked by memory. u2605THE TOOTH MOST TRACKERS MISS -- THE CURE PERIOD. An obligation past its due date is NOT automatically a breach. Commercial contracts routinely grant a cure window (often 10-30 days after written notice), and during it the counterparty can still perform. A tracker that flags overdue AS breach manufactures disputes that do not exist; one that ignores the cure period entirely misses the moment the right to terminate actually vests. Both are expensive, so OVERDUE and BREACH are separate states here and the cure window sits explicitly between them. u2605THE SECOND TOOTH -- NOTICE STARTS THE CLOCK, NOT THE DUE DATE. A cure period typically runs from written notice of the failure, not from the missed deadline. An obligation that is overdue but where notice was NEVER given has an unexpired (indeed unstarted) cure window, so it cannot be a breach yet. u2605FAIL-CLOSED: an obligation with no due date is OBL_UNKNOWN -- never "satisfied", never "fine". A duty nobody dated is a duty nobody is tracking, which is precisely the failure mode. STRUCTURE: pure decision core, zero I/O, per [[feedback-pure-core-not-hostage-to-storage-2026-07-31]]. license_tier: ORIGINAL LIB.

dependencies 1 imports · 2 importers

nx_matter_lib.nx nx_obligation_lib.nx nx_legal_svc.nx nx_obligation_gate.nx

imports: nx_matter_lib.nx

imported by: nx_legal_svc.nxnx_obligation_gate.nx

structs

none

consts

25const OBL_UNKNOWN: i64 = 0 - 1
26const OBL_PENDING: i64 = 0
27const OBL_DUE: i64 = 1
28const OBL_OVERDUE: i64 = 2
29const OBL_BREACH: i64 = 3
30const OBL_SATISFIED: i64 = 4
31const OBL_WAIVED: i64 = 5
33const OBL_UNSET: i64 = 0 - 2000000002

functions

35func obl_is1(v: i64) -> i64
called by 1: obl_status_pure
44func obl_status_pure(due: i64, asof: i64, satisfied: i64, waived: i64, notice_day: i64, cure_days: i64) -> i64
called by 2: leg_obl_statusmain calls 1: obl_is1
59func obl_cure_remaining_pure(asof: i64, notice_day: i64, cure_days: i64) -> i64
called by 2: leg_obl_statusmain
67func obl_termination_right_pure(status: i64) -> i64
called by 2: leg_obl_statusmain
74func obl_late_pure(due: i64, performed: i64) -> i64
called by 1: main
82func obl_days_late_pure(due: i64, performed: i64) -> i64
called by 1: main
91func obl_exposure_pure(overdue_count: i64, breach_count: i64, unknown_count: i64) -> i64
97func obl_portfolio_clean_pure(overdue_count: i64, breach_count: i64, unknown_count: i64) -> i64
102func obl_status_label(s: i64, out: *u8) -> i64
called by 2: leg_obl_statusmain calls 1: mt_catcopy