code wiki / _hdl_build / nx_ws_coach.nx
nx_ws_coach.nx
buildroot/runtime/_hdl_build/nx_ws_coach.nx
about
nx_ws_coach.nx -- THE WORKSTREAM COACH (operator 2026-07-09: "assists the workstreams so they dont drift and
claim state of the art when they are still toy level -- a liar killer AND a coach actively checking with
searchers and censuses as it climbs, with our sovereign tooling so we dont have massive token eating from
your deep researcher").
PROTOCOL (every workstream rung): build gate GREEN -> census re-run -> `nx_ws_coach <census.nx>` -> only a
COACH-OK rung may be CLAIMED. Research questions go to SOVEREIGN organs FIRST (nx_swcompare_research product
mode / nx_fetch / nx_qabench research -- ledger: deep-research cost 0 vs 107 LLM agents/query); Claude-token
deep research only when the sovereign tools return empty.
v1 CHECKS (source-level, per census):
C1 U-AXES : product-surface census must carry the U1-U4 block (visual/interaction/info-design/polish)
C2 NAMED BARS : evidence must cite named competitor bars/dates (dateless claims = drift)
C3 CLAIM/PROOF: AHEAD/EXCEED/parity claims need gate-citations (gate/GREEN/n-of-m) nearby in the source --
claims without proof = the liar-kill
C4 STALENESS : most recent evidence date must be current-quarter (2026-07/06) else STALE
VERDICT: COACH-OK / DRIFT (with the exact fixes + the sovereign research command to run next).
usage: nx_ws_coach [census-file.nx] (no arg = self-test teeth on known healthy + known drifted)
expect_exit: 0 license_tier: ORIGINAL
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_itoa_lib.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
| 22 | const K_MAGIC_4096: i64 = 4096 |
| 23 | const K_MAGIC_1048576: i64 = 1048576 |
functions
| 25 | func wc_w(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 30 | func wc_n(v: i64) -> i64 { nxi_out(v); return 0 } |
| 31 | func wc_find(buf: *u8, n: i64, pat: *u8) -> i64 |
| 47 | func wc_count(buf: *u8, n: i64, pat: *u8) -> i64 called by 1: wc_coach |
| 62 | func wc_surface(buf: *u8, n: i64) -> i64 |
| 77 | func sp2_read(path: *u8, buf: *u8) -> i64 |
| 85 | func wc_coach(path: *u8, buf: *u8) -> i64 |
| 155 | func main(argc: i64, argv: *i64) -> i64 |