code wiki / _hdl_build / nx_work_pulse.nx

nx_work_pulse.nx

buildroot/runtime/_hdl_build/nx_work_pulse.nx

6582 B150 linesdepth 3pulls 4 transitivereach 2 importersview sourcekind librarytopic work
docsdependenciesstructsconstsfunctions

about

nx_work_pulse.nx -- the team's STANDING WORK LOOP unit: parse the REAL research backlog file (knowledge/library/research_backlog.txt -- until now a seed doc parsed by NOBODY), compute the coverage-gap pick (the Researcher's own rb_next math over the live rows), and emit the next marching order as a durable WORKNEXT line in knowledge/status/work_next.log. This turns "the Researcher works the queue" from prose into a MECHANICAL, pulse-able decision: every beat, the team re-derives what to research next from the file's current priorities/hits -- no human pick, no Claude pick. RACI: RESEARCHER owns the pick (rb_next composed, not reimplemented); this organ only parses the durable form and reports (Conductor's sequencing verb). Row grammar: `topic | priority(1-9) | hits | PENDING/DONE`; '#' comments and prose lines (fewer than 3 pipes) are skipped. LAWS: struct-free, integer-only, flat ifs, <=6 args. license_tier: ORIGINAL

dependencies 3 imports · 2 importers

nx_research_backlog.nx nx_itoa_lib.nx nx_syscalls.nx nx_work_pulse.nx nx_work_pulse_run.nx nx_work_pulse_test.nx

imports: nx_research_backlog.nxnx_itoa_lib.nxnx_syscalls.nx

imported by: nx_work_pulse_run.nxnx_work_pulse_test.nx

structs

none

consts

14const WP_MAGIC_2048: i64 = 2048
16const WP_TARGET_HITS: i64 = 10 // the backlog's stated depth bar (10 corroborated docs per topic)
17const WP_MAX_ROWS: i64 = 256

functions

19func wp_w(fd: i64, s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(fd,s,n); return 0 }
called by 3: wp_runmainmain calls 1: sys_write
24func wp_wn(fd: i64, v: i64) -> i64 { nxi_fd(fd, v); return 0 }
called by 3: wp_runmainmain calls 1: nxi_fd
27func wp_int_at(b: *u8, j0: i64, e: i64) -> i64
called by 1: wp_row
42func wp_pipe(b: *u8, i: i64, e: i64) -> i64
called by 1: wp_row
47func wp_line_end(b: *u8, i: i64, n: i64) -> i64
called by 1: wp_parse
55func wp_row(b: *u8, i: i64, e: i64, r: i64, st: *i64) -> i64
called by 1: wp_parse calls 3: wp_pipewp_int_atwp_skip
90func wp_skip(b: *u8, i0: i64, e: i64) -> i64
called by 1: wp_row
97func wp_parse(b: *u8, n: i64, st: *i64) -> i64
called by 1: wp_run calls 2: wp_line_endwp_row
110func wp_run(backlogpath: *u8, logpath: *u8, out: *i64) -> i64