code wiki / _hdl_build / nx_work_predict_lib.nx
nx_work_predict_lib.nx
buildroot/runtime/_hdl_build/nx_work_predict_lib.nx
about
nx_work_predict_lib.nx -- the FUTURE axis: GENEALOGY-grounded prediction of what work grows next.
Reads capability_ladder.tsv (itself COMPUTED from real deps+DONE status -- "NOT asserted", so it is
already a non-hallucinated source) and finds the ADJACENT-POSSIBLE frontier: a capability whose
status is not DONE but ALL of its prerequisites ARE DONE -- i.e. the parent just got built, so this
node is the next thing that can grow "out from god". Prediction as DATA, never prose from a model:
every prediction is a row whose deps are mechanically verified DONE, with the WHY = which
prerequisite unlocked it. (per author-by-organ-not-claude + no-wave-measured-exceed.)
columns of capability_ladder.tsv: layer<TAB>id<TAB>status<TAB>grounding<TAB>deps (deps "-" or a,b,c)
REUSE (DRY): jx_find / jx_len from nx_json_lib. Sovereign. license_tier: ORIGINAL
dependencies 2 imports · 2 importers
imports: nx_syscalls.nxnx_json_lib.nx
imported by: nx_work_predict.nxnx_work_predict_gate.nx
structs
| none |
consts
| 13 | const WP_MAGIC_1024: i64 = 1024 |
| 15 | const WP_DONE: i64 = 0 // status already DONE -> not a prediction |
| 16 | const WP_ADJACENT: i64 = 1 // not DONE, has real dep(s), ALL deps DONE -> probable-next (the gold) |
| 17 | const WP_ROOT: i64 = 2 // not DONE, deps "-" -> foundational-available (no parent to grow from) |
| 18 | const WP_BLOCKED: i64 = 3 // not DONE, some dep NOT DONE -> still blocked, not yet predictable |
| 20 | const WP_MAXADJ: i64 = 1024 |
| 21 | const WP_IDCAP: i64 = 96 |
| 22 | const WP_DONECAP: i64 = 262144 |
functions
| 24 | func wp_streq(a: *u8, b: *u8) -> i64 |
| 33 | func wp_cat(dst: *u8, off: i64, s: *u8) -> i64 { var o: i64 = off; var i: i64 = 0; while s[i] != (0 as u8) { dst[o] = s[i]; o = o + 1; i = i + 1 } return o } called by 1: wp_predict |
| 34 | func wp_catn(dst: *u8, off: i64, v: i64) -> i64 |
| 46 | func wp_is_done(doneset: *u8, donelen: i64, id: *u8) -> i64 |
| 59 | func wp_classify(status: *u8, deps: *u8, doneset: *u8, donelen: i64) -> i64 |
| 92 | func wp_field(buf: *u8, ls: i64, le: i64, k: i64, out: *u8, outcap: i64) -> i64 |
| 111 | func wp_atoi(s: *u8) -> i64 called by 1: wp_predict |
| 118 | func wp_first_dep(deps: *u8, out: *u8) -> i64 called by 1: wp_predict |
| 130 | func wp_build_doneset(buf: *u8, len: i64, ds: *u8, dscap: i64) -> i64 |
| 158 | func wp_predict(buf: *u8, len: i64, out: *u8, outcap: i64, stats: *i64) -> i64 |