It started with a simple observation: our engineering teams were spending 30–40% of their review cycles on the same categories of issues — naming inconsistencies, missing error handling, and pattern violations that any automated system should catch.
The Problem with Traditional Code Review
Code review at enterprise scale isn’t just slow — it’s inconsistently slow. Senior engineers get pulled into trivial comments. Junior engineers wait days for feedback on things that could be flagged in seconds.
We needed something that could triage the mechanical issues so humans could focus on architecture, design decisions, and business logic.
The Architecture
The setup is deliberately minimal. A GitHub Actions step captures the diff on every PR, sends it to Claude with a focused system prompt encoding our internal standards, and posts structured inline comments back via the GitHub API.
import anthropic
client = anthropic.Anthropic()
message = client.messages.create(
model="claude-opus-4-6",
max_tokens=1024,
system="You are a senior engineer reviewing a pull request diff. Flag only: naming violations, missing error handling, and security issues. Be terse and specific.",
messages=[{"role": "user", "content": diff}]
)
The system prompt is the real lever — generic prompts give generic feedback. Encoding your team’s specific standards, patterns, and anti-patterns is what makes it actually useful.
What Surprised Us
The consistency was more valuable than the quality. Every PR got the same level of attention, regardless of who submitted it or when.
After three months, PR turnaround dropped by 40% across our engineering teams. More importantly, the nature of review comments shifted — reviewers started spending their time on higher-order concerns because the mechanical layer was already handled.
What Didn’t Work
The first version tried to do too much. Multi-file context, architecture suggestions, performance analysis — it produced verbose output that engineers ignored. The version that worked did one thing well: triage.
The lesson is the same one that comes up in every agentic system I’ve built: constrain the task, sharpen the prompt, and resist the urge to add features until the core loop is solid.