code wiki / _hdl_build / nx_researcher_spec.nx

nx_researcher_spec.nx

buildroot/runtime/_hdl_build/nx_researcher_spec.nx

3019 B53 linesdepth 2pulls 2 transitivereach 1 importersview sourcekind librarytopic researcher
docsdependenciesstructsconstsfunctions

about

nx_researcher_spec.nx -- the RESEARCHER turns a NEED into a buildable SPEC, decomposed to Layer-8 primitives (operator: "if we need 3 we need the researcher to find what we need, build the spec, and get it going... build from layer 8 up"). A spec is the deterministic bridge from "we need X" to the Builder building X. It is ACTIONABLE only if it is COMPLETE and every primitive it requires is already available at L8 (integer ALU ops the team has proven gate-level); a required primitive that is NOT available pushes the build DOWN a layer (build that first) -- and if the missing primitive is a learned/LLM thing, the Researcher flags it as an LLM-gap rather than pretending the team can build it. RACI: Researcher emits + grades the spec; Builder builds to it; Engineer's gate is the acceptance test. license_tier: ORIGINAL

dependencies 1 imports · 1 importers

nx_syscalls.nx nx_researcher_spec.nx nx_researcher_spec_test.nx

imports: nx_syscalls.nx

imported by: nx_researcher_spec_test.nx

structs

none

consts

14const RS_L8: i64 = 8
18const RS_PRIM_IMUL: i64 = 1 // integer multiply (L8 ALU -- available)
19const RS_PRIM_IADD: i64 = 2 // integer add (L8 ALU -- available)
20const RS_PRIM_ISQRT: i64 = 3 // integer sqrt (for cosine magnitude; used in nx_qlayer -- available)
21const RS_PRIM_COUNT: i64 = 4 // substring/term count (nx_research_extract -- available)
22const RS_PRIM_EMBED_TRAIN: i64 = 5 // learned embedding training -- NOT available (LLM-gap rung)

functions

25func rs_prim_available(prim: i64) -> i64 { if prim == RS_PRIM_EMBED_TRAIN { return 0 } return 1 }
called by 1: rs_first_missing
28func rs_spec_complete(named: i64, layer: i64, n_in: i64, n_out: i64, n_prim: i64, has_gate: i64) -> i64
called by 1: main
39func rs_first_missing(prims: *i64, n_prim: i64) -> i64
46func rs_spec_actionable(complete: i64, prims: *i64, n_prim: i64) -> i64
called by 1: main calls 1: rs_first_missing
53func rs_missing_is_llm_gap(missing_prim: i64) -> i64 { if missing_prim == RS_PRIM_EMBED_TRAIN { return 1 } return 0 }
called by 1: main