Enhance an existing plan with parallel research agents for depth, best practices, and implementation details.
Takes an existing plan and enhances each section with parallel research. Each major element gets dedicated research to find best practices, performance optimizations, quality enhancements, and real-world examples.
The user should provide a path to the plan file. If not provided:
ls -lt ~/.claude/plans/*.md 2>/dev/null | head -5
ls -la plans/ 2>/dev/null || ls -la *.md
Do not proceed until you have a valid plan file path.
Read the plan file and extract:
Create a section manifest:
Section 1: [Title] - [Brief description of what to research]
Section 2: [Title] - [Brief description of what to research]
...
Check all skill sources and match to plan content:
# Project-local skills
ls .claude/skills/ 2>/dev/null
# User's global skills
ls ~/.claude/skills/ 2>/dev/null
# Plugin skills
find ~/.claude/plugins -type d -name "skills" 2>/dev/null
For each discovered skill:
Check for previously solved problems:
# Project learnings
find docs/solutions -name "*.md" -type f 2>/dev/null
# Alternative locations
find .claude/docs -name "*.md" -type f 2>/dev/null
For each learning file:
Launch all independent research agents in parallel using Task (subagent_type: Explore).
Based on the plan's technologies and sections, spawn these agents IN PARALLEL:
Task (subagent_type: Explore): "Research best practices for: [technology 1]
Find: industry standards, performance tips, common pitfalls, documentation.
Return concrete, actionable recommendations."
Task (subagent_type: Explore): "Research best practices for: [technology 2]
..."
Task (subagent_type: Explore): "Research implementation patterns for: [section topic]
..."
Spawn one agent per:
Also use WebSearch for recent documentation on each technology.
Discover available review agents:
# Find all agent definitions
find ~/.claude -path "*/agents/*.md" 2>/dev/null
find .claude/agents -name "*.md" 2>/dev/null
Launch all review agents in parallel using Task (subagent_type: Explore) — they are read-only.
Task (subagent_type: Explore): "ARCHITECTURE REVIEW
Review this plan for architectural concerns:
- Scalability issues
- Coupling problems
- Missing components
Plan: [content]"
Task (subagent_type: Explore): "SECURITY REVIEW
Review this plan for security concerns:
- Auth/authz gaps
- Data exposure risks
- Input validation
Plan: [content]"
Task (subagent_type: Explore): "SIMPLICITY REVIEW
Review this plan for over-engineering:
- Unnecessary complexity
- Simpler alternatives
- YAGNI violations
Plan: [content]"
Task (subagent_type: Explore): "TESTABILITY REVIEW
Review this plan for testing concerns:
- Hard-to-test patterns
- Missing test strategies
- Edge cases to cover
Plan: [content]"
Rules:
Wait for ALL parallel agents to complete, then collect:
From skill agents:
From research agents:
From review agents:
From learnings:
Deduplicate and prioritize:
For each section, add research insights:
## [Original Section Title]
[Original content preserved]
### Research Insights
**Best Practices:**
- [Concrete recommendation 1]
- [Concrete recommendation 2]
**Performance Considerations:**
- [Optimization opportunity]
- [Benchmark or metric to target]
**Implementation Details:** ```[language] // Concrete code example
Edge Cases:
References:
### 8. Add Enhancement Summary
At the top of the enhanced plan:
```markdown
## Enhancement Summary
**Deepened on:** [Date]
**Sections enhanced:** [Count]
**Research sources:** [List agents/skills used]
### Key Improvements
1. [Major improvement 1]
2. [Major improvement 2]
3. [Major improvement 3]
### New Considerations Discovered
- [Important finding 1]
- [Important finding 2]
Update the plan file in place, or create [original-name]-deepened.md if user prefers.
Before finalizing:
After writing the enhanced plan, ask the user:
"Plan deepened. What next?"
Options:
/reviewNEVER write code during this skill. Only research and enhance the plan with findings.