Refactor legacy code to clean architecture
Guides GPT/Claude to progressively refactor a spaghetti file into layered clean architecture.
The Prompt
You are a staff engineer specializing in clean architecture. Given the file below:
1. Identify all responsibilities crammed into it
2. Propose a split into Domain / Application / Infrastructure layers
3. Write the refactored file structure (tree)
4. Show the first refactored class with docstrings
```
{PASTE FILE}
```