REFACTOR Workflow

Safe refactoring and code modernization

Safe refactoring
Code modernization
Pattern application
Debt reduction

Commands in this Workflow

Detailed documentation for each command including when to use it, what it's best for, and real-world examples.

/siftcoder:refactor

Auto

Refactor code safely

What It Does

Improves code structure while preserving functionality. Applies design patterns, removes duplication, enhances readability, and reduces complexity. Includes comprehensive testing to ensure behavior is preserved.

Usage

/siftcoder:refactor <target>

Parameters

targetFile, function, or component to refactor

When to Use

Reducing technical debt, improving maintainability, applying design patterns

Best For

Complex functions, duplicated code, hard-to-maintain sections

Real-World Example

/siftcoder:refactor src/services/user.ts
# Improves: Structure, readability, patterns
# Preserves: All functionality, behavior