code wiki / _hdl_build / nx_roadmap.nx

nx_roadmap.nx source

↩ module page · 46 lines · 2213 B

1// nx_roadmap.nx -- the team GENERATES + maintains its own ROADMAP (operator: I want to SEE the roadmap 2// up, generated by the team, with things CHECKED OFF -- not Claude pasting snippets). Owned by the 3// PROJECT MANAGER. The roadmap is L8 (machine code) -> L0 (frontier), and every item carries a GATE: 4// the item is DONE when its gate PASSES (the Engineer's exit-0) and TODO otherwise -- so items 5// CHECK THEMSELVES OFF as the gates go green, no human bookkeeping. The team emits the roadmap, 6// computes progress per layer, and names the NEXT build = the deepest still-TODO item (the backlog's 7// verdict, built bits-up). RACI: PM emits, Engineer's gates drive the check-offs, Builder builds the 8// next item. license_tier: ORIGINAL Refs: the layered backlog (L8->L0); gate-driven status. 9 10import "nx_syscalls.nx" 11 12const RM_TODO: i64 = 0 13const RM_DONE: i64 = 1 14 15// an item is DONE iff its verification gate passes (exit 0). the check-off is mechanical, not opinion. 16func rm_status(gate_passed: i64) -> i64 { if gate_passed == 1 { return RM_DONE } return RM_TODO } 17 18func rm_count_done(n: i64, gate_passed: *i64) -> i64 { 19 var c: i64 = 0; var i: i64 = 0 20 while i < n { if gate_passed[i] == 1 { c = c + 1 } i = i + 1 } 21 return c 22} 23 24// overall progress (per-1000): the fraction of roadmap items whose gate is green. 25func rm_progress(n: i64, gate_passed: *i64) -> i64 { 26 if n <= 0 { return 0 } 27 return (rm_count_done(n, gate_passed) * 1000) / n 28} 29 30// is a whole LAYER complete (every item at that layer checked off)? 31func rm_layer_done(n: i64, layer: *i64, gate_passed: *i64, L: i64) -> i64 { 32 var i: i64 = 0 33 while i < n { if layer[i] == L { if gate_passed[i] == 0 { return 0 } } i = i + 1 } 34 return 1 35} 36 37// the NEXT build = the DEEPEST (highest layer number, most foundational) item still TODO; -1 if all 38// done. this is the team's own verdict on what to build next -- bits-up, not cherry-picked. 39func rm_next(n: i64, layer: *i64, gate_passed: *i64) -> i64 { 40 var best: i64 = 0 - 1; var bestlayer: i64 = 0 - 1; var i: i64 = 0 41 while i < n { 42 if gate_passed[i] == 0 { if layer[i] > bestlayer { bestlayer = layer[i]; best = i } } 43 i = i + 1 44 } 45 return best 46}