nx_writebench.nx
buildroot/runtime/nx_writebench.nx
about
nx_writebench.nx -- THE WRITING/ROLEPLAY CAPABILITY BENCHMARK: can the ecosystem emit -- and GOVERN --
the kinds of interactive fiction people actually build and use?
RULER = a REAL ingested peer-reviewed paper, banked by nx_research_fetch_cli over our own TLS:
arXiv:2601.14324v1 -- "When Generative AI Is Intimate, Sexy, and Violent: Examining Not-Safe-For-Work
(NSFW) Chatbots on FlowGPT" (CHI '26, DOI 10.1145/3772318.3790522), N=376 chatbots by 190 creators,
307 public sessions, banked at knowledge/library/write_nsfwbot_flowgpt_2601_14324.txt (status 200).
It is NOT a ruler we invented: every axis below traces to a MEASURED number in that corpus, and
nx_writebench_gate liar-kills the board if the corpus is missing or is not that paper.
Follows the nx_gamebench doctrine (name a real external artifact + its bar; the gap queue IS the
build order) and the ecosystem_benchmarks.tsv doctrine (self-graded = SUSPECT until an external
reference is WIRED).
HONEST BY CONSTRUCTION:
- coverage is COMPUTED from the rows (sum of verdicts / max), never a hand-written number;
- every HAVE names an evidence artifact; the gate stats each one on disk and kills any that is absent;
- the GAP QUEUE is POPULATION-ranked using the PAPER'S OWN class counts (AI Character 279,
Story Generator 63, DAN 21, Image Generator 15; total 376) -- a gap that blocks 376 of 376
outranks one that blocks 279. "Where are our gaps" answered with arithmetic, not taste;
- this board is SELF-GRADED-UNTIL-A-SECOND-METHOD-CLASS: our verdicts are OUR gates, so a high
coverage number here is NOT parity with anything until an outside witness is wired.
SCOPE DECLARED, NOT HIDDEN:
- The ruler measures an interactive-roleplay platform. Our craft organs (readability, grammar,
citations) are scored ONLY where the ruler has a matching axis; strengths the paper never
measures are marked exceed=1 rather than inflating coverage.
- DAN-CLASS DECLINED BY POLICY: the paper's DAN category (N=21) is defined by bomb-making steps,
malicious code, drug synthesis and jailbreak propagation. We decline to build that class -- a
LEGAL line, not a taste line. Adult/kink registers are NOT that class and are NOT declined; they
route to the operator's local lane through the existing seam. The decline is stated here so the
coverage number is not silently inflated by an omitted class.
Self-contained (imports only nx_syscalls) so it runs on the NAS as an MCP tool.
license_tier: ORIGINAL expect_exit: 0
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_estate_path.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 37 | const WB_NAXES: i64 = 28 |
| 38 | const WB_CORPUS_N: i64 = 376 // DISTINCT chatbots in the ruler corpus |
| 39 | const WB_CLASS_SUM: i64 = 378 // the 4 class sizes SUM to 378, not 376: the ruler states 2 bots |
| 44 | const WB_N_AICHAR: i64 = 279 |
| 45 | const WB_N_STORY: i64 = 63 |
| 46 | const WB_N_IMAGE: i64 = 15 |
| 47 | const WB_N_DAN: i64 = 21 |
| 48 | const WB_RULER_MIN: i64 = 50000 // a corpus smaller than this is not the paper (decoy floor) |
| 49 | const WB_SCRATCH: i64 = 262144 |
functions
| 51 | func wb_w(fd: i64, s: *u8) -> i64 |
| 58 | func wb_n(fd: i64, v: i64) -> i64 |
| 72 | func wb_bit(i: i64) -> i64 { var v: i64 = 1; var k: i64 = 0; while k < i { v = v * 2; k = k + 1 } return v } called by 1: wb_has |
| 73 | func wb_has(mask: i64, i: i64) -> i64 { let b: i64 = wb_bit(i); if (mask / b) % 2 == 1 { return 1 } return 0 } |
| 77 | func wb_pop(mask: i64) -> i64 |
| 95 | func wb_size(p: *u8, buf: *u8) -> i64 |
| 107 | func wb_vstr(v: i64) -> *u8 called by 1: main |
| 112 | func wb_cstr(c: i64) -> *u8 called by 1: main |
| 119 | func main() -> i64 |