architecture-refactoring-strategylisted
Install: claude install-skill Xopoko/plug-n-skills
# Architecture Refactoring Strategy
Bundled commands use `$PLUGIN_ROOT` (`$env:PLUGIN_ROOT` in PowerShell; same path suffix) for the plugin root. Set it once: use the host's plugin-root variable when defined (Claude Code: `PLUGIN_ROOT="$CLAUDE_PLUGIN_ROOT"`), otherwise the absolute path of this plugin's root directory.
Use when improving the architecture of the application or library code needs
staged implementation rather than a one-shot rewrite. Module boundaries,
layers, dependency direction, APIs, domain/data ownership, extension points,
and runtime coupling are the subject. Coding agents are tools, not the
architecture being designed.
## Inputs
Gather current architecture map, hot paths, structure metrics, runtime topology, ownership topology, target quality attribute, constraints, tests, production signals, failure history, ADRs, and architecture principles.
For architecture-significant structural changes, require a baseline before code edits:
dirty-tree state, observed boundary evidence, pre-refactor probe or explicit
reason it was skipped, representative change/runtime scenario, and the focused
skills used from the router.
## Patterns
Use the smallest safe pattern:
- characterization tests before moving behavior;
- branch by abstraction behind stable interface;
- strangler fig for extracting flows;
- anti-corruption layer for old model or external API coupling;
- facade/adapter to stabilize callers;
- parallel run, shadow read, dual write for data migration ri