Clean up stale work
Every stale PR, branch and issue in one spreadsheet, each with a recommended action and the reason.
How it works
- 01
Copy the prompt
Fill in the [bracketed] placeholders or leave them: the assistant asks for what is missing.
- 02
Paste it into your AI app
Claude, ChatGPT, Cursor or your own app, connected to DevStats MCP. Set up DevStats MCP
- 03
Get the deliverable
prioritized-spreadsheet.xlsx
The prompt
Old PRs, forgotten branches and issues that have been "in progress" for weeks are piling up. I want one list, a decision for each item, and an hour with the team to clear it.
## Context
- Squad: [squad]. Repository: [all the squad's repositories]
- Stale means: a PR open more than [7] days, a branch without a PR older than [14] days, an issue in progress for more than twice our average cycle time.
- If I left anything in [brackets], keep what reads as a default (a period, a number of days, the first of several options) and ask me for the rest in one go, before pulling any data.
- Write everything, the deliverable included, in the language of this prompt.
## Pull this data from DevStats
1. Aging Branches — open branches by stage and age band
2. PR List with status open, sorted by created_at ascending, limit 100, fields title, url, repository, player_login, reviewers, created_at, is_draft, size_total, review_count, first_review_at
3. Branch List with status open, sorted by branch_started_at ascending, limit 100, fields name, repository, author, aging_stage, branch_started_at
4. Issue List with status in_progress, sorted by activated_at ascending, limit 100, fields key, url, summary, project, assignees, activated_at, history
5. Issue Cycle Time for the last 90 days — the baseline for "too long in progress"
## How to analyze
Give every item exactly one action:
- **Close** — a draft or a PR with no review and no new commits for 30+ days, or a branch whose work already shipped another way. After two weeks the cost of rebasing is often higher than the cost of redoing it.
- **Nudge** — a PR waiting more than 5 days with no first review. The problem is a missing reviewer, not the author. Suggest one from the people who review that repository.
- **Split** — a PR older than 7 days and larger than ~800 lines. It is stuck because nobody wants to review it. Propose where to cut.
- **Unblock** — an issue in progress for more than twice the average cycle time. Read its status history and say where it stopped.
- **Fix the status** — an issue in progress with no open branch or PR. The board is lying. It goes back to To Do or gets closed.
- **Keep** — recent and moving. List it so the inventory is complete, but do not spend meeting time on it.
Then look across items. Stale work concentrated in one repository or one project is a system problem (release process, ownership, a dependency). Stale work concentrated on one person is a load problem. Raise that privately, not in the meeting.
## Deliver
A spreadsheet (.xlsx) with:
1. **Summary** sheet — counts per action and per repository, and the three patterns worth discussing.
2. **PRs**, **Branches** and **Issues** sheets — columns: item, link, owner, age in days, stage, size, action, reason. Sort by action, then by age descending. Color the action column.
3. A five-line message I can post to schedule the cleanup hour: how many items, how many we can simply close, and what everyone should check before the meeting. No names in it: what concerns one person I raise in private.
What it returned
Download the exampleStop guessing. Start asking.
Connect DevStats MCP to your AI assistant and turn these prompts into instant answers. Copy a prompt and go.