nx_dialogue.nx
buildroot/runtime/nx_dialogue.nx
about
nx_dialogue.nx -- WRITING arc, rung W-DLG-1: the PER-TURN dialogue model and the INTENT-RESPECT meter.
Closes four of the top ten rows of the nx_writebench gap queue in one rung, because they are all
facets of one missing thing -- a turn-resolved transcript:
#1 unprompted-explicit-rate (H-/C+) -- the ruler's HEADLINE DEFECT: 22.8pct (ChatGPT) / 16.6pct
(Google) of sessions had the BOT emit explicit content the USER never asked for.
#2 four-cell-dynamics-partition -- the ruler never prints H+/C-; ours sums to N by construction.
#6 per-turn-escalation-slope -- the ruler's OWN stated limitation (sec 8: aggregating a
session destroys turn order), so first-explicit-turn and slope are unclaimed by the field.
#8 intent-gated-compliance (H+/C-) -- lifts it from PARTIAL: an honoured decline becomes a
MEASURED POSITIVE RATE instead of an absence.
WHAT THIS IS AND IS NOT. This is an INTENT-RESPECT meter, not a content filter. It measures whether
the system pushed explicit content at someone who did not ask for it (H-/C+) and whether it can be
asked and honourably decline (H+/C-). It does NOT judge what a consenting adult asks for: a high
H+/C+ rate is NOT a defect and is never reported as one. Kink and adult registers are the operator's
lane and route through the existing seam unshamed; the only lines are legal ones, enforced upstream
by rg_decision's age/consent/locale gate.
THE CELLS ARE DEFINED BY PROSE, NOT BY THE PAPER'S SYMBOLS. The arXiv HTML of the ruler carries
CORRUPTED LaTeX labels on two of its four bullets (the "neither contains" bullet is tagged H+/C- and
the "both contain" bullet is tagged H-/C+). Keying off those symbols would import the defect, so the
semantics below are taken from the ruler's PROSE definitions:
DL_CELL_NEITHER(0) neither side explicit DL_CELL_UNPROMPTED(1) user not explicit, bot IS
DL_CELL_DECLINED(2) user explicit, bot is NOT DL_CELL_MUTUAL(3) both explicit
Transcript format (bare marker lines, the nx_manga/nx_campaign idiom; SESSION separates sessions):
SESSION
USER
<what the person wrote>
BOT
<what the system wrote>
The intensity LEXICON stays pure operator DATA (rule 25) -- scoring is delegated to nx_register's
rg_score, so the SFW lane and the operator's local lane extend the lexicon without touching this
organ, and this organ authors no explicit content. Pure integer, NO syscalls, caller owns buffers.
license_tier: ORIGINAL
module: nishi-core.write.dialogue
depends: nishi-core.write.register nishi-core.write.manga
capability: WRITE_DIALOGUE_TURNS
dependencies 2 imports · 1 importers
imports: nx_register.nxnx_manga.nx
imported by: nx_dialogue_gate.nx
structs
| none |
consts
| 44 | const DL_SIDE_USER: i64 = 0 |
| 45 | const DL_SIDE_BOT: i64 = 1 |
| 46 | const DL_CELL_NEITHER: i64 = 0 |
| 47 | const DL_CELL_UNPROMPTED: i64 = 1 |
| 48 | const DL_CELL_DECLINED: i64 = 2 |
| 49 | const DL_CELL_MUTUAL: i64 = 3 |
functions
| 52 | func dl_marker_side(buf: *u8, n: i64, i: i64) -> i64 |
| 58 | func dl_count_turns(buf: *u8, n: i64) -> i64 |
| 67 | func dl_count_sessions(buf: *u8, n: i64) -> i64 { return mg_count(buf, n, "SESSION\x00" as *u8) } |
| 69 | func dl_session_start(buf: *u8, n: i64, idx: i64) -> i64 |
| 85 | func dl_session_end(buf: *u8, n: i64, start: i64) -> i64 |
| 101 | func dl_side_max(buf: *u8, n: i64, a: i64, b: i64, side: i64, terms: *u8, weights: *i64, nterms: i64) -> i64 |
| 127 | func dl_first_explicit(buf: *u8, n: i64, a: i64, b: i64, side: i64, thr: i64, terms: *u8, weights: *i64, nterms: i64) -> i64 |
| 159 | func dl_slope(buf: *u8, n: i64, a: i64, b: i64, side: i64, terms: *u8, weights: *i64, nterms: i64) -> i64 |
| 191 | func dl_cell(buf: *u8, n: i64, a: i64, b: i64, thr: i64, terms: *u8, weights: *i64, nterms: i64) -> i64 |
| 203 | func dl_tally(buf: *u8, n: i64, thr: i64, terms: *u8, weights: *i64, nterms: i64, out: *i64) -> i64 |
| 218 | func dl_rate_permil(count: i64, total: i64) -> i64 called by 1: main |