send-pr
/send-pr — Pull Request Submission
You are an AI assistant assembling and submitting a pull request for a completed bug fix. Follow the procedure below precisely.
Step 0: Load Context
- The workspace may contain multiple repositories, each with its own
agents.mdat its root. Identify the relevant repository and read itsagents.md. If it doesn't exist, stop and tell the developer to create one (point them toagents.md.template). Verify it contains the Contribution Guidelines section. - Read
.ai/code-review-report.md. Verify the verdict is "Ready for PR". If not, stop and tell the developer the code review must pass via/code-reviewfirst. - Read
.ai/issue-analysis.mdfor the issue details. - Read
.ai/implementation-plan.mdfor the fix description. - Read
.ai/plan-review-report.mdfor any implementation notes.
Step 1: Verify Branch
Ensure changes are committed on a properly named branch per agents.md > Branch Naming.
If the developer is on the wrong branch or changes aren't committed:
- Suggest the correct branch name format.
- Ask the developer to commit and push changes before proceeding.
Step 2: Read PR Template
Load the PR template from .github/PULL_REQUEST_TEMPLATE.md (or the path specified in agents.md > Contribution Guidelines > PR Template Location).
If no template exists, use a sensible default but warn the developer.
Step 3: Populate PR Description
Fill in each section of the PR template using content from the .ai/ artifacts:
- Issue reference: Link to the original GitHub issue.
- Root cause summary: From
issue-analysis.mdandimplementation-plan.md. - Fix description: From
implementation-plan.md > SummaryandImplementation Details. - Test plan: From
implementation-plan.md > Test Plan. - Breaking changes: From
implementation-plan.md > Impact Assessment.
Step 4: Apply Labels
Using agents.md > Contribution Guidelines > Labels & Categories, select the appropriate labels:
- Bug label (e.g.,
bug) - Component label (e.g.,
component/identity) - Severity label if applicable
- Any other relevant labels
Step 5: Set Metadata
- Link the issue (use
Fixes #IDorCloses #IDsyntax in the PR body). - Assign reviewers if specified in
agents.md > Contribution Guidelines > PR Process. - Set the milestone if applicable.
Step 6: Create the PR
Use gh pr create to submit the PR with the populated template, labels, and metadata.
Important: Before creating the PR, show the developer:
- The PR title
- The full PR body
- The labels to be applied
- The reviewers to be assigned
Wait for the developer's confirmation before actually submitting.
Step 7: Post-PR Summary
After the PR is created, add a comment on the PR linking to all .ai/ artifacts for reviewer context:
## AI-Assisted Bug Fix Context
This PR was created with AI assistance. The following artifacts document the full analysis and decision trail:
- **Issue Analysis:** Summary of bug classification, reproduction, and root cause hypothesis
- **Implementation Plan:** Detailed plan including files modified, code approach, and test plan
- **Plan Review:** Independent validation of the implementation plan
- **Code Review:** Automated code review findings
All artifacts are available in the `.ai/` directory of this branch.
Important Rules
- Never push without confirmation. Always show the developer the PR details and wait for approval.
- Follow the repo's conventions. Use the exact PR template, label scheme, and branch naming from
agents.md. - Link everything. The PR must reference the issue, and the artifacts must be discoverable from the PR.
- If the PR template is not found, use a sensible default but warn the developer about the missing template.
- After the PR is created, provide the PR URL to the developer and remind them to review it before requesting reviews.
More from tharsanan1/wso2-se-agent-skills
create-tests
Write unit and integration tests for a reproduced bug based on issue-analysis-<issue_number>.md.
45verify-fix
Verify whether a GitHub issue is fixed in the local codebase. User provides a GitHub issue URL, the skill fetches it, extracts reproduction steps, builds the product from source, runs the reproduction steps, and reports whether the issue still exists or not.
43reproduce
Analyze a GitHub issue, reproduce the bug, and produce a structured issue analysis artifact.
42plan-fix
Plan and implement a fix for a reproduced issue using its issue analysis artifact.
18submit-fix
Create PRs for the fix across all changed repos and track everything in a local fix report.
16review-plan
Independently validate the implementation plan before code is written. Acts as a quality gate.
1