- Use `snake_case` for variables, functions, and file names; `PascalCase` for class names defined with `class_name`; `ALL_CAPS` for constants.
- Always declare static types with `:` syntax: `var health: int = 100`, `func take_damage(amount: float) -> void:` — avoid untyped variables in production code.
- Prefix private variables and functions with `_`: `var _state: String`, `func _update_state() -> void:` — this signals internal-only usage to collaborators.
- Use `@export` with explicit types to expose inspector properties: `@export var speed: float = 200.0` — avoid bare `@export` without a type annotation.
- Prefer `enum` for state machines and named constants: `enum State { IDLE, RUNNING, JUMPING }` rather than raw integer or string literals.
- Use `@onready` to initialize node references: `@onready var sprite: Sprite2D = $Sprite2D` — never call `get_node()` in `_ready()` for a reference you use repeatedly.
- Keep scene scripts focused: one `class_name` per file, no more than one top-level script per scene root node.