code wiki / _hdl_build / nx_eco_dashboard.nx
nx_eco_dashboard.nx source
↩ module page · 89 lines · 9783 B
1// nx_eco_dashboard.nx -- the LIVING ECOSYSTEM DASHBOARD for the Nishi wiki (operator: "backlog + roadmap onto
2// the wiki, built live, with a callout mapping on a GRAPH from the hardware layer up, with Nishi visuals, how
3// our FOOTPRINT is reducing and where the OPPORTUNITIES are as we prioritize the backlog"). DATA-DRIVEN +
4// sovereign emit (inline SVG, no libs): a vertical STACK GRAPH L0(machine code) -> L9(app), each layer's bar
5// width = maturity, color = grade, with gold OPPORTUNITY callouts on the keystones/raised-hands; a FOOTPRINT
6// panel (external deps retired over the arc + the Claude-load trend); an OPPORTUNITIES panel (highest-leverage
7// next moves). Re-encode the grades (Auditor/Compliance re-measure) -> re-run -> living. license_tier: ORIGINAL
8import "nx_syscalls.nx"
9
10func dw(fd: i64, s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(fd,s,n); return n }
11func dn(fd: i64, v: i64) -> i64 { let b: *u8=sys_mmap(28); var m: i64=v; 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%10)) as u8;m=m/10;k=k+1}; var i: i64=0; while i<k{b[i]=t[k-1-i];i=i+1}; sys_write(fd,b,k); return 0 }
12
13func g_label(g: i64) -> *u8 { if g==1 {return "TOY" as *u8} if g==2 {return "FUNCTIONAL" as *u8} if g==3 {return "PRODUCTION" as *u8} if g==4 {return "S-CLASS" as *u8} if g>=5 {return "EXCEED" as *u8} return "ABSENT" as *u8 }
14func g_color(g: i64) -> *u8 { if g<=1 {return "#b3261e" as *u8} if g==2 {return "#b9770e" as *u8} if g==3 {return "#13315c" as *u8} if g==4 {return "#1e7d34" as *u8} return "#B68A35" as *u8 }
15
16const NLY: i64 = 8
17
18func main() -> i64 {
19 let lid:*i64=sys_mmap(8*NLY) as *i64; let lname:*i64=sys_mmap(8*NLY) as *i64; let lg:*i64=sys_mmap(8*NLY) as *i64; let lco:*i64=sys_mmap(8*NLY) as *i64
20 lid[0]="L0" as *u8 as i64; lname[0]="Machine code / syscalls" as *u8 as i64; lg[0]=3; lco[0]="" as *u8 as i64
21 lid[1]="L1" as *u8 as i64; lname[1]="Compiler (NishiLang->x86)" as *u8 as i64; lg[1]=1; lco[1]="KEYSTONE: regalloc + miscompile" as *u8 as i64
22 lid[2]="L2" as *u8 as i64; lname[2]="Toolchain / Linker (nxasm/ELF)" as *u8 as i64; lg[2]=3; lco[2]="byte-exact -> retire gcc" as *u8 as i64
23 lid[3]="L3" as *u8 as i64; lname[3]="Crypto (SHA/ECDSA/ChaCha)" as *u8 as i64; lg[3]=2; lco[3]="raised hand: Argon2id" as *u8 as i64
24 lid[4]="L5" as *u8 as i64; lname[4]="TLS 1.3 + SSH" as *u8 as i64; lg[4]=2; lco[4]="W1: OpenSSH benchmark" as *u8 as i64
25 lid[5]="L7" as *u8 as i64; lname[5]="Hosting (multi-site, hot)" as *u8 as i64; lg[5]=3; lco[5]="A1 boot / A3 zero-downtime" as *u8 as i64
26 lid[6]="L8" as *u8 as i64; lname[6]="Site / CMS / Search" as *u8 as i64; lg[6]=2; lco[6]="raised hand: sanitizer + content" as *u8 as i64
27 lid[7]="L9" as *u8 as i64; lname[7]="Team / Process / Autonomy" as *u8 as i64; lg[7]=3; lco[7]="drive Claude-load -> 0" as *u8 as i64
28
29 var sum: i64=0; var i: i64=0; while i<NLY { sum=sum+lg[i]; i=i+1 }
30 let pct: i64 = sum*100/(NLY*5)
31
32 let fd: i64 = sys_openat_wr("/tmp/nishi_dashboard.html" as *u8, 0x1a4)
33 dw(fd, "<!doctype html><html lang=\"en\"><head><meta charset=\"utf-8\"><meta name=\"viewport\" content=\"width=device-width,initial-scale=1\">\n" as *u8)
34 dw(fd, "<title>Nishi Ecosystem -- Living Roadmap & Footprint</title><style>\n" as *u8)
35 dw(fd, ":root{--ink:#0A1B2E;--brand:#13315C;--accent:#B68A35;--paper:#FBFAF7;--line:#E4E0D7;--muted:#566273}\n" as *u8)
36 dw(fd, "*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font:15px/1.55 system-ui,-apple-system,\"Segoe UI\",sans-serif}\n" as *u8)
37 dw(fd, "h1,h2{font-family:Georgia,serif;color:var(--brand);margin:0 0 .3em}.wrap{max-width:1080px;margin:0 auto;padding:0 22px}\n" as *u8)
38 dw(fd, "header{background:linear-gradient(160deg,#13315C,#0B2545);color:#fff;padding:34px 0}header h1{color:#fff;font-size:1.9rem}header p{color:#cfd9e8;margin:.3em 0 0}\n" as *u8)
39 dw(fd, ".grid2{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin:22px 0}.card{background:#fff;border:1px solid var(--line);border-radius:12px;padding:20px}\n" as *u8)
40 dw(fd, "@media(max-width:780px){.grid2{grid-template-columns:1fr}}\n" as *u8)
41 dw(fd, ".chip{display:inline-block;padding:3px 10px;border-radius:20px;font-size:.78rem;font-weight:700;margin:3px 4px 3px 0}\n" as *u8)
42 dw(fd, ".gone{background:#eee;color:#999;text-decoration:line-through}.dep{background:#b9770e;color:#fff}.tgt{background:#1e7d34;color:#fff}\n" as *u8)
43 dw(fd, ".bar{height:16px;border-radius:8px;background:#eee;overflow:hidden;margin:6px 0}.bar>span{display:block;height:100%;background:linear-gradient(90deg,#13315C,#B68A35)}\n" as *u8)
44 dw(fd, "ul{margin:.4em 0;padding-left:1.1em}li{margin:.3em 0}.muted{color:var(--muted)}svg{max-width:100%;height:auto}footer{background:#0B2545;color:#aebdd2;padding:20px 0;font-size:.8rem;margin-top:8px}\n" as *u8)
45 dw(fd, "</style></head><body>\n" as *u8)
46 dw(fd, "<header><div class=\"wrap\"><h1>Nishi Ecosystem -- Living Roadmap</h1><p>Hardware up. Maturity per layer, where our footprint is shrinking, and the highest-leverage opportunities. Auto-generated from team measurements.</p></div></header>\n" as *u8)
47
48 dw(fd, "<div class=\"wrap\"><div class=\"card\" style=\"margin-top:22px\"><h2>Overall progress to S-class-EXCEED: " as *u8); dn(fd, pct); dw(fd, "%</h2><div class=\"bar\"><span style=\"width:" as *u8); dn(fd, pct); dw(fd, "%\"></span></div></div>\n" as *u8)
49
50 // ---- SVG layered stack graph: L0 (bottom) -> L9 (top); width=maturity, color=grade, gold callouts ----
51 dw(fd, "<div class=\"card\" style=\"margin:22px 0\"><h2>The stack, hardware up</h2>\n" as *u8)
52 dw(fd, "<svg viewBox=\"0 0 1000 540\" role=\"img\" aria-label=\"Nishi stack maturity by layer\">\n" as *u8)
53 i = 0
54 while i < NLY {
55 let y: i64 = 30 + (NLY - 1 - i) * 60 // L0 at bottom
56 let bw: i64 = 70 + lg[i] * 60 // bar width by maturity (grade 1..5 -> 130..370)
57 dw(fd, "<text x=\"12\" y=\"" as *u8); dn(fd, y+30); dw(fd, "\" font-family=\"Georgia,serif\" font-size=\"15\" fill=\"#0A1B2E\">" as *u8); dw(fd, lid[i] as *u8); dw(fd, " " as *u8); dw(fd, lname[i] as *u8); dw(fd, "</text>\n" as *u8)
58 dw(fd, "<rect x=\"330\" y=\"" as *u8); dn(fd, y); dw(fd, "\" width=\"" as *u8); dn(fd, bw); dw(fd, "\" height=\"42\" rx=\"7\" fill=\"" as *u8); dw(fd, g_color(lg[i])); dw(fd, "\"/>\n" as *u8)
59 dw(fd, "<text x=\"344\" y=\"" as *u8); dn(fd, y+27); dw(fd, "\" font-size=\"13\" font-weight=\"700\" fill=\"#fff\">" as *u8); dw(fd, g_label(lg[i])); dw(fd, "</text>\n" as *u8)
60 // opportunity callout (gold) for layers that have one
61 let c: *u8 = lco[i] as *u8
62 if c[0] != (0 as u8) {
63 dw(fd, "<line x1=\"" as *u8); dn(fd, 330+bw); dw(fd, "\" y1=\"" as *u8); dn(fd, y+21); dw(fd, "\" x2=\"720\" y2=\"" as *u8); dn(fd, y+21); dw(fd, "\" stroke=\"#B68A35\" stroke-width=\"1.5\" stroke-dasharray=\"3,3\"/>\n" as *u8)
64 dw(fd, "<rect x=\"720\" y=\"" as *u8); dn(fd, y+4); dw(fd, "\" width=\"268\" height=\"34\" rx=\"6\" fill=\"#FBF3DF\" stroke=\"#B68A35\"/>\n" as *u8)
65 dw(fd, "<text x=\"732\" y=\"" as *u8); dn(fd, y+26); dw(fd, "\" font-size=\"12.5\" fill=\"#7a5a13\">⚠ " as *u8); dw(fd, c); dw(fd, "</text>\n" as *u8)
66 }
67 i = i + 1
68 }
69 dw(fd, "</svg><p class=\"muted\">Bar width & color = maturity (red TOY -> gold EXCEED). Gold callouts = the opportunities we prioritize next.</p></div>\n" as *u8)
70
71 // ---- footprint + opportunities, side by side ----
72 dw(fd, "<div class=\"grid2\">\n" as *u8)
73 dw(fd, "<div class=\"card\"><h2>Footprint is shrinking</h2><p class=\"muted\">External / non-sovereign dependencies retired over the arc:</p>\n" as *u8)
74 dw(fd, "<div><span class=\"chip gone\">python</span><span class=\"chip gone\">bash orchestration</span><span class=\"chip gone\">C on the x86 path</span><span class=\"chip gone\">hand .sh deploys</span></div>\n" as *u8)
75 dw(fd, "<p class=\"muted\" style=\"margin-top:10px\">Still on the path (the last rungs):</p><div><span class=\"chip dep\">gcc (link)</span><span class=\"chip dep\">.sh boot supervisor</span> <span class=\"chip tgt\">target: 0</span></div>\n" as *u8)
76 dw(fd, "<p class=\"muted\" style=\"margin-top:12px\"><b>Claude-load</b> (tutoring footprint, the metric we drive to zero): 50% -> 64% on the novel CMS build (honest -- authoring spikes it), then falls as the Builder gains the capability. Tracked by the tutoring ledger.</p></div>\n" as *u8)
77
78 dw(fd, "<div class=\"card\"><h2>Where the opportunities are</h2><ul>\n" as *u8)
79 dw(fd, "<li><b>L1 Compiler keystone</b> -- regalloc O(n^2)->O(n log n) + fix the captured miscompile. Unblocks fast sovereign builds across the whole stack.</li>\n" as *u8)
80 dw(fd, "<li><b>Two raised hands</b> -- Argon2id (-> Engineer) + the HTML allowlist-sanitizer (-> Builder). Unblock the CMS auth + safe editing.</li>\n" as *u8)
81 dw(fd, "<li><b>A1 sovereign supervisor at boot</b> -- retires the last .sh, shrinking the footprint to gcc-only.</li>\n" as *u8)
82 dw(fd, "<li><b>andelinwest real content + WCAG 2.2 AA audit</b> -- moves the site FUNCTIONAL -> S-class (needs your firm facts).</li>\n" as *u8)
83 dw(fd, "</ul><p class=\"muted\">Prioritized by WSJF in the PM backlog; each opportunity is a callout on the graph above.</p></div></div>\n" as *u8)
84
85 dw(fd, "<footer><div class=\"wrap\">Nishi Ecosystem -- sovereign, bits-up. Living: re-graded by the Auditor + Compliance, re-generated, pushed hot to this wiki.</div></footer>\n</body></html>\n" as *u8)
86 sys_close(fd)
87 dw(1, "dashboard generated: /tmp/nishi_dashboard.html overall=" as *u8); dn(1, pct); dw(1, "%\n" as *u8)
88 sys_exit(0); return 0
89}