GitHub Issue Implementation Planner
Create a structured implementation plan for a GitHub issue by analyzing the issue requirements and the codebase, then post the plan directly as a comment on the issue for review on GitHub.
Workflow
Step 1: Fetch Issue Details
Retrieve the GitHub issue information using the gh CLI:
bash
gh issue view $ARGUMENTS --json title,body,labels,assignees,milestone,comments
Parse the response to understand:
- •Issue title and description
- •Labels (bug, feature, enhancement, etc.)
- •Any linked PRs or related issues mentioned in the body
- •All comments: Review the entire comment thread for:
- •Additional requirements or clarifications
- •Design decisions or constraints discussed
- •Feedback on previous approaches
- •Questions that need to be addressed in the plan
Step 2: Analyze the Codebase
Based on the issue requirements, explore the codebase to understand:
- •Relevant files: Use Glob and Grep to find files related to the issue
- •Architecture: Understand how the relevant components are structured
- •Patterns: Identify existing patterns that should be followed
- •Dependencies: Note any dependencies or related code that may be affected
Focus the analysis on areas directly relevant to the issue. Avoid broad codebase exploration unless necessary.
Step 3: Generate Implementation Plan
Create a structured implementation plan in Markdown format with these sections:
markdown
## Implementation Plan for #<issue-number> ### Overview Brief summary of the approach and key decisions. ### Affected Files List of files that will need to be created or modified: - `path/to/file1.ts` - Description of changes - `path/to/file2.ts` - Description of changes ### Implementation Steps 1. **Step title** - Detailed description - Code patterns to follow 2. **Step title** - Detailed description - Code patterns to follow ### Testing Approach - Unit tests to add - Integration tests to consider - Manual testing steps ### Potential Risks - Risk 1 and mitigation - Risk 2 and mitigation --- *Generated by Claude Code*
Step 4: Post Plan as Comment
Post the generated plan directly to the GitHub issue:
bash
gh issue comment $ARGUMENTS --body "<plan-content>"
After posting, report success with the issue URL so the user can review the plan on GitHub.
Important Guidelines
Issue Analysis
- •Read the full issue description carefully
- •Review all comments on the issue for additional context, clarifications, and evolving requirements
- •Consider labels to understand issue type (bug vs feature)
- •Check for any acceptance criteria or requirements mentioned
- •Look for related issues or PRs mentioned
- •Note any disagreements or open questions in the comment thread that may affect the plan
Codebase Exploration
- •Start with targeted searches based on issue keywords
- •Look at similar existing implementations for patterns
- •Check test files to understand testing conventions
- •Review documentation for architectural guidance
Plan Quality
- •Be specific about file paths and changes
- •Reference existing patterns in the codebase
- •Include concrete code examples where helpful
- •Identify potential edge cases and risks
- •Keep the plan actionable and clear
Error Handling
- •If
ghCLI is not authenticated, inform the user - •If issue number is invalid, report the error clearly
- •If codebase analysis reveals blockers, include them in the plan