code wiki / _hdl_build / nx_spec_layers.nx

nx_spec_layers.nx

buildroot/runtime/_hdl_build/nx_spec_layers.nx

4021 B71 linesdepth 2pulls 2 transitivereach 7 importersview sourcekind librarytopic spec
docsdependenciesstructsconstsfunctions

about

nx_spec_layers.nx -- the team's LAYERED-SPEC synthesis capability (operator 2026-06-05: "we really really need a true s class exceed spec synthesized so that we can build our own s class exceed specs from our process with claudes role reducing to zero"). COMPLEMENTS nx_spec_author (objective WEIGHTS from findings); this structures a MULTI-LAYER architectural spec. This is the MECHANIZED core of spec synthesis -- team-owned without an LLM: given cataloged Library facts grouped into LAYERS (each with a corroboration count from the 3-vote gate), it (1) detects GAPS (a layer with 0 corroborated facts = a RAISED HAND, never spec'd from thin air), (2) orders the build by the charter ladder + dependency depth (foundational/early-ladder first), (3) attaches a benchmark target, and (4) emits the ordered spec. The SYNTHESIS-INSIGHT (novel architecture choices) is where Claude still tutors -- until the team has a local LLM (operator: "future local llm augmenting it"). As the Library + this machinery grow, Claude's role shrinks toward zero. license_tier: ORIGINAL

dependencies 1 imports · 4 importers

nx_syscalls.nx nx_spec_layers.nx nx_assign_gen.nx nx_cms_layered_spec.nx nx_ereader_spec_synth.nx nx_spec_layers_test.nx

imports: nx_syscalls.nx

imported by: nx_assign_gen.nxnx_cms_layered_spec.nxnx_ereader_spec_synth.nxnx_spec_layers_test.nx

structs

none

consts

15const SS_INGEST: i64 = 1 // unstructured -> structured (harvest)
16const SS_STRUCTURED: i64 = 2 // structured artifact (format, storage)
17const SS_MEANINGFUL: i64 = 3 // meaningful retrieval (search)
18const SS_ACTIONABLE: i64 = 4 // actionable answer (query API)
20const SS_GAP: i64 = 0 // 0 corroborated facts -> raised hand, cannot spec yet
21const SS_READY: i64 = 1 // has corroborated evidence -> spec it

functions

24func ss_status(corroborated_count: i64) -> i64
30func ss_build_rank(charter_stage: i64, dep_depth: i64) -> i64
36func ss_exceed_by_unification(covers_format: i64, covers_storage: i64, covers_search: i64) -> i64
called by 2: mainmain
42func ss_count_gaps(corroborated: *i64, n: i64) -> i64
49func ss_order_build(rank: *i64, n: i64, out_order: *i64) -> i64
called by 3: mainmainmain calls 1: sys_mmap
67func ss_spec_admissible(corroborated: *i64, n: i64, gaps_surfaced: i64) -> i64
called by 3: mainmainmain calls 1: ss_count_gaps