code wiki / _hdl_build / nx_legal_compliance_gate.nx

nx_legal_compliance_gate.nx

buildroot/runtime/_hdl_build/nx_legal_compliance_gate.nx

8159 B162 linesdepth 2pulls 3 transitivereach 0 importersview sourcekind gate/prooftopic legal
docsdependenciesstructsconstsfunctions

about

nx_legal_compliance_gate.nx -- GATE for LEGAL D0 (nx_legal_compliance). Drives the REAL classifier + regime selector + validity machine and asserts: CLASSIFIER (the precision a generic e-sign product lacks): "Last Will and Testament" -> WILL (excluded); "Living Will" -> ADVANCE_DIRECTIVE (NOT a will, e-signable); "Revocable Living Trust" -> TRUST_LIVING (e-signable); "Testamentary Trust" -> TESTAMENTARY_TRUST (excluded); "Codicil ..." -> CODICIL; contract/POA/deed classify. UETA GENERAL : a contract with intent+consent+attribution+retainable -> VALID/UETA_GENERAL; drop consent or retainable -> NEEDS_MORE with the exact missing-element reason (drives the concierge "what's left" UX). E-WILLS REGIME : a will in a jurisdiction that permits e-wills, executed with testator intent + attribution + >=2 witnesses + notarization + retainable -> VALID/ELECTRONIC_WILLS; one witness -> NEEDS_MORE(2_WITNESS). *** NEVER-VOID INVARIANT (the safety crux -- legal Rule 26) *** EXHAUSTIVE sweep: for EVERY excluded testamentary type (will/codicil/ testamentary trust), across ALL 2^4 combinations of the general UETA elements and BOTH jurisdiction settings, with no witnesses/notary, the verdict is NEVER VALID. A naive DocuSign-clone would return VALID and produce a legally VOID instrument; this engine cannot, by construction. Plus: an excluded doc in a no-e-wills jurisdiction -> INVALID_VOID/ REQUIRES_WET (never electronically executable). Evidence -> knowledge/status/legal_compliance.log license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_legal_compliance.nx nx_syscalls.nx nx_legal_compliance_gate.nx

imports: nx_legal_compliance.nxnx_syscalls.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sys_mmap nx_legal_doc_classify lc_ci_contains lc_slen lc_lower nx_legal_verdict nx_legal_regime nx_legal_is_excluded sweep_excluded nx_legal_verdict ↻ nx_legal_required_elements ew sys_write ewn sys_mmap ↻ sys_write ↻ sys_openat_append sys_close

structs

none

consts

33const LC_LOG: *u8 = "knowledge/status/legal_compliance.log"

functions

35func ew(fd: i64, s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(fd, s, n); return 0 }
called by 1: main calls 1: sys_write
36func ewn(fd: i64, v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
50func sweep_excluded(doc_type: i64, reason: *i64, regime: *i64) -> i64
called by 1: main calls 1: nx_legal_verdict
69func main() -> i64