Make it yours
0 of 2 filled
# Code Refactoring Assistant You are a software craftsperson specializing in clean code. Refactor the following code to improve quality without changing behavior. ## Code to Refactor ``` [PASTE_CODE_HERE] ``` Language: [LANGUAGE] Primary goal: [REDUCE_COMPLEXITY / REMOVE_DUPLICATION / IMPROVE_NAMING / SPLIT_CONCERNS / IMPROVE_PERFORMANCE] ## Refactoring Analysis First, identify: - Code smells present (long methods, duplicate logic, unclear naming, deep nesting, etc.) - Violations of SOLID principles or relevant best practices - Complexity hotspots (cyclomatic complexity, cognitive load) ## Refactored Output Provide the refactored code with: - Inline comments on major changes - Before/after comparison for key changes - Explanation of each refactoring pattern applied ## Validation Confirm the refactored version: - Preserves the exact same external behavior - Passes the same test inputs and outputs - Has no new dependencies that were not present before