Skip to content

Add Godot language and scene graph support#364

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

Add Godot language and scene graph support#364
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
main added a language-family gate (applyLanguageGate/LANGUAGE_FAMILY) on
`references` lookups after PR 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 post-merge, even though it built and ran without error.

- name-matcher.ts: register gdscript/godot_resource as a shared 'godot'
  family, same pattern as the existing csharp/razor -> 'dotnet' entry.
- extraction-version.ts: bump EXTRACTION_VERSION 24 -> 25 so existing
  indexes are prompted to re-index and pick up Godot support, per this
  file's own documented convention for a new language extractor.
- CHANGELOG.md: add the [Unreleased] entry for GDScript/Godot support,
  crediting the original PR (colbymchenry#364, @KirisamaMarisa).

Verified: the previously-failing resolution test now passes; targeted
re-run of cross-family-sensitive tests (C/C++, C#, Objective-C, chained
calls) shows no regressions. Re-indexed a real 152-file Godot 4 project:
node count unchanged (extraction output identical), edge count +57 -
exactly the class of edge this restores. Spot-checked a real unambiguous
scene-node reference resolving correctly post-fix.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012QNbowuGFTfF78PqeE4W4T
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
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
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.

2 participants