code wiki / (root) / nx_writecraft_gate.nx

nx_writecraft_gate.nx

buildroot/runtime/nx_writecraft_gate.nx

6664 B145 linesdepth 3pulls 4 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_writecraft_gate.nx -- REFEREE for WRITING rung W-R0 (nx_writecraft). Proves the prose-measurement bedrock with no mocks: [T1] exact word/sentence/syllable/letter/complex counts on a known sentence [T2] exact syllable heuristic on hand-verified words (incl. silent-e + "Cle") [T3] exact readability milli-values (FRE / FKGL / FOG) on T1 [T5] div-by-zero guard: text with no end punctuation still scores (S->1) [T4] NEGATIVE CONTROL: graduate-jargon text MUST score a higher grade and a lower reading-ease than a simple sentence -- the metric discriminates, it does not return a constant. A constant-returning organ fails here. Evidence -> stdout + knowledge/status/writecraft_gate.log. Exit 0 GREEN / 1 RED. Sovereign x86_64 throughout. license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_syscalls_x86_64.nx nx_writecraft.nx nx_writecraft_gate.nx

imports: nx_syscalls_x86_64.nxnx_writecraft.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 gp wc_counts wc_is_alpha wc_lower wc_syllables wc_is_vowel wc_lower ↻ wc_lower ↻ slen pr_kv gp ↻ gn wc_flesch_reading_ease wc_fk_grade wc_gunning_fog wc_syllables ↻ gn ↻ pr_cond gp ↻

structs

none

consts

none

functions

17func gp(logfd: i64, s: *u8) -> i64
called by 3: pr_kvpr_condmain
24func gn(logfd: i64, v: i64) -> i64
called by 2: pr_kvmain
42func slen(s: *u8) -> i64
called by 1: main
48func pr_kv(logfd: i64, label: *u8, got: i64, exp: i64) -> i64
called by 1: main calls 2: gpgn
57func pr_cond(logfd: i64, label: *u8, cond: i64) -> i64
called by 1: main calls 1: gp
64func main() -> i64