code wiki / _hdl_build / nx_wiki_workstream_page.nx

nx_wiki_workstream_page.nx

buildroot/runtime/_hdl_build/nx_wiki_workstream_page.nx

10941 B201 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tooltopic wiki
docsdependenciesstructsconstsfunctions

about

nx_wiki_workstream_page.nx -- the AUTONOMOUS per-workstream page generator. Reads ONE real workstream record (a memory project-*.md -- our actual work, NOT a hand-kept TSV) and emits an S-class wiki page in the canonical anatomy the Nishi researcher found in Wikipedia's MoS/Layout: LEAD (standalone summary) -> INFOBOX (structured metadata) -> BODY (sections/lists, [[wikilinks]]) -> SEE ALSO (related pages) -> CATEGORY. All on the shared GitBook skin (nx_wiki_skin_lib). Usage: nx_wiki_workstream_page <record.md> (default = a sample record). Emits /tmp/nx_ws_page.html. Sovereign: nx_syscalls + nx_wiki_skin_lib only. license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_wiki_skin_lib.nx nx_wiki_workstream_page.nx

imports: nx_syscalls.nxnx_wiki_skin_lib.nx

imported by: nobody (leaf or entry point)

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

main sys_mmap wp_slurp sys_openat_rd sys_read sys_close sys_write sys_exit wp_fm_field wp_find_from wp_find_from ↻ skin_open sk_cat sk_nav sk_cat ↻ sk_streq sk_cat ↻ wp_inline wp_find2 sk_cat ↻ wp_esc wp_esc1 sk_cat ↻ wp_esc1 ↻ wp_find1 wp_slen wp_esc ↻ wp_body wp_line_end sk_cat ↻ wp_inline ↻ wp_seealso sk_cat ↻ wp_find2 ↻ wp_esc ↻ skin_close sk_cat ↻ sk_catn sys_mmap ↻ sys_now_realtime_sec

structs

none

consts

10const WP_MAGIC_4194304: i64 = 4194304
11const WP_MAGIC_2048: i64 = 2048
12const WP_MAGIC_8388608: i64 = 8388608
14const WP_DEFAULT: *u8 = "/mnt/c/Users/elder/.claude/projects/C--Users-elder/memory/project-temporal-work-coverage-2026-06-19.md"
15const WP_OUT: *u8 = "/tmp/nx_ws_page.html"

functions

17func wp_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 1: main
18func wp_slurp(path: *u8, buf: *u8, cap: i64) -> i64
called by 1: main calls 3: sys_openat_rdsys_readsys_close
27func wp_find_from(buf: *u8, len: i64, from: i64, pat: *u8) -> i64
called by 2: wp_fm_fieldmain
34func wp_line_end(buf: *u8, len: i64, s: i64) -> i64 { var e: i64 = s; while e < len { if buf[e] == (10 as u8) { return e } e = e + 1 } return len }
called by 1: wp_body
37func wp_fm_field(buf: *u8, len: i64, key: *u8, out: *u8, cap: i64) -> i64
called by 1: main calls 1: wp_find_from
56func wp_esc1(dst: *u8, o: i64, c: i64) -> i64
called by 2: wp_escwp_inline calls 1: sk_cat
62func wp_esc(dst: *u8, o: i64, buf: *u8, a: i64, b: i64) -> i64 { var oo: i64 = o; var i: i64 = a; while i < b { oo = wp_esc1(dst, oo, buf[i] as i64); i = i + 1 } return oo }
called by 3: wp_inlinewp_seealsomain calls 1: wp_esc1
63func wp_find2(buf: *u8, i: i64, end: i64, a: u8, b: u8) -> i64 { var k: i64 = i; while k + 1 < end { if buf[k] == a { if buf[k + 1] == b { return k } } k = k + 1 } return end }
called by 2: wp_inlinewp_seealso
64func wp_find1(buf: *u8, i: i64, end: i64, a: u8) -> i64 { var k: i64 = i; while k < end { if buf[k] == a { return k } k = k + 1 } return end }
called by 1: wp_inline
67func wp_inline(dst: *u8, off: i64, buf: *u8, a: i64, b: i64) -> i64
96func wp_body(dst: *u8, off: i64, buf: *u8, start: i64, len: i64) -> i64
called by 1: main calls 3: wp_line_endsk_catwp_inline
135func wp_seealso(dst: *u8, off: i64, buf: *u8, start: i64, len: i64) -> i64
called by 1: main calls 3: sk_catwp_find2wp_esc
154func main(argc: i64, argv: *i64) -> i64