nx_intent.nx
buildroot/runtime/nx_intent.nx
about
nx_intent.nx -- per-function intent declaration (Captain Moroni Phase M1).
Per [[feedback-captain-moroni-doctrine]] Phase M1: "nx_intent<I>
sealed type with values Defensive | Diagnostic | Educational |
Creative. EVERY function declares intent; substrate refuses
unintented operations."
THE STRUCTURAL REFUSAL FOUNDATION. Substrate-level enforcement (not
policy-level) of the Captain Moroni doctrine. A function declared
with intent=Defensive cannot be invoked to compose an offensive
operation; intent=Educational cannot exfiltrate; intent=Creative
cannot command physical actuators.
Distinct from nx_intent_survival.nx (image-render-verification
primitive); the suffixed name there avoids any collision with this
foundational primitive.
Composes:
nx_cell -- every cell declares its meta-intent
nx_brane -- capability checks compose with intent checks
nx_drone_doctrine -- intent must be Defensive for drone code
nx_battery_safety -- intent restricts BMS commands
nx_pollinate -- federation refuses non-Defensive payloads
V1 ships:
- 4 sealed values per cardinal
- intent-pair compatibility table (caller's declared intent must
be CONSISTENT with callee's declared intent)
- structural-refusal predicate for offensive-pattern operations
dependencies 2 imports · 16 importers
diagram shows first 10 each side; +0 more imports, +6 more importers in the complete lists below.
imports: nx_syscalls.nxnx_tier.nx
imported by: nx_ai_audit.nxnx_ai_audit_test.nxnx_batt_recondition.nxnx_batt_recondition_test.nxnx_battery_safety.nxnx_battery_safety_test.nxnx_captain_moroni_compose_test.nxnx_drone_doctrine.nxnx_drone_doctrine_test.nxnx_intent_test.nxnx_scam_detector.nxnx_scam_detector_test.nxnx_substrate_closure_compose_test.nxnx_tier3_ecology_compose_test.nxnx_transponder_quiescence.nxnx_transponder_quiescence_test.nx
structs
| none |
consts
| 36 | const NX_INTENT_DEFENSIVE: nx_int = 0 |
| 37 | const NX_INTENT_DIAGNOSTIC: nx_int = 1 |
| 38 | const NX_INTENT_EDUCATIONAL: nx_int = 2 |
| 39 | const NX_INTENT_CREATIVE: nx_int = 3 |
| 40 | const NX_INTENT_N_KINDS: nx_int = 4 |
| 44 | const NX_IN_OK: nx_int = 0 |
| 45 | const NX_IN_ERR_BAD_INTENT: nx_int = 1 |
| 46 | const NX_IN_REFUSED_INCONSISTENT: nx_int = 2 // caller / callee intents disagree |
| 47 | const NX_IN_REFUSED_OFFENSIVE: nx_int = 3 // structural-refusal fire |
| 48 | const NX_IN_REFUSED_UNDECLARED: nx_int = 4 // missing intent at boundary |
| 114 | const NX_OPK_READ_OWN_STATE: nx_int = 0 |
| 115 | const NX_OPK_WRITE_OWN_STATE: nx_int = 1 |
| 116 | const NX_OPK_NETWORK_RECV: nx_int = 2 |
| 117 | const NX_OPK_NETWORK_SEND: nx_int = 3 |
| 118 | const NX_OPK_ACTUATE_DRONE: nx_int = 4 // offensive-pattern unless Defensive |
| 119 | const NX_OPK_COMMAND_BATTERY: nx_int = 5 // offensive-pattern unless Defensive |
| 120 | const NX_OPK_ACTIVATE_TRANSPONDER: nx_int = 6 // offensive-pattern unless Defensive |
| 121 | const NX_OPK_KERNEL_PRIVILEGED: nx_int = 7 // offensive-pattern unless Defensive |
| 122 | const NX_OPK_PEER_BROADCAST: nx_int = 8 |
| 123 | const NX_OPK_N_KINDS: nx_int = 9 |
functions
| 52 | func nx_intent_is_valid(i: nx_int) -> nx_int |
| 76 | func nx_intent_compatible(caller: nx_int, callee: nx_int) -> nx_int |
| 101 | func nx_intent_check_invocation(caller: nx_int, callee: nx_int) -> nx_int |
| 125 | func nx_opk_is_valid(o: nx_int) -> nx_int called by 1: nx_intent_check_operation |
| 137 | func nx_opk_is_offensive_pattern(o: nx_int) -> nx_int |
| 151 | func nx_intent_check_operation(intent: nx_int, op: nx_int) -> nx_int called by 2: nx_battery_validate_commandmain calls 3: nx_intent_is_validnx_opk_is_validnx_opk_is_offensive_pattern |
| 165 | func nx_intent_string_short(i: nx_int) -> nx_int called by 1: main |