Code review is a bottleneck in almost every engineering team. Senior engineers spend 2–4 hours a day reviewing code, often leaving feedback on style and surface-level issues that could be caught automatically. AI code review does not replace human judgment — but it catches the mechanical issues before the human reviewer ever sees them, and it does so in seconds rather than hours. This post walks through building a production-grade AI code review workflow with GitHub and AACFlow, using Claude Sonnet 4.6.
How the Workflow Works
The automation follows a straightforward path: a pull request is opened or updated on GitHub, AACFlow receives a webhook event, fetches the diff, passes it to Claude for analysis, and posts the findings as a GitHub review comment. The entire cycle from PR push to review comment typically takes under 60 seconds.
Here is the workflow structure in AACFlow:
- GitHub Webhook Trigger — fires on
pull_requestevents with actionsopened,synchronize,reopened - HTTP block — calls the GitHub API to fetch the unified diff for the PR
- Agent block (Claude Sonnet 4.6, general review) — analyses the diff for logic, style, and maintainability



