nx_compare_unified.nx
buildroot/runtime/nx_compare_unified.nx
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
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
structs
| none |
consts
| 17 | const K_MAGIC_262144: i64 = 262144 |
| 18 | const K_MAGIC_65536: i64 = 65536 |
| 19 | const K_MAGIC_1024: i64 = 1024 |
| 20 | const K_MAGIC_2048: i64 = 2048 |
| 21 | const K_MAGIC_131072: i64 = 131072 |
| 22 | const K_MAGIC_20480: i64 = 20480 |
| 23 | const K_MAGIC_20479: i64 = 20479 |
functions
| 25 | func 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 } |
| 26 | func wc(fd: i64, code: i64) -> i64 { let t: *u8=sys_mmap(2); t[0]=code as u8; sys_write(fd,t,1); return 0 } |
| 27 | func 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 } |
| 28 | func 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 } |
| 29 | func 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 |
| 30 | func 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 } |
| 31 | func fexists(path: *u8) -> i64 { let fd: i64=sys_openat_rd(path); if fd<0{return 0} sys_close(fd); return 1 } |
| 33 | func cap_exists(dom: *u8, sfx: *u8) -> i64 |
| 43 | func file_has(path: *u8, sym: *u8, buf: *u8, cap: i64) -> i64 |
| 54 | func field(buf: *u8, ls: i64, le: i64, k: i64, out: *u8) -> i64 called by 1: main |
| 65 | func band(fd: i64, cov: i64) -> i64 |
| 72 | func bandcls(cov: i64) -> *u8 called by 1: main |
| 79 | func 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 } |
| 81 | func 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 } |
| 82 | func 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 |
| 84 | func main(argc: i64, argv: *i64) -> i64 |