What you need to know
Which tool for which job
| Tool | Searches or changes | Example |
|---|---|---|
| Grep | File contents, by pattern | Every caller of calculateTax; every place that throws RateLimitExceeded |
| Glob | File paths, by name pattern | Every test file: **/*.test.tsx |
| Read | One whole file | Load a file to understand or change it |
| Write | One whole file | Create a file, or replace one entirely |
| Edit | Part of a file, by unique text match | Change one line in a 2,000-line file |
| Bash | Commands | Run tests, a build, git |
The distinction the exam tests most is Grep versus Glob: contents versus names. Finding files called *.test.tsx is Glob; finding files that contain "PaymentDeclinedError" is Grep.
Edit, and when it fails
Edit replaces a piece of text that must appear exactly once in the file. For a small change in a large file it is preferred over rewriting the whole file, because nothing else can be lost or altered by accident.
If the anchor text is not unique (the same boilerplate appears six times), Edit fails. Two good responses:
- Include more surrounding text so the match becomes unique.
- Fall back to Read the whole file, make the change in the full text, and Write it back.
Build understanding incrementally
Asked "how does billing work?", an agent that reads all 30 files in the directory fills its context before it has answered anything. The better approach:
- Grep for entry points: exported functions, main classes, route handlers.
- Read those files.
- Follow imports and calls with further Reads, only along the paths that matter.
Tracing through wrappers
When a function is re-exported through wrapper modules (sometimes under a different name), a single Grep for its original name misses callers. First find every name it is exported under, then Grep for each name.
Grep "calculate_tax" in pricing/ -> defined in pricing/tax.py
Grep "from pricing.tax import" -> re-exported as compute_tax in billing/__init__.py
Grep "compute_tax|calculate_tax" in src -> all real call sites
In the exam
Scenario 4 (developer productivity) is the home of these questions: a pair of search tasks to match to Grep and Glob, a failing Edit, an agent drowning in file reads, or callers missed through wrappers.
Check your understanding
You need (a) every file named *.test.tsx and (b) every file containing "PaymentDeclinedError". Which tools?
Show answer
Answer: D. Glob matches file names and paths; Grep searches inside files. Reading every file would waste context.
An Edit fails because its anchor text appears six times in the file. What should the agent do?
Show answer
Answer: B. Edit needs a unique match. Reading the full file and writing the modified version back is the reliable fallback (a longer, unique anchor also works).
Asked how billing works, an agent reads all 30 billing files and runs out of context. What is the better approach?
Show answer
Answer: C. Incremental exploration finds the entry points and follows only the paths that matter, so the context holds what is relevant.
Apply it: Lakeshore's exploration recipe
Write the tool recipe Lakeshore's agent should follow for three common requests.
- "Find every place that throws
RateLimitExceeded." Name the tool and pattern. - "List every integration test file." They end in
IT.javaand live anywhere in the tree. - "How does a booking become an invoice?" Write the first four tool calls.
- "Rename
calculateTaxeverywhere." Allow for wrapper modules, and say what to do if an Edit anchor is not unique.
Show model answer
- Grep for
throw new RateLimitExceeded(andRateLimitExceeded(to catch factories) across the repository. - Glob for
**/*IT.java. - Grep for
class .*Booking.*Service|createInvoiceto find entry points; Read the booking service; Grep for the invoice method it calls; Read the invoice service it leads to. Continue only along that path. - Grep for the definition and for every import or re-export of
calculateTaxto collect all its exported names; Grep for each name to find call sites; Edit each site. Where an anchor repeats, widen it with surrounding lines, or Read the file, change all occurrences and Write it back.