Code Analysis
PRO All code analysis tools are PRO intelligence tools. Filesystem-only, no addon required.
What is Code Intelligence?
Section titled “What is Code Intelligence?”GodotIQ parses your .gd scripts, .tscn scene files, and .tres resources to build a complete understanding of your project’s code structure. It doesn’t just search text. It understands dependencies, signal connections, inheritance chains, and naming conventions.
This means you can ask questions like “what would break if I rename this signal?” or “show me everything that depends on OrderManager.gd” and get accurate, comprehensive answers instead of grep-like approximations.
godotiq_dependency_graph
Section titled “godotiq_dependency_graph”Complete dependency graph: signals emitted, listeners, imports, reverse deps, impact rating. Call before refactoring.
When to Use It
Section titled “When to Use It”- Understanding how files are connected before making changes
- Finding all scenes that use a particular script or resource
- Identifying circular dependencies or tightly coupled modules
Parameters
Section titled “Parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
path | string | "res://" | File or directory to analyze. Use a file path for a single file’s deps, or a directory for the full graph |
depth | int | 3 | Maximum dependency depth to traverse |
detail | string | "normal" | Output verbosity: brief, normal, full |
include_resources | bool | true | Include .tres resource files in the graph |
Example
Section titled “Example”Prompt: “What depends on my OrderManager script?”
{ "tool": "godotiq_dependency_graph", "args": { "path": "res://scripts/managers/OrderManager.gd", "detail": "normal" }}{ "file": "res://scripts/managers/OrderManager.gd", "depends_on": [ "res://scripts/data/Order.gd", "res://scripts/data/MenuItem.gd", "res://scripts/autoloads/EventBus.gd" ], "depended_on_by": [ "res://scenes/ui/OrderPanel.tscn", "res://scenes/gameplay/Kitchen.tscn", "res://scripts/managers/GameManager.gd", "res://tests/test_order_flow.gd" ], "dependency_count": { "direct": 3, "transitive": 7 }, "dependent_count": { "direct": 4, "transitive": 12 }}- Use
depth: 1for direct dependencies only. Useful for quick checks. - Run on
res://to get the full project dependency graph (usedetail: "brief"for large projects) - Circular dependencies are flagged with a warning in the output
godotiq_signal_map
Section titled “godotiq_signal_map”Project-wide signal wiring: who emits, who listens, orphan/missing signals.
When to Use It
Section titled “When to Use It”- Understanding how events propagate through the project
- Finding all handlers for a specific signal
- Debugging signal chains that cross multiple scenes
Parameters
Section titled “Parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
path | string | "res://" | File or directory to analyze |
signal_name | string | null | Filter to a specific signal name |
detail | string | "normal" | Output verbosity |
include_builtins | bool | false | Include Godot built-in signals (ready, tree_entered, etc.) |
Example
Section titled “Example”Prompt: “Show me all connections for the order_completed signal.”
{ "tool": "godotiq_signal_map", "args": { "signal_name": "order_completed", "detail": "normal" }}{ "signal": "order_completed", "definitions": [ { "file": "res://scripts/managers/OrderManager.gd", "line": 8, "signature": "signal order_completed(order: Order)" } ], "connections": [ { "from": "OrderManager", "to": "OrderPanel", "method": "_on_order_completed", "source": "scene", "scene_file": "res://scenes/gameplay/Kitchen.tscn" }, { "from": "OrderManager", "to": "ScoreManager", "method": "_on_order_completed", "source": "code", "file": "res://scripts/managers/GameManager.gd", "line": 24 }, { "from": "OrderManager", "to": "SoundManager", "method": "play_success", "source": "code", "file": "res://scripts/managers/OrderManager.gd", "line": 45 } ], "chain_length": 3, "emitters": 1, "receivers": 3}- Without
signal_name, returns all custom signals in the project. Useful for getting a high-level signal architecture view. - Set
include_builtins: trueif you need to seeready,process,input, etc. - Signal connections made in the scene editor and via
connect()in code are both detected
godotiq_impact_check
Section titled “godotiq_impact_check”Predict what breaks BEFORE making a change. Returns affected files, callers, risk level, safe alternatives.
When to Use It
Section titled “When to Use It”- Before refactoring: “what breaks if I change this?”
- Estimating the scope of a bug fix
- Understanding which tests cover a piece of code
Parameters
Section titled “Parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
target | string | required | What to check: file path, class name, signal name, or ClassName.method |
change_type | string | "modify" | Type of change: "modify", "rename", "delete" |
detail | string | "normal" | Output verbosity |
Example
Section titled “Example”Prompt: “What would break if I rename the OrderManager class?”
{ "tool": "godotiq_impact_check", "args": { "target": "OrderManager", "change_type": "rename" }}{ "target": "OrderManager", "change_type": "rename", "impact": { "direct": [ { "file": "res://scenes/gameplay/Kitchen.tscn", "reason": "References OrderManager as attached script" }, { "file": "res://scripts/managers/GameManager.gd", "line": 12, "reason": "Type hint: var order_mgr: OrderManager" } ], "transitive": [ { "file": "res://scenes/ui/OrderPanel.tscn", "reason": "Signal connection from OrderManager node" } ], "tests": [ "res://tests/test_order_flow.gd" ] }, "summary": { "files_affected": 4, "signals_affected": 1, "risk": "medium" }}change_type: "delete"shows the most comprehensive impact, covering everything that references the target- The
riskfield gives a quick read:low(1-2 files),medium(3-10),high(10+)
godotiq_validate
Section titled “godotiq_validate”Convention check: missing type hints, missing class_name, orphan signals, naming violations.
When to Use It
Section titled “When to Use It”- Enforcing team coding standards automatically
- Running as a pre-commit check
- Auditing an existing project against desired conventions
Parameters
Section titled “Parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
path | string | "res://" | File or directory to validate |
rules | array | ["all"] | Specific rule categories: "naming", "structure", "signals", "exports" |
detail | string | "normal" | Output verbosity |
Example
Section titled “Example”Prompt: “Check if my project follows our naming conventions.”
{ "tool": "godotiq_validate", "args": { "rules": ["naming", "structure"] }}{ "rules_checked": 12, "violations": [ { "rule": "naming.scripts.snake_case", "severity": "warning", "file": "res://scripts/UI/healthBar.gd", "message": "Script filename should be snake_case: 'healthBar.gd' → 'health_bar.gd'" }, { "rule": "structure.scenes.matching_script", "severity": "info", "file": "res://scenes/enemies/Goblin.tscn", "message": "Scene has no matching script file (expected res://scripts/enemies/Goblin.gd or attached)" } ], "passed": 10, "failed": 2, "summary": "10/12 rules passed"}Related Tools
Section titled “Related Tools”- Flow tracing:
godotiq_trace_flowfollows data semantically, complementing staticgodotiq_dependency_graphandgodotiq_signal_mapanalysis - Configuration: Configure
godotiq_validaterules in.godotiq.json - Guides: Workflows: Common code analysis workflow patterns