code wiki / (root) / nx_codereview_tool_register.nx

nx_codereview_tool_register.nx

buildroot/runtime/nx_codereview_tool_register.nx

10240 B93 linesdepth 7pulls 9 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_codereview_tool_register.nx -- register the AUTOMATED CODE REVIEW capabilities into the sovereign tool registry (operator 2026-07-06: "get this all integrated with our apis and mcp ... so when we use llms they dont write garbage and also so we can audit whats already written to see if we can get it to SOTA"). The registry IS what /api/tools + /mcp tools/list serve, so registration = discoverability for ANY engaging model (Claude, the Nishi team agents, or an external orchestrator): they SEE that a review coordinator, a pre-commit gate, an ecosystem audit, and the standards contract exist, and how to call them. DISCOVERY only (mirrors nx_genui_tool_register): making a tool RUNNABLE over /mcp stays a SEPARATE fail-closed step (tool_allowlist.conf + cap token, operator-gated) -- so no LLM can be tricked into executing arbitrary tools. This writes the LOCAL SSOT registry (knowledge/toolreg-); flipping the LIVE NAS registry behind nishifamily.com/api/tools is a deploy step (operator-gated). Idempotent (reg_put additive, history kept). Verifies by READBACK, not by claim (prove-not-assert). expect_exit: 0 license_tier: ORIGINAL

dependencies 1 imports · 0 importers

nx_tool_registry.nx nx_codereview_tool_register.nx

imports: nx_tool_registry.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main cr_puts cr_reg1 tool_register tool_register_pfx tr_cat tr_tab reg_put reg_put_x sts_lock reg_key ss_get reg_strlen reg_id_present sts_unlock ss_next_segid ss_begin_cap ss_add ss_commit ss_commit_deferred tool_get tool_get_pfx reg_get reg_key ↻ ss_get ↻ cr_puts ↻ cr_putn cr_putn ↻

structs

none

consts

none

functions

15func cr_puts(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: cr_reg1main
16func cr_putn(v: i64) -> i64
called by 2: cr_reg1main
31func cr_reg1(name: *u8, desc: *u8, invoke: *u8, status: *u8) -> i64
42func main() -> i64