safe-refactoring

Plan incremental, reversible refactors of Meridian WPF code with behavior preservation.

Updated Mar 23, 2026
One-click install
npx skills add https://github.com/rodoHasArrived/Meridian-main --skill safe-refactoring-rodohasarrived
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: safe-refactoring
Source: https://github.com/rodoHasArrived/Meridian-main/tree/main/.codex/skills/safe-refactoring
Command: npx skills add https://github.com/rodoHasArrived/Meridian-main --skill safe-refactoring-rodohasarrived

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Safe-refactoring prevents costly regressions by guiding behavior-preserving refactors that keep operator-visible behavior and shared contracts stable.

Core Features & Use Cases

  • Incremental, reversible refactor planning: Breaks changes into small steps with clear rollback paths to avoid large, risky rewrites.
  • Behavior preservation guardrails: Requires explicit behavior constraints, inventory of call sites/contracts, and narrow validation instead of unrelated churn.
  • Characterization and regression testing: Adds characterization tests when coverage is missing and runs focused tests to prove equivalence.

Quick Start

Use the safe-refactoring skill to plan an incremental refactor of the specified Meridian WPF screen and its related view models without changing behavior, including a characterization strategy and the exact rollback risks to monitor.

Frequently Asked Questions about safe-refactoring

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

FAQPage Schema
How do I refactor WPF screens without changing behavior?

To safely refactor WPF screens without behavior drift, break changes into small, reversible steps. Require explicit behavior constraints, inventory call sites and contracts, and run focused validations to ensure operator-visible behavior and shared interfaces remain stable.

What is characterization testing in incremental refactoring?

Characterization testing in incremental refactoring captures current code behavior before changes. When coverage is missing, these tests establish a regression safety net to prove equivalence during view model extraction, dependency simplification, and architecture cleanup.

How do I consolidate WPF view models and services incrementally?

Consolidate WPF view models and services incrementally by breaking changes into small steps with clear rollback paths. Maintain call site inventories, apply characterization tests, and execute stepwise to preserve MVVM boundaries and prevent regressions.

When do I need characterization tests for a dependency simplification refactor?

You need characterization tests for a dependency simplification refactor when existing test coverage is missing. They capture current behavior to prove equivalence and provide regression safety during incremental architecture cleanup.

Can I use behavior-preserving refactors for renaming and architecture cleanup in MVVM applications?

Yes, behavior-preserving refactors apply to renaming and architecture cleanup in MVVM applications. Require explicit behavior constraints, inventory shared contracts, and stepwise reversible execution to ensure no operator-visible drift occurs.

What is the best way to avoid regressions during WPF architecture cleanup?

The best way to avoid regressions during WPF architecture cleanup is stepwise reversible execution with focused validation. Avoid large rewrites by maintaining call site and contract inventories to preserve shared interfaces and operator-visible behavior.