AST-based structural code search, security scanning, and refactoring using ast-grep (sg CLI) with pattern matching and code transformation across 40+ languages. Use when performing structural code search, AST-based refactoring, codemod operations, security pattern scanning, or syntax-aware code transformations across files. Do NOT use for simple text search (use Grep tool instead) or full codebase exploration (use Explore agent instead).