code wiki / _hdl_build / nx_assign_gen.nx
nx_assign_gen.nx
buildroot/runtime/_hdl_build/nx_assign_gen.nx
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
imports: nx_spec_layers.nxnx_itoa_lib.nxnx_syscalls.nx
imported by: nx_assign_gen_test.nxnx_team_chain.nx
structs
| none |
consts
| 16 | const AG_BUILD: i64 = 1 // grounded + action known -> a buildable assignment |
| 17 | const AG_PURSUE: i64 = 2 // 0 corroboration -> raised hand, becomes a RESEARCH assignment (not faked) |
| 18 | const AG_BLOCKED: i64 = 3 // corroborated but action unknown -> needs design before build |
functions
| 21 | func ag_classify(corroborated: i64, action_known: i64) -> i64 |
| 30 | func ag_order_ok(layer: *i64, dep_depth: *i64, dep: *i64, n: i64) -> i64 |
| 46 | func ag_count_build(corroborated: *i64, action_known: *i64, n: i64) -> i64 |
| 55 | func ag_grounded_permil(corroborated: *i64, n: i64) -> i64 |
| 65 | func ag_spec_gate(corroborated: *i64, layer: *i64, dep_depth: *i64, dep: *i64, n: i64, min_grounded_permil: i64) -> i64 |
| 73 | func 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 } |
| 78 | func ag_wn(v: i64) -> i64 { nxi_out(v); return 0 } |
| 82 | func ag_emit(names: *i64, corroborated: *i64, action_known: *i64, layer: *i64, dep_depth: *i64, n: i64) -> i64 |