Refactor & architecture improver
Point the agent at a messy area and it reads your code, finds the shallowest module, writes a tiny-commit refactor plan, applies it behind your tests step by step, and drafts a PR — so debt comes down without behaviour changing.
What it installs
Agents 1
-
Refactoring Agent
Reads the target area, writes a scoped tiny-commit refactor plan, applies it behind green tests, and drafts a PR.
Workflows 1
-
Refactor
Find the deepening opportunity, plan tiny commits, apply behind tests, then draft a PR for approval.
Goals 1
-
Debt reduced safely
Bring technical debt down by deepening shallow modules without ever changing observable behaviour.
Skills 3
-
improve-codebase-architecture
Surface deepening opportunities — refactors that turn shallow modules into deep ones — using the deletion test and the deep-module vocabulary (module, interface, depth, seam, adapter, leverage, locality), then deepen the one the user picks. Adapted from mattpocock/skills/improve-codebase-architecture.
-
request-refactor-plan
Produce a scoped, reviewable refactor plan as a sequence of the smallest working commits (Fowler), after checking test coverage and pinning current behaviour, with explicit scope and out-of-scope. Adapted from mattpocock/skills/request-refactor-plan.
-
domain-modeling
Actively sharpen the project's ubiquitous language while refactoring — challenge terms against the glossary, name seams in the domain's words, update the glossary inline, and offer an ADR only for hard-to-reverse, surprising trade-offs. Adapted from mattpocock/skills/domain-modeling.
Requirements
What this template expects to do its job. Task Machine does not verify these — you decide whether your setup is ready.
- Connected repository — The agent reads the target area, the surrounding code, and the test suite from your connected repository, and opens the refactor as a pull request. Until repository access is connected, it works from the code supplied as attachments and drafts the PR for you to open.
Get started
Install Refactor & architecture improver and run it with approvals.
Join the waitlist and we will send early access when the first private beta spots open.
Private beta. We invite teams in batches and never share your email.