Enhance a plan with parallel research agents for each section, adding depth, best practices, and implementation details
Enhances plans with parallel research agents, adding best practices, code examples, and implementation details.
/plugin marketplace add jovermier/claude-code-plugins-ip-labs/plugin install dev@ip-labs-marketplace[plan-name or 'current']The /deepen-plan command takes an existing plan and enhances it with comprehensive research. Each section of the plan is researched in parallel by specialized agents, adding best practices, implementation details, and context.
Read the Plan
Identify Research Areas
Launch research agents for each plan section:
| Section | Research Agent | Output |
|---|---|---|
| Technical Approach | framework-docs-researcher | Framework-specific patterns, API usage |
| Architecture | best-practices-researcher | Design patterns, architectural principles |
| Implementation | repo-research-analyst | Codebase patterns, conventions |
| Context | git-history-analyzer | Historical context, related code evolution |
For each plan section, add:
Enhance the plan file with:
### Step N: [Task Name]
**Research-Based Enhancements:**
**Best Practices:**
- [Practice 1]: [Explanation with source]
- [Practice 2]: [Explanation with source]
**Code Example:**
\`\`\`typescript
[Concrete example from framework docs or best practices]
\`\`\`
**Source:** [Link to documentation]
**Common Pitfalls:**
- ❌ [Pitfall 1]: [What happens and how to avoid]
- ❌ [Pitfall 2]: [What happens and how to avoid]
**Codebase Conventions:**
- [Convention 1]: [How this codebase does it]
- [Convention 2]: [File organization pattern]
**Files to Create/Modify:**
- `src/[path]/[file].ts` - [Purpose]
- `src/[path]/[file].test.ts` - [Purpose]
## Technical Approach (Enhanced)
### Architecture Decisions
**Decision 1: [Decision Name]**
**What:** [Description]
**Why This Approach:**
- [Reason 1]: [Explanation]
- [Reason 2]: [Explanation]
**Alternatives Considered:**
| Alternative | Pros | Cons | Why Not Chosen |
|-------------|------|------|----------------|
| [Name] | [Pros] | [Cons] | [Reason] |
| [Name] | [Pros] | [Cons] | [Reason] |
**Best Practice Reference:**
- [Source]: [Link to official docs or reputable source]
- **Key Insight:** [What to learn from this source]
**Real-World Example:**
From [Project Name]:
> [Relevant example with link]
### Technology Choices
| Technology | Best Practice Reference | Key Documentation |
|------------|------------------------|-------------------|
| [Name] | [Source link] | [Doc link] |
| [Name] | [Source link] | [Doc link] |
## Testing Strategy (Enhanced)
### Framework-Specific Patterns
**For [Testing Framework]:**
- **Official Docs:** [Link]
- **Best Practices:** [Summary with source]
**Unit Test Example:**
\`\`\`typescript
import { describe, it, expect } from '[framework]';
describe('[Feature]', () => {
it('should [behavior]', () => {
// Arrange
const input = [test data];
// Act
const result = [function](input);
// Assert
expect(result).toEqual([expected]);
});
});
\`\`\`
**Integration Test Example:**
\`\`\`typescript
[Example with mocking external dependencies]
\`\`\`
### Coverage Targets
Based on research for this type of feature:
- **Unit Tests:** Target [X]% coverage
- **Edge Cases:** [List specific cases to test]
- **Error Paths:** [List error scenarios]
**Reference:** [Source for coverage recommendations]
Example 1: Deepen current plan
User:
/deepen-plan
Assistant: I'll enhance the current plan with parallel research. Let me launch research agents for each section...
[Reads current plan, launches parallel research, adds code examples and best practices]
Example 2: Deepen specific plan
User:
/deepen-plan authentication.plan.md
Assistant: I'll enhance the authentication plan. Let me research each section...
[Reads authentication plan, launches targeted research, adds JWT best practices, security considerations]
Example 3: Deepen plan section
User:
/deepen-plan api-changes.plan.md --section testing
Agent: I'll focus on deepening the testing section...
[Researches testing best practices for the API, adds comprehensive test examples]
/workflows:plan - Create a new plan/plan-manager - Manage plan lifecycle