code wiki / _hdl_build / nx_clawf_route.nx

nx_clawf_route.nx

buildroot/runtime/_hdl_build/nx_clawf_route.nx

12370 B278 linesdepth 5pulls 8 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_clawf_route.nx -- SPLIT-BRAIN ROUTER ORGAN (TS01, 2026-07-21). OO-CONSOLIDATED onto nx_sovjson_lib. Shift the 80% iterate-and-fix loop OFF Claude onto the 0-API local maker; keep Claude for architecture. Reads the clawf- catalog (MEASURED from 221 historic Claude transcripts) and maps a tool-transition SIGNATURE -> {route, organ, confidence}; deterministic, fail-closed (unrecognized -> CLAUDE-ARCHITECT escalate). Token-efficiency lever measured by nx_seat shift. Helpers COMPOSED from nx_sovjson_lib (sj_*) = DRY across the token subsystem, no inline dup. route <sig> [clawfprefix] | table [clawfprefix] | plan [clawfprefix] | selftest [tmpprefix] clawf- row = id class support route organ note (6-col plane). license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 5 imports · 0 importers

nx_sovjson_lib.nx nx_store_seed_lib.nx nx_seg_store.nx nx_gate_verdict.nx nx_syscalls.nx nx_clawf_route.nx

imports: nx_sovjson_lib.nxnx_store_seed_lib.nxnx_seg_store.nxnx_gate_verdict.nxnx_syscalls.nx

imported by: nobody (leaf or entry point)

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

main sj_werr sys_write sys_exit sj_lit_eq sj_vlen sys_mmap cr_route sys_mmap ↻ sts_load ss_open_cached ssc_init sys_mmap ↻ ssc_sig_of ss_cat sys_fstatat ssc_streq ss_open ss_open2 sys_mmap ↻ ss_manifest_dyn ss_cat ↻ ss_loadfile ss_load_aux2 ssl_total_keys ssl_pow2 ssl_build ss_r32 ssl_lookup ss_manifest_free sys_munmap ssc_retire_handle sts_mm sys_mmap ↻ sts_werr sys_write ↻ sys_exit ↻ ss_hget sys_mmap ↻ ss_idx_find

structs

none

consts

16const CR_CAP: i64 = 1048576
17const CR_OUT: i64 = 8192
18const CR_SPAN: i64 = 16
19const CR_USAGE: i64 = 2
20const CR_HI: i64 = 1000
21const CR_MED: i64 = 100
22const CR_ROWCAP: i64 = 64
23const CR_ESC: i64 = 200

functions

25func cr_route(sig: *u8, prefix: *u8, out: *u8) -> i64
86func cr_table(prefix: *u8, out: *u8) -> i64
128func cr_plan(prefix: *u8, out: *u8) -> i64
182func cr_selftest(base: *u8) -> i64
230func main(argc: i64, argv: *i64) -> i64