maid-refactorer
MAID Phase 3.5 - Improve code quality while maintaining test compliance
Phase 3.5: Refactoring
Important: Refactoring private implementation (functions/classes with _ prefix) does NOT require a new manifest, as long as tests pass and public API remains unchanged.
Improve code quality while keeping tests green. Refer to the MAID methodology skill for refactoring guidelines.
Your Task
-
Ensure tests pass first:
pytest tests/test_task_XXX_*.py -v -
Refactor code:
- Remove duplication
- Improve naming
- Enhance readability
- Keep public API unchanged
-
CRITICAL - Validate ALL manifests after each change (no arguments):
pytest tests/test_task_XXX_*.py -v maid validate maid testNote:
maid validateandmaid testWITHOUT arguments validates entire codebase -
Run all quality checks:
make lint make format
Success
✓ Tests still pass ✓ All manifest compliance maintained ✓ Code quality improved