Skip to content

Latest commit

 

History

History
65 lines (48 loc) · 2.81 KB

File metadata and controls

65 lines (48 loc) · 2.81 KB

AGENTS.md

Purpose

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.

Project Orientation

  • CLI entry point: cmd/roborev/main.go (includes daemon via roborev 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

Development Preferences

  • 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).

Workflow + Commits

  • 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 diff and git status to verify nothing is unintentionally left unstaged.

Go Change Requirements

  • After any Go code changes, run go fmt ./... and go vet ./... before committing.
  • Stage any resulting formatting or vet-driven follow-up edits as part of the same commit.

Testing

  • 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 integration and are excluded by default.
  • Suggested commands: go test ./... (unit), go test -tags integration ./... (all), go build ./..., make install.

Review/Refine Guidance

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 + Runtime Notes

  • Config priority: CLI flags → .roborev.toml~/.roborev/config.toml.
  • Reasoning defaults: reviews = thorough, refine = standard.
  • roborev refine runs agents without sandboxing; only use on trusted code.