code wiki / (root) / nx_mcp_coverage.nx

nx_mcp_coverage.nx

buildroot/runtime/nx_mcp_coverage.nx

8083 B200 linesdepth 4pulls 6 transitivereach 1 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_mcp_coverage.nx -- THE STANDING MCP/API EXPOSURE COVERAGE ORGAN (operator 2026-07-16: make MCP+API+workstream+agent exposure a standing SOTA discipline; "small sharp tools" compose INTO curated exposed capabilities; full coverage of the logical areas, NOT blind wrapping; what we SHOULD expose vs not). Reads knowledge/mcp/coverage_map.txt (logical areas x should-tier x live state), grades coverage, EMITS the WIRE queue (built-not-exposed, ready) + the BUILD queue (true gaps) for the forge/workstreams to consume, and ENFORCES the exposure policy: a PRIMITIVE (std_/fc_/sys_) or a GATE/TEST (_gate/_test/_smoke) marked as an exposed capability is a POLICY-VIOLATION (the anti-blind-wrapping tooth) -- returns the violation count (0 = clean). usage: nx_mcp_coverage [mapfile] exit 0 (measurement; count is the deliverable) DATA SUBSTRATE (no-TSV law, 2026-07-16): the map lives in the SOVEREIGN store knowledge/store/mcp_coverage key "map" (write/refresh via `nx_sov put-file`); the default (no argv) reads THE STORE. An explicit mapfile arg still reads a file (gate negctl fixtures + the transitional flat co-edit surface -- which is now a DERIVED view, store = SSOT). license_tier: ORIGINAL expect_exit: 0

dependencies 2 imports · 1 importers

nx_forge_ctx.nx nx_sov_ledger.nx nx_mcp_coverage.nx nx_mcp_coverage_gate.nx

imports: nx_forge_ctx.nxnx_sov_ledger.nx

imported by: nx_mcp_coverage_gate.nx

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

main mc_run fc_read sys_openat_rd sys_read sys_close std_putln std_puts std_slen sys_write mc_run_buf std_putln ↻ mc_field mc_is_internal_kind std_slen ↻ fc_contains std_streq std_puts ↻ std_pdec sys_mmap std_itoa sys_mmap ↻ sys_write ↻ mc_run_store sov_get_copy sys_mmap ↻ ss_get sys_mmap ↻ ss_scan sys_mmap ↻ ss_manifest_dyn ss_manifest_file_dyn ss_scan_seglist ss_len sys_mmap ↻ ss_cat ss_readall ss_r32 std_putln ↻ mc_run_buf ↻

structs

none

consts

17const K_MAGIC_262144: i64 = 262144
18const K_MAGIC_262143: i64 = 262143

functions

21func mc_field(buf: *u8, ls: i64, le: i64, k: i64, out: *u8) -> i64
called by 1: mc_run_buf
41func mc_is_internal_kind(name: *u8) -> i64
called by 2: mc_run_bufmain calls 2: std_slenfc_contains
60func mc_run_buf(buf: *u8, n: i64) -> i64
171func mc_run(mapf: *u8) -> i64
called by 2: mainmain calls 3: fc_readstd_putlnmc_run_buf
179func mc_run_store() -> i64
187func main(argc: i64, argv: *i64) -> i64