epic-refactor

Coordinate repo-wide codebase migrations with dependency-ordered batches and verification.

Updated Mar 19, 2026
One-click install
npx skills add https://github.com/espensev/ai-skills --skill epic-refactor
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: epic-refactor
Source: https://github.com/espensev/ai-skills/tree/main/gemini-skills/skills/epic-refactor
Command: npx skills add https://github.com/espensev/ai-skills --skill epic-refactor

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Repo-scale migrations are error-prone and hard to coordinate; Epic Refactor provides a rigorously structured process, guardrails, and documentation to ensure safe, auditable architecture changes across large codebases.

Core Features & Use Cases

  • Migration ledger tracks target architecture, modules in scope, dependency order, invariants, validation plans, blockers/rollback notes.
  • Dependency-ordered batching executes changes in a coherent sequence to preserve behavior.
  • Verification & guardrails run targeted tests and validations after each batch and record results.
  • Documentation-driven governance enforces planning contracts and keeps a living refactor report to explain decisions.

Quick Start

Define explicit target architecture and scope, create the refactor report, and begin the first dependency-ordered batch.

Frequently Asked Questions about epic-refactor

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

FAQPage Schema
How do I coordinate a repo-wide refactor across multiple modules?

A repo-wide refactor is coordinated through dependency-ordered batching that executes changes sequentially while preserving behavior. A migration ledger tracks target architecture, modules in scope, and validation plans to manage the full scope.

What are guardrails in codebase migration and why are they needed?

Guardrails in codebase migration are verification checks that run targeted tests after each batch to ensure invariants hold. They prevent cascading failures during architecture changes by validating behavior before proceeding to the next batch.

How do I plan a safe rollback for a large-scale codebase migration?

Plan safe rollbacks for large-scale migrations by maintaining a migration ledger that records blockers and rollback notes for each dependency-ordered batch. Documentation-driven governance ensures decisions are auditable and reversible if validation fails.

When do I need dependency-ordered batching for architecture refactoring?

Dependency-ordered batching is needed for architecture refactoring when changes span multiple modules with interdependencies. It ensures foundational modules are updated before dependents, preserving system behavior throughout the migration process.

Can I use this approach for smaller, single-module refactors?

This approach is designed for repo-scale migrations spanning multiple modules requiring strict guardrails and documentation-led governance. Single-module refactors without complex dependency chains likely do not need the full migration ledger and batch verification overhead.