Code reviewer
Review GitHub pull requests locally with AST rules, YAML packs, and graph-backed cross-module checks — ranked #1 on a 50-PR offline benchmark, ~20% ahead of the nearest competitor.
Memtrace reviews GitHub pull requests using the same local code graph your agents query while coding. Analysis is deterministic — AST detectors, YAML rule packs, optional graph-backed cross-module checks — with no LLM in the review path. Post findings to GitHub, watch the PR for @memtrace commands, and optionally let a local headless agent apply @memtrace fix this.
Overview#
The hosted Memtrace service does not run fixes and does not need your repo path — it mints GitHub App installation tokens and optionally relays @memtrace comments to your local process.
Quick start#
# Index the repo if needed memtrace index . # Pick the headless agent for @memtrace fix this (once per machine) memtrace code-review setup git checkout -b feat/my-change # … make changes, commit, push … gh pr create --fill memtrace code-review \ --pr https://github.com/OWNER/REPO/pull/123 \ --post \ --watch \ --repo-root "$PWD"
Preview without posting: omit --post. Keep a local Memtrace owner running while you expect watched commands to execute: memtrace start, a headless daemon, or an active memtrace mcp session.
With the memtrace-code-review skill installed, ask your agent in plain language: "Review this PR with Memtrace and post findings." The skill routes to the MCP review tool instead of manually reading diffs.
What runs where#
| Part | Where | What it does |
|---|---|---|
| Review engine | Your machine | Reads PR diff, local checkout, AST rules, YAML rules, indexed graph. |
| GitHub App | GitHub + Memtrace auth | Posts review comments; reads PR replies for @memtrace commands. |
| Watch loop | Your machine | Executes queued @memtrace commands from PR comments. |
| Fix agent | Your machine | Applies @memtrace fix this in a temporary PR checkout when a supported agent is configured. |
--pr mode needs memtrace auth login to exchange your session for a short-lived installation token. Local --diff and --base/--head modes never contact GitHub — ideal for CI. Full flag reference: memtrace code-review.

GitHub @memtrace commands#
When a PR is watched (--post --watch), comment on the PR or reply to a Memtrace inline review.
| Command | Use when | Notes |
|---|---|---|
| @memtrace review / rerun | Fresh review after new commits | Posts a new review if findings remain |
| @memtrace explain | Short explanation of a finding | Reply to the inline Memtrace comment |
| @memtrace ignore | Finding not useful for this PR | Suppresses that finding in future reviews |
| @memtrace fix this | Local agent applies a narrow fix | Uses memtrace code-review setup agent; same-repo PR branches only |
| @memtrace merge | Ask GitHub to merge | Branch protection and checks still apply |
Memtrace reacts with 👀 when a command is picked up, removes it when done, then adds 👍 or 😕. Force a sync with memtrace pr sync.
Automatic fixes#
memtrace code-review setup # or: memtrace code-review setup --agent codex|claude|cursor|gemini|auto memtrace code-review --pr <URL> --post --watch --repo-root "$PWD" # then reply to an inline comment: @memtrace fix this
Memtrace checks out the PR branch in a temporary directory, runs the configured headless agent on one finding, commits, and pushes — your active working tree is untouched. Custom adapters: memtrace code-review setup --command "/path/to/wrapper".
| Capability | Claude | Codex | Cursor | Gemini | Other MCP agents |
|---|---|---|---|---|---|
| Skills + MCP review | ✓ | ✓ | ✓ | ✓ | ✓ |
| review / rerun / explain / ignore | ✓ | ✓ | ✓ | ✓ | ✓ |
| Automatic fix this | auto | auto | after login | auto | custom adapter |
Offline benchmark#
On a 50-PR offline code-review corpus (golden comments across Sentry, Grafana, Keycloak, Cal.com, and Discourse PRs), Memtrace ranks #1 by 3-judge mean F1. Judges: GPT-5.2, Claude Sonnet 4.5, and Claude Opus 4.5.
| Rank | Tool | 3-judge mean F1 |
|---|---|---|
| 1 | Memtrace | 0.7268 |
| 2 | Cubic v2 | 0.6077 |
| 3 | Qodo Extended v2 | 0.5546 |
| 4 | Augment | 0.5214 |
| 5 | Qodo Extended Summary | 0.4960 |
| 6 | Mergemonkey | 0.4691 |
| 7 | Qodo v22 | 0.4686 |
| 8 | Qodo v2 | 0.4650 |
| 9 | Bugbot | 0.4438 |
Against Cubic v2 (second place): Memtrace 0.7268 vs Cubic 0.6077 — an absolute lead of +0.119 F1 and a relative lead of +19.6% (~20% higher quality on this offline benchmark). Machine-readable snapshot: benchmarks/code-reviewer-offline-results.json in the Memtrace repository.
--review-mode strict (default) keeps benchmark-safe, high-precision findings. --review-mode online adds evidence-gated convention-drift detectors that read live files at --repo-root — useful in production, not counted in the offline leaderboard.
What it looks for#
- AST review detectors for high-confidence bug patterns
- YAML rule packs for language and framework issues
- Cross-module graph checks when
--graph-mode strict(default) - Local repository context from the indexed Memtrace graph
It is not a generic style bot — fewer, higher-signal findings. Quality analytics (dead code, complexity, hotspots) live on Code quality & review.
What has to be running#
| Blocker | Fix |
|---|---|
| Repo not indexed | memtrace index . |
| Local checkout not on PR branch | git checkout <pr-branch> |
| PR started without --post --watch | Re-run with both flags |
| fix this finds no agent | memtrace code-review setup |
| Merge rejected | GitHub checks / branch protection — not Memtrace |
See also memtrace code-review, memtrace pr, and Local-first privacy.