code wiki / (root) / nx_research_investigate.nx

nx_research_investigate.nx

buildroot/runtime/nx_research_investigate.nx

2581 B55 linesdepth 2pulls 2 transitivereach 5 importersview sourcekind librarytopic research
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_research_investigate.nx nx_research_investigate_gate.nx nx_research_unified.nx

imports: nx_syscalls.nx

imported by: nx_research_investigate_gate.nxnx_research_unified.nx

structs

none

consts

9const RIV_MAGIC_1000000: i64 = 1000000
11const RIV_GROUNDED: i64 = 0
12const RIV_BUDGET: i64 = 1
13const RIV_STALLED: i64 = 2
14const RIV_CONTINUE: i64 = 3

functions

17func riv_gaps(uncited: i64, unverified: i64, unanswered: i64) -> i64 { return uncited + unverified + unanswered }
called by 1: main
20func riv_next(gaps: i64, iter: i64, max_iter: i64, prev: i64) -> i64
31func riv_run(gaps_seq: *i64, nseq: i64, max_iter: i64, trace: *i64, out: *i64) -> i64
called by 1: main calls 1: riv_next