Prompt Modifiers
Forensic Debugger Mode (Modifier)
A modifier to paste in with any audit prompt to change its scope, depth, evidence rules, or output format.
- Best for
- Prepending to any prompt when a specific bug must be proven before it is fixed — no product code changes until the root cause is demonstrated, three to five ranked hypotheses each with the observation that would confirm or refute it, diagnostic instrumentation added and the reproduction actually run with the output read, a timeline of expected versus actual execution for timing, concurrency, and state bugs, a minimal reproduction recipe with what makes an intermittent bug intermittent, and a stop rule that ends the session with a proven cause and the smallest fix that follows from it
- Use when
- A bug has survived one or more fixes that treated symptoms; failures are intermittent, timing-dependent, or appear only under load or on one environment; a race condition, memory leak, or state corruption is suspected; an incident review needs a demonstrated cause rather than a plausible story; or an agent proposed a fix without evidence of what was wrong
Prepend this to any other prompt to shift from find-and-fix to prove-the-cause-first.
You are operating in Forensic Debugger Mode. Do not change product logic yet. The job is to generate the evidence that proves the root cause, by instrumenting and running the reproduction, and only then to state the smallest fix that follows from the proof.
Modified Behavior
- No product fixes, but you do execute. Do not propose or make changes to product logic. Add diagnostic instrumentation, run the reproduction (tests, the development server, a request, the failing script), read the actual output, and remove the instrumentation afterwards unless asked to keep it.
- Ranked hypotheses: From the symptoms, state three to five hypotheses ranked by likelihood. For each, state the observation that would confirm it and the observation that would refute it, before running anything.
- Instrumentation per hypothesis: For each hypothesis, add the specific diagnostic output that would decide it: labelled log statements, debug macros, or tracing spans capturing the exact variables, timestamps, identifiers, and call sites, in the language's idiom. Record what each produced and which hypotheses it confirmed or killed.
- Sequence reconstruction: For timing, concurrency, ordering, or state bugs, produce a timeline of the expected execution order beside the observed order from the instrumentation, and mark the exact point where they diverge.
- Reproduction recipe: State the minimal steps, inputs, data, and conditions that trigger the bug. For intermittent bugs, state what makes them intermittent (timing, load, data shape, environment, concurrency) and how to raise the reproduction rate (delays, loops, fixtures, parallel runs).
- Stop rule: The session ends when one hypothesis is confirmed by output and the others are refuted or shown irrelevant. Then, and only then, state the smallest fix that follows from the proven cause, the regression test that would have caught it, and what would have to be true for the fix to be wrong.
What This Mode Does Not Change
The base prompt's subject area guides which hypotheses are plausible and which instrumentation is idiomatic. Combined with other modifiers, their scope rules apply; evidence rules are at least as strict as this mode's, which requires executed output for every conclusion.
When Not to Use
Do not use this mode for bugs whose cause is already demonstrated, for design or strategy prompts, or where nothing can be run in the session; in that case produce the hypotheses and the instrumentation plan and say the run is pending.
Output Format
Symptoms: the observed behaviour restated precisely, with environment and frequency.
Hypotheses (ranked):
| Rank | Hypothesis | Likelihood | Confirming observation | Refuting observation | Result after instrumentation |
|---|
Diagnostic plan and output: per hypothesis, the instrumentation added, where, and the actual output. Timeline (for timing and state bugs): expected versus observed with the divergence marked. Reproduction recipe. Proven cause with the evidence. Smallest fix, regression test, and what would make the fix wrong.
Want this applied to a live stack?
See the project work behind these tools, or start a conversation if you want help using one in context.