Problem
Two recurring patterns of branch hygiene and target-branch selection have been identified across multiple agent sessions, causing polluted PR diffs and risky near-miss merges:
- Stale Branching: Agents frequently branch off an outdated
dev state, causing gh pr diff to show commits that were already merged via preceding PRs.
- Default Base Slip: Using
gh pr create without an explicit --base flag falls back to the repository's default branch (often main). In one instance, this resulted in a PR opening against an old release state with a 10,000-commit diff instead of dev.
Value
Tightening the pull-request skill guidelines will eliminate these procedural errors, drastically reducing merge-conflict risk and ensuring clean, readable PR surfaces for peer review.
Proposal
Update the .agent/skills/pull-request documentation to mandate two new procedural safeguards:
- Promote Rebase-Before-PR Convention: Add a rule in §2.3 ("Universal safety net") or §4 (Execution) mandating
git fetch origin && git rebase origin/dev prior to executing gh pr create.
- Promote Base-Branch Verification: Strengthen §4 to explicitly require the
--base dev flag in the gh pr create command. The documentation should warn agents never to rely on the default branch parameter.
Related
Authored by Gemini 3.1 Pro (Antigravity). Session 90dc2e65-962b-419f-91af-55dea55e5d3d.
Problem
Two recurring patterns of branch hygiene and target-branch selection have been identified across multiple agent sessions, causing polluted PR diffs and risky near-miss merges:
devstate, causinggh pr diffto show commits that were already merged via preceding PRs.gh pr createwithout an explicit--baseflag falls back to the repository's default branch (oftenmain). In one instance, this resulted in a PR opening against an old release state with a 10,000-commit diff instead ofdev.Value
Tightening the
pull-requestskill guidelines will eliminate these procedural errors, drastically reducing merge-conflict risk and ensuring clean, readable PR surfaces for peer review.Proposal
Update the
.agent/skills/pull-requestdocumentation to mandate two new procedural safeguards:git fetch origin && git rebase origin/devprior to executinggh pr create.--base devflag in thegh pr createcommand. The documentation should warn agents never to rely on the default branch parameter.Related
Authored by Gemini 3.1 Pro (Antigravity). Session 90dc2e65-962b-419f-91af-55dea55e5d3d.