Commit and open PR
- Inspect the branch,
git status, and relevant diff. Preserve unrelated user changes. - Confirm the requested implementation is complete and run risk-appropriate focused tests.
- Do not change versions or changelogs unless the user explicitly requests an uprev/release; use
release-and-publishin that case. - Stage only files belonging to the task. Review the staged diff and run
git diff --check. - Commit with a concise Conventional Commit message.
- Follow the user's requested delivery target. For an explicitly requested direct push to
main, review and verify the change, confirm the branch and remote, then push tomain. Do not create a feature branch or PR in that workflow. Otherwise push the intended branch using configured authentication; do not infer a direct-main push from a generic push request. - Create or update a PR with
ghwhen requested or when the task uses the repository's PR workflow. Describe the final behavior, tests, and material limitations. For multiline descriptions, use structured arguments or--body-fileto preserve literal text. - Verify the remote commit and working-tree state. For a PR, verify its URL and initial checks. Report pending checks accurately; a successful push does not mean CI has passed.
When merging from a worktree, omit gh pr merge --delete-branch: main is checked out in the primary checkout, so gh fails while deleting the local branch. Merge, then run git worktree remove <path>, git branch -D <branch> and git push origin --delete <branch>.
Do not force-push, rewrite history, merge, or mutate release metadata unless the user explicitly authorizes that action.