code wiki / (root) / nx_brand_apply_enforced.nx

nx_brand_apply_enforced.nx

buildroot/runtime/nx_brand_apply_enforced.nx

5927 B98 linesdepth 3pulls 5 transitivereach 0 importersview sourcekind tooltopic brand
docsdependenciesstructsconstsfunctions

about

nx_brand_apply_enforced.nx -- the "gorgeous-by-default" ENFORCEMENT gate (operationalizes nx_emitter_bench). So we GET s-class-exceed instead of hoping for it: this is a reusable PASS/FAIL an emitter compile-gate calls on its output HTML. It FAILS any page that isn't on the design-system adoption bar, so no emitter can ship an off-SSOT / un-responsive / inaccessible page again. Composes nx_uxcx_grade's pure byte-scan (uxg_has_lit) -- no reinvention. Proven here against REAL emitted pages: the tokenized site-builder pipeline PASSES, a bare legacy page FAILS (neg-control), and it pinpoints each page's specific gap. THE BAR (the 6 "gorgeous-by-default" invariants, each an HTML-observable signal): 1 canonical design tokens (var(--nx-*), the shared SSOT) 2 responsive (@media(max-width) 3 accessible motion (prefers-reduced-motion) 4 keyboard a11y (:focus-visible) 5 sovereign (no external http asset) 6 semantic landmarks (<header + <footer) (skip-link is reported as a WARN, not gated -- it's the site-builder's one remaining a11y polish item.) 100% sovereign. license_tier: ORIGINAL expect_exit: 0

dependencies 2 imports · 0 importers

nx_syscalls_x86_64.nx nx_sclass_enforce_lib.nx nx_brand_apply_enforced.nx

imports: nx_syscalls_x86_64.nxnx_sclass_enforce_lib.nx

imported by: nobody (leaf or entry point)

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

main ew audit ew ↻ violations sce_violations sce_tokens uxg_has_lit uxg_has uxg_len sce_responsive uxg_has_lit ↻ sce_motion uxg_has_lit ↻ sce_focus uxg_has_lit ↻ sce_sovereign uxg_sovereign_ok uxg_has_lit ↻ sce_landmarks uxg_has_lit ↻ en list_violations sce_tokens ↻ ew ↻ sce_responsive ↻ sce_motion ↻ sce_focus ↻ sce_sovereign ↻ sce_landmarks ↻ sce_skiplink uxg_skiplink_ok uxg_has_lit ↻ violations ↻ tcheck ew ↻ en ↻

structs

none

consts

none

functions

17func ew(s: *u8) -> i64 { var n: i64=0; while s[n]!=0 { n=n+1 } sys_write(1,s,n); return 0 }
18func en(v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m;sys_write(1,"-" as *u8,1)} let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=48 as u8;k=1} while m>0{t[k]=(48+(m-(m/10)*10)) as u8;m=m/10;k=k+1} var i: i64=0; while i<k{bb[i]=t[k-1-i];i=i+1} sys_write(1,bb,k); return 0 }
called by 2: auditmain
21func violations(h: *u8, n: i64) -> i64 { return sce_violations(h, n) }
called by 2: auditmain calls 1: sce_violations
22func list_violations(h: *u8, n: i64) -> i64
34func audit(name: *u8, path: *u8) -> i64
called by 1: main calls 4: ewviolationsenlist_violations
47func tcheck(pass: i64, label: *u8, fails: *i64) -> i64
called by 1: main calls 1: ew
53func main() -> i64