nx_librarian.nx
buildroot/runtime/nx_librarian.nx
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
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
structs
| none |
consts
| 28 | const LIB_OK: i64 = 0 |
| 29 | const LIB_WARN: i64 = 1 |
| 30 | const LIB_FAIL: i64 = 2 |
| 31 | const LIB_ROT_WARN_PCT: i64 = 5 // link-rot >= 5% -> warn |
| 32 | const LIB_ROT_FAIL_PCT: i64 = 15 // link-rot >= 15% -> fail |
| 33 | const LIB_COMP_OK_PCT: i64 = 75 // compliance >= 75% -> ok (CONFIRMED band) |
| 34 | const LIB_COMP_WARN_PCT: i64 = 50 // compliance >= 50% -> warn (INCONCLUSIVE band) |
| 35 | const LIB_BLOB_CAP: i64 = 262144 // 256 KiB names blob for the dual-namespace walk |
| 36 | const LIB_STRLEN_CAP: i64 = 8192 |
functions
| 39 | func lib_strlen(s: *u8) -> i64 |
| 44 | func lib_puts(s: *u8) -> i64 |
| 48 | func lib_putn(n: i64) -> i64 |
| 58 | func lib_sym(state: i64) -> i64 |
| 65 | func main() -> i64 |