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-codeto verifygit diffconforms to all rules (news entry innews/, line wrapping, copyright, conventions, Starlark formatting). Fix any issues before proceeding. - Launch Subagent: Use
invoke_subagent(TypeName: "self"). - Subagent Prompt Instructions:
- Follow
CONTRIBUTING.mdand@/.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.mdwith:- 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 thepr_info.mdartifact. Only executegh pr createwhen explicitly requested to create the PR. - Targeting Upstream Repo: When creating, target upstream using
--repo bazel-contrib/rules_pythonand--head <fork_owner>:<branch>.
- Follow
- 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.mdbefore prompting for confirmation. - Interactive Actions: When presenting choices via
ask_question, always include the clickable markdown link topr_info.mdin thequestionprompt.