AI Assistance
Use this workflow when you want an AI assistant to help write, review, or refine Graph-sitter codemods.
This branch does not expose a standalone gs expert shell command. The
expert page describes the AI-assistance workflow around the documented CLI
commands.
Recommended Flow
- Initialize Graph-sitter in the target repository.
gs init- Scaffold a codemod.
gs create rename-function .-
Ask your assistant to edit the generated codemod with Graph-sitter APIs such as
Codebase,Function,Import, andcommit(). -
Run the codemod in check mode before applying changes.
gs run rename-function . --check- Apply the codemod after reviewing the diff.
gs run rename-function . --writeWhat To Give The Assistant
- The goal of the codemod.
- The target repository path and language.
- Any expected symbol names, import paths, or file patterns.
- Whether the run should use the Python backend or the opt-in Rust backend.
- The generated codemod file under
.codegen/codemods/.