qa-refactoring
SolidSafe refactoring with behavior preservation. Use when reducing technical debt, applying strangler migrations, or tightening CI guardrails.
AI & Automation 80 stars
17 forks Updated 1 weeks ago MIT
Install
Quality Score: 83/100
Stars 20%
Recency 20%
Frontmatter 20%
Documentation 15%
Issue Health 10%
License 10%
Description 5%
Skill Content
# QA Refactoring Safety
Use this skill to refactor safely: preserve behavior, reduce risk, and keep CI green while improving maintainability and delivery speed.
Defaults: baseline first, smallest safe step next, and proof via tests/contracts/observability instead of intuition.
## Quick Start (10 Minutes)
- If key context is missing, ask for: what must not change (invariants), risk level (money/auth/migrations/concurrency), deployment constraints, and the smallest boundary that can be protected by tests.
- Confirm baseline: `main` green; reproduce the behavior you must preserve.
- Choose a boundary: API surface, module boundary, DB boundary, or request handler.
- Add a safety net: characterization/contract/integration tests at that boundary.
- Refactor in micro-steps: one behavior-preserving change per commit/PR chunk.
- Prove: run the smallest relevant suite locally, then full CI; keep failures deterministic.
## Core QA (Default)
### Safe Refactor Loop (Behavior First)
- Establish baseline: get `main` green; reproduce the behavior you must preserve.
- Define invariants: inputs/outputs, error modes, permissions, data shape, performance budgets.
- Add a safety net: write characterization/contract/integration tests around the boundary you will touch.
- Create seams: introduce injection points/adapters to isolate side effects and external dependencies.
- Refactor in micro-steps: one behavior-preserving change at a time; keep diffs reviewable.
- Prove: run the smallest rele...
Details
- Author
- vasilyu1983
- Repository
- vasilyu1983/AI-Agents-public
- Created
- 9 months ago
- Last Updated
- 1 weeks ago
- Language
- Python
- License
- MIT
Integrates with
Similar Skills
Semantically similar based on skill content — not just same category
Code & Development Listed
safe-refactor
Use when restructuring, cleaning up, or reorganizing existing code without changing its behavior. Enforces a test safety net before touching anything and proof that behavior was preserved.
1 Updated yesterday
suleymanbyzt Code & Development Listed
safe-refactoring
Restructure code without changing behavior, verified by tests at every step.
2 Updated 2 weeks ago
varunk130 Code & Development Listed
safe-refactoring
Use when restructuring, renaming, moving, or extracting code that already works — before making the first edit
2 Updated 3 weeks ago
yuchi-chang