self-review tool?

Resolved 💬 4 comments Opened May 17, 2025 by max-sixty Closed May 18, 2025

when claude has finished a task, I've often find success with starting a new claude code instance and asking it something like:

  • your goal is to review the current git diff --staged
  • the goal of the change is to complete item (2) in TODO.md
  • in particular, assess whether the diff is consistent with the coding guidelines in CLAUDE.md
  • ensure the tests are sufficient to demonstrate the change works
  • add any suggested changes or simplifications to the working tree

starting with a new context seems to help it avoid attending to overly narrow issues, and instead focus on "does it meet the goal as described". and this reduces the frequency of me being like "please read CLAUDE.md, it says not to add fallbacks like X & Y, but there are lots there"

this is somewhat consistent with the suggestion from @bcherny at https://github.com/anthropics/claude-code/issues/427#issuecomment-2731384339. there's also a suggestion in the anthropic docs to use claude to review itself

so then: would it make sense to have that as something claude can do itself? like a subtask Review which receives a more nuanced version of the above as context — it could actually write down the goal, some notes on any issues it had with the implementation — and gets back text with a review — "have you considered implementing without adding a class" / "the coding guidelines state not to use excess try/except, but the one in foo.py seems unnecessary"

claude could decide whether to call this itself, or it could trigger on the equivalent of ultrathink for when quality is more important than latency

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗