What problem does it solve? After a coding session, modified Python files often accumulate dead code, unused imports, overly complex conditionals, and inconsistent style. Manually reviewing and cleaning each file is tedious and error-prone, and skipping cleanup leads to technical debt and failing lint or typecheck pipelines. ## Core Features & Use Cases - Automatic target detection: Identifies Python files changed in the current git session (or accepts an explicit file list) so only relevant code is touched. - Minimal-diff refactoring: Removes dead code and unused imports, simplifies conditionals with early returns, converts verbose loops to comprehensions, adds type annotations, and enforces logging best practices — all without changing behavior. - Verification loop: Runs task format && task lint && task typecheck after edits and fixes any remaining issues. - Use Case: After implementing a feature across several modules, invoke the cleanup to strip leftover debug prints, split an oversized function, and confirm the codebase still passes lint and type checks before committing. ## Quick Start Ask the assistant to clean up the Python files modified in the current session, or pass specific file paths to refactor only those files.