code wiki / (root) / nx_legaldocs_research.nx

nx_legaldocs_research.nx source

↩ module page · 49 lines · 4137 B

1// nx_legaldocs_research.nx -- THIN structured LEGAL-DOCUMENT-MANAGEMENT research source organ. COMPOSES 2// nx_research_engine (the shared sovereign fetch->extract->bank; no copy-pasted loop, no flat TSV). Grounds the 3// S-class-EXCEED per-domain document-portal census on REAL sourced facts about how legal sites/firms manage 4// documents -- BOTH the PUBLIC visitor-facing side (published resources, web CMS, onsite full-text search) AND 5// the PRIVATE client-confidential side (secure client portals, legal professional privilege, access control, 6// encryption), plus the records/governance/e-discovery spine (retention, audit, never-delete). Banks clean 7// .txt -> knowledge/library/ so nx_library_harvest_v2 indexes it + nx_search_cli queries it. 8// 9// PURPOSE (operator 2026-06-28): a per-domain document portal (upload -> onsite search), S-class EXCEED, 10// benchmarked against how real legal sites manage public + private documents -- using the nishi researcher. 11// Sources are canonical, fact-dense, static pages (sovereign TLS-1.3 fetch via nx_https_fetch_follow, redirect- 12// following + HTML-stripped by the engine). Curated, NOT a mass-fetch -- structured sections with purpose. 13// expect_exit: 0 license_tier: ORIGINAL (clone of nx_infomgmt_research; only the sources differ) 14import "nx_research_engine.nx" 15const K_MAGIC_8388608: i64 = 8388608 16 17func main() -> i64 { 18 let store: *TrustStore = rf_init() 19 if (store as i64) == 0 { rf_puts("legaldocs: trust store load failed\n" as *u8); return 1 } 20 rf_puts("CA roots="); rf_putn(trust_store_count(store)); rf_puts(" -- LEGAL-DOCUMENT-MANAGEMENT research (public + private) -> Library\n" as *u8) 21 let cap: i64 = K_MAGIC_8388608 22 let out: *u8 = sys_mmap(cap) 23 var ok: i64 = 0 24 25 rf_section("PUBLIC SIDE -- visitor-facing published documents, web CMS, onsite full-text search" as *u8) 26 ok = ok + rf_fetch_bank("https://en.wikipedia.org/wiki/Web_content_management_system" as *u8, "ldm_wcms" as *u8, store, out, cap) 27 ok = ok + rf_fetch_bank("https://en.wikipedia.org/wiki/Full-text_search" as *u8, "ldm_fulltext" as *u8, store, out, cap) 28 ok = ok + rf_fetch_bank("https://en.wikipedia.org/wiki/Enterprise_content_management" as *u8, "ldm_ecm" as *u8, store, out, cap) 29 30 rf_section("PRIVATE SIDE -- secure client portals, legal privilege, access control, encryption at rest" as *u8) 31 ok = ok + rf_fetch_bank("https://en.wikipedia.org/wiki/Client_portal" as *u8, "ldm_client_portal" as *u8, store, out, cap) 32 ok = ok + rf_fetch_bank("https://en.wikipedia.org/wiki/Legal_professional_privilege" as *u8, "ldm_privilege" as *u8, store, out, cap) 33 ok = ok + rf_fetch_bank("https://en.wikipedia.org/wiki/Access_control" as *u8, "ldm_access_control" as *u8, store, out, cap) 34 ok = ok + rf_fetch_bank("https://en.wikipedia.org/wiki/Encryption" as *u8, "ldm_encryption" as *u8, store, out, cap) 35 36 rf_section("LEGAL DOCUMENT MANAGEMENT -- the matter-centric DMS class (iManage / NetDocuments category)" as *u8) 37 ok = ok + rf_fetch_bank("https://en.wikipedia.org/wiki/Document_management_system" as *u8, "ldm_dms" as *u8, store, out, cap) 38 ok = ok + rf_fetch_bank("https://en.wikipedia.org/wiki/Legal_technology" as *u8, "ldm_legaltech" as *u8, store, out, cap) 39 ok = ok + rf_fetch_bank("https://en.wikipedia.org/wiki/Legal_case_management" as *u8, "ldm_case_mgmt" as *u8, store, out, cap) 40 41 rf_section("GOVERNANCE / RETENTION / DISCOVERY -- records retention, audit trails, never-delete, e-discovery" as *u8) 42 ok = ok + rf_fetch_bank("https://en.wikipedia.org/wiki/Records_management" as *u8, "ldm_records_mgmt" as *u8, store, out, cap) 43 ok = ok + rf_fetch_bank("https://en.wikipedia.org/wiki/Information_governance" as *u8, "ldm_infogov" as *u8, store, out, cap) 44 ok = ok + rf_fetch_bank("https://en.wikipedia.org/wiki/Electronic_discovery" as *u8, "ldm_ediscovery" as *u8, store, out, cap) 45 46 rf_puts("LEGALDOCS BANKED: "); rf_putn(ok); rf_puts(" / 13 (public+private sections preserved, gzip-guarded; run nx_library_harvest_v2 to index, nx_search_cli to query)\n" as *u8) 47 if ok < 1 { return 51 } 48 return 0 49}