Overview

RoboRev is a local daemon and CLI tool written in Go that provides continuous, automated code review for AI coding agents. It installs a post-commit git hook that triggers background reviews on every commit, surfaces findings in an interactive TUI, and can even auto-fix issues through an agentic feedback loop. The project targets a real and growing pain point: when AI agents generate code at high velocity, the lack of automated review creates accountability gaps where bugs and antipatterns compound unchecked.

The tool supports ten different coding agents (Codex, Claude Code, Gemini, Copilot, OpenCode, Cursor, Kiro, Kilo, Droid, and Pi) and delegates review work to whichever agent is installed. It uses a local SQLite database for persistence, with optional PostgreSQL sync for multi-machine setups. The architecture is well-suited for single-developer or small-team use of AI coding tools where a hosted CI/CD review pipeline is overkill or unavailable.

Why it matters: As AI-generated code becomes commonplace, tools that provide automated quality gates specifically designed for agent workflows are essential. RoboRev fills this niche by running locally, requiring zero infrastructure, and integrating directly into the git commit cycle that agents already use.

Key Findings

Architecture

RoboRev follows a clean daemon + thin CLI architecture:

  • CLI layer (cmd/roborev/): Cobra-based command registration. Most commands are thin HTTP clients that delegate to the daemon. Key commands include review, fix, refine, analyze, tui, and daemon.
  • Daemon/HTTP API (internal/daemon/server.go): Long-lived control plane using Huma (HTTP API framework) with SSE for real-time event streaming. Supports both TCP and Unix domain socket transports with systemd socket activation.
  • Worker pool (internal/daemon/worker.go): Configurable worker pool that dequeues jobs, builds prompts, executes agents, and persists results. Includes job cancellation, agent cooldown on quota exhaustion, and output buffering.
  • Storage (internal/storage/): SQLite via modernc.org/sqlite (pure Go, no CGo) with WAL mode and 30-second busy timeout. Well-indexed schema with migrations handled inline. Optional PostgreSQL mirror via sync worker for team use.
  • Agent adapters (internal/agent/): Interface-based registry pattern. Each agent (Claude, Codex, Gemini, Copilot, etc.) implements the Agent interface with Review(), WithReasoning(), WithAgentic(), and WithModel(). Also includes an ACP (Agent Client Protocol) adapter using coder/acp-go-sdk.
  • Prompt builder (internal/prompt/prompt.go): Constructs structured review prompts with diff content, commit metadata, historical review context, and project-specific guidelines. Handles oversized diffs via file snapshots.
  • TUI (cmd/roborev/tui/): Bubble Tea-based terminal UI with vim-style navigation, real-time review queue, filtering, and streaming output display.

The separation between the daemon (background processing) and CLI (user interaction) is well-executed. The daemon does not modify the user’s working tree during background reviews — only foreground fix and refine commands touch files, and refine uses isolated git worktrees for safety.

Code Quality

Strengths:

  • The AGENTS.md file is excellent — it provides a comprehensive codebase navigation guide, package map, command map, change impact guide, and runtime notes. This is a model for how to document a Go project for AI agent (and human) contributors.
  • The agent interface is clean and extensible. Adding a new agent requires implementing a small interface and registering it. The fallback chain and alias resolution are well-designed.
  • SQLite migrations are thorough and handle edge cases (missing columns, constraint updates via table recreation, foreign key verification post-migration).
  • The config system supports layered resolution: CLI flags → repo config (.roborev.toml) → global config (~/.roborev/config.toml) → defaults.
  • Extensive use of sync.Once for daemon startup/shutdown, atomic operations for counters, and mutex-protected maps for running jobs.

Concerns:

  • The Config struct in config.go is enormous (100+ fields) with extensive per-workflow, per-reasoning-level agent/model configuration. This creates a combinatorial explosion of config keys (review_agent_thorough, fix_model_fast, etc.) that will be difficult to maintain. The config alone spans over 2,500 lines.
  • The migration logic in db.go is long and repetitive. Each new column addition follows the same PRAGMA table_info → ALTER TABLE pattern. A migration framework would reduce boilerplate.
  • The server file (server.go) is 2,760 lines — far too large for a single file. The route handlers, enqueue logic, and server lifecycle should be split.

Security

RoboRev shows security awareness in several areas:

  • XML escaping in prompt construction prevents commit metadata injection from breaking prompt structure.
  • Proxy URL restrictions for Claude Code: no embedded credentials, HTTP only for loopback, ANTHROPIC_API_KEY stripped from child environments to prevent credential leakage to proxies.
  • Unix socket permissions validated to be owner-only (0600/0700).
  • Request body size limits on the enqueue endpoint.
  • Path traversal protection in the ACP agent (ErrPathTraversal).
  • Worktree isolation: git hooks suppressed in worktrees via core.hooksPath=/dev/null to prevent unintended hook execution.
  • CVE-2022-39253 mitigation: file protocol for git submodules restricted to top-level only.

The README explicitly warns that RoboRev is designed for trusted codebases and recommends sandboxing for untrusted code (e.g., open-source contributions). This is honest and appropriate — the review prompt includes diff content, so prompt injection via malicious commit messages is a real risk when reviewing untrusted code. The allow_unsafe_agents flag is opt-in and defaults to false.

Gaps:

  • No TLS on the daemon’s HTTP API (though it defaults to localhost-only).
  • No authentication on the daemon API — any local process can enqueue reviews, cancel jobs, etc. This is acceptable for the local-only use case but worth noting.
  • API keys stored in TOML config files are plaintext. The sensitive:"true" tag exists but appears to be metadata-only, not encryption.

Testing

The project has substantial test coverage — over 150 test files across all packages. Notable areas:

  • Agent adapter tests for every supported agent (Codex, Claude, Gemini, Copilot, etc.)
  • Comprehensive storage tests including migration tests, filter tests, and PostgreSQL integration tests
  • Daemon server tests covering routes, jobs, streaming, and auto-design workflows
  • Prompt builder tests including golden file tests
  • E2E tests (e2e_test.go)
  • Integration tests gated behind build tags (integration, postgres, acp)

The Makefile provides clear targets: test (unit), test-integration, test-postgres, test-acp-integration, and test-all. The ACP integration tests are particularly well-structured with configurable adapter commands and models.

Dependencies

The dependency choices are pragmatic and well-maintained:

  • Cobra for CLI: standard Go CLI framework
  • Bubble Tea + Lipgloss for TUI: the dominant Go TUI stack
  • Huma v2 for HTTP API: modern OpenAPI-first framework
  • modernc.org/sqlite: pure Go SQLite (no CGo) — good for cross-platform builds
  • pgx/v5 for PostgreSQL: high-performance Postgres driver
  • coder/acp-go-sdk for Agent Client Protocol: standardized agent communication
  • sourcegraph/go-diff for diff parsing

No dependency red flags. All are well-known, actively maintained libraries.

Developer Experience

  • Installation via shell script, Homebrew, PowerShell, or go install
  • Pre-commit hooks via prek with golangci-lint
  • Clear AGENTS.md for codebase navigation
  • Embedded skill files for Codex and Claude agents
  • Shell scripts for ACP agent wrapper, changelog generation, and releases
  • systemd unit/socket files for daemon management

Assessment

Strengths

  1. Purposeful design: RoboRev solves a specific problem (AI agent code accountability) with a focused, well-scoped solution. It doesn’t try to be a general CI/CD tool.
  2. Zero-infrastructure requirement: Runs entirely locally with SQLite. No hosted service needed. The optional PostgreSQL sync is a nice addition for teams.
  3. Multi-agent support: Ten supported agents with auto-detection, fallback chains, and per-workflow configuration shows mature integration design.
  4. Safety-first defaults: Background daemon doesn’t touch working tree. Fix operations use isolated worktrees. Unsafe features are opt-in.
  5. Excellent codebase documentation: AGENTS.md is one of the best agent-oriented codebase guides I’ve seen. The change impact guide is particularly valuable.
  6. Active development: The project has comprehensive features (auto-fix, refine loop, analysis types, compact verification, CI integration) that indicate iterative, real-world usage driving development.

Concerns

  1. Config complexity: The configuration surface area is very large. Per-workflow, per-reasoning-level agent/model pairs create a combinatorial explosion that will be hard to document, test, and maintain. A simplified config with sensible defaults and fewer overrides would improve usability.
  2. Large files: server.go (2,760 lines), config.go (2,523 lines), and db.go (1,825 lines) are well beyond maintainable sizes. Refactoring these into focused sub-packages would improve readability and review velocity.
  3. No structured review output: Reviews are stored as raw text strings. There’s no structured schema for findings (severity, file, line, description). The verdict field (pass/fail) is parsed from text, suggesting the review format depends on prompt engineering rather than structured output.
  4. Single-machine bias: The architecture is optimized for single-machine use. While PostgreSQL sync exists, the daemon lifecycle (zombie cleanup, PID file, runtime info) is inherently local-first. Scaling to team use would require significant architectural changes.

Recommendations

  1. Simplify config: Replace the per-reasoning-level matrix with a tiered approach (e.g., review_tier = "fast" | "standard" | "thorough" that maps to agent/model pairs). The current 100+ config fields are overwhelming.
  2. Split large files: Break server.go into server.go (lifecycle), routes.go (API registration), handlers.go (request handlers). Break config.go into config.go (core), resolve.go (resolution logic), validate.go.
  3. Adopt a migration framework: Replace the hand-rolled migration system with a lightweight version-tracked migration system to reduce boilerplate and improve reliability.
  4. Structured review output: Consider parsing agent output into structured findings with severity, file path, line range, and description. This would enable better filtering, deduplication, and machine-readable output formats.
  5. Add daemon API authentication: Even for local use, a simple token-based auth would prevent accidental interference from other local processes.