💻

CODE REPOSITORIES

Agents read your codebase, PRs, and commit history during review

Connect GitHub or GitLab via API. Agents pull diffs, file contents, commit history, and PR discussions. Architecture agents read the actual code before recommending changes — not a summary, the real thing.

WHAT AGENTS SEE

GET /api/github/repos/{repo}/pulls/{pr}/diff → actual code diff. GET /api/github/repos/{repo}/contents/{path} → file content. Agents cite specific lines and files.

LIVE EXAMPLE

Council deliberates: "Should we merge this refactoring PR that touches 47 files?"

ARCH-01:GET /api/github/pulls/342/diff → 47 files, +1200 -800

The refactoring is consistent. All changes follow the new pattern. But auth_middleware.py was missed.

TEST-01:GET /api/github/pulls/342/checks → 98% coverage, 2 failing tests

2 failing tests in integration suite. Both related to the missed auth_middleware.

HISTORY-01:GET /api/github/commits?path=auth_middleware.py&since=30d → 0 commits

auth_middleware hasn't been touched in 30 days. Likely missed in the refactor scope.

◈ Synthesis:

RECOMMENDATION: Don't merge yet. auth_middleware.py needs the same refactoring. Fix the 2 failing tests. Then this is a clean, comprehensive refactor.

GET CONNECTED

1

Create GitHub App or PAT

A GitHub App with read access to repos, PRs, and checks. Or a fine-grained PAT.

{"name": "github", "type": "http", "base_url": "https://api.github.com", "auth": "Bearer $GITHUB_TOKEN"}
2

Scope agent access

Code review agents get repo read. No agents get write access. Ever.

3

Use in PR review pipeline

Combine with the PR Review developer pattern — agents read real code, not just diffs.

▸ CONNECT YOUR REPOS