code wiki / (root) / nx_write_run.nx

nx_write_run.nx

buildroot/runtime/nx_write_run.nx

10494 B238 linesdepth 8pulls 14 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_write_run.nx -- WRITING arc: the FILE-DRIVEN RUNNER (the tool the operator runs on a real story). It reads everything from knowledge/staging/write/: story.txt the work (operator/lane content -- Claude never authors it) roster.txt character bible, one name per line descriptors.txt descriptor lexicon, one term per line (setting/outfit/mood/...) register.txt "term weight" per line (intensity lexicon; optional) gov.txt "threshold age consent locale" ints (optional; default 5 1 1 1) and emits, per scene, the IMAGE-GEN prompt + COMPANION context, plus the register route -> stdout AND knowledge/staging/write/out.txt. This keeps the seam intact: the operator drops their content + lexicons here and runs the tool; the engine (all gated organs) does the structuring. Build+run: ./_offc/nx_sov_build_run.elf nx_write_run license_tier: ORIGINAL module: nishi-core.write.run depends: nishi-core.write.parselex, nishi-core.write.emit, nishi-core.write.register capability: WRITE_RUN_TOOL

dependencies 5 imports · 0 importers

nx_syscalls_x86_64.nx nx_parse_lex.nx nx_emit.nx nx_register.nx nx_conflict.nx nx_write_run.nx

imports: nx_syscalls_x86_64.nxnx_parse_lex.nxnx_emit.nxnx_register.nxnx_conflict.nx

imported by: nobody (leaf or entry point)

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

main wstr px_pack_lines px_pack_weighted parse_ints first_line sys_openat_wr wnum wstr ↻ rg_score ig_name_off ig_count_name_in ig_match_at wc_is_alpha wc_lower wc_lower ↻ rg_decision em_image_prompt_focus em_append_at ig_name_off ↻ ig_count_name_in ↻ em_append em_append_present ig_name_off ↻ ig_count_name_in ↻ em_append ↻ em_append_at ↻ em_companion_ctx em_append ↻ em_append_present ↻ em_append_num cf_detect_owned ig_name_off ↻ cf_term_owned ig_match_at ↻ cf_owner_at ig_name_off ↻ ig_match_at ↻ wterm ig_name_off ↻

structs

none

consts

25const WR_MAXSC: i64 = 128

functions

28func wstr(outfd: i64, s: *u8) -> i64
called by 2: wnummain
36func wnum(outfd: i64, v: i64) -> i64
called by 1: main calls 1: wstr
51func wterm(outfd: i64, terms: *u8, idx: i64) -> i64
called by 1: main calls 1: ig_name_off
60func parse_ints(raw: *u8, n: i64, out: *i64, maxk: i64) -> i64
called by 1: main
80func first_line(buf: *u8, n: i64) -> i64
called by 1: main
95func main() -> i64