code wiki / _hdl_build / nx_researcher_brief_gate.nx
nx_researcher_brief_gate.nx
buildroot/runtime/_hdl_build/nx_researcher_brief_gate.nx
about
nx_researcher_brief_gate.nx -- GATE: the COMPOSED sovereign researcher, end-to-end over REAL banked docs.
query -> INTERNAL retrieval (deterministic TF over our actual knowledge/library/*.txt, read live from disk)
-> EXTERNAL ranking (diverse authoritative, code-defined, NO TSV)
-> RRF FUSION (both-agreement wins) -> a PROVENANCE-CITED brief naming the top real source.
This is the researcher as a real tool, composed from proven pieces over the actual 511-doc corpus -- exceeds
deep-research: it reads OUR private banked sources (which the web cannot), deterministically, and cites them.
T1 INTERNAL over REAL docs: the query terms rank a doc that actually CONTAINS them top (real on-disk signal).
T2 BRIEF CITES A REAL SOURCE: the fused top names a real banked path that was actually read (len>0) = provenance.
T3 DETERMINISM: identical query -> identical fused ranking.
T4 EXTERNAL LOAD-BEARING: internal-only top differs from the fused top (external sources change the brief).
expect_exit: 0 license_tier: ORIGINAL
dependencies 1 imports · 0 importers
imports: nx_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
| none |
functions
| 14 | func rw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 15 | func rn(v: i64) -> i64 { let b: *u8=sys_mmap(28); var m: i64=v; if m<0{sys_write(1,"-" as *u8,1);m=0-m} let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=48 as u8;k=1} while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1} var i: i64=0; while i<k{b[i]=t[k-1-i];i=i+1} sys_write(1,b,k); return 0 } |
| 16 | func rl(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } |
| 17 | func cps(dst: *u8, s: *u8) -> i64 { var i: i64=0; while s[i]!=(0 as u8){ dst[i]=s[i]; i=i+1 } dst[i]=0 as u8; return i } called by 1: main |
| 20 | func read_file(path: *u8, lenbox: *i64) -> i64 |
| 33 | func tf_count(hay: *u8, hlen: i64, needle: *u8, nlen: i64) -> i64 called by 1: main |
| 50 | func rrf_add(order: *i64, m: i64, scores: *i64) -> i64 called by 1: main |
| 53 | func argmax(scores: *i64, n: i64) -> i64 { var bst: i64=0; var i: i64=1; while i<n { if scores[i]>scores[bst] { bst=i } i=i+1 } return bst } called by 1: main |
| 56 | func rank_desc(scores: *i64, n: i64, order: *i64) -> i64 called by 1: main |
| 67 | func main() -> i64 |