code wiki / _hdl_build / nx_pm_intake.nx

nx_pm_intake.nx

buildroot/runtime/_hdl_build/nx_pm_intake.nx

25848 B636 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tooltopic pm
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_gate_verdict.nx nx_pm_intake.nx

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

main gv_puts sys_write sys_exit pi_vlen pi_lit_eq pi_selftest gv_ctr sys_mmap gv_head gv_puts ↻ sys_mmap ↻ pi_read sys_openat_rd sys_read sys_close pi_state pi_has_id sys_mmap ↻ pi_le pi_col pi_lit_eq ↻ pi_atoi gv_check gv_puts ↻ pi_append sys_now_realtime_sec sys_mmap ↻ sys_clock_gettime_real sys_mmap ↻ pi_catn sys_mmap ↻ pi_cat sys_openat_append sys_write ↻ sys_close ↻ pi_text_span sys_mmap ↻ pi_le ↻ pi_col ↻

structs

none

consts

20const PI_MAGIC_4096: i64 = 4096
21const PI_MAGIC_2000: i64 = 2000
22const PI_MAGIC_200000: i64 = 200000
23const PI_MAGIC_12345: i64 = 12345
24const PI_MAGIC_7000: i64 = 7000
25const PI_MAGIC_7100: i64 = 7100
26const PI_MAGIC_7200: i64 = 7200
27const PI_MAGIC_8000: i64 = 8000
28const PI_MAGIC_99999: i64 = 99999
29const PI_MAGIC_8100: i64 = 8100
30const PI_MAGIC_8200: i64 = 8200
32const PI_WIN: i64 = 4194304
33const PI_OUT: i64 = 262144
34const PI_SOFT: i64 = 49152
35const PI_TEXT_MAX: i64 = 300
36const PI_NAME_MAX: i64 = 120

functions

38func 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 }
39func pi_catn(d: *u8, o: i64, v: i64) -> i64
51func pi_vlen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
52func pi_read(path: *u8, buf: *u8, cap: i64) -> i64
62func pi_append(journal: *u8, ts: i64, verb: *u8, id: i64, actor: *u8, text: *u8) -> i64
92func pi_le(q: *u8, i: i64, n: i64) -> i64
98func pi_col(q: *u8, ls: i64, le: i64, c: i64, out: *i64) -> i64
114func pi_lit_eq(q: *u8, s: i64, e: i64, lit: *u8) -> i64
120func pi_atoi(q: *u8, s: i64, e: i64) -> i64
127func pi_has_id(q: *u8, n: i64, verb: *u8, idv: i64) -> i64
141func pi_state(q: *u8, n: i64, idv: i64) -> i64
147func pi_state_name(st: i64) -> *u8
154func pi_text_span(q: *u8, n: i64, verb: *u8, idv: i64, out: *i64) -> i64
174func pi_from_span(q: *u8, n: i64, idv: i64, out: *i64) -> i64
190func pi_jesc(d: *u8, o: i64, q: *u8, s: i64, e: i64, maxb: i64) -> i64
204func pi_key(d: *u8, o: i64, name: *u8) -> i64
called by 2: pi_emit_reqpi_list_json calls 1: pi_cat
214func pi_qlit(d: *u8, o: i64, s: *u8) -> i64
called by 2: pi_emit_reqpi_list_json calls 1: pi_cat
222func pi_emit_req(d: *u8, o: i64, q: *u8, n: i64, idv: i64) -> i64
257func pi_id_first(q: *u8, upto: i64, idv: i64) -> i64
271func pi_list_json(q: *u8, n: i64, jp: *u8, truncated: i64, filt: i64, d: *u8) -> i64
364func pi_hesc(d: *u8, o: i64, q: *u8, s: i64, e: i64, maxb: i64) -> i64
called by 1: pi_page_html calls 1: pi_cat
378func pi_page_html(q: *u8, n: i64, jp: *u8, truncated: i64, d: *u8) -> i64
463func pi_find(d: *u8, dn: i64, lit: *u8) -> i64
called by 1: pi_selftest calls 1: pi_vlen
478func pi_selftest(journal: *u8) -> i64
542func main(argc: i64, argv: *i64) -> i64