crefactor

Orchestrate checkpointed refactors with test-driven verification and audit trails.

65|2|Updated Mar 27, 2026
One-click install
npx skills add https://github.com/joshft/correctless --skill crefactor
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: crefactor
Source: https://github.com/joshft/correctless/tree/main/correctless/skills/crefactor
Command: npx skills add https://github.com/joshft/correctless --skill crefactor

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill orchestrates end-to-end, safe refactors with test-driven verification to preserve behavioral contracts, ensuring changes are incremental and auditable.

Core Features & Use Cases

  • Progressive, checkpointed refactor workflow with mandatory progress visibility.
  • Baseline capture and characterization tests to define the current behavioral contract.
  • Phase-based execution with dedicated refactor and verification agents, plus artifact logging in .correctless directories.
  • QA review and final verification to guard against behavioral drift.
  • Clear audit trail for intent, plan, and results.

Quick Start

Run /crefactor to begin a phased refactor workflow on the current branch.

Frequently Asked Questions about crefactor

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I safely execute a large codebase refactor without breaking existing behavior?

A safe codebase refactor requires test-driven verification to preserve behavioral contracts, using baseline capture, checkpointed phased execution, and audit trails to prevent behavioral drift.

What are characterization tests and when do I need them for a phased refactor?

Characterization tests define the current behavioral contract before changes. You need them during a phased refactor to establish baseline behavior and guard against behavioral drift across execution phases.

How do I add an audit trail to my code refactoring workflow?

Add an audit trail to refactoring workflows by logging intent, plans, and results as artifact logs within dedicated directories, enforcing traceable changes through mandatory phase checkpoints and QA reviews.

Can I run phased refactors with checkpoints on my current branch?

Yes, you can run a phased refactor with checkpoints on your current branch. The workflow imposes dedicated refactor and verification agents, mandatory phase gates, and artifact logging in local directories.

What is the best way to prevent behavioral drift during architectural changes?

The best way to prevent behavioral drift during architectural changes is applying test-driven verification with baseline capture, characterization tests, and final QA review to ensure original behavior is preserved.