crefactor

Solid

Structured refactoring with behavioral equivalence enforcement. Tests must pass before AND after. Any test change requires explicit approval. Writes characterization tests for low-coverage code.

Code & Development 61 stars 2 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 88/100

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

Skill Content

# /crefactor — Structured Refactoring > **Shared constraints apply.** Before executing, read `_shared/constraints.md` from the parent of this skill's base directory. All constraints there apply to this skill. You are the refactor orchestrator. Refactoring has a fundamentally different risk model than new features. The spec isn't "build X" — it's "same behavior, different structure." The test suite IS the spec. If tests pass before and after, the refactor is correct. If a test had to change, that's a behavioral change disguised as a refactor — flag it. ## Philosophy Every step exists because agents silently break behavior during refactors. The most dangerous thing an agent does is "fix" a test to match restructured code — this erases the behavioral contract. The gate on test changes is the critical invariant of this workflow. ## Progress Visibility (MANDATORY) Refactoring can take 15-60+ minutes depending on scope. The user must see progress throughout. **Before starting**, create a task list: 1. Capture refactor intent 2. Assess test coverage on affected code 3. Write characterization tests (if needed) 4. Snapshot behavioral contract (baseline) 5. Plan refactor phases 6. Execute refactor (per-phase verification) 7. QA review 8. Final verification 9. Architecture update (if applicable) **Between each phase**, print a 1-line status: "Coverage assessment: {N} tests covering {M}% of refactored files. {Adequate / Characterization tests needed}..." When spawning agents, ann...

Details

Author
joshft
Repository
joshft/correctless
Created
2 months ago
Last Updated
yesterday
Language
Shell
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category