open-pr
Open PR
Run this manually after implement-copy has committed the current branch. The run is done when the latest base-branch changes are integrated, the updated work is verified and pushed, and the PR is open against the explicit base branch. Never merge it.
Prepare the branch
-
Require a clean worktree, a named topic branch, and at least one commit not in the base branch. Leave intended changes for the user to commit before continuing.
-
Read the base branch from
docs/agents/branching.md, the same source of truth used byimplement-copy. If the file is missing or ambiguous, inspectgit branch -r, propose the likely integration branch, and ask the user to confirm it. Never guess the PR target. -
Stay on the topic branch and bring in the latest remote base:
git fetch origin git merge --no-edit origin/<base-branch>Follow an explicit repository rebase policy when one exists. If integration conflicts, resolve them by the intent of both branches and finish the merge or rebase before continuing.
-
Run each of the repository's relevant automated checks once after integration. A failure gets exactly one rerun, to tell a flake from a defect. Fix a defect you can name; on anything else — a repeat failure you cannot explain, or a rerun that passes — halt and report both outputs verbatim, so the user makes the call. Run every manual test needed to cover user-visible behavior, or preserve the numbered manual test script for the user when the check requires their access or judgment. In either case, give the user a reproducible manual test script whose every step names its expected observable result.
-
Push the topic branch to
origin. Check whether it already has an open PR; return that PR instead of creating a duplicate.