code wiki / _hdl_build / nx_orca_census_gate.nx
nx_orca_census_gate.nx source
↩ module page · 118 lines · 11169 B
1// nx_orca_census_gate.nx -- ★THE AI GAME-AUTHORING + OPS CENSUS (operator 2026-07-13, ref orcaclient.com): score the
2// "describe it, get it built, deployed" capability class vs the banked Orca bar (knowledge/orca_banked.txt, fetched).
3// Adversarial: each axis carries a THEIR-needle that must be in the banked bytes; each OUR-claim names an artifact
4// FILE (liar-kill); verdicts are HONEST (this is a rung-1 workstream -> expect a low score). EXCEED claims must carry
5// a WHY (mechanism + measurement), not "sovereign". license_tier: ORIGINAL expect_exit: 0
6import "nx_syscalls.nx"
7
8func hw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
9func pn(v: i64) -> i64 { let b: *u8=sys_mmap(32) as *u8; var x: i64=v; var ng: i64=0; if x<0{ng=1;x=0-x} var i: i64=31; if x==0{b[i]=48 as u8;i=i-1} while x>0{b[i]=(48+x%10) as u8;x=x/10;i=i-1} if ng==1{b[i]=45 as u8;i=i-1} sys_write(1,(b as i64+i+1) as *u8,31-i); return 0 }
10func slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
11func contains(buf: *u8, n: i64, needle: *u8) -> i64 {
12 let m: i64 = slen(needle)
13 if m == 0 { return 1 }
14 var i: i64 = 0
15 while i + m <= n {
16 var k: i64 = 0
17 while k < m { if buf[i+k] != needle[k] { k = m + 9 } else { k = k + 1 } }
18 if k == m { return 1 }
19 i = i + 1
20 }
21 return 0
22}
23func fexists(path: *u8) -> i64 {
24 let szp: *i64 = sys_mmap(16) as *i64
25 let b: *u8 = sys_read_file(path, szp)
26 if (b as i64) == 0 { return 0 }
27 if szp[0] < 64 { return 0 }
28 return 1
29}
30func ocat(o: *u8, at: i64, s: *u8) -> i64 { var i: i64=0; var a: i64=at; while s[i]!=(0 as u8){o[a]=s[i]; a=a+1; i=i+1} return a }
31func ocatn(o: *u8, at: i64, v: i64) -> i64 {
32 let b: *u8 = sys_mmap(32) as *u8
33 var x: i64 = v
34 var i: i64 = 31
35 if x == 0 { b[i]=48 as u8; i=i-1 }
36 while x > 0 { b[i]=(48+x%10) as u8; x=x/10; i=i-1 }
37 var a: i64 = at
38 var j: i64 = i+1
39 while j < 32 { o[a]=b[j]; a=a+1; j=j+1 }
40 return a
41}
42// verdict 2 HAVE / 1 PARTIAL / 0 GAP
43func axis(rep: *u8, ro: *i64, bank: *u8, bankn: i64, name: *u8, needle: *u8, art: *u8, credit: i64, depth: i64, critic: *u8, sums: *i64) -> i64 {
44 var o: i64 = ro[0]
45 o = ocat(rep, o, "AXIS " as *u8); o = ocat(rep, o, name)
46 if contains(bank, bankn, needle) == 0 { o = ocat(rep, o, " UNGROUNDED -- EXCLUDED\n" as *u8); ro[0]=o; return 0-1 }
47 var af: i64 = 0
48 if slen(art) > 0 { af = fexists(art) }
49 var verdict: i64 = 0
50 if af == 1 { if credit == 1 { verdict = 1 } }
51 if verdict == 1 { if depth == 1 { verdict = 2 } }
52 if credit == 1 { if af == 0 { o = ocat(rep, o, " LIAR-KILL artifact MISSING -> GAP " as *u8) } }
53 if verdict == 2 { o = ocat(rep, o, " HAVE " as *u8) }
54 if verdict == 1 { o = ocat(rep, o, " PARTIAL " as *u8) }
55 if verdict == 0 { o = ocat(rep, o, " GAP " as *u8) }
56 o = ocat(rep, o, critic); o = ocat(rep, o, "\n" as *u8)
57 ro[0] = o
58 sums[0] = sums[0] + 1
59 if verdict == 2 { sums[1] = sums[1] + 1 }
60 if verdict == 1 { sums[2] = sums[2] + 1 }
61 return verdict
62}
63
64func main() -> i64 {
65 hw("=== nx_orca_census_gate -- AI game-authoring + ops, vs the banked Orca bar ===\n" as *u8)
66 var fails: i64 = 0
67 let szp: *i64 = sys_mmap(16) as *i64
68 let bank: *u8 = sys_read_file("knowledge/orca_banked.txt" as *u8, szp)
69 let bankn: i64 = szp[0]
70 var t1: i64 = 0
71 if (bank as i64) != 0 { if bankn > 500 { t1 = 1 } }
72 if t1 == 1 { hw("T1 PASS Orca bar banked ("); pn(bankn); hw(" bytes: describe->build, AI ops, hosting)\n" as *u8) }
73 else { fails=fails+1; hw("T1 FAIL bank missing\n" as *u8) }
74
75 let rep: *u8 = sys_mmap(131072)
76 let ro: *i64 = sys_mmap(16) as *i64
77 let sums: *i64 = sys_mmap(32) as *i64
78 var o: i64 = 0
79 o = ocat(rep, o, "AI GAME-AUTHORING + OPS CENSUS -- 2026-07-13. Them = Orca (describe a Minecraft mod -> AI writes/compiles/installs it; AI ops read crash logs + auto-fix + version-upgrade; 8GB server live in 30s). Us = the authoring layer on our sovereign generative engine, artifact liar-killed.\n\n" as *u8)
80 ro[0] = o
81
82 axis(rep, ro, bank, bankn, "NL authoring " as *u8, "describe" as *u8, "knowledge/nx_authorgen.png" as *u8, 1, 0, "PARTIAL (NEW 2026-07-13, nx_authorgen): describe a creature, a WORLD, or a GAME in words -> structured descriptor -> the engine BUILDS it, gate-verified (creatures: rabbit/monster/human + long-ears/4-arms/horns/tail; WORLDS: snow 161->591 from adjectives; GAMES: difficulty-scaled PLAYABLE browser game emitted+deployed live, causal); the ecosystem ALSO has nx_game_gen (theme->game-spec) + nx_forge (LLM-driven codegen->build->byte-judge->repair, fm_post_gen->:11434 Qwen seat); residual: unified FREE-NL front-end (this slice is rule-based v0)" as *u8, sums)
83 axis(rep, ro, bank, bankn, "intent-match validate" as *u8, "mod" as *u8, "runtime/_hdl_build/nx_authorgen_gate.nx" as *u8, 1, 1, "HAVE: the built artifact is VALIDATED against the request (requested features MEASURED present, subtractive features MEASURED absent) + nx_forge's byte-exact judge -- Orca compiles+installs but does not verify the build matches the described intent; ours is gate-proven" as *u8, sums)
84 axis(rep, ro, bank, bankn, "anti-hallucination " as *u8, "natural language" as *u8, "runtime/nx_authorgen.nx" as *u8, 1, 1, "HAVE + EXCEED (WHY): the authoring layer REPORTS which requested features it built and which it CANNOT, and REFUSES (builds nothing) for unrecognized requests -- 'a dragon that breathes fire' -> body + 3 honest unmet; 'a spaceship' -> refused. Orca's 'AI writes the code' can hallucinate a plausible-but-wrong mod; we never claim what we did not make (gate-proven)" as *u8, sums)
85 axis(rep, ro, bank, bankn, "deploy the artifact " as *u8, "deploy" as *u8, "knowledge/nx_authorgen.png" as *u8, 1, 0, "PARTIAL (deepened 2026-07-13): describe a GAME -> a REAL PLAYABLE browser game DEPLOYED LIVE (nishifamily.com/world/nx_authorgame, canvas+input+win, difficulty-scaled, nx_authorgame_gate 6/6 via the existing nx_game_web_emit) + creatures/worlds rendered/placeable; the FULL describe->build->validate->DEPLOY loop is closed for games; residual: a live MULTIPLAYER instance a describer can join" as *u8, sums)
86 axis(rep, ro, bank, bankn, "own the target engine" as *u8, "Fabric" as *u8, "runtime/nx_genome.nx" as *u8, 1, 0, "PARTIAL + EXCEED (WHY): Orca targets Minecraft (a black box via Fabric/Forge) so 'the AI wrote correct code' is UNVERIFIABLE; we OWN the target engine (nx_genome/worldpipe) so authoring is END-TO-END gate-verifiable + integer-deterministic; residual: we lack their game's reach/player base" as *u8, sums)
87 axis(rep, ro, bank, bankn, "AI ops auto-fix " as *u8, "crash log" as *u8, "runtime/nx_forge.nx" as *u8, 1, 0, "PARTIAL (grep-proven this session, was going to be mis-marked GAP): nx_forge banks the VERBATIM build/compiler output to a repair context and re-drives a BOUNDED repair loop (byte-exact judge, ACT cap 7) + nx_crew_selfheal SAFE-ACT (detect->authorize->heal->verify); residual: NOT wired to author-and-heal game CONTENT specifically (island), and no OS crash-log reader" as *u8, sums)
88 axis(rep, ro, bank, bankn, "version upgrade auto " as *u8, "upgrade" as *u8, "" as *u8, 0, 0, "GAP: no automated content version-migration ('upgrade to 1.21' equivalent) found in the ecosystem" as *u8, sums)
89 axis(rep, ro, bank, bankn, "fast hosting/publish " as *u8, "server" as *u8, "runtime/nx_golive.nx" as *u8, 1, 0, "PARTIAL: nx_golive = one-command domain->live (spend-capped) + nx_deploy orchestrator + nx_container_compose (topo-sorted launch plan); residual: one-command game-SERVER-in-30s with player slots for authored worlds" as *u8, sums)
90 axis(rep, ro, bank, bankn, "content registry " as *u8, "modpack" as *u8, "runtime/nx_app_publish.nx" as *u8, 1, 0, "PARTIAL: nx_app_publish = sovereign app store + nx_games_publish = arcade page (publish/browse); residual: authored creatures/worlds not yet pushed to a browsable content registry (their 6000 modpacks)" as *u8, sums)
91 axis(rep, ro, bank, bankn, "UNIFIED PRODUCT " as *u8, "mod" as *u8, "" as *u8, 0, 0, "GAP -- ★THE REAL GAP (grep-proven 2026-07-13): the ecosystem ALREADY HAS the Orca pieces as ISLANDS (nx_forge codegen+repair, nx_crew_selfheal, nx_golive/deploy hosting, nx_app_publish registry, nx_f32_llm_serve :11434 Qwen seat, nx_game_gen->web_emit); what is missing is INTEGRATION into ONE describe->build->validate->deploy->ops loop. nx_authorgen is the FIRST integrated slice (creatures). The roadmap is WIRING, not building-from-scratch" as *u8, sums)
92
93 hw("\n" as *u8)
94 let grounded: i64 = sums[0]
95 let have: i64 = sums[1]
96 let part: i64 = sums[2]
97 let gap: i64 = grounded-have-part
98 let score: i64 = (have*1000 + part*400) / grounded
99 hw(" grounded="); pn(grounded); hw(" HAVE="); pn(have); hw(" PARTIAL="); pn(part); hw(" GAP="); pn(gap); hw(" SCORE="); pn(score); hw("/1000\n" as *u8)
100 var t2: i64 = 0
101 if grounded >= 8 { if have < grounded*3/4 { if gap >= 2 { t2 = 1 } } }
102 if t2 == 1 { hw("T2 PASS grounded + the critic BITES (a rung-1 workstream; the Orca distance is named, not hidden)\n" as *u8) }
103 else { fails=fails+1; hw("T2 FAIL\n" as *u8) }
104
105 o = ro[0]
106 o = ocat(rep, o, "\nSCORE " as *u8); o = ocatn(rep, o, score); o = ocat(rep, o, "/1000 (HAVE " as *u8); o = ocatn(rep, o, have); o = ocat(rep, o, " / PARTIAL " as *u8); o = ocatn(rep, o, part); o = ocat(rep, o, " / GAP " as *u8); o = ocatn(rep, o, gap); o = ocat(rep, o, " of " as *u8); o = ocatn(rep, o, grounded); o = ocat(rep, o, ")\n" as *u8)
107 o = ocat(rep, o, "\n★KEY FINDING: this is an INTEGRATION workstream, not a build-from-scratch one. The Orca capabilities exist as ISLANDS; the coach ladder WIRES them.\nCOACH LADDER (leverage-ordered, all WIRING existing organs): O1 free-NL front-end -- point nx_authorgen at nx_f32_llm_serve (:11434 Qwen /chat) so open vocabulary drives the descriptor, not keywords - O2 more content types -- WORLDS DONE (describe->nx_worldpipe character, gated); NEXT a GAME (-> nx_game_gen spec -> nx_game_web_emit playable browser game) through the same front-end - O3 EDIT-existing (bridge nx_game_edit) - O4 AI OPS loop -- wire nx_forge's read-build-output->repair around authored content (gate fails -> auto-fix the descriptor) - O5 one-command game hosting -- bridge nx_golive/nx_container_compose to spin a live authored world others join - O6 content registry -- publish authored creatures/worlds via nx_app_publish/nx_games_publish.\n" as *u8)
108 rep[o] = 0 as u8
109 let fd: i64 = sys_openat_wr("knowledge/orca_census.txt\x00" as *u8, 0x1a4)
110 sys_write(fd, rep, o)
111 sys_close(fd)
112 hw("T3 report + coach ladder -> knowledge/orca_census.txt ("); pn(o); hw(" bytes)\n" as *u8)
113
114 if fails == 0 { hw("ORCA-CENSUS GREEN -- the AI game-authoring/ops instrument stands: "); pn(score); hw("/1000 vs Orca; the describe->build->validate rung is real, ops+hosting are named GAPs\n" as *u8); sys_exit(0); return 0 }
115 hw("ORCA-CENSUS RED fails="); pn(fails); hw("\n" as *u8)
116 sys_exit(1)
117 return 1
118}