npx skills add ...
npx skills add openshift/lightspeed-service --skill rebase-clean
npx skills add openshift/lightspeed-service --skill rebase-clean
Performs a strict clean rebase of a feature branch onto main with minimal conflict resolution and full validation. Use when the user asks to rebase carefully, avoid extra branches, avoid exploratory edits, and run make test-unit, make test-integration, and make verify until green.
Use this workflow exactly for rebases in this repository.
git branch --show-current.I detected '<current-branch>' as the current branch. Should I rebase this branch?Use this step only when a prior rebase attempt failed or introduced unwanted edits. For a first rebase attempt, skip this step and go directly to Step 2.
origin.Command pattern:
Run:
If conflicts occur, resolve only the conflicted files. Do not add extra refactors.
For each conflicted file:
ours or theirs) as a temporary base.Then:
Repeat until rebase completes.
Run these checks against the approved pre-rebase baseline (backup/base commit):
Acceptance criteria:
range-diff (rewritten SHAs are fine).git merge-base --is-ancestor origin/main HEAD succeeds (exit code 0).If any check fails, treat as code-loss risk and restart from Step 1.
Run exactly:
If validation or code-loss checks fail at any point:
Report only:
make test-unit resultmake test-integration resultmake verify resultDo not include unrelated diagnostics.
git range-diff origin/main...<approved-base> origin/main...HEAD
git diff --name-status <approved-base>..HEAD
git merge-base --is-ancestor origin/main HEAD
git log --left-right --cherry-pick --oneline origin/main...HEADmake test-unit && make test-integration && make verify