name: prepare-pr description: Prepare a branch for review by committing scoped changes, rebasing on main, running builds, and creating or updating a pull request. Use when the user wants the branch ready for PR review.
Prepare PR
This is a high-trust workflow. Surface any destructive or ambiguous step before proceeding.
Workflow:
- Group current changes into logical commits, ideally by done-plan.
- Create focused commits without staging unrelated work.
- Fetch and rebase onto
origin/main. - Resolve obvious conflicts directly. Ask the user about semantic conflicts.
- Run the relevant build steps and fix straightforward failures.
- Create or update the PR with a summary built from the plans and current diff.
- Push with
--force-with-leaseonly when rebase made it necessary.
Rules:
- Never use blanket staging.
- Treat secrets and credentials as stop conditions.
- Keep build-fix commits separate when they are distinct from the feature work.
- If GitHub CLI or network access is unavailable, report exactly where the flow stopped.