code wiki / _hdl_build / nx_pm_intake.nx
nx_pm_intake.nx
buildroot/runtime/_hdl_build/nx_pm_intake.nx
about
nx_pm_intake.nx -- FEATURE-REQUEST INTAKE -> BACKLOG front door (ws=ws-intel, 2026-07-20).
The operator's dual-LLM PM vision mapped sovereign: ANY seat (Claude, K3-mu, role daemon,
operator) posts a feature request / observation; the PM tier (human or LLM seat) TRIAGES it;
FILING links it to a real backlog row (frontier F-row / work- W-row). State is DERIVED from
append-only frames -- never stored, never asserted (the loop's evidence law):
REQ w/o TRIAGE = NEW; TRIAGE w/o FILED = TRIAGED; FILED = FILED.
Append-only journal = crash-proof + conflict-free (O_APPEND, ws_sync lineage). Composes:
nx_ask = agent->OPERATOR question queue (decisions); nx_pm_intake = anyone->PM BACKLOG
(requests). The internal-LLM integration = an agent seat driving triage via tools/call.
Frame: <ts>\t<VERB>\t<id>\t<actor>\t<text> VERB in {REQ, TRIAGE, FILED}
SCALE LAW: windowed reads + declared envelope (window_bytes/truncated/reqs_capped).
license_tier: ORIGINAL No hw writes (Rule 26).
ask <journal> <from> <text> -> NX-INTAKE id=<epoch-id>
triage <journal> <id> <actor> <text> -> fail-closed ABSENT(3) on unknown id
file <journal> <id> <actor> <text> -> fail-closed ABSENT(3) on unknown / UNTRIAGED(4)
list <journal> [NEW|TRIAGED|FILED|ALL] -> JSON
selftest <scratch-journal> -> gate T1..T8 (caller pre-cleans path)
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_gate_verdict.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
| 20 | const PI_MAGIC_4096: i64 = 4096 |
| 21 | const PI_MAGIC_2000: i64 = 2000 |
| 22 | const PI_MAGIC_200000: i64 = 200000 |
| 23 | const PI_MAGIC_12345: i64 = 12345 |
| 24 | const PI_MAGIC_7000: i64 = 7000 |
| 25 | const PI_MAGIC_7100: i64 = 7100 |
| 26 | const PI_MAGIC_7200: i64 = 7200 |
| 27 | const PI_MAGIC_8000: i64 = 8000 |
| 28 | const PI_MAGIC_99999: i64 = 99999 |
| 29 | const PI_MAGIC_8100: i64 = 8100 |
| 30 | const PI_MAGIC_8200: i64 = 8200 |
| 32 | const PI_WIN: i64 = 4194304 |
| 33 | const PI_OUT: i64 = 262144 |
| 34 | const PI_SOFT: i64 = 49152 |
| 35 | const PI_TEXT_MAX: i64 = 300 |
| 36 | const PI_NAME_MAX: i64 = 120 |
functions
| 38 | func pi_cat(d: *u8, o: i64, s: *u8) -> i64 { var p: i64=o; var i: i64=0; while s[i]!=(0 as u8){ d[p]=s[i]; p=p+1; i=i+1 } return p } |
| 39 | func pi_catn(d: *u8, o: i64, v: i64) -> i64 |
| 51 | func pi_vlen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } |
| 52 | func pi_read(path: *u8, buf: *u8, cap: i64) -> i64 |
| 62 | func pi_append(journal: *u8, ts: i64, verb: *u8, id: i64, actor: *u8, text: *u8) -> i64 called by 2: pi_selftestmain calls 7: sys_now_realtime_secsys_mmappi_catnpi_catsys_openat_appendsys_write+1 |
| 92 | func pi_le(q: *u8, i: i64, n: i64) -> i64 |
| 98 | func pi_col(q: *u8, ls: i64, le: i64, c: i64, out: *i64) -> i64 |
| 114 | func pi_lit_eq(q: *u8, s: i64, e: i64, lit: *u8) -> i64 |
| 120 | func pi_atoi(q: *u8, s: i64, e: i64) -> i64 |
| 127 | func pi_has_id(q: *u8, n: i64, verb: *u8, idv: i64) -> i64 |
| 141 | func pi_state(q: *u8, n: i64, idv: i64) -> i64 |
| 147 | func pi_state_name(st: i64) -> *u8 |
| 154 | func pi_text_span(q: *u8, n: i64, verb: *u8, idv: i64, out: *i64) -> i64 |
| 174 | func pi_from_span(q: *u8, n: i64, idv: i64, out: *i64) -> i64 |
| 190 | func pi_jesc(d: *u8, o: i64, q: *u8, s: i64, e: i64, maxb: i64) -> i64 |
| 204 | func pi_key(d: *u8, o: i64, name: *u8) -> i64 |
| 214 | func pi_qlit(d: *u8, o: i64, s: *u8) -> i64 |
| 222 | func pi_emit_req(d: *u8, o: i64, q: *u8, n: i64, idv: i64) -> i64 |
| 257 | func pi_id_first(q: *u8, upto: i64, idv: i64) -> i64 |
| 271 | func pi_list_json(q: *u8, n: i64, jp: *u8, truncated: i64, filt: i64, d: *u8) -> i64 |
| 364 | func pi_hesc(d: *u8, o: i64, q: *u8, s: i64, e: i64, maxb: i64) -> i64 |
| 378 | func pi_page_html(q: *u8, n: i64, jp: *u8, truncated: i64, d: *u8) -> i64 |
| 463 | func pi_find(d: *u8, dn: i64, lit: *u8) -> i64 |
| 478 | func pi_selftest(journal: *u8) -> i64 |
| 542 | func main(argc: i64, argv: *i64) -> i64 |