dobbe

dobbe review digest

Fetch open PRs, analyze with AI, and output a prioritized review digest.

Synopsis

dobbe review digest [OPTIONS]

Description

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.

Pipeline Flowchart

┌──────────────────────────────────────────┐
│   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)                │
└──────────────────────────────────────────┘

Options

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

Output Models

The digest produces these structured models:

ReviewDigest

Top-level report with computed properties:

PRReviewResult

Per-PR analysis result:

ReviewConcern

Individual issue found during review:

Examples

Review a single PR by number

dobbe review digest --pr 42

Review a single PR by URL

dobbe review digest --pr https://github.com/org/repo/pull/42

Review a single PR by shorthand

dobbe review digest --pr org/repo#42

Digest for a single repository (all open PRs)

dobbe review digest --repo acme/web-app

Digest with Slack notification

dobbe review digest --repo acme/web-app --notify slack --channel "#pr-reviews"

Verbose digest skipping bot PRs

dobbe review digest --repo acme/web-app --verbose --skip-author "dependabot,renovate"

Rebuild codebase context before review

dobbe review digest --pr 42 --rebuild-context

Diff-only review (skip codebase context)

dobbe review digest --pr 42 --no-context

See Also