Repository navigation
Open
Labels
enhancementNew feature or request
Description
Part of the Coding-agent subagents epic (#378). Item B12, milestone B-M3. Depends on B9 (#397) and B10 (#398).
Goal
Nothing a subagent returns runs on the user's laptop without review. Subagent results flow into the most privileged process there is: the user's local coding agent (Claude Code, say), often in bypass-permissions mode or its equivalent.
- Returned text can carry prompt injection from whatever the subagent read.
- A patch that touches
.claude/settings.json, hooks,Makefile,package.jsonscripts or.pre-commit-config.yamlruns locally at the nextmake testorpnpm install. That undoes the sandbox.
Scope
- Client (the plugin, Coding-agent subagents B11: coding-agent integration v1 (MCP server; Claude Code plugin first — hook, statusline, drift warning) #396):
- a path policy that flags or refuses changes under
.claude/,.github/,.pre-commit-config.yaml,Makefile, package scripts and git hooks; - apply only into a git worktree;
- never auto-apply;
- returned text marked as data.
- a path policy that flags or refuses changes under
- MOCA: a "verify" leaf (converge) that runs the project's tests on the patched ref inside a sandbox and returns a verdict. It runs next to the patch, not on the laptop.
Acceptance
- A patch that touches
.claude/settings.jsonis stopped for explicit approval. - Verification runs remotely, and its verdict is shown next to the patch.
- No local command runs on patched code before review.
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 B12: patch safety and remote verification[/-][+]Coding-agent subagents B12: patch safety and remote verification[/+]