| 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