框架内部
Refactor
Restructure code architecture without changing external behavior. Supports 4 scopes: Single File, Module, Cross-Module, Architecture. Patterns: Extract, Inline, Encapsulate, Rename, Move, Strangler Fig, Branch by Abstraction. TDD enforced with revert on test failure. Mikado Method for complex dependencies. Auto-detects stack skills (Django, React, Spring, Symfony, Tailwind). Use when: restructuring code, improving architecture, reducing technical debt. Triggers: refactor, restructure, extract, reorganize code, reduce complexity. Not for: adding features (use /implement), fixing bugs (use /debug).