This command creates a comprehensive implementation plan OR refines an existing plan with thoughtful analysis.
Creates comprehensive implementation plans with detailed phases, tasks, and risk analysis for new features.
/plugin marketplace add dionridley/claude-plugins/plugin install project-management@dion-toolsThis command creates a comprehensive implementation plan OR refines an existing plan with thoughtful analysis.
You are executing the /dr-plan command in multi-mode: CREATE, REFINE, SUMMARY, or QUESTION RESOLUTION.
CRITICAL: The command arguments are provided in the <command-args> tag at the top of this message.
<command-args> value:
@):
→ SUMMARY mode (jump to "SUMMARY Mode" section below)@):
→ QUESTION RESOLUTION mode (jump to "Question Resolution Mode" section)@ (but no special keywords):
→ REFINE mode (jump to "REFINE Mode" section below)Note: When a user uses @file.md, the file content is auto-expanded into the conversation context. The <command-args> tag will contain any text AFTER the @ reference (like "summary", "answer questions", etc.).
This mode generates a Pull Request summary from the plan content.
Trigger: /dr-plan @_claude/plans/.../plan-file.md summary
Read the summary instructions file:
${CLAUDE_PLUGIN_ROOT}/commands/dr-plan/summary.mdApply those instructions:
@)Do NOT proceed to other modes - STOP after completing the summary
This mode helps resolve uncertain assumptions and open questions in a plan through interactive Q&A.
Trigger: /dr-plan @_claude/plans/.../plan-file.md answer questions
Read the questions instructions file:
${CLAUDE_PLUGIN_ROOT}/commands/dr-plan/questions.mdApply those instructions:
@)Do NOT proceed to other modes - STOP after completing question resolution
IMPORTANT: At the very top of this message, you will find a <command-args> tag that contains the actual arguments passed to this command. You MUST check this tag to determine if arguments were provided.
Check the <command-args> tag value (at the top of this message):
<command-args> tag contentInteractive prompt (if needed when <command-args> is empty):
Check for PRD file references in the <command-args> content:
@_claude/prd/[filename].md pattern in the command arguments you found in Phase 1@_claude/prd/auth-system.md or @_claude/prd/feature.md@ prefix)Check for --in-progress flag:
_claude/plans/in_progress/ folder_claude/plans/draft/ folder (default)CRITICAL: Check current date/time
CRITICAL: Plans are numbered sequentially across ALL folders. You MUST scan all three folders to find the highest number.
Scan ALL plan folders using Glob:
Use Glob tool with pattern: _claude/plans/**/*.md
This returns all markdown files in draft/, in_progress/, and completed/ folders.
Filter results for numbered plans:
XXX-*.md (where XXX is digits)001-auth.md, 042-migration.md, etc..md files that don't start with a number prefixParse all filenames to extract numbers:
XXX-[name].md where XXX is the number001-auth.md, 042-migration.md, 1000-large-feature.mdDetermine next plan number:
001, 042, 9991000, 1001Example scenarios:
001053004128If PRD was referenced:
Use extended thinking to deeply analyze the implementation:
Identify Assumptions and Open Questions:
Assumptions Made:
[x] (based on codebase, PRD, or explicit user input)[ ] and [?] markerOpen Questions - Blocking:
[AWAITING] statusOpen Questions - Non-Blocking:
[OPEN] statusIf there are critical blocking questions:
Optionally examine current codebase:
Extract plan name:
Read plan template:
${CLAUDE_PLUGIN_ROOT}/templates/plan-template.mdDetermine file path:
_claude/plans/draft/ (default) or _claude/plans/in_progress/ (if --in-progress flag)[number]-[plan-slug].md_claude/plans/draft/001-implement-user-authentication-system.mdCreate plan file with ALL sections thoughtfully populated:
Metadata:
Executive Summary:
Current State:
Assumptions Made:
[x] for confirmed assumptions[ ] with [?] for uncertain assumptions that need verificationOpen Questions & Decisions:
Blocking (must resolve before implementation):
- [ ] **Topic** [AWAITING] followed by question and optionsNon-Blocking (can resolve during implementation):
- [ ] **Topic** [OPEN] followed by questionIf no blocking questions exist:
Success Criteria:
Implementation Plan:
Rollback Plan:
Dependencies:
Success Metrics:
If critical information is missing:
✅ Implementation plan created: _claude/plans/[folder]/[number]-[plan-slug].md
Plan #[number]: [plan name]
Location: _claude/plans/[folder]/[number]-[plan-slug].md
Status: [Draft/In Progress]
[If PRD referenced: Related PRD: [prd-path]]
Comprehensive plan includes:
- Executive summary and current state analysis
[If PRD referenced: - Requirements aligned with PRD specifications]
- [N] assumptions documented ([M] need verification)
- [N] phases with detailed tasks
- Estimated time: [X] hours total
- Test verification for each phase
- Dependencies and rollback plan
[If blocking questions exist:]
⚠️ Blocking Questions: [N] questions need answers before implementation
Review the "Open Questions & Decisions" section in the plan.
To resolve: /dr-plan @_claude/plans/[folder]/[number]-[slug].md answer questions
[If no blocking questions:]
✓ No blocking questions - ready for implementation after review
Key Insights:
- [3-5 important considerations you identified while analyzing]
[If PRD referenced: - [Key requirements from PRD that shaped the plan]]
Next steps:
1. Review the plan, especially Assumptions and Open Questions
[If blocking questions: 2. Answer blocking questions: /dr-plan @plan answer questions]
[If PRD referenced: 2. Verify alignment with PRD requirements]
3. Refine if needed: /dr-plan @_claude/plans/[folder]/[number]-[plan-slug].md [changes]
4. When ready to implement, move to in_progress:
mv _claude/plans/draft/[number]-[plan-slug].md _claude/plans/in_progress/
Or ask Claude to move the plan for you.
5. IMPORTANT: Only work on plans in 'in_progress' folder!
[If created in draft/:]
Note: Plan created in draft/ - move to in_progress/ before implementing.
IMPORTANT: Look at the top of this message for the <command-args> tag that contains the actual arguments.
Extract components from the <command-args> tag value (at the top of this message):
@_claude/plans/ until next space or flag
@_claude/plans/draft/001-auth-system.md--no-confirm (if present, skip confirmation step)Parse the file path:
@ prefixCheck if file exists:
Verify it's a plan file:
If validation fails, show helpful error:
❌ Plan file not found: [path]
Available plans:
draft/:
- 001-authentication-system.md
- 024-new-feature.md
in_progress/:
- 003-database-migration.md
completed/:
- 015-oauth-integration.md
Usage: /dr-plan @_claude/plans/draft/001-authentication-system.md [refinement request]
Tip: Use tab completion for file paths
Read the plan file completely
Parse metadata:
Parse all sections:
Detect plan status from folder location:
draft/ → Status: Draftin_progress/ → Status: In Progresscompleted/ → Status: CompletedCheck plan status:
If Completed:
❌ Cannot refine completed plan
Plan #[number]: [Plan Name]
Status: Completed (historical record)
Completed plans are archived for historical reference and should not be modified.
Instead:
1. Create a new plan incorporating lessons learned
2. Reference the completed plan: /dr-plan [new context] "Building on plan [number]..."
3. Document what would be done differently in the new plan
If In Progress:
If Draft:
.{filename}.backup in same directory_claude/plans/draft/001-auth-system.md → _claude/plans/draft/.001-auth-system.md.backupcp _claude/plans/[folder]/[filename].md _claude/plans/[folder]/.[filename].backupUse extended thinking to deeply analyze:
Understand existing plan:
Understand refinement request:
Plan integration:
For in_progress plans:
Apply requested changes thoughtfully:
Update metadata:
Add to Refinement History section (create if doesn't exist):
## Refinement History
**Refinements:**
- [current-date]: [Brief description of what was refined]
If section already exists, add new entry to the list.
Compare original vs. refined plan and categorize changes:
Additions (+):
Modifications (~):
Deletions (-):
Preserved:
Assess scope of changes:
Create clear, terminal-friendly summary:
Changes preview:
+ Added: Phase 2.5 - OAuth Integration (3 hours)
- Add Google OAuth provider
- Add GitHub OAuth provider
- Test OAuth flows
~ Modified: Phase 4 - Testing
- Added OAuth integration test cases
~ Modified: Dependencies
- Added OAuth provider registration requirement
Preserved:
- Phases 1, 2, 3 unchanged
- Rollback plan unchanged
Scope: [Minor/Major] changes
If --no-confirm flag is present:
Otherwise, show confirmation prompt based on status:
If plan is In Progress AND major changes detected:
Show this warning:
⚠️ WARNING: This plan is in progress (may have completed tasks)
Plan #[number]: [Plan Name]
Current status: In Progress
Your request: "[refinement request]"
This appears to be a major structural change that could invalidate completed work.
[Show diff summary from Phase 8]
Recommendations:
1. Move plan back to draft for major redesign:
mv _claude/plans/in_progress/[filename].md _claude/plans/draft/
2. Create a new plan for the new approach: /dr-plan [new approach]
3. Continue with minor adjustments only
Proceed with major changes to in-progress plan? [y/n]:
If plan is In Progress AND minor changes:
Show this message:
ℹ️ Note: This plan is in progress
Plan #[number]: [Plan Name]
Status: In Progress
Some tasks may already be completed. Verify changes don't conflict with work done.
[Show diff summary from Phase 8]
Apply these changes? [y/n/diff]:
If plan is Draft (normal case):
Show diff summary:
[Show diff summary from Phase 8]
Apply these changes? [y/n/diff]:
Wait for user response:
If user cancels (n):
❌ Refinement cancelled - no changes made
Your plan remains unchanged. The backup was not needed and has been removed.
To try again with different changes:
/dr-plan @_claude/plans/[folder]/[filename].md [different refinement request]
Show success message:
IMPORTANT: Check the scope of changes from Phase 8.
For all refinements:
Show success message:
✅ Plan refined successfully
Plan #[number]: [Plan Name]
Location: _claude/plans/[folder]/[filename].md
Status: [current-status]
Changes applied:
[Concise summary of changes - same as diff summary]
Backup saved: _claude/plans/[folder]/.[filename].backup
Refinement count: [count] (see Refinement History in plan)
Next steps:
1. Review the refined plan
2. Refine again if needed: /dr-plan @_claude/plans/[folder]/[filename].md [changes]
[If in draft/:]
3. When ready, move to in_progress:
mv _claude/plans/draft/[filename].md _claude/plans/in_progress/
Or ask Claude to move the plan for you.
@_claude/prd/[file].md syntax in CREATE modeFollow the instructions above based on the detected mode (CREATE, REFINE, SUMMARY, or QUESTION RESOLUTION).