code wiki / _hdl_build / nx_promptpack.nx
nx_promptpack.nx
buildroot/runtime/_hdl_build/nx_promptpack.nx
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
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
structs
| none |
consts
| 17 | const PP_CAP: i64 = 1048576 |
| 18 | const PP_OUT: i64 = 65536 |
| 19 | const PP_SPAN: i64 = 16 |
| 20 | const PP_USAGE: i64 = 2 |
| 21 | const PP_NOTGT: i64 = 3 |
| 22 | const PP_ORDMAX: i64 = 32 |
| 23 | const PP_TGTESC: i64 = 40 |
| 24 | const PP_FMTESC: i64 = 60 |
functions
| 26 | func pp_cat_span(out: *u8, o: i64, buf: *u8, s: i64, e: i64) -> i64 called by 1: pp_section |
| 37 | func pp_span_eq(a: *u8, s1: i64, e1: i64, b: *u8, s2: i64, e2: i64) -> i64 called by 1: pp_section |
| 54 | func pp_find(buf: *u8, l: i64, lit: *u8) -> i64 |
| 77 | func pp_field(buf: *u8, s: i64, e: i64, idx: i64, f: *i64) -> i64 called by 1: pp_section |
| 107 | func pp_section(buf: *u8, n: i64, out: *u8, o: i64, ss: i64, se: i64, rs: i64, re: i64, es: i64, ee: i64) -> i64 |
| 152 | func pp_emit(prefix: *u8, tgt: *u8, out: *u8) -> i64 |
| 214 | func pp_targets(prefix: *u8, out: *u8) -> i64 |
| 249 | func pp_selftest(base: *u8) -> i64 |
| 304 | func main(argc: i64, argv: *i64) -> i64 |