code wiki / (root) / nx_compare_unified.nx

nx_compare_unified.nx

buildroot/runtime/nx_compare_unified.nx

24966 B339 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind tooltopic compare
docsdependenciesstructsconstsfunctions

about

nx_compare_unified.nx -- THE UNIFIED /compare view (operator 2026-07-10: "too many formats -> consolidate to ONE state-of-the-art comparison view, high-level to granular, usable by workstreams to document their dev arcs iteratively + REUSE the nishi team to avoid churn/duplicate rebuilds"). ONE format subsumes matrix + frontier radar + hub summary + api, and ADDS the development-arc log + reuse catalog. Grounded (banked 2026-07-10) in Backstage (software catalog + techdocs + scorecards), CMMI (maturity levels), OpenSSF Scorecard (per-check measured + remediation), ThoughtWorks Tech Radar (adopt/trial/assess/hold rings). Reads knowledge/compare/ <domain>.matrix (existing axis rows) PLUS backward-compatible enrichment directives: @summary <one line> -- executive summary @rung DONE|NOW|NEXT|HOLD | <label> | <evidence gate/URL> | <one line> -- the development arc (repeatable) axis rows may append a trailing | reuse: <organ to reuse instead of rebuilding> FOUR LEVELS: (L0) executive maturity band + verdict vs the named bar; (L1) the CLIMB arc (rungs); (L2) capability MATRIX (measured, drill-down); (L3) granular EVIDENCE + REUSE pointer per axis. Plus a JSON superset for workstreams/tools. LIAR-KILL: Nishi cells MEASURED by symbol-on-disk (no self-grading); the maturity band is COMPUTED from coverage, never asserted. Modes: html | json | (no-arg gate). Colors via rgb() (nx_cc: no '#' in string literals). usage: nx_compare_unified <domain> [html|json] license_tier: ORIGINAL expect_exit:0

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_compare_unified.nx

imports: nx_syscalls.nx

imported by: nobody (leaf or entry point)

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

main w sys_write streq sys_mmap cread sys_openat_rd sys_read sys_close starts field file_has streq ↻ cread ↻ cap_exists sys_mmap ↻ fexists sys_openat_rd ↻ sys_close ↻ wn w ↻ sys_mmap ↻ sys_write ↻ band w ↻ wc sys_mmap ↻ sys_write ↻ bandcls ringcls streq ↻ cellcls celltxt w ↻

structs

none

consts

17const K_MAGIC_262144: i64 = 262144
18const K_MAGIC_65536: i64 = 65536
19const K_MAGIC_1024: i64 = 1024
20const K_MAGIC_2048: i64 = 2048
21const K_MAGIC_131072: i64 = 131072
22const K_MAGIC_20480: i64 = 20480
23const K_MAGIC_20479: i64 = 20479

functions

25func w(fd: i64, s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(fd,s,n); return 0 }
called by 4: wnbandcelltxtmain calls 1: sys_write
26func wc(fd: i64, code: i64) -> i64 { let t: *u8=sys_mmap(2); t[0]=code as u8; sys_write(fd,t,1); return 0 }
called by 1: main calls 2: sys_mmapsys_write
27func wn(fd: i64, v: i64) -> i64 { var m: i64=v; if m<0{w(fd,"-" as *u8);m=0-m} let t: *u8=sys_mmap(24); var k: i64=0; if m==0{t[0]=48 as u8;k=1} while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1} let o: *u8=sys_mmap(24); var i: i64=0; while i<k{o[i]=t[k-1-i];i=i+1} sys_write(fd,o,k); return 0 }
called by 1: main calls 3: wsys_mmapsys_write
28func streq(a: *u8, b: *u8) -> i64 { var i: i64=0; while a[i]!=(0 as u8){ if a[i]!=b[i]{return 0} i=i+1 } if b[i]!=(0 as u8){return 0} return 1 }
called by 3: file_hasringclsmain
29func starts(s: *u8, p: *u8) -> i64 { var i: i64=0; while p[i]!=(0 as u8){ if s[i]!=p[i]{return 0} i=i+1 } return 1 }
called by 1: main
30func cread(path: *u8, buf: *u8, cap: i64) -> i64 { let fd: i64=sys_openat_rd(path); if fd<0{return 0-1} var t: i64=0; while t<cap { let r: i64=sys_read(fd,(buf as i64+t) as *u8,cap-t); if r<=0{break} t=t+r } sys_close(fd); return t }
31func fexists(path: *u8) -> i64 { let fd: i64=sys_openat_rd(path); if fd<0{return 0} sys_close(fd); return 1 }
called by 1: cap_exists calls 2: sys_openat_rdsys_close
33func cap_exists(dom: *u8, sfx: *u8) -> i64
called by 1: main calls 2: sys_mmapfexists
43func file_has(path: *u8, sym: *u8, buf: *u8, cap: i64) -> i64
called by 1: main calls 2: streqcread
54func field(buf: *u8, ls: i64, le: i64, k: i64, out: *u8) -> i64
called by 1: main
65func band(fd: i64, cov: i64) -> i64
called by 1: main calls 1: w
72func bandcls(cov: i64) -> *u8
called by 1: main
79func ringcls(st: *u8) -> *u8 { if streq(st,"DONE" as *u8)==1{return "r-done" as *u8} if streq(st,"NOW" as *u8)==1{return "r-now" as *u8} if streq(st,"HOLD" as *u8)==1{return "r-hold" as *u8} return "r-next" as *u8 }
called by 1: main calls 1: streq
81func celltxt(fd: i64, code: i64) -> i64 { if code==2{w(fd,"Best" as *u8)} else { if code==1{w(fd,"Yes" as *u8)} else { if code==3{w(fd,"Part" as *u8)} else {w(fd,"No" as *u8)} } } return 0 }
called by 1: main calls 1: w
82func cellcls(code: i64) -> *u8 { if code==2{return "c-best" as *u8} if code==1{return "c-yes" as *u8} if code==3{return "c-part" as *u8} return "c-no" as *u8 }
called by 1: main
84func main(argc: i64, argv: *i64) -> i64