Summary
Integrate ast-grep/ast-grep (13k+ stars) for AST-based code search and refactoring during self-edit operations.
Motivation
When Burner's self-edit system (src/selfedit.ts) modifies its own source code, it relies on string-based operations. AST-based analysis would let the agent understand code structure, validate transformations are syntactically correct, and find specific patterns reliably — reducing the risk of self-edit breakage.
Proposal
- Install
ast-grep CLI tool (Rust binary, fast)
- Use it in self-edit workflows to: validate edits produce valid syntax, search for code patterns structurally, perform safe automated refactors
- Could also be exposed as a skill so RALPH loops can use structural code search on any workspace
References
Summary
Integrate ast-grep/ast-grep (13k+ stars) for AST-based code search and refactoring during self-edit operations.
Motivation
When Burner's self-edit system (
src/selfedit.ts) modifies its own source code, it relies on string-based operations. AST-based analysis would let the agent understand code structure, validate transformations are syntactically correct, and find specific patterns reliably — reducing the risk of self-edit breakage.Proposal
ast-grepCLI tool (Rust binary, fast)References