Give StemCode durable repository instructions before asking it to edit.
Add an AGENTS.md file at the repository root for persistent project instructions. StemCode loads AGENTS.md or .agent/AGENTS.md from the workspace into the model context, so this is the right place for architecture boundaries, generated-file rules, coding conventions, validation expectations, and manual setup notes that should apply across sessions.
Prefer concrete rules the agent can act on: where important source lives, what it must not edit, which patterns it should preserve, and which checks it should run after a change.
# Godot Project Instructions
This is a Godot project.
Important source and configuration paths:
- project.godot
- *.gd
- *.cs
- *.tscn
- *.tres
- addons/
- tests/
Generated or disposable paths — do not modify:
- .godot/
- .mono/
- bin/
- obj/
- export/
- build/
Follow these rules:
- This is a Godot project.
- Do not edit .godot or generated build output.
- Trace scene, resource, signal, and autoload dependencies before changing scripts.
- Preserve exported-property compatibility unless a scene/resource migration is intentional.
- Follow the project's existing GDScript or C# style.
- Use the project's checked-in Godot CLI wrapper and export presets for unattended validation.
- Explain required scene-tree or Inspector changes after code edits.
Validation:
- godot --headless --path .
- Run the configured GUT, GdUnit, C# test, or repository test script
- godot --headless --path . --export-release "<Preset Name>" <output-path>Commit the file with the project so the same instructions are reviewable and shared by everyone using StemCode in the repository.
Use repository-aware AI without replacing the tools your stack already needs.
StemCode works best when it can understand the repository around a task, inspect related files, use code intelligence where available, run the project's normal validation commands, and review the final diff before you accept a change.
Godot projects using GDScript, C#, scenes, resources, autoloads, signals, editor plugins, native command-line and headless workflows, tests, project settings, and source-controlled text assets.
Install StemCode and open the project root.
Run StemCode from the folder containing project.godot. Keep using the Godot Editor for scene composition, resource editing, animation, visual debugging, profiler work, and project settings that are safer to change through the Editor.
npm install -g stemcodepnpm add -g stemcodecd your-project
stemcode
/initKeep StemCode at the repository root so project instructions, source, configuration, tests, and Git history are visible from one workspace.
Make scripts, text scenes, resources, and project settings easy to discover.
Godot keeps much of a project in reviewable text files, which makes repository-wide analysis useful. The .godot directory and exported builds are generated and should normally stay out of search.
Keep source-of-truth files visible.
project.godot
*.gd
*.cs
*.tscn
*.tres
addons/
tests/Skip generated or disposable output.
.godot/
.mono/
bin/
obj/
export/
build/Add generated paths to Git ignore rules or .stemcode/.stemcodeignore so repository search stays focused.
Understand the project before changing it.
Analyze this Godot project. Map the main scenes, autoloads, scripts, signals, resources, editor plugins, and tests. Explain how scene ownership and signal flow connect the major systems. Do not modify files yet.
Use language intelligence for GDScript or C# while keeping scene context visible.
Godot projects can mix script languages and scene files. Use the language server that matches the project, then combine symbol navigation with text search through scenes and resources.
Use the Godot GDScript language server exposed by your editor setupdotnet tool install --global csharp-ls/lsp refresh
/lspSignals, exported properties, node paths, scene inheritance, autoloads, and resources can create dependencies that are not obvious from symbol references alone. Search the related .tscn, .tres, and project.godot files when tracing behavior.
Use Godot’s native CLI for headless checks, scene runs, and exports.
Godot is designed to work directly from the command line. Put the correct Godot editor binary on PATH or reference it through a repository variable, then use --path to target the project and --headless for CI or other environments without a display.
godot --path . --editorgodot --headless --path .godot --path . path/to/scene.tscngodot --headless --path . --export-release "<Preset Name>" <output-path>The export preset name must match export_presets.cfg, and CI needs the appropriate export templates installed. Prefer a checked-in wrapper script for tests and exports so local developers, StemCode, and CI use the same Godot executable and arguments.
Treat scripts and scene structure as one feature graph.
Before editing a script, trace the scene nodes, signals, resources, and autoloads that participate in the behavior. That reduces fixes that are locally correct but disconnected from the actual scene tree.
Add a system using current patterns
Trace how player state is owned, how UI receives updates, and how signals are named. Then add the requested health feature using the existing scene and signal conventions, and list any Editor wiring required.
Review text-scene impact
Identify every scene and resource that references this script or exported property. Explain what will break if the property is renamed before making the change.
Trace event flow
Map this signal from emitters to connected handlers, including connections defined in scenes. Check for duplicate connections and cleanup issues.
Reduce scene coupling
Review this feature for brittle node paths, oversized scripts, hidden autoload dependencies, and duplicated scene logic. Propose a small staged refactor first.
Use Godot’s headless CLI and the project’s real test workflow.
Projects differ in test frameworks and export targets. Prefer checked-in scripts and CI commands, with Godot --headless as the native base for unattended validation when the repository supports it.
godot --headless --path .Run the configured GUT, GdUnit, C# test, or repository test scriptgodot --headless --path . --export-release "<Preset Name>" <output-path>After script changes, open the affected scenes in Godot, check parser and scene errors, run the relevant tests, and exercise the feature in the Editor. Scene ownership and exported-property changes deserve an extra manual check.
Run the smallest relevant validation first. If it passes, run the broader project checks and review the final diff.Keep longer-lived architecture context alongside your project instructions.
Use AGENTS.md for concise rules the agent should follow on every task. Keep longer architecture notes, domain context, and workflow references in repository-level StemCode memory so both stay reviewable and versionable.
This is a Godot project.
Do not edit .godot or generated build output.
Trace scene, resource, signal, and autoload dependencies before changing scripts.
Preserve exported-property compatibility unless a scene/resource migration is intentional.
Follow the project's existing GDScript or C# style.
Use the project's checked-in Godot CLI wrapper and export presets for unattended validation.
Explain required scene-tree or Inspector changes after code edits.Review the change in terms of your stack, not only the generated code.
Ask StemCode to inspect its own diff and check the integration points that are easiest to miss in a repository-wide change.
- broken node paths or scene references
- signal connection and cleanup behavior
- exported property compatibility
- autoload coupling
- scene inheritance impact
- GDScript typing or C# diagnostics
- required Editor wiring
- headless test or export resultsCommon setup questions.
Does Godot have a native CLI?
Yes. The Godot editor binary supports project selection, editor launch, scene execution, headless mode, scripts, exports, and other command-line options. It is especially useful for CI and reproducible validation.
Can StemCode work with both GDScript and C#?
Yes at the repository level. Use the matching language intelligence for the scripts in the project and keep scene/resource files visible so cross-file behavior can be traced.
Should .godot be indexed?
Usually no. It contains generated project state. Keep project.godot, scripts, scenes, resources, addons, and tests visible instead.
Are .tscn files safe to edit?
They are text-based, but scene edits can still break references or ownership. Small, reviewable changes are possible; for structural or visual work, the Godot Editor remains the safer source of truth.
Put StemCode to work in a real repository.
Install StemCode, open the project you already work in, and begin with a repository-understanding task before asking the agent to change code. That gives the model better context and keeps the workflow reviewable.
Start with the CLI.
npm install -g stemcode
cd your-project
stemcodeGo deeper.
Read the full StemCode documentation for providers, permissions, LSP integrations, memory, MCP, CI review, and advanced workspace configuration.
READ THE DOCS →