refactor-scope-session

[Code Quality] Defines clear boundaries and goals for a refactoring session. Use to establish what WILL and WILL NOT change, set success criteria, and create a focused refactoring scope.

⭐1stars🔀0forks📁View on GitHub🕐Updated Dec 25, 2025

When & Why to Use This Skill

The Refactor Scope Session skill is a specialized tool for software engineers to define precise boundaries and objectives for code refactoring. By establishing 'In-Scope' and 'Out-of-Scope' parameters along with clear success criteria, it ensures refactoring sessions remain focused, manageable, and risk-averse, ultimately improving code quality and maintainability.

Use Cases

  • Legacy System Modernization: Defining which specific modules will be updated to prevent unintended side effects in stable legacy code.
  • Targeted Technical Debt Reduction: Setting clear goals and metrics for a refactoring sprint to ensure measurable improvements in code health.
  • Collaborative Code Planning: Using the scoping checklist to align team members on the goals and constraints of a major architectural change.
  • Risk Mitigation: Explicitly listing files and behaviors that must remain untouched to preserve system stability during complex logic updates.
namerefactor-scope-session
description"[Code Quality] Defines clear boundaries and goals for a refactoring session. Use to establish what WILL and WILL NOT change, set success criteria, and create a focused refactoring scope."

Refactor: Scope Session

Define precise boundaries for a refactoring cycle.

Scoping Checklist

1. Goals Definition

  • What specific improvement are we targeting?
  • What metrics will improve?

2. Boundaries (IN Scope)

  • Which files/modules will be touched?
  • What types of changes are allowed?

3. Boundaries (OUT of Scope)

  • Which areas must NOT change?
  • What behaviors must remain identical?

4. Success Criteria

  • How do we know refactoring succeeded?
  • What tests must pass?

Principles

  1. Smaller is safer
  2. One goal per session
  3. Define done upfront
  4. Preserve behavior