@stillrivercode/agentic-workflow-template
Version:
NPM package to create AI-powered GitHub workflow automation projects
67 lines (50 loc) • 1.78 kB
Markdown
# Refactoring Prompt Template
## Task: Code Refactoring
### Refactoring Details
- **Target Code**: {TARGET_CODE}
- **Refactoring Goal**: {REFACTORING_GOAL}
- **Current Issues**: {CURRENT_ISSUES}
- **Desired Improvements**: {DESIRED_IMPROVEMENTS}
- **Constraints**: {CONSTRAINTS}
### Refactoring Guidelines
1. **Preserve Functionality**
- Maintain exact same behavior
- Don't change public APIs without documentation
- Ensure all existing tests continue to pass
- Verify no breaking changes introduced
2. **Code Quality Improvements**
- Improve readability and maintainability
- Remove code duplication
- Simplify complex logic
- Extract reusable components/functions
- Improve naming conventions
3. **Performance Optimization**
- Identify performance bottlenecks
- Optimize algorithms where beneficial
- Reduce memory usage if applicable
- Improve database query efficiency
4. **Architecture Improvements**
- Better separation of concerns
- Improved modularity
- Clearer dependency management
- Enhanced testability
### Testing Strategy
- [ ] Run existing test suite before refactoring
- [ ] Ensure all tests pass after refactoring
- [ ] Add tests for any new functions/methods
- [ ] Verify performance improvements with benchmarks
- [ ] Test edge cases and error conditions
### Documentation Updates
- [ ] Update inline comments
- [ ] Revise API documentation
- [ ] Update architecture diagrams
- [ ] Record performance improvements
### Deliverables
- [ ] Code refactored according to goals
- [ ] All existing functionality preserved
- [ ] Tests updated and passing
- [ ] Performance improvements documented
- [ ] Code quality metrics improved
- [ ] Documentation updated
### Additional Notes
{ADDITIONAL_CONTEXT}