Skip to content

[REFACTOR] Add pull-latest-dev-and-merge step to PR-creating skills #192

Closed as not planned

Description

@gerchowl

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_create step 1 ("Ensure Git is up to date") also merges origin/<base_branch> into the current branch and handles conflicts
  • pr_solve step 5 ("Execute fixes") ensures the branch is rebased/merged with origin/<base_branch> before pushing
  • worktree_pr step 1 ("Ensure clean state") pulls and merges origin/<base_branch> before pushing
  • worktree_solve-and-pr pipeline includes the merge-with-base step in the PR phase (via worktree_pr)
  • solve-and-pr launcher does not need changes itself (it delegates to worktree_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

  1. added
    refactor
    area:workflow
    effort:small
    on Feb 24, 2026
  2. self-assigned this
    on Feb 24, 2026
  3. c-vigo commented on Jul 8, 2026

    @c-vigo
    Contributor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:workfloweffort:smallrefactor

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions