# AGENTS.md — Godot 4

## Project
- Godot 4.x, GDScript only. Scenes in `scenes/`, scripts next to their scene, autoloads in `autoload/`.

## GDScript style
- Static typing everywhere: `var speed: float = 200.0`, `func move(dir: Vector2) -> void:`.
- Use `@export` for tunables, `@onready var sprite: Sprite2D = $Sprite2D` for node refs.
- snake_case for functions/vars, PascalCase for `class_name`, CONSTANT_CASE for constants.
- Communicate upward with signals, downward with method calls ("call down, signal up").
- Physics movement in `_physics_process`, using `move_and_slide()` on CharacterBody nodes.
- Prefer composition: small reusable scenes (HitboxComponent, HealthComponent) over deep inheritance.

## Don't
- Don't hand-edit `.tscn`/`.tres` files unless asked; describe Inspector changes instead.
- Don't use `get_node` with long absolute paths; use unique names (`%Player`) or exported NodePaths.

## Verify
- `godot --headless --check-only --script <file>` for syntax; run GUT tests if `addons/gut` exists.
