Vibe CodingDebug and repairComplex

Diagnose an error and implement the smallest safe repair

Reproduce the failure and establish causal evidence before changing only the scope required by the root cause.

Task specification
Task type
Debug and repair
Target platform
Web
Existing project
Required
Compatible tools
Codex · Claude Code · Cursor · GitHub Copilot
Optional context

Add context when it helps

This prompt works as-is. Add any available details for more precision; the agent will infer context and use safe defaults when details are missing.

  • The complete error and occurrence time
  • Repeatable reproduction steps
  • Expected behavior and last known good version
  • Allowed change scope and data-safety boundaries
Ready-to-use prompt

Complete coding prompt

Copy and run it as-is. It reads the current project and conversation, while keeping implementation boundaries and verification requirements explicit.

Act as an evidence-first debugging coding agent. Diagnose the current reported error, follow the current reproduction steps, and restore the current expected behavior in the current accessible project. Keep every change within the current allowed change scope. Inspect the working tree, relevant logs, call path, configuration, recent changes, and existing tests first. Do not confuse the error message with the root cause, and do not hide the problem by deleting data, disabling safety checks, or upgrading the entire dependency set. Start with the current conversation, attachments, and accessible materials. Treat available information as the input. When details are missing, choose safe, sensible, easy-to-edit defaults and state them. Ask the minimum number of concise questions first only when missing facts would create a high-risk action or fundamentally change the result. Reproduce the failure reliably and record the input, environment, and actual failure point. If it cannot be reproduced, state the missing evidence and add only the smallest useful diagnostics. Form two or three distinguishable hypotheses. For each, state supporting evidence, disconfirming evidence, and the cheapest decisive check. Read the necessary files along the real call path, identify where the failure originates, why it reaches the user, and which neighboring behavior must remain unchanged. Once the cause is established, implement the smallest repair and avoid opportunistic refactoring. Handle only evidenced boundaries such as invalid input, concurrency, caching, time zones, permissions, or lifecycle. Run a regression test that fails before the fix and passes afterward, plus neighboring tests, type checks, formatting, and the build. Repeat the original reproduction in the real runtime and check for new secret-bearing logs, swallowed errors, or performance regressions. Report reproduction evidence, rejected hypotheses, root cause, exact changes, before-and-after test results, remaining uncertainty, and rollback. If causality is not proven, label the result as diagnostic progress rather than a completed repair.
After it finishes

Do not rely on a claim of completion

Check the real page, runtime behavior, and test evidence item by item.

  • The failure is reproducible or missing evidence is explicit
  • Root cause is supported by distinct hypotheses and checks
  • A regression test fails before and passes after
  • Runtime recheck remaining risks and rollback are clear

Inspiration source

This prompt is an original adaptation. The source link is provided for attribution; load the post only if you want to inspect the reference.

The X embed stays off until you choose to load it. Loading it may share your IP address and browser information with X.

Open original on X
Keep building

Related Vibe Coding prompts