code wiki / _hdl_build / nx_work_pulse.nx
nx_work_pulse.nx
buildroot/runtime/_hdl_build/nx_work_pulse.nx
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
imports: nx_research_backlog.nxnx_itoa_lib.nxnx_syscalls.nx
imported by: nx_work_pulse_run.nxnx_work_pulse_test.nx
structs
| none |
consts
| 14 | const WP_MAGIC_2048: i64 = 2048 |
| 16 | const WP_TARGET_HITS: i64 = 10 // the backlog's stated depth bar (10 corroborated docs per topic) |
| 17 | const WP_MAX_ROWS: i64 = 256 |
functions
| 19 | func 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 } |
| 24 | func wp_wn(fd: i64, v: i64) -> i64 { nxi_fd(fd, v); return 0 } |
| 27 | func wp_int_at(b: *u8, j0: i64, e: i64) -> i64 called by 1: wp_row |
| 42 | func wp_pipe(b: *u8, i: i64, e: i64) -> i64 called by 1: wp_row |
| 47 | func wp_line_end(b: *u8, i: i64, n: i64) -> i64 called by 1: wp_parse |
| 55 | func wp_row(b: *u8, i: i64, e: i64, r: i64, st: *i64) -> i64 |
| 90 | func wp_skip(b: *u8, i0: i64, e: i64) -> i64 called by 1: wp_row |
| 97 | func wp_parse(b: *u8, n: i64, st: *i64) -> i64 |
| 110 | func wp_run(backlogpath: *u8, logpath: *u8, out: *i64) -> i64 called by 2: mainmain calls 13: sys_mmapsys_read_filewp_parserb_nextrb_progress_permilrb_library_coverage_permil+7 |