Context
GET /v1/repos/:owner/:repo/selftune/overrides/audit (src/api/routes.ts:3084) returns the self-tune override audit trail (listOverrideAudit) so an operator can inspect why the LOOPOVER_REVIEW_SELFTUNE loop promoted a live override, without direct D1 access. It's gated by requireRepoMaintainer — the exact same gate loopover_get_gate_precision uses, and the route's own comment says it "mirror[s] the gate-precision route above." Despite that, it has no remote MCP tool and no local stdio MCP tool — loopover_get_gate_precision has both plus a dedicated CLI verb (maintain precision, packages/loopover-mcp/bin/loopover-mcp.ts maintainCli subcommand), but the override-audit sibling has none of the three.
Requirements
⚠️ Required pattern — mirror loopover_get_gate_precision's surfaces exactly: remote tool registration (src/mcp/server.ts:2017), stdio-tool registration (packages/loopover-mcp/bin/loopover-mcp.ts:2587-2594), and the maintain precision CLI verb (maintainCli's subcommand === "precision" branch). Read all three before starting — do not invent a different shape.
- Register
loopover_get_selftune_override_audit as a remote MCP tool in src/mcp/server.ts, input schema scoped to owner/repo (+ optional limit, matching the REST route's ?limit query param), calling the existing GET .../selftune/overrides/audit route's underlying listOverrideAudit.
- Add
loopover_get_selftune_override_audit to MCP_TOOL_CATEGORIES as "maintainer".
- Register
loopover_get_selftune_override_audit as a local stdio MCP tool in packages/loopover-mcp/bin/loopover-mcp.ts, calling GET ${repoBase}/selftune/overrides/audit via apiGet.
- Add a
maintain selftune-audit --repo owner/repo [--limit N] CLI verb to maintainCli, following the exact structure of the existing precision subcommand (same emit/--json handling).
- Do not change
listOverrideAudit, the REST route, or its requireRepoMaintainer gate — this issue only adds the three missing mirror surfaces.
Deliverables
Test Coverage Requirements
Codecov patch gate is 99%+ on src/**; add a regression test for the new remote-tool registration mirroring loopover_get_gate_precision's own test. For packages/loopover-mcp, add tests for both the new stdio tool and the new maintain selftune-audit verb following the existing precision subcommand's test coverage shape — confirm this package's own coverage.include scoping first.
Expected Outcome
The self-tune override audit trail has the same three-surface reach as gate-precision: remote MCP, local stdio MCP, and a maintain selftune-audit CLI verb, not just raw REST.
Links & Resources
src/api/routes.ts:3084 (existing REST route)
src/mcp/server.ts:2017, packages/loopover-mcp/bin/loopover-mcp.ts:2587-2594 (the loopover_get_gate_precision two-surface pattern), and maintainCli's precision subcommand (the CLI-verb pattern)
src/mcp/server.ts:1798-1890 (MCP_TOOL_CATEGORIES map)
Context
GET /v1/repos/:owner/:repo/selftune/overrides/audit(src/api/routes.ts:3084) returns the self-tune override audit trail (listOverrideAudit) so an operator can inspect why theLOOPOVER_REVIEW_SELFTUNEloop promoted a live override, without direct D1 access. It's gated byrequireRepoMaintainer— the exact same gateloopover_get_gate_precisionuses, and the route's own comment says it "mirror[s] the gate-precision route above." Despite that, it has no remote MCP tool and no local stdio MCP tool —loopover_get_gate_precisionhas both plus a dedicated CLI verb (maintain precision,packages/loopover-mcp/bin/loopover-mcp.tsmaintainCli subcommand), but the override-audit sibling has none of the three.Requirements
loopover_get_selftune_override_auditas a remote MCP tool insrc/mcp/server.ts, input schema scoped to owner/repo (+ optionallimit, matching the REST route's?limitquery param), calling the existingGET .../selftune/overrides/auditroute's underlyinglistOverrideAudit.loopover_get_selftune_override_audittoMCP_TOOL_CATEGORIESas"maintainer".loopover_get_selftune_override_auditas a local stdio MCP tool inpackages/loopover-mcp/bin/loopover-mcp.ts, callingGET ${repoBase}/selftune/overrides/auditviaapiGet.maintain selftune-audit --repo owner/repo [--limit N]CLI verb tomaintainCli, following the exact structure of the existingprecisionsubcommand (sameemit/--jsonhandling).listOverrideAudit, the REST route, or itsrequireRepoMaintainergate — this issue only adds the three missing mirror surfaces.Deliverables
loopover_get_selftune_override_auditregistered as a remote MCP tool insrc/mcp/server.ts, category"maintainer".loopover_get_selftune_override_auditregistered as a local stdio MCP tool inpackages/loopover-mcp/bin/loopover-mcp.ts.maintain selftune-auditCLI verb added tomaintainCli, mirroring theprecisionsubcommand's structure.Test Coverage Requirements
Codecov patch gate is 99%+ on
src/**; add a regression test for the new remote-tool registration mirroringloopover_get_gate_precision's own test. Forpackages/loopover-mcp, add tests for both the new stdio tool and the newmaintain selftune-auditverb following the existingprecisionsubcommand's test coverage shape — confirm this package's owncoverage.includescoping first.Expected Outcome
The self-tune override audit trail has the same three-surface reach as gate-precision: remote MCP, local stdio MCP, and a
maintain selftune-auditCLI verb, not just raw REST.Links & Resources
src/api/routes.ts:3084(existing REST route)src/mcp/server.ts:2017,packages/loopover-mcp/bin/loopover-mcp.ts:2587-2594(theloopover_get_gate_precisiontwo-surface pattern), andmaintainCli'sprecisionsubcommand (the CLI-verb pattern)src/mcp/server.ts:1798-1890(MCP_TOOL_CATEGORIESmap)