code wiki / (root) / nx_writer_run.nx

nx_writer_run.nx

buildroot/runtime/nx_writer_run.nx

11619 B234 linesdepth 3pulls 10 transitivereach 0 importersview sourcekind tooltopic writer
docsdependenciesstructsconstsfunctions

about

nx_writer_run.nx -- WRITING arc, rung W-RUN-2: the UNIFYING file-driven runner. One tool, every mode. Reads the chosen mode + the mode registry, ENFORCES the seam (refuses if the registry routes an explicit mode off the local lane), resolves register/lane/structure, and dispatches to the right organ -- emitting the structured artifact the generation SEAT then expands (SFW=tutor seat, explicit=operator local-LLM seat; this tool authors no prose, per the seam). Does NOT touch the existing nx_write_run (its scene-ingestion path is unchanged). Staging: knowledge/staging/writer/{mode,scenario,manga,voice,draft}.txt ; registry SSOT: knowledge/registry/write_modes.tsv . Build+run: ./_offc/nx_sov_build_run.elf nx_writer_run license_tier: ORIGINAL module: nishi-core.write.writerrun depends: nishi-core.write.mode/scenario/manga/tone capability: WRITE_RUN_UNIFIED

dependencies 6 imports · 0 importers

nx_syscalls_x86_64.nx nx_mode.nx nx_scenario.nx nx_manga.nx nx_tone.nx nx_campaign.nx nx_writer_run.nx

imports: nx_syscalls_x86_64.nxnx_mode.nxnx_scenario.nxnx_manga.nxnx_tone.nxnx_campaign.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sys_read_file sys_openat_rd sys_lseek sys_mmap sys_read sys_close wstr wr_firstline sys_openat_wr md_seam_audit md_col md_streq sc_next_line wnum wstr ↻ md_lane md_lookup md_find_row md_first_field_is sc_next_line ↻ md_col ↻ md_register md_lookup ↻ md_structure md_lookup ↻ md_streq ↻ wr_do_scenario sys_read_file ↻ wstr ↻ sc_validate sc_has sc_find_field sc_next_line ↻ wnum ↻ sc_emit_brief sc_app_field sc_find_field ↻ sc_value_len sc_app_lit

structs

none

consts

23const K_MAGIC_1024: i64 = 1024

functions

25func wstr(outfd: i64, s: *u8) -> i64
32func wnum(outfd: i64, v: i64) -> i64
47func wr_firstline(buf: *u8, n: i64) -> i64
called by 1: main
62func wr_do_scenario(outfd: i64, lanb: *u8) -> i64
76func wr_do_convo(outfd: i64, lanb: *u8) -> i64
90func wr_do_manga(outfd: i64, lanb: *u8) -> i64
105func wr_do_campaign(outfd: i64, lanb: *u8) -> i64
134func wr_do_tone(outfd: i64, lanb: *u8) -> i64
170func main() -> i64