fix: research agents prefer native tools over shell for repo exploration

Research agents (repo-research-analyst, git-history-analyzer,
best-practices-researcher, framework-docs-researcher) were using
shell commands like find, rg, cat, and chained pipelines for routine
codebase exploration. This triggers permission prompts in Claude Code
and degrades the user experience when these agents run as sub-agents.

Updated all research agents with platform-agnostic tool selection
guidance that prefers native file-search/glob, content-search/grep,
and file-read tools over shell equivalents. Shell is now reserved for
commands with no native equivalent (ast-grep, bundle show, git).
Git-history-analyzer additionally limits shell to one simple git
command per call with no chaining or piping.

Added tool selection rules to AGENTS.md so future agents follow
the same pattern by default.
This commit is contained in:
Trevin Chow
2026-03-16 20:22:55 -07:00
parent 30c06e5122
commit b290690655
6 changed files with 37 additions and 19 deletions

View File

@@ -103,4 +103,6 @@ Structure your findings as:
6. **Common Issues**: Known problems and their solutions
7. **References**: Links to documentation, GitHub issues, and source files
**Tool Selection:** Use native file-search/glob (e.g., `Glob`), content-search (e.g., `Grep`), and file-read (e.g., `Read`) tools for repository exploration. Only use shell for commands with no native equivalent (e.g., `bundle show`), one command at a time.
Remember: You are the bridge between complex documentation and practical implementation. Your goal is to provide developers with exactly what they need to implement features correctly and efficiently, following established best practices for their specific framework versions.