# AI Code Reviewer

> A CLI that reviews GitHub, GitLab or Bitbucket pull requests by running the code (imports, tests, edge cases) in a sandbox, then posts inline comments.

- Role: Creator
- Period: 2026 – now
- Type: Open source
- Status: active
- Stack: Python, LLM tool use, Docker sandbox, GitHub / GitLab / Bitbucket APIs
- Source: https://github.com/kanephamphu/code-reviewer-agent
- URL: https://phamphutai.com/projects/code-reviewer-agent/

## The problem

Most AI code reviewers only *read* the diff, so they guess. That produces confident comments about bugs that don’t exist, and misses ones that do.

## What it does

```
PR URL → fetch diff + metadata
       → git clone at the head commit
       → verify agent (LLM + sandboxed run_command tool) → structured findings
       → reconcile findings to diff lines
       → post inline comments + summary back to the provider
```

- **Verifies by execution:** the agent runs imports, tests and edge cases before claiming a bug.
- **Works with any provider:** GitHub, GitLab and Bitbucket adapters.
- **Combines deterministic and LLM checks:** static analyzers (ruff, pyflakes, codespell…) run alongside the agent.
- **Per-language playbooks:** review prompts are picked by file type and framework, and are editable.
- **Optional Docker sandbox** for running untrusted code.
