mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-12 02:37:45 +08:00
- Convert 40 JS files to TypeScript (CLI, tools, core, MCP server) - Add Zod for runtime parameter validation - Add type definitions in src/types/ - Keep src/templates/ as JavaScript (dashboard frontend) - Update bin entries to use dist/ - Add tsconfig.json with strict mode - Add backward-compatible exports for tests - All 39 tests passing Breaking changes: None (backward compatible) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
70 lines
2.1 KiB
Markdown
70 lines
2.1 KiB
Markdown
# Tool Strategy
|
|
|
|
## ⚡ Exa Triggering Mechanisms
|
|
|
|
**Auto-Trigger**:
|
|
- User mentions "exa-code" or code-related queries → `mcp__exa__get_code_context_exa`
|
|
- Need current web information → `mcp__exa__web_search_exa`
|
|
|
|
**Manual Trigger**:
|
|
- Complex API research → Exa Code Context
|
|
- Real-time information needs → Exa Web Search
|
|
|
|
## ⚡ CCW MCP Tools
|
|
|
|
|
|
### edit_file
|
|
|
|
**When to Use**: Edit tool fails 1+ times on same file
|
|
|
|
```
|
|
mcp__ccw-tools__edit_file(path="file.py", oldText="old", newText="new")
|
|
mcp__ccw-tools__edit_file(path="file.py", oldText="old", newText="new", dryRun=true)
|
|
mcp__ccw-tools__edit_file(path="file.py", oldText="old", newText="new", replaceAll=true)
|
|
mcp__ccw-tools__edit_file(path="file.py", mode="line", operation="insert_after", line=10, text="new line")
|
|
```
|
|
|
|
**Options**: `dryRun` (preview diff), `replaceAll`, `mode` (update|line), `operation`, `line`, `text`
|
|
|
|
### write_file
|
|
|
|
**When to Use**: Create new files or overwrite existing content
|
|
|
|
```
|
|
mcp__ccw-tools__write_file(path="file.txt", content="Hello")
|
|
mcp__ccw-tools__write_file(path="file.txt", content="code with `backticks` and ${vars}", backup=true)
|
|
```
|
|
|
|
**Options**: `backup`, `createDirectories`, `encoding`
|
|
|
|
### codex_lens
|
|
|
|
**When to Use**: Code indexing and semantic search
|
|
|
|
```
|
|
mcp__ccw-tools__codex_lens(action="init", path=".")
|
|
mcp__ccw-tools__codex_lens(action="search", query="function main", path=".")
|
|
mcp__ccw-tools__codex_lens(action="search_files", query="pattern", limit=20)
|
|
mcp__ccw-tools__codex_lens(action="symbol", file="src/main.py")
|
|
```
|
|
|
|
**Actions**: `init`, `search`, `search_files`, `symbol`, `status`, `update`
|
|
|
|
### smart_search
|
|
|
|
**When to Use**: Quick search without indexing, natural language queries
|
|
|
|
```
|
|
mcp__ccw-tools__smart_search(query="function main", path=".")
|
|
mcp__ccw-tools__smart_search(query="def init", mode="exact")
|
|
mcp__ccw-tools__smart_search(query="authentication logic", mode="semantic")
|
|
```
|
|
|
|
**Modes**: `auto` (default), `exact`, `fuzzy`, `semantic`, `graph`
|
|
|
|
### Fallback Strategy
|
|
|
|
1. **Edit fails 1+ times** → `mcp__ccw-tools__edit_file`
|
|
2. **Still fails** → `mcp__ccw-tools__write_file`
|
|
|