CodeReviewAgent puts a specialist agent on every changed file in a GitLab merge request, gives it a real checkout to search, and posts only the findings worth someone's time.
41 amount := order.Total - order.Refunded42+ if err := tx.Save(&refund); err != nil {43+ log.Printf("refund failed: %v", err)44+ }45 return tx.Commit()
The error from tx.Save is logged and then swallowed, so tx.Commit() commits a refund that was never written. The caller reports success while the customer isn't refunded.
return fmt.Errorf("save refund: %w", err)
A bot that sees only the diff has to guess, and its guesses produce the same false positives every time: "undefined symbol", "unused variable", "method not implemented". CodeReviewAgent is designed so it doesn't need to guess.
Each reviewer works over a checkout of the source branch, pinned to the exact commit, with read, grep and glob. "Is this defined anywhere?" becomes a question it can actually answer.
Findings pass an in-diff gate, a false-positive purge, severity checks and duplicate suppression, then a budget. Silence is a valid answer.
Which files are reviewed, by which reviewer, and under which house rules is a YAML profile, plus instruction files that live in your repository.
A re-run reviews only the commits since the last review and never re-posts a finding that's already on the merge request.
When a fix is concrete code, the comment carries an Apply suggestion block. When it isn't, the comment describes the fix instead of posting fake code.
Every comment gets 1–5 reactions. A collector turns ratings and replies into Grafana dashboards, so you can tell whether a model change made reviews better.
Deterministic where it can be, a model only where judgement is needed.
Diff from the GitLab API; a shallow checkout of the source branch.
Your profile's rules route each file to its reviewers. No LLM involved.
One agent per file and reviewer, in parallel, each with its own context.
Off-diff findings dropped, false positives purged, duplicates removed, budget applied.
Inline comments, a one-time summary, and a review-effort label.
No forking prompts. A profile says which files exist, who reviews them, and the rules your team already argues about in review.
version: 1 exclude: ["vendor/*", "*.pb.go"] file_types: # first match wins - name: sql match: ["*.sql", "migrations/*"] reviewers: [sql_reviewer] - name: service match: ["*.go"] reviewers: [service_reviewer, service_business_reviewer] instructions: sql_reviewer: | We do not use foreign keys. Primary keys are BIGINT identity.
An AI reviewer you can't measure is one you can't improve. The optional collector records every run and every human reaction, and the bundled Grafana dashboards turn that into answers.
Average rating per week (1–5)
Is the reviewer healthy? Outcomes, throughput, durations and failover, for whoever runs it.
Are the comments any good? Human ratings and replies by model, severity and project, down to the worst-rated comments.
Is the team rating? Points, badges and weekly awards, with an optional weekly Mattermost digest. Filterable by person, so it's the board you share.
Verbosity is a merge-request label, so a human can ask for more and re-run without touching CI configuration.
| Label | Posts | Budget |
|---|---|---|
| none | High severity, ranked | 10 |
review::-v | High severity, everything that qualifies | 30 |
review::-vv | High and medium, ranked | 30 |
review::-vvv | High and medium, everything that qualifies | 30 |
You need a GitLab token with api scope and a key for any OpenAI-compatible LLM endpoint.
# .gitlab-ci.yml in the project you want reviewed ai-review: image: ghcr.io/systemgroup/codereviewagent:latest variables: GIT_STRATEGY: none # the reviewer makes its own checkout rules: - if: $CI_PIPELINE_SOURCE == "merge_request_event" script: - cd /app && python main.py --gitlab-mr "$CI_MERGE_REQUEST_PROJECT_URL/-/merge_requests/$CI_MERGE_REQUEST_IID" # Settings → CI/CD → Variables: DEFAULT_LLM_API_KEY, DEFAULT_LLM_MODEL, GITLAB_URL, GITLAB_TOKEN
git clone https://github.com/systemgroup/codereviewagent.git && cd codereviewagent cp .env.example .env # DEFAULT_LLM_API_KEY, DEFAULT_LLM_MODEL, GITLAB_URL, GITLAB_TOKEN docker build -t codereviewagent reviewer docker run --rm --env-file .env codereviewagent \ python main.py --gitlab-mr "https://gitlab.example.com/group/project/-/merge_requests/42"
python -m venv venv && source venv/bin/activate pip install -r reviewer/requirements.txt -r tests/requirements.txt pytest # ~300 tests, seconds, no network cd reviewer && python main.py --gitlab-mr "https://gitlab.example.com/group/project/-/merge_requests/42"
Apache 2.0 licensed. Issues, profiles for new stacks, and pull requests are welcome.