Add locate tooling and plan-stage token/time estimates
Mature repos benefit from structured scans (repomix / eza / fd / rg) over blind Reads; explicit token and wall-clock estimates in the Plan step let the user redirect early before a scope mismatch burns context.
This commit is contained in:
@@ -27,7 +27,11 @@ Behavioral guidelines to reduce common LLM coding mistakes. Merge with project-s
|
||||
**Workflow: Locate → Plan → Execute.** Never jump straight to edits.
|
||||
|
||||
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.
|
||||
2. **Plan**: state the intended change in one or two sentences. List assumptions and open questions. If uncertain, ask before writing code.
|
||||
- For mature/unfamiliar repos, prefer structured scans:
|
||||
- `repomix -o /tmp/x.xml` (or `repomix <subdir>`) — full-repo LLM pack; slice by subdir if > 100k tokens
|
||||
- `eza --tree --git-ignore --level=3` for layout; `fd <pat>` for files; `rg <sym>` for call sites
|
||||
- `git ls-files` when tokens are tight
|
||||
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.
|
||||
|
||||
Before implementing:
|
||||
|
||||
Reference in New Issue
Block a user