|
1
|
# Agent Selection Guide |
|
2
|
|
|
3
|
This directory contains specialized agents for codebase exploration and research. Each agent has a specific purpose and set of tools. |
|
4
|
|
|
5
|
## When to Use Each Agent |
|
6
|
|
|
7
|
### codebase-locator |
|
8
|
**Use when you need to find WHERE code lives** |
|
9
|
|
|
10
|
- Locating files relevant to a feature or module |
|
11
|
- Finding all components related to a functionality |
|
12
|
- Discovering test files, config files, or documentation |
|
13
|
- Getting a structured overview of what exists where |
|
14
|
|
|
15
|
**Example queries:** |
|
16
|
- "Where is the order cancellation functionality?" |
|
17
|
- "Find all files related to product variants" |
|
18
|
- "Locate the authentication middleware" |
|
19
|
|
|
20
|
**Output:** Grouped file paths by category (implementation, tests, config, docs, types) |
|
21
|
|
|
22
|
--- |
|
23
|
|
|
24
|
### codebase-analyzer |
|
25
|
**Use when you need to understand HOW code works** |
|
26
|
|
|
27
|
- Tracing data flow through the system |
|
28
|
- Understanding how a feature is implemented |
|
29
|
- Explaining technical implementation details |
|
30
|
- Following execution paths and call chains |
|
31
|
- Understanding complex logic or algorithms |
|
32
|
|
|
33
|
**Example queries:** |
|
34
|
- "How does the order creation workflow process payments?" |
|
35
|
- "Trace how product prices are calculated" |
|
36
|
- "Explain the authentication flow from login to token generation" |
|
37
|
|
|
38
|
**Output:** Detailed technical explanations with file:line references |
|
39
|
|
|
40
|
--- |
|
41
|
|
|
42
|
### codebase-pattern-finder |
|
43
|
**Use when you need examples to model after** |
|
44
|
|
|
45
|
- Finding similar implementations as templates |
|
46
|
- Discovering usage examples of a library or pattern |
|
47
|
- Understanding how to implement something based on existing code |
|
48
|
- Identifying consistent patterns across the codebase |
|
49
|
|
|
50
|
**Example queries:** |
|
51
|
- "Show me examples of API routes with validation" |
|
52
|
- "Find similar workflow implementations" |
|
53
|
- "How are other modules handling soft deletes?" |
|
54
|
|
|
55
|
**Output:** Concrete code examples with context and usage patterns |
|
56
|
|
|
57
|
--- |
|
58
|
|
|
59
|
### web-search-researcher |
|
60
|
**Use when you need external information** |
|
61
|
|
|
62
|
- Researching libraries, frameworks, or tools |
|
63
|
- Finding documentation for third-party packages |
|
64
|
- Understanding industry standards or best practices |
|
65
|
- Getting information not available in the codebase |
|
66
|
|
|
67
|
**Example queries:** |
|
68
|
- "What are the latest Stripe API payment methods?" |
|
69
|
- "Find TypeScript best practices for dependency injection" |
|
70
|
- "Research OAuth 2.0 PKCE flow implementation" |
|
71
|
|
|
72
|
**Output:** Synthesized research with source citations |
|
73
|
|
|
74
|
--- |
|
75
|
|
|
76
|
## Agent Comparison Matrix |
|
77
|
|
|
78
|
| Agent | Focus | Tools | When to Use | |
|
79
|
|-------|-------|-------|-------------| |
|
80
|
| **codebase-locator** | WHERE (location) | Grep, Glob, LS | Finding files and directories | |
|
81
|
| **codebase-analyzer** | HOW (implementation) | Read, Grep, Glob, LS | Understanding technical details | |
|
82
|
| **codebase-pattern-finder** | EXAMPLES (patterns) | Grep, Glob, Read, LS | Finding templates to model after | |
|
83
|
| **web-search-researcher** | EXTERNAL (research) | WebSearch, WebFetch | Getting information from the web | |
|
84
|
|
|
85
|
## Constraints |
|
86
|
|
|
87
|
All agents follow these principles: |
|
88
|
- **Read-only**: No modifications to code |
|
89
|
- **Objective**: No recommendations or critiques |
|
90
|
- **Focused**: Stay within their specific domain |
|
91
|
- **Accurate**: Provide exact file:line references |
|
92
|
- **Complete**: Read files fully, not partially |
|
93
|
|
|
94
|
## Tips |
|
95
|
|
|
96
|
1. **Start with locator**: If you don't know where code lives, use codebase-locator first |
|
97
|
2. **Then analyze**: Once you know where, use codebase-analyzer to understand how it works |
|
98
|
3. **Find patterns**: Use codebase-pattern-finder to see similar implementations |
|
99
|
4. **Research externally**: Use web-search-researcher for non-codebase information |
|
100
|
5. **Combine agents**: Use multiple agents in parallel for comprehensive exploration |