| name | issue-to-pr |
|---|---|
| description | End-to-end pipeline from a GitHub/GitLab issue URL to an opened PR: implement with clean-code, enforce quality gates (best practices, refactoring discipline, verification matrix), multi-agent review (thermo-nuclear, simplifier, security when needed), fix findings, add tests, then create the PR (stop-slop). Use when the user pastes an issue link and asks to implement/fix/ship it, or invokes /issue-to-pr, issue-to-pr, or "сделай по issue". |
Orchestrator skill. Input: issue URL (or #N in the current repo). Output: PR URL.
Announce at start: Using issue-to-pr for <issue>.
- Do not skip phases. Order below is mandatory.
- Evidence before claims — run tests/lint; record exit codes. No "should pass".
- Commit / push / PR only inside this pipeline (user invoked the skill = explicit ask).
- Max 2 review-fix loops. If blockers remain — stop, report, ask user.
- Auth/payments/crypto/breaking API — escalate plan to user before coding if scope is unclear.
- Read linked skills before the phase that needs them (do not rely on memory).
- Quality gates are mandatory. See quality-gates.md. Any BLOCK item stops progress until fixed or user waives.
| Phase | Skill / agent |
|---|---|
| Implement quality | ~/.cursor/skills/skills/clean-code/SKILL.md |
| Verify claims | ~/.cursor/skills/skills/verification-before-completion/SKILL.md |
| Simplify | Task code-simplifier |
| Structural review | Task thermo-nuclear-code-quality-review |
| Bug/security review | Task code-reviewer (+ security-review when auth/pay) |
| Silent failures | Task silent-failure-hunter when error paths change |
| PR prose | ~/.cursor/skills/stop-slop/SKILL.md |
| Open PR | ~/.cursor/skills/skills/create-pr/SKILL.md |
Project overrides (if present, win over create-pr defaults):
.cursor/rules/pull-request-creation.mdc.github/PULL_REQUEST_TEMPLATE.mdAGENTS.md
Copy into TodoWrite and keep updated:
Issue→PR:
- [ ] 0. Parse issue + branch
- [ ] 1. Scope / thin plan
- [ ] 2. Implement (clean-code) + Gate B/C
- [ ] 2b. Simplify (code-simplifier if non-trivial)
- [ ] 3. Verification matrix (Gate E)
- [ ] 4. Review battery (Gate F) + fix
- [ ] 5. AC matrix + missing tests (Gate A)
- [ ] 5b. Diff hygiene (Gate G)
- [ ] 6. Create PR (stop-slop)
- [ ] 7. Hand off PR URL + gate report
Details: checklist.md · quality-gates.md · agents.md.
gh issue view <N|URL> --json number,title,body,labels,url,state,commentsExtract: goal, acceptance criteria, out-of-scope, labels, linked design/docs.
Seed Gate A rows from AC / repro steps (fill evidence later).
Branch from default base:
BASE=$(gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name')
git fetch origin "$BASE"
git checkout -b "fix/issue-<N>-<short-slug>" "origin/$BASE" # or feat/…If WIP already matches the issue — reuse the branch. Stop if issue is closed/duplicate/lacks criteria.
Short plan only:
- Files likely touched + canonical layer for new logic
- Approach (3–7 bullets), including any code-judo / extraction
- Test strategy (Gate E layers that apply)
- Risks / security surface (auth? public API? migrations?)
- Explicit out of scope (prevents drive-by)
If blocked on a product choice — ask one focused question, then continue.
No long docs/plans/… unless user asked or multi-day scope.
- Read
clean-code. - Implement only AC / issue need.
- Logic in canonical layer; small functions; searchable names.
- Apply Gate C while coding (no drive-by; extract when duplicated; no identity wrappers).
- i18n / lexicons per project; skip CHANGELOG unless required.
- After coding: run Gate B self-check on the diff. Fix BLOCK items now.
Optional: Task generalPurpose with agents.md § Implementer. Orchestrator owns gates.
Smoke: syntax check on every touched source file.
If diff ≳ 80 LOC or >3 files or new abstraction introduced:
- Task
code-simplifieron recently changed code (agents.md § Simplifier). - Re-run Gate B quickly.
- Do not expand scope during simplify.
Trivial one-liner / lexicon-only: skip 2b with a one-line note.
Discover repo commands (composer.json, package.json, CI, AGENTS.md).
Run every applicable layer from Gate E (syntax → focused tests → lint → build → smoke). For bug fixes: red-green once on the regression test.
Gate: any failure → fix → re-run. Do not enter Phase 4 with red applicable gates.
Apply verification-before-completion: no green claim without fresh output in this session.
Also run Gate D (security / best-practice scan) on the diff before review.
Run reviews on branch diff ($BASE...HEAD + unstaged):
| Pass | Agent | Focus |
|---|---|---|
| 4a | code-reviewer |
bugs, regressions, security, missing tests |
| 4b | thermo-nuclear-code-quality-review |
structure, code-judo, spaghetti, 1k-line |
| 4c | conditional | see Gate F table (security-review, silent-failure-hunter, type-design-analyzer, …) |
Prompts: agents.md. Prefer run_in_background: false for reviewers.
For each BLOCK / high:
- Fix (prefer deletion of complexity over new branches)
- Re-run Phase 3 applicable gates
- Spot re-review touched areas
Max 2 full loops. Then proceed (no blockers) or stop with remaining list.
Medium <15 min → fix. Low → PR notes only.
- Complete Gate A table: every AC has code + test evidence (or justified
n/a). - Add focused tests for gaps / review findings.
- Re-run Phase 3.
- Optional: Task
pr-test-analyzerafter PR exists if CI/tests look thin.
Before commit/PR: status, full diff vs base, no secrets/debug/unrelated files/CHANGELOG drive-by.
- Commit intended changes (conventional English subject; body = why).
- Confirm Gate H pre-PR checklist all BLOCK clear.
- Read
create-pr; honor project template /pull-request-creationrule. stop-slopon PR prose.- Push + create:
git push -u origin HEAD
gh pr create --title "…" --body "$(cat <<'EOF'
…
EOF
)"Closes #N if fully resolved, else Refs #N. Copy issue labels when the repo uses them. No issue number in title if project forbids (MiniShop3).
Include in PR testing section: Gate E commands + exit codes.
After open: if CI fails, Task ci-investigator → fix → push (counts toward review-fix budget if still open).
Return (user language):
- PR URL
- What changed (2–5 bullets)
- Gate E commands + results
- Gate A summary (AC covered?)
- Review loops / deferred non-blockers
- Explicit list of any user-waived BLOCKs
| Role | subagent_type |
When |
|---|---|---|
| Explore | explore |
unfamiliar area |
| Implement | generalPurpose |
large multi-file |
| Simplify | code-simplifier |
Phase 2b |
| Bug review | code-reviewer |
Phase 4a always |
| Structure | thermo-nuclear-code-quality-review |
Phase 4b always |
| Security | security-review |
auth/tokens/pay/crypto |
| Silent fail | silent-failure-hunter |
error/API status paths |
| Types | type-design-analyzer |
new contracts / nullability |
| Comments | comment-analyzer |
heavy comment/docs churn |
| Tests | pr-test-analyzer |
thin tests vs AC |
| CI | ci-investigator / ci-watcher |
CI red / watch |
Orchestrator must not mark Phase 4/5 done while BLOCK gates remain.
- Skipping Gate F because "small change" (minimum 4a+4b still required)
- Skipping simplify on a large messy diff
- Opening PR with red Gate E or incomplete Gate A
- Approving own diff without review agents
- Drive-by refactors / unrelated file churn
- New wrappers that add indirection without deleting complexity
- Force-push / amend unless user rules allow
- CHANGELOG on every issue (usually release-time)
- PHP 8.2+,
MiniShop3\…, logic inServices/ - Routes:
config/routes/web.php/manager.php+ matching controllers - Lexicons ru+en; no
CHANGELOG.mdunless asked - PR: Russian body +
.github/PULL_REQUEST_TEMPLATE.md+.cursor/rules/pull-request-creation.mdc - Gate E smoke:
php -ltouched PHP; phpunit undercore/components/minishop3/testswhen present; vueManager ESLint if Vue touched - Auth/token issues → always include
security-review+silent-failure-hunter