Refine Issue Plan
Turn incomplete issue context into an implementation-ready plan without discarding the original request. Separate analysis, approval, issue mutation, and implementation.
1. Resolve the task
- Identify the exact tracker, repository or project, and issue when supplied.
- Verify that any local checkout belongs to the resolved issue before using it as evidence.
- Read the complete issue body, comments, attachments, metadata, linked designs, and existing child links when available.
- Treat the current conversation as planning evidence. Capture approved decisions, rejected options, constraints, and intentional placeholders.
- Inspect repository context for discoverable facts instead of asking the user. Read project instructions before inspecting or proposing changes.
- When only issue text is available, work from it and mark repository-dependent details as unknown.
- Use read-only operations during analysis. Do not modify the issue or implement the task yet.
2. Audit readiness
Summarize only what affects execution:
- desired user or system outcome;
- reusable implementation, patterns, assets, or infrastructure;
- missing behavior, content, or dependencies;
- protected, generated, or externally owned areas;
- confirmed decisions and intentional placeholders;
- unresolved decisions that could materially change the solution;
- relevant verification conventions.
Separate facts, decisions, assumptions, and open questions. Do not invent URLs, copy, APIs, ownership, or acceptance criteria merely to make the issue look complete.
3. Decide whether to keep or split
Prefer one issue when the work:
- produces one coherent, reviewable outcome;
- touches one closely related implementation area;
- can be completed and verified in one change;
- has no independently valuable prerequisite or parallel workstream;
- would otherwise create microscopic asset, constant, helper, or test-only issues.
Recommend splitting only when at least one boundary is genuine:
- a prerequisite such as schema, contract, infrastructure, migration, or shared asset has independent value;
- multiple outcomes can be implemented and reviewed independently;
- separate owners or teams can work without overlapping primary responsibility;
- sequencing or risk requires isolated rollout and verification;
- the issue would remain too broad or ambiguous for one implementation pass.
Keep tests with the behavior they verify. Do not split solely because the task has several files, implementation steps, responsive states, or test cases.
State the verdict first and explain the decisive reasons.
If splitting is warranted
- Use
$split-issue-into-subissues when it is available and follow its approval and preservation workflow.
- Pass the inspected issue context, current-state audit, confirmed decisions, and unresolved questions into that workflow.
- Do not duplicate its full decomposition workflow here.
- If the skill is unavailable, provide the split recommendation and ask the user to make it available or authorize a standalone decomposition.
- Do not also append a single-issue implementation brief unless the user explicitly asks for both.
If one issue is appropriate
Continue with the implementation brief below.
4. Draft an implementation brief
Preserve the original issue body as the source request. Append a managed section rather than rewriting the issue by default:
<!-- implementation-brief:start -->
## Implementation brief
### Goal
State the observable outcome and why it matters.
### Confirmed decisions
- Record decisions established by the issue, linked artifacts, or conversation.
- Identify intentional placeholders and their replacement point.
### Scope
- Describe the bounded implementation work.
- Name reusable patterns or constraints when they materially guide implementation.
### User flow
Describe the interaction or state sequence only when behavior has a meaningful flow.
### Implementation requirements
- State required behavior and important technical constraints.
- Avoid prescribing incidental file structure unless ownership or safety depends on it.
### Acceptance criteria
- [ ] Use observable, testable outcomes.
- [ ] Cover relevant accessibility, responsive behavior, compatibility, failure states, or data handling.
### Out of scope
- Name adjacent work intentionally excluded.
### Dependencies and open questions
- State `None` when nothing blocks implementation.
- Keep unresolved decisions visible; do not disguise them as assumptions.
### Verification
- List proportionate automated checks and manual validation.
<!-- implementation-brief:end -->
Adapt the headings to the task:
- Omit
User flow when there is no meaningful interaction sequence.
- Omit empty categories other than
Dependencies and open questions.
- Add data, migration, rollout, observability, or security sections only when relevant.
- Prefer product and behavioral requirements over a line-by-line coding recipe.
- Ensure an implementing agent can proceed without reconstructing hidden conversation context.
5. Preview before writing
Present:
- the keep-or-split verdict;
- the current-state audit;
- the complete proposed implementation brief;
- any issue metadata changes, if relevant;
- a statement that all unrelated existing content will be preserved.
Ask for explicit approval before creating, editing, linking, assigning, labeling, or closing issues. A request to analyze or draft is not approval to mutate the tracker.
If the user asked only for a suggested body, stop after the preview.
6. Update an approved issue safely
After approval:
- Re-read the issue immediately before writing.
- Preserve the original title and all unrelated body content verbatim unless the user explicitly approved replacements.
- Append the marked section on the first run.
- On later runs, replace only content between:
<!-- implementation-brief:start -->
<!-- implementation-brief:end -->
- If a similar unmarked plan already exists, preview a reconciliation before removing or rewriting it.
- Apply only approved metadata changes.
- Re-fetch the issue and verify the original content, managed section, links, attachments, and metadata.
Never implement repository changes as part of this skill unless the user separately authorizes implementation.
Quality checks
Before presenting the plan, confirm:
- the verdict follows delivery boundaries rather than task size alone;
- every confirmed requirement appears in scope or is explicitly out of scope;
- acceptance criteria describe observable outcomes;
- facts and decisions are traceable to supplied or inspected evidence;
- unresolved choices are visible;
- the brief is concise enough to guide implementation without becoming a duplicate design document;
- the original issue remains useful when the managed section is removed.
Before mutating an issue, confirm:
- the user approved the latest complete preview;
- the target issue is exact;
- the latest issue body was fetched;
- unrelated content will be preserved.
1---2name: refine-issue-plan3description: Analyze an issue, task, conversation, design, or repository context; decide whether the work should remain in one issue or be split into independently deliverable subissues; and, when it should remain whole, draft or append a clear PRD-style implementation brief. Use when a user asks to refine, flesh out, plan, scope, assess, or rewrite an issue before implementation, or asks whether an issue is ready to implement or should be decomposed.4---56# Refine Issue Plan78Turn incomplete issue context into an implementation-ready plan without discarding the original request. Separate analysis, approval, issue mutation, and implementation.910## 1. Resolve the task1112- Identify the exact tracker, repository or project, and issue when supplied.13- Verify that any local checkout belongs to the resolved issue before using it as evidence.14- Read the complete issue body, comments, attachments, metadata, linked designs, and existing child links when available.15- Treat the current conversation as planning evidence. Capture approved decisions, rejected options, constraints, and intentional placeholders.16- Inspect repository context for discoverable facts instead of asking the user. Read project instructions before inspecting or proposing changes.17- When only issue text is available, work from it and mark repository-dependent details as unknown.18- Use read-only operations during analysis. Do not modify the issue or implement the task yet.1920## 2. Audit readiness2122Summarize only what affects execution:2324- desired user or system outcome;25- reusable implementation, patterns, assets, or infrastructure;26- missing behavior, content, or dependencies;27- protected, generated, or externally owned areas;28- confirmed decisions and intentional placeholders;29- unresolved decisions that could materially change the solution;30- relevant verification conventions.3132Separate facts, decisions, assumptions, and open questions. Do not invent URLs, copy, APIs, ownership, or acceptance criteria merely to make the issue look complete.3334## 3. Decide whether to keep or split3536Prefer one issue when the work:3738- produces one coherent, reviewable outcome;39- touches one closely related implementation area;40- can be completed and verified in one change;41- has no independently valuable prerequisite or parallel workstream;42- would otherwise create microscopic asset, constant, helper, or test-only issues.4344Recommend splitting only when at least one boundary is genuine:4546- a prerequisite such as schema, contract, infrastructure, migration, or shared asset has independent value;47- multiple outcomes can be implemented and reviewed independently;48- separate owners or teams can work without overlapping primary responsibility;49- sequencing or risk requires isolated rollout and verification;50- the issue would remain too broad or ambiguous for one implementation pass.5152Keep tests with the behavior they verify. Do not split solely because the task has several files, implementation steps, responsive states, or test cases.5354State the verdict first and explain the decisive reasons.5556### If splitting is warranted5758- Use `$split-issue-into-subissues` when it is available and follow its approval and preservation workflow.59- Pass the inspected issue context, current-state audit, confirmed decisions, and unresolved questions into that workflow.60- Do not duplicate its full decomposition workflow here.61- If the skill is unavailable, provide the split recommendation and ask the user to make it available or authorize a standalone decomposition.62- Do not also append a single-issue implementation brief unless the user explicitly asks for both.6364### If one issue is appropriate6566Continue with the implementation brief below.6768## 4. Draft an implementation brief6970Preserve the original issue body as the source request. Append a managed section rather than rewriting the issue by default:7172```markdown73<!-- implementation-brief:start -->74## Implementation brief7576### Goal7778State the observable outcome and why it matters.7980### Confirmed decisions8182- Record decisions established by the issue, linked artifacts, or conversation.83- Identify intentional placeholders and their replacement point.8485### Scope8687- Describe the bounded implementation work.88- Name reusable patterns or constraints when they materially guide implementation.8990### User flow9192Describe the interaction or state sequence only when behavior has a meaningful flow.9394### Implementation requirements9596- State required behavior and important technical constraints.97- Avoid prescribing incidental file structure unless ownership or safety depends on it.9899### Acceptance criteria100101- [ ] Use observable, testable outcomes.102- [ ] Cover relevant accessibility, responsive behavior, compatibility, failure states, or data handling.103104### Out of scope105106- Name adjacent work intentionally excluded.107108### Dependencies and open questions109110- State `None` when nothing blocks implementation.111- Keep unresolved decisions visible; do not disguise them as assumptions.112113### Verification114115- List proportionate automated checks and manual validation.116<!-- implementation-brief:end -->117```118119Adapt the headings to the task:120121- Omit `User flow` when there is no meaningful interaction sequence.122- Omit empty categories other than `Dependencies and open questions`.123- Add data, migration, rollout, observability, or security sections only when relevant.124- Prefer product and behavioral requirements over a line-by-line coding recipe.125- Ensure an implementing agent can proceed without reconstructing hidden conversation context.126127## 5. Preview before writing128129Present:1301311. the keep-or-split verdict;1322. the current-state audit;1333. the complete proposed implementation brief;1344. any issue metadata changes, if relevant;1355. a statement that all unrelated existing content will be preserved.136137Ask for explicit approval before creating, editing, linking, assigning, labeling, or closing issues. A request to analyze or draft is not approval to mutate the tracker.138139If the user asked only for a suggested body, stop after the preview.140141## 6. Update an approved issue safely142143After approval:1441451. Re-read the issue immediately before writing.1462. Preserve the original title and all unrelated body content verbatim unless the user explicitly approved replacements.1473. Append the marked section on the first run.1484. On later runs, replace only content between:149 - `<!-- implementation-brief:start -->`150 - `<!-- implementation-brief:end -->`1515. If a similar unmarked plan already exists, preview a reconciliation before removing or rewriting it.1526. Apply only approved metadata changes.1537. Re-fetch the issue and verify the original content, managed section, links, attachments, and metadata.154155Never implement repository changes as part of this skill unless the user separately authorizes implementation.156157## Quality checks158159Before presenting the plan, confirm:160161- the verdict follows delivery boundaries rather than task size alone;162- every confirmed requirement appears in scope or is explicitly out of scope;163- acceptance criteria describe observable outcomes;164- facts and decisions are traceable to supplied or inspected evidence;165- unresolved choices are visible;166- the brief is concise enough to guide implementation without becoming a duplicate design document;167- the original issue remains useful when the managed section is removed.168169Before mutating an issue, confirm:170171- the user approved the latest complete preview;172- the target issue is exact;173- the latest issue body was fetched;174- unrelated content will be preserved.