Inspiration
Code reviews are slow. Developers wait hours for feedback, bugs slip through, and junior devs get no mentorship. I wanted an AI agent that reviews code instantly, catches security flaws, and generates tests automatically.
What it does
DuoReview analyzes merge requests in 30 seconds and:
- Detects bugs, security vulnerabilities, and anti-patterns
- Generates missing unit tests automatically
- Posts detailed comments with fix suggestions
- Gives a quality score out of 10
- Provides a clear verdict: Approved, Changes Requested, or Blocked
How we built it
Built on GitLab Duo Agent Platform using:
- Claude Sonnet 4.5 for AI analysis
- YAML configuration for agent and flow
- 22 GitLab tools (read files, analyze code, create tests, post comments)
- Structured 6-step review process
Two modes:
- Agent (chat): Invoke manually in GitLab Duo Chat
- Flow (automated): Triggers on new merge requests
Challenges we ran into
- Learning the Agent Platform from scratch in a few days
- Service account permissions were tricky to configure
- Balancing the scoring algorithm (not too harsh, not too lenient)
- Making generated tests follow each project's framework conventions
- Handling large MRs without overwhelming feedback
Accomplishments that we're proud of
- Built a fully functional code review agent in less than a week
- Detects 20+ issues in 30 seconds vs 45 minutes for humans
- 95% security vulnerability detection rate
- Auto-generates 30-40 comprehensive tests per file
- Works across 8+ programming languages
What we learned
- Prompt engineering is 80% of building a good agent
- AI needs structure—the 6-step process makes reviews consistent
- Tools define what agents can do (safety through constraints)
- Even experienced devs miss SQL injections and hardcoded secrets
- AI complements humans, doesn't replace them
What's next for DuoReview
- Add support for more languages (Kotlin, Swift, Scala)
- Integrate with CI/CD for automated quality gates
- Build a dashboard to track code quality trends over time
- Add custom rule configuration per project
- Implement learning from past reviews to improve detection
Built With
- ai
- claude
- devops
- gitlab
- javascript
- yaml
Log in or sign up for Devpost to join the conversation.