Skip to main content

Run a Clean Code Review

Retrieval Prompts

  1. What makes a class too large?
  2. What is the object vs data-structure distinction trying to protect?
  3. Why are seams useful at the system level?
  4. What is the difference between a smell and a proven bug?

Review Lenses

Review one file or pull request with these lenses:

  • names and expressiveness
  • function responsibility
  • side effects and error handling
  • test clarity
  • class cohesion
  • boundary leakage
  • duplication and heuristic smells

Common Mistake Check

Do not fill the review with low-value style nits while ignoring responsibility and boundary problems.

Do not call something "unclean" without naming the specific heuristic behind the concern.

Do not recommend abstraction unless you can explain what repeated pressure it resolves.

Mini Application

Write a one-page review memo with:

  • the top three maintenance risks
  • the heuristic label for each risk
  • one concrete next refactor for each
  • one issue you chose not to fix yet and why

Evidence Check

You are done only when:

  • your feedback is prioritized
  • each finding is tied to a concrete risk
  • at least one recommendation is small enough to implement immediately