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
Before you start

Prepare this information

Fill in the essential material before handing the task to a coding agent.

  • The complete error and occurrence time
  • Repeatable reproduction steps
  • Expected behavior and last known good version
  • Allowed change scope and data-safety boundaries
Copy-ready template

Complete task template

Replace the placeholders in braces. Implementation boundaries and verification requirements are already included.

Act as an evidence-first debugging coding agent. Diagnose {reported error}, follow {reproduction steps}, and restore {expected behavior} in {project environment}. Keep every change within {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. 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 X post appears below, and you can also open it directly on X.

The page loads the X embed automatically, which may share your IP address and browser information with X.

Open original on X

Loading the X post…

Keep building

Related Vibe Coding prompts