refactoring
Refactoring
Golden Rule
Change behavior OR change structure, never both at once.
Workflow
- Ensure tests exist - Coverage before refactoring
- Make small changes - One refactoring at a time
- Run tests frequently - After each change
- Commit often - Easy to revert if needed
Common Refactorings
Extract Function
More from mrwogu/promptscript
promptscript
>-
12committing
Creates well-structured git commits following conventional commit format. Use when committing changes, preparing commits, or when asked to commit code.
1pull-requesting
Creates well-structured pull requests with clear descriptions. Use when creating PRs, preparing changes for review, or when asked to open a pull request.
1code-reviewing
Reviews code for bugs, security issues, and quality improvements. Use when reviewing pull requests, checking code quality, or when asked to review changes.
1documenting
Creates clear, maintainable documentation for code and APIs. Use when writing README files, API docs, code comments, or when asked to document code.
1testing-code
Writes comprehensive tests following AAA pattern. Use for unit and integration tests.
1