code wiki / (root) / nx_self_audit.nx

nx_self_audit.nx

buildroot/runtime/nx_self_audit.nx

8916 B184 linesdepth 5pulls 8 transitivereach 0 importersview sourcekind tooltopic self
docsdependenciesstructsconstsfunctions

about

nx_self_audit.nx -- substrate-native self-awareness primitive. Per user directive 2026-05-14: "and nishi lang should be self aware of all these things allowing the user to improve it as it goes". Reads every substrate state file (algorithm_cards / ontology / patent_table / source_allowlist / displacement_targets / perf_baselines / competition_history) plus runtime/ inventory, and emits an ACTIONABLE per-domain coverage + per-status report. Output convention: each line either announces a gap with a named next-action OR confirms a covered area with a number. No raw counts without context. genealogy_id: substrate_self_awareness_2026_05_14 lineage_id: user_improvable_introspection

dependencies 7 imports · 0 importers

nx_syscalls.nx nx_runtime.nx nx_tier.nx nx_str.nx nx_provenance.nx nx_patent_check.nx nx_ontology.nx nx_self_audit.nx

imports: nx_syscalls.nxnx_runtime.nxnx_tier.nxnx_str.nxnx_provenance.nxnx_patent_check.nxnx_ontology.nx

imported by: nobody (leaf or entry point)

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

main println sys_write strlen sys_mmap nx_audit_count_lines sys_mmap ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close nx_audit_print_count print sys_write ↻ strlen ↻ print_i64 sys_mmap ↻ itoa sys_mmap ↻ sys_write ↻ println ↻ nx_ontology_load sys_mmap ↻ sys_read_file ↻ nx_ont_parse_line sys_mmap ↻ nx_str_cpy nx_ontology_count_with_po nx_str_eq nx_patent_load sys_mmap ↻ sys_read_file ↻ nx_pat_parse_line sys_mmap ↻ nx_str_cpy ↻ nx_pat_status_from_str nx_str_eq ↻ nx_patent_n_by_status

structs

none

consts

none

functions

35func nx_audit_count_lines(path: *u8) -> nx_int
called by 1: main calls 2: sys_mmapsys_read_file
65func nx_audit_print_count(label: *u8, n: nx_int)
called by 1: main calls 3: printprint_i64println
73func main() -> nx_exit