Skip to content

Add design spec: hook-integrated MCP engine - #50

Closed
5uck1ess wants to merge 1 commit into
mainfrom
spec/mcp-engine-design
Closed

Add design spec: hook-integrated MCP engine#50
5uck1ess wants to merge 1 commit into
mainfrom
spec/mcp-engine-design

Conversation

@5uck1ess

Copy link
Copy Markdown
Owner

Summary

Design spec for redesigning the devkit engine from a subprocess-spawning CLI to an MCP server + PreToolUse hook that enforces deterministic workflow execution inside Claude Code.

Based on research from 5 parallel agents covering: plugin architecture, hook mechanics, deterministic enforcement patterns, token efficiency, and LLM orchestration.

Core problem solved

The current engine spawns claude -p as a subprocess — which doesn't work inside Claude Code (OAuth token issue). This spec replaces that with an MCP server that controls what tools Claude can see per workflow step.

Key decisions

  • MCP tool scoping as primary enforcement (Claude can't call tools that don't exist)
  • PreToolUse exit 2 as safety net (hard blocks out-of-step actions)
  • Condensed principles (~120 tokens) injected per step instead of full skill files (~800 tokens)
  • ~65% token reduction (17k vs 50k+ for 8-step workflows)
  • bin/ auto-PATH for binary distribution (no install script needed in Claude Code)
  • $CLAUDE_PLUGIN_DATA for state (survives plugin updates)

Spec: docs/superpowers/specs/2026-04-10-hook-integrated-mcp-engine-design.md

Test plan

  • Review spec for completeness and feasibility
  • Approve before implementation planning begins

@5uck1ess 5uck1ess closed this Apr 10, 2026
@5uck1ess
5uck1ess deleted the spec/mcp-engine-design branch April 10, 2026 01:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant