From 04efa2d72ec527eed2e6ba17f47ddee12725bd14 Mon Sep 17 00:00:00 2001 From: Zhang Jiahao Date: Tue, 21 Apr 2026 00:37:01 +0800 Subject: [PATCH] Refine locate tooling notes based on hands-on testing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit eza 的 --tree 在没有路径参数时会静默输出空结果,实测踩坑,需 明确写出必须加 `.`;broot 实测需要 TTY 且首次运行会改 shell rc, 对 CLI/Claude Code 没有增量价值,标注跳过避免后续误用。 --- CLAUDE.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CLAUDE.md b/CLAUDE.md index 126bf64..7f4177e 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -29,8 +29,9 @@ Behavioral guidelines to reduce common LLM coding mistakes. Merge with project-s 1. **Locate**: find the relevant files, functions, call sites, and tests. Quote or cite the existing code before proposing changes. If you can't locate it, say so — don't guess. - For mature/unfamiliar repos, prefer structured scans: - `repomix -o /tmp/x.xml` (or `repomix `) — full-repo LLM pack; slice by subdir if > 100k tokens - - `eza --tree --git-ignore --level=3` for layout; `fd ` for files; `rg ` for call sites + - `eza --tree --git-ignore --level=3 .` for layout (⚠️ path arg required, omitting it silently prints nothing); `fd ` for files; `rg ` for call sites - `git ls-files` when tokens are tight + - skip `broot` — interactive-only, no value in CLI/pipeline context 2. **Plan**: state the intended change in one or two sentences. List assumptions and open questions. Give a rough estimate of **token consumption** (reads + writes + tool calls) and **wall-clock time** so the user can redirect early if the scope is off. If uncertain, ask before writing code. 3. **Execute**: make the minimal edit that matches the plan. Deviations require a new plan, not silent improvisation.