code wiki / _hdl_build / nx_legal_compliance_gate.nx
nx_legal_compliance_gate.nx
buildroot/runtime/_hdl_build/nx_legal_compliance_gate.nx
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
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
structs
| none |
consts
| 33 | const LC_LOG: *u8 = "knowledge/status/legal_compliance.log" |
functions
| 35 | func 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 } |
| 36 | func ewn(fd: i64, v: i64) -> i64 |
| 50 | func sweep_excluded(doc_type: i64, reason: *i64, regime: *i64) -> i64 |
| 69 | func main() -> i64 |