code wiki / _hdl_build / nx_ws_coach.nx

nx_ws_coach.nx

buildroot/runtime/_hdl_build/nx_ws_coach.nx

9785 B184 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tooltopic ws
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_itoa_lib.nx nx_ws_coach.nx

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

main wc_w sys_write sys_mmap wc_coach sp2_read sys_openat_rd sys_read sys_close wc_w ↻ wc_find wc_surface wc_find ↻ wc_count wc_n nxi_out nxi_fd sys_mmap ↻ ccz_cat_num sys_write ↻ sys_munmap wc_n ↻

structs

none

consts

22const K_MAGIC_4096: i64 = 4096
23const K_MAGIC_1048576: i64 = 1048576

functions

25func 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 }
called by 2: wc_coachmain calls 1: sys_write
30func wc_n(v: i64) -> i64 { nxi_out(v); return 0 }
called by 2: wc_coachmain calls 1: nxi_out
31func wc_find(buf: *u8, n: i64, pat: *u8) -> i64
called by 2: wc_surfacewc_coach
47func wc_count(buf: *u8, n: i64, pat: *u8) -> i64
called by 1: wc_coach
62func wc_surface(buf: *u8, n: i64) -> i64
called by 1: wc_coach calls 1: wc_find
77func sp2_read(path: *u8, buf: *u8) -> i64
85func wc_coach(path: *u8, buf: *u8) -> i64
155func main(argc: i64, argv: *i64) -> i64