code wiki / _hdl_build / nx_assign_gen.nx

nx_assign_gen.nx

buildroot/runtime/_hdl_build/nx_assign_gen.nx

6044 B97 linesdepth 3pulls 4 transitivereach 3 importersview sourcekind librarytopic assign
docsdependenciesstructsconstsfunctions

about

nx_assign_gen.nx -- the RESEARCH -> SPEC -> ASSIGNMENTS pipeline (operator: "make sure our research goes to spec better to create assignments... the teams workflows getting to s class exceed"). Closes the link the team didn't own: turning the researcher's ADMITTED FACTS into the BACKLOG -- the part Claude used to write by hand. Each candidate work-item carries its evidence (corroboration count from the researcher), its charter layer, whether the action is known, and its dependency. The generator: * GROUNDS every BUILD assignment in >= 1 corroborated fact (the no-thin-air cardinal). A 0-evidence item is NOT fabricated into a build task -- it becomes a PURSUE (raised-hand research) assignment. * ORDERS by the charter ladder (ss_build_rank: hardware up, deps break ties). * Refuses an invalid plan: build-order must be MONOTONIC (no item depends on a later/higher one). The S-class gate = grounded + gap-flagged + order-monotonic. Composes nx_spec_layers (ss_status/ ss_build_rank/ss_count_gaps). LAWS: struct-free, integer-only. license_tier: ORIGINAL

dependencies 3 imports · 2 importers

nx_spec_layers.nx nx_itoa_lib.nx nx_syscalls.nx nx_assign_gen.nx nx_assign_gen_test.nx nx_team_chain.nx

imports: nx_spec_layers.nxnx_itoa_lib.nxnx_syscalls.nx

imported by: nx_assign_gen_test.nxnx_team_chain.nx

structs

none

consts

16const AG_BUILD: i64 = 1 // grounded + action known -> a buildable assignment
17const AG_PURSUE: i64 = 2 // 0 corroboration -> raised hand, becomes a RESEARCH assignment (not faked)
18const AG_BLOCKED: i64 = 3 // corroborated but action unknown -> needs design before build

functions

21func ag_classify(corroborated: i64, action_known: i64) -> i64
30func ag_order_ok(layer: *i64, dep_depth: *i64, dep: *i64, n: i64) -> i64
called by 2: ag_spec_gatemain calls 1: ss_build_rank
46func ag_count_build(corroborated: *i64, action_known: *i64, n: i64) -> i64
called by 2: ag_emitmain calls 1: ag_classify
55func ag_grounded_permil(corroborated: *i64, n: i64) -> i64
65func ag_spec_gate(corroborated: *i64, layer: *i64, dep_depth: *i64, dep: *i64, n: i64, min_grounded_permil: i64) -> i64
73func ag_w(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 1: ag_emit calls 1: sys_write
78func ag_wn(v: i64) -> i64 { nxi_out(v); return 0 }
called by 1: ag_emit calls 1: nxi_out
82func ag_emit(names: *i64, corroborated: *i64, action_known: *i64, layer: *i64, dep_depth: *i64, n: i64) -> i64