Context
The grep tool shells out to grep -rEIn (internal/tools/exec.go, grepTool.Execute). ripgrep (rg) is dramatically faster on large repos and respects .gitignore by default, which usually matches what a coding agent wants to search.
The task
When rg is on PATH, use it; otherwise fall back to the current grep invocation unchanged. Keep the tool's output shape (path:line:match) identical so nothing downstream changes.
Notes / constraints
- Fallback must be exact — a machine without
rg behaves exactly as today.
- Keep it project-agnostic: detect the binary, don't assume a repo type.
Acceptance
- With
rg present, searches use it; output format unchanged.
- Without it, behavior is byte-identical to now.
- Tests for both paths. Coverage ≥90%.
Context
The
greptool shells out togrep -rEIn(internal/tools/exec.go,grepTool.Execute).ripgrep(rg) is dramatically faster on large repos and respects.gitignoreby default, which usually matches what a coding agent wants to search.The task
When
rgis on PATH, use it; otherwise fall back to the currentgrepinvocation unchanged. Keep the tool's output shape (path:line:match) identical so nothing downstream changes.Notes / constraints
rgbehaves exactly as today.Acceptance
rgpresent, searches use it; output format unchanged.