code wiki / _hdl_build / nx_promptpack.nx

nx_promptpack.nx

buildroot/runtime/_hdl_build/nx_promptpack.nx

13390 B349 linesdepth 5pulls 8 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_promptpack.nx -- CU01 PROMPT-SCAFFOLD EMITTER (capability-uplift lane; SPEC1 promptpack-format-law pinned 2026-07-21): internal SSOT = capuplift- plane (sovereign rows); per-target scaffolds are EMITTED from emitter rules held as DATA in the same plane (rule 11) -- an emitfmt row maps target -> 4 boundary affixes (open_pre|open_suf|close_pre|close_suf pipe-packed in content); a secmap row maps section+order -> the PT row whose guidance fills it. Adding a partner model or section = a data row, ZERO code. XML/markdown exist ONLY as emitted boundary bytes (sovereign-base-interop-boundary law), never the base. Composes nx_sovjson_lib + nx_store_seed_lib + nx_gate_verdict from birth = OO, dogfoods the shared base. license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0 emit <target> [prefix] -> scaffold text | targets [prefix] -> JSON map | selftest [tmpprefix] -> gate capuplift- row = id name sev status owner topic content (7-col; topic emitfmt/secmap drive the emit).

dependencies 5 imports · 0 importers

nx_sovjson_lib.nx nx_store_seed_lib.nx nx_seg_store.nx nx_gate_verdict.nx nx_syscalls.nx nx_promptpack.nx

imports: nx_sovjson_lib.nxnx_store_seed_lib.nxnx_seg_store.nxnx_gate_verdict.nxnx_syscalls.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sj_werr sys_write sys_exit sj_lit_eq sj_vlen sys_mmap pp_emit sys_mmap ↻ sts_load ss_open_cached ssc_init sys_mmap ↻ ssc_sig_of ss_cat sys_fstatat ssc_streq ss_open ss_open2 sys_mmap ↻ ss_manifest_dyn ss_cat ↻ ss_loadfile ss_load_aux2 ssl_total_keys ssl_pow2 ssl_build ss_r32 ssl_lookup ss_manifest_free sys_munmap ssc_retire_handle sts_mm sys_mmap ↻ sts_werr sys_write ↻ sys_exit ↻ ss_hget sys_mmap ↻ ss_idx_find

structs

none

consts

17const PP_CAP: i64 = 1048576
18const PP_OUT: i64 = 65536
19const PP_SPAN: i64 = 16
20const PP_USAGE: i64 = 2
21const PP_NOTGT: i64 = 3
22const PP_ORDMAX: i64 = 32
23const PP_TGTESC: i64 = 40
24const PP_FMTESC: i64 = 60

functions

26func pp_cat_span(out: *u8, o: i64, buf: *u8, s: i64, e: i64) -> i64
called by 1: pp_section
37func pp_span_eq(a: *u8, s1: i64, e1: i64, b: *u8, s2: i64, e2: i64) -> i64
called by 1: pp_section
54func pp_find(buf: *u8, l: i64, lit: *u8) -> i64
called by 1: pp_selftest calls 1: sj_vlen
77func pp_field(buf: *u8, s: i64, e: i64, idx: i64, f: *i64) -> i64
called by 1: pp_section
107func pp_section(buf: *u8, n: i64, out: *u8, o: i64, ss: i64, se: i64, rs: i64, re: i64, es: i64, ee: i64) -> i64
152func pp_emit(prefix: *u8, tgt: *u8, out: *u8) -> i64
214func pp_targets(prefix: *u8, out: *u8) -> i64
249func pp_selftest(base: *u8) -> i64
304func main(argc: i64, argv: *i64) -> i64