nx_workmix_lib.nx
buildroot/runtime/nx_workmix_lib.nx
about
nx_workmix_lib.nx -- THE WORK-MIX RULER (ecosystem EC56, 2026-09-17): what LANDED in a window, classed by what it was an
investment IN. OPERATOR 2026-09-17: measure and shift our investment, through better and better estate capabilities,
towards features, and reduce the rework, enablement and expansion investment that detracts from the goals we set.
FEATURE a landed rung whose rungrole is contender or arm; with no rungrole, a rung on a board the class table marks product
ENABLEMENT rungrole substrate; with no rungrole, a rung on an operations board. Split by whether a FEATURE rung names it
in its deps (it unblocks a feature) or no feature rung does (enablement for its own sake, the class to shrink)
REWORK a land row whose rung's newest EARLIER event is a retract (the claim was withdrawn and landed again); retract
rows are counted beside it as events of their own. A rung that lands twice is NOT rework by that alone: a
land row journals a SLICE, and slices are how a rung is climbed (the close ruler learned this the same day).
UNCLASSED everything the data cannot class: no rungrole and no board class, a superseded or malformed role, a board
whose plan could not be read. It is its OWN bucket and it is printed: a class the ruler guessed is a lie.
the classes PARTITION the land rows of the window (their sum is printed beside the row count).
ONE reader of land rows: the events come from the costcal ledger (nx_costest_lib grammar); plans are read only for what the
ledger does not carry -- rungrole rows and deps. Pure: buffers and numbers in, so a gate drives it on planted rows.
license_tier: ORIGINAL No hw writes (Rule 26).
dependencies 3 imports · 2 importers
imports: nx_syscalls.nxnx_costest_lib.nxnx_ladder_lib.nx
imported by: nx_workmix.nxnx_workmix_gate.nx
structs
| none |
consts
| 20 | const WM_I64: i64 = 8 |
| 21 | const WM_C_FEATURE: i64 = 0 |
| 22 | const WM_C_ENABLEMENT: i64 = 1 |
| 23 | const WM_C_REWORK: i64 = 2 |
| 24 | const WM_C_UNCLASSED: i64 = 3 |
| 25 | const WM_CLASSES: i64 = 4 |
| 26 | const WM_B_NONE: i64 = 0 - 1 // the class table has no row for the board |
| 27 | const WM_B_PRODUCT: i64 = 0 |
| 28 | const WM_B_OPERATIONS: i64 = 1 |
| 29 | const WM_BOARD_TAG: *u8 = "board" // board|<domain>|product or operations|<why> |
| 30 | const WM_BOARD_NF: i64 = 4 |
| 31 | const WM_BOARD_F_DOM: i64 = 1 |
| 32 | const WM_BOARD_F_CLASS: i64 = 2 |
| 33 | const WM_WORD_PRODUCT: *u8 = "product" |
| 34 | const WM_WORD_OPERATIONS: *u8 = "operations" |
| 35 | const WM_ROLE_F_RUNG: i64 = 1 // rungrole|<rung>|<role>|<target>|<why> |
| 36 | const WM_ROLE_F_ROLE: i64 = 2 |
| 37 | const WM_ROLE_MIN_NF: i64 = 3 |
| 38 | const WM_RUNG_F_DEPS: i64 = 7 // rung|id|title|symbol|note|kind|cost|deps |
| 39 | const WM_A_EV: i64 = 0 // acc[WM_A_EV + class]: land rows of the window, by class |
| 40 | const WM_A_DECIU: i64 = 4 // acc[WM_A_DECIU + class]: their declared cost in deci-u, by class |
| 41 | const WM_A_LAND: i64 = 8 // every land row inside the window |
| 42 | const WM_A_RETRACTS: i64 = 9 // every retract row inside the window |
| 43 | const WM_A_RELANDS: i64 = 10 // land rows classed REWORK (the same number as acc[WM_A_EV + WM_C_REWORK]: two counters, one population) |
| 44 | const WM_A_ENAB_NAMED: i64 = 11 // ENABLEMENT rows whose rung a FEATURE rung names in its deps |
| 45 | const WM_A_ENAB_UNNAMED: i64 = 12 |
| 46 | const WM_A_BY_ROLE: i64 = 13 // rows classed by a rungrole row |
| 47 | const WM_A_BY_BOARD: i64 = 14 // rows classed by the board class table |
| 48 | const WM_A_NOPLAN: i64 = 15 // rows on a board whose plan could not be read (they are UNCLASSED) |
| 49 | const WM_A_OPENED: i64 = 16 // open rows whose FIRST journal row falls inside the window: started here, not landed |
| 50 | const WM_A_MALFORMED: i64 = 17 // ledger rows that carry an event tag and the wrong shape: counted, never half-read |
| 51 | const WM_A_SLOTS: i64 = 18 |
| 52 | const WM_CH_COMMA: i64 = 44 |
| 53 | const WM_CH_SP: i64 = 32 |
| 54 | const WM_CH_SEMI: i64 = 59 |
| 55 | const WM_PERMIL: i64 = 1000 |
| 126 | const WM_K_LAND: i64 = 1 |
| 127 | const WM_K_RETRACT: i64 = 2 |
| 371 | const WM_LINE_TAIL: *u8 = " verdict=CENSUSED\n" |
functions
| 57 | func wm_class_name(c: i64) -> *u8 |
| 65 | func wm_board_class(conf: *u8, cn: i64, dom: *u8) -> i64 |
| 87 | func wm_span_eq2(a: *u8, aoff: i64, alen: i64, b: *u8, boff: i64, blen: i64) -> i64 |
| 97 | func wm_rung_role(plan: *u8, pn: i64, rbuf: *u8, roff: i64, rlen: i64) -> i64 |
| 116 | func wm_class_of(role: i64, bclass: i64) -> i64 |
| 129 | func wm_event_kind(buf: *u8, p: i64, e: i64, off: *i64) -> i64 |
| 146 | func wm_reland(led: *u8, n: i64, p0: i64, e0: i64, epoch: i64, off: *i64) -> i64 |
| 176 | func wm_is_sep(c: i64) -> i64 |
| 185 | func wm_deps_has(buf: *u8, off: i64, len: i64, tok: *u8, tl: i64) -> i64 |
| 208 | func wm_index_bound(pn: i64, dom: *u8) -> i64 |
| 214 | func wm_index_board(plan: *u8, pn: i64, dom: *u8, bclass: i64, idx: *u8, o0: i64) -> i64 |
| 250 | func wm_named_by_feature(idx: *u8, n: i64, dom: *u8, rung: *u8, qual: *u8, off: *i64) -> i64 |
| 270 | func wm_board_index(names: *i64, np: i64, dom: *u8) -> i64 |
| 280 | func wm_copy_span(dst: *u8, o0: i64, src: *u8, off: i64, len: i64) -> i64 |
| 291 | func wm_mix_census(led: *u8, ln: i64, lo: i64, hi: i64, conf: *u8, cn: i64, names: *i64, pbuf: *i64, plen: *i64, np: i64, idx: *u8, idxn: i64, acc: *i64) -> i64 |
| 357 | func wm_class_sum(acc: *i64) -> i64 |
| 362 | func wm_permil(part: i64, whole: i64) -> i64 |
| 372 | func wm_kv(dst: *u8, o0: i64, key: *u8, v: i64) -> i64 |
| 378 | func wm_tail(dst: *u8, o: i64) -> i64 |
| 385 | func wm_line(dst: *u8, o0: i64, asof: i64, days: i64, boards: i64, acc: *i64) -> i64 |
| 415 | func wm_line_bound() -> i64 |