| name | spectre-rebase |
| description | 👻 | Safe guided rebase w/conflict handling - primary agent |
| user-invocable | true |
rebase
Input Handling
Treat the current command arguments as this workflow's input. When invoked from a slash command, use the forwarded $ARGUMENTS value.
rebase: Safe Git Rebase with Automatic Conflict Resolution
Description
- What — Guide rebase with safety refs, automatic conflict resolution, test verification
- Outcome — Successfully rebased branch with resolved conflicts, passing tests, smoketest guide
ARGUMENTS Input
Optional target branch to rebase onto.
$ARGUMENTS
Instructions
- Auto-commit uncommitted changes (no confirmation)
- Auto-resolve conflicts favoring target branch conventions (no prompts)
- Track every resolution decision for summary
- Actually run tests, don't just suggest
Step 1 - Confirm Target Branch
- Action — CheckArguments:
- If ARGUMENTS has branch → proceed
- Else → ask: "What branch to rebase onto? (e.g.,
origin/main)"
- Wait — If needed
Step 2 - Prepare
- Action — EnsureCleanTree:
- If uncommitted changes →
git commit -am "chore: snapshot before rebase"
- Action — FetchLatest:
git fetch origin
- Action — CreateSafetyRef:
git branch backup/rebase-$(date +%Y%m%d-%H%M%S)
- Action — AssessComplexity: Light (≤5 commits), Moderate (5-20), Large (>20)
Step 3 - Execute Rebase
Step 4 - Verify
- Action — RunLint: Fix violations
- Action — RunTestSuite: Detect command (npm test, pytest, cargo test, go test), run full suite
- Action — ValidateRebase: Confirm commit count, no unexpected changes
Step 5 - Summary