Find which change caused a regression
Creates a systematic plan to pinpoint the commit, deploy, or config change that broke something that used to work.
The prompt
Help me track down which change caused a regression.
What broke: [BEHAVIOR NOW vs. BEFORE]
When it was last known to work: [DATE, VERSION, OR COMMIT]
When it was first noticed: [DATE, VERSION, OR COMMIT]
What changed in between: [COMMITS, DEPLOYS, DEPENDENCY BUMPS, CONFIG OR FEATURE FLAG CHANGES, INFRASTRUCTURE OR DATA CHANGES - paste what you have]
Can I reproduce it? [YES, HOW / SOMETIMES / ONLY IN PRODUCTION]
Version control and build: [e.g. "git, monorepo, 10-minute build"]
Steps:
1. List all the categories of change that could explain it, not just code: dependencies, lock files, environment variables, flags, infrastructure, data, third-party APIs, browser or OS updates.
2. Rank the suspects using the evidence I gave.
3. Write a reliable, ideally automated, check that returns pass/fail for the bug, so it can drive a bisect.
4. Give the exact `git bisect` workflow, including `git bisect run` with my check script, how to skip commits that don't build, and how to handle merge commits.
5. If the cause may not be in code, give an equivalent way to bisect config, dependency versions, or deploys.
6. Once found: how to confirm it's really the cause (revert locally and retest) and how to write a regression test so it can't return.
Return the ranked suspect list, the check script, the step-by-step commands, and a short note I can post to the team once I find the culprit.
Highlighted [brackets] are blanks to replace with your own details.
Fill in the blanks and use this promptMore Software Development prompts
What to fill in
- BEHAVIOR NOW vs. BEFORE
- DATE, VERSION, OR COMMIT
- YES, HOW / SOMETIMES / ONLY IN PRODUCTION
- e.g. "git, monorepo, 10-minute build"
How this prompt is built
This prompt follows the Chain-of-Thought structure (Chain-of-thought prompting). A chain-of-thought prompt asks the model to work through a problem step by step before giving its answer, which tends to help on reasoning, planning and multi-part questions.
Related prompts
- Get unstuck on a coding error with hints instead of the answerA plain-English explanation of your error and step-by-step hints, so you learn to debug instead of copying a fix.
- Fix a Git problemStep-by-step help for merge conflicts, undoing mistakes, branching, and recovering lost work.
- Explain what a piece of code doesPlain-language walkthrough of unfamiliar code: purpose, flow, key parts, and gotchas.
- Break my first coding project into small buildable stepsA milestone plan where every step leaves you with a working program and tells you what to learn next.