Add a feature module
Read src/Game/README.md and src/Game/Example/README.md
first; copy the Example module as the shape. Follow CLAUDE.md rules.
Ask for the feature name (PascalCase, e.g. Inventory) if not given. Then:
Create the folders
src/Game/<Feature>/with layers as needed:Domain/— POCO state class(es), no logic, no Godot.Service/—I<Feature>Service.cs(contract) +<Feature>Service.cs(logic, engine-free), depends on repository interfaces fromCommon.UI/<Feature>UI.cs— GodotControl/node, builds UI in code, only calls the service.UI/Factory/<Feature>UIFactory.cs— creates the UI with injected dependencies.- Add
Enum/orObserver/only if actually needed.
Namespaces mirror the path with the
Game.Gameprefix:namespace Game.Game.<Feature>.<Layer>.Wire it in GameLevel constructor: create repository → service → factory (in that order), assign to private fields.
If the state must persist, register its type in
JsonConverterStateServiceinsideGameLevel— use theadd-persistable-stateskill's rules.Show it via a level screen — use the
add-screenskill (create anILevelObserverthat hosts the module's UI).Tests — add
tests/Game.Tests/<Feature>/Service/<Feature>ServiceTests.cs, mirroring the folder path, mockingCommoninterfaces (seeadd-tests).Docs — add
src/Game/<Feature>/README.md(usemodule-docs).Verify — run the
verifyskill (0 warnings, green tests).
Keep layer boundaries: UI → Service → Domain/Common. No Godot in Domain/Service/Repository. No virtual (use abstract/interface).