Core Concepts
AST Indexing
Tree-sitter powered code intelligence. Not grep, not regex — actual parsed abstract syntax trees across your entire project. The agent understands your codebase structure before it writes a single line.
How it works#
The moment you open a project, OPIDE runs a full tree-sitter parse across every supported source file. The result is a ProjectIndex — a live in-memory graph of every symbol, call site, type reference, import, and export in the codebase.
The index updates incrementally as you edit. Changed files are re-parsed, affected call graph edges are recalculated, and the agent always queries a current view of the project.
Supported languages#
| Language | Parser | Coverage |
|---|---|---|
| TypeScript | tree-sitter | Full — symbols, calls, types, imports, exports |
| JavaScript | tree-sitter | Full |
| TSX / JSX | tree-sitter | Full — includes JSX element analysis |
| Rust | tree-sitter | Full — traits, impls, lifetimes |
| Python | tree-sitter | Full |
| Go | tree-sitter | Full — interfaces, goroutine call sites |
| C | tree-sitter | Full |
| C++ | tree-sitter | Full |
| Java | tree-sitter | Full |
| Ruby | tree-sitter | Full |
| CSS | tree-sitter | Selectors, variables, media queries |
| JSON | tree-sitter | Structure and key paths |
| Solidity | solang-parser | Full typed AST — contracts, functions, events |
| Move | regex | Function signatures, module declarations |
| COBOL / Fortran | regex | Division and section structure |
What gets indexed#
Every source file produces a FileIndex with:
- ◆Symbols — functions, classes, types, traits, interfaces with position data
- ◆Call sites — every location in the file where a function is called, with the callee name resolved
- ◆Imports — local and external dependencies
- ◆Exports — the public API surface of the file
- ◆Type references — type hierarchies and usage across the file
- ◆Scopes — lexical scope information for name resolution
These roll up into a ProjectIndex with a cross-file dependency graph, framework detection (Next.js, Express, Actix, etc.), entry point identification, and config file tracking.
Agent tools#
The agent queries the index directly through these tools. It does not read entire files to understand your code — it asks the index targeted questions.
| Tool | What it does |
|---|---|
ast_callers | Find every caller of a function across the entire codebase — not just the current file |
ast_callees | Trace what a given function calls, recursively if needed |
ast_impact | Predict what breaks if you change a symbol — returns affected callers, tests, and dependents |
ast_definition | Jump to the definition of any symbol, cross-file |
ast_type_info | Understand type hierarchies — what implements an interface, what extends a class |
search_semantic | Find code by meaning using embedding-based semantic search |
search_text | Keyword search across the codebase with file and line numbers |
Impact analysis before edits#
Before the agent modifies any function, it runs ast_impact to understand what else will be affected. The result tells the agent:
- ◆Which callers will break if the signature changes
- ◆Which test files exercise this code path
- ◆Which dependent modules import this symbol
This means the agent does not make isolated edits that break callers elsewhere. It plans the full set of changes needed before writing anything.