name: safe-refactor-guard description: Enforce ultra-safe refactoring rules to prevent architecture changes, over-engineering, or unintended side effects.
Safe Refactor Guard
Absolute Rules
- NO architecture changes.
- NO file moves or renames.
- NO Gradle/Podfile changes.
- NO new libraries or patterns.
- NO behavior changes unless explicitly requested.
Workflow
- Identify the smallest possible change.
- Apply refactor only within the given function/file.
- Keep logic and outputs identical.
- Explain what changed and why it is safe.
Output format
- What was refactored
- Why it is safe
- Files touched (should be minimal)