refactor-governance

Govern AI-assisted refactoring with staged gates and evidence-backed exit criteria.

Updated Apr 15, 2026
One-click install
npx skills add https://github.com/AoManoh/project_templates --skill refactor-governance
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: refactor-governance
Source: https://github.com/AoManoh/project_templates/tree/main/skills/refactor-governance
Command: npx skills add https://github.com/AoManoh/project_templates --skill refactor-governance

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires auggie-mcp, view, code-review, git-governance, and includes references (resource) components.

What problem does it solve?

It prevents AI-driven refactoring from drifting into half-finished work, mixed truth sources, and cross-stage leftovers by enforcing staged entry/exit gates and baseline evidence capture.

Core Features & Use Cases

  • Stage-based refactor governance: Breaks refactoring into baseline, switching, and cleanup phases with explicit entry/exit criteria.
  • No cross-stage leakage: Requires a clear “must clear” list so compatibility layers and old truths cannot unintentionally survive into later stages.
  • Evidence-first validation: Forces stage exit to be backed by tests/checks and a review gate before moving forward.

Quick Start

Ask your AI to run the refactor-governance workflow for your planned migration and to produce the first stage document under docs/refactor.

Frequently Asked Questions about refactor-governance

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

FAQPage Schema
How do I prevent incomplete migrations during AI-assisted refactoring?

Preventing incomplete migrations requires enforcing staged entry and exit gates with baseline evidence capture. Breaking refactoring into baseline, switching, and cleanup phases ensures old truth sources and compatibility layers cannot unintentionally survive into later stages.

What is stage-based refactor governance and when do I need it?

Stage-based refactor governance is a process that breaks implementation replacement and abstraction convergence into explicit baseline, switching, and cleanup phases. You need it when managing migration boundaries and compatibility layers to prevent cross-stage leakage and conflicting truth sources.

How do I clean up obsolete evidence and compatibility layers after a code migration?

Cleaning up obsolete evidence requires a clear must-clear list and strict cleanup rules enforced during the final stage. Mandatory documentation in docs/refactor ensures compatibility layers and old truths are tracked and removed before stage exit.

Does evidence-based validation require tests before exiting a refactoring stage?

Yes, evidence-based validation requires stage exit to be backed by tests, checks, and a review gate. This ensures that implementation replacement and abstraction convergence are verified before moving forward to the next refactoring phase.

How do I start a governed refactor workflow for my planned migration?

To start a governed refactor, ask your AI to run the refactor-governance workflow for your planned migration and produce the first stage document under docs/refactor. This captures the baseline evidence needed to begin the staged entry and exit process.

Why does AI refactoring leave conflicting truth sources across migration stages?

AI refactoring leaves conflicting truth sources when cross-stage leftovers occur without explicit stage gating. Without a must-clear list and evidence-backed exit criteria, compatibility layers and old implementations unintentionally survive into later stages.