name: issue-to-pr description: Use when converting a GitHub issue into a PR with an implementation plan. Validates issue completeness, dispatches to appropriate skill, and creates a plan-only PR.
Issue to PR
Convert a GitHub issue into an actionable PR with a plan.
Workflow
Receive issue number
→ Fetch issue with gh
→ Classify issue type
→ Validate against checklist (from add-model or add-rule)
→ If incomplete: comment on issue, STOP
→ If complete: research references, write plan, create PR
Steps
1. Parse Input
Extract issue number:
123→ issue #123https://github.com/owner/repo/issues/123→ issue #123owner/repo#123→ issue #123 in owner/repo
2. Fetch Issue
gh issue view <number> --json title,body,labels,assignees
Present issue summary to user.
3. Classify and Validate
Determine issue type from title/labels/body:
- Adding a new component → validate against
workflow:add-modelStep 0 checklist - Adding a transformation → validate against
workflow:add-ruleStep 0 checklist - Other → construct an ad-hoc checklist based on issue content
Check every item against the issue body. Use WebSearch/WebFetch to verify
claims and references.
If incomplete: comment on issue listing missing items, then STOP.
gh issue comment <number> --body "Missing information: ..."
If complete: continue.
4. Research References
Use WebSearch/WebFetch to look up references from the issue:
- Clarify formal definitions and notation
- Understand algorithms in detail
- Resolve ambiguities without bothering the contributor
5. Write Plan
Invoke superpowers:writing-plans to write plan to docs/plans/YYYY-MM-DD-<slug>.md.
The plan MUST reference the appropriate implementation skill:
- Component additions → follow
workflow:add-modelsteps - Transformations → follow
workflow:add-rulesteps - Other → follow
workflow:workflowsteps
Include concrete details from the issue mapped onto each step.
6. Create PR
First PR contains only the plan file, no implementation code.
git checkout -b issue-<number>-<slug>
git add docs/plans/<plan-file>.md
git commit -m "Add plan for #<number>: <title>"
git push -u origin issue-<number>-<slug>
gh pr create --title "Fix #<number>: <title>" --body "## Summary
<brief description>
Closes #<number>"
Next Steps
After the plan-only PR is merged:
- Start a new
workflow:workflowsession referencing the plan file - The workflow can skip Step 1 (Brainstorm) and Step 2 (Plan) —
set both as
"skipped"withsteps.2.approved = true - Reference:
artifacts.plan_file = "docs/plans/YYYY-MM-DD-<slug>.md" - Enter Step 3 (Execute) directly with the approved plan
Common Mistakes
| Mistake | Fix |
|---|---|
| Incomplete issue template | Comment listing missing items, then STOP |
| Including code in initial PR | First PR: plan only |
| Generic plan | Map issue specifics onto skill steps |
| Not verifying references | WebSearch/WebFetch to cross-check claims |