Imported from MichaelFW-ui/Metoprolol (
AGENTS.md). Install upstream withnpx skills add MichaelFW-ui/Metoprolol. Copyright stays with the author.
Repository Guidelines
Required Reading
Read CLAUDE.md before touching the project; it defines language policy, architecture rules, and task flow. When adjusting networking, flow control, or data schemas, pair it with the relevant briefs in Assets/DesignNotes/. While collaborating with users, default to Chinese unless they explicitly request English.
若发现仓库中存在“预期之外”的改动,一律视为用户所做,绝对禁止擅自 checkout 或还原;如需澄清,先向用户确认。
禁止用任何形式修改.meta文件。
Project Structure & Module Organization
Metoprolol targets Unity 6000.0.48f1. Core scripts live in Assets/Scripts: Client/ drives UI bootstrap, networking facades, and timers; Server/ manages lobbies, rooms, and transport hosts; Shared/ contains Mahjong domain logic (tiles, shanten, agari). Editor testers sit in Assets/Scripts/Editor/Testers/. Scenes and prefabs reside in Assets/Scenes/ and Assets/Prefabs/, with runtime data in Assets/Resources/.
Build, Test, and Development Commands
Open the project through Unity Hub with editor 6000.0.48f1 selected. Automated builds and edit-mode suites must run in the maintainer’s approved environment—ask a human to execute the batch pipeline (e.g., “Please run the standard edit-mode suite on CI”). Inside the editor, trigger Mahjong diagnostics via Tools ▸ Mahjong to replay shanten, agari, and tile animation testers.
Coding Style & Naming Conventions
Use four-space indentation, braces on new lines, PascalCase for types, camelCase for fields, and ALL_CAPS for invariants. Keep commit messages, logging, and UI copy in Chinese unless localisation requires otherwise. Preserve the MVP split inside Client/UI/, and avoid leaking client logic into server/shared code. Format with Rider or Unity’s C# preset and keep .meta files paired with asset edits.
除了新建文件,其他任何情况下都禁止使用Python进行Edit操作。
使用简体中文回答用户问题。
Testing Guidelines
Rely on Unity’s Test Framework for edit-mode coverage. Place new NUnit fixtures beside related systems in Assets/Scripts/Editor/Testers/, naming them after the subsystem (e.g., ShantenEditorTest). Use representative tile-string cases and retain the existing Chinese log phrasing. Store batch run logs under Logs/ and attach them when reporting failures. Add Play Mode coverage under Assets/Tests/PlayMode/ if runtime behaviour needs validation.
Commit & Pull Request Guidelines
History favours concise Chinese commit subjects and focused scope. Reference the relevant design note (e.g., Networking.md) when aligning with documented patterns. Pull requests should outline gameplay or UI changes, list affected scenes/prefabs, note which commands or menu actions you requested, and include screenshots or clips for visual tweaks. Have the maintainer verify new .meta or ProjectSettings files before submission.