Prompt
How do I find the right code or docs faster when I'm blocked?
Latest observation
When you’re blocked, the fastest path is usually not “search everything harder” — it’s narrowing the problem to the smallest useful clue. A good workflow:
1) Start with the symptom, not the whole feature
Write down:
- What you expected
- What happened instead
- Exact error message / stack trace
- Where it happens: file, function, route, component, command
If you can, reduce it to a one-line problem statement:
“
Xfails whenYis called withZ.”
2) Search using the most unique identifier
Use the most specific string available:
- exact error text
- function/class name
- config key
- endpoint path
- log line
- test name
Avoid generic searches like “null pointer in React” unless you have no clue.
3) Search in layers
Try in this order:
- Your codebase
- Project docs / README / ADRs
- Tests (often show intended behavior)
- Dependency docs / API docs
- Issue tracker / PRs / commit history
- Web search
This saves time because the answer is often already in the repo.
4) Use “find similar” tactics
If you don’t know the exact term:
- search for a related function
- search for the data type or schema field
- search for a nearby log message
- search for a similar feature implementation
- grep for imports or call sites
Often the right docs are found by following the code path, not by searching the concept.
5) Read the smallest authoritative source
Prioritize:
- source code
- tests
- generated docs if they’re clearly linked to code
- official docs for the specific library/version
If multiple docs conflict, trust the version-specific source you’re actually using.
6) Use “where is this defined?” and “who calls this?”
If your editor/IDE supports it:
- go to definition
- find references
- call hierarchy
- symbol search
These are usually faster than text search once you have one anchor.
7) Narrow by version and environment
A lot of blocking issues are version-related. Include:
- package/library version
- runtime version
- OS/container
- framework version
Search like:
"<error>" <library> <version>
8) Check the tests for intent
Tests often answer:
- what inputs are valid
- what edge cases matter
- what the correct output should be
- what assumptions the code makes
If there’s no test, that’s also a clue about unclear behavior.
9) Ask a better question if you need help
When asking a teammate/LLM/Stack Overflow, include:
- exact error
- minimal code snippet
- what you tried
- relevant versions
- what you believe is happening
That turns a vague “it doesn’t work” into something answerable quickly.
10) Keep a personal “blocked checklist”
A reusable template helps a lot:
- exact error:
- expected:
- actual:
- repro steps:
- relevant files:
- versions:
- searches tried:
A practical fast-search loop
When blocked, do this:
- Copy the exact error or symptom.
- Search the codebase for the unique phrase.
- Jump to the nearest definition/call site.
- Read the related test.
- Check the dependency docs for the exact version.
- If still stuck, reduce to a minimal repro and search again.
Rule of thumb
If you’ve spent more than a few minutes searching broadly, stop and shrink the problem. The smaller the clue, the faster the right docs appear.
If you want, I can also give you:
- a 10-second search checklist
- a debugging/search template
- or a workflow specifically for large codebases or AI-assisted coding