Skip to content

docs: add conflict resolution guidance to /review skill#476

Merged
carlos-alm merged 2 commits intomainfrom
fix/review-skill-conflict-guidance
Mar 17, 2026
Merged

docs: add conflict resolution guidance to /review skill#476
carlos-alm merged 2 commits intomainfrom
fix/review-skill-conflict-guidance

Conversation

@carlos-alm
Copy link
Contributor

Summary

  • Adds explicit instructions to the /review skill's conflict resolution step (2b) to check PR commit history and reviewer comments before choosing which side of a conflict to keep
  • Prevents incorrect resolutions where the review agent blindly picks a side without understanding why each version exists

Context

During conflict resolution on #475, the template-literal syntax was the PR's intentional change but was nearly discarded in favor of main's stale concatenation. The review skill lacked guidance to check why each side differs before resolving.

Test plan

  • Run /review on a PR with conflicts and verify it checks commit history before resolving

@claude
Copy link

claude bot commented Mar 17, 2026

Claude encountered an error —— View job


I'll analyze this and get back to you.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Mar 17, 2026

Greptile Summary

This PR replaces the terse one-liner "Resolve all conflicts by reading the conflicting files…" in the /review skill with a thorough, multi-step checklist that forces the agent to understand the why behind each side of a conflict before touching it. The motivation is sound — a real incident on #475 nearly discarded an intentional template-literal change in favour of stale string concatenation from main.

The added guidance is a clear improvement: it covers PR description context, commit history for both sides, reviewer comments, and a merge-base diff check. The previous review thread's concern (only one side of the conflict was inspected) has been addressed by adding the git log HEAD..origin/<base-branch> command.

Key issues found:

  • The git log --oneline HEAD..origin/<base-branch> -- <file> command for inspecting the base-branch side is present in both bullet 3 and bullet 4, with identical intent. The only unique content in bullet 4 is the suggestion to read the merged PR descriptions, which could be folded into bullet 3 to eliminate the duplication.

Confidence Score: 4/5

  • Safe to merge after addressing the duplicate git log bullet.
  • The change is documentation-only and a net improvement. The single redundancy (duplicated git command across bullets 3 and 4) is a clarity issue rather than a correctness bug, but it is worth fixing before merging to avoid confusing the agent.
  • .claude/skills/review/SKILL.md — specifically lines 65–67 where the base-branch log command is duplicated.

Important Files Changed

Filename Overview
.claude/skills/review/SKILL.md Adds detailed conflict-resolution guidance to step 2b; improvement is solid but the git log HEAD..origin/<base-branch> -- <file> command is duplicated across bullet 3 and bullet 4, creating redundancy that could confuse the agent.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Conflict detected] --> B[git merge origin/base-branch]
    B --> C{Conflicts?}
    C -- No --> Z[Stage & commit & push]
    C -- Yes --> D[Read PR description\ngh pr view]
    D --> E[git log PR side\norigin/base..HEAD -- file]
    E --> F[git log base side\nHEAD..origin/base -- file\n⚠ duplicated in bullets 3 & 4]
    F --> G[Read reviewer comments\ngh api pulls/comments + issues/comments]
    G --> H[git diff merge-base\nIntentional vs stale?]
    H --> I{Decision}
    I -- PR changed deliberately\nbase is stale --> J[Keep PR version]
    I -- base introduced fix\nPR lacks it --> K[Keep base version]
    I -- Both sides changed\nintentionally --> L[Manually merge both]
    J --> Z
    K --> Z
    L --> Z
Loading

Last reviewed commit: ff33639

@carlos-alm
Copy link
Contributor Author

@greptileai

When resolving merge conflicts, the review skill must check PR commit
history and reviewer comments before choosing which side to keep —
never assume based on syntax alone.
Expand the /review skill's conflict guidance to require reading the PR
description, linked issues, and main-side commit history — not just the
PR's own commits and reviewer comments. If you don't know why a line
exists, you cannot resolve the conflict correctly.
@carlos-alm carlos-alm force-pushed the fix/review-skill-conflict-guidance branch from ff33639 to 1d9e968 Compare March 17, 2026 01:45
@carlos-alm carlos-alm merged commit e760dad into main Mar 17, 2026
13 checks passed
@carlos-alm carlos-alm deleted the fix/review-skill-conflict-guidance branch March 17, 2026 01:46
@github-actions github-actions bot locked and limited conversation to collaborators Mar 17, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant