Prompt · Debug, Test
Track down a flaky test
Find out why a test fails some of the time before anyone changes the test.
/investigate The checkout total test fails about one run in ten in CI. Find the cause before changing the test.$investigate The checkout total test fails about one run in ten in CI. Find the cause before changing the test.@planr-investigate The checkout total test fails about one run in ten in CI. Find the cause before changing the test.If /investigate runs another command, use /planr:investigate.
With the OpenPlanr plugin for Codex, use $planr:investigate.
Cursor applies the planr-investigate rule when you mention it in chat.
Why this works
Investigate traces the call path, state, configuration, and recent changes, then runs the cheapest checks that tell competing causes apart. Asking for the cause first keeps the fix on the code instead of on the test.
Related prompts
Diagnose a failure without changing code
Get the root cause and the evidence for it, with no edits until you decide on a fix.
Find the root cause before you fix it
Reproduce the defect, establish why it happens, then apply a bounded fix.
Test the change in a real browser
Check routes, forms, phone sizes, accessibility, console, and network behavior.