Skip to content

feat: PR lifecycle skill must detect and resolve merge conflicts before advancing stages #130

@diberry

Description

@diberry

Problem

The pr-lifecycle skill (.squad/skills/pr-lifecycle/SKILL.md) advances PRs through label-driven stages but does not handle merge conflicts. When Ralph tries to rebase a PR at the squad:pr-dina-approved stage, conflicts can stall the pipeline silently.

Expected Behavior

Ralph should:

  1. Detect conflicts before attempting rebase (check if branch can be cleanly rebased against dev)
  2. Attempt auto-resolution for simple conflicts (e.g., .squad/ state files with union merge driver)
  3. Report unresolvable conflicts by posting a comment on the PR listing the conflicting files
  4. NOT advance the label if conflicts remain -- leave the current stage label in place
  5. Add a squad:pr-conflict label so the conflict is visible in scans

Acceptance Criteria

  • pr-lifecycle SKILL.md updated with conflict detection at each stage transition
  • Ralph checks for conflicts before rebase (squad:pr-dina-approved stage)
  • Conflicts are reported as PR comments listing affected files
  • squad:pr-conflict label created and applied when conflicts found
  • Auto-resolution attempted for known safe patterns (union merge files)
  • PR does not advance stages while conflicts exist

Context

  • PR lifecycle skill: .squad/skills/pr-lifecycle/SKILL.md
  • Fork-first pipeline: .copilot/skills/diberry-squad-fork-first-pipeline/SKILL.md
  • This affects all repos in the project-dina fleet that use the pr-lifecycle pipeline

Source: project-dina HQ session 2026-03-31

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestgo:needs-researchNeeds investigationsquadSquad triage inbox — Lead will assign to a membersquad:archiveResolved by upstream or no longer applicablesquad:fidoAssigned to FIDO (Quality Owner)squad:flightAssigned to Flight (Lead)

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions