code wiki / _hdl_build / nx_maturity_auditor.nx

nx_maturity_auditor.nx source

↩ module page · 43 lines · 2520 B

1// nx_maturity_auditor.nx -- the Auditor's MATURITY ladder, so roadmaps know per layer whether we are 2// ABSENT (not even represented), TOY, or S-class/exceed (operator: "know when we are toy level on that 3// layer vs s class exceed vs not even represented yet so we can get better roadmaps -- width and breadth"). 4// Evidence-GATED (Referee discipline: each rung needs PROOF, never self-assertion). A TRL/CMM-style ladder: 5// ABSENT(0) < TOY(1) < FUNCTIONAL(2) < PRODUCTION(3) < S-CLASS(4) < EXCEED(5) 6// license_tier: ORIGINAL Pairs with nx_auditor (sovereignty) + nx_referee (objective judging). 7 8import "nx_syscalls.nx" 9 10const MAT_ABSENT: i64 = 0 // capability not represented at all -- the biggest roadmap gaps 11const MAT_TOY: i64 = 1 // exists, but demo/trivial surface only 12const MAT_FUNCTIONAL: i64 = 2 // works on real (non-trivial) inputs, but narrow / not hardened 13const MAT_PRODUCTION: i64 = 3 // handles the FULL real surface + error paths (enterprise-grade) 14const MAT_SCLASS: i64 = 4 // TRIANGULATED parity vs best-in-class (gcc/llvm/the platform) 15const MAT_EXCEED: i64 = 5 // triangulated WIN vs best-in-class 16const MAT_NLEVELS: i64 = 6 17 18// classify from EVIDENCE FLAGS (not opinion). Higher rungs require lower-rung evidence implicitly via the 19// caller, but we gate top-down so a stray flag can't over-promote a non-existent capability. 20func mat_level(exists: i64, runs_real_surface: i64, hardened: i64, parity_vs_best: i64, beats_best: i64) -> i64 { 21 if exists == 0 { return MAT_ABSENT } 22 if beats_best == 1 { return MAT_EXCEED } 23 if parity_vs_best == 1 { return MAT_SCLASS } 24 if hardened == 1 { return MAT_PRODUCTION } 25 if runs_real_surface == 1 { return MAT_FUNCTIONAL } 26 return MAT_TOY 27} 28 29func mat_label(l: i64) -> *u8 { 30 if l == MAT_ABSENT { return "ABSENT" as *u8 } 31 if l == MAT_TOY { return "TOY" as *u8 } 32 if l == MAT_FUNCTIONAL { return "FUNCTIONAL" as *u8 } 33 if l == MAT_PRODUCTION { return "PRODUCTION" as *u8 } 34 if l == MAT_SCLASS { return "S-CLASS" as *u8 } 35 return "EXCEED" as *u8 36} 37 38func mat_is_absent(l: i64) -> i64 { if l == MAT_ABSENT { return 1 } return 0 } 39func mat_is_toy(l: i64) -> i64 { if l == MAT_TOY { return 1 } return 0 } 40func mat_is_sclass_plus(l: i64) -> i64 { if l >= MAT_SCLASS { return 1 } return 0 } 41 42// rungs from current level up to S-class (0 if already S-class or better) -- the roadmap distance. 43func mat_gap_to_sclass(l: i64) -> i64 { if l >= MAT_SCLASS { return 0 } return MAT_SCLASS - l }