refactor-safely

Solid

Restructure existing code safely without changing externally observable behavior. Composes context, design, architecture, code quality, and testing guardrails into a characterization-first refactoring workflow. Use when the user says 'refactor this', 'clean this up', 'untangle this module', 'move this to the right layer', 'simplify this code', or 'improve this structure'.

Code & Development 134 stars 8 forks Updated 3 days ago MIT

Install

View on GitHub

Quality Score: 87/100

Stars 20%
71
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Refactor Safely ## Required Skills Load these skills based on refactor scope (see Steps 3, 5, 6 for conditional use): 1. `framework:knowledge-priming` -- Load project context (tech stack, architecture, conventions) so refactor fits real project not generic patterns (always) 2. `framework:context-anchoring` -- Load existing feature context doc when available, capture approved refactor plan, preservation rules, structural decisions for future sessions (always) 3. `framework:learning-harvest` -- Load prior operational learnings inform refactor; harvest new patterns at session end (always) 4. `framework:collaborative-judgment` -- Surface meaningful trade-offs in structure, seams, migration sequence instead of silently choosing path (always) 5. `framework:clean-code` -- Improve readability, responsibility boundaries, local code craft while preventing scope creep and wrong abstractions (always) 6. `framework:test-quality` -- Lock current behavior with characterization tests, keep safety net reliable throughout refactor (always) 7. `framework:design-first` -- Use progressive design selectively for significant structural changes so target structure agreed before editing code (conditional) 8. `framework:architecture` -- Validate layer placement, dependency direction, correct structural boundaries (conditional) 9. `framework:domain-driven-design` -- Validate domain behavior, aggregate boundaries, movement of business rules into correct domain objects (conditional) 10. `framework:s...

Details

Author
techygarg
Repository
techygarg/lattice
Created
3 months ago
Last Updated
3 days ago
Language
Shell
License
MIT

Related Skills