Issue Enhancement Command
You are tasked with analyzing a GitHub issue and enhancing it with comprehensive specifications based on repository context, recent activity, and best practices.
Parameters
- Issue Number: The GitHub issue number that was just opened (available via GitHub Actions context)
Enhancement Process
Phase 1: Issue Analysis
-
Current Issue Understanding: Analyze the issue description to understand:
- The core problem or feature request
- Any existing requirements or constraints mentioned
- The scope and complexity implied
- User's intent and expected outcomes
-
Repository Context Analysis: Examine the repository to understand:
- Current codebase architecture and patterns
- Recent commits and their impact (last 10-20 commits)
- Recent pull requests and changes
- Development conventions and standards from CLAUDE.md
- Existing similar functionality or patterns
-
Technical Assessment: Evaluate:
- How the request fits into current architecture
- Dependencies and integration points
- Potential impact on existing functionality
- Technical complexity and implementation approach
Phase 2: Specification Enhancement
Create Comprehensive Specifications Including:
1. Problem Statement
- Clear, detailed problem definition
- Context within the larger system
- Impact and importance
2. Technical Requirements
- Specific functional requirements
- Non-functional requirements (performance, security, etc.)
- Integration requirements with existing systems
- API or interface specifications if applicable
3. Implementation Approach
- Recommended technical approach and architecture
- Key components or modules to be affected
- Code organization and file structure considerations
- Dependencies and libraries needed
4. Acceptance Criteria
- Specific, testable acceptance criteria
- Definition of "done" for this issue
- Success metrics and validation approaches
5. Testing Strategy
- Unit testing requirements
- Integration testing needs
- E2E or manual testing considerations
- Test coverage expectations (>90% per repository standards)
6. Documentation Requirements
- Code documentation needs (docblocks, comments)
- User documentation updates
- API documentation if applicable
7. Implementation Considerations
- Breaking changes assessment
- Migration requirements
- Rollback strategies
- Performance implications
8. Related Issues and Dependencies
- Links to related issues or PRs
- Dependencies on other work
- Potential conflicts with ongoing development
Append the enhanced specifications to the issue description with the following format:
---
## 🤖 Claude Enhancement
*Auto-generated comprehensive specifications based on repository analysis*
### Problem Analysis
[Detailed problem analysis]
### Technical Requirements
[Specific requirements list]
### Implementation Approach
[Recommended technical approach]
### Acceptance Criteria
- [ ] [Specific testable criteria]
- [ ] [More criteria]
### Testing Strategy
[Testing approach and coverage requirements]
### Documentation Requirements
[Documentation needs]
### Implementation Notes
[Technical considerations and dependencies]
### Related Work
[Links to related issues, PRs, recent commits]
---
## 🔄 Interactive Iteration
This issue supports interactive refinement with Claude:
- **💬 Chat**: Comment with `@claude` to discuss implementation details
- **🔄 Refine**: Comment with `🔄 refine` to polish and clarify specifications
- **🦖 Evolve**: Comment with `🦖 evolve` to creatively expand the idea
- **⭐ Finalize**: Comment with `⭐ finalize` to replace this description with your preferred iteration
All iterations will appear as comments and can be promoted to the main description when ready.
---
## 🚀 Auto-Implementation
Once this issue is fully specified and ready for development:
- **🚀 Implement**: Comment with `🚀 implement` to automatically create a branch, implement the solution, and open a pull request
- **Alternative triggers**: `implement` or `start work` also trigger auto-implementation
**What happens during auto-implementation:**
1. **Analysis**: Claude analyzes the issue specifications and repository context
2. **Planning**: Creates detailed implementation plan with atomic tasks
3. **Branch & PR**: Creates feature branch and draft pull request with progress tracking
4. **Development**: Implements solution incrementally with tests and documentation
5. **Quality**: Validates all quality gates (tests, lint, build, type-check)
6. **Review**: Marks PR ready for review with comprehensive testing instructions
The entire implementation follows repository standards and maintains >90% test coverage.
Command Execution
The workflow will:
- Use
gh issue view to get the issue details
- Use
git log and gh pr list to analyze recent repository activity
- Analyze the codebase structure and patterns
- Generate comprehensive specifications
- Use
gh issue edit to append the enhanced specifications to the issue description
Quality Standards
- Comprehensive: Cover all aspects from requirements to testing
- Actionable: Provide clear, implementable guidance
- Context-Aware: Integrate with existing repository patterns and conventions
- Professional: Use clear, professional language suitable for development planning
- Realistic: Ensure recommendations are feasible within the current codebase
Success Criteria
- Issue description is enhanced with comprehensive specifications
- All technical aspects are covered (requirements, testing, documentation)
- Implementation approach aligns with repository conventions
- Acceptance criteria are specific and testable
- Related work and dependencies are identified
Remember: The goal is to transform a basic issue description into a comprehensive specification that any developer could use to implement the feature or fix with confidence.