Skip to content

Add AST-based code analysis with ast-grep #6

Description

@burner-agent

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions