This repo hosts roborev, a local daemon + CLI for AI-assisted code review. Use this guide to stay aligned with project conventions when reviewing code or addressing feedback.
- CLI entry point:
cmd/roborev/main.go(includes daemon viaroborev daemon run) - HTTP API:
internal/daemon/server.go - Worker pool + job processing:
internal/daemon/worker.go - SQLite storage:
internal/storage/ - Agent interface + implementations:
internal/agent/ - Config loading/agent resolution:
internal/config/config.go
Runtime:
- Daemon listens on
127.0.0.1:7373(auto-increment if busy) - Runtime info at
~/.roborev/daemon.json - DB at
~/.roborev/reviews.db(WAL mode) - Data dir override via
ROBOREV_DATA_DIR
- Keep changes simple; avoid over-engineering.
- Prefer Go stdlib over new dependencies.
- No emojis in code or output (commit messages are fine).
- Never amend commits; fixes should be new commits.
- Never push/pull unless explicitly asked.
- NEVER change git branches without explicit user confirmation. Always ask before switching, creating, or checking out branches.
- Release builds use
CGO_ENABLED=0(SQLite requires CGO locally).
- For multi-step tasks (for example: implement + commit + PR), complete the full requested sequence without stopping partway.
- Commit after completing each piece of work; do not wait to be asked.
- When committing, stage ALL modified files related to the work (including formatting-only and ancillary updates).
- Before committing, run
git diffandgit statusto verify nothing is unintentionally left unstaged.
- After any Go code changes, run
go fmt ./...andgo vet ./...before committing. - Stage any resulting formatting or vet-driven follow-up edits as part of the same commit.
- Tests should be fast and isolated; use
t.TempDir(). - Use the
agent = "test"path to avoid calling real AI agents. - Slow integration tests use
//go:build integrationand are excluded by default. - Suggested commands:
go test ./...(unit),go test -tags integration ./...(all),go build ./...,make install.
When reviewing or fixing issues:
- Focus on correctness, concurrency safety, and error handling in daemon/worker code.
- For storage changes, keep migrations minimal and validate schema/queries.
- For API changes, preserve HTTP/JSON conventions (no gRPC).
- When addressing review feedback, update tests if behavior changes.
- If diffs are large or truncated, inspect with
git show <sha>.
- Config priority: CLI flags →
.roborev.toml→~/.roborev/config.toml. - Reasoning defaults: reviews = thorough, refine = standard.
roborev refineruns agents without sandboxing; only use on trusted code.