code wiki / (root) / nx_writehub_loop.nx

nx_writehub_loop.nx

buildroot/runtime/nx_writehub_loop.nx

4284 B73 linesdepth 3pulls 5 transitivereach 0 importersview sourcekind tooltopic writehub
docsdependenciesstructsconstsfunctions

about

nx_writehub_loop.nx -- WRITING HUB rung R2: the autonomous IMMUNE-SCORED keep/discard decider -- the "grows on its own / autonomously improving" core. Uses the shared scorer lib nx_writehub_score (whl_eval: nx_writecraft readability + nx_writestyle adverb/passive/weak/hard-sentence -> ONE composite quality permil), then DECIDES: KEEP (>= WHL_KEEP) or REVISE -- naming the single WORST dimension as a directive the seat (nx_writehub_seat) can act on next round. Fully sovereign (no seat needed to run). Self-proves with two fixtures (a weak draft MUST revise, a clean draft MUST keep = the discriminator gate) and also scores a live draft at knowledge/staging/writehub_draft.txt if present. license_tier: ORIGINAL module: nishi-core.writehub.loop

dependencies 1 imports · 0 importers

nx_writehub_score.nx nx_writehub_loop.nx

imports: nx_writehub_score.nx

imported by: nobody (leaf or entry point)

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

main sys_openat_append wp whl_eval sys_mmap wc_counts wc_is_alpha wc_lower wc_syllables wc_is_vowel wc_lower ↻ wc_lower ↻ wc_fk_grade ws_signals wc_is_alpha ↻ ws_eval_word ws_ends2 wc_lower ↻ ws_is_weak ws_streq_ci wc_lower ↻ ws_is_beverb ws_streq_ci ↻ whl_strlen whl_report wp ↻ wn wp ↻ whl_directive sys_read wn ↻

structs

none

consts

9const K_MAGIC_2097152: i64 = 2097152

functions

11func wp(fd: i64, s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); if fd>0 { sys_write(fd,s,n) } return 0 }
called by 3: wnwhl_reportmain
12func wn(fd: i64, v: i64) -> i64
called by 2: whl_reportmain calls 1: wp
20func whl_strlen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
called by 1: main
22func whl_report(label: *u8, rep: *i64, fd: i64) -> i64
called by 1: main calls 3: wpwnwhl_directive
34func main() -> i64