code wiki / (root) / nx_workmix_lib.nx

nx_workmix_lib.nx

buildroot/runtime/nx_workmix_lib.nx

20910 B421 linesdepth 5pulls 7 transitivereach 2 importersview sourcekind library
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_costest_lib.nx nx_ladder_lib.nx nx_workmix_lib.nx nx_workmix.nx nx_workmix_gate.nx

imports: nx_syscalls.nxnx_costest_lib.nxnx_ladder_lib.nx

imported by: nx_workmix.nxnx_workmix_gate.nx

structs

none

consts

20const WM_I64: i64 = 8
21const WM_C_FEATURE: i64 = 0
22const WM_C_ENABLEMENT: i64 = 1
23const WM_C_REWORK: i64 = 2
24const WM_C_UNCLASSED: i64 = 3
25const WM_CLASSES: i64 = 4
26const WM_B_NONE: i64 = 0 - 1 // the class table has no row for the board
27const WM_B_PRODUCT: i64 = 0
28const WM_B_OPERATIONS: i64 = 1
29const WM_BOARD_TAG: *u8 = "board" // board|<domain>|product or operations|<why>
30const WM_BOARD_NF: i64 = 4
31const WM_BOARD_F_DOM: i64 = 1
32const WM_BOARD_F_CLASS: i64 = 2
33const WM_WORD_PRODUCT: *u8 = "product"
34const WM_WORD_OPERATIONS: *u8 = "operations"
35const WM_ROLE_F_RUNG: i64 = 1 // rungrole|<rung>|<role>|<target>|<why>
36const WM_ROLE_F_ROLE: i64 = 2
37const WM_ROLE_MIN_NF: i64 = 3
38const WM_RUNG_F_DEPS: i64 = 7 // rung|id|title|symbol|note|kind|cost|deps
39const WM_A_EV: i64 = 0 // acc[WM_A_EV + class]: land rows of the window, by class
40const WM_A_DECIU: i64 = 4 // acc[WM_A_DECIU + class]: their declared cost in deci-u, by class
41const WM_A_LAND: i64 = 8 // every land row inside the window
42const WM_A_RETRACTS: i64 = 9 // every retract row inside the window
43const WM_A_RELANDS: i64 = 10 // land rows classed REWORK (the same number as acc[WM_A_EV + WM_C_REWORK]: two counters, one population)
44const WM_A_ENAB_NAMED: i64 = 11 // ENABLEMENT rows whose rung a FEATURE rung names in its deps
45const WM_A_ENAB_UNNAMED: i64 = 12
46const WM_A_BY_ROLE: i64 = 13 // rows classed by a rungrole row
47const WM_A_BY_BOARD: i64 = 14 // rows classed by the board class table
48const WM_A_NOPLAN: i64 = 15 // rows on a board whose plan could not be read (they are UNCLASSED)
49const WM_A_OPENED: i64 = 16 // open rows whose FIRST journal row falls inside the window: started here, not landed
50const WM_A_MALFORMED: i64 = 17 // ledger rows that carry an event tag and the wrong shape: counted, never half-read
51const WM_A_SLOTS: i64 = 18
52const WM_CH_COMMA: i64 = 44
53const WM_CH_SP: i64 = 32
54const WM_CH_SEMI: i64 = 59
55const WM_PERMIL: i64 = 1000
126const WM_K_LAND: i64 = 1
127const WM_K_RETRACT: i64 = 2
371const WM_LINE_TAIL: *u8 = " verdict=CENSUSED\n"

functions

57func wm_class_name(c: i64) -> *u8
65func wm_board_class(conf: *u8, cn: i64, dom: *u8) -> i64
87func wm_span_eq2(a: *u8, aoff: i64, alen: i64, b: *u8, boff: i64, blen: i64) -> i64
97func wm_rung_role(plan: *u8, pn: i64, rbuf: *u8, roff: i64, rlen: i64) -> i64
116func wm_class_of(role: i64, bclass: i64) -> i64
129func wm_event_kind(buf: *u8, p: i64, e: i64, off: *i64) -> i64
146func wm_reland(led: *u8, n: i64, p0: i64, e0: i64, epoch: i64, off: *i64) -> i64
176func wm_is_sep(c: i64) -> i64
185func wm_deps_has(buf: *u8, off: i64, len: i64, tok: *u8, tl: i64) -> i64
208func wm_index_bound(pn: i64, dom: *u8) -> i64
214func wm_index_board(plan: *u8, pn: i64, dom: *u8, bclass: i64, idx: *u8, o0: i64) -> i64
250func wm_named_by_feature(idx: *u8, n: i64, dom: *u8, rung: *u8, qual: *u8, off: *i64) -> i64
270func wm_board_index(names: *i64, np: i64, dom: *u8) -> i64
280func wm_copy_span(dst: *u8, o0: i64, src: *u8, off: i64, len: i64) -> i64
291func 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
357func wm_class_sum(acc: *i64) -> i64
362func wm_permil(part: i64, whole: i64) -> i64
372func wm_kv(dst: *u8, o0: i64, key: *u8, v: i64) -> i64
378func wm_tail(dst: *u8, o: i64) -> i64
385func wm_line(dst: *u8, o0: i64, asof: i64, days: i64, boards: i64, acc: *i64) -> i64
415func wm_line_bound() -> i64