request-refactor-plan
This skill will be invoked when the user wants to create a refactor request. You should go through the steps below. You may skip steps if you don't consider them necessary.
-
Ask the user for a long, detailed description of the problem they want to solve and any potential ideas for solutions.
-
Explore the repo to verify their assertions and understand the current state of the codebase.
-
Ask whether they have considered other options, and present other options to them.
-
Interview the user about the implementation. Be extremely detailed and thorough.
-
Hammer out the exact scope of the implementation. Work out what you plan to change and what you plan not to change.
-
Look in the codebase to check for test coverage of this area of the codebase. If there is insufficient test coverage, ask the user what their plans for testing are.
-
Break the implementation into a plan of tiny commits. Remember Martin Fowler's advice to "make each refactoring step as small as possible, so that you can always see the program working."
-
Create a GitHub issue with the refactor plan. Use the following template for the issue description:
Problem Statement
The problem that the developer is facing, from the developer's perspective.
Solution
The solution to the problem, from the developer's perspective.
Commits
A LONG, detailed implementation plan. Write the plan in plain English, breaking down the implementation into the tiniest commits possible. Each commit should leave the codebase in a working state.
Decision Document
A list of implementation decisions that were made. This can include:
- The modules that will be built/modified
- The interfaces of those modules that will be modified
- Technical clarifications from the developer
- Architectural decisions
- Schema changes
- API contracts
- Specific interactions
Do NOT include specific file paths or code snippets. They may end up being outdated very quickly.
Testing Decisions
A list of testing decisions that were made. Include:
- A description of what makes a good test (only test external behavior, not implementation details)
- Which modules will be tested
- Prior art for the tests (i.e. similar types of tests in the codebase)
Out of Scope
A description of the things that are out of scope for this refactor.
Further Notes (optional)
Any further notes about the refactor.
More from costicapuntaru/agentica
epic-workflow
End-to-end Epic planning — grill requirements, write a PRD, decompose into GitHub issues with dependencies, and create a feature branch for autonomous implementation. Use when starting a new epic, planning a large feature, or when user says "epic workflow", "plan this feature", or "start a new epic".
8github-auto-implement
Autonomous GitHub issue implementation — picks the next ready issue, triages it, implements with TDD, and opens a PR targeting the correct branch (default, epic feature branch, or PR-chained dependency branch). Use when running the autobot daemon, implementing GitHub issues autonomously, or starting the auto-implement loop.
8prd-to-issues
Break a PRD into independently-grabbable GitHub issues using tracer-bullet vertical slices. Use when user wants to convert a PRD to issues, create implementation tickets, or break down a PRD into work items.
7openspec-bugfix
Start a new bugfix using the OpenSpec artifact workflow. Use when the user describes a bug, defect, or unexpected behavior and wants to fix it using a structured approach.
7prd-to-plan
Turn a PRD into a multi-phase implementation plan using tracer-bullet vertical slices, saved as a local Markdown file in ./plans/. Use when user wants to break down a PRD, create an implementation plan, plan phases from a PRD, or mentions "tracer bullets".
7setup-pre-commit
Set up Husky pre-commit hooks with lint-staged (Prettier), type checking, and tests in the current repo. Use when user wants to add pre-commit hooks, set up Husky, configure lint-staged, or add commit-time formatting/typechecking/testing.
7