refactor-safely

Featured

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'.

AI & Automation 190 stars 13 forks Updated 4 days ago MIT

Install

View on GitHub

Quality Score: 88/100

Stars 20%
76
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 so the refactor grounds in the real codebase. (always) 2. `framework:context-anchoring` -- Find and load the feature's context doc; capture approved plans and decisions in it. (always) 3. `framework:learning-harvest` -- Load prior operational learnings at session start; harvest new ones at session end. (always) 4. `framework:collaborative-judgment` -- Surface trade-offs in structure, seams, and migration sequence instead of silently assuming. (always) 5. `framework:clean-code` -- Readability, responsibility boundaries, local craft. (always) 6. `framework:test-quality` -- Characterization tests and the safety net. (always) 7. `framework:design-first` -- Target-structure planning for significant structural changes. (conditional: Step 3) 8. `framework:architecture` -- Layer placement and dependency direction. (conditional: responsibilities move across layers in Steps 5/6) 9. `framework:domain-driven-design` -- Aggregate boundaries and domain behavior. (conditional: domain rules move or sharpen in Step 6) 10. `framework:secure-coding` -- Trust bounds, authorization, sensitive data handling. (conditional: security-sensitive code touched in Step 6) ## Workflow ### Step 1: Establish Refactor Context Start from the current pain, not from a preferred abstraction. - Identify the target area: a module, ser...

Details

Author
techygarg
Repository
techygarg/lattice
Created
6 months ago
Last Updated
4 days ago
Language
JavaScript
License
MIT

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category