Jira Backlog Grooming Agent

Groom your Jira backlog automatically. Find stale issues, close what is outdated, reprioritize what matters, and document every decision.

Backlog cleanupStale issue detectionAuto-closeBacklog health

The Challenge

Every Jira backlog eventually becomes a graveyard. Issues filed six months ago sit untouched alongside tickets from last week. Nobody wants to spend a full afternoon reading through hundreds of stale issues to decide which ones are still relevant. The backlog grows to 300, then 500, then 1,000 issues, and sprint planning becomes an exercise in scrolling past noise to find signal. Meanwhile, valid bugs and feature requests hide behind tickets that reference systems you've already replaced.

What This Prompt Does

Find Stale Issues

Searches for backlog issues untouched for 90+ days with no sprint assignment or recent activity

Analyze Relevance

Reads full issue details to determine if each ticket should be closed, reprioritized, or refined

Take Action

Transitions stale issues to closed status and adds comments suggesting reprioritization where needed

Report Health

Generates a backlog health report with average age, unassigned counts, and grooming statistics

The Prompt

The Prompt

Task

Use @Jira/Search IssuesName it "Jira/Search Issues" and call it with @Jira/Search Issues to find stale backlog issues that need attention. Use @Jira/Get IssueName it "Jira/Get Issue" and call it with @Jira/Get Issue to read full details and determine whether each issue should be closed, reprioritized, or kept. Use @Jira/Transition IssueName it "Jira/Transition Issue" and call it with @Jira/Transition Issue to move stale issues to the appropriate status and @Jira/Add CommentName it "Jira/Add Comment" and call it with @Jira/Add Comment to explain the reasoning behind each decision.

Input

The user provides:

  1. Their Jira project key (e.g., "ENG", "PLAT")
  2. Staleness threshold (optional, defaults to 90 days) - how old an untouched issue should be before flagging
  3. Action preferences (optional) - e.g., "close anything older than 6 months with no activity", "reprioritize rather than close"
  4. Protected labels (optional) - e.g., "never close issues labeled 'roadmap' or 'tech-debt'"

Example: "Groom the ENG project backlog. Flag anything untouched for 90+ days."

Context

Stale Issue Discovery

  1. Use @Jira/Search Issues with JQLName it "Jira/Search Issues with JQL" and call it with @Jira/Search Issues with JQL to find old backlog issues:
    • project = [PROJECT] AND status = "To Do" AND updated <= -90d ORDER BY updated ASC
    • project = [PROJECT] AND status = "Backlog" AND updated <= -90d ORDER BY updated ASC
    • project = [PROJECT] AND status = "Open" AND created <= -180d AND updated <= -90d ORDER BY created ASC
  2. Identify issues with no recent comments, no sprint assignment, and no linked PRs

Issue Analysis

  1. Use @Jira/Get IssueName it "Jira/Get Issue" and call it with @Jira/Get Issue to read each stale issue's full description, labels, and linked issues
  2. Categorize each issue into one of these buckets:
    • Close: No longer relevant, superseded by another issue, duplicate, or too vague to act on
    • Reprioritize: Still valid but priority has shifted, needs to be bumped up or down
    • Keep: Still relevant and correctly prioritized, just hasn't been picked up yet
    • Needs Refinement: Valid idea but description is too vague to be actionable
  3. Consider protected labels - never recommend closing issues with user-specified protected labels

Grooming Execution

  1. For issues recommended to close:
    • Use @Jira/Transition IssueName it "Jira/Transition Issue" and call it with @Jira/Transition Issue to move to "Done" or "Won't Do" status
    • Use @Jira/Add Comment explaining whyName it "Jira/Add Comment explaining why" and call it with @Jira/Add Comment explaining why the issue is being closed (e.g., "Closing as stale - no activity in 120 days and the feature area has been redesigned")
  2. For issues that need reprioritization:
    • Use @Jira/Add CommentName it "Jira/Add Comment" and call it with @Jira/Add Comment with the suggested new priority and reasoning
  3. For issues needing refinement:
    • Use @Jira/Add Comment askingName it "Jira/Add Comment asking" and call it with @Jira/Add Comment asking for clarification or suggesting a more specific scope

Health Metrics

  • Total backlog issues scanned
  • Issues older than threshold
  • Issues with no assignee and no sprint
  • Average age of backlog issues
  • Issues closed vs kept vs needs-review

Output

Backlog Grooming Report:

Project: [Project Key] Issues Scanned: [total count] Staleness Threshold: [X] days

Recommendations:

  • Close: [count] issues
  • Reprioritize: [count] issues
  • Needs Refinement: [count] issues
  • Keep As-Is: [count] issues

Actions Taken: | Issue | Title | Age | Action | Reasoning | |-------|-------|-----|--------|-----------| | [PROJ-123] | [title] | [X] days | Closed | [brief reasoning] | | [PROJ-456] | [title] | [X] days | Comment added | [suggested change] |

Backlog Health:

  • Average issue age: [X] days
  • Issues with no assignee: [count]
  • Issues never assigned to a sprint: [count]

Summary: [1-2 sentence overview of backlog health and actions taken]

Example Usage

Try asking:

  • "Groom the ENG project backlog. Flag anything untouched for 90+ days."
  • "Close all stale issues in PLAT older than 6 months, but protect anything labeled roadmap."
  • "Review the MOBILE backlog and suggest which issues to close, reprioritize, or keep."