code wiki / (root) / nx_tone_gate.nx

nx_tone_gate.nx

buildroot/runtime/nx_tone_gate.nx

6305 B133 linesdepth 3pulls 6 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_tone_gate.nx -- REFEREE for WRITING rung W-TONE-1 (nx_tone). [T1] EXACT fingerprint math: a controlled text -> hand-computed dims (cadence tf[0], avg word length tf[1]) prove the counting+normalization. [T2] DISCRIMINATION: a terse voice vs an ornate voice differ in the EXPECTED DIRECTION on independent dims (cadence + adverb ratio) -- the fingerprint carries real signal, it is not a constant. [T3] THE CAPABILITY ("write in my tone"): given a target voice A and a contrast voice B, a NEW terse draft matches A (tn_closer==1) and a NEW ornate draft does NOT (tn_closer==0). Correct voice attribution. [T4] NEG-CONTROL / metric sanity: dist(A,A)==0 (identical -> zero); a voice matches itself over a contrast. Evidence -> stdout + knowledge/status/tone_gate.log. Exit 0 GREEN / 1 RED. Sovereign x86_64. license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_syscalls_x86_64.nx nx_tone.nx nx_tone_gate.nx

imports: nx_syscalls_x86_64.nxnx_tone.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 tn_fingerprint wc_counts wc_is_alpha wc_lower wc_syllables wc_is_vowel wc_lower ↻ wc_lower ↻ 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 ↻ tn_punct slen pr_kv gp ↻ gn gn ↻ pr_cond gp ↻ tn_dist tn_closer tn_dist ↻

structs

none

consts

none

functions

19func gp(logfd: i64, s: *u8) -> i64
called by 3: pr_kvpr_condmain
26func gn(logfd: i64, v: i64) -> i64
called by 2: pr_kvmain
44func slen(s: *u8) -> i64
called by 1: main
49func 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