DEVELOPMENT WORKBOOK
Debugging prompts
Work through 14 debugging tasks. Open a brief to see its worked example, customise the variables and copy the completed prompt.
← All categoriesDiagnose a midnight date shift Intermediate
Trace where a date-only value becomes a timezone-aware instant.
Recommended tools: OpenAI Codex or Claude Code
Complete prompt
Trace the fault using local synthetic evidence for {{project}}. Trace where a date-only value becomes a timezone-aware instant.
Use this case: {{scenario}}. Clarify any missing policy before choosing defaults. Deliver a ranked hypothesis list, one discriminating check and a narrow correction. Separate observations from hypotheses; state what would disprove the leading explanation.
Acceptance criterion: {{criterion}} Explain how a reviewer can independently check it.Expected output
A ranked hypothesis list, one discriminating check and a narrow correction. The trace compares the original date string with stored and rendered values.
Worked example
Input: birthday displayed one day early after saving. Passing result: The trace compares the original date string with stored and rendered values.
Common mistakes
- Treating the normal path as sufficient without checking this case: birthday displayed one day early after saving.
- Reporting a pass without evidence for the acceptance criterion.
Follow-up prompts
- Construct a contrasting case in which this result should not hold: The trace compares the original date string with stored and rendered values.
- For “Diagnose a midnight date shift”, show the smallest evidence a second reviewer would need before sign-off.
Find a double-click cart increment Intermediate
Distinguish repeated events from duplicated state updates.
Recommended tools: OpenAI Codex or Claude Code
Complete prompt
Trace the fault using local synthetic evidence for {{project}}. Distinguish repeated events from duplicated state updates.
Use this case: {{scenario}}. Clarify any missing policy before choosing defaults. Deliver a ranked hypothesis list, one discriminating check and a narrow correction. Separate observations from hypotheses; state what would disprove the leading explanation.
Acceptance criterion: {{criterion}} Explain how a reviewer can independently check it.Expected output
A ranked hypothesis list, one discriminating check and a narrow correction. A counted listener trace separates two handlers from two dispatches.
Worked example
Input: one tap sometimes adds two items. Passing result: A counted listener trace separates two handlers from two dispatches.
Common mistakes
- Treating the normal path as sufficient without checking this case: one tap sometimes adds two items.
- Reporting a pass without evidence for the acceptance criterion.
Follow-up prompts
- Construct a contrasting case in which this result should not hold: A counted listener trace separates two handlers from two dispatches.
- For “Find a double-click cart increment”, show the smallest evidence a second reviewer would need before sign-off.
Explain vanishing filter selections Intermediate
Locate the state reset during a results refresh.
Recommended tools: OpenAI Codex or Claude Code
Complete prompt
Trace the fault using local synthetic evidence for {{project}}. Locate the state reset during a results refresh.
Use this case: {{scenario}}. Clarify any missing policy before choosing defaults. Deliver a ranked hypothesis list, one discriminating check and a narrow correction. Separate observations from hypotheses; state what would disprove the leading explanation.
Acceptance criterion: {{criterion}} Explain how a reviewer can independently check it.Expected output
A ranked hypothesis list, one discriminating check and a narrow correction. The check compares option identifiers before and after refresh.
Worked example
Input: selecting Kumasi unticks after new data arrives. Passing result: The check compares option identifiers before and after refresh.
Common mistakes
- Treating the normal path as sufficient without checking this case: selecting Kumasi unticks after new data arrives.
- Reporting a pass without evidence for the acceptance criterion.
Follow-up prompts
- Construct a contrasting case in which this result should not hold: The check compares option identifiers before and after refresh.
- For “Explain vanishing filter selections”, show the smallest evidence a second reviewer would need before sign-off.
Investigate a frozen progress bar Intermediate
Separate stalled work from delayed progress rendering.
Recommended tools: OpenAI Codex or Claude Code
Complete prompt
Trace the fault using local synthetic evidence for {{project}}. Separate stalled work from delayed progress rendering.
Use this case: {{scenario}}. Clarify any missing policy before choosing defaults. Deliver a ranked hypothesis list, one discriminating check and a narrow correction. Separate observations from hypotheses; state what would disprove the leading explanation.
Acceptance criterion: {{criterion}} Explain how a reviewer can independently check it.Expected output
A ranked hypothesis list, one discriminating check and a narrow correction. The trace compares terminal job state to the last rendered state.
Worked example
Input: import finishes but bar remains at 70%. Passing result: The trace compares terminal job state to the last rendered state.
Common mistakes
- Treating the normal path as sufficient without checking this case: import finishes but bar remains at 70%.
- Reporting a pass without evidence for the acceptance criterion.
Follow-up prompts
- Construct a contrasting case in which this result should not hold: The trace compares terminal job state to the last rendered state.
- For “Investigate a frozen progress bar”, show the smallest evidence a second reviewer would need before sign-off.
Correct a decimal total mismatch Intermediate
Identify where rounding happens across line items.
Recommended tools: OpenAI Codex or Claude Code
Complete prompt
Trace the fault using local synthetic evidence for {{project}}. Identify where rounding happens across line items.
Use this case: {{scenario}}. Clarify any missing policy before choosing defaults. Deliver a ranked hypothesis list, one discriminating check and a narrow correction. Separate observations from hypotheses; state what would disprove the leading explanation.
Acceptance criterion: {{criterion}} Explain how a reviewer can independently check it.Expected output
A ranked hypothesis list, one discriminating check and a narrow correction. A fixture distinguishes per-line rounding from final-total rounding.
Worked example
Input: sum of displayed prices differs from invoice total. Passing result: A fixture distinguishes per-line rounding from final-total rounding.
Common mistakes
- Treating the normal path as sufficient without checking this case: sum of displayed prices differs from invoice total.
- Reporting a pass without evidence for the acceptance criterion.
Follow-up prompts
- Construct a contrasting case in which this result should not hold: A fixture distinguishes per-line rounding from final-total rounding.
- For “Correct a decimal total mismatch”, show the smallest evidence a second reviewer would need before sign-off.
Trace focus lost after deletion Intermediate
Find why keyboard focus jumps to the document body.
Recommended tools: OpenAI Codex or Claude Code
Complete prompt
Trace the fault using local synthetic evidence for {{project}}. Find why keyboard focus jumps to the document body.
Use this case: {{scenario}}. Clarify any missing policy before choosing defaults. Deliver a ranked hypothesis list, one discriminating check and a narrow correction. Separate observations from hypotheses; state what would disprove the leading explanation.
Acceptance criterion: {{criterion}} Explain how a reviewer can independently check it.Expected output
A ranked hypothesis list, one discriminating check and a narrow correction. The correction moves focus to the surviving adjacent action.
Worked example
Input: delete the middle row in a list. Passing result: The correction moves focus to the surviving adjacent action.
Common mistakes
- Treating the normal path as sufficient without checking this case: delete the middle row in a list.
- Reporting a pass without evidence for the acceptance criterion.
Follow-up prompts
- Construct a contrasting case in which this result should not hold: The correction moves focus to the surviving adjacent action.
- For “Trace focus lost after deletion”, show the smallest evidence a second reviewer would need before sign-off.
Investigate stale search results Intermediate
Determine whether an older request overwrote a newer query.
Recommended tools: OpenAI Codex or Claude Code
Complete prompt
Trace the fault using local synthetic evidence for {{project}}. Determine whether an older request overwrote a newer query.
Use this case: {{scenario}}. Clarify any missing policy before choosing defaults. Deliver a ranked hypothesis list, one discriminating check and a narrow correction. Separate observations from hypotheses; state what would disprove the leading explanation.
Acceptance criterion: {{criterion}} Explain how a reviewer can independently check it.Expected output
A ranked hypothesis list, one discriminating check and a narrow correction. The final visible results belong to tamale.
Worked example
Input: slow search for ta completes after tamale. Passing result: The final visible results belong to tamale.
Common mistakes
- Treating the normal path as sufficient without checking this case: slow search for ta completes after tamale.
- Reporting a pass without evidence for the acceptance criterion.
Follow-up prompts
- Construct a contrasting case in which this result should not hold: The final visible results belong to tamale.
- For “Investigate stale search results”, show the smallest evidence a second reviewer would need before sign-off.
Explain an empty CSV first row Intermediate
Distinguish encoding markers from column-name errors.
Recommended tools: OpenAI Codex or Claude Code
Complete prompt
Trace the fault using local synthetic evidence for {{project}}. Distinguish encoding markers from column-name errors.
Use this case: {{scenario}}. Clarify any missing policy before choosing defaults. Deliver a ranked hypothesis list, one discriminating check and a narrow correction. Separate observations from hypotheses; state what would disprove the leading explanation.
Acceptance criterion: {{criterion}} Explain how a reviewer can independently check it.Expected output
A ranked hypothesis list, one discriminating check and a narrow correction. The diagnostic compares actual header code points to the expected label.
Worked example
Input: first column visually reads Name but lookup fails. Passing result: The diagnostic compares actual header code points to the expected label.
Common mistakes
- Treating the normal path as sufficient without checking this case: first column visually reads Name but lookup fails.
- Reporting a pass without evidence for the acceptance criterion.
Follow-up prompts
- Construct a contrasting case in which this result should not hold: The diagnostic compares actual header code points to the expected label.
- For “Explain an empty CSV first row”, show the smallest evidence a second reviewer would need before sign-off.
Diagnose duplicated scheduled reports Intermediate
Locate overlap between job scheduling and worker retries.
Recommended tools: OpenAI Codex or Claude Code
Complete prompt
Trace the fault using local synthetic evidence for {{project}}. Locate overlap between job scheduling and worker retries.
Use this case: {{scenario}}. Clarify any missing policy before choosing defaults. Deliver a ranked hypothesis list, one discriminating check and a narrow correction. Separate observations from hypotheses; state what would disprove the leading explanation.
Acceptance criterion: {{criterion}} Explain how a reviewer can independently check it.Expected output
A ranked hypothesis list, one discriminating check and a narrow correction. Two run identifiers distinguish duplicate scheduling from repeat delivery.
Worked example
Input: same weekly summary appears twice. Passing result: Two run identifiers distinguish duplicate scheduling from repeat delivery.
Common mistakes
- Treating the normal path as sufficient without checking this case: same weekly summary appears twice.
- Reporting a pass without evidence for the acceptance criterion.
Follow-up prompts
- Construct a contrasting case in which this result should not hold: Two run identifiers distinguish duplicate scheduling from repeat delivery.
- For “Diagnose duplicated scheduled reports”, show the smallest evidence a second reviewer would need before sign-off.
Repair a sticky loading skeleton Intermediate
Ensure every return path exits the loading state.
Recommended tools: OpenAI Codex or Claude Code
Complete prompt
Trace the fault using local synthetic evidence for {{project}}. Ensure every return path exits the loading state.
Use this case: {{scenario}}. Clarify any missing policy before choosing defaults. Deliver a ranked hypothesis list, one discriminating check and a narrow correction. Separate observations from hypotheses; state what would disprove the leading explanation.
Acceptance criterion: {{criterion}} Explain how a reviewer can independently check it.Expected output
A ranked hypothesis list, one discriminating check and a narrow correction. A zero-item result reaches an explicit empty state.
Worked example
Input: empty successful response leaves shimmer visible. Passing result: A zero-item result reaches an explicit empty state.
Common mistakes
- Treating the normal path as sufficient without checking this case: empty successful response leaves shimmer visible.
- Reporting a pass without evidence for the acceptance criterion.
Follow-up prompts
- Construct a contrasting case in which this result should not hold: A zero-item result reaches an explicit empty state.
- For “Repair a sticky loading skeleton”, show the smallest evidence a second reviewer would need before sign-off.
Investigate broken deep links Intermediate
Separate server routing from client route parsing.
Recommended tools: OpenAI Codex or Claude Code
Complete prompt
Trace the fault using local synthetic evidence for {{project}}. Separate server routing from client route parsing.
Use this case: {{scenario}}. Clarify any missing policy before choosing defaults. Deliver a ranked hypothesis list, one discriminating check and a narrow correction. Separate observations from hypotheses; state what would disprove the leading explanation.
Acceptance criterion: {{criterion}} Explain how a reviewer can independently check it.Expected output
A ranked hypothesis list, one discriminating check and a narrow correction. Direct navigation and in-app navigation are compared separately.
Worked example
Input: refreshing a shared course URL gives not found. Passing result: Direct navigation and in-app navigation are compared separately.
Common mistakes
- Treating the normal path as sufficient without checking this case: refreshing a shared course URL gives not found.
- Reporting a pass without evidence for the acceptance criterion.
Follow-up prompts
- Construct a contrasting case in which this result should not hold: Direct navigation and in-app navigation are compared separately.
- For “Investigate broken deep links”, show the smallest evidence a second reviewer would need before sign-off.
Explain a one-page print cutoff Intermediate
Isolate height and overflow rules affecting print output.
Recommended tools: OpenAI Codex or Claude Code
Complete prompt
Trace the fault using local synthetic evidence for {{project}}. Isolate height and overflow rules affecting print output.
Use this case: {{scenario}}. Clarify any missing policy before choosing defaults. Deliver a ranked hypothesis list, one discriminating check and a narrow correction. Separate observations from hypotheses; state what would disprove the leading explanation.
Acceptance criterion: {{criterion}} Explain how a reviewer can independently check it.Expected output
A ranked hypothesis list, one discriminating check and a narrow correction. The print fixture verifies both first and final rows are present.
Worked example
Input: page two disappears only when printing. Passing result: The print fixture verifies both first and final rows are present.
Common mistakes
- Treating the normal path as sufficient without checking this case: page two disappears only when printing.
- Reporting a pass without evidence for the acceptance criterion.
Follow-up prompts
- Construct a contrasting case in which this result should not hold: The print fixture verifies both first and final rows are present.
- For “Explain a one-page print cutoff”, show the smallest evidence a second reviewer would need before sign-off.
Trace swapped list rows Intermediate
Distinguish unstable render keys from incorrect sorting.
Recommended tools: OpenAI Codex or Claude Code
Complete prompt
Trace the fault using local synthetic evidence for {{project}}. Distinguish unstable render keys from incorrect sorting.
Use this case: {{scenario}}. Clarify any missing policy before choosing defaults. Deliver a ranked hypothesis list, one discriminating check and a narrow correction. Separate observations from hypotheses; state what would disprove the leading explanation.
Acceptance criterion: {{criterion}} Explain how a reviewer can independently check it.Expected output
A ranked hypothesis list, one discriminating check and a narrow correction. The check tracks persistent record IDs through the sort.
Worked example
Input: editing one pupil changes another after sorting. Passing result: The check tracks persistent record IDs through the sort.
Common mistakes
- Treating the normal path as sufficient without checking this case: editing one pupil changes another after sorting.
- Reporting a pass without evidence for the acceptance criterion.
Follow-up prompts
- Construct a contrasting case in which this result should not hold: The check tracks persistent record IDs through the sort.
- For “Trace swapped list rows”, show the smallest evidence a second reviewer would need before sign-off.