code wiki / _hdl_build / nx_spec_layers.nx
nx_spec_layers.nx
buildroot/runtime/_hdl_build/nx_spec_layers.nx
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
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
| 15 | const SS_INGEST: i64 = 1 // unstructured -> structured (harvest) |
| 16 | const SS_STRUCTURED: i64 = 2 // structured artifact (format, storage) |
| 17 | const SS_MEANINGFUL: i64 = 3 // meaningful retrieval (search) |
| 18 | const SS_ACTIONABLE: i64 = 4 // actionable answer (query API) |
| 20 | const SS_GAP: i64 = 0 // 0 corroborated facts -> raised hand, cannot spec yet |
| 21 | const SS_READY: i64 = 1 // has corroborated evidence -> spec it |
functions
| 24 | func ss_status(corroborated_count: i64) -> i64 |
| 30 | func ss_build_rank(charter_stage: i64, dep_depth: i64) -> i64 |
| 36 | func ss_exceed_by_unification(covers_format: i64, covers_storage: i64, covers_search: i64) -> i64 |
| 42 | func ss_count_gaps(corroborated: *i64, n: i64) -> i64 |
| 49 | func ss_order_build(rank: *i64, n: i64, out_order: *i64) -> i64 |
| 67 | func ss_spec_admissible(corroborated: *i64, n: i64, gaps_surfaced: i64) -> i64 |