[AI-1914] Register kcap-workitems on every harness - #547
Conversation
kcap-workitems was registered only for Claude Code; every other harness (Codex, Cursor, Copilot, Gemini, Kiro, OpenCode, Antigravity, Pi) got a 5-server subset that stripped it, so those agents could not declare or register work items or the declared breakdown/dependency topology. The "Claude-only" rationale is stale: the workitems MCP server resolves its session id from an explicit arg / KCAP_SESSION_ID / CODEX_THREAD_ID, and its breakdown/relation tools need no session id at all. - KcapMcpServers.ForCodex/ForCursor now return the full All set (kept as named per-harness seams for future divergence). - Add kcap-workitems to the bundled kcap/.codex-mcp.json. - Add "workitems" to the Pi MCP-bridge extension's server list. - Refresh the stale "Claude-only" comments in HarnessMcpProjections and SetupCommand. Invariants preserved and tested: kcap-workitems is not ReadOnly, so it is never auto-trusted (asserted for Gemini's per-server trust); and it stays out of ReviewFlowAutoApprovableServers, so an unattended reviewer can never auto-approve it (asserted in KcapMcpRegistryReviewFlowTests). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
PR Summary by QodoRegister kcap-workitems MCP server across all harnesses
AI Description
Diagram
High-Level Assessment
Files changed (11)
|
Code Review by Qodo
1.
|
Point at KcapMcpServers.ForCursor for the session-id-resolution rationale instead of repeating the env-var precedence inline. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
What
kcap-workitemswas registered only for Claude Code. Every other harness (Codex, Cursor, Copilot, Gemini, Kiro, OpenCode, Antigravity, Pi) received a 5-server subset that stripped it — so those agents could notdeclare_work_item, nor declare the breakdown /blocks/blocked_bydependency topology (AI-1683/AI-1718).The "Claude-only" rationale was stale:
McpWorkItemsServer.ResolveSessionIdresolves an explicitsession_idarg (wins), elseKCAP_SESSION_ID, elseCODEX_THREAD_ID, else throws a clear error; the breakdown/relation tools need no session id at all.Changes
KcapMcpServers.ForCodex/ForCursornow return the fullAllset (kept as named per-harness seams for future divergence).kcap-workitemsto the bundledkcap/.codex-mcp.json."workitems"to the Pi MCP-bridge extension'sKCAP_MCP_SERVERS(Pi'sanalyticsgap was already closed on main;workitemswas the only remaining one).HarnessMcpProjectionsandSetupCommand.Invariants preserved (and tested)
kcap-workitemsis notReadOnly, so it keeps prompting everywhere. Asserted against Gemini's per-server trust (kcap-workitemstrust is null).KcapMcpRegistry.ReviewFlowAutoApprovableServers({review, sessions}); a reviewer allowlist namingkcap-workitemsfails the launch. New test inKcapMcpRegistryReviewFlowTests.Tests
Inverted the subset-exclusion assertions in
KcapMcpServersTestsandMcpCanonicalContractTests; addedkcap-workitemsto the Cursor/Gemini/Pi expectations; added the trust + unattended-reviewer-rejection assertions above. Touched test classes pass locally (52 green); the only local reds are the pre-existing macOS-only Codex-config-temp-symlink baseline, which passes on Linux CI.Spec + codex spec-review (clean, 5 rounds) recorded on the Linear issue.
Ships in the same release as AI-1915 (the SessionStart work-items nudge).
Fixes AI-1914