code wiki / (root) / nx_zero_claude_ledger_gate.nx

nx_zero_claude_ledger_gate.nx

buildroot/runtime/nx_zero_claude_ledger_gate.nx

14651 B256 linesdepth 11pulls 29 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_zero_claude_ledger_gate.nx -- the LIVING zero-Claude ledger (2026-07-15). NOT a one-off measurement: a durable, feedback-closing analytics organ. Each run (a) measures the hybrid cascade's lift split LIVE (local sovereign model vs Claude), (b) APPENDS a record to a persistent sovereign ledger, (c) reads the whole history and prints the TREND (local-lift over runs = progress made), (d) CLOSES THE LOOP by recording the escalations as the local model's training curriculum. As the local expert improves (bigger model, more verifiers, train-on-residual), re-running shows the trend rise toward 100% local = ZERO CLAUDE. argv[1] = local model gguf path (default 0.5B); the tag (0.5B/1.5B/...) is derived from the path. Persisted: knowledge/status/zero_claude_ledger.log (one ZCL record/run) + zero_claude_curriculum.log (the escalated tasks = what to train next). Teeth: accounting balances, soundness, PERSISTENCE (record written + read back), trend computed. Requires the gguf. Heavy (~1-3 min). expect_exit: 0 license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_propose_verify_lib.nx nx_gate_verdict.nx nx_zero_claude_ledger_gate.nx

imports: nx_syscalls.nxnx_propose_verify_lib.nxnx_gate_verdict.nx

imported by: nobody (leaf or entry point)

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

main zl_w sys_write nsv_init sys_now_ms sys_mmap sys_clock_gettime_mono nsv_log sys_write ↻ nf_pool nx_pool_new nx_hw_worker_count nx_hw_cpu_count sys_mmap ↻ sys_munmap sys_mmap ↻ nx_chan_new sys_mmap ↻ _nx_chan_cell sys_thread_create nx_thread_spawn sys_mmap ↻ nx_thread_spawn_fn sys_mmap ↻ sys_mmap ↻ nsv_load_meta sys_mmap ↻ nsv_log ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close nx_gguf_parse nx_le_read_u32 nx_le_read_u64 nx_le_read_u32 ↻ _gguf_skip_value nx_le_read_u64 ↻

structs

none

consts

16const LEDGER_PATH: *u8 = "/home/elderwesto/nx_stage/zero_claude_ledger.log" as *u8
17const CURRIC_PATH: *u8 = "/home/elderwesto/nx_stage/zero_claude_curriculum.log" as *u8

functions

19func zl_w(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
called by 2: zl_nmain calls 1: sys_write
20func zl_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 1: zl_after
21func zl_n(v: i64) -> i64
called by 2: zl_npadmain calls 3: zl_wsys_mmapsys_write
34func zl_npad(v: i64, wd: i64) -> i64 { var d: i64=1; var t: i64=v; if v<0 { d=2; t=0-v } while t>=10 { t=t/10; d=d+1 } zl_n(v); var i: i64=d; while i<wd { sys_write(1," " as *u8,1); i=i+1 } return 0 }
called by 1: main calls 2: zl_nsys_write
35func zl_pad(s: *u8, wd: i64) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); var i: i64=n; while i<wd { sys_write(1," " as *u8,1); i=i+1 } return 0 }
called by 1: main calls 1: sys_write
37func zl_catn(buf: *u8, off: i64, v: i64) -> i64
called by 1: main calls 1: sys_mmap
42func zl_cat(buf: *u8, off: i64, s: *u8) -> i64 { var i: i64=0; while s[i]!=(0 as u8){ buf[off+i]=s[i]; i=i+1 } return off+i }
called by 1: main
45func zl_after(buf: *u8, n: i64, from: i64, key: *u8, nextbox: *i64) -> i64
called by 1: main calls 1: zl_slen
66func zl_route_arith(k: i64, c: i64, op: i64, invert: i64, pbuf: *u8, tx: *u8, mt: *i64, pres: *i64, cbuf: *u8, prm: *i64) -> i64
79func main(argc: i64, argv: *i64) -> i64