Orchestrate multi-agent code reviews from CLI or dashboard
branch-review coordinates code review agents and static analysis tools into a unified workflow. Run reviews from the CLI with reviewctl, or manage them visually through the web dashboard.
Two interfaces:
- reviewctl CLI - Orchestrate reviews from terminal
- Web Dashboard - Visual review management at localhost:3000
- 9 CLI commands for complete review workflow
- Multi-agent support (code-reviewer, code-simplifier, sql-safety-hunter)
- Static analysis integration (biome, ruff, pyrefly)
- Diff-based review scope for branches and isolated worktrees
- Scoped static-gate requests with explicit applicability states (
PENDING,PENDING_NO_CONFIG,SKIP,NOT_APPLICABLE) - Plan-based reviews with drift detection
- Priority findings: P0 (blocking), P1 (important), P2 (minor)
- Real-time dashboard with verdict visualization
- Post-PR learning hook that extracts reusable decision skills into
skills/learned/
bun install # Install dependencies
bun run dev # Start dashboard at localhost:3000
bun reviewctl help # Show CLI commandsbun run lint # ESLint repo gate
BR_BIOME_SINCE=origin/main bash scripts/run-biome-check.sh # Biome CLI on changed JS/TS/JSON
BR_DIFF_RANGE=origin/main...HEAD bash scripts/run-ruff-check.sh # Ruff on changed Python files
bun run audit:deps # Dependency vulnerability auditrun-biome-check.sh uses Biome CLI (biome check --changed --since=<ref>) and validates the --since ref before execution.
| Command | Purpose |
|---|---|
init |
Create review run on review/* branch |
explore context |
Gather repository context |
explore diff |
Analyze branch changes |
plan |
Generate review plan |
run |
Create handoff requests for agents |
ingest --agent <name> |
Capture agent output |
status |
Show run progress and status |
verdict |
Generate final PASS/FAIL verdict |
merge |
Merge branch after PASS |
cleanup |
Remove run artifacts |
init - Initialize review run
reviewctl init --create --base main --target feat/my-feature
reviewctl init --create # base=auto, target=HEAD
reviewctl init --branch feat/x # deprecated, use --targetstatus - Show run status
reviewctl status # current active run
reviewctl status --last # most recent run
reviewctl status --run-id run_20260227_abc123
reviewctl status --json # JSON outputrun - Generate agent handoffs
reviewctl run # fail if drift detected
reviewctl run --allow-drift # override drift (debug only)
reviewctl run --max-agents 2Notes:
reviewctlevaluates branch diff / worktree diff scope, not ad-hoc file lists.ruffshould be executed diff-scoped viaBR_DIFF_RANGE=<base>...HEAD bash scripts/run-ruff-check.sh.pytestshould not default to repo-wide execution for isolated worktrees when no scoped Python test target exists.
ingest - Capture agent/static output
reviewctl ingest --agent code-reviewer --input report.md
reviewctl ingest --static ruff --input ruff-output.txtinit → explore context → explore diff → plan → run → ingest → verdict → merge
| Method | Endpoint | Returns |
|---|---|---|
| GET | /api/review/info | API metadata (public) |
| GET | /api/review/run | Current run status |
| POST | /api/review/command | Execute reviewctl command |
| GET | /api/review/final | Final verdict JSON |
| GET | /api/review/state | Run state snapshot |
| Layer | Technology |
|---|---|
| Runtime | Bun |
| Framework | Next.js 16 (App Router) |
| Language | TypeScript 5 |
| Styling | Tailwind CSS 4 + shadcn/ui |
| State | Zustand + TanStack Query |
| CLI | Commander + Chalk |
| Database | Prisma |
| Auth | NextAuth.js |
| Validation | Zod + React Hook Form |
src/
├── app/
│ ├── api/review/ # REST endpoints
│ └── page.tsx # Dashboard UI
├── components/ui/ # shadcn/ui components
└── lib/ # Services and utilities
mini-services/reviewctl/
└── src/
├── index.ts # CLI entry
├── commands/ # Command handlers
└── lib/ # CLI utilities
Run the API as a daemon with PM2:
# 1. Create .env with your token
echo "REVIEW_API_TOKEN=your-secure-token-here" > .env
# 2. Build production bundle
bun run build
# 3. Start with PM2
pm2 start ecosystem.config.js
# 4. Save PM2 configuration
pm2 saveAPI will be available at: http://localhost:3001
Authentication: /api/review/info is public. Other /api/review/* endpoints require X-Review-Token header or review_api_token cookie.
See docs/agent-task-card.md for full API documentation.
Read these before submitting PRs:
MIT