Add roborev insights command for review pattern analysis#514
Add roborev insights command for review pattern analysis#514darrenhaas wants to merge 5 commits intoroborev-dev:mainfrom
Conversation
roborev: Combined Review (
|
|
Fixing the above, had worktree as part of test case. I should have asked what of edge cases. |
|
I am that many multi repo... :) |
roborev: Combined Review (
|
roborev: Combined Review (
|
|
Addressed the two real findings from the latest review:
The two "compile failure" findings are false positives — |
roborev: Combined Review (
|
Implements issue roborev-dev#359. Queries failing reviews from the database, builds a structured analysis prompt with current review guidelines, and sends it to an agent for pattern identification and guideline recommendations. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…tion Address roborev review findings: - Use git.GetMainRepoRoot to canonicalize repo path so worktrees and subdirectories match the daemon's stored paths - Pre-check prompt size before appending each review entry to prevent overshooting the configured budget - Paginate through /api/jobs results instead of hardcoding limit=200, stopping at the --since boundary or maxInsightsReviews (100) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Address roborev review findings: - Don't stop paginating on first out-of-window job since API orders by id (enqueue time), not finished_at — a slow job could finish in-window but appear on a later page - Truncate oversized review_guidelines to 10% of prompt budget so they don't crowd out review data or blow the overall size limit Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove dead `included` counter in prompt builder - Error with actionable message when running outside a git repo instead of silently querying a nonexistent path Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2433ddd to
d49ee72
Compare
roborev: Combined Review (
|
Fail fast with a clear error when --repo is not a git repository instead of silently querying a nonexistent path and reporting no reviews found. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
roborev: Combined Review (
|
|
I'll take a closer look at this. I'm actually interested in putting more of the review and session intelligence in agentsview (and building a web UI for roborev there, too), but having some simple insights in roborev in the cli seems useful. I'll experiment and tweak things a bit, so just bear with me so I can wrap my head around how this should work |
|
@mariusvniekerk if you also want to take a look at this and weight in I would appreciate it |
|
i think this is a reasonable initial approach. We will likely want to deal with the |
|
superseded by #554 |
Follow-up to #514. Because #514 is opened from a cross-repo branch (`darrenhaas:darren/insights-command`), GitHub cannot stack this PR directly on that branch inside `roborev-dev/roborev`. This PR carries the follow-up work against `main` and references #514 for context. ## Meaningful changes - add a first-class `insights` job type so the daemon, worker, storage layer, and TUI all treat insights runs as stored-prompt task work - move insights dataset assembly into the daemon enqueue path, including history selection, branch filtering, review/comment loading, and prompt construction - simplify the CLI to a thin enqueue client and remove the CLI-side N+1 `/api/jobs` + `/api/review` + `/api/comments` fan-out - keep review comments in the analysis corpus, exclude compact jobs from the insights dataset, and use the requested branch for insights filtering/metadata - return a clean skipped response when no matching failing reviews exist instead of forcing the CLI to prefetch history - add daemon, CLI, and storage tests that lock in the new insights job contract ## Validation - `go fmt ./...` - `go vet ./...` - `go test ./...` --------- Co-authored-by: Darren Haas <361714+darrenhaas@users.noreply.github.com> Co-authored-by: Wes McKinney <wesmckinn+git@gmail.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
roborev insightscommand that queries failing reviews from the database, builds a structured analysis prompt including current review guidelines, and sends it to an LLM agent for pattern identification (issue Addroborev insightscommand for LLM-powered review pattern analysis #359).roborev.toml--repo,--branch,--since(default 30d),--agent,--model,--reasoning,--wait(default true), and--jsonflagscmd/roborev/insights.go,internal/prompt/insights.go, plus tests for both🤖 Generated with Claude Code