How to
Prepare a pull request
Write a local PR preview, then request approval to push and open it.
What changes
pr writes a local preview artifact without an external write. After editing, accept the safe preview in a separate local gate. Remote creation requires the accepted body, base branch, and Mission revision to remain unchanged, then asks before pushing or opening a PR.
When this helps
- The work item has an accepted plan plus current flow-required task and mission-level evidence ready for PR handoff.
- A reviewer wants the PR title and body before any external write.
- An edited preview is free of placeholders and machine-local paths and is ready for explicit acceptance.
Run this command
sumr mission pr SUM-123 --preview# local artifactsumr mission pr SUM-123 --accept-preview# accept reviewed copysumr mission pr SUM-123 --create-draft --base main# create from the accepted preview after readiness checksFlags you can use
--previewWrite a local PR preview artifact without pushing or creating a PR.
--accept-previewAccept the edited, placeholder-free preview for remote creation.
--create-draftAsk approval, push the branch, and create a draft pull request.
--createAsk approval, push the branch, and create a pull request.
--base <branch>Override the target branch.
--base-branch <branch>Alias for --base.
--allow-custom-keyAccept a work key that does not match a configured work-provider prefix. Use only for local or intentionally custom work.
--jsonReturn a structured JSON envelope for scripts, CI jobs, and AI assistants.
--help, -hShow the command syntax, supported flags, and examples without changing files.
Keep in mind
- Preview is the default mode and writes only local Mission state. Replace its TODO items, review it, then run
--accept-preview; create modes fail until that gate is complete. - Acceptance stores a content hash. If the preview changes afterward, review and accept it again before creation.
- Remote creation requires an accepted plan, every task gate and mission-level evidence gate required by the active flow, the recorded Mission branch, and an accepted preview whose body, base branch, and Mission revision remain unchanged and contain no placeholders or machine-local paths.
- Remote creation is available only when the configured repository provider reports
pullRequestCreation: true; otherwise use the local preview for manual handoff. mission.git.prModecontrols the boundary:previewrefuses remote creation,askpermits it after interactive approval, anddisabledrefuses PR assist.