Back to loops
Testingevent

Post-Merge Regression Guard

Hook that runs smoke tests after git merge or rebase to catch integration regressions immediately.

0 views0 usesby solo lemon.

// parameters

Triggerevent
Max iterations10
Check commandnpm run test:smoke
Exit conditionSmoke tests pass after merge

// run_this_loop

Copy the kickoff into your agent first. The blueprint below explains how the loop evaluates progress and when it should stop.

Open in CursorOpen in Claude

Use loop copies the kickoff prompt. Share copies the loop link. Open in Cursor / Claude only pre-fill that prompt — they do not install hook files. Download loop saves the loop as post-merge-regression-guard.md.

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.

// blueprint

The loop contract: target outcome, execution sequence, checks, stopping condition, and safety constraints.

Goal

smoke tests pass immediately after every merge or rebase.

// loop_sequence

// loop_sequence_diagram.json
closed loop

Trigger

event event

Actions block

2 steps
1Detect merge
2Run smoke suite

Feedback gate

Evaluate: npm run test:smoke

Run the check, read the output, then decide whether the loop is complete.

Check failed

Repeat actions with the latest feedback.

Success

Smoke tests pass after merge

Safety capMax 10 iterations

// steps

  1. 1
    Detect merge

    Confirm a merge or rebase just completed. Identify affected areas from the diff stat.

  2. 2
    Run smoke suite

    Run the fast smoke test suite. Fix any failures before starting new feature work.

    npm run test:smoke