Context
The MCP tool loopover_explain_gate_disposition (src/mcp/server.ts:2034, via explainGateDisposition at src/mcp/server.ts:3774) computes the same PredictedGateVerdict the CLI's already-mirrored loopover_predict_gate tool gets from POST /v1/local/branch-analysis's predictedGate field (loopover-mcp.js:1451-1468), then runs it through buildGateDispositions(verdict) (defined at src/mcp/server.ts:1244, not exported from @loopover/engine) to itemize per-rule block/advise dispositions. No CLI mirror exists despite the sibling tool already fetching the exact input this needs.
Requirements
- Export
buildGateDispositions (and its GateDisposition type) from @loopover/engine alongside buildFeasibilityVerdict/buildPrTextLint.
- Add
registerStdioTool("loopover_explain_gate_disposition", ...) in loopover-mcp.js that calls the same /v1/local/branch-analysis route loopover_predict_gate already calls, then runs the shared buildGateDispositions locally on the returned predictedGate.
Deliverables
Test Coverage Requirements
99%+ Codecov patch coverage on every changed line and branch in the new route/tool/CLI code, plus a test asserting output parity between the mirrored surfaces for identical input.
Expected Outcome
A contributor can get a per-rule gate-disposition explanation locally via the CLI before pushing.
Links & Resources
Precedent: registerStdioTool("loopover_predict_gate", ...) at loopover-mcp.js:1451-1468, and the existing engine re-export pattern in src/mcp/local-write-tools.ts.
Context
The MCP tool
loopover_explain_gate_disposition(src/mcp/server.ts:2034, viaexplainGateDispositionatsrc/mcp/server.ts:3774) computes the samePredictedGateVerdictthe CLI's already-mirroredloopover_predict_gatetool gets fromPOST /v1/local/branch-analysis'spredictedGatefield (loopover-mcp.js:1451-1468), then runs it throughbuildGateDispositions(verdict)(defined atsrc/mcp/server.ts:1244, not exported from@loopover/engine) to itemize per-rule block/advise dispositions. No CLI mirror exists despite the sibling tool already fetching the exact input this needs.Requirements
buildGateDispositions(and itsGateDispositiontype) from@loopover/enginealongsidebuildFeasibilityVerdict/buildPrTextLint.registerStdioTool("loopover_explain_gate_disposition", ...)inloopover-mcp.jsthat calls the same/v1/local/branch-analysisrouteloopover_predict_gatealready calls, then runs the sharedbuildGateDispositionslocally on the returnedpredictedGate.Deliverables
buildGateDispositionsexported from@loopover/engineregisterStdioTool("loopover_explain_gate_disposition", ...)Test Coverage Requirements
99%+ Codecov patch coverage on every changed line and branch in the new route/tool/CLI code, plus a test asserting output parity between the mirrored surfaces for identical input.
Expected Outcome
A contributor can get a per-rule gate-disposition explanation locally via the CLI before pushing.
Links & Resources
Precedent:
registerStdioTool("loopover_predict_gate", ...)atloopover-mcp.js:1451-1468, and the existing engine re-export pattern insrc/mcp/local-write-tools.ts.