code wiki / _hdl_build / nx_memorph.nx
nx_memorph.nx
buildroot/runtime/_hdl_build/nx_memorph.nx
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
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
structs
| none |
consts
| 30 | const MO_DIR: *u8 = "/mnt/c/Users/elder/.claude/projects/C--Users-elder/memory" |
| 31 | const MO_OUT: *u8 = "reference-orphan-catalogue.md" |
| 32 | const MO_FBUF: i64 = 1048576 |
| 33 | const MO_OBUF: i64 = 4194304 |
| 34 | const MO_MSG: i64 = 8192 |
| 35 | const MO_DESC: i64 = 150 |
functions
| 39 | func mo_desc(buf: *u8, n: i64, out: *u8) -> i64 |
| 87 | func main(argc: i64, argv: *i64) -> i64 |