Repository navigation
Description
Description
The PR-creating skills (pr_create, pr_solve, worktree_pr, solve-and-pr, worktree_solve-and-pr) do not ensure the branch is up to date with origin/dev (or the target base branch) before creating a pull request. This can lead to PRs with merge conflicts or stale code.
Each of these skills should pull the latest target branch from origin and resolve any merge conflicts before creating the PR.
Files / Modules in Scope
.cursor/skills/pr_create/SKILL.md.cursor/skills/pr_solve/SKILL.md.cursor/skills/solve-and-pr/SKILL.md.cursor/skills/worktree_pr/SKILL.md.cursor/skills/worktree_solve-and-pr/SKILL.md
Out of Scope
- No changes to non-PR-creating skills
- No changes to the underlying git infrastructure or justfile recipes
Invariants / Constraints
- All existing skill workflows must continue to function as before
- The merge/rebase step must happen before the PR is created, not after
- If merge conflicts cannot be resolved automatically, the skill must stop and report the conflict (interactive skills) or post a comment asking for help (autonomous skills)
- No behavior change to other workflow steps
Acceptance Criteria
-
pr_createstep 1 ("Ensure Git is up to date") also mergesorigin/<base_branch>into the current branch and handles conflicts -
pr_solvestep 5 ("Execute fixes") ensures the branch is rebased/merged withorigin/<base_branch>before pushing -
worktree_prstep 1 ("Ensure clean state") pulls and mergesorigin/<base_branch>before pushing -
worktree_solve-and-prpipeline includes the merge-with-base step in the PR phase (viaworktree_pr) -
solve-and-prlauncher does not need changes itself (it delegates toworktree_solve-and-pr), but verify this - Conflict handling is documented: interactive skills ask the user, autonomous skills post a question via
worktree_ask - TDD compliance (see
.cursor/rules/tdd.mdc)
Changelog Category
No changelog needed
Additional Context
Currently pr_create fetches and pulls the current branch but does not merge the base branch. worktree_pr fetches and pushes but similarly skips merging the base. pr_solve handles merge conflicts as "manual action required" but doesn't proactively pull latest before fixing. This refactoring makes the "pull latest base, resolve conflicts" step a consistent pre-PR gate across all five skills.
Activity
refactor(skills): add pull-latest-base-before-pr to PR-creating skills
feat(skills): add pull-latest-base-before-pr to PR-creating skills (#192
c-vigo commentedon Jul 8, 2026
Closing as part of an agreed backlog cleanup (with @gerchowl) — valid but dormant, no work in progress since the Nix migration. Reopen or refile fresh if picked up.