Fetch open PRs, analyze with AI, and output a prioritized review digest.
dobbe review digest [OPTIONS]
review digest runs a 5-phase async pipeline that discovers open pull requests, pre-fetches diffs, analyzes each PR with Claude AI for security, quality, and complexity issues, and outputs a prioritized digest sorted by risk level and age.
When run from inside a git repository with no --repo flag, auto-detects the repo from the current directory.
┌──────────────────────────────────────────┐
│ dobbe review digest [OPTIONS] │
└─────────────────────┬────────────────────┘
│
v
┌──────────────────────────────────────────┐
│ PARSE ARGS │
│ - Resolve --repo (flag / config / CWD) │
│ - Parse --pr ref (number / URL / short) │
└─────────────────────┬────────────────────┘
│
v
┌────────────┐
│ --pr given │
│ ? │
└──┬─────┬───┘
yes │ │ no
v v
┌──────────┐ ┌──────────────────┐
│ Single PR│ │ All open PRs │
│ fetch │ │ (warn: expensive)│
└────┬─────┘ └───────┬──────────┘
│ │
└───────┬───────┘
│
v
┌──────────────────────────────────────────┐
│ PHASE 1: FETCH PRs │
│ - Discover open PRs via Claude prompt │
│ - Filter by --reviewer (default: @me) │
│ - Parallel across repos (semaphore = 5) │
│ Tools: [Bash, Read, Grep, Glob] + MCP │
└─────────────────────┬────────────────────┘
│
v
┌──────────────────────────────────────────┐
│ PHASE 2: FILTER │
│ - Remove drafts │
│ - Skip PRs with --skip-label labels │
│ - Skip PRs from --skip-author authors │
└─────────────────────┬────────────────────┘
│
v
┌──────────────────────────────────────────┐
│ PHASE 3: PRE-FETCH DIFFS │
│ - Parallel diff fetching │
│ - Truncate at --max-diff-lines (2000) │
│ - Feed diffs inline to analysis prompt │
└─────────────────────┬────────────────────┘
│
v
┌──────────────────────────────────────────┐
│ PHASE 4: ANALYZE │
│ - Senior engineer code review per PR │
│ - Categories: Security, Test coverage, │
│ Breaking changes, Code quality, │
│ Complexity │
│ - Assign risk level + concerns │
│ - Estimate review time │
│ - Recommend: approve / request_changes │
│ / needs_discussion │
└─────────────────────┬────────────────────┘
│
v
┌──────────────────────────────────────────┐
│ PHASE 5: PRIORITIZE │
│ - Sort by risk: critical > high > │
│ medium > low │
│ - Within same risk: oldest first │
│ - Flag stale PRs (> --stale-days) │
└─────────────────────┬────────────────────┘
│
v
┌──────────────────────────────────────────┐
│ OUTPUT │
│ --format table / json / markdown │
│ --output file (optional) │
│ --notify slack (optional) │
└──────────────────────────────────────────┘
| Option | Type | Default | Description |
|---|---|---|---|
--pr |
str |
- | PR number (42), URL (https://github.com/org/repo/pull/42), or shorthand (org/repo#42) |
--repo / -r |
str |
- | Single repo to review (org/repo). Auto-detected from CWD if omitted. |
--reviewer |
str |
@me |
GitHub username to filter by |
--stale-days |
int |
7 |
Days before flagging PR as stale |
--format / -f |
str |
table |
Output format: table, json, markdown |
--verbose / -V |
bool |
False |
Show diff stats, recommendations, concerns |
--output |
str |
- | Write output to file instead of stdout |
--notify |
str |
- | Send digest to platform (slack) |
--channel |
str |
- | Notification channel (e.g., #pr-reviews) |
--skip-label |
str |
- | Skip PRs with these labels (comma-separated) |
--skip-author |
str |
- | Skip PRs by these authors (comma-separated) |
--max-diff-lines |
int |
2000 |
Max diff lines to include per PR |
--rebuild-context |
bool |
False |
Rebuild codebase context cache |
--context-ttl |
int |
7 |
Context cache TTL in days |
--no-context |
bool |
False |
Skip codebase context (diff-only review) |
--quiet / -q |
bool |
False |
Suppress progress output |
The digest produces these structured models:
Top-level report with computed properties:
total_prs - number of PRs analyzedcritical_count - PRs with critical riskstale_prs - PRs older than stale_daysstats_by_risk - breakdown by risk levelPer-PR analysis result:
risk_level - critical, high, medium, lowsummary - AI-generated review summaryconcerns - list of specific issues foundrecommendations - suggested actionsestimated_review_time - human review time estimateapproval_recommendation - approve, request_changes, or needs_discussionIndividual issue found during review:
category - security, test_coverage, breaking_change, code_quality, complexityseverity - critical, high, medium, lowdescription - what the issue isfile_path - affected fileline_number - specific line (if applicable)suggestion - how to fix itdobbe review digest --pr 42
dobbe review digest --pr https://github.com/org/repo/pull/42
dobbe review digest --pr org/repo#42
dobbe review digest --repo acme/web-app
dobbe review digest --repo acme/web-app --notify slack --channel "#pr-reviews"
dobbe review digest --repo acme/web-app --verbose --skip-author "dependabot,renovate"
dobbe review digest --pr 42 --rebuild-context
dobbe review digest --pr 42 --no-context