Repository navigation
Open
Labels
enhancementNew feature or request
Description
Part of the Coding-agent subagents epic (#378). Item B11, milestone B-M2. Depends on A2's transport seam (#381), plus B2 (#387), B5 (#390) and B6 (#392).
Goal
An MCP server, packaged first as a Claude Code plugin, that gives the coding agent structured tools for MOCA subagents, in place of parsing CLI output, while keeping the agent's context small.
Scope
- An MCP server over Coding-agent subagents A2: mocactl subagent commands (spawn, subagents, get, watch, approve, follow-up) over today's API #381's client library, with tools
spawn,list,get,cancel,approveandfollow_up.- Outputs stay well under MCP output limits (Claude Code warns above about 10k tokens and truncates around 25k by default). Full text, patches and transcripts go to files, and the tool returns paths plus a bounded summary.
- The
spawndescription lists the available bundles with a capability summary (Coding-agent subagents B15: capability manifest per bundle digest #400), so the agent writes prompts that match what the remote agent can do. - Waiting stays out of MCP. The skill uses
mocactl watchunder the Monitor tool, because a blocking MCP call holds up the turn and runs into the tool timeout.
- The skill (Coding-agent subagents A4: demo-grade Claude Code plugin (skill, SessionStart hook, statusline) #383) updated for MCP.
- The SessionStart hook reads Coding-agent subagents B6: owner-scoped event stream of session and turn state #392's event cursor.
- The statusline.
- A bundle drift warning when the local
.claudedigest (computed as/promote --dry-rundoes) differs from the session's bundle. - Packaging as an installable plugin, with scoped permissions.
Acceptance
- The stories spawn, detach, observe, gate, reattach, collect and follow up all pass through the MCP tools, with no Bash output parsing.
- Every tool result stays under 10k tokens, even for a large patch.
- The drift warning fires after a local skill edit.
Out of scope
- Patch application policy (Coding-agent subagents B12: patch safety and remote verification #399).
Working conventions (for a fresh session)
- Workspace:
git fetch, then create a worktree fromrossoctl/main(never localmain), under.worktrees/. Populate and buildpi-fork(git submodule update --init --recursive && cd pi-fork && npm ci && npm run build), thenpnpm install. A worktree without the pi-fork build does not typecheck. - Plans: write the plan with
superpowers:writing-plansintodocs/plans/<date>-<slug>.md. Plans are gitignored and never committed. Write it in chunks, one append per task. - Pre-flight table: list every process entrypoint, systemd unit, env example and shell/Go launcher whose boot contract changes, not only TypeScript call sites.
- Tests: Redis on 6379 must be up. Use each package's own
node_modules/.bin/vitest. vitest can exit non-zero with every test green, so grep the log forErrors. Redirect long output to/tmp/kagenti/....make lintskips untracked files. - Commits:
git commit -swithAssisted-By: Claude (Anthropic AI) <[email protected]>, neverCo-Authored-By. - Shared KVM rig: alert the owner before using it, record a manifest of what you install, and verify cleanup.
- Don't push or open PRs without the owner's go-ahead.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or request
Activity
[-]Claude Code subagents B11: Claude Code plugin v1 (MCP server, hook, statusline, drift warning)[/-][+]Coding-agent subagents B11: coding-agent integration v1 (MCP server; Claude Code plugin first — hook, statusline, drift warning)[/+]