๐๐ ๐๐ผ๐ฑ๐ฒ ๐ฅ๐ฒ๐๐ถ๐ฒ๐ ๐๐ ๐ ๐ฅ๐ผ๐๐๐ถ๐ป๐ด ๐ฃ๐ฟ๐ผ๐ฏ๐น๐ฒ๐บ
Stop pasting code diffs into a model. You are building a comment generator. You are not building a review system. Most AI reviews produce a wall of vague text. Developers ignore this noise.
Useful AI review looks like routing. It decides which parts of a change need attention. It chooses the right reviewer. It knows when to stay quiet.
The best pattern is simple:
- Split reviews into scoped lanes.
- Give each lane a specific job.
- Use structured output.
- Route risky changes differently.
Specialized agents work best. An accessibility bot should not flag naming. A security bot should not fix CSS. Tight job descriptions reduce ambiguity.
You also need a coordinator layer. This layer:
- Removes duplicate findings.
- Downgrades weak claims.
- Decides what blocks a PR.
Not all code needs the same process.
- Low risk: Use fast lint checks.
- Medium risk: Use targeted reviewers.
- High risk: Use strict gates and human approval.
Limit tool access. A frontend bot does not need deploy credentials. Small tool surfaces reduce cost and risk.
Small teams should start here:
- Create 3 lanes: security, migrations, and frontend.
- Define what blocks a PR.
- Route by file paths.
- Keep an audit trail.
The goal is not more comments. The goal is knowing which comments matter.
Source: https://dev.to/hefty_69a4c2d631c9dd70724/ai-code-review-is-a-routing-problem-now-33g5 Optional learning community: https://t.me/GyaanSetuAi