Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

attention

Analyze which PRs demand your immediate attention based on multiple urgency factors.

When you’re overwhelmed by pending reviews, attention cuts through the noise by calculating a multi-factor attention score for each PR. Unlike the simple priority score, it combines age, size, staleness, and draft status into a comprehensive urgency metric (1-10 scale).

When to Use

  • Morning triage: “Which PRs should I prioritize today?”
  • End-of-day review: “What did I miss that needs urgent attention?”
  • Sprint planning: “Which PRs are becoming critical?”
  • When focus is too narrow and you need a broader view of urgency

Synopsis

prctrl attention [OPTIONS]

Options

FlagDescriptionDefault
-t, --threshold <NUM>Minimum attention score to show (1-10)5
-d, --detailedShow detailed score breakdownfalse
-n, --limit <NUM>Limit the number of results shown10
-P, --priorityShow priority score (1-5 stars based on age and size)false
--repo <PATTERN>Filter by repository name (partial match, case-insensitive)
--author <PATTERN>Filter by author username (partial match, case-insensitive)
-s, --since-days <NUM>Only show PRs created since this many days ago
--jsonOutput as JSON for scriptingfalse

Attention Score Calculation

The attention score (1-10) combines four factors:

FactorRangeDescription
Age1-5How long the PR has been waiting (newer=lower, older=higher)
Size1-3Total lines changed (+additions -deletions)
Draft status1-2Draft PRs score lower (less urgent)
Staleness bonus0-2Extra urgency for PRs waiting >7 days

Score Thresholds

Score RangeUrgencyInterpretation
8-10🔥 CriticalNeeds immediate attention
6-7⚡ HighShould review soon
4-5📅 MediumNormal priority
1-3💤 LowCan wait

Examples

# See your most attention-demanding PRs
prctrl attention

# Show only critical PRs (score >= 8)
prctrl attention --threshold 8

# Show detailed breakdown of why each PR scored high
prctrl attention --detailed

# Show top 5 most urgent
prctrl attention --limit 5

# Show with priority scores (1-5 stars)
prctrl attention --priority

# Filter by repository
prctrl attention --repo myorg/frontend

# Filter by author
prctrl attention --author alice

# Only show PRs from the last 7 days
prctrl attention --since-days 7

# Combine filters
prctrl attention --repo myorg --author alice --priority

# Get JSON for scripting or dashboards
prctrl attention --json

Output

🎯 3 PR(s) demand your attention (score >= 5)

  🔥🔥🔥  Fix authentication bug  #4821  (myorg/frontend)
      👤 alice  •  340 lines  •  opened 5d
      🔗 https://github.com/myorg/frontend/pull/4821

  🔥🔥  Refactor API gateway  #4815  (myorg/backend)
      👤 bob  •  890 lines  •  opened 3d
      🔗 https://github.com/myorg/backend/pull/4815

  🔥🔥  Update dependencies  #4809  (myorg/shared)
      👤 carol  •  120 lines  •  opened 2d
      🔗 https://github.com/myorg/shared/pull/4809

With --detailed flag

  🔥🔥🔥  Fix authentication bug  #4821  (myorg/frontend)
      👤 alice  •  340 lines  •  opened 5d
      📊 breakdown: age=3 size=2 draft=2 stale_bonus=1
      🔗 https://github.com/myorg/frontend/pull/4821

Tips

  • Use --threshold 8 to see only truly critical PRs
  • Combine with --detailed when explaining to others why a PR is urgent
  • Use --json for integration with external tools or Slack notifications
  • Pair with focus --open to immediately start reviewing the most urgent PR
  • Snoozed PRs are automatically excluded from results (consistent with list, delegate, etc.)
  • Use prctrl snooze add to temporarily hide PRs from results
  • focus — Show the single most urgent PR
  • summary — Quick one-line overview
  • top — Highest priority PRs by score
  • snooze — Temporarily hide PRs from results