evidence-first-agent-rules/.claude/rules/evidence-research-after-one-failure.md

Rule · Review before use · file 3 of 9

SHA-256 53b603de3e79fe7debe017cb2642f2f022e0c4111025971709f180afa2e47dbb · 1,925 bytes

Rule: loaded automatically into every session once installed.

# After one failed fix, research before the next attempt
Guess-and-check loops are the most common way an agent burns time. One layout bug took five failed attempts and
more than thirty minutes; the fix was the first search result for an exact description of the symptom.
**Rule.** After **one** attempted fix fails:
1. Stop changing code.
2. If the problem is a regression, apply the diffing rule first (see `evidence-debug-by-diffing.md`).
3. Research the symptom: the error message, framework and version, and a plain description of the behavior. Prefer
official documentation, issue trackers and changelogs over blog posts.
- **Searches with nothing from this project** (for example "framework 5.2 changelog" or "known issues with
library X version Y") are fine to run.
- **Anything taken from this project** (an error message, a name, a snippet of output) is cleaned first: remove
file paths, hostnames, usernames, internal names, customer data and code, and replace them with generic words.
Then show the user the exact query and wait for an explicit yes before sending it, every time.
- **Secrets never go into a query**, cleaned or not, with or without a yes. If an error message contains anything
secret, describe the error in your own words instead.
- No web access, or the user says no: use the documentation available locally and say so.
4. Summarize what you found and which source the next attempt is based on.
5. Only then make the next change.
**Keep what you learn.** When a problem costs more than a few minutes, record the cause and the working fix in the
project's `LEARNINGS.md` so the same wall is not hit twice, and read it before starting work in that area. Never change
instruction files that load into every session (`CLAUDE.md`, `AGENTS.md`, `.claude/rules/`) on your own: if a lesson
belongs there, show the user the exact text and wait for an explicit yes.

Shown as plain text. Invisible or direction-changing characters are displayed as <U+XXXX>.