code wiki / _hdl_build / nx_capaxes.nx

nx_capaxes.nx source

↩ module page · 38 lines · 1963 B

1// nx_capaxes.nx -- thin DRIVER over nx_capaxes_lib. One responsibility: parse argv, emit the profile. 2// The core, its laws and its full rationale live in nx_capaxes_lib.nx; the proof lives in nx_capaxes_gate.nx 3// (18/18 GREEN, incl. the revert-detecting negative control on headline!=mean). 4// 5// nx_capaxes score <cover> <quality> <scale> <evidence> <adopt> <ground> [leverage] 6// exit 0 profiled | 2 usage | 3 UNGROUNDED (L2 refusal: no external reference => no number) 7// 8// AXES, 0..1000 each, -1 = UNMEASURED (never a silent 0): 9// coverage breadth of the declared surface actually present 10// quality grade against a real external bar (TOY..EXCEED) 11// scale does it hold at real N, or only on a toy input 12// evidence CLAIM-ONLY..PROVEN, and can the gate actually FAIL 13// adoption wired at the LIVE chokepoint, or built-but-unreachable 14// grounding count of external SOTA references; 0 => refuse to score 15// 16// SCOPE, HONEST: this is the core + driver. Feeding the axes automatically from live sources 17// (nx_sota_status cov, ecomat maturity grade, nx_wirecensus adoption) is the NEXT rung and is NOT 18// claimed here -- today an operator or a caller supplies the vector. 19// license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0 20import "nx_capaxes_lib.nx" 21 22func main(argc: i64, argv: *i64) -> i64 { 23 if argc < 8 { 24 cax_puts("usage: nx_capaxes score <cover> <quality> <scale> <evidence> <adopt> <ground> [leverage]\n" as *u8) 25 cax_puts(" axes are 0..1000, -1 = UNMEASURED. headline is the MIN, never the mean (L1).\n" as *u8) 26 cax_puts(" grounding 0 refuses to emit a score at all (L2).\n" as *u8) 27 return 2 28 } 29 var v: *i64 = sys_mmap(128) as *i64 30 var i: i64 = 0 31 while i < CAX_N { 32 v[i] = cax_atoi(argv[2 + i] as *u8) 33 i = i + 1 34 } 35 var lev: i64 = 1 36 if argc > 8 { lev = cax_atoi(argv[8] as *u8) } 37 return cax_report(v, CAX_N, lev) 38}