| name | create-pr |
| description | Propose, draft, or create a pull request by delegating to a subagent |
When proposing, drafting, or creating a Pull Request, you MUST ALWAYS delegate
to a subagent. NEVER create or draft PRs directly in the main conversation.
Instructions
- Code Review Audit: Launch a subagent with
review-code to verify
git diff conforms to all rules (news entry in news/, line wrapping,
copyright, conventions, Starlark formatting). Fix any issues before
proceeding.
- Launch Subagent: Use
invoke_subagent (TypeName: "self").
- Subagent Prompt Instructions:
- Follow
CONTRIBUTING.md and @/.agents/rules/pr.md.
- PR Title: Conventional commits format (
agents: prefix for agent
rules/skills).
- PR Body: Explain why and conceptual how. Wrap strictly at 72
columns max. Use concise, active phrasing (Strunk & White).
- Artifact Requirements: Create
pr_info.md with:
- User-facing: Published directly in the user interface.
- Interactive feedback enabled: Allows selecting lines and leaving
inline comments on the draft (
RequestFeedback: true).
- User decision choices: Present choices:
- Create a regular PR
- Create a draft PR
- Provide feedback on the draft text
- Discard the draft text
- Propose vs. Create: If proposing or drafting a PR, do NOT run
gh pr create—only create the pr_info.md artifact. Only execute
gh pr create when explicitly requested to create the PR.
- Targeting Upstream Repo: When creating, target upstream using
--repo bazel-contrib/rules_python and --head <fork_owner>:<branch>.
- Return Status: Direct subagent to report PR number/draft status to
caller.
- Link Artifact Before Asking: Upon subagent completion, output a
clickable markdown link to
pr_info.md before prompting for confirmation.
- Interactive Actions: When presenting choices via
ask_question, always
include the clickable markdown link to pr_info.md in the question
prompt.