mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-11 02:33:51 +08:00
- Added active memory configuration for manual interval and Gemini tool. - Created file modification rules for handling edits and writes. - Implemented migration manager for managing database schema migrations. - Added migration 001 to normalize keywords into separate tables. - Developed tests for validating performance optimizations including keyword normalization, path lookup, and symbol search. - Created validation script to manually verify optimization implementations.
1.4 KiB
1.4 KiB
File Modification
Use edit_file (MCP)
- Built-in Edit tool failed 1+ times
- Need dry-run preview before applying changes
- Need line-based operations (insert_after, insert_before)
- Need to replace all occurrences at once
- Built-in Edit returns "old_string not found"
- Whitespace/formatting issues in built-in Edit
Mode Selection:
mode=update: Replace textmode=line: Line-based operations
Use write_file (MCP)
- Creating brand new files
- MCP edit_file still fails (last resort)
- Need to completely replace file content
- Need backup before overwriting
- User explicitly asks to "recreate file"
Priority Logic
File Reading:
- Known single file → Built-in Read
- Multiple files OR pattern matching → read_file (MCP)
- Unknown location → smart_search then Read
- Large codebase + repeated access → codex_lens
File Editing:
- Always try built-in Edit first
- Fails 1+ times → edit_file (MCP)
- Still fails → write_file (MCP)
Search:
- External knowledge → Exa
- Exact pattern in small codebase → Built-in Grep
- Semantic/unknown location → smart_search
- Large codebase + repeated searches → codex_lens
Decision Triggers
Start with simplest tool (Read, Edit, Grep) Escalate to MCP tools when built-ins fail or inappropriate Use semantic search for exploratory tasks Use indexed search for large, stable codebases Use Exa for external/public knowledge