nx_mode.nx
buildroot/runtime/nx_mode.nx
about
nx_mode.nx -- WRITING arc, rung W-MODE-1: the data-driven MODE / PERSONA ROUTER.
One assistant, many modes (correspondence / manga / erotica / paper / scenario /
language / social). Each mode is a ROW in a registry (operator DATA, rule 11),
tab-separated: mode <TAB> register <TAB> lane <TAB> structure
register = sfw | mixed | explicit lane = tutor | local
so the runner dispatches the right structure organ + governance + generation lane
without any hardcoded per-mode logic.
THE SEAM, MADE MECHANICAL (not a promise): md_seam_audit proves that EVERY
explicit-register mode routes to the LOCAL lane. A registry that points an
explicit mode at the tutor lane is a VIOLATION the audit COUNTS -- the operator's
"Claude never authors explicit prose" rule is enforced by construction and
checkable, exactly as the never-brick law is gate-proven rather than asserted.
Pure integer, NO syscalls; reuses nx_scenario's line iterator (DRY).
license_tier: ORIGINAL
module: nishi-core.write.mode
depends: nishi-core.write.scenario
capability: WRITE_MODE_ROUTER
dependencies 1 imports · 3 importers
imports: nx_scenario.nx
imported by: nx_mode_gate.nxnx_writer_page.nxnx_writer_run.nx
structs
| none |
consts
| none |
functions
| 23 | func md_streq(a: *u8, b: *u8) -> i64 |
| 35 | func md_first_field_is(buf: *u8, n: i64, i: i64, mode: *u8) -> i64 called by 1: md_find_row |
| 58 | func md_find_row(buf: *u8, n: i64, mode: *u8) -> i64 |
| 73 | func md_col(buf: *u8, n: i64, rowoff: i64, colidx: i64, out: *u8, cap: i64) -> i64 |
| 101 | func md_lookup(buf: *u8, n: i64, mode: *u8, colidx: i64, out: *u8, cap: i64) -> i64 |
| 108 | func md_register(buf: *u8, n: i64, mode: *u8, out: *u8, cap: i64) -> i64 { return md_lookup(buf, n, mode, 1, out, cap) } |
| 109 | func md_lane(buf: *u8, n: i64, mode: *u8, out: *u8, cap: i64) -> i64 { return md_lookup(buf, n, mode, 2, out, cap) } |
| 110 | func md_structure(buf: *u8, n: i64, mode: *u8, out: *u8, cap: i64) -> i64 { return md_lookup(buf, n, mode, 3, out, cap) } |
| 114 | func md_seam_audit(buf: *u8, n: i64, scratch: *u8, cap: i64) -> i64 |