Linear Backlog Grooming Agent

Groom your Linear backlog automatically. Find stale issues, suggest closures, and flag tickets that need re-prioritization.

Backlog groomingStale detectionDuplicate finderClosure suggestions

The Challenge

Every team's Linear backlog grows faster than it shrinks. Issues from six months ago sit alongside this week's work, and nobody remembers if half of them are still relevant. Grooming sessions turn into two-hour meetings where someone reads issue titles aloud and the team votes on whether to close them. Meanwhile, duplicates pile up and priorities drift until the backlog is more noise than signal.

What This Prompt Does

Find Stale Issues

Searches for backlog issues older than your threshold that have not been touched recently

Analyze Relevance

Evaluates each issue for description quality, activity history, and current relevance

Tag & Recommend

Labels stale issues and adds comments with close, re-prioritize, keep, or merge recommendations

Generate Report

Produces a grooming summary with action items, duplicate candidates, and backlog health metrics

The Prompt

The Prompt

Task

Use @Linear/List IssuesName it "Linear/List Issues" and call it with @Linear/List Issues to find issues older than 90 days in backlog state. Check if they are still relevant based on description and recent activity. Use @Linear/Add LabelName it "Linear/Add Label" and call it with @Linear/Add Label to tag stale issues for review and @Linear/Remove LabelName it "Linear/Remove Label" and call it with @Linear/Remove Label to clean up outdated labels. Use @Linear/Update IssueName it "Linear/Update Issue" and call it with @Linear/Update Issue to add a comment with a grooming recommendation.

Input

The user provides:

  1. Their Linear team name or ID
  2. Staleness threshold (optional, defaults to 90 days)
  3. Action preference: "flag only" or "flag and recommend" (optional, defaults to flag and recommend)

Example: "Groom the backlog for the Product team - find anything older than 60 days"

Context

Stale Issue Discovery

  1. Use @Linear/List IssuesName it "Linear/List Issues" and call it with @Linear/List Issues to find issues in Backlog or Triage state
  2. Filter to issues created more than the staleness threshold (default 90 days) ago
  3. Also find issues in Todo state that have not been updated in the threshold period
  4. Note the total count of stale issues found

Relevance Analysis

  1. For each stale issue, analyze:
    • Description quality: Is there enough detail to act on?
    • Last activity: When was it last commented on or updated?
    • Priority: Was a priority ever set?
    • Labels: Do labels suggest it was categorized but forgotten?
    • Assignee history: Was it ever assigned and then unassigned?
  2. Categorize each issue into one of:
    • Close: No recent activity, vague description, no priority, likely obsolete
    • Re-prioritize: Still relevant but needs a priority update or reassignment
    • Keep: Has recent comments or activity suggesting it is still valid
    • Merge: Appears to duplicate another issue

Grooming Actions

  1. Use @Linear/Add LabelName it "Linear/Add Label" and call it with @Linear/Add Label to tag issues with "needs-review" or "stale"
  2. Use @Linear/Remove LabelName it "Linear/Remove Label" and call it with @Linear/Remove Label to remove outdated labels that no longer apply
  3. Use @Linear/Update IssueName it "Linear/Update Issue" and call it with @Linear/Update Issue to add a comment with the grooming recommendation:
    • Why the issue was flagged
    • Suggested action (close, re-prioritize, keep, merge)
    • Any context from related issues

Grooming Metrics

  • Total issues reviewed
  • Issues recommended for closure
  • Issues recommended for re-prioritization
  • Issues recommended to keep
  • Potential duplicates found
  • Average age of stale issues

Output

Backlog Grooming Report:

Team: [Team Name] Staleness Threshold: [X] days Total Issues Reviewed: [count]

Recommendations:

  • Close: [count] issues
  • Re-prioritize: [count] issues
  • Keep: [count] issues
  • Merge (potential duplicates): [count] issues

Issues to Close: | Issue | Title | Age | Last Activity | Reason | |-------|-------|-----|---------------|--------| | [ID] | [title] | [X] days | [date] | [reason] |

Issues to Re-prioritize: | Issue | Title | Current Priority | Suggested Priority | Reason | |-------|-------|-----------------|-------------------|--------| | [ID] | [title] | [current] | [suggested] | [reason] |

Potential Duplicates:

  • [Issue ID] may duplicate [Issue ID] - [similarity reason]

Summary: [1-2 sentence overview of backlog health and recommended next steps]

Example Usage

Try asking:

  • "Groom the backlog for the Product team - find anything older than 60 days"
  • "Find stale issues in the Engineering backlog and recommend closures"
  • "Review all backlog issues with no priority and suggest next steps"