From dx-core
Create a pull request after all plan steps are complete. Verifies all steps are done, generates PR description from share-plan.md, pushes branch, and creates PR via ADO MCP tools. Use as the final step in the execution pipeline.
npx claudepluginhub easingthemes/dx-aem-flow --plugin dx-coreThis skill is limited to using the following tools:
You create a pull request for the completed implementation.
Creates GitHub PRs from branch, issue, and plan details using gh CLI, with formatted body closing the issue and detailing implementation, changes, and testing.
Analyzes git branch changes, runs code review swarm, generates friendly PR description and structured test plan, then pushes and creates GitHub pull request. Triggered by 'create a PR' or /pr-create.
Creates GitHub Pull Requests with commit analysis, task completion validation from spec files, Conventional Commits title and description generation, label suggestions, and test execution. Use when preparing branches for review.
Share bugs, ideas, or general feedback.
You create a pull request for the completed implementation.
Before anything else, read these files:
shared/git-rules.md — all git/ADO conventions (base branch discovery, repo ID discovery, PR creation, rebase).ai/config.yaml — project config, SCM settingsFollow every rule in git-rules.md. The steps below assume you have read it.
Read shared/hub-dispatch.md for hub detection logic.
If hub mode is active (hub.enabled: true AND cwd is .hub/):
.ai/config.yaml → repos: liststate/<ticket-id>/results/ for repos with status: completedrepos[].no-pr: true → skip, print: <repo> — pushed (no PR)cd <repo.path> && claude -p "/dx-pr <ticket-id>" --output-format json --allowedTools "Bash,Read,Edit,Write,Glob,Grep" --permission-mode bypassPermissionsPRs created:
- Repo-A: #38001 (https://...)
- Repo-B: pushed (no PR)
If hub mode is not active: continue with normal flow below.
If .ai/me.md exists, read it. Use it to shape the PR description text. PR format constraints (summary + changes + test plan) always apply. If .ai/me.md doesn't exist, use defaults.
SPEC_DIR=$(bash .ai/lib/dx-common.sh find-spec-dir $ARGUMENTS)
Read implement.md from $SPEC_DIR.
Parse implement.md and check that ALL steps have **Status:** done.
If any step is pending, in-progress, or blocked:
/dx-step or /dx-step-all first."Parse implement.md's YAML frontmatter provenance: block (if present):
Verified status (hard gate):
verified: false → print diagnostic and STOP:
⚠ PR blocked: implement.md has not passed verification.
Current state:
verified: false
confidence: <confidence>
last modified: <file mtime>
Next step: Run `/dx-step-verify` to validate build, lint, tests, and code review.
After verification passes, re-run `/dx-pr` to create the pull request.
verified: true → continueConfidence advisory (soft warning, does not block):
confidence: low → print: "⚠ Implementation plan has low confidence — PR reviewers should scrutinize carefully."confidence: medium or high → no warningPR description enrichment:
### Provenance section in the PR description:
### Provenance
- **Plan confidence:** <confidence>
- **Verified by:** dx-step-verify ✅
- **Model tier:** <model>
If superpowers:finishing-a-development-branch is available, invoke it to verify branch readiness.
Fallback (if superpowers not installed): Before pushing:
development, not master/main).mcp__ado__repo_get_repo_by_name_or_id)Read from $SPEC_DIR:
share-plan.md — for PR description (preferred)explain.md — for requirements summary (fallback)implement.md — for step listExtract:
2416553)#<ID> <short description>. The #<ID> prefix is mandatory. Description from implement.md header or share-plan.md, kept under 70 characters total.git push -u origin $(git branch --show-current)
If rejected after rebase, use --force-with-lease per git-rules.md.
Use mcp__ado__repo_create_pull_request per git-rules.md:
refs/heads/<current-branch>refs/heads/$BASE_BRANCH (auto-discovered, never hardcoded)#<ID> <short description><ADO-ID> to auto-link the work item## Pull Request Created
**PR:** <PR URL from ADO response>
**Title:** <title>
**Base:** $BASE_BRANCH ← <branch>
**Steps completed:** <N>/<N>
### Post-PR checklist:
- [ ] Review PR diff in ADO
- [ ] Verify ADO work item is linked
- [ ] Request reviews from team
/dx-pr 2435084
Verifies all steps in implement.md are done, generates PR description from share-plan.md, pushes branch, creates ADO PR targeting the configured base branch with work item linked.
/dx-pr 2435084
If .ai/me.md exists, uses the persona to shape the PR description text while maintaining the standard format (summary + changes + test plan).
Cause: Some steps in implement.md are still pending, in-progress, or blocked.
Fix: Run /dx-step-all to complete remaining steps, or /dx-step one at a time.
Cause: Remote branch has diverged (e.g., after a rebase upstream).
Fix: The skill uses --force-with-lease only after a rebase. If push fails for other reasons, it reports the error for manual resolution.
Cause: Repo ID discovery failed — mcp__ado__repo_get_repo_by_name_or_id needs the correct ADO project name.
Fix: Check .ai/config.yaml scm.project matches the ADO project where the repo lives. Remember repos need a GUID, not a name.
shared/git-rules.md and follow all conventions.mcp__ado__repo_create_pull_request, never gh CLIworkItems parameter--force-with-lease)