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

@@ -48,7 +48,9 @@ https://developers.openai.com/codex/mcp
- `SKILL.md` uses YAML front matter and requires `name` and `description`. citeturn3view3turn3view4
- Required fields are single-line with length limits (name ≤ 100 chars, description ≤ 500 chars). citeturn3view4
- At startup, Codex loads only each skills name/description; full content is injected when invoked. citeturn3view3turn3view4
- Skills can be repo-scoped in `.codex/skills/` or user-scoped in `~/.codex/skills/`. citeturn3view4
- Skills can be repo-scoped in `.agents/skills/` and are discovered from the current working directory up to the repository root. User-scoped skills live in `~/.agents/skills/`. citeturn1view1turn1view4
- Inference: some existing tooling and user setups still use `.codex/skills/` and `~/.codex/skills/` as legacy compatibility paths, but those locations are not documented in the current OpenAI Codex skills docs linked above.
- Codex also supports admin-scoped skills in `/etc/codex/skills` plus built-in system skills bundled with Codex. citeturn1view4
- Skills can be invoked explicitly using `/skills` or `$skill-name`. citeturn3view3
## MCP (Model Context Protocol)