nx_flow_state.nx
buildroot/runtime/nx_flow_state.nx
about
nx_flow_state.nx -- F1 first stone of NISHI_FLOW_DOCTRINE_ROADMAP.md.
Aggregate flow-state classifier. Composes the substrate's
existing measurement layers (nx_perf_pathology, nx_etg outcomes,
conductor placement signals, cross-arch parity verdicts,
reclamation accounting) into a single sealed-enum verdict on
whether the system is currently at its empirical near-edge --
the substrate's flow state.
Csikszentmihalyi's nine conditions for flow, translated to
substrate-testable signals:
1. Clear goals -> reference band present
2. Immediate feedback -> ETG attestation emitted
3. Challenge-skill balance -> tournament selected variant
matching empirical ceiling
4. Action-awareness merger -> conductor placement decided
5. Loss of self-conscious -> substrate overhead < noise floor
6. Distorted time -> N/A substrate tier (human-flow F7)
7. Autotelic -> reclamation > 0 OR all confirmed
8. Concentration on task -> no second-class resources idle
9. Sense of control -> attestation chain complete
All eight measurable conditions met simultaneously -> NX_FLOW_STATE_FLOW.
Cardinal violations (paywall honored, second-class resources,
single-arch overfit, latency spike) -> NX_FLOW_STATE_TILT.
Insufficient signals -> NX_FLOW_STATE_BROKEN.
Composes:
[[NISHI_FLOW_DOCTRINE_ROADMAP]] F1 (this is the first stone)
nx_perf_pathology.nx (classifier feeds flow signals)
nx_etg.nx (attestation per probe)
[[feedback-hardware-agnostic-is-robustness]] (cross-arch parity
is one of the nine conditions)
[[feedback-jim-clark-racing-line-substrate]] (the racing line
IS the substrate's flow state)
[[feedback-conductor-heterogeneous-compute-no-second-class-resources]]
(P10 is TILT-inducing)
[[feedback-reclamation-doctrine-captain-moroni]] (P11 is
TILT-inducing)
[[feedback-physical-truth-over-published-docs-silicon-empirical-
dependencies 3 imports · 1 importers
imports: nx_syscalls.nxnx_perf_pathology.nxnx_etg.nx
imported by: nx_flow_state_test.nx
structs
| 94 | struct NxFlowState |
consts
| 65 | const NX_FLOW_STATE_NONE: i64 = 0 |
| 66 | const NX_FLOW_STATE_FLOW: i64 = 1 // all 8 measurable conditions met |
| 67 | const NX_FLOW_STATE_NEAR_FLOW: i64 = 2 // 6-7 conditions met |
| 68 | const NX_FLOW_STATE_SLIPPING: i64 = 3 // 4-5 conditions met |
| 69 | const NX_FLOW_STATE_TILT: i64 = 4 // cardinal violation present |
| 70 | const NX_FLOW_STATE_BROKEN: i64 = 5 // insufficient signals |
| 71 | const NX_FLOW_STATE_N: i64 = 6 |
functions
| 73 | func nx_flow_state_is_valid(s: i64) -> i64 called by 1: main |
| 79 | func nx_flow_state_name(s: i64) -> *u8 |
| 135 | func nx_flow_state_init(s: *NxFlowState, silicon_serial_hash: i64) called by 1: main |
| 166 | func _flow_count_unsignaled(s: *NxFlowState) -> i64 called by 1: nx_flow_classify |
| 180 | func _flow_count_met(s: *NxFlowState) -> i64 called by 1: nx_flow_classify |
| 194 | func _flow_has_cardinal_violation(s: *NxFlowState) -> i64 called by 1: nx_flow_classify |
| 202 | func nx_flow_classify(s: *NxFlowState) -> i64 |
| 255 | func nx_flow_attest( |