# AI-assisted code review

Speedwave reviews code on pull requests and merge requests, one step in a development life cycle where a person stays accountable for every decision the AI produces. In a session you start this with Claude Code's built-in `/code-review` command; when you want the deepest local pass over a changeset instead, invoke Speedwave's own `/speedwave-code-review`, described in [built-in skills and plugins](/docs/features/built-in-skills-and-plugins/#code-review-skills).

## Where review happens

Review runs through the [GitHub](/docs/integrations/github/) and [GitLab](/docs/integrations/gitlab/) integrations, each a built-in worker with access to that service's tokens only. On GitHub, Speedwave can read a pull request's diff and files, list its commits and existing reviews, and post feedback: a general comment on the conversation with `createPrComment`, or an inline comment anchored to a line in the diff with `createPrReviewComment`. On GitLab, the equivalent tools work on merge requests: `getMrChanges` and `getMrFull` read the change, and `createMrNote` or `createMrDiscussion` post feedback, including threaded discussions.

Both integrations also give Speedwave the surrounding context a reviewer needs. It can inspect commits, compare branches, and check pipeline or workflow runs, since `listPrCommits` and `listMrPipelines` (and their neighbors) surface what changed and whether it passed CI. GitLab adds one thing GitHub's API does not offer: `getBlame` returns line-level git blame for a file, so Speedwave can trace who last touched a line before commenting on it.

## What stays under human control

Speedwave posts comments and review notes; it does not merge on its own initiative. `mergePullRequest` and `mergeMergeRequest` exist as tools, but review itself is about surfacing findings, not about approving code without a person reading it. Every credential the review relies on is scoped to one integration: the GitHub worker holds only a GitHub token, the GitLab worker holds only a GitLab token and instance URL, and neither can reach the other's service or credentials.

## Setting it up

Connect whichever platform hosts your repositories. [GitHub](/docs/integrations/github/) connects with the OAuth device flow or a manual token. [GitLab](/docs/integrations/gitlab/) works with GitLab.com or a self-hosted instance: enter your instance URL and a Personal Access Token with the `api`, `read_repository`, and `write_repository` scopes. Once connected, Speedwave can open, read, and comment on pull requests or merge requests in that project.