code wiki / (root) / nx_citator_lib.nx

nx_citator_lib.nx

buildroot/runtime/nx_citator_lib.nx

5325 B123 linesdepth 8pulls 13 transitivereach 1 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_citator_lib.nx -- F995: CITATION TREATMENT SIGNALS (Shepard's / KeyCite analog), on the CID plane. Verifying that a quote is REAL (nx_cite) is necessary but not sufficient: a perfectly real quote from a case that has since been OVERRULED is bad law, and relying on it is malpractice. This layer records how later authorities TREAT an earlier one, and answers the question a citator exists to answer: is this still good law? Treatment vocabulary (a DECLARED data contract; severity = how much it undercuts reliance): followed severity 0 positive, reinforces distinguished severity 1 caution, limited to its facts questioned severity 2 caution, reliability doubted overruled severity 3 NEGATIVE -- no longer good law ★WORST-WINS: a case's status is the MAX severity across every treatment of it. One overruling kills reliance no matter how many later courts followed it -- you cannot average away dead law. This is the bright line: good_law == (worst severity < overruled). ★COMPOSES nx_cite: cit_safe_to_cite passes ONLY if the quote verifies (real span of a real source) AND the cited authority is still good law. So a real quote from overruled law is UNSAFE -- the exact trap a citator prevents and a chatbot walks straight into. SCALE ENVELOPE (declared): cit_status scans the treatment index for the cited case's key-prefix (mirrors the proven trust-ledger per-key scan) -- O(total-treatments); a per-case index is the rung. DRY: composes nx_cite_lib (cite_ok) + nx_matter_lib (reg_*/mt_*/canon_encode). license_tier: ORIGINAL LIB.

dependencies 1 imports · 1 importers

nx_cite_lib.nx nx_citator_lib.nx nx_citator_gate.nx

imports: nx_cite_lib.nx

imported by: nx_citator_gate.nx

structs

none

consts

27const CIT_MAGIC_1048576: i64 = 1048576
29const CIT_COLON: i64 = 58

functions

32func cit_sev(t: *u8) -> i64
called by 1: cit_status
42func cit_treat_put(prefix: *u8, cited: *u8, citing: *u8, treatment: *u8) -> i64
called by 1: main calls 3: mt_catcopycanon_encodereg_put
61func cit_status(prefix: *u8, cited: *u8) -> i64
104func cit_is_good_law(prefix: *u8, cited: *u8) -> i64
called by 2: maincit_safe_to_cite calls 1: cit_status
110func cit_is_caution(prefix: *u8, cited: *u8) -> i64
called by 1: main calls 1: cit_status
119func cit_safe_to_cite(prefix: *u8, source_id: *u8, quoted: *u8) -> i64
called by 1: main calls 2: cite_okcit_is_good_law