Debug a Tricky Bug
Coding
A disciplined loop for bugs that do not have an obvious cause.
Prompt
Step 1 — Reproduce Describe the exact symptom, inputs, and environment. Ask the AI to list the smallest reliable reproduction steps and what info is still missing. Step 2 — Hypothesize Share the repro plus relevant code/logs. Ask for a ranked list of likely root causes with a quick check for each. Step 3 — Isolate Work the top hypotheses. Paste results of each check and let the AI narrow to the actual cause. Step 4 — Fix & verify Get the minimal fix, then ask for a regression test that would have caught this bug. Confirm it fails before and passes after.
Use this prompt in AIniverse
Tap to copy, run it on ChatGPT / Claude / Gemini, save to your stack, or remix.
Open in AppMore Coding prompts
Independent Verifier Pass
When implementation claims done, a separate verifier pass runs build, lint, and tests with no access to the implement...
API Contract Until Match
Loop until API responses match the OpenAPI or JSON Schema contract — catch drift between docs and implementation.
De-Sloppify Pass
After implementation, run a cleanup pass: remove debug code, tighten naming, delete dead branches, and align with pro...
Merge Conflict Resolver
Rebase or merge target branch, resolve conflicts file by file, and loop until the branch is current and tests pass.