Pull Request Workflow
Purpose
A complete workflow for creating, developing, and submitting pull requests following project conventions.
Workflow Phases
Phase 1: Branch Setup
- •
Ensure clean state:
bashgit status
- •
Create feature branch:
bashgit checkout -b <type>/<description>
Branch naming convention:
- •
feat/<description>- New features - •
fix/<description>- Bug fixes - •
docs/<description>- Documentation - •
refactor/<description>- Code refactoring - •
test/<description>- Test additions/fixes
- •
Phase 2: Development
- •Make changes following project conventions
- •Run quality checks:
bash
make lint make test
- •Fix any issues using
lint-and-fixandtest-and-fixskills
Phase 3: Pre-PR Verification
Before creating PR, run full verification:
- •
Invoke verifier agent: Use the
verifiersubagent to run complete build → lint → test cycle - •
Review changes:
bashgit diff main...HEAD
- •
Invoke code-reviewer agent (optional but recommended): Use the
code-revieweragent for quality assessment
Phase 4: Commit Changes
- •
Stage files:
bashgit add <specific-files>
Avoid
git add -A- be explicit about what's committed. - •
Create commit:
bashgit commit -m "type(scope): description"
Conventional commit types:
- •
feat: New feature - •
fix: Bug fix - •
docs: Documentation - •
style: Formatting (no code change) - •
refactor: Code restructuring - •
test: Test changes - •
chore: Maintenance tasks
- •
Phase 5: Create Pull Request
- •
Push branch:
bashgit push -u origin <branch-name>
- •
Create PR using gh CLI:
bashgh pr create --title "type(scope): description" --body "$(cat <<'EOF' ## Summary - Brief description of changes - Key implementation details ## Changes - List of specific changes made ## Testing - [ ] Unit tests pass - [ ] Lint checks pass - [ ] Manual testing done (if applicable) ## Related Issues Closes #<issue-number> (if applicable) EOF )"
PR Description Template
markdown
## Summary [1-3 sentences describing what this PR does and why] ## Changes - [Specific change 1] - [Specific change 2] - [Specific change 3] ## Testing - [ ] All tests pass (`make test`) - [ ] Linting passes (`make lint`) - [ ] Build succeeds (`make build`) - [ ] Manual testing completed (if applicable) ## Checklist - [ ] Code follows project style guidelines - [ ] Self-review completed - [ ] Documentation updated (if needed) - [ ] No sensitive data committed
Quick Commands Reference
| Task | Command |
|---|---|
| Check branch status | git status |
| View changes | git diff |
| Stage all changes | git add -A |
| Stage specific file | git add <file> |
| Commit changes | git commit -m "message" |
| Push branch | git push -u origin <branch> |
| Create PR | gh pr create |
| View PR status | gh pr status |
| List open PRs | gh pr list |
Troubleshooting
PR Checks Failing
- •Run
make lint && make testlocally - •Fix any issues
- •Push fixes:
git add . && git commit -m "fix: address PR feedback" && git push
Merge Conflicts
- •Fetch latest:
git fetch origin main - •Rebase:
git rebase origin/main - •Resolve conflicts
- •Continue:
git rebase --continue - •Force push:
git push --force-with-lease