Post-Merge Regression Guard
Hook that runs smoke tests after git merge or rebase to catch integration regressions immediately.
Kickoff prompt
Install and run the "Post-Merge Regression Guard" loop.
Goal: smoke tests pass immediately after every merge or rebase.
Between iterations run: npm run test:smoke
Exit when: smoke suite exits 0.
Step 1: After a merge, run smoke tests. Fix regressions before continuing other work.Basic information
Category
Testing
Goal
smoke tests pass immediately after every merge or rebase.
Check command
npm run test:smoke
Exit when
smoke suite exits 0.
Supported agents
Cursor
Steps
- 1
Detect merge
Confirm a merge or rebase just completed. Identify affected areas from the diff stat.
- 2
Run smoke suite
Run the fast smoke test suite. Fix any failures before starting new feature work.
npm run test:smoke
More Testing loops
Build Until Green
Run the production build, fix compile and bundling errors, and loop until the build succeeds.
Coverage Until Threshold
Add focused tests until coverage meets your threshold (e.g. 80%), without changing production behavior unnecessarily.
Pre-Commit Guard
Hook that runs tests before git commit commands to block commits when the suite is red.
Post-Edit Test Guard
Hook-based loop that runs related tests after file edits to catch regressions early.
Format Until Clean
Run the formatter, fix any remaining style issues, and loop until the codebase formats cleanly with no diffs.
Flaky Test Triage
Run failing tests repeatedly, classify each failure as flaky or real, and fix only confirmed regressions.