Execute implementation specs autonomously. Takes an impl-spec file, creates a topic branch, spawns implementation subagents per phase, runs reviewers at checkpoints. Surfaces to user only when issues can't be auto-resolved.
/plugin marketplace add elertan/planspec/plugin install planspec@planspecThis skill inherits all available tools. When active, it can use any tool Claude has access to.
code-reviewer-prompt.mdimplementer-prompt.mdsecurity-reviewer-prompt.mdExecute validated implementation specs through to completion using subagents.
planspec:impl-spec-executor planspec/implementations/[topic].md
status: readyThis skill runs in main context and spawns subagents for:
Security: line present)impl-spec-executor (SKILL - main context)
│
├─► Phase 1: Task(implementer-prompt.md) → implements all phase 1 tasks
│ └─► checkpoint: spawn reviewers
│ └─► Task(code-reviewer-prompt.md)
│
├─► Phase 2: Task(implementer-prompt.md) → implements all phase 2 tasks
│ └─► checkpoint: spawn reviewers (parallel if both)
│ ├─► Task(code-reviewer-prompt.md)
│ └─► Task(security-reviewer-prompt.md)
...
⚠️ YOU MUST EXECUTE THIS WHEN YOU SEE A CHECKPOINT. SKIPPING IS NOT ALLOWED.
At every checkpoint:
Security: line present in checkpoint)Required checkpoint output format:
═══════════════════════════════════════════════════════════
CHECKPOINT: Phase [N] Complete
═══════════════════════════════════════════════════════════
Code Review: [PASS/FAIL] - [1-line summary]
Security Review: [PASS/FAIL/N/A] - [1-line summary or "not required"]
───────────────────────────────────────────────────────────
Verdict: [PROCEED TO PHASE N+1 / BLOCKED - fixing issues]
═══════════════════════════════════════════════════════════
If you skip this protocol, the implementation is invalid and must be redone.
Validate input:
status: readyCheck git state:
Create topic branch:
user-auth from user-auth.md)git checkout -b feature/[topic]Update impl-spec status:
status: ready → status: in-progresschore([topic]): start implementationFor each phase in order:
Extract phase info:
Security: line if present)Spawn implementation subagent:
Read ./implementer-prompt.md, substitute variables:
{TOPIC} (extracted from impl-spec filename){PHASE_NUMBER}, {PHASE_NAME}{IMPL_SPEC_PATH}, {DESIGN_SPEC_PATH}{PHASE_TASKS} (full text of all tasks in phase)Task(
description: "Implement Phase [N]: [phase name]",
prompt: [constructed from template]
)
Handle subagent response:
CHECKPOINT GATE (MANDATORY - DO NOT SKIP)
⚠️ You MUST execute the checkpoint protocol defined above.
See "Review Checkpoint" section below for full details.
Proceed to next phase ONLY after checkpoint passes with all PASS verdicts
⚠️ This section is NOT optional. Execute it after EVERY phase.
At each ### CHECKPOINT in the impl-spec:
Parse checkpoint:
Security: lineGather context for reviewers:
Spawn code reviewer (always):
Read ./code-reviewer-prompt.md, substitute variables:
{PHASE_NUMBER}, {PHASE_NAME}{IMPL_SPEC_PATH}, {DESIGN_SPEC_PATH}{PHASE_TASKS}{BASE_SHA}, {HEAD_SHA}Task(
description: "Code review Phase [N]",
prompt: [constructed from template]
)
Spawn security reviewer (if Security: line present):
Read ./security-reviewer-prompt.md, substitute variables:
{PHASE_NUMBER}, {PHASE_NAME}{IMPL_SPEC_PATH}, {DESIGN_SPEC_PATH}{SECURITY_CONCERNS}{BASE_SHA}, {HEAD_SHA}Task(
description: "Security review Phase [N]",
prompt: [constructed from template]
)
Run both reviewers in parallel if security review needed.
Evaluate results:
All pass → proceed to next phase
Issues found → resolution loop:
WHILE blocking issues exist:
1. Read all issues from reviewers
2. Fix each issue (in main context, not subagent)
3. Commit fixes: "fix([topic]): address review feedback"
4. Re-run same reviewers that found issues
5. IF same issues persist after 3 attempts:
Surface to user with:
- What was tried
- What's still failing
- Request guidance
WAIT for user response
Apply user guidance
Continue loop
Output checkpoint summary (REQUIRED)
You MUST output the checkpoint summary before proceeding:
═══════════════════════════════════════════════════════════
CHECKPOINT: Phase [N] Complete
═══════════════════════════════════════════════════════════
Code Review: [PASS/FAIL] - [1-line summary from reviewer]
Security Review: [PASS/FAIL/N/A] - [1-line summary or "not required"]
───────────────────────────────────────────────────────────
Verdict: [PROCEED TO PHASE N+1 / BLOCKED - fixing issues]
═══════════════════════════════════════════════════════════
Only proceed when all reviewers pass
After all phases complete:
Final verification:
Update impl-spec:
status: in-progress → status: completeddocs([topic]): mark implementation completeReport summary:
✅ Implementation Complete: [topic]
Branch: feature/[topic]
Commits: [N]
Phases completed: [X]
Review cycles: [Y]
Design spec criteria met:
- [criterion 1]: ✓
- [criterion 2]: ✓
Ready for: merge to main / PR creation
When issues can't be auto-resolved after 3 attempts:
⚠️ Review Issues Need Guidance
Phase: [N]
Attempts: 3
Unresolved issues:
- [Issue 1]: [what was tried, why it didn't work]
- [Issue 2]: [what was tried, why it didn't work]
Options:
1. Provide guidance on how to resolve
2. Mark as acceptable (with justification)
3. Abort implementation
Waiting for input...
When subagent reports blocker:
⚠️ Implementation Blocked
Phase: [N]
Task: [X.Y] - [title]
Blocker: [from subagent report]
Options:
1. Provide additional context
2. Modify approach (will note deviation from spec)
3. Skip task (will note incomplete)
4. Abort implementation
Test failures, build errors, etc.:
⚠️ External Failure
Type: [test failure / build error / etc.]
Details: [error output]
Attempting auto-fix...
[If fix fails, surface to user]
Checkpoint with code review only (default):
### CHECKPOINT
Gate: Tests pass, issues resolved before Phase 2.
Checkpoint with security review:
### CHECKPOINT
Security: Auth flow, user input handling, database queries
Gate: Tests pass, issues resolved before Phase 3.
All subagent prompts are in this directory:
./implementer-prompt.md - Phase implementation./code-reviewer-prompt.md - Code quality and correctness review./security-reviewer-prompt.md - Security-focused reviewThese templates have variables that get substituted with actual values:
| Variable | Used by | Description |
|---|---|---|
{TOPIC} | implementer | Feature name from impl-spec filename |
{PHASE_NUMBER} | all | Current phase number |
{PHASE_NAME} | all | Current phase name |
{IMPL_SPEC_PATH} | all | Path to implementation spec |
{DESIGN_SPEC_PATH} | all | Path to design spec |
{PHASE_TASKS} | implementer, code-reviewer | Full text of phase tasks |
{BASE_SHA} | reviewers | Git commit before phase |
{HEAD_SHA} | reviewers | Git commit after phase |
{SECURITY_CONCERNS} | security-reviewer | Why security review triggered |
| Input | Impl-spec file path |
|---|---|
| Output | Completed implementation on topic branch |
| Branch | feature/[topic] |
| Implementation | One subagent per phase |
| Code review | At every checkpoint |
| Security review | Only when Security: line present |
| Escalation | After 3 failed resolution attempts |
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.