code wiki / _hdl_build / nx_capability_ladder.nx

nx_capability_ladder.nx

buildroot/runtime/_hdl_build/nx_capability_ladder.nx

15008 B349 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tooltopic capability
docsdependenciesstructsconstsfunctions

about

nx_capability_ladder.nx -- THE BUILD-UP MAP, hardware rung up (operator 2026-06-13: "we need mapping on how we build from the hardware rung up ... so we never have floating capabilities but each layer below acts as the foundation for the one above"). Organ-AUTHORED (not hand-drawn): composes nx_assign_core to read the REAL queue and COMPUTE, from the deps graph + DONE status, a layered map: layer(row) = 0 if deps "-" ; else 1 + max(layer(dep)) (topological depth, fixpoint) layer 0 = the foundations with no dependency = the hardware/toolchain rung. FLOATING = a DONE capability whose foundation (a dep) is NOT DONE / is unknown -- a capability standing on nothing. The no-floating LAW: zero floating. Emits the map to knowledge/registry/capability_ladder.tsv (layer-ascending = bottom-up) and a CAPLADDER evidence line. Navigation: the lowest ABSENT foundation is what to build next; never build a row whose foundation is ABSENT (that would float). SELF-VALIDATING (no false-green): a baked pos control (DONE row on a DONE foundation -> NOT floating) and neg control (DONE row on a TODO foundation -> floating) run on a synthetic in-memory context BEFORE the real queue; controls wrong -> RED. Reuses an_deps_done as the grounding primitive (DRY). license_tier: ORIGINAL

dependencies 1 imports · 0 importers

nx_assign_core.nx nx_capability_ladder.nx

imports: nx_assign_core.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main cl_make_test an_newcx sys_mmap an_id_at an_deps_at cl_is_floating cl_deps_grounded an_deps_at ↻ an_find an_streq an_id_at ↻ cl_organ_exists cl_try_open cl_make_test_org an_newcx ↻ an_id_at ↻ an_deps_at ↻ cl_is_floating ↻ sys_now_realtime_sec sys_mmap ↻ sys_clock_gettime_real cl_gate cl_w cl_wn sys_openat_append an_newcx ↻ an_load sys_mmap ↻ sys_openat_rd sys_read sys_close an_id_at ↻ an_deps_at ↻ an_gate_at an_title_at cl_w ↻ cl_max_dep_layer an_deps_at ↻ an_find ↻

structs

none

consts

21const CL_QUEUE: *u8 = "knowledge/registry/assignment_queue.tsv"
22const CL_MAP: *u8 = "knowledge/registry/capability_ladder.tsv"
23const CL_LOG: *u8 = "knowledge/status/capability_ladder.log"

functions

25func cl_w(fd: i64, s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(fd, s, n); return 0 }
26func cl_wn(fd: i64, v: i64) -> i64 { let bb: *u8 = sys_mmap(28); var m: i64=v; if m<0 {m=0-m; sys_write(fd,"-" as *u8,1)}; let t: *u8 = sys_mmap(28); var k: i64=0; if m==0 {t[0]=48;k=1}; while m>0 {t[k]=(48+(m%10)) as u8; m=m/10; k=k+1}; var i: i64=0; while i<k {bb[i]=t[k-1-i]; i=i+1}; sys_write(fd, bb, k); return 0 }
28func cl_status_str(b: i64) -> *u8
40func cl_try_open(prefix: *u8, name: *u8) -> i64
called by 1: cl_organ_exists
55func cl_organ_exists(name: *u8) -> i64
66func cl_deps_grounded(cx: *i64, r: i64) -> i64
100func cl_is_floating(cx: *i64, r: i64) -> i64
108func cl_max_dep_layer(cx: *i64, r: i64, lay: *i64, tok: *u8) -> i64
called by 1: main calls 2: an_deps_atan_find
136func cl_emit_row(fd: i64, L: i64, cx: *i64, r: i64, stx: *i64, flt: *i64) -> i64
151func cl_arc_sibling(cx: *i64, tok: *u8) -> i64
called by 1: cl_dep_blockers calls 1: an_id_at
175func cl_dep_blockers(fd: i64, cx: *i64, r: i64, tok: *u8) -> i64
204func cl_float_line(fd: i64, cx: *i64, r: i64, lay: *i64, stx: *i64, tok: *u8) -> i64
214func cl_gate(fd: i64, cpos: i64, cneg: i64, corgpos: i64, corgneg: i64, caps: i64, layers: i64, present: i64, floating: i64, epoch: i64, ok: i64) -> i64
called by 1: main calls 2: cl_wcl_wn
230func cl_make_test(a_status: i64) -> i64
245func cl_make_test_org(dep: *u8) -> i64
258func main() -> i64