[KongchangAI]
Productsg

ast-grep

A code search and replacement tool based on abstract syntax trees (AST). It supports precise searching and refactoring by syntactic structure, ships with parsers for multiple languages, and can be used for code linting and automated refactoring.

Timeline (last 90 days)

Oct 16

The author's core strategy is to have the AI agent cite the output of static analysis tools (ripgrep, ast-grep, Serena, CodeQL) as evidence and to clearly distinguish it from the LLM's own analysis.

Unverified50%
Oct 16

ast-grep searches AST nodes and internally uses a CST (concrete syntax tree), so it can search comments and string literals, but it does not perform macro expansion.

Unverified50%
Oct 16

The author found that ripgrep and ast-grep gave different results when detecting external communication, because ripgrep also counted comments, showing that cross-validation with multiple tools is important.

Unverified50%

All Facts (3)

Source Articles