AI Won't Replace Code Reviews, But It Can Fix Them
Blog post from Mergify
Code reviews often fail due to the lack of documented intent rather than errors in the code itself, a gap that AI-generated comments could fill to enhance the effectiveness of both human and AI reviews. The post discusses an experiment where AI tools like Claude and GitHub Copilot collaborate, with Claude providing inline comments that explain the reasoning behind code decisions, allowing Copilot to leverage this context for more insightful review suggestions. This synergy between AI tools highlights how AI-generated documentation can improve the quality of code reviews by providing the necessary context, which human reviewers often neglect to document. The author argues for the normalization of AI-written comments as part of the codebase to create a record of reasoning, improve feedback quality, and prompt necessary discussions, despite potential risks like comment decay or AI hallucinations. The conclusion suggests that incorporating AI-generated annotations could become as standard as automated tests in the future, ensuring that every review is informed and effective.