尚未检测到更新。GitHub 发布版本后会显示在这里。
SystemGroup's Code Review Agent: Smith began as an Agent, an AI program in the Matrix programmed to keep order within the system by terminating human simulacra that would bring instability to the simulated reality, as well as any rogue programs that no longer serve a purpose.
翻译准备中
正在加载完整 README。
查看完整 README ↗An AI reviewer for GitLab merge requests that reads your repository, not just the diff.
One specialist agent per changed file, a real checkout of the branch under review, and a comment pipeline built to post fewer, better findings.
Quickstart · How it works · Configuration · Analytics · Contributing
Most AI reviewers see a diff and guess. Their most common false positives are exactly the ones a diff produces: "this symbol is undefined" (it is defined in a file the diff does not show), "this method is never implemented", "this variable is unused". Nobody reads the tenth wrong comment.
CodeReviewAgent is built around the opposite assumptions:
read_file, grep
and glob. "Is this defined anywhere?" becomes a question it can answer.ai-reviewed, plus a review effort::N/5 estimate of how hard the MR is for a human to review.Re-running on a new push reviews only the commits since the last review, and never re-posts a finding that is already on the merge request.
merge request ──► fetch diff (GitLab API) ──► shallow checkout of the source branch
│
review profile (YAML) ──► classify each changed file
│
┌───────────────────────────────┼───────────────────────────────┐
service reviewer sql reviewer test reviewer …
(read · grep · glob) (read · grep · glob) (read · grep · glob)
└───────────────────────────────┼───────────────────────────────┘
▼
in-diff gate ─► rank & purge false positives ─► restore severities ─► de-duplicate ─► cap
│
inline comments · summary · labels
file_types rules
(a deterministic match on file names, no LLM). A file matching no rule is skipped.
Go files that embed SQL can additionally be routed to the SQL reviewer.(file, reviewer) pair becomes an independent agent with its own
context, pulled from a work queue by a pool of workers. Reviewers are read-only: they
can read and search the checkout, but writes are refused and there is no shell.Eleven reviewers ship built in: service_reviewer (technical quality), service_business_reviewer
(does the code do what the ticket asked), sql_reviewer, test_reviewer, e2e_reviewer
(browser end-to-end specs), typescript_reviewer,
html_reviewer, scss_reviewer, dataview_reviewer, pbook_reviewer (message catalogues)
and rules_reviewer (the .aid house rules the other reviewers read).
You need a GitLab personal access token with api scope, and a key for any
OpenAI-compatible LLM endpoint (OpenRouter works out of the box).
git clone https://github.com/systemgroup/codereviewagent.git
cd codereviewagent
cp .env.example .env # set 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"
Add a job to the project you want reviewed:
ai-review:
stage: test
image: ghcr.io/systemgroup/codereviewagent:latest # or your own build
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"
Put DEFAULT_LLM_API_KEY, DEFAULT_LLM_MODEL, GITLAB_URL and GITLAB_TOKEN in
Settings → CI/CD → Variables (masked). The token needs api scope, which also covers
the read-only clone.
docker compose up -d # reviewer web UI on :5000, analytics collector on :8000, PostgreSQL
以上为 README 的开头部分。其余内容请阅读原文。 查看完整 README ↗