Refine vague Linear Backlog issues into well-specified, actionable items. Use when user says "refine backlog", "refine FOO-123", "improve backlog items", or "clarify issues". Fetches Backlog issues, analyzes gaps, asks clarifying questions, and updates Linear after user confirms.
Refine vague Backlog issues into well-specified, actionable items through interactive discussion with the user.
mcp__linear__list_teams. If unavailable, STOP and tell the user: "Linear MCP is not connected. Run /mcp to reconnect, then re-run this skill."mcp__linear__list_teams to discover the team name dynamically. Store the discovered team name for use throughout the skill.Parse issue identifiers from $ARGUMENTS (e.g., FOO-123, FOO-124).
mcp__linear__get_issueIf $ARGUMENTS is empty or doesn't contain issue identifiers:
mcp__linear__list_issues with team: [discovered team name], state: "Backlog", includeArchived: falseAskUserQuestion:
Rate each issue 1–5 based only on the data returned from list_issues (title, description, priority, labels). Do NOT read source files or fetch full details for scoring — this is a quick triage.
| Score | Meaning | Criteria |
|---|---|---|
| 5 | Ready | Has problem statement, file paths, impact, acceptance criteria, correct priority/labels |
| 4 | Minor gaps | Missing one of: acceptance criteria, impact statement, or implementation hints |
| 3 | Needs work | Has file paths and problem description but missing 2+ of: acceptance criteria, impact, specificity |
| 2 | Unclear | Very short description, no file paths, scope ambiguous |
| 1 | Stub | Title only or single sentence, no useful detail |
Scoring checklist (deduct 1 point from 5 for each gap):
Truncation rule: list_issues truncates descriptions at ~300-400 chars, which systematically hides acceptance criteria (they come last in the standard template). When the visible description uses the structured template format (**Problem:**, **Context:**, **Impact:**, **Fix:** section headers) and is truncated, assume acceptance criteria are present — do NOT deduct for them. Only deduct for acceptance criteria when the full description is visible (short enough to not be truncated) and they're genuinely missing.
Minimum score is 1. Issues scoring 5 can still be selected — refinement may find minor improvements after reading full details and source code.
For each issue, make a quick gut-feel assessment of whether it should be dropped. This is based only on list_issues data (title, description, priority, labels) — no codebase reading at this stage.
| Indicator | Meaning | Criteria |
|---|---|---|
| Likely | Probably should cancel | Title describes a theoretical concern, "nice to have" with no clear impact, duplicates another issue, or addresses a non-problem for this project context (single-user, behind auth, etc.) |
| Maybe | Worth discussing | Unclear value, scope seems disproportionate to benefit, or might be outdated |
| No | Keep it | Clear problem, real impact, actionable |
The Drop? column helps the user prioritize which issues to examine first — issues marked "Likely" may not need refinement at all, just cancellation.
For each issue, analyze and identify gaps. Read relevant source files referenced in the issue description to understand context.
Check for these common problems in Backlog issues:
plan-backlog?For each issue, present your analysis to the user:
## FOO-123: [Current Title]
**Current state:**
[Brief summary of what the issue says now]
**Issues found:**
- [Gap 1: e.g., "No acceptance criteria — unclear when this is done"]
- [Gap 2: e.g., "Description says 'improve error handling' but doesn't specify which errors"]
- [Gap 3: e.g., "Priority is Low but this is a security concern — should be High"]
**Suggested improvements:**
- [Suggestion 1: e.g., "Add specific error scenarios to handle"]
- [Suggestion 2: e.g., "Split into two issues: API errors vs UI errors"]
- [Suggestion 3: e.g., "Bump priority to High (Security label)"]
**Questions for you:**
- [Question 1: e.g., "Should this cover both API and UI error handling, or just API?"]
- [Question 2: e.g., "Is there a specific error you've seen that triggered this issue?"]
Then engage in a back-and-forth discussion:
Continue the discussion until the user says they're done or confirms the refinements.
When an issue covers multiple distinct problems or its scope is too broad, suggest splitting it. During discussion, propose the split clearly:
**Suggested split for FOO-123:**
This issue covers both API error handling and UI error display. I'd suggest splitting:
1. **FOO-123 (updated):** "API routes return generic 500 on upload failures"
- Label: Bug, Priority: High
2. **New issue:** "Upload UI shows no feedback on server errors"
- Label: Improvement, Priority: Medium
If the user agrees to a split:
mcp__linear__create_issue for the remaining split items, all in state: "Backlog" with proper labels and prioritiesDuring analysis, if the issue shouldn't be done, suggest canceling it. Valid reasons for cancellation:
Present cancellation suggestions clearly during discussion:
## FOO-123: [Current Title]
**Recommendation: Cancel this issue**
**Reasons:**
- [Reason 1: e.g., "This is a single-user app behind auth — the XSS vector described requires a second user"]
- [Reason 2: e.g., "The referenced code in src/lib/foo.ts was removed in PR #30"]
**Context:** [What you found when reading the codebase that supports this recommendation]
If the user agrees to cancel, the issue will be handled in the Update Phase.
When the user confirms they're done refining:
## Updates to apply:
### FOO-123 (update)
- **Title:** [Original] → [New title, if changed]
- **Description:** [Full new description]
- **Priority:** [Original] → [New, if changed]
- **Labels:** [Original] → [New, if changed]
### New issue (split from FOO-123)
- **Title:** [Title]
- **Description:** [Full description]
- **Priority:** [Priority]
- **Labels:** [Labels]
### FOO-124 (cancel)
- **Reason:** [Specific reason for cancellation]
### FOO-125 (update)
...
mcp__linear__update_issue for each updated issue (title, description, priority, labels)mcp__linear__create_issue for each new split issue with team: [discovered team name], state: "Backlog", and proper labels/priorityFor each issue the user agreed to cancel:
mcp__linear__create_comment(issueId: "FOO-xxx", body: "Canceled during refinement: [reason]")
The reason should be specific, e.g.:
CRITICAL: Linear MCP same-type state bug. "Duplicate" and "Canceled" are both type: canceled in Linear. Passing state: "Canceled" by name silently no-ops if the issue is already in another canceled-type state. To reliably cancel issues, first fetch the team's statuses to get the Canceled state UUID:
mcp__linear__list_issue_statuses(team: [discovered team name])
Find the status with name: "Canceled" and use its id (UUID) in the update call:
mcp__linear__update_issue(id: "FOO-xxx", state: "<canceled-state-uuid>")
Always use the UUID, never the name, for canceled-type state transitions.
When a refinement session cancels some issues but keeps others, the kept issues must be marked as vetted so that downstream skills (plan-backlog) don't re-question or drop them.
Prepend this note to the top of the kept issue's description (before **Problem:**):
**Refinement:** Reviewed YYYY-MM-DD — confirmed valid. [1-sentence summary of why it was kept]. Do not drop.
This note is added via mcp__linear__update_issue along with any other description changes. If the kept issue's description doesn't need other changes, still update it to add the Refinement note.
Use this structure for updated descriptions:
**Problem:**
[Clear, specific problem statement — 1-2 sentences]
**Context:**
[Affected files, routes, or components — be specific]
**Impact:**
[Why this matters — user-facing impact, data quality, security, etc.]
**Acceptance Criteria:**
- [ ] [Specific, verifiable criterion]
- [ ] [Another criterion]
**Implementation Hints:** (optional)
[Pointers for plan-backlog: patterns to follow, related code, constraints]
When refining multiple issues:
| Situation | Action |
|---|---|
| Linear MCP not connected | STOP — tell user to run /mcp |
| Issue ID not found | Tell user, skip that issue |
| No Backlog issues exist | Tell user "No Backlog issues found" and stop |
| User picks no issues | Stop gracefully |
| Referenced code doesn't exist anymore | Note as potentially outdated in analysis |
| Issue already well-specified | Tell user it looks good, suggest minor tweaks if any |
| All selected issues canceled | Apply cancellations and stop — no refinement needed |
After applying updates, output:
Refinement complete.
Updated X issues:
- FOO-123: [New title] — [brief summary of changes]
- FOO-124: [New title] — [brief summary of changes]
Created Y issues (from splits):
- FOO-130: [Title] (split from FOO-123) — [Label, Priority]
- FOO-131: [Title] (split from FOO-124) — [Label, Priority]
Canceled Z issues:
- FOO-126: [Title] — [brief cancellation reason]
Unchanged:
- FOO-125: Already well-specified
Next step: Use `plan-backlog FOO-123` to create an implementation plan.
Do not ask follow-up questions after termination.