code wiki / _hdl_build / nx_capgraph_lib.nx
nx_capgraph_lib.nx
buildroot/runtime/_hdl_build/nx_capgraph_lib.nx
about
nx_capgraph_lib.nx -- MANY-AXIS CAPABILITY GRAPH, pure core. No main.
WHY (operator 2026-07-31): "a many axis capabilities graph system ... sota as of july 2026 ...
instead of our broken flat percent we are using to track growth towards sota so we can start
properly mapping forward progress".
MEASURED DISEASE (this session, not asserted). nx_capaxes_lib made the SHAPE measurable and its six
laws are correct, but the wiring is DEGENERATE: nx_capaxes_derive sets evidence=0 for EVERY domain by
construction, so all 28 domains headline MIN=0 today and would still headline 0 after real work lands.
A ruler whose every reading is 0 has NO DYNAMIC RANGE and cannot map forward progress -- so the rank
silently falls back to leverage, and leverage IS the coverage claim = the flat percent again, wearing
a vector's clothes. Second defect: there is no GRAPH. A flat 6-vector per domain has no nodes, no
prerequisite edges, no rollup, so a capability standing on a broken prerequisite still reads healthy.
SOTA GROUNDING (July 2026, external -- the comparator nx_cap_census correctly refuses to fake):
ADeLe / general scales (Nature 2026; arXiv 2503.06378; Microsoft Research + CFI)
-- rate DEMAND on 18 dimensions at ORDINAL levels 0..5, and define a subject's ABILITY on a
dimension as the demand level at which its success probability crosses 50%. Ability is DERIVED
from pass/fail evidence, never claimed; demand-vs-ability then PREDICTS new-task success (~88%).
Item Response Theory / adaptive testing for LLM eval (arXiv 2511.04689, 2505.15055, 2510.00844)
-- raw accuracy treats all items as equally informative; that IS the flat-percent disease.
HELM (Stanford CRFM, arXiv 2211.09110) -- scenario x metric MATRIX, deliberately NO single aggregate.
Prerequisite-DAG evaluation with weakest-path propagation (SaaSBench arXiv 2605.17526)
-- downstream criteria are SKIPPED when prerequisites are unmet, and the overall strength of a
claim mapping is determined by the WEAKEST PATH through the dependency graph.
WHAT THIS ADDS TO nx_capaxes_lib (which stays the axis-vector authority; L1/L2/L3 are preserved):
LAW L4 -- WEAKEST PATH. A node can NEVER exceed the minimum effective level of its prerequisites.
This is L1 (headline=MIN) generalised from a flat vector to a DAG. A capability standing on a TOY
prerequisite is a TOY capability no matter what its own axes say, because the prerequisite is what a
user hits first. UNMEASURED prerequisites are SKIPPED, never propagated (L3 holds across edges too).
LAW L5 -- ORDINAL LEVELS, NOT PERCENTAGES. Each level is defined by WHAT IT TAKES TO PASS, so it
cannot be gamed by breadth the way a percentage can, and a level-up is a countable event -- which is
exactly what mapping forward progress requires. The ladder is derived from laws this ecosystem
already banked by measurement, not from taste:
0 ABSENT nothing exists
1 TOY exists, demo-only
2 WORKS real inputs, happy path
dependencies 1 imports · 3 importers
imports: nx_capaxes_lib.nx
imported by: nx_capgraph_derive_lib.nxnx_capgraph_edges_lib.nxnx_capgraph_gate.nx
structs
| none |
consts
| 56 | const CG_UNMEASURED: i64 = 0 - 1 |
| 57 | const CG_LMAX: i64 = 5 |
| 58 | const CG_MAXN: i64 = 256 |
| 59 | const CG_MAXAX: i64 = 16 |
| 60 | const CG_MAXE: i64 = 2048 |
| 61 | const CG_NAMEW: i64 = 40 |
| 63 | const CG_EV_NONE: i64 = 0 |
| 64 | const CG_EV_DEMO: i64 = 1 |
| 65 | const CG_EV_REAL: i64 = 2 |
| 66 | const CG_EV_GATE: i64 = 3 |
| 67 | const CG_EV_LIVE: i64 = 4 |
| 68 | const CG_EV_EXT: i64 = 5 |
functions
| 84 | func cg_streq(a: *u8, b: *u8) -> i64 |
| 102 | func cg_level_name(l: i64) -> *u8 |
| 112 | func cg_ev_name(e: i64) -> *u8 called by 1: cg_row |
| 122 | func cg_init(naxes: i64) called by 1: main |
| 139 | func cg_name_put(slot: i64, src: *u8) |
| 153 | func cg_axis_set(a: i64, nm: *u8) |
| 159 | func cg_axis_name(a: i64) -> *u8 called by 1: cg_row |
| 165 | func cg_node_name(i: i64) -> *u8 |
| 171 | func cg_addnode(nm: *u8, evclass: i64) -> i64 |
| 185 | func cg_addedge(prereq: i64, dependent: i64) -> i64 |
| 197 | func cg_cap(claim: i64, evclass: i64) -> i64 called by 1: cg_set |
| 206 | func cg_set(node: i64, axis: i64, claim: i64) |
| 214 | func cg_get(node: i64, axis: i64) -> i64 called by 1: main |
| 222 | func cg_own_headline(node: i64) -> i64 |
| 236 | func cg_starved_axis(node: i64) -> i64 |
| 255 | func cg_relax() |
| 303 | func cg_effective_axis(node: i64, axis: i64) -> i64 |
| 311 | func cg_effective(node: i64) -> i64 |
| 317 | func cg_descendants(root: i64) -> i64 |
| 346 | func cg_rock(node: i64) -> i64 |
| 360 | func cg_rock_lev(node: i64, leverage: i64) -> i64 |
| 370 | func cg_predict(node: i64, demand: *i64) -> i64 |
| 392 | func cg_grounded(node: i64) -> i64 |
| 408 | func cg_gate_log(path: *u8, tag: *u8, passed: i64, total: i64) |
| 412 | func cg_row(node: i64) |