Add ast-index as primary code search tool in CLAUDE.md

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-10 14:15:26 +03:00
parent 09b4a1b182
commit ac10b53064

View File

@@ -1,5 +1,25 @@
# Claude Instructions for WLED Screen Controller
## CRITICAL: Use ast-index for Code Search
**Always use `ast-index` as the PRIMARY code search tool.** It is 17-69x faster than grep and returns structured, accurate results.
- **Use ast-index first** for: finding classes, symbols, usages, implementations, files, callers, hierarchy
- **Fall back to Grep only** for: regex patterns, string literals inside code, comment content, or when ast-index returns empty results
- Run `ast-index update` if the index feels stale after many file changes
- Run `ast-index rebuild` if the index is missing or corrupted
Common commands:
```bash
ast-index search "Query" # Universal search
ast-index symbol "Name" # Find symbol definitions
ast-index usages "Symbol" # Find all usages
ast-index class "Name" # Find class/interface
ast-index implementations "Parent" # Find implementations
ast-index outline "path/to/file" # Show file structure
ast-index callers "funcName" # Find call sites
```
## CRITICAL: Git Commit and Push Policy
**🚨 NEVER CREATE COMMITS WITHOUT EXPLICIT USER APPROVAL 🚨**