Code Graph
EngineForge auto-indexes your entire project on first load (scripts, connections, inheritance, signals, and more) and feeds a compact architectural overview directly to the AI agent. This is how the agent understands your project without reading every file. The Code Graph also includes an interactive visual UI for exploring the architecture yourself.
Why it matters
The primary purpose of the Code Graph is to give the AI agent a perfect picture of your project. When you start a conversation, the indexer generates a compact overview of your codebase: hub classes, entry points, connections between scripts, inheritance hierarchies, and signal flows. This is injected into the AI's system prompt, so the agent deeply understands your project architecture from the very first message without needing to read every file.
How it works
When you open a project, EngineForge automatically indexes your codebase in the background. The indexer walks through your project files (.cs for Unity, .gd for Godot) and builds a graph of how classes, functions, and files relate to each other.
To open the visual graph, click the Graph button in the editor title bar (top-right corner). This opens an interactive map of your project architecture.
Agent integration
When you start a conversation, EngineForge generates a compact 300–400 token project overview from the index, including:
- Project name, engine type, and version
- Hub classes (the most important classes with their key methods)
- Entry points (main scenes and scripts)
- Connections between scripts (calls, inheritance, signals)
- File, node, scene, and class counts
This overview is injected into the AI system prompt so the agent understands your project architecture from the first message. You can view and regenerate the overview in Settings → Indexing.
Auto-indexing
Indexing happens automatically when a project is first opened. A file watcher monitors for changes to relevant files (.cs, .gd, .tscn, .unity, .prefab, .asmdef) and triggers incremental reindexing after a short debounce. You can also trigger a full reindex manually from the graph toolbar.
The indexing status is visible in Settings → Indexing, showing whether the index is ready, currently building, or encountered an error.
Classifications
Each file is automatically classified into one of 13 categories based on naming patterns and code structure. Categories are color-coded in the graph for easy identification:
| Category | What it covers |
|---|---|
| Gameplay | Game logic, behavior scripts, game rules |
| UI | User interface elements, menus, HUD |
| Data | Data structures, storage, save/load systems |
| Trigger | Event triggers, collision zones, area detectors |
| Singleton | Singleton pattern objects, global managers |
| Event Bus | Event dispatch systems, messaging |
| Scene | Scene definitions and scene management |
| Environment | World building, terrain, level geometry |
| Character | Player and NPC character code |
| Camera | Camera controllers and systems |
| Audio | Sound effects, music, audio management |
| VFX | Visual effects, particles, shaders |
| Infrastructure | Low-level systems, networking, utilities |
Graph interaction
The graph toolbar provides several controls:
- Search bar: Find nodes by name. Matching nodes are highlighted in the graph.
- Category filter: Show or hide specific categories. Each category has a color indicator matching the graph nodes.
- Edge filter: Filter by relationship type: All Edges, Calls Only, Extends Only, Signals Only, or No Edges.
- Fit All: Auto-zoom to show the entire graph in view.
- Legend: Display the color legend for categories and edge types.
- Reindex: Manually trigger a full reindex of the project.
Edge types
The graph visualizes different kinds of relationships between files and classes:
| Edge type | Meaning | Visual style |
|---|---|---|
| calls | Function calls between files | Teal, solid arrow |
| extends | Class inheritance | Blue, dashed arrow |
| attached_to | Component attachment | Orange, dotted |
| fires | Signal emission | Yellow, dashed |
| listens_to | Signal reception | Yellow, dashed |
| loads | Resource loading | Orange, dotted |
| instances | Scene instantiation | Orange, solid |
Drill-down / Focus mode
Click any node in the graph to enter focus mode. This isolates the selected node and shows its neighborhood (the files and classes it connects to). Use the depth controls to adjust how many levels of connections are shown (1, 2, or 3 levels deep).
Click Show All to exit focus mode and return to the full graph view.
Detail panel
When you select a node, an inspector panel opens showing detailed information:
- File name and path
- Category and symbol count
- Symbols grouped by kind: Functions, Signals, Variables, Enums, Classes
- Connections: Cross-file dependencies and their relationship types
Each symbol is clickable and jumps directly to that line in the code editor.
Statistics panel
The statistics panel shows a breakdown of your project by category. A stacked bar displays the percentage distribution, and a list shows exact counts per category. Click any category in the statistics panel to filter the graph to that category.
Visual graph
Beyond powering the agent, the Code Graph gives you a visual tool to explore your own project. Click the Graph button in the editor title bar to browse the full architecture interactively. Useful for onboarding into unfamiliar codebases or understanding how systems connect.