code wiki / _hdl_build / nx_capability_audit.nx

nx_capability_audit.nx source

↩ module page · 55 lines · 5210 B

1import "nx_gate_gn.nx" 2import "nx_gate_base.nx" 3// nx_capability_audit.nx -- the STANDARD made mechanical (operator 2026-06-21: "capabilities is s class exceed not 4// just sovereign"). An S-class exceed = the CAPABILITY is measurably best-in-class AT ITS JOB (the output/behaviour is 5// more correct, catches more, more complete). SOVEREIGNTY (no third-party / no-lock-in / self-hosted / no-JS / 6// deterministic rebuild) is the FLOOR -- necessary, the substrate, but NOT an exceed by itself. This audit classifies 7// every claimed exceed CAPABILITY vs FLOOR, with the reason, and counts. FLOOR axes are DEMOTED out of the exceed 8// count (back to PRESENT) -- they become the build-up list. license_tier: ORIGINAL expect_exit: 0 9import "nx_syscalls.nx" 10 11func grow(name: *u8, ok: i64) -> i64 { if ok==1 { gw(" PASS " as *u8) } else { gw(" FAIL " as *u8) } gw(name); gw(" 12" as *u8); return ok } 13// cls 1 = CAPABILITY (better-at-job, measured); cls 0 = SOVEREIGNTY-FLOOR (architecture, not an exceed). 14func cap_row(name: *u8, cls: i64, reason: *u8, tot: *i64) -> i64 { 15 if cls == 1 { gw(" CAP " as *u8); tot[0]=tot[0]+1 } else { gw(" FLOOR " as *u8); tot[1]=tot[1]+1 } 16 gw(name); gw(" -- " as *u8); gw(reason); gw("\n" as *u8) 17 return 0 18} 19 20func main() -> i64 { 21 let tot: *i64 = sys_mmap(32) as *i64 22 tot[0]=0; tot[1]=0 23 gw("=== nx_capability_audit -- S-class exceed = CAPABILITY best-at-job, NOT sovereignty ===\n" as *u8) 24 gw("standard: an exceed must make the OUTPUT/behaviour measurably better. sovereignty (no-3rd-party/no-lock-in/\n" as *u8) 25 gw("no-JS/deterministic) is the FLOOR -- necessary substrate, not an exceed. FLOOR axes are demoted to PRESENT.\n\n" as *u8) 26 27 gw("-- GENUINE CAPABILITY exceeds (the artifact is measurably more correct / does what others can't) --\n" as *u8) 28 cap_row("AA/contrast enforced-or-refused on publish (a11y-as-brand)" as *u8, 1, "output GUARANTEED accessible from the tokens; incumbents let you ship inaccessible" as *u8, tot) 29 cap_row("WCAG 12-criteria enforced by construction" as *u8, 1, "output guaranteed on 12 criteria (axe audits-not-enforces); residual: axe 50+" as *u8, tot) 30 cap_row("brand-drift / off-token detection" as *u8, 1, "DETECTS off-brand drift incumbents have no tool for -- a capability they lack" as *u8, tot) 31 cap_row("color AA in BOTH light + dark" as *u8, 1, "output correct in both modes; incumbent dark modes often sub-AA" as *u8, tot) 32 cap_row("resize-safe modular type scale" as *u8, 1, "text stays zoom-correct (rem); incumbents allow zoom-breaking px" as *u8, tot) 33 cap_row("spacing every step on-grid" as *u8, 1, "layout rhythm guaranteed; incumbents allow arbitrary px" as *u8, tot) 34 cap_row("reduced-motion respected" as *u8, 1, "motion correct for vestibular users; incumbents often omit it" as *u8, tot) 35 cap_row("brand-book live-synced from tokens" as *u8, 1, "always-in-sync + measured contrast; incumbent books drift from the product" as *u8, tot) 36 cap_row("components re-theme (token-driven)" as *u8, 1, "re-theme without editing CSS, all variants stay consistent" as *u8, tot) 37 cap_row("multi-brand all-AA" as *u8, 1, "N brands each guaranteed AA; incumbent themes can ship off-brand/sub-AA" as *u8, tot) 38 cap_row("publish-time governance (refuse broken pages)" as *u8, 1, "broken/no-CTA/>3-step pages REFUSED; Wix/Webflow ship them" as *u8, tot) 39 cap_row("conversion-path measured + enforced" as *u8, 1, "bad funnels refused; incumbents allow them" as *u8, tot) 40 cap_row("untrusted AI/dev cannot break the brand" as *u8, 1, "safe multi-actor editing (robustness capability); incumbent model-in-trusted-path" as *u8, tot) 41 cap_row("privacy: tracker-free artifact" as *u8, 1, "the emitted page has 0 third-party beacons -- a measurably cleaner/safer artifact" as *u8, tot) 42 cap_row("editor guarantees valid + accessible layouts" as *u8, 1, "clamps on-canvas + WCAG-2.5.5 44px target by construction; mature editors allow invalid/inaccessible (RECLAIMED from floor)" as *u8, tot) 43 cap_row("migration importer (ingest a foreign site)" as *u8, 1, "import a competitor's site -> portable sovereign blueprint (tracking stripped); lock-in platforms can't import/export one (RECLAIMED from floor)" as *u8, tot) 44 45 gw("\n-- SOVEREIGNTY FLOOR (real + necessary, but NOT a capability-exceed -> demoted to PRESENT, build-up list) --\n" as *u8) 46 cap_row("governance-invariant capability tiers" as *u8, 0, "governance property, not a more-capable editor" as *u8, tot) 47 cap_row("R6 sovereignty / no-lock-in / determinism axes" as *u8, 0, "the floor axes themselves -- explicitly not capability-better-at-job" as *u8, tot) 48 49 gw("\nCAPABILITY-EXCEEDS = " as *u8); gn(tot[0]); gw(" SOVEREIGNTY-FLOOR (demoted) = " as *u8); gn(tot[1]); gw("\n" as *u8) 50 var ok: i64 = 0 51 if tot[0] == 16 { if tot[1] == 2 { ok = 1 } } 52 if ok == 1 { gw("VERDICT=GREEN -- 16 capability-exceeds stand on better-at-job; 2 sovereignty axes demoted (editor + no-lock-in RECLAIMED via guaranteed-valid layouts + a migration importer). Sovereignty is the floor, capability is the exceed.\n" as *u8); return 0 } 53 gw("VERDICT=RED -- recount\n" as *u8) 54 return 1 55}