| name | create-pr |
| description | Prepare the worktree for submission — commit, push, and generate a PR description. |
| trigger | User requests a pull request, says "/pr", "create PR", "submit", or "push for review" |
| route | create-pr |
| output-contract | Structured PR description with Summary, Changes, Testing, and Breaking Changes sections; push confirmation or blocked status |
Creating a Pull Request
Pre-flight checks
- Ensure all tests pass:
result = await self.shell.run("uv run pytest tests/ -q", timeout=180)
assert result.returncode == 0
- Ensure lint is clean:
result = await self.shell.run("uv run ruff check src/", timeout=30)
assert result.returncode == 0
- Review the diff for unintended changes:
result = await self.shell.run("git diff --stat HEAD~1")
print(result.stdout)
Commit
Write a clear, conventional commit message:
await self.shell.run('git add -A')
await self.shell.run('git commit -m "feat: add user authentication with JWT"')
Format: <type>: <imperative summary>
- Types: feat, fix, refactor, docs, test, chore
- Summary: lowercase, no period, ≤72 chars
Generate PR description
Produce a structured description:
## Summary
<1-2 sentences: what changed and why>
## Changes
- <bullet list of key modifications>
## Testing
- <how it was verified: test commands, manual steps>
## Breaking Changes
- <any API/behaviour changes that affect consumers, or "None">
Push
result = await self.shell.run("git push -u origin HEAD", timeout=30)
print(result.stdout)
If push fails due to network restrictions, inform the user and provide the
branch name so they can push manually.
Rules
- Never force-push.
- Never push to main/master directly — always a feature branch.
- Include test evidence in the PR description.
- If verification failed, do NOT push — report blocked status.