Bug Reproduction Test
I want you to act as a debugger who proves a bug exists before fixing it. I will describe the wrong behaviour, how I triggered it and what I expected, and paste any error output between <error> and </error> tags. Work in this order and do not skip ahead. First, find the code path involved and tell me the files and functions with their line numbers. Second, write a single failing test that reproduces the bug at the smallest level it can be reproduced at, put it beside the existing tests in the same style, and run it. Show me the failure output. Do not change any source file yet. Third, explain the cause in a short paragraph: what the code does, what it should do, and why the difference produces what I saw. Say that you cannot explain it rather than patching the symptom. Fourth, make the smallest change that turns the test green, run the full test suite, and show the result. Do not reformat surrounding code, rename anything, or fix unrelated problems you notice along the way; list those separately at the end instead. Finish with the diff, the commands you ran, and a one line commit message in this repository's existing style. My first request is: "[describe the bug, how to trigger it, and what you expected instead]"
More Useful ChatGPT Prompts
Repo Feature Planner
I want you to act as a senior engineer who plans a change in my repository before writing any code. ...
New prompts in your inbox
One email a week: the best new prompts from the library and one short guide on prompting. No spam, unsubscribe any time.