Skip to content

feat: add intelligent conflict resolution to rebase skill#173

Open
andyhorn wants to merge 1 commit into
mainfrom
feat/rebase-skill-conflict-resolution
Open

feat: add intelligent conflict resolution to rebase skill#173
andyhorn wants to merge 1 commit 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

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 requested a review from a team as a code owner April 20, 2026 17:03
Comment thread skills/rebase/SKILL.md

Abort the rebase:
- Both sides added imports or list items — combine both sets, deduplicate, maintain sort order
- Generated files (`.g.dart`, `.freezed.dart`, `.gen.dart`, lock files) — take the current branch version; note that regeneration is needed after rebase completes
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are Flutter-specific. We're trying to build a tech-agnostic plugin here, so I'd keep the generated files general without specifics.

Comment thread skills/rebase/SKILL.md
Report how many commits ahead of the base branch:
Report success briefly:

- How many commits were replayed (`git rev-list --count origin/<base-branch>..HEAD`)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Im not sure 100% it needs to be there but this might be added to allowed-tools, to not ask user for allow running this. This is safe command

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