nx_erotica_census.nx source
↩ module page · 101 lines · 12329 B
1// nx_erotica_census.nx -- the MEASURED, HONEST census for EROTICA-writing craft (operator 2026-07-01: "erotica
2// really s-class exceed, measured against with the nishi researcher -> a clear census + roadmap to build gorgeous
3// smut"). Grounded in the sovereign researcher (knowledge/fetched/ero_*.raw) + the existing organs. It does NOT
4// wave: a capability is HAVE only when a real GREEN gate OR an on-disk organ/service proves it (liar-kill: no
5// evidence -> GAP); it LEADS WITH THE GAPS = the roadmap. Yardsticks (never deps): NovelAI/ErosWriter/SillyTavern/
6// KoboldCpp (local, uncensored) + the craft masters. The honest read: strong GOVERNANCE (explicit->local seam,
7// consent-routing) + arousal-tiered DATA + fresh RESEARCH, but the CRAFT that makes smut GORGEOUS (emotion>
8// physical 4:1, sensory-displacement, tension slow-burn, afterglow, anti-slop) is the gap. Explicit prose is
9// generated on the operator LOCAL seat (the seam); this census measures the sovereign craft machine around it.
10// license_tier: ORIGINAL module: nishi-core.erotica.census
11import "nx_syscalls.nx"
12
13func c_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
14func c_num(v: i64) -> i64 {
15 let bb: *u8 = sys_mmap(28); var m: i64 = v
16 let t: *u8 = sys_mmap(28); var k: i64 = 0; if m == 0 { t[0] = 48 as u8; k = 1 }
17 while m > 0 { t[k] = (48 + (m % 10)) as u8; m = m / 10; k = k + 1 }
18 var i: i64 = 0; while i < k { bb[i] = t[k - 1 - i]; i = i + 1 } sys_write(1, bb, k); return 0
19}
20func c_lognum(fd: i64, v: i64) -> i64 {
21 let db: *u8 = sys_mmap(28); var m: i64 = v; var k: i64 = 0; if m == 0 { db[0] = 48 as u8; k = 1 }
22 while m > 0 { db[k] = (48 + (m % 10)) as u8; m = m / 10; k = k + 1 }
23 let rv: *u8 = sys_mmap(28); var x: i64 = 0; while x < k { rv[x] = db[k - 1 - x]; x = x + 1 } sys_write(fd, rv, k); return 0
24}
25func c_w(fd: i64, s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(fd, s, n); return 0 }
26func c_contains_green(path: *u8) -> i64 {
27 let szp: *i64 = sys_mmap(16) as *i64
28 let buf: *u8 = sys_read_file(path, szp)
29 if (buf as i64) == 0 { return 0 }
30 let n: i64 = szp[0]; let ndl: *u8 = "GREEN" as *u8; let nl: i64 = 5
31 var i: i64 = 0
32 while i + nl <= n { var j: i64 = 0; var hit: i64 = 1; while j < nl { if buf[i + j] != ndl[j] { hit = 0; j = nl } else { j = j + 1 } } if hit == 1 { return 1 } i = i + 1 }
33 return 0
34}
35func c_exists(path: *u8) -> i64 { let fd: i64 = sys_openat_rd(path); if fd < 0 { return 0 } sys_close(fd); return 1 }
36func c_have(ok: i64, dim: *u8, why: *u8) -> i64 {
37 if ok == 1 { c_puts(" [HAVE] " as *u8) } else { c_puts(" [GAP!] " as *u8) }
38 c_puts(dim); c_puts(" <- " as *u8); c_puts(why); c_puts("\n" as *u8)
39 return ok
40}
41func c_gap(dim: *u8, why: *u8) -> i64 { c_puts(" [GAP!] " as *u8); c_puts(dim); c_puts(" <- " as *u8); c_puts(why); c_puts("\n" as *u8); return 0 }
42
43func main() -> i64 {
44 c_puts("=== NISHI EROTICA-CRAFT CENSUS (gorgeous smut; measured vs NovelAI/ErosWriter/SillyTavern + the craft masters; gaps first) ===\n" as *u8)
45
46 var have: i64 = 0
47 let total: i64 = 23
48
49 c_puts("-- SUBSTRATE WE HAVE (governance + arousal-data + research; each on a real gate/organ) --\n" as *u8)
50 have = have + c_have(c_exists("runtime/nx_writer_run.nx" as *u8), "explicit -> LOCAL-lane governance SEAM (never cloud; the assistant authors NO explicit prose)" as *u8, "runtime/nx_writer_run.nx md_seam_audit (hard gate) -- erotica mode = register explicit, lane local" as *u8)
51 have = have + c_have(c_exists("runtime/nx_register.nx" as *u8), "register routing + age/consent governance (SFW/explicit/REFUSE)" as *u8, "runtime/nx_register.nx rg_score/rg_decision (non-bypassable)" as *u8)
52 have = have + c_have(c_contains_green("knowledge/status/writestyle_gate.log" as *u8), "mechanical pacing signals (sentence-length modulation = the anticipation/climax pacing craft hook)" as *u8, "writestyle_gate.log GREEN: nx_writestyle longest_sentence + hard_sentences + dialogue-ratio + adverb/passive/weak" as *u8)
53 have = have + c_have(c_exists("runtime/nx_storybeat.nx" as *u8), "erotic-domain beat schema (scene structure primitives)" as *u8, "runtime/nx_storybeat.nx NX_DOMAIN_EROTIC + arousal_register beat kinds" as *u8)
54 have = have + c_have(c_exists("../../elder-ai-platform/data-vault/content.db" as *u8), "arousal-tiered creative DATA (the raw material of scenes)" as *u8, "content.db outfits.nsfw_level/arousal_tier/arousal_register_json + scenarios.arousal_level/nsfw_level + arousal_thresholds" as *u8)
55 have = have + c_have(c_contains_green("knowledge/status/writehub_loop.log" as *u8), "immune-scored keep/discard loop substrate (wrap with the erotica rubric next)" as *u8, "writehub_loop.log GREEN (nx_writehub_loop) + nx_writehub_conductor self-improvement" as *u8)
56 have = have + c_have(c_exists("runtime/nx_erotica_research_fetch.nx" as *u8), "sovereign RESEARCH capability for the erotica SOTA (craft + structure + measurement + incumbent tools) = the measured exceed-bar" as *u8, "nx_erotica_research_fetch (TLS-1.3, idempotent) ingesting knowledge/fetched/ero_*.raw + R1 rubric/slop lexicon on disk" as *u8)
57 have = have + c_have(c_exists("runtime/nx_writehub_factlib.nx" as *u8), "independence-aware corroboration substrate (ground any factual/safety claim)" as *u8, "runtime/nx_writehub_factlib.nx + nx_research_corroborate" as *u8)
58
59 have = have + c_have(c_exists("runtime/nx_emit.nx" as *u8), "writer -> image-gen PROMPT seam (erotic scene -> image prompt, the writer's side of prose+image co-production)" as *u8, "runtime/nx_emit.nx em_image_prompt_focus + nx_descriptor + nx_write_run IMG: emit (manga mode proves the emit side)" as *u8)
60 c_puts("-- R1+R2 DELIVERED THIS SESSION (the erotica craft IMMUNE SYSTEM; each on a real gate + DATA) --\n" as *u8)
61 have = have + c_have(c_exists("knowledge/erotica_craft-seg-0.docs" as *u8), "erotica craft RUBRIC + slop/sensory/emotion/physical/afterglow/consent lexicons as DATA in the SOVEREIGN STORE (R1; Rule 25)" as *u8, "knowledge/erotica_craft-seg-0.docs/.keys (nx_seg_store, 7 records, seeded by nx_erotica_store; NO loose files, no 3rd-party)" as *u8)
62 have = have + c_have(c_exists("knowledge/erotica_craft-seg-0.docs" as *u8), "EMOTION>PHYSICAL ratio scorer (R2; THE #1 axis, measured + discriminating)" as *u8, "sovereign seg_store; nx_erotica_craft GREEN: nx_erotica_craft emotion_ratio weak=333 vs strong=705" as *u8)
63 have = have + c_have(c_exists("knowledge/erotica_craft-seg-0.docs" as *u8), "ANTI-SLOP detector (R2; euphemism-cliche/purple/repetition penalty)" as *u8, "sovereign seg_store; nx_erotica_craft GREEN: weak slop=14 -> penalty 1000 vs strong slop=0" as *u8)
64 have = have + c_have(c_exists("knowledge/erotica_craft-seg-0.docs" as *u8), "SENSORY-density scorer (R2; 5-sense coverage, banded vs purple)" as *u8, "sovereign seg_store; nx_erotica_craft GREEN (nx_erotica_craft sensory lexicon, density done)" as *u8)
65 have = have + c_have(c_exists("knowledge/erotica_craft-seg-0.docs" as *u8), "AFTERGLOW-beat presence scorer (R2; the most-resonant beat, checked in the last third)" as *u8, "sovereign seg_store; nx_erotica_craft GREEN: weak afterglow=0 vs strong=1000" as *u8)
66 have = have + c_have(c_exists("knowledge/erotica_craft-seg-0.docs" as *u8), "CONSENT presence scorer (R2; the genre cornerstone, legible in prose)" as *u8, "sovereign seg_store; nx_erotica_craft GREEN: weak consent=0 vs strong=1000; composite weak=348(REVISE) vs strong=861(gorgeous)" as *u8)
67 c_puts("-- WHERE WE NEED TO GO (the roadmap to GORGEOUS smut -- named craft work, NOT claimed; ALL sovereign, no 3rd-party) --\n" as *u8)
68 have = have + c_have(c_exists("knowledge/erotica_craft-seg-0.docs" as *u8), "SENSORY-DISPLACEMENT scorer DONE (R2b -- the masterful-vs-competent axis)" as *u8, "nx_erotica_craft lex:displacement (unexpected/environmental anchors) -- STRONG disp=500 vs WEAK 0" as *u8)
69 have = have + c_have(c_exists("knowledge/erotica_craft-seg-0.docs" as *u8), "TENSION / anticipation CURVE DONE (R2b, slow-burn)" as *u8, "nx_erotica_craft lex:anticipation (delay/rising-charge markers) -- STRONG tension=1000 vs WEAK 0; composite now 892 vs 272" as *u8)
70 c_gap("ESCALATION-ARC organ (R3: anticipation->arousal->action->AFTERGLOW)" as *u8, "erotica = escalating EROTIC MOMENTS as set-pieces, each raising charge AND changing the characters toward a goal. ABSENT (extends nx_storybeat)" as *u8)
71 c_gap("EROTICA-CRAFT JUDGE (R4, the measured EXCEED)" as *u8, "generic LLM-judges PUNISH erotica = prudish bias; nx_erotica_craft ALREADY scores the right axes without it -- promote to a full semantic judge. Partly ABSENT" as *u8)
72 c_gap("LOCAL explicit-generation SEAT wired to the erotica pipeline" as *u8, "the seam routes explicit->local; wiring the operator local model as the generator (seat) into scene->draft->immune-score->revise is pending the seat/services" as *u8)
73 c_gap("Erotica quality BENCH vs incumbents" as *u8, "a MEASURED head-to-head vs NovelAI(Kayra)/ErosWriter/SillyTavern+KoboldCpp on the craft axes = the s-class-exceed proof. This census starts it; the bench is ABSENT" as *u8)
74
75 c_gap("SOVEREIGN image-gen (the z-image-replacement elder-ai piece) -- on the NAS, still being built" as *u8, "the sovereign diffusion runs on the NAS (we are NOT local) and is not yet at scene quality; finishing it from the hardware rung up (no sdcpp / no 3rd-party) is the build" as *u8)
76 c_gap("EROTIC-SCENE <-> IMAGE-GEN SYNC API (prose + matching image, one pipeline) -- the API isn't done yet" as *u8, "the writer emits the scene IMG: prompt (outfit/pose/arousal) but the sovereign API to drive the NAS z-image-replacement from it is UNBUILT; THAT API is the sync -- prose + image render the SAME beat, no 3rd-party in the loop" as *u8)
77 let permil: i64 = (have * 1000) / total
78 c_puts("----\n HAVE=" as *u8); c_num(have); c_puts("/" as *u8); c_num(total); c_puts(" permil=" as *u8); c_num(permil); c_puts("\n" as *u8)
79 c_puts(" HONEST VERDICT: we HAVE the hard-to-get parts most tools LACK -- a non-bypassable explicit->LOCAL seam\n" as *u8)
80 c_puts(" (no cloud, no filter-fight), arousal-tiered structured DATA, an immune/loop substrate, and a fresh\n" as *u8)
81 c_puts(" measured research bar. But GORGEOUS is CRAFT, and the craft axes that separate masterful smut from\n" as *u8)
82 c_puts(" competent -- emotion>physical (4:1), sensory-displacement, tension slow-burn, the afterglow beat, and\n" as *u8)
83 c_puts(" ruthless anti-slop -- R1+R2 now DONE (nx_erotica_craft discriminates 861 gorgeous vs 348 cliche). NEXT:\n" as *u8)
84 c_puts(" R2b sensory-DISPLACEMENT + TENSION-curve -> R3 escalation-arc -> R4 no-prudish JUDGE ->\n" as *u8)
85 c_puts(" R4 the no-prudish-penalty JUDGE -> R5 wrap the keep/discard loop with the erotica rubric -> R6 the\n" as *u8)
86 c_puts(" MEASURED bench vs NovelAI/ErosWriter. Generation stays on the LOCAL seat; the CRAFT is what we build.\n" as *u8)
87 c_puts(" ALL SOVEREIGN, from the hardware rung up -- NO 3rd-party (NovelAI/SillyTavern/KoboldCpp/sdcpp = yardsticks\n" as *u8)
88 c_puts(" ONLY, never in the loop). And SYNCED with the z-image-replacement: the erotic scene emits its OWN image\n" as *u8)
89 c_puts(" prompt into our sovereign nx_gen image-gen so prose + image render the SAME beat -- one Nishi pipeline.\n" as *u8)
90
91 let lg: i64 = sys_openat_append("knowledge/status/erotica_census.log" as *u8, 0x1a4)
92 if lg >= 0 {
93 c_w(lg, "EROTICA-CENSUS have=" as *u8); c_lognum(lg, have); c_w(lg, "/" as *u8); c_lognum(lg, total)
94 c_w(lg, " permil=" as *u8); c_lognum(lg, permil); c_w(lg, " verdict=MEASURED-HONEST (governance+arousal-data+research HAVE; craft: emotion/sensory/tension/afterglow/anti-slop/judge/bench GAP)\n" as *u8)
95 sys_close(lg)
96 }
97 if c_exists("knowledge/erotica_craft-seg-0.docs" as *u8) == 1 {
98 c_puts("EROTICA-CENSUS GREEN (data in the sovereign seg_store; HAVE dims organ/store-backed; craft + image-sync gaps named as the roadmap)\n" as *u8); sys_exit(0); return 0
99 }
100 c_puts("EROTICA-CENSUS RED (sovereign store missing -- run nx_erotica_store to seed knowledge/erotica_craft-seg-0.docs)\n" as *u8); sys_exit(1); return 1
101}