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 orphan librarytopic 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)

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