refactor-feature

Coordinate spec-driven refactorings with contract tests and incremental batches.

41|7|Updated Jan 30, 2026
One-click install
npx skills add https://github.com/DGouron/review-flow --skill refactor-feature-dgouron
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: refactor-feature
Source: https://github.com/DGouron/review-flow/tree/main/.claude/skills/refactor-feature
Command: npx skills add https://github.com/DGouron/review-flow --skill refactor-feature-dgouron

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automates coordination of a spec-driven refactoring pipeline that safely modifies existing code in small, auditable steps.

Core Features & Use Cases

  • Coordinates two agents (feature-planner, feature-implementer) to produce and apply refactor plans with contract-testing safeguards.
  • Uses incremental batch changes with explicit rollbacks and regression checks to protect existing consumers.
  • Maintains a living progress trail in docs/refactor/ and surfaces status updates to stakeholders.

Quick Start

Initiate a refactor by providing a spec or issue; the system will load Phase 0, choose a method, and prepare a batch-based plan.

Frequently Asked Questions about refactor-feature

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I safely refactor a legacy codebase without breaking existing consumers?

Spec-driven refactoring safely modifies legacy code through incremental batches and contract tests, ensuring staged changes and traceable progress across multiple files while protecting existing consumers with explicit rollbacks and regression checks.

What is the best way to coordinate a spec-driven code modification workflow?

Spec-driven code modification is coordinated by a feature-planner and feature-implementer to produce and apply refactor plans, progressing through phases that choose a method, prepare contract tests, plan batches, and implement with regression checks.

How do I start a spec-driven refactor using contract tests?

Initiate a spec-driven refactor by providing a spec or issue; the system loads Phase 0 to choose a method, prepares contract tests in Phase 1, generates a batch-based plan in Phase 2, and implements per-batch changes with regression checks.

Can I use incremental batch refactoring for staged changes across multiple test suites?

Incremental batch refactoring supports staged changes across multiple files and test suites by maintaining a living progress trail in docs/refactor/ and surfacing status updates to stakeholders throughout the safe migration process.

When should I not use a spec-driven refactoring pipeline?

Spec-driven refactoring pipelines are not suited for rapid, throwaway prototypes or single-file edits that do not require safe migration, staged changes, or traceable progress across multiple test suites and consumer contracts.

Does contract testing work with legacy codebases requiring safe migration?

Contract testing works with legacy codebases by applying incremental batch changes with explicit rollbacks and regression checks, ensuring safe migration and auditable progress while maintaining a living progress trail in docs/refactor/.