- This is a public Unity game template. Keep source, documentation, settings, and dependencies usable without private repositories, credentials, or hosted services.
- Preserve unrelated edits. Inspect the diff before editing or committing; stage explicit paths. Commit, push, tagging, and publishing need explicit user authorization. Use this repository's public contributor identity.
- Read
README.mdfor setup and validation commands. Keep contributor constraints here and the adjacentCLAUDE.mdas exactly@AGENTS.mdfollowed by LF. - Prefer existing Unity and package capabilities. Remove obsolete owners when replacing a system; do not edit package caches or introduce speculative framework layers.
- Target Unity
6000.6.6f1, URP, .NET Standard 2.1, and C# 9. Use explicit block namespaces; no file-scoped namespaces or global usings. - Keep startup usable offline and telemetry disabled until explicitly configured and consented. Save on pause and focus loss without treating them as permanent shutdown.
Mainowns composition and application lifetime. Keep game rules inLogic, state transitions inStateMachines, mutations inCommands, presentation inPresenters, and communication inMessages.- Resolve dependencies at composition boundaries and inject concrete constructor dependencies. Do not retain an installer or add new global service locators, singletons, or static events.
- GameData owns configuration and data primitives; Services owns persistence, messaging, commands, and asset loading. Reuse Statechart and UI Service for flow and presenters.
- Runtime code must not reference
UnityEditor. Put tooling inEditor/and Editor-only assemblies. Declare direct asmdef references for types consumed through other packages' APIs. - Preserve asset GUIDs, serialized field names, enum values, Addressables addresses, and assembly-qualified presenter bindings. Check scenes, prefabs, config assets, and saved data before renaming or deleting. Use explicit migrations for incompatible changes.
- Unity creates
.metafiles. Commit them with assets and retain them on moves; never manufacture GUIDs. Do not modify authored configuration assets at runtime. - Keep reflection-created save types and their serialized members preserved for IL2CPP in
Assets/Src/link.xml; an Editor test cannot prove managed stripping compatibility. - Preserve persistence keys and stored type names. Test loading existing data when changing serialization, defaults, save ownership, or assembly names; keep a recoverable copy before destructive migration.
- Read
Docs/CODING_STANDARDS.mdbefore writing or reviewing source, tests or tools. It owns code shape, naming, documentation and member ordering;.editorconfigowns mechanical formatting and IDE diagnostics. - Review the complete touched type, not just the diff. Preserve serialized layout and generated-source ownership when applying the standards.
- Run
Tools/validate.sh staticfor repository checks, then compile and run relevant EditMode/PlayMode tests for code changes. Serialize Unity processes for this project and never stop an Editor belonging to another project. - Tests assert observable behavior and costly invariants. Use
Behavior_Condition_ExpectedResultnames; avoid reflection on private state, redundant implementation-mirroring tests, and unexplained skipped tests. - Compilation, automated tests, Addressables builds, player builds, browser behavior, rendering, and device execution are separate evidence. Inspect result artifacts and report
Pass,Fail,Blocked, orNot run; never infer runtime correctness from a successful process exit. - Inspect the visible result for UI or rendering changes. Android builds and iOS exports do not prove signed installation, device execution, or store readiness.
- Keep the README focused on onboarding, architecture ownership, dependencies, and executable commands. Update it when those contracts change; omit copied package APIs and dated validation claims.