Skip to content

Add Godot language and scene graph support - #364

Closed
KirisamaMarisa wants to merge 20 commits into
colbymchenry:mainfrom
KirisamaMarisa:codex/godot-language-support
Closed

KirisamaMarisa wants to merge 20 commits into
colbymchenry:mainfrom
KirisamaMarisa:codex/godot-language-support

Conversation

@KirisamaMarisa

Copy link
Copy Markdown

Summary

Adds first-class Godot project indexing for CodeGraph, covering GDScript scripts plus Godot scene/resource files.

  • index GDScript classes, methods, variables, constants, signals, exports, annotations, preload/load references, and node lookups
  • extract .tscn/.tres scenes/resources as graph nodes, including scene components, ExtResource/SubResource ids, attached scripts, instanced scenes, signal connections, and resource paths
  • resolve Godot-specific references across scripts and scenes, including res:// paths, $/% node paths, find_child/get_node-style lookups, helper wrapper lookups, dynamic node-name constants, and scene instance callers
  • expose Godot resource paths and scene node names through CLI/MCP callers, callees, impact, query, and status flows
  • report resolved edge counts after indexing so index output matches status more closely
  • update agent instructions so Godot resource paths and scene node names are treated as queryable symbols

Validation

  • npm.cmd run build
  • npx vitest run tests/extraction.test.ts -t "Godot Resource Extraction"
  • npx vitest run tests/installer-targets.test.ts
  • rebuilt the CodeGraph index for a local Godot 4 validation project
  • real CodeGraph MCP checks against the local validation project: status, search, callers, callees, impact

Real project smoke result: the local Godot validation project indexed 1,203 files with 41,113 nodes and 78,824 edges; queries successfully linked scene nodes, @onready $ node paths, res:// scene references, scene instances, and signal handler relationships.

@miracle-kang

Copy link
Copy Markdown

+1 for this PR. Godot support would be really valuable for my workflow as well.
Thanks for putting this together, I hope the maintainers can review and consider merging it.

i-snyder added a commit to i-snyder/codegraph that referenced this pull request Jul 1, 2026
colbymchenry#364)

Rebasing colbymchenry#364 onto current main pulled in applyLanguageGate, a
cross-language-family gate main added to `references` lookups after
colbymchenry#364 branched. GDScript node-path refs (language: gdscript) and scene
nodes (language: godot_resource) were both absent from LANGUAGE_FAMILY,
so sameLanguageFamily() returned false and every cross-file `.gd` ->
`.tscn` node-path reference was silently dropped by the merge, even
though it built and ran without error.

Register gdscript/godot_resource as a shared 'godot' family, the same
pattern as the existing csharp/razor -> 'dotnet' entry.
i-snyder added a commit to i-snyder/codegraph that referenced this pull request Jul 1, 2026
@BetterToAutomateTheWorld

Copy link
Copy Markdown

Bumping this PR, working in a small team on gdscript, that would be great to have it supported in codegraph! :)

@colbymchenry

Copy link
Copy Markdown
Owner

Thanks for adding Godot, @KirisamaMarisa! Its name-matcher change treats any reference containing / as qualified in every language, and it edits the agent-facing server instructions, which a language PR should leave alone. #2623 is the strongest Godot PR and is also being closed, so its notes say what a fresh PR needs. Closing this one for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants