nx_research_investigate.nx
buildroot/runtime/nx_research_investigate.nx
about
nx_research_investigate.nx -- S4: the INVESTIGATION LOOP over the S1-S3 research cycle (recursive self-growth,
$0). DISTINCT from nx_research_loop.nx (the 2026-06-17 physics/energy/frontier autonomous driver). This one
drives the grounding cycle: synthesize (S1) -> verify (S2) -> ground-check (S3) -> if grounding GAPS remain,
investigate again -- and decides HONESTLY when to stop: GROUNDED (0 gaps) / BUDGET (iteration cap) / STALLED
(gaps stopped decreasing, so it never loops forever). gaps = uncited + unverified + unanswered sub-questions.
The control is deterministic/$0; the per-iteration synthesis composes S1-S3 (model-gated). This is the
"propose -> gate -> measure -> bank -> next" loop we run by hand every session, made an organ. license_tier: ORIGINAL
dependencies 1 imports · 2 importers
imports: nx_syscalls.nx
imported by: nx_research_investigate_gate.nxnx_research_unified.nx
structs
| none |
consts
| 9 | const RIV_MAGIC_1000000: i64 = 1000000 |
| 11 | const RIV_GROUNDED: i64 = 0 |
| 12 | const RIV_BUDGET: i64 = 1 |
| 13 | const RIV_STALLED: i64 = 2 |
| 14 | const RIV_CONTINUE: i64 = 3 |
functions
| 17 | func riv_gaps(uncited: i64, unverified: i64, unanswered: i64) -> i64 { return uncited + unverified + unanswered } called by 1: main |
| 20 | func riv_next(gaps: i64, iter: i64, max_iter: i64, prev: i64) -> i64 |
| 31 | func riv_run(gaps_seq: *i64, nseq: i64, max_iter: i64, trace: *i64, out: *i64) -> i64 |