You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Validate --direction with Commander .choices() (rejects invalid values)
- Use cached dependency graph for --depends-on (loadOrBuildGraph)
- Pass excludePatterns/languages from config (parity with search command)
- Use replaceAll for dist/ normalization (handles nested paths)
- Note indexer.close() not needed in catch (process.exit cleans up)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: .claude/agents/bug-investigator.md
+7-5Lines changed: 7 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,15 +10,17 @@ color: orange
10
10
11
11
Systematically traces issues through the dev-agent monorepo. Reproduces, traces, fixes, and prevents regression.
12
12
13
-
## MCP Tools — Save Tokens, Extend Sessions
13
+
## MCP Tools — Conserve Context
14
14
15
-
Use MCP tools to get focused results instead of Grep → Read cycles. See CLAUDE.md for the token savings table.
15
+
This agent runs in a long session with a finite context window. Every Grep → Read cycle burns ~5,000 tokens on irrelevant matches. MCP tools return only what you need.
16
16
17
-
-**`dev_search`** — Conceptual queries ("where does rate limiting happen"). Returns ranked snippets — no file reading needed.
18
-
-**`dev_refs`** — Callers/callees of a function. Use `dependsOn` to trace dependency chains between files.
17
+
**Before you Grep or Read, ask: can an MCP tool answer this without reading files?**
18
+
19
+
-**`dev_search`** — Conceptual queries ("where does rate limiting happen"). Returns ranked snippets, not 200 grep matches.
20
+
-**`dev_refs`** — Callers/callees of a function. Use `dependsOn` to trace dependency chains. Returns the call graph directly.
19
21
-**`dev_map`** — Codebase structure with hot paths and subsystems. One call replaces dozens of ls/glob/read operations.
20
22
21
-
Reserve Grep/Glob for exact string matches where you know the literal text.
23
+
Only use Grep for exact string matches where you know the literal text. Only Read files when you need the full implementation.
Copy file name to clipboardExpand all lines: .claude/agents/logic-reviewer.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -65,7 +65,7 @@ Every finding MUST include confidence: **HIGH** (verified from code), **MEDIUM**
65
65
66
66
### Cross-Package Data Flow (Deep+ Effort)
67
67
68
-
Use MCP tools to trace cross-package flows without reading every file (see CLAUDE.md for token savings). `dev_refs` returns the call graph directly, `dev_search` finds related code by concept, `dev_patterns` compares error handling across files.
68
+
**Before you Grep or Read, ask: can an MCP tool answer this without reading files?**`dev_refs` returns the call graph directly, `dev_search` finds related code by concept, `dev_patterns` compares error handling across files — each saves ~3,000-5,000 tokens vs manual file reading.
69
69
70
70
-[ ] Core exports consumed correctly by CLI, MCP server, and subagents — verify with `dev_refs`
71
71
-[ ] Dependency chains make sense — use `dev_refs` with `dependsOn` to trace file-to-file paths
Copy file name to clipboardExpand all lines: .claude/agents/plan-reviewer.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,16 @@ Two-pass review of execution plans in `.claude/da-plans/`. Validates completenes
12
12
13
13
This agent **NEVER modifies plans**. It reports issues for the author to fix.
14
14
15
+
## MCP Tools — Conserve Context
16
+
17
+
This agent runs in a long session with a finite context window. Every Grep → Read cycle burns ~5,000 tokens on irrelevant matches. MCP tools return only what you need.
18
+
19
+
**Before you Grep or Read, ask: can an MCP tool answer this without reading files?**
20
+
21
+
-**`dev_map`** — Verify structure claims in the plan against actual codebase layout.
22
+
-**`dev_refs`** — Confirm dependency assertions. Use `dependsOn` to trace dependency chains between files.
23
+
-**`dev_patterns`** — Check if proposed patterns match existing conventions.
Copy file name to clipboardExpand all lines: .claude/agents/quality-reviewer.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,7 +48,7 @@ Maximum **5 SUGGESTION items** per review. If more found, pick the top 5 and not
48
48
49
49
### Readability & Simplification
50
50
51
-
Use MCP tools to check for duplication without reading every file (see CLAUDE.md for token savings). `dev_patterns` compares patterns across similar files. `dev_search` checks if a utility exists by meaning, not just name.
51
+
**Before you Grep or Read, ask: can an MCP tool answer this without reading files?**`dev_patterns` compares patterns across similar files (~500 tokens vs ~3,000 for manual reads). `dev_search` checks if a utility exists by meaning, not just name.
52
52
53
53
-[ ] No code duplicating existing utilities — verify with `dev_patterns` and `dev_search`
54
54
-[ ] Functions reasonably sized (consider splitting if >50 lines)
Copy file name to clipboardExpand all lines: .claude/agents/quick-scout.md
+6-50Lines changed: 6 additions & 50 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,9 +10,11 @@ color: blue
10
10
11
11
Lightweight explorer optimized for speed and cost. Finds code, traces flows, maps dependencies.
12
12
13
-
## Token Efficiency
13
+
## MCP Tools — Conserve Context
14
14
15
-
Use MCP tools to get focused results instead of Grep → Read cycles. See CLAUDE.md for the token savings table. Every file Read costs tokens — let the tools do the reading.
15
+
This agent runs in a long session with a finite context window. Every Grep → Read cycle burns ~5,000 tokens on irrelevant matches. MCP tools return only what you need.
16
+
17
+
**Before you Grep or Read, ask: can an MCP tool answer this without reading files?**
16
18
17
19
## Capability Boundaries
18
20
@@ -35,52 +37,6 @@ Do NOT guess at architectural reasoning or make recommendations.
35
37
4.**Verify** — Only Read a file when you need the full implementation, not just the location.
36
38
5.**Report** — Concise, factual answer with file paths and line numbers
37
39
38
-
## Dev-Agent Quick Reference
39
-
40
-
```
41
-
packages/
42
-
core/src/
43
-
scanner/ # ts-morph (TS/JS) and tree-sitter (Go) analysis
Use `dev_map` to get the current codebase structure — don't rely on memorized paths. Run `dev_map --focus packages/core --depth 3` to drill into a specific area.
Copy file name to clipboardExpand all lines: .claude/agents/research-planner.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,11 +12,13 @@ Plans investigations before jumping into implementation. Produces a structured r
12
12
13
13
This agent **NEVER writes code**. It produces investigation plans.
14
14
15
-
## MCP Tools — Save Tokens, Extend Sessions
15
+
## MCP Tools — Conserve Context
16
16
17
-
Use MCP tools to map the territory without burning tokens on Grep → Read cycles. See CLAUDE.md for the token savings table.
17
+
This agent runs in a long session with a finite context window. Every Grep → Read cycle burns ~5,000 tokens on irrelevant matches. MCP tools return only what you need.
18
18
19
-
-**`dev_search`** — Find relevant code areas by meaning. Returns ranked snippets — no file reading needed.
19
+
**Before you Grep or Read, ask: can an MCP tool answer this without reading files?**
20
+
21
+
-**`dev_search`** — Find relevant code areas by meaning. Returns ranked snippets, not 200 grep matches.
20
22
-**`dev_map`** — Codebase structure with hot paths and subsystems. One call replaces dozens of ls/glob/read operations.
21
23
-**`dev_patterns`** — Compare patterns across similar files without reading each one.
22
24
-**`dev_refs`** — Trace cross-package dependencies. Use `dependsOn` to trace dependency chains between files.
Copy file name to clipboardExpand all lines: .claude/agents/security-reviewer.md
+8-4Lines changed: 8 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,13 +12,17 @@ Security-focused review for a TypeScript monorepo that processes repository data
12
12
13
13
This agent **NEVER modifies code**. It reports issues for the developer to fix.
14
14
15
-
## Token Efficiency
15
+
## MCP Tools — Conserve Context
16
16
17
-
Use MCP tools to avoid expensive Grep → Read cycles. See CLAUDE.md for the token savings table. `dev_search` returns ranked snippets, `dev_refs` traces input flow directly, `dev_patterns` scans for similar vulnerability patterns — all without reading files manually.
17
+
This agent runs in a long session with a finite context window. Every Grep → Read cycle burns ~5,000 tokens on irrelevant matches. MCP tools return only what you need.
18
18
19
-
## Checklist
19
+
**Before you Grep or Read, ask: can an MCP tool answer this without reading files?**
-**`dev_patterns`** — If one injection vector exists, the same pattern likely appears elsewhere. Scan for similar patterns across files.
23
+
-**`dev_refs`** — Trace how user input flows through the system. Use `dependsOn` to trace dependency chains.
20
24
21
-
Use `dev_search` to find security-sensitive code ("user input", "shell execution", "token handling"). Use `dev_patterns` to find similar patterns across the codebase — if one injection vector exists, the same pattern likely appears elsewhere. Use `dev_refs` to trace how user input flows through the system.
25
+
## Checklist
22
26
23
27
### Command Injection
24
28
-[ ] No unsanitized user input passed to `child_process`, `exec`, `execSync`, or shell commands
Copy file name to clipboardExpand all lines: CLAUDE.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -139,9 +139,11 @@ See `.claude/da-plans/README.md` for status and format details.
139
139
140
140
---
141
141
142
-
## MCP tools — token-efficient context
142
+
## MCP tools — conserve context
143
143
144
-
MCP tools return pre-ranked, pre-snippeted results. Use them to avoid expensive Grep → Read cycles that burn thousands of tokens on irrelevant context.
144
+
**Before you Grep or Read, ask: can an MCP tool answer this without reading files?**
145
+
146
+
MCP tools return pre-ranked snippets. Every Grep → Read cycle burns ~3,000-5,000 tokens of context window on irrelevant matches. MCP tools return only what you need.
145
147
146
148
| Instead of | Use | Tokens saved |
147
149
|------------|-----|-------------|
@@ -150,7 +152,7 @@ MCP tools return pre-ranked, pre-snippeted results. Use them to avoid expensive
150
152
| ls + glob + read READMEs |`dev_map`|~2,000 |
151
153
| Read multiple files to compare patterns |`dev_patterns filePath`|~3,000 |
152
154
153
-
Reserve Grep/Glob for exact string matches where you know the literal text.
155
+
Only use Grep for exact string matches where you know the literal text. Only Read files when you need the full implementation.
0 commit comments