code wiki / _hdl_build / nx_tokroi.nx
nx_tokroi.nx
buildroot/runtime/_hdl_build/nx_tokroi.nx
about
nx_tokroi.nx -- TOKEN-EFFICIENCY ROI LEDGER (operator 2026-07-21: 'a plan that X investment reduces
Y token use with CLEAR EVIDENCE'). Per lever: reduction_per_use = baseline - after (MEASURED, byte/
tok evidence cited); daily_reduction = reduction * uses_per_day (uses = DECLARED assumption);
payback_uses = investment / reduction. status REALIZED (live+measured) vs PROJECTED (built, not yet
wired) kept SEPARATE so no fake realized totals. Composes nx_sovjson_lib (sj_*) from birth = OO,
dogfoods the shared base. license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0
report [roiprefix] -> ROI JSON | selftest [tmpprefix] -> gate T1..T5
tokroi- row = id lever status investment baseline after uses_per_day evidence (8-col plane).
dependencies 5 imports · 0 importers
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
structs
| none |
consts
| 15 | const TR_CAP: i64 = 1048576 |
| 16 | const TR_OUT: i64 = 16384 |
| 17 | const TR_SPAN: i64 = 16 |
| 18 | const TR_USAGE: i64 = 2 |
| 19 | const TR_ESC: i64 = 90 |
functions
| 21 | func tr_report(prefix: *u8, out: *u8) -> i64 |
| 108 | func tr_selftest(base: *u8) -> i64 |
| 138 | func main(argc: i64, argv: *i64) -> i64 |