code wiki / _hdl_build / nx_companion_census.nx
nx_companion_census.nx source
↩ module page · 100 lines · 10181 B
1// nx_companion_census.nx -- HONEST measured census: where does OUR sovereign companion media-gen stack (persona
2// + memory + visual-arc + render + frontend, all .nx/gated) stand vs the OLD Elder AI platform that generated the
3// good images (operator: "really evaluate ... get us back to the old images we generated but with REAL arcs and
4// experiences instead of the FAILED systems we had"). Bar = the OLD system, GROUNDED in its own files (recon'd
5// live via nx_companion_recon): arc.db (10-beat narrative arcs w/ symbolic continuity), disasters.json (the
6// identity-drift failure corpus + the triangulation detector that CATCHES it), identity.db (anthropometric
7// identity), arc_stability + benchmark_regression (quality discipline). Verdict per axis = xcd_verdict(us,bar),
8// NEVER asserted; AHEAD liar-killed unless we meet ALL criteria; SOVEREIGNTY tagged [FLOOR] (a real win that does
9// NOT close the media-gen quality/arc gap). Mirrors nx_deepresearch_census. license_tier: ORIGINAL expect_exit: 0
10import "nx_cms_exceed.nx" // xcd_* + sys_* (transitive)
11
12func sw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
13func sn(v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0} 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{bb[i]=t[k-1-i];i=i+1} sys_write(1,bb,k); return 0 }
14func have(path: *u8) -> i64 { let fd: i64=sys_openat_rd(path); if fd<0 {return 0} sys_close(fd); return 1 }
15
16// tot: [0]=BEHIND [1]=PARITY [2]=AHEAD [3]=INVALID [4]=AHEAD-FLOOR [5]=AHEAD-CAP [6]=UNGROUNDED
17func row(dom: *u8, cap: *u8, our_c: i64, bar_c: i64, n: i64, ev: *u8, ground: *u8, floor: i64, tot: *i64) -> i64 {
18 let v: i64 = xcd_verdict(our_c, bar_c)
19 let ok: i64 = xcd_referee_ok(v, our_c, n)
20 let g: i64 = have(ground)
21 sw(" [" as *u8); sw(dom); sw("] " as *u8); sw(cap); sw(" -> " as *u8); sw(xcd_vname(v))
22 sw(" (us " as *u8); sn(our_c); sw("/" as *u8); sn(n); sw(") " as *u8); sw(ev)
23 if floor==1 { sw(" [FLOOR: sovereignty, NOT the media-gen gap]" as *u8) }
24 if ok==0 { sw(" <== INVALID (LIAR-KILL)" as *u8); tot[3]=tot[3]+1 }
25 if g==0 { sw(" [UNGROUNDED: bar file absent]" as *u8); tot[6]=tot[6]+1 }
26 sw("\n" as *u8)
27 if v==XCD_BEHIND { tot[0]=tot[0]+1 }
28 if v==XCD_PARITY { tot[1]=tot[1]+1 }
29 if v==XCD_AHEAD { tot[2]=tot[2]+1; if floor==1 {tot[4]=tot[4]+1} else {tot[5]=tot[5]+1} }
30 return 0
31}
32
33func main() -> i64 {
34 let tot: *i64 = sys_mmap(128) as *i64
35 var z: i64=0; while z<7 {tot[z]=0; z=z+1}
36 let PV: *u8 = "/mnt/c/Users/elder/elder-ai-platform" as *u8
37 let ARC: *u8 = "/mnt/c/Users/elder/elder-ai-platform/data-vault/arc.db" as *u8
38 let DIS: *u8 = "/mnt/c/Users/elder/elder-ai-platform/data-vault/calibration_corpus/disasters_2026-05-06.json" as *u8
39 let IDN: *u8 = "/mnt/c/Users/elder/elder-ai-platform/data-vault/identity.db" as *u8
40 let AST: *u8 = "/mnt/c/Users/elder/elder-ai-platform/data-vault/benchmarks/arc_stability/arc_stability.db" as *u8
41 let REG: *u8 = "/mnt/c/Users/elder/elder-ai-platform/data-vault/benchmark_regression.py" as *u8
42
43 sw("=== nx_companion_census -- OUR sovereign companion media-gen vs the OLD Elder AI platform (the good images) ===\n" as *u8)
44 sw("bar = the OLD system, grounded in its own files. verdict = xcd_verdict(us,bar) COMPUTED. [FLOOR]=sovereign win, not the media-gen gap. scale 2=full 1=partial 0=absent.\n" as *u8)
45
46 sw("\n-- A. SOVEREIGN / OPS FLOOR (genuine, by-construction -- does NOT make our IMAGES better) --\n" as *u8)
47 row("FLR" as *u8, "fully sovereign .nx stack (no Docker/Python/SQLite; old platform is 149 py svcs on Docker)" as *u8, 1,0,1, "[ev: persona/memory/visual_arc/render/elder_ui all nx_cc, gated]" as *u8, PV, 1, tot)
48 row("FLR" as *u8, "local + private + uncensored persona-freedom (rule 25)" as *u8, 1,0,1, "[ev: seg_store local; persona=sole authority, no censor]" as *u8, PV, 1, tot)
49 row("FLR" as *u8, "no-fragility: every organ gated w/ neg-control (old system has content_corrupted DBs)" as *u8, 1,0,1, "[ev: 20+ green gates vs the platform's corrupted DBs]" as *u8, PV, 1, tot)
50
51 sw("\n-- A'. CAPABILITY WE HAVE CLEANER (genuine, not floor) --\n" as *u8)
52 row("PSN" as *u8, "persona=sole behavior authority + MECHANICAL fidelity metric (break-score)" as *u8, 1,0,1, "[ev: nx_persona 5/5; old had prose, no mechanical break-score]" as *u8, PV, 0, tot)
53 row("MEM" as *u8, "TOTAL append-only episodic memory + relationship state, per-persona isolated" as *u8, 1,0,1, "[ev: nx_companion_memory 5/5 + rel 7/7]" as *u8, PV, 0, tot)
54
55 sw("\n-- B. MEDIA-GEN INTELLIGENCE (the POINT -- the good images + REAL arcs -- where we are BEHIND) --\n" as *u8)
56 row("IDP" as *u8, "IDENTITY-PERSISTENCE detector (face_embedding+hair_color+caption triangulation)" as *u8, 0,2,2, "[disasters.json: catches the brunette/asian DRIFT; OURS=text anchor, NO detector -- my brunette error proves it]" as *u8, DIS, 0, tot)
57 row("ARC" as *u8, "NARRATIVE arcs: multi-BEAT stories w/ symbolic continuity (the real arcs and experiences)" as *u8, 1,2,2, "[arc.db: 10-beat honeymoon arc, ring/veil continuity; OURS=odometer rotation, NO story/beats]" as *u8, ARC, 0, tot)
58 row("QUA" as *u8, "IMAGE-QUALITY scoring (VLM-scan A/B-tier, director awards, micro-detail)" as *u8, 0,2,2, "[benchmark_regression + VLM-scan; OURS composes PROMPTS, does not RUN or SCORE the gen]" as *u8, REG, 0, tot)
59 row("ANT" as *u8, "ANTHROPOMETRIC identity (clavicle/chest/areola/navel measurements for body consistency)" as *u8, 0,2,2, "[identity.db precise cm/norm cols; OURS=prose body line only]" as *u8, IDN, 0, tot)
60 row("CNT" as *u8, "CONTENT richness: clothing_narratives/removal, continuity_transitions, per-location rules" as *u8, 1,2,2, "[content taxonomy 20+ tables; OURS=14 flat outfits x 8 scenes]" as *u8, PV, 0, tot)
61 row("EXP" as *u8, "EXPERIENCES: interactive games (StripPoker) + video avatar" as *u8, 0,2,2, "[old UI StripPokerGame+VideoAvatar; OURS=image + chat only]" as *u8, PV, 0, tot)
62 row("ARS" as *u8, "ARC-STABILITY discipline (identity/outfit/pose continuity across a sequence, tested)" as *u8, 0,2,2, "[arc_stability.db walk_toward_camera frames; OURS=no cross-frame continuity test]" as *u8, AST, 0, tot)
63
64 sw("\n-- C. PARITY / PRESENT (we roughly match the bar) --\n" as *u8)
65 row("WRD" as *u8, "wardrobe/scene VARIATION (the clothes-shift, arc-moves fix)" as *u8, 2,2,2, "[ev: visual_arc odometer 896 looks, no-repeat proven -- the FIX]" as *u8, PV, 0, tot)
66 row("DNA" as *u8, "canonical character DNA (the RIGHT Elara: platinum-blonde, Nata Lee face, slim+32F)" as *u8, 2,2,2, "[ev: nx_elder_seed, corrected vs disasters.json canonical]" as *u8, DIS, 0, tot)
67 row("LNK" as *u8, "dual-use chat<->image link (chat can share a photo + remember it)" as *u8, 1,2,2, "[companion_photo links share+memory; old had chat-triggered gen]" as *u8, PV, 0, tot)
68
69 sw("\n=== SUMMARY ===\n" as *u8)
70 sw("BEHIND = " as *u8); sn(tot[0]); sw(" (the media-gen quality/arc/identity axes = the good-images gap)\n" as *u8)
71 sw("PARITY = " as *u8); sn(tot[1]); sw(" (wardrobe variation, character DNA, chat-image link)\n" as *u8)
72 sw("AHEAD = " as *u8); sn(tot[2]); sw(" of which capability=" as *u8); sn(tot[5]); sw(" FLOOR(sovereignty)=" as *u8); sn(tot[4]); sw("\n" as *u8)
73 sw("INVALID(liar-killed) = " as *u8); sn(tot[3]); sw(" UNGROUNDED = " as *u8); sn(tot[6]); sw("\n" as *u8)
74 sw("TOTAL GRADED = " as *u8); sn(tot[0]+tot[1]+tot[2]); sw("\n" as *u8)
75
76 sw("\n-- NEG-CONTROL (must be CAUGHT) -- fabricated 'our stack already AHEAD on identity-persistence' (us 0/2) -> " as *u8)
77 let neg: i64 = xcd_referee_ok(XCD_AHEAD, 0, 2)
78 var neg_caught: i64 = 0
79 if neg==0 { sw("REJECTED (liar-kill fired)\n" as *u8); neg_caught=1 } else { sw("ACCEPTED (BROKEN)\n" as *u8) }
80
81 sw("\n=== OPTIONS LADDER (get back to old images + REAL arcs, SOVEREIGNLY -- priority order) ===\n" as *u8)
82 sw(" R1 IDENTITY-PERSISTENCE (the drift-catcher): sovereign triangulation = hair_color + caption_check on the composed prompt NOW (would have caught my brunette error) + face_embedding via nx_sovereign_image_fr on the RENDERED image. THE first gate.\n" as *u8)
83 sw(" R2 NARRATIVE ARCS (the real arcs and experiences): port arc.db -> a sovereign arc organ = N BEATS + symbolic continuity + arc_continuity_state, REPLACING the odometer with a STORY. What the operator most named.\n" as *u8)
84 sw(" R3 CONTENT INGEST: sovereign-ingest the old taxonomy (clothing_narratives, continuity_transitions, per-location outfit rules) from content.db (needs a sovereign SQLite reader).\n" as *u8)
85 sw(" R4 QUALITY SCORING: sovereign VLM-scan / quality gate on the rendered image + regression floor.\n" as *u8)
86 sw(" R5 EXPERIENCES: sovereign games + video (LTX DiT reuse) once R1-R4 land.\n" as *u8)
87 sw(" R6 RESEARCHER: bank the char-consistency SOTA (IP-Adapter/InstantID/PhotoMaker/LoRA) to set the PARITY-vs-SOTA bar.\n" as *u8)
88
89 sw("\n=== VERDICT ===\n" as *u8)
90 var green: i64 = 1
91 if tot[3] != 0 { green = 0 }
92 if neg_caught != 1 { green = 0 }
93 if green==1 {
94 sw("GREEN -- census honest: 0 fabricated exceeds, liar-kill armed. TRUTH: our sovereign stack EXCEEDS the old platform ONLY on the FLOOR (" as *u8); sn(tot[4]); sw(" sovereignty) + " as *u8); sn(tot[5]); sw(" cleaner capabilities; PARITY on " as *u8); sn(tot[1]); sw(".\n" as *u8)
95 sw(" It is BEHIND on " as *u8); sn(tot[0]); sw(" MEDIA-GEN axes -- identity-persistence, narrative-arcs, quality-scoring, anthropometric, content, experiences, arc-stability = exactly 'the old images + real arcs.' NOT yet at old parity. R1 (identity-persistence) + R2 (narrative arcs) = the two the operator named; first.\n" as *u8)
96 sys_exit(0); return 0
97 }
98 sw("RED -- liar-kill integrity failed\n" as *u8)
99 sys_exit(1); return 1
100}