code wiki / (root) / nx_librarian.nx

nx_librarian.nx

buildroot/runtime/nx_librarian.nx

7353 B148 linesdepth 8pulls 16 transitivereach 0 importersview sourcekind tooltopic librarian
docsdependenciesstructsconstsfunctions

about

nx_librarian.nx -- the DOCUMENTATION module of the Nishi Project Manager. The Nishi PM (executive sponsor: the operator) manages both PROJECT work and DOCUMENTATION work; this module is the documentation half -- the "librarian". It CATALOGS the information namespaces (docs, memory, silicon charters), AUDITS their health (link-rot, V2/NISHIDOC metadata compliance), and prints a nishi-doctor-style verdict the PM rolls up. Sovereign + native x86 -- NO qemu, NO shell. It runs where the corpus lives (the repo host), like nishi doctor and the dashboards. REUSES the existing audit engines verbatim (operator cardinal: never reinvent -- most capabilities already exist): nx_doc_xref -- backtick-aware [[X]] link-rot, dual-namespace nx_doc_census -- the 7-axis V2/NISHIDOC compliance classifier The only net-new code here is the probe->classify->verdict orchestration (modeled on nx_doctor.nx) -- the same spine the PM's project-work half uses. **Quadrant:** REFERENCE (Diataxis) **Topic Type:** REFERENCE (DITA) **Status:** DRAFT **Trust State:** WRITTEN_UNTESTED **Competitive State:** UNCLASSIFIED Status: V1. 2026-05-30.

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_doc_xref.nx nx_doc_census.nx nx_librarian.nx

imports: nx_syscalls.nxnx_doc_xref.nxnx_doc_census.nx

imported by: nobody (leaf or entry point)

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

main lib_puts sys_write lib_strlen lib_strlen ↻ sys_mmap nx_doc_census_init nx_doc_census_walk_dir sys_mmap ↻ nx_dir_list nx_openat nx_dirent_read nx_dirent_iter nx_dir_is_dotlike nx_dir_name_strlen nx_dir_arena_copy_name nx_dir_row_at nx_str_ends_with _doccensus_path_join sys_openat_rd sys_read sys_close nx_doc_classify nx_doc_classify_quadrant nx_grep_any nx_grep_first_offset nx_str_find nx_doc_classify_topic_type nx_grep_any ↻ nx_doc_classify_status nx_grep_any ↻ nx_doc_has_trust_state nx_grep_any ↻ nx_doc_has_competitive_sta nx_grep_any ↻ nx_doc_has_websearch_prove nx_grep_any ↻ nx_doc_has_bidirectional_l nx_grep_any ↻ nx_doc_census_accumulate

structs

none

consts

28const LIB_OK: i64 = 0
29const LIB_WARN: i64 = 1
30const LIB_FAIL: i64 = 2
31const LIB_ROT_WARN_PCT: i64 = 5 // link-rot >= 5% -> warn
32const LIB_ROT_FAIL_PCT: i64 = 15 // link-rot >= 15% -> fail
33const LIB_COMP_OK_PCT: i64 = 75 // compliance >= 75% -> ok (CONFIRMED band)
34const LIB_COMP_WARN_PCT: i64 = 50 // compliance >= 50% -> warn (INCONCLUSIVE band)
35const LIB_BLOB_CAP: i64 = 262144 // 256 KiB names blob for the dual-namespace walk
36const LIB_STRLEN_CAP: i64 = 8192

functions

39func lib_strlen(s: *u8) -> i64
called by 2: lib_putsmain
44func lib_puts(s: *u8) -> i64
called by 1: main calls 2: sys_writelib_strlen
48func lib_putn(n: i64) -> i64
called by 1: main calls 2: sys_writesys_mmap
58func lib_sym(state: i64) -> i64
called by 1: main calls 1: sys_write
65func main() -> i64