AIniverse Get the App

Investigation Script Loop

Coding by loops! by elorm

Write a small throwaway script to reproduce a bug, run it, read output, and iterate until the root cause is proven.

Prompt

Step 1 — Write probe script
Create a ~20-line script that reproduces the bug or queries the failing state. One file only.

Step 2 — Run and read
Execute the script and capture stdout/stderr. No guessing — read actual output.

Step 3 — Adjust hypothesis
Update the script or notes based on output. Stop when root cause is demonstrated.

Step 4 — Repeat until done
Repeat the steps above until: Root cause demonstrated by script output with a written summary

Stop after 8 iterations and report what is blocking.
Platforms
CHATGPTCLAUDE

Use this prompt in AIniverse

Tap to copy, run it on ChatGPT / Claude / Gemini, save to your stack, or remix.

Open in App

More Coding prompts

Independent Verifier Pass

When implementation claims done, a separate verifier pass runs build, lint, and tests with no access to the implement...

API Contract Until Match

Loop until API responses match the OpenAPI or JSON Schema contract — catch drift between docs and implementation.

De-Sloppify Pass

After implementation, run a cleanup pass: remove debug code, tighten naming, delete dead branches, and align with pro...

Merge Conflict Resolver

Rebase or merge target branch, resolve conflicts file by file, and loop until the branch is current and tests pass.