code wiki / _hdl_build / nx_work_pulse_run.nx

nx_work_pulse_run.nx source

↩ module page · 19 lines · 922 B

1// nx_work_pulse_run.nx -- production driver for the standing work loop: one fork = parse the real 2// backlog -> gap pick -> durable WORKNEXT directive. The Conductor pulse forks this every beat, so 3// the team's next research target is re-derived from the live file continuously. Run from the repo 4// root. license_tier: ORIGINAL 5import "nx_work_pulse.nx" 6 7func main() -> i64 { 8 let out: *i64 = sys_mmap(64) as *i64 9 let ok: i64 = wp_run("knowledge/library/research_backlog.txt" as *u8, 10 "knowledge/status/work_next.log" as *u8, out) 11 wp_w(1, "WORKPULSE rows=" as *u8); wp_wn(1, out[0]) 12 wp_w(1, " pick=" as *u8); wp_wn(1, out[1]) 13 wp_w(1, " gap=" as *u8); wp_wn(1, out[2]) 14 wp_w(1, " coverage_permil=" as *u8); wp_wn(1, out[4]) 15 if ok == 1 { wp_w(1, " verdict=DIRECTIVE-WRITTEN\n" as *u8); sys_exit(0) } 16 wp_w(1, " verdict=FAILED\n" as *u8) 17 sys_exit(1) 18 return 1 19}