PR Analysis & Triage
Oversight analyzes all open pull requests in a repository, ranks them by priority, and generates AI-powered summaries with risk/size/urgency dimensions so you can triage efficiently.
How It Works
When you trigger a PR analysis, oversight fetches every open pull request from the GitHub API,
including metadata like diff stats (additions, deletions,
changed_files), labels, author, merge status, and timestamps. It then passes
all of this context to Claude Opus, which evaluates each PR on multiple dimensions and
produces a ranked, prioritized list.
The analysis runs as an asynchronous task — you trigger it through the web UI or API, and the local runner daemon picks it up and executes it. Progress is streamed in real time via Supabase Realtime so you can watch results arrive.
Triggering an Analysis
Create a PR analysis through the API:
POST /api/analyses
Content-Type: application/json
{
"repoId": 1,
"kind": "pr"
}
The server creates a pending analysis record and queues an analysis-pr task
for the runner. The response includes the analysis ID and initial status:
{
"data": {
"id": 42,
"status": "pending"
}
}
Triage Dimensions
Each PR is evaluated on multiple AI-computed dimensions stored in the
ai_dimensions field. These typically include:
| Dimension | Description |
|---|---|
| Risk | How likely the change is to introduce bugs or regressions, based on diff complexity, test coverage, and affected areas. |
| Size | Scale of the change — considers lines changed, files affected, and whether the change is additive vs. refactoring. |
| Urgency | Time sensitivity based on staleness, merge conflicts, blockers, and engagement signals. |
| Priority | The composite ranking that determines sort order — Critical, High, Medium, Low, or Informational. |
Rank and Priority Tiers
Each analyzed PR receives a numeric rank (lower is higher priority) and a
priority tier derived from the AI evaluation:
- Critical — blocking issues, security vulnerabilities, or production incidents
- High — important changes that should be reviewed soon
- Medium — standard PRs with moderate scope
- Low — minor changes, documentation updates, or dependency bumps
- Informational — drafts, WIP items, or PRs that need more context
AI-Generated Summaries
For each PR, the analysis produces two fields:
-
ai_summary— a concise one-liner describing what the PR does and why it matters, suitable for dashboard display. -
ai_details— a longer explanation covering key observations, potential risks, and recommended review approach.
Engagement Signals
PR analysis also computes engagement signals for each item, including days since last author/maintainer activity, pending review state, and whether the PR is stale. These feed into both the priority ranking and the engagement tracking system.
Merge Status
Each analyzed PR includes a merge_status field indicating whether the branch
is mergeable:
clean— no conflicts, ready to mergebehind— the branch is behind the target and needs updatingconflicts— merge conflicts exist that must be resolvedunknown— GitHub has not yet computed mergeability
Interpreting Results
Once an analysis completes, fetch the full results with items:
GET /api/analyses/42
The response includes the analysis metadata (status, model_used,
token counts) and an items array with all analyzed PRs. Items are sorted by
rank. Each item includes the PR number, title, author, URL, labels, AI summary, AI details,
dimension map, and engagement data.
Batch Refresh
The runner supports automatic periodic analysis refresh via the
last_auto_refresh_at field on each repo. Repos can be configured for
auto-refresh so your triage dashboard stays current without manual triggering.