This article challenges traditional code review practices, particularly in light of AI's increasing role in code generation. It advocates for shifting critical feedback and knowledge transfer left in the development lifecycle, proposing alternatives like pair programming, collective design sessions, and automated checks to improve architectural alignment and team understanding, rather than relying solely on post-implementation pull requests.
Read original on Martin FowlerThe article by Martin Fowler's colleague, Rachel Laycock, argues that the rise of AI-generated code necessitates a re-evaluation of the traditional code review process. With AI significantly increasing the volume of code produced, the human review bottleneck becomes unsustainable. The core premise is that many objectives commonly attributed to code review, such as knowledge transfer, architectural alignment, and quality assurance, can be achieved more effectively and earlier in the development process.
Traditionally, code review has served multiple purposes: bug detection, security checks, architectural alignment, mentoring, and knowledge sharing. However, the article highlights the inefficiency of using pull requests as the primary mechanism for these, especially when feedback occurs after significant implementation effort. This late-stage feedback can lead to wasted work and bottlenecks, hindering productivity and timely delivery.
The AI Challenge
AI agents can produce code at a much higher velocity than humans. If every line of this AI-generated code still requires human inspection via traditional code review, the development process becomes severely bottlenecked, negating the productivity gains of AI.
A central theme is to "shift the judgment left," meaning valuable feedback loops should occur earlier. This involves adopting practices that foster collaboration and validation before code is finalized. The goal is to move beyond simply reviewing diffs and instead ensure engineers understand the broader system and design decisions.
The article proposes a model of "review by exception." Instead of mandatory human review for every change, focus human attention on high-impact areas where judgment is critical. Examples include fundamental architectural changes, code crossing sensitive security boundaries, changes with a large blast radius, or unfamiliar parts of critical systems. This approach leverages human expertise where it adds most value, rather than as a blanket quality gate.
Ultimately, AI's ability to rapidly generate code exposes the limitations of traditional code review. It forces organizations to question why essential conversations are delayed until the review stage and encourages a proactive, collaborative approach to system design, quality, and knowledge management.