Implement fixes based on QA results (gate and assessments) for a specific Godot game story. This task is for the Game Developer agent to systematically consume QA outputs and apply game code/test changes while only updating allowed sections in the story file.
## Purpose
- Read QA outputs for a game story (gate YAML + assessment markdowns)
- Create a prioritized, deterministic fix plan for game features
- Apply game code and test changes to close gaps and address issues
- Update only the allowed story sections for the Game Developer agent
## Inputs
```yaml
required:
- story_id: '{epic}.{story}' # e.g., "2.2"
- qa_root: from `.bmad-godot-game-dev/config.yaml` key `qa.qaLocation` (e.g., `docs/project/qa`)
- story_root: from `.bmad-godot-game-dev/config.yaml` key `devStoryLocation` (e.g., `docs/project/stories`)
- Keep changes minimal and targeted; follow Godot best practices and project architecture
- Respect scene organization and node hierarchy
- Follow GDScript style guide or C# conventions as appropriate
### 3) Apply Changes
- Implement game code fixes per plan:
- GDScript: Follow Godot style guide, use signals for decoupling
- C#: Follow .NET conventions, use events/delegates appropriately
- Add missing tests to close coverage gaps:
- **GDScript Tests (GUT)**:
- Unit tests in `test/unit/` for game logic
- Integration tests in `test/integration/` for scene interactions
- Use `gut.p()` for parameterized tests
- Mock nodes with `double()` and `stub()`
- **C# Tests (GoDotTest/GodotTestDriver)**:
- Unit tests using xUnit or NUnit patterns
- Integration tests for scene and node interactions
- Use test fixtures for game state setup
- Follow Godot patterns:
- Autoload/singleton patterns for global game state
- Signal-based communication between nodes
- Resource files (.tres/.res) for data management
- Scene inheritance for reusable components
### 4) Validate
**For GDScript Projects:**
- Run GUT tests: `godot --headless --script res://addons/gut/gut_cmdln.gd -gselect=test/ -gexit`
- Check for script errors in Godot Editor (Script Editor panel)
- Validate scene references and node paths
- Run game in editor to verify no runtime errors
**For C# Projects:**
- Build solution: `dotnet build`
- Run tests: `dotnet test` or `godot --headless --run-tests`
- Check for compilation errors
- Validate no null reference exceptions in gameplay
**For Both:**
- Test gameplay mechanics manually if needed
- Verify performance (check FPS, memory usage)
- Iterate until all tests pass and no errors
### 5) Update Story (Allowed Sections ONLY)
CRITICAL: Dev agent is ONLY authorized to update these sections of the story file. Do not modify any other sections (e.g., QA Results, Story, Acceptance Criteria, Dev Notes, Testing):
- Tasks / Subtasks Checkboxes (mark any fix subtask you added as done)