OPIDEOPIDE/docs

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#

LanguageParserCoverage
TypeScripttree-sitterFull — symbols, calls, types, imports, exports
JavaScripttree-sitterFull
TSX / JSXtree-sitterFull — includes JSX element analysis
Rusttree-sitterFull — traits, impls, lifetimes
Pythontree-sitterFull
Gotree-sitterFull — interfaces, goroutine call sites
Ctree-sitterFull
C++tree-sitterFull
Javatree-sitterFull
Rubytree-sitterFull
CSStree-sitterSelectors, variables, media queries
JSONtree-sitterStructure and key paths
Soliditysolang-parserFull typed AST — contracts, functions, events
MoveregexFunction signatures, module declarations
COBOL / FortranregexDivision 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.

ToolWhat it does
ast_callersFind every caller of a function across the entire codebase — not just the current file
ast_calleesTrace what a given function calls, recursively if needed
ast_impactPredict what breaks if you change a symbol — returns affected callers, tests, and dependents
ast_definitionJump to the definition of any symbol, cross-file
ast_type_infoUnderstand type hierarchies — what implements an interface, what extends a class
search_semanticFind code by meaning using embedding-based semantic search
search_textKeyword 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.

Info
Impact analysis runs automatically in Auto and Yolo modes. In Ask mode, you will see the impact report as a proposed step before the agent edits anything.