Add Diagnostics Before Guessing

Instrument first, theorize second — logging with a stated plan for capturing the failure.

Intermediate1 min read

Customize

Fill these in and the prompt below updates as you type. Anything you leave blank stays as a placeholder.

Your prompt

1 placeholder left
This bug is intermittent and I cannot reproduce it reliably.

Add targeted logging around the suspected area in {{path}}, explain what each log line will tell us, and give me a plan to capture the failure.

Do not change logic yet.

Similar prompts

Bisect a Regression

Walk the history between a known-good commit and main to find the culprit diff.

Reproduce, Then Fix

Force a failing test that captures the bug before any fix is allowed to land.

Check the Diff Against the Plan

Audit finished work against the plan it was supposed to follow — gaps only, no style notes.

Commit and Open a PR

Close out a session with a why-focused commit and a PR that carries a test plan.