/issue - GitHub Issue Analysis & Planning
Analyze a GitHub issue and prepare an implementation plan. Research, explore, clarify, and plan - stopping before implementation to let the user decide when to proceed.
Core Principles
Phase 1: Fetch Issue
gh issue view "$ISSUE_NUM" --json title,body,labels,state,assignees,comments
gh issue view "$ISSUE_NUM"
Extract and present:
- Title, number, state, labels, assignees
- Description (full body)
- Discussion highlights (key comment points)
- Linked PRs
Categorize: type (bug/feature/enhancement/refactor), scope (small/medium/large), area (UI/backend/fullstack/tooling).
Phase 2: Detect Stack
Phase 3: Explore
Task: Analyze codebase for implementing this GitHub issue:
Issue #[number]: [title]
Description: [full body]
Type: [type], Area: [area]
Find: similar features, files to modify/create, patterns, dependencies, concerns.
Return findings in <explorer-result> block.
Wait for <explorer-result> block. If incomplete, re-delegate with guidance.
Phase 4: Clarify
## Issue Understanding
**Issue:** #[number] - [title]
**tl;dr:** [1-2 sentence summary of approach]
**Scope Interpretation:**
- IN scope: [list]
- OUT of scope: [list]
**Affected Files:**
- Modify: [list from explorer]
- Create: [list from explorer]
## Clarifying Questions
1. [scope/boundaries]
2. [edge cases]
3. [acceptance criteria]
4. [testing requirements]
5. [integration points]
Reply with answers, or "proceed" to continue with current understanding.
STOP. Wait for user response.
Phase 5: Plan
Implementation Steps
- [Specific change 1]
- [Specific change 2]
Files to Modify/Create
| File | Change Description |
|---|---|
[file] |
[what changes] |
Tests Needed
- [Test case 1]
- [Test case 2]
AI Assessment
- Approach: [strategy]
- Complexity: [Low/Medium/High]
- Risks: [with mitigations]
- Success Criteria: [testable criteria]
Ready for Implementation
Issue: #[number] - [title]
Branch: [current branch]
Complexity: [level]
To implement (team shape auto-detected from file map):
/dev Implement GitHub issue #[number]: [title]
STOP. Do not implement. Wait for user to run the command.