Projects

Case study 01 / 04AI TOOLINGSide project

AI Code Review System

Nine specialised agents review every GitLab merge request in parallel. An orchestrator merges their findings into one report and drops the comments nobody would act on.

Role
Author
Team
Solo
Runs in
GitLab CI, per merge request
Models
Opus / Sonnet / Haiku
Source
Private
  1. 01Input

    Merge request diff

  2. 02Route

    Orchestrator

  3. 03Review in parallel

    Nine agents

    • React Agent
    • TypeScript Standards
    • Security Agent
    • Algorithm & Performance
    • Code Reuse
    • Styles & CSS
    • Storybook Agent
    • UX/UI Design System
    • Storybook Components Enforcer
  4. 04Output

    One report

Fig. 1How one merge request moves through the pipeline

01Problem

Reviews that developers learn to skip

In my experience, single-prompt AI reviews tend to produce vague or stylistic comments that developers learn to skip. I wanted a review step for merge requests that reports concrete, evidenced problems and stays quiet otherwise.

For each merge request the pipeline fetches the diff, routes files to specialized agents, and posts one structured comment. Every finding has to quote the changed code it refers to.

It is a tool for a GitLab merge request workflow, not part of a deployed application.

02Decisions

Architecture and decisions

Nine narrow agents instead of one broad prompt

Each agent looks at one concern only (security, performance, tests, architecture...). A narrow prompt can demand evidence for every finding, which a general "review this" prompt cannot.

A model tier per agent, not one model for everything

Agents are routed to Haiku, Sonnet or Opus depending on how much reasoning their concern needs.

An orchestrator that is allowed to delete

Agents report to the orchestrator, not to the developer. It merges duplicates and drops low-value comments, so the merge request gets one structured report.

It lives in CI, not in the editor

The pipeline runs as a GitLab CI job on the merge request, so the review lands where the team already discusses the change.

03Outcome

Outcomes and limitations

A working pipeline of Markdown prompt files and a shell pre-filter, designed to run in a GitLab merge request workflow and post one structured comment per merge request. Each report separates merge blockers from suggestions and gives severity labels and exact line references.

agents + orchestrator
9
lines of calibrated prompts
~2,900
model tiers
3

04Stack

Technologies Used

Claude API
Pattern-matching checks run on Haiku, reasoning-heavy checks on Sonnet, and orchestration on Opus.
GitLab CI
The pipeline runs as a CI job on the merge request, where the team already discusses the change.
Bash
A shell script removes generated files, lockfiles, vendored code, and unrelated changes before any agent sees the diff.
Markdown
Behavior is defined in plain Markdown prompt files that can be read and edited without a build step.
AI Code Review System | Code Nomad