Skip to content

feat: add intelligent conflict resolution to rebase skill#173

Open
andyhorn wants to merge 6 commits into
mainfrom
feat/rebase-skill-conflict-resolution
Open

feat: add intelligent conflict resolution to rebase skill#173
andyhorn wants to merge 6 commits into
mainfrom
feat/rebase-skill-conflict-resolution

Conversation

@andyhorn

Copy link
Copy Markdown

Summary

  • Replaces the abort-on-conflict behavior with step-by-step conflict resolution: identify conflicted files, auto-resolve clear cases (imports, generated files, whitespace), and ask the user on ambiguous logic changes
  • Adds recovery step (git rebase --abort) as a safety net for bad states
  • Adds explicit rules: no force-push without consent, no squash/reorder, prefer inclusion, always recommend build/test/format/analyze

Test plan

  • Verify /rebase on a branch with no conflicts completes cleanly and reports commit count
  • Verify /rebase on a branch with auto-resolvable conflicts (import additions, whitespace) resolves without user intervention
  • Verify /rebase on a branch with ambiguous logic conflicts stops and asks the user
  • Verify recovery path aborts cleanly and restores stashed changes
  • Verify force-push is warned about but never executed automatically

🤖 Generated with Claude Code

@andyhorn andyhorn requested a review from a team as a code owner April 20, 2026 17:03
Comment thread skills/rebase/SKILL.md Outdated
Comment thread skills/rebase/SKILL.md
@ryzizub

ryzizub commented May 25, 2026

Copy link
Copy Markdown
Contributor

@andyhorn can i ask you to rebase and address comments? thank you! ❤️

Replace the abort-on-conflict behavior with a step-by-step conflict
resolution workflow: identify conflicted files, auto-resolve clear
cases (imports, generated files, whitespace), ask the user on
ambiguous logic changes, and report all resolutions. Add recovery
step and explicit rules for safe rebase behavior.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@andyhorn andyhorn force-pushed the feat/rebase-skill-conflict-resolution branch from 369977f to f20da58 Compare June 11, 2026 15:53
andyhorn and others added 5 commits June 11, 2026 08:55
Replace Dart-specific generated file extensions with a general
description of generated and lock files.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Pre-approve the read-only git queries the rebase skill runs (rev-parse,
rev-list, status, merge-base, diff) plus git add, so conflict resolution
isn't interrupted by permission prompts for safe commands.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Grant the Read and Edit tools the conflict-resolution step needs to read
and rewrite conflicted files, and add a GIT_EDITOR=true allowlist entry.
Run `git rebase --continue` with GIT_EDITOR=true so a commit-message
editor cannot hang the agent, and stop-and-report on non-conflict
failures (e.g. a pre-commit hook) instead of looping. Generalize the
post-resolution verify wording, rename "Step 5: Recovery" to a
conditional "Recovery (if needed)" heading, and bump effort to medium.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Reword generated/lock-file resolution to resolve by content and warn
that --ours/--theirs are reversed during a rebase, avoiding accidental
loss of upstream changes. Require explicit user confirmation when one
side modified code the other deleted, since auto-keeping resurrects a
file the other side intentionally removed. Drop the redundant
low-confidence bullet already covered by "When in doubt, ask."

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Suggest running the project's checks after a clean rebase too, since a
clean rebase can still introduce semantic conflicts, and dedupe the
stash-pop guidance by pointing the clean path at Step 4d. Generalize the
verify wording away from a Dart/Flutter-flavored gate, add a rule to
stage only resolved files (never git add -A), and rewrite the scope
statement so it no longer contradicts the conflict-resolution edits.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants