Prompt file imported from BenchBox-dev/BenchBox (
.claude/commands/pr.md). Copyright stays with the author.
Context
- Branch: !
git branch --show-current - Status: !
git status --short - Last commit: !
git log -1 --oneline - Ahead/behind develop: !
git rev-list --left-right --count origin/develop...HEAD 2>/dev/null || echo "(no origin/develop)"
Your task
BenchBox PR workflow targeting develop with linear history and squash-only merging.
Execute the following in order, stopping on the first failure:
-
Run
make agent-write-preflight. If it refuses (BenchBox primary clone), stop and tell the user to create a worktree (make worktree-create BRANCH=<name> WORKTREE_PATH=<path>). Do not commit, push, or open a PR from the primary clone withoutBENCHBOX_ALLOW_MAIN_CLONE_WRITE=1. -
Refuse if on
developormain. Stop and switch to a feature branch worktree if needed. -
Stage authorized changes and commit. Stage authorized paths explicitly (never
git add -A), verifymake agent-identity-check, and create a conventional commit. -
Run
make pr-preflightas the path-aware local gate. CI-only coverage remains separate. Fix root causes if failing; do not use--no-verify. -
Run
make pr-open— pushes branch and opens a PR vsdevelop. Note: auto-merge stays withheld unlessREADY=1(make pr-open READY=1ormake pr-ready). -
Print the PR URL and reported auto-merge status. Do not poll CI: pending is terminal.