code wiki / (root) / nx_research_autodrive.nx

nx_research_autodrive.nx

buildroot/runtime/nx_research_autodrive.nx

6463 B87 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind tooltopic research
docsdependenciesstructsconstsfunctions

about

nx_research_autodrive.nx -- the autonomous research loop WIRED TO REAL DATA: the system's own genealogy. Instead of seeded sensors, the loop reads the LIVE genesis_lineage.tsv (the system's measured self- knowledge) and derives the research queue from the ACTUAL node states: the sovereignty column is the worklist -- 'sovereign'/'sovereign-emu' = done; 'third-party' = a LOCKED axis (top research priority: replace with sovereign); 'building' = in progress; 'future' = planned; 'GOAL-not-built' = a north star. It computes the ecosystem's real sovereignty % (progress toward 100% = a core telos metric) and emits the prioritized autonomous research program from the real lineage -- no network, no hardcoded sensors, self-knowledge driving self-improvement. (Live external multilingual fetch is still the delegated leg; this is the SOVEREIGN, owned-data half of the loop, fully wired.) KAT: reads the real lineage; classifies every node; computes sovereignty %; emits the worklist (LOCKED third-party = top); honest (not 100% sovereign yet). No hw writes (Rule 26). expect_exit: 0 tier: ORIGINAL

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_research_autodrive.nx

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

main ad_puts sys_write sys_mmap sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close sys_exit ad_field ad_eq ad_num sys_mmap ↻ sys_write ↻

structs

none

consts

none

functions

14func ad_puts(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 1: main calls 1: sys_write
15func ad_num(v: i64) -> i64 { let b: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m;sys_write(1,"-" as *u8,1)} 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 }
called by 1: main calls 2: sys_mmapsys_write
17func ad_field(buf: *u8, ls: i64, le: i64, n: i64, se: *i64) -> i64
called by 1: main
23func ad_eq(buf: *u8, s: i64, e: i64, m: *u8) -> i64 { var i: i64=0; var j: i64=s; while j<e { if m[i]==(0 as u8) { return 0 } if buf[j]!=m[i] { return 0 } i=i+1; j=j+1 } if m[i]==(0 as u8) { return 1 } return 0 }
called by 1: main
25func main() -> i64