code wiki / _hdl_build / nx_charter.nx

nx_charter.nx source

↩ module page · 56 lines · 3260 B

1// nx_charter.nx -- the TEAM'S CHARTER as a measurable ladder (operator: "you go from unstructured to 2// structured to meaningful to actionable to reproducible like all science... reproducible usually being the 3// layer zero outcome where its working with a machine or human to drive an outcome like growing crops or 4// harvesting solar or building image generators"). This is the epistemic spine (DIKW + the scientific 5// method): every body of work is driven UP these rungs, and REPRODUCIBLE is the layer-0 endpoint -- not just 6// "could act" but RELIABLY drives a real outcome, repeatably, with a machine/human. The rigorous, non- 7// parroting part: reproducible is NOT permanent (it DRIFTS); the Engineer's four-pillar guard is what keeps 8// it reproducible. license_tier: ORIGINAL Composes nx_four_pillars + nx_maturity_auditor + good-triangle. 9 10import "nx_syscalls.nx" 11 12const CH_UNSTRUCTURED: i64 = 0 // raw noise/data 13const CH_STRUCTURED: i64 = 1 // organized (has a schema) 14const CH_MEANINGFUL: i64 = 2 // interpreted (answers "so what" -- information) 15const CH_ACTIONABLE: i64 = 3 // a decision/next-step you can take (knowledge) 16const CH_REPRODUCIBLE: i64 = 4 // LAYER-0: deterministic repeat AND a driver (machine/human) -> real outcome 17 18// evidence-gated placement (each rung needs proof, like the maturity ladder -- Referee discipline). 19func ch_stage(structured: i64, meaningful: i64, actionable: i64, deterministic: i64, driver_outcome: i64) -> i64 { 20 if structured == 0 { return CH_UNSTRUCTURED } 21 if meaningful == 0 { return CH_STRUCTURED } 22 if actionable == 0 { return CH_MEANINGFUL } 23 if deterministic == 1 { if driver_outcome == 1 { return CH_REPRODUCIBLE } } 24 return CH_ACTIONABLE 25} 26 27// reproducible is the DUAL gate: it must repeat deterministically AND drive a real outcome. "Actionable but 28// not reproducible" = you could act, but it doesn't RELIABLY produce the outcome (most things stall here). 29func ch_reproducible(deterministic: i64, driver_outcome: i64) -> i64 { 30 if deterministic == 1 { if driver_outcome == 1 { return 1 } } 31 return 0 32} 33 34// DRIFT: reproducibility is not permanent. a reproducible artifact whose re-run differs DEMOTES to actionable 35// (it must be re-advanced). This is the layer-count bug: the count WAS reproducible, then drifted. 36func ch_on_drift(was_reproducible: i64, reran_same: i64) -> i64 { 37 if was_reproducible == 1 { 38 if reran_same == 0 { return CH_ACTIONABLE } // drifted -> demote 39 return CH_REPRODUCIBLE 40 } 41 return CH_ACTIONABLE 42} 43 44// the Engineer's COMPLETE four-pillar guard is what keeps a reproducible artifact reproducible against drift. 45func ch_drift_protected(four_pillar_valid: i64) -> i64 { if four_pillar_valid == 1 { return 1 } return 0 } 46 47// advancement up the charter (rungs climbed; negative = regressed/drifted). 48func ch_advancement(from_stage: i64, to_stage: i64) -> i64 { return to_stage - from_stage } 49 50func ch_stage_name(s: i64) -> *u8 { 51 if s == CH_UNSTRUCTURED { return "UNSTRUCTURED" as *u8 } 52 if s == CH_STRUCTURED { return "STRUCTURED" as *u8 } 53 if s == CH_MEANINGFUL { return "MEANINGFUL" as *u8 } 54 if s == CH_ACTIONABLE { return "ACTIONABLE" as *u8 } 55 return "REPRODUCIBLE(layer-0)" as *u8 56}