Code Cleanup
Understand the whole product before judging its code: who uses it, what they need, its functional and non-functional goals, boundaries, supported workflows, non-goals, and pivots.
Review every relevant file in that product boundary, including cooperating repositories. Dead code often sits outside recent changes. Follow features through construction, state, persistence, protocols, deployment, recovery, tests, settings, assets, scripts, and documentation.
Look beyond unused symbols. Find code that compiles, runs, or passes tests but no longer helps the product; complete dead feature islands whose members keep one another looking alive; split-brain implementations and parallel lifecycles; half-removed features; abandoned optimizations and future-proofing; dead members hidden in large files; misleading comments; unused packages, imports, features, configuration, environment variables, defaults, and settings; and residue left by an agent's abandoned approaches.
Tests, helpers, and comments inside a dead island do not prove that it is alive. Zoom out until the product responsibility is clear, then be willing to delete the whole obsolete responsibility rather than only its obvious leaves.
When relevant, briefly check compatibility, dependency provenance, concurrent work, runtime evidence, and UI intent without turning them into a checklist.
Preserve unrelated user work and real external compatibility. Validate the surviving product with the repository's actual gates and a real boundary when compilation or mocks are insufficient.