code wiki / _hdl_build / nx_memorph.nx

nx_memorph.nx

buildroot/runtime/_hdl_build/nx_memorph.nx

10610 B241 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_memorph.nx -- emit a CATALOGUE of orphaned memories so unreachable knowledge becomes findable. CONVERTED TO nx_memplane_lib 2026-08-06: the getdents walk, name table, index, bounded read, path join and link scanner were hand-copied into six organs; the copies drifted and the drift WAS the bug (memroot lacked the dump-exclusion its siblings had and reported a false GREEN). This organ now owns only what is specific to it: the description snippet and the catalogue layout. THE PROBLEM, MEASURED 2026-08-06 -------------------------------- 2,180 .md files / 25.5 MB. MEMORY.md can name ~35 of them before the measured 25,000 B cliff. 623 files have no path to them from ORIGIN: written, then invisible. Among them are 141 KB scenario blueprints and rubrics that cost real work. A dangling reference points at knowledge that DOES NOT EXIST -- unrecoverable, and "repairing" it would fabricate the doctrine it cites. An orphan IS the knowledge, with no path to it. ★ WHEN THE ARTEFACT SURVIVES AND ONLY THE PATH IS MISSING, BUILD THE PATH. ⚠ THE METRIC MUST NOT MEASURE THE INSTRUMENT. Once this catalogue exists it cites every orphan, so a naive inbound count would read ZERO forever and the problem would look solved while nothing changed. nx_memhealth excludes it from BOTH the link scan and the orphan count; the exclusion list now lives in mp_is_dump so the next organ cannot forget it. DERIVED, NEVER AUTHORED: regenerated wholly on each run; hand edits are lost by design. usage: nx_memorph [--dir <memdir>] [--apply] exit: 0 = written (or dry run); 1 = refused Sovereign: imports nx_memplane_lib. license_tier: ORIGINAL

dependencies 1 imports · 0 importers

nx_memplane_lib.nx nx_memorph.nx

imports: nx_memplane_lib.nx

imported by: nobody (leaf or entry point)

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

main mp_streq mp_scan sys_openat_rd sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ mp_is_md mp_len mp_nameptr sys_close mp_put mp_nameptr ↻ mp_hashr mp_len ↻ mp_cat mp_say mp_write_all sys_write ↻ mp_nameptr ↻ mp_is_dump mp_streq ↻ mp_join mp_readf sys_openat_rd ↻ sys_read sys_close ↻ mp_is_derived

structs

none

consts

30const MO_DIR: *u8 = "/mnt/c/Users/elder/.claude/projects/C--Users-elder/memory"
31const MO_OUT: *u8 = "reference-orphan-catalogue.md"
32const MO_FBUF: i64 = 1048576
33const MO_OBUF: i64 = 4194304
34const MO_MSG: i64 = 8192
35const MO_DESC: i64 = 150

functions

39func mo_desc(buf: *u8, n: i64, out: *u8) -> i64
called by 1: main calls 1: mp_len
87func main(argc: i64, argv: *i64) -> i64