nccgs 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (278) hide show
  1. package/.claude/agents/nccgs-accessibility-specialist.md +26 -0
  2. package/.claude/agents/nccgs-adversarial-reviewer.md +26 -0
  3. package/.claude/agents/nccgs-ai-programmer.md +26 -0
  4. package/.claude/agents/nccgs-analytics-engineer.md +26 -0
  5. package/.claude/agents/nccgs-art-direction-lead.md +26 -0
  6. package/.claude/agents/nccgs-audio-direction-lead.md +26 -0
  7. package/.claude/agents/nccgs-creative-director.md +26 -0
  8. package/.claude/agents/nccgs-documentation-manager.md +26 -0
  9. package/.claude/agents/nccgs-economy-designer.md +26 -0
  10. package/.claude/agents/nccgs-engine-programmer.md +26 -0
  11. package/.claude/agents/nccgs-game-design-lead.md +26 -0
  12. package/.claude/agents/nccgs-game-designer.md +26 -0
  13. package/.claude/agents/nccgs-gameplay-programmer.md +26 -0
  14. package/.claude/agents/nccgs-level-designer.md +26 -0
  15. package/.claude/agents/nccgs-live-ops-designer.md +26 -0
  16. package/.claude/agents/nccgs-localization-lead.md +26 -0
  17. package/.claude/agents/nccgs-narrative-lead.md +26 -0
  18. package/.claude/agents/nccgs-network-programmer.md +26 -0
  19. package/.claude/agents/nccgs-performance-analyst.md +26 -0
  20. package/.claude/agents/nccgs-producer.md +26 -0
  21. package/.claude/agents/nccgs-production-coordinator.md +23 -0
  22. package/.claude/agents/nccgs-programming-lead.md +26 -0
  23. package/.claude/agents/nccgs-prototyper.md +26 -0
  24. package/.claude/agents/nccgs-qa-engineer.md +26 -0
  25. package/.claude/agents/nccgs-qa-lead.md +26 -0
  26. package/.claude/agents/nccgs-release-engineer.md +26 -0
  27. package/.claude/agents/nccgs-release-lead.md +26 -0
  28. package/.claude/agents/nccgs-security-engineer.md +26 -0
  29. package/.claude/agents/nccgs-sound-designer.md +26 -0
  30. package/.claude/agents/nccgs-systems-designer.md +26 -0
  31. package/.claude/agents/nccgs-technical-architect.md +26 -0
  32. package/.claude/agents/nccgs-technical-artist.md +26 -0
  33. package/.claude/agents/nccgs-technical-director.md +26 -0
  34. package/.claude/agents/nccgs-tools-programmer.md +26 -0
  35. package/.claude/agents/nccgs-ui-programmer.md +26 -0
  36. package/.claude/agents/nccgs-unity-build-specialist.md +26 -0
  37. package/.claude/agents/nccgs-unity-content-specialist.md +26 -0
  38. package/.claude/agents/nccgs-unity-implementer.md +26 -0
  39. package/.claude/agents/nccgs-unity-rendering-specialist.md +26 -0
  40. package/.claude/agents/nccgs-unity-systems-specialist.md +26 -0
  41. package/.claude/agents/nccgs-unity-ui-specialist.md +26 -0
  42. package/.claude/agents/nccgs-ux-designer.md +26 -0
  43. package/.claude/agents/nccgs-verification-engineer.md +26 -0
  44. package/.claude/agents/nccgs-world-builder.md +26 -0
  45. package/.claude/agents/nccgs-writer.md +26 -0
  46. package/.claude/nccgs/THIRD_PARTY_NOTICES.md +13 -0
  47. package/.claude/nccgs/VERSION +1 -0
  48. package/.claude/nccgs/constitution.md +131 -0
  49. package/.claude/nccgs/hooks/agent-audit.mjs +10 -0
  50. package/.claude/nccgs/hooks/common.mjs +41 -0
  51. package/.claude/nccgs/hooks/post-compact.mjs +1 -0
  52. package/.claude/nccgs/hooks/pre-compact.mjs +8 -0
  53. package/.claude/nccgs/hooks/protect-git.mjs +22 -0
  54. package/.claude/nccgs/hooks/protect-write.mjs +17 -0
  55. package/.claude/nccgs/hooks/session-start.mjs +15 -0
  56. package/.claude/nccgs/hooks/session-stop.mjs +7 -0
  57. package/.claude/nccgs/protocols/agent-contract.md +34 -0
  58. package/.claude/nccgs/protocols/context-packets.md +13 -0
  59. package/.claude/nccgs/protocols/evidence.md +15 -0
  60. package/.claude/nccgs/protocols/model-routing.md +22 -0
  61. package/.claude/nccgs/protocols/orchestration.md +26 -0
  62. package/.claude/nccgs/protocols/unity-boundary.md +11 -0
  63. package/.claude/nccgs/settings.fragment.json +77 -0
  64. package/.claude/nccgs/studio.json +347 -0
  65. package/.claude/nccgs/tools/configure-models.mjs +39 -0
  66. package/.claude/nccgs/unity-skills-manifest.json +727 -0
  67. package/.claude/nccgs/workflow-catalog.json +317 -0
  68. package/.claude/rules/nccgs-canonical-docs.md +19 -0
  69. package/.claude/rules/nccgs-editor-tools.md +12 -0
  70. package/.claude/rules/nccgs-localization.md +12 -0
  71. package/.claude/rules/nccgs-networking.md +13 -0
  72. package/.claude/rules/nccgs-performance.md +14 -0
  73. package/.claude/rules/nccgs-rendering.md +16 -0
  74. package/.claude/rules/nccgs-security.md +13 -0
  75. package/.claude/rules/nccgs-tests.md +18 -0
  76. package/.claude/rules/nccgs-ui.md +14 -0
  77. package/.claude/rules/nccgs-unity-assets.md +21 -0
  78. package/.claude/rules/nccgs-unity-code.md +22 -0
  79. package/.claude/skills/accessibility-review/SKILL.md +14 -0
  80. package/.claude/skills/architecture-decision/SKILL.md +14 -0
  81. package/.claude/skills/asset-audit/SKILL.md +14 -0
  82. package/.claude/skills/audit/SKILL.md +16 -0
  83. package/.claude/skills/audit/references/dimensions.md +46 -0
  84. package/.claude/skills/balance-review/SKILL.md +14 -0
  85. package/.claude/skills/bug-triage/SKILL.md +14 -0
  86. package/.claude/skills/build-live-game/SKILL.md +317 -0
  87. package/.claude/skills/build-live-game/references/achievements.md +779 -0
  88. package/.claude/skills/build-live-game/references/apis.md +280 -0
  89. package/.claude/skills/build-live-game/references/authentication.md +437 -0
  90. package/.claude/skills/build-live-game/references/battlepass.md +860 -0
  91. package/.claude/skills/build-live-game/references/cloud-code.md +563 -0
  92. package/.claude/skills/build-live-game/references/cloud-save.md +474 -0
  93. package/.claude/skills/build-live-game/references/deployment.md +216 -0
  94. package/.claude/skills/build-live-game/references/player-account.md +813 -0
  95. package/.claude/skills/build-live-game/references/remote-config.md +96 -0
  96. package/.claude/skills/build-live-game/references/tooling.md +431 -0
  97. package/.claude/skills/closure/SKILL.md +14 -0
  98. package/.claude/skills/code-review/SKILL.md +14 -0
  99. package/.claude/skills/compatibility-review/SKILL.md +14 -0
  100. package/.claude/skills/context-pack/SKILL.md +14 -0
  101. package/.claude/skills/dependency-review/SKILL.md +14 -0
  102. package/.claude/skills/design/SKILL.md +20 -0
  103. package/.claude/skills/design-review/SKILL.md +14 -0
  104. package/.claude/skills/evidence-review/SKILL.md +14 -0
  105. package/.claude/skills/hotfix/SKILL.md +14 -0
  106. package/.claude/skills/implement-in-app-purchases/README.md +233 -0
  107. package/.claude/skills/implement-in-app-purchases/SKILL.md +158 -0
  108. package/.claude/skills/implement-in-app-purchases/references/api-notes.md +562 -0
  109. package/.claude/skills/implement-in-app-purchases/references/codeless-catalog.md +331 -0
  110. package/.claude/skills/implement-in-app-purchases/references/convert-adapty.md +268 -0
  111. package/.claude/skills/implement-in-app-purchases/references/convert-essentialkit.md +239 -0
  112. package/.claude/skills/implement-in-app-purchases/references/convert-revenuecat.md +275 -0
  113. package/.claude/skills/implement-in-app-purchases/references/convert-unipay.md +145 -0
  114. package/.claude/skills/implement-in-app-purchases/references/migration-v4-to-v5.md +204 -0
  115. package/.claude/skills/implement-in-app-purchases/references/path-add-iap-to-new-project.md +198 -0
  116. package/.claude/skills/implement-in-app-purchases/references/path-convert-native-google-billing.md +356 -0
  117. package/.claude/skills/implement-in-app-purchases/references/path-convert-native-storekit.md +446 -0
  118. package/.claude/skills/implement-in-app-purchases/references/path-implement-iap-d2c.md +680 -0
  119. package/.claude/skills/implement-in-app-purchases/references/platform-notes.md +204 -0
  120. package/.claude/skills/implement-in-app-purchases/references/pre-check.md +205 -0
  121. package/.claude/skills/incident-recovery/SKILL.md +14 -0
  122. package/.claude/skills/initialize-ai-navigation/SKILL.md +95 -0
  123. package/.claude/skills/initialize-ai-navigation/references/navigation-system.md +794 -0
  124. package/.claude/skills/levelplay-unity-integration/CHANGELOG.md +57 -0
  125. package/.claude/skills/levelplay-unity-integration/README.md +74 -0
  126. package/.claude/skills/levelplay-unity-integration/SKILL.md +1126 -0
  127. package/.claude/skills/levelplay-unity-integration/references/banner-api.md +920 -0
  128. package/.claude/skills/levelplay-unity-integration/references/best-practices.md +536 -0
  129. package/.claude/skills/levelplay-unity-integration/references/ilrd-api.md +337 -0
  130. package/.claude/skills/levelplay-unity-integration/references/initialization-api.md +630 -0
  131. package/.claude/skills/levelplay-unity-integration/references/interstitial-api.md +899 -0
  132. package/.claude/skills/levelplay-unity-integration/references/ios-setup.md +491 -0
  133. package/.claude/skills/levelplay-unity-integration/references/migration-sdk-9.md +666 -0
  134. package/.claude/skills/levelplay-unity-integration/references/privacy-settings.md +608 -0
  135. package/.claude/skills/levelplay-unity-integration/references/rewarded-api.md +902 -0
  136. package/.claude/skills/localization/SKILL.md +135 -0
  137. package/.claude/skills/localization/references/api-notes.md +76 -0
  138. package/.claude/skills/localization/resources/L10nBatchProcessor.cs +69 -0
  139. package/.claude/skills/localization/resources/LocalizedFontAsset.cs +18 -0
  140. package/.claude/skills/localize-game/SKILL.md +14 -0
  141. package/.claude/skills/migrate-project/SKILL.md +21 -0
  142. package/.claude/skills/migrate-project/references/procedure.md +63 -0
  143. package/.claude/skills/milestone-review/SKILL.md +14 -0
  144. package/.claude/skills/new-unity-project/SKILL.md +179 -0
  145. package/.claude/skills/optimize-audio/SKILL.md +199 -0
  146. package/.claude/skills/optimize-audio/resources/audio-import-api.md +146 -0
  147. package/.claude/skills/optimize-audio/resources/platform-settings.md +48 -0
  148. package/.claude/skills/optimize-text-mesh-pro/SKILL.md +182 -0
  149. package/.claude/skills/optimize-web/SKILL.md +393 -0
  150. package/.claude/skills/optimize-web/resources/WebOptimizer.cs +21 -0
  151. package/.claude/skills/optimize-web/resources/toktx-examples.sh +11 -0
  152. package/.claude/skills/performance-audit/SKILL.md +14 -0
  153. package/.claude/skills/physics-3d-collision/SKILL.md +442 -0
  154. package/.claude/skills/physics-3d-collision/references/troubleshooting.md +41 -0
  155. package/.claude/skills/physics-3d-collision/resources/CollisionDebugger.cs +33 -0
  156. package/.claude/skills/plan-feature/SKILL.md +14 -0
  157. package/.claude/skills/playtest/SKILL.md +14 -0
  158. package/.claude/skills/project-stage/SKILL.md +14 -0
  159. package/.claude/skills/prototype-feature/SKILL.md +14 -0
  160. package/.claude/skills/qa-plan/SKILL.md +14 -0
  161. package/.claude/skills/release/SKILL.md +18 -0
  162. package/.claude/skills/release-readiness/SKILL.md +14 -0
  163. package/.claude/skills/retrospective/SKILL.md +14 -0
  164. package/.claude/skills/review/SKILL.md +16 -0
  165. package/.claude/skills/security-audit/SKILL.md +14 -0
  166. package/.claude/skills/setup-multiplayer-services/SKILL.md +39 -0
  167. package/.claude/skills/setup-multiplayer-services/references/dgs-entrypoint.md +79 -0
  168. package/.claude/skills/setup-multiplayer-services/references/entrypoints.md +213 -0
  169. package/.claude/skills/setup-multiplayer-services/references/examples.md +33 -0
  170. package/.claude/skills/setup-multiplayer-services/references/implementation-fit.md +30 -0
  171. package/.claude/skills/setup-multiplayer-services/references/underlying-services.md +11 -0
  172. package/.claude/skills/setup-multiplayer-services/references/workflows-prerequisites.md +17 -0
  173. package/.claude/skills/setup-vivox-voice-chat/SKILL.md +118 -0
  174. package/.claude/skills/setup-vivox-voice-chat/evals/.env.example +6 -0
  175. package/.claude/skills/setup-vivox-voice-chat/evals/README.md +101 -0
  176. package/.claude/skills/setup-vivox-voice-chat/evals/promptfooconfig.yaml +32 -0
  177. package/.claude/skills/setup-vivox-voice-chat/evals/tests/init-and-login.yaml +76 -0
  178. package/.claude/skills/setup-vivox-voice-chat/evals/tests/text-chat.yaml +65 -0
  179. package/.claude/skills/setup-vivox-voice-chat/evals/tests/voice-channels.yaml +74 -0
  180. package/.claude/skills/setup-vivox-voice-chat/references/events-and-participants.md +79 -0
  181. package/.claude/skills/setup-vivox-voice-chat/references/init-and-login.md +92 -0
  182. package/.claude/skills/setup-vivox-voice-chat/references/text-chat.md +93 -0
  183. package/.claude/skills/setup-vivox-voice-chat/references/troubleshooting.md +47 -0
  184. package/.claude/skills/setup-vivox-voice-chat/references/voice-channels.md +90 -0
  185. package/.claude/skills/shader-graph-create-custom-node/SKILL.md +25 -0
  186. package/.claude/skills/shader-graph-create-custom-node/resources/all_hints.hlsl +182 -0
  187. package/.claude/skills/sprint-plan/SKILL.md +14 -0
  188. package/.claude/skills/sprite-editor/SKILL.md +66 -0
  189. package/.claude/skills/sprite-editor/references/api_reference.md +151 -0
  190. package/.claude/skills/sprite-editor/references/background.md +112 -0
  191. package/.claude/skills/sprite-editor/references/templates.md +72 -0
  192. package/.claude/skills/sprite-editor/scripts/AutomaticSliceTexture.cs +40 -0
  193. package/.claude/skills/sprite-editor/scripts/GenerateNewSpriteRects.cs +200 -0
  194. package/.claude/skills/sprite-editor/scripts/GetTextureSourceImageSize.cs +32 -0
  195. package/.claude/skills/sprite-editor/scripts/GetTextureToSlice.cs +55 -0
  196. package/.claude/skills/sprite-editor/scripts/GridSliceTexture.cs +40 -0
  197. package/.claude/skills/sprite-editor/scripts/IsometricSliceTexture.cs +141 -0
  198. package/.claude/skills/sprite-editor/scripts/README.md +134 -0
  199. package/.claude/skills/sprite-editor/scripts/SetPivotExample.cs +58 -0
  200. package/.claude/skills/sprite-editor/scripts/SpriteToPng.cs +88 -0
  201. package/.claude/skills/status/SKILL.md +16 -0
  202. package/.claude/skills/story-readiness/SKILL.md +14 -0
  203. package/.claude/skills/test/SKILL.md +16 -0
  204. package/.claude/skills/ui/SKILL.md +142 -0
  205. package/.claude/skills/ui-imgui/SKILL.md +186 -0
  206. package/.claude/skills/ui-imgui/references/gui-elements.md +156 -0
  207. package/.claude/skills/ui-imgui/references/templates.md +141 -0
  208. package/.claude/skills/ui-review/SKILL.md +14 -0
  209. package/.claude/skills/ui-ugui/SKILL.md +282 -0
  210. package/.claude/skills/ui-ugui/references/scrollview-setup.md +29 -0
  211. package/.claude/skills/ui-uitk/SKILL.md +235 -0
  212. package/.claude/skills/ui-uitk/references/common-issues.md +74 -0
  213. package/.claude/skills/ui-uitk/references/custom-elements.md +241 -0
  214. package/.claude/skills/ui-uitk/references/painter2d.md +282 -0
  215. package/.claude/skills/ui-uitk/references/pointermanipulator-guide.md +94 -0
  216. package/.claude/skills/ui-uitk/references/svg-icons.md +136 -0
  217. package/.claude/skills/ui-uitk/references/ui-runtime-binding.md +234 -0
  218. package/.claude/skills/ui-uitk/references/uss-guide.md +138 -0
  219. package/.claude/skills/unity-cli/CHANGELOG.md +233 -0
  220. package/.claude/skills/unity-cli/SECURITY.md +22 -0
  221. package/.claude/skills/unity-cli/SKILL.md +414 -0
  222. package/.claude/skills/unity-cli/references/auth-license-cloud.md +146 -0
  223. package/.claude/skills/unity-cli/references/build-run-test.md +349 -0
  224. package/.claude/skills/unity-cli/references/collaboration.md +472 -0
  225. package/.claude/skills/unity-cli/references/config-hub.md +103 -0
  226. package/.claude/skills/unity-cli/references/diagnostics-maintenance.md +326 -0
  227. package/.claude/skills/unity-cli/references/editors-install.md +327 -0
  228. package/.claude/skills/unity-cli/references/integration-advanced.md +472 -0
  229. package/.claude/skills/unity-cli/references/projects-templates.md +574 -0
  230. package/.claude/skills/unity-package-management/SKILL.md +304 -0
  231. package/.claude/skills/unity-package-management/references/select-packages.md +108 -0
  232. package/.claude/skills/urp-postprocessing/SKILL.md +188 -0
  233. package/.claude/skills/urp-postprocessing/references/code-templates.md +119 -0
  234. package/.claude/skills/urp-postprocessing/references/effect-reference.md +86 -0
  235. package/.claude/skills/validate-urp-render-graph-renderer-feature/SKILL.md +269 -0
  236. package/.claude/skills/work/SKILL.md +36 -0
  237. package/.claude/skills/work/references/classification.md +41 -0
  238. package/.claude/skills/work/references/closure.md +50 -0
  239. package/.claude/skills/work/references/feature-contracts.md +32 -0
  240. package/.claude/skills/work/references/verification.md +26 -0
  241. package/CLAUDE.md +6 -0
  242. package/LICENSE +21 -0
  243. package/README.md +162 -0
  244. package/THIRD_PARTY_NOTICES.md +23 -0
  245. package/UPGRADING.md +32 -0
  246. package/VERSION +1 -0
  247. package/docs/ARCHITECTURE.md +73 -0
  248. package/docs/HUONG-DAN-MIGRATE-VA-SU-DUNG.md +324 -0
  249. package/docs/MIGRATION-MATRIX.md +23 -0
  250. package/docs/PROJECT-POLICY.md +67 -0
  251. package/docs/WORKFLOWS.md +61 -0
  252. package/package-assets/setup-vivox-voice-chat-evals.gitignore +7 -0
  253. package/package.json +41 -0
  254. package/scaffold/.nccgs/bugs/.gitkeep +1 -0
  255. package/scaffold/.nccgs/closures/.gitkeep +1 -0
  256. package/scaffold/.nccgs/context/.gitkeep +1 -0
  257. package/scaffold/.nccgs/decisions/.gitkeep +1 -0
  258. package/scaffold/.nccgs/evidence/.gitkeep +1 -0
  259. package/scaffold/.nccgs/features/.gitkeep +1 -0
  260. package/scaffold/.nccgs/migrations/.gitkeep +1 -0
  261. package/scaffold/.nccgs/playtests/.gitkeep +1 -0
  262. package/scaffold/.nccgs/project.yaml +103 -0
  263. package/scaffold/.nccgs/requirements.yaml +10 -0
  264. package/scaffold/.nccgs/reviews/.gitkeep +1 -0
  265. package/scaffold/.nccgs/state.md +40 -0
  266. package/scaffold/.nccgs/templates/agent-handoff.md +25 -0
  267. package/scaffold/.nccgs/templates/architecture-decision.md +27 -0
  268. package/scaffold/.nccgs/templates/closure-record.md +51 -0
  269. package/scaffold/.nccgs/templates/context-packet.yaml +17 -0
  270. package/scaffold/.nccgs/templates/evidence-record.md +23 -0
  271. package/scaffold/.nccgs/templates/feature-contract.md +35 -0
  272. package/scaffold/.nccgs/templates/migration-plan.md +40 -0
  273. package/scaffold/.nccgs/templates/waiver.md +11 -0
  274. package/scripts/cli.mjs +56 -0
  275. package/scripts/install.mjs +267 -0
  276. package/scripts/sync-unity-skills.mjs +126 -0
  277. package/scripts/validate.mjs +205 -0
  278. package/tests/framework.test.mjs +121 -0
@@ -0,0 +1,135 @@
1
+ ---
2
+ name: localization
3
+ description: "Sets up and configures Unity Localization, including locales, String/Asset Tables, CJK font support, and Addressables workflows. Use when the user wants to add languages to a project, translate UI text, support Asian (CJK) languages with TMP fonts, or mentions i18n, l10n, multilingual support, or making a game support multiple languages."
4
+ ---
5
+
6
+ This guide covers setting up and configuring Unity Localization, including locales, String and Asset Tables, Addressables integration, and CJK font support via Asset Tables.
7
+
8
+ ## 0. Package Installation Check
9
+ Before doing anything else, verify that the Localization packages is installed. Many APIs in this skill will fail silently or throw confusing errors if the package isn't present.
10
+ 1. **Check:** Use `UnityEditor.PackageManager.Client.List(true)` to check for `com.unity.localization`.
11
+ 2. **Install:** If missing, use `Client.Add("com.unity.localization")`.
12
+ 3. **Wait:** Do not proceed until `Client.List` confirms installation.
13
+
14
+ ## 1. Localization Settings & Locales
15
+ If `LocalizationEditorSettings.ActiveLocalizationSettings` is null, you must find or create it:
16
+ 1. **Find:** Use `AssetDatabase.FindAssets("t:LocalizationSettings")`. If found, load the first one and assign it to `LocalizationEditorSettings.ActiveLocalizationSettings`.
17
+ 2. **Create:** If not found, create a new instance and save it to `Assets/Localization/LocalizationSettings.asset`. Use `ScriptableObject.CreateInstance<LocalizationSettings>()` followed by `AssetDatabase.CreateAsset()`.
18
+ 3. **Activate:** Set `LocalizationEditorSettings.ActiveLocalizationSettings = settings`.
19
+ 4. **Locales:** Ensure locales (en, fr, de, etc.) exist. Create them if missing and add them to settings using `LocalizationEditorSettings.AddLocale(locale)`.
20
+
21
+ ## 2. Modifying Localization Tables
22
+ Programmatic changes to String or Asset tables require notification to the Editor.
23
+ Always create the required asset tables, unless there is already an existing one in the project.
24
+
25
+ ### **Safe Population Pattern**
26
+ When populating tables from a dataset, match by `Locale.Identifier.Code` explicitly. The order of `GetLocales()` is not guaranteed to match your input data array — assuming it does will cause silent data mismatches that are very hard to debug.
27
+ For **Asset Tables**, use the GUID of the asset: `table.GetEntry(sharedId) ?? table.AddEntry(sharedId, guid);`.
28
+
29
+ ### **Refresh & Notification**
30
+ After any modification (adding keys, updating values), notify the Editor so it can refresh its internal state. Skipping this will leave the Editor showing stale data until the next reimport.
31
+ 1. Call `EditorUtility.SetDirty(collection)`, `EditorUtility.SetDirty(collection.SharedData)`, on each modified `Table`.
32
+ 2. **Unity 6+ Notification:** `LocalizationEditorSettings.EditorEvents.RaiseCollectionModified(sender, collection);`
33
+ 3. Always call `AssetDatabase.SaveAssets()` at the end.
34
+
35
+ ## 3. UI Localization and Layout
36
+ ### **Namespacing & Conflicts**
37
+ - **Always qualify names:** Use `UnityEngine.UI.Image`, `UnityEngine.UI.VerticalLayoutGroup`, `UnityEngine.UI.ScrollRect`, `UnityEngine.UI.Mask`, `UnityEngine.UI.CanvasScaler`, `UnityEngine.UI.GraphicRaycaster`, `UnityEngine.UI.ContentSizeFitter`, `UnityEngine.UI.LayoutRebuilder`, etc.
38
+ - `UnityEngine.UI` is both a namespace and a class container, so unqualified names produce `CS0118` (namespace used like a type). Full qualification avoids this entirely.
39
+ - **Single Instance:** Always check `GameObject.Find("YourCanvasName")` and destroy the old one before creating a new one.
40
+ - **No Debug Dropdown:** NEVER create a manual UI dropdown or debug menu to change the locale. The Localization package has a built-in way to do this properly (e.g., via the "Localization Scene Controls" window for previews).
41
+
42
+ ### **Localized String Events (Robust Binding)**
43
+ - **Check Component Type:** Identify if the target is `TextMeshPro` or legacy `UnityEngine.UI.Text`.
44
+ - **Bind Correctly:** add the public `UnityEngine.Localization.Components.LocalizeStringEvent`
45
+ component and wire it yourself — set `StringReference` to the table entry, then add an
46
+ `OnUpdateString` listener that assigns the value to the text component (`TMP_Text.text` for
47
+ TextMeshPro, `UnityEngine.UI.Text.text` for legacy Text).
48
+
49
+ Do **not** reflect into `UnityEditor.Localization.Plugins.TMPro.LocalizeComponent_TMPro` or its
50
+ UGUI counterpart. Those are `internal` (measured on Localization 1.5.12), so reaching them means
51
+ routing around access control to reach an API Unity makes no stability commitment about — it can
52
+ change or disappear in any package release. `LocalizeStringEvent` is public and does the same job
53
+ with the wiring made explicit.
54
+ - **Layout Rebuild:** After setting localized text or populating a list, call `UnityEngine.UI.LayoutRebuilder.ForceRebuildLayoutImmediate(parentTransform)` to ensure dimensions update.
55
+
56
+ ## 4. Asian Language Font Support (CJK)
57
+ Avoid TMP Fallback Fonts for CJK locales. Use **Asset Table Font Swapping** for each specific locale instead — fallbacks are unreliable and hard to debug when glyphs are missing.
58
+
59
+ 1. **Use locale-specific fonts:** Western fonts like Arial or Liberation Sans don't contain CJK glyphs, which results in "tofu" (square blocks). Always use a font designed for the target language:
60
+ - For **Simplified Chinese (zh-Hans)**: Use `msyh.ttc` (Microsoft YaHei) or equivalent.
61
+ - For **Japanese (ja)**: Use `msgothic.ttc` (MS Gothic) or equivalent.
62
+ - For **Korean (ko)**: Use `malgun.ttf` (Malgun Gothic) or equivalent.
63
+ - If system font copying fails, stop and report it. Do not substitute with a Western font.
64
+ 2. **Robust Font Creation:** Create dynamic `TMP_FontAsset` from imported fonts.
65
+ 3. **Multi-Atlas & Dynamic:** CJK character sets are too large for static atlases; a single atlas will run out of space immediately.
66
+ - `fontAsset.atlasPopulationMode = AtlasPopulationMode.Dynamic;`
67
+ - `fontAsset.isMultiAtlasTexturesEnabled = true;`
68
+ 4. **Sub-Assets:** Save atlas and material as sub-assets, or they'll be lost on reimport: `AssetDatabase.AddObjectToAsset(fontAsset.atlasTexture, fontAsset);`.
69
+ - Explicitly link the material's texture: `fontAsset.material.mainTexture = fontAsset.atlasTexture;` and set both as dirty before saving.
70
+ 5. **Addressables:** Every asset referenced in an Asset Table must be marked as Addressable.
71
+ - Do not reference assets inside a `Resources/` folder in an Asset Table. This causes `OperationException: Failed to load sub-asset` errors. If an asset is in `Resources/`, copy it to `Assets/Fonts/` or similar before making it Addressable.
72
+ - If a font asset is deleted and recreated, the new GUID must be manually updated in the Asset Table and re-added to Addressables.
73
+ 6. **Specialized Types:** For TextMesh Pro font swapping, prefer `LocalizedTmpFont` over `LocalizedAsset<TMP_FontAsset>` to avoid implicit conversion errors.
74
+ 7. **Build Requirement:** After updating Asset Tables or Addressable groups, trigger a build: `AddressableAssetSettings.BuildPlayerContent();`.
75
+
76
+ ### **Verification Step**
77
+ Before concluding any CJK localization task:
78
+ 1. **The Tofu Check:** Switch the editor locale to `zh-Hans`, `ja`, and `ko`. Inspect the UI. If any characters appear as squares (tofu), the font setup has FAILED.
79
+ 2. **Asset Table Check:** Verify that the `AssetTable` for the CJK locale points to the correct CJK `TMP_FontAsset`, NOT a default Western font.
80
+ 3. **Multi-Atlas Check:** Confirm `isMultiAtlasTexturesEnabled` is `true` on the CJK font assets.
81
+
82
+ ## 5. Automatic Layout (UGUI)
83
+ - **Parent:** `VerticalLayoutGroup` with `Child Control Height: True`, `Child Force Expand Height: False`.
84
+ - **Labels:** Each label must have a `ContentSizeFitter` set to `Vertical Fit: Preferred Size`.
85
+ - **TMP:** Set `Enable Word Wrapping: True` and `Overflow: Overflow`.
86
+
87
+ ### Notes when translating an existing project
88
+ - **Minimal Code Changes**: Never modify code unrelated to localization. Use a static helper class (e.g., `L10n`) to wrap `LocalizationSettings.StringDatabase.GetLocalizedString` for easy injection into existing scripts.
89
+ - **Robust Mapping Strategy**: When mapping existing UI text to keys, sort keys by string length (descending) and match longest strings first. This prevents short strings (like "NO") from matching parts of longer sentences. Use case-insensitive matching where appropriate.
90
+ - **Component Event Listeners**: When setting up `LocalizeStringEvent` via script, avoid `UnityEventTools.AddPersistentListener` as it often fails to set the dynamic mode (Mode 0) correctly.
91
+ Instead, use the **SerializedObject Pattern** described in Section 3 to explicitly set `m_MethodName` to `set_text` and `m_Mode` to `0`. Persistent listeners **MUST** point to a method on a `UnityEngine.Object`; lambdas will fail.
92
+ - **Initialization & Refresh**:
93
+ - `LocalizationEditorSettings.CreateStringTableCollection` expects a **directory path** (e.g., `Assets/Localization`), not a full asset path.
94
+ - Always call `lEvent.RefreshString()` after assigning a `LocalizedString` reference programmatically to update the UI immediately.
95
+ - Ensure keys are added to **all** tables in a collection (en, de, ja, etc.) to avoid "No translation found" errors.
96
+ - **Namespaces & Linq**: Always include `using System.Linq;` when searching collections and `using UnityEngine.Localization;` when working with locales or tables.
97
+ - **Verification**: After modifying tables or addressables, run `AddressableAssetSettings.BuildPlayerContent()` and switch the Editor locale to verify changes. Check `LocalizationSettings.Instance` status after activation.
98
+ - **Smart Strings**: Set up smart strings where needed. Inspect the context of each string by taking the entire UI it is on, and any scripts that affect it, into account. Set the context on the string table to ensure translations make sense.
99
+
100
+ ## 6. Recommended Translation Strategy
101
+ To efficiently translate an existing project, follow this multi-step workflow:
102
+
103
+ 1. **Extraction & Component Setup:**
104
+ - **Find all occurrences:** Scan all scenes and prefabs for strings in code and UI components (Legacy `UnityEngine.UI.Text`, `TextMeshPro`, buttons, etc.).
105
+ - **Shared Table:** Create a central String Table (e.g., `UIStrings`) with the base language and a "Context" column for each key to guide translators.
106
+ - **Attach Components:** For every UI element found, attach a `LocalizeStringEvent` (for text) and a `LocalizedFont` helper (for font swapping).
107
+ - **Validation:** Ensure these components are set up with persistent listeners (`EditorAndRuntime`) so they update in the Editor immediately when the locale changes.
108
+
109
+ 2. **Context-Aware Translation:**
110
+ - **Translate:** Once the table is populated, provide translations for each locale.
111
+ - **Context is King:** Always refer to the "Context" column or inspect the UI layout to ensure the translation fits the intended meaning and space.
112
+ - **Grammar & Tone:** Ensure the tone matches the game's style. For example, use imperative verbs for buttons (e.g., German: "Lauf!" instead of "Laufen") and correct pluralization for labels (e.g., "Punkte" instead of "Punkt").
113
+
114
+ 3. **Quality Assurance (QA):**
115
+ - **Scene Controls:** Use `Window > Asset Management > Localization Scene Controls` or script: `LocalizationSettings.SelectedLocale = LocalizationSettings.AvailableLocales.GetLocale("de");`.
116
+ - **Visual Inspection:** Methodically inspect every prefab and scene in the base language and all target languages.
117
+ - **Layout Fit:** Check for text overflows or "tofu" (missing glyphs). Adjust font sizes or use `ContentSizeFitter` if strings are too long.
118
+
119
+
120
+ ## API Reference
121
+ For detailed API usage, common namespace conflicts, Addressables patterns, and font repair steps, see [references/api-notes.md](references/api-notes.md).
122
+
123
+ ## 7. Accelerated Localization Workflow
124
+ To localize an entire project efficiently, use a batch processing script that handles all scenes in one pass.
125
+
126
+ **Ask before acting:** Before running any batch operation, confirm with the user:
127
+ > "This will open every scene in the project, attach `LocalizeStringEvent` components, and save all modified scenes. This cannot be undone automatically. Shall I proceed?"
128
+
129
+ Only proceed once the user has confirmed. The batch processor template is in [resources/L10nBatchProcessor.cs](resources/L10nBatchProcessor.cs).
130
+
131
+ ### **Technical Tips for Speed**
132
+ - **Table References:** Use `TableReference` names (strings) instead of GUIDs — they are easier to read and maintain.
133
+ - **Batch Refresh:** Use `LocalizationSettings.Instance.ForceRefresh()` after modifications to force the UI to update in the editor.
134
+ - **Font Swap Automation:** Create the `GameAssets` table once and use a script to re-assign `LocalizeFontEvent` to all labels in one pass.
135
+ - **LocalizedFontAsset component:** The template is in [resources/LocalizedFontAsset.cs](resources/LocalizedFontAsset.cs).
@@ -0,0 +1,76 @@
1
+ # Localization API Reference
2
+
3
+ ## LocalizationEditorSettings
4
+ The primary entry point for Editor-time localization settings.
5
+ - `GetStringTableCollections()` / `GetAssetTableCollections()`: Retrieves collections.
6
+ - `CreateStringTableCollection(name, path)`: Factory methods. Expects a **directory path** (e.g., `Assets/Localization`), not a full asset path.
7
+ - `EditorEvents.RaiseCollectionModified`: Must be called after any modification to refresh the editor.
8
+
9
+ ```csharp
10
+ LocalizationEditorSettings.EditorEvents.RaiseCollectionModified(sender, collection);
11
+ ```
12
+
13
+ ## Asset Table Entries
14
+ When adding entries to an Asset Table (fonts, textures, etc.), always use the asset's GUID:
15
+
16
+ ```csharp
17
+ string guid = AssetDatabase.AssetPathToGUID(AssetDatabase.GetAssetPath(myAsset));
18
+ var entry = table.GetEntry(sharedEntryId) ?? table.AddEntry(sharedEntryId, guid);
19
+ entry.Guid = guid;
20
+ EditorUtility.SetDirty(table);
21
+ ```
22
+
23
+ ## Common Namespace Conflicts (CS0118)
24
+ `UnityEngine.UI` is both a namespace and a class container — always fully qualify these types:
25
+ - `UnityEngine.UI.Image`
26
+ - `UnityEngine.UI.ScrollRect`
27
+ - `UnityEngine.UI.Mask`
28
+ - `UnityEngine.UI.CanvasScaler`
29
+ - `UnityEngine.UI.GraphicRaycaster`
30
+ - `UnityEngine.UI.VerticalLayoutGroup`
31
+ - `UnityEngine.UI.ContentSizeFitter`
32
+
33
+ ## Addressables Requirement
34
+ Any asset referenced in an Asset Table must be marked as Addressable:
35
+
36
+ ```csharp
37
+ var guid = AssetDatabase.AssetPathToGUID(assetPath);
38
+ var settings = UnityEditor.AddressableAssets.AddressableAssetSettingsDefaultObject.Settings;
39
+ settings.CreateOrMoveEntry(guid, settings.DefaultGroup);
40
+ ```
41
+
42
+ ## Avoiding the Resources Folder
43
+ Do not reference assets inside a `Resources/` folder in Asset Tables — the Addressables system
44
+ cannot load sub-assets from Resources, causing `OperationException: Failed to load sub-asset`.
45
+ Copy the asset out first:
46
+
47
+ ```csharp
48
+ string source = "Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF.asset";
49
+ string target = "Assets/Fonts/LiberationSans SDF Localized.asset";
50
+ if (!File.Exists(target)) {
51
+ AssetDatabase.CopyAsset(source, target);
52
+ AssetDatabase.ImportAsset(target);
53
+ }
54
+ // Use target path for Addressables and Asset Tables
55
+ ```
56
+
57
+ ## Triggering an Addressables Build
58
+ After modifying Addressable entries or Asset Tables:
59
+
60
+ ```csharp
61
+ using UnityEditor.AddressableAssets.Settings;
62
+ AddressableAssetSettings.BuildPlayerContent();
63
+ ```
64
+
65
+ ## UI Layout Refresh
66
+ Programmatic text changes require a layout rebuild to update dimensions:
67
+
68
+ ```csharp
69
+ UnityEngine.UI.LayoutRebuilder.ForceRebuildLayoutImmediate(parentRectTransform);
70
+ ```
71
+
72
+ ## Robust TMP_FontAsset Repair
73
+ If fonts appear as "tofu" or throw `UnassignedReferenceException`:
74
+ - Check that the Material and Atlas Texture are nested under the Font Asset in the Project window.
75
+ - Re-assign `fontAsset.material.mainTexture = fontAsset.atlasTexture;` and re-save.
76
+ - If the font was deleted and recreated, update the GUID in both the Asset Table and the Addressables Group.
@@ -0,0 +1,69 @@
1
+ using UnityEngine;
2
+ using UnityEditor;
3
+ using UnityEditor.SceneManagement;
4
+ using UnityEngine.UI;
5
+ using UnityEditor.Events;
6
+ using UnityEngine.Events;
7
+ using UnityEngine.Localization.Components;
8
+ using System.Collections.Generic;
9
+
10
+ /// <summary>
11
+ /// Batch-processes all scenes in the project, attaching LocalizeStringEvent components
12
+ /// to every Text element whose content matches a key in the provided mapping.
13
+ ///
14
+ /// Only call LocalizeAll() after confirming with the user — it modifies and saves every scene.
15
+ /// </summary>
16
+ public static class L10nBatchProcessor
17
+ {
18
+ public static void LocalizeAll(Dictionary<string, string> mapping, string table)
19
+ {
20
+ string[] scenes = AssetDatabase.FindAssets("t:Scene");
21
+ foreach (var guid in scenes)
22
+ {
23
+ var path = AssetDatabase.GUIDToAssetPath(guid);
24
+ var scene = EditorSceneManager.OpenScene(path, OpenSceneMode.Single);
25
+ LocalizeHierarchy(mapping, table);
26
+ EditorSceneManager.MarkSceneDirty(scene);
27
+ EditorSceneManager.SaveScene(scene);
28
+ }
29
+ }
30
+
31
+ static void LocalizeHierarchy(Dictionary<string, string> mapping, string table)
32
+ {
33
+ var allText = Object.FindObjectsByType<Text>(FindObjectsInactive.Include, FindObjectsSortMode.None);
34
+ foreach (var text in allText)
35
+ {
36
+ foreach (var kvp in mapping)
37
+ {
38
+ if (!text.text.Contains(kvp.Key)) continue;
39
+
40
+ var lse = text.gameObject.GetComponent<LocalizeStringEvent>()
41
+ ?? text.gameObject.AddComponent<LocalizeStringEvent>();
42
+ lse.StringReference = new UnityEngine.Localization.LocalizedString(table, kvp.Value);
43
+
44
+ // Wire the listener through the public UnityEventTools API. The persistent-call
45
+ // fields could be written directly through SerializedObject instead, but those
46
+ // are private serialized names with no compatibility guarantee — and it isn't
47
+ // necessary. A delegate to Text's public `text` setter, handed to
48
+ // AddPersistentListener, serializes to exactly the same thing: target = the Text
49
+ // component, method = set_text, mode = EventDefined (dynamic), call state =
50
+ // EditorAndRuntime. Measured on Unity 6000.5.7f1.
51
+ //
52
+ // The setter has no C# method-group name, so the delegate is built by name.
53
+ // That is reflection over a *public* member, which is fine; reaching for the
54
+ // private m_* fields would not be.
55
+ var setText = (UnityAction<string>)System.Delegate.CreateDelegate(
56
+ typeof(UnityAction<string>), text, "set_text");
57
+
58
+ for (int i = lse.OnUpdateString.GetPersistentEventCount() - 1; i >= 0; i--)
59
+ {
60
+ UnityEventTools.RemovePersistentListener(lse.OnUpdateString, i);
61
+ }
62
+ UnityEventTools.AddPersistentListener(lse.OnUpdateString, setText);
63
+
64
+ EditorUtility.SetDirty(lse);
65
+ break;
66
+ }
67
+ }
68
+ }
69
+ }
@@ -0,0 +1,18 @@
1
+ using UnityEngine;
2
+ using TMPro;
3
+ using UnityEngine.Localization;
4
+ using UnityEngine.Localization.Components;
5
+
6
+ /// <summary>
7
+ /// Swaps a TMP_Text font based on the active locale using an Asset Table.
8
+ /// Add to any GameObject with a TMP_Text that needs locale-specific fonts (e.g., CJK).
9
+ /// </summary>
10
+ [AddComponentMenu("Localization/Asset/Localized Font Asset")]
11
+ public class LocalizedFontAsset : LocalizedAssetBehaviour<TMP_FontAsset, LocalizedTmpFont>
12
+ {
13
+ protected override void UpdateAsset(TMP_FontAsset font)
14
+ {
15
+ var tmp = GetComponent<TMP_Text>();
16
+ if (tmp != null) tmp.font = font;
17
+ }
18
+ }
@@ -0,0 +1,14 @@
1
+ ---
2
+ name: localize-game
3
+ description: Plans, implements, or reviews internationalization and localization across strings, fonts, layout, input, assets, culture, and LQA using the project's supported locales.
4
+ allowed-tools: Read, Glob, Grep, Write, Edit, Bash, Task, AskUserQuestion, WebSearch, WebFetch
5
+ ---
6
+
7
+ # Localize Game
8
+
9
+ Read `.nccgs/project.yaml`, `.nccgs/state.md`, and the active context packet when present. Preserve Product Owner authority and unrelated work.
10
+
11
+ Read locale scope, canonical terminology, UI/content sources, existing localization architecture, and platform constraints. Route writing, UI, accessibility, content, and Unity specialists as needed. Preserve stable string IDs, context, placeholders, plurals, fallback, font coverage, layout expansion, and extraction determinism. Use the official `localization` Unity Skill for Unity operation mechanics. Do not invent locale scope or approve translations without review evidence.
12
+
13
+ Return outcome, evidence, affected records, blockers or decisions, residual risk, and the exact next workflow. Do not claim DONE unless this is the `closure` skill and every configured gate passes.
14
+
@@ -0,0 +1,21 @@
1
+ ---
2
+ name: migrate-project
3
+ description: Reviews, plans, applies, and verifies adoption or upgrade of NCCGS in an existing Unity project. Preserves canonical truth, ownership, closure safeguards, model policy, local settings, and rollback while replacing obsolete workflow machinery.
4
+ allowed-tools: Read, Glob, Grep, Write, Edit, Bash, Task, AskUserQuestion
5
+ ---
6
+
7
+ # Migrate project
8
+
9
+ Treat brownfield adoption and NCCGS upgrades as CONTROLLED work. Read the complete [migration procedure](references/procedure.md). Default to `review` when no mode is given.
10
+
11
+ ## Modes
12
+
13
+ - `review`: read-only inventory and KEEP/ADAPT/MIGRATE/DEPRECATE/REMOVE/MISSING classification.
14
+ - `plan`: write a dated reversible plan and proposed schema-2 policy without overwriting project truth.
15
+ - `apply`: execute an approved plan in validated batches with backups.
16
+ - `verify`: prove policy, routing, hooks, Unity integration, evidence, closure, and a representative work path.
17
+
18
+ Migration decisions must cover canonical sources, ownership/protected paths, architecture, Unity tooling, model profile/fallback, enabled departments, context packets, verification baselines, closure safeguards, Git tracking, local settings, obsolete global skills, and rollback.
19
+
20
+ Never remove reports, registers, checklists, user settings, source assets, or legacy instructions until their live purpose is mapped and the Product Owner approves the replacement. Do not infer canon from code. Return batches, commits, preserved evidence, unresolved decisions, rollback, and final migration state.
21
+
@@ -0,0 +1,63 @@
1
+ # Brownfield migration procedure
2
+
3
+ ## Review
4
+
5
+ 1. Inspect repository status and project root without modifying it.
6
+ 2. Inventory Unity version, packages, scenes/assets, code assemblies, tests, build
7
+ targets, CLI/Pipeline setup, and installed Unity Skills.
8
+ 3. Locate current project instructions, canonical design/architecture/planning,
9
+ requirement/story registries, QA evidence, session state, hooks, agents, skills,
10
+ closure/completion artifacts, safety checklists, and release machinery.
11
+ 4. Identify conflicts in authority, duplicated Unity instructions, unsafe ownership,
12
+ token-heavy context loading, redundant reports, stale global routing signals,
13
+ machine-local settings, and legacy engine support.
14
+ 5. Classify each relevant artifact KEEP/ADAPT/MIGRATE/DEPRECATE/REMOVE/MISSING.
15
+ 6. Determine whether closure should be `lean`, `linked`, or `strict`. Preserve the
16
+ strongest active safeguard until the PO explicitly accepts a weaker model.
17
+ 7. Determine the project model profile, enabled departments, permitted fallback,
18
+ orchestration depth/parallelism, context-packet locations, and hook compatibility.
19
+
20
+ ## Plan
21
+
22
+ Create `.nccgs/migrations/<date>-migration-plan.md` with:
23
+
24
+ - current-state summary and canonical-source map;
25
+ - proposed `.nccgs/project.yaml` values;
26
+ - proposed model/department/orchestration/context policy and any compatibility
27
+ fallback needed for the user's Claude Code subscription or context mode;
28
+ - proposed closure mode, canonical record, linked artifacts, completion rules, and
29
+ any legacy safeguard that must block DONE;
30
+ - ordered reversible batches and dependencies;
31
+ - exact broad/irreversible decisions requiring PO authority;
32
+ - backup/rollback method;
33
+ - validation for each batch and final end-to-end proof.
34
+
35
+ Prioritize authority and policy conflicts, then model/routing conflicts, Unity
36
+ integration, canon mapping, ownership, context isolation, closure safeguards,
37
+ traceability/evidence, lifecycle hooks, workflow replacement, and cleanup.
38
+
39
+ ## Apply
40
+
41
+ - Start from a known repository status and preserve unrelated changes.
42
+ - Apply one coherent batch, inspect diff, run its validation, and update migration
43
+ status before continuing.
44
+ - Never rewrite project canon from implementation inference without PO acceptance.
45
+ - Do not delete or collapse legacy completion reports/registers/checklists until the
46
+ configured closure model preserves their safety purpose and the PO approves it.
47
+ - Back up removals and conflicting framework files. Do not remove project assets or
48
+ source merely because their folder layout differs from NCCGS examples.
49
+ - Preserve `.claude/settings.local.json` and other machine-specific files. Merge the
50
+ managed hook fragment into shared settings without erasing unrelated permissions,
51
+ hooks, or local paths.
52
+ - Do not leave two active agents/skills advertising mutually exclusive Unity
53
+ execution bridges. Disable obsolete global routing signals outside the repository
54
+ through an explicit user action.
55
+
56
+ ## Verify
57
+
58
+ Check installation integrity, schema-2 project policy, model profile/fallback,
59
+ role/workflow catalogs, bounded delegation, hook health, context packet freshness,
60
+ canonical map, requirements/state, Unity Skills integrity, CLI/Pipeline operation,
61
+ relevant tests, runtime evidence, and subjective-gate routing. Verify that required
62
+ linked artifacts block DONE in `linked` or `strict` mode. Use a small representative
63
+ task or dry run when product changes are not authorized.
@@ -0,0 +1,14 @@
1
+ ---
2
+ name: milestone-review
3
+ description: Evaluates milestone progress, scope, quality, risk, evidence, and release trajectory against approved goals without disguising incomplete work as percentage completion.
4
+ allowed-tools: Read, Glob, Grep, Bash, Task
5
+ ---
6
+
7
+ # Milestone Review
8
+
9
+ Read `.nccgs/project.yaml`, `.nccgs/state.md`, and the active context packet when present. Preserve Product Owner authority and unrelated work.
10
+
11
+ Remain read-only unless asked to update records. Compare approved milestone outcomes with feature closures, evidence, defects, dependencies, PO gates, and repository/build state. Report achieved outcomes, incomplete gates, scope movement, forecast assumptions, top risks, and decision options. Use evidence-based confidence rather than arbitrary completion percentages.
12
+
13
+ Return outcome, evidence, affected records, blockers or decisions, residual risk, and the exact next workflow. Do not claim DONE unless this is the `closure` skill and every configured gate passes.
14
+
@@ -0,0 +1,179 @@
1
+ ---
2
+ name: new-unity-project
3
+ description: Use when starting a brand-new Unity game or project from scratch — "make/start/create a new game", "bootstrap a Unity project", "I want to build a <genre> game", "scaffold/prototype a game", game jam, greenfield, blank project, project setup. A guided flow that gathers the concept, target platforms, and monetization, installs the Editor in the background while it asks, then creates the project and source control and installs packages — delegating the mechanics to the unity-cli and unity-package-management skills and handing off monetization to the dedicated skills. Does not scaffold gameplay code.
4
+ allowed-tools:
5
+ - Bash
6
+ - Read
7
+ - Write
8
+ - Edit
9
+ - AskUserQuestion
10
+ ---
11
+
12
+ # New Unity Project
13
+
14
+ A guided flow from an idea to a running, version-controlled Unity project. This skill owns the
15
+ **flow** — the questions, their ordering, running slow installs in the background while you ask,
16
+ and the handoffs. It deliberately does **not** re-document commands; it delegates the mechanics
17
+ to other skills.
18
+
19
+ **Delegates to (read these for the actual commands — don't reinvent them):**
20
+ - **`unity-cli`** — CLI install, auth/license, Editor install, project creation, source control,
21
+ opening the project. Its "Bootstrap a new project from scratch" workflow is the backbone here.
22
+ - **`unity-package-management`** — installing packages via the C# PackageManager Client API, and
23
+ choosing packages by genre / platform / monetization.
24
+ - **`implement-in-app-purchases`**, **`levelplay-unity-integration`**, **`build-live-game`** —
25
+ monetization / backend *integration* (invoked at the end).
26
+
27
+ **Work one step at a time.** Ask only the current step's questions and wait for the user before
28
+ moving on — platform and monetization answers change what you install, so don't gather everything
29
+ up front or scaffold before they're settled.
30
+
31
+ ## The flow — and where the parallelism is
32
+
33
+ 1. **Concept** — what they're building.
34
+ 2. **Platforms & monetization** — then, as soon as platforms are known, **kick off the Editor
35
+ install in the background** (it takes minutes) and keep talking.
36
+ 3. **(joins)** Editor + platform modules finish installing.
37
+ 4. **Project + source control** — create from a matching template; init git.
38
+ 5. **Packages** — install via the C# Client API.
39
+ 6. **Save & first commit.**
40
+ 7. **Hand off** monetization / backend.
41
+
42
+ The whole point of a guided flow over a raw recipe: the multi-minute Editor install overlaps the
43
+ minutes the user spends answering concept questions, so setup feels instant.
44
+
45
+ ## Step 1 — Concept
46
+
47
+ Use `AskUserQuestion` so the user can pick fast, but let them answer freely too. Cover:
48
+
49
+ - **Genre / core loop** — platformer, top-down shooter, puzzle, idle, RPG, racing, card, tower
50
+ defense, sim, hyper-casual, first-person, etc.
51
+ - **Dimension & look** — 2D or 3D; art style (pixel, low-poly, stylized, realistic, UI-only).
52
+ - **Gameplay** — the one-sentence "what the player does moment to moment."
53
+ - **Scope** — single-screen prototype vs. multi-scene game; single-player or multiplayer.
54
+
55
+ Also settle on a **project name**. Write a 2–4 line **project brief**, read it back to confirm.
56
+ The brief drives template choice (Step 4) and packages (Step 5).
57
+
58
+ ## Step 2 — Platforms & monetization, then start installing
59
+
60
+ Two decisions, because both change what you install:
61
+
62
+ - **Target platforms** (multi-select): Desktop (Win/macOS/Linux), Mobile (iOS/Android), WebGL,
63
+ Console. These map to Editor **modules** (Step 3) and argue for leaner packages on mobile/WebGL.
64
+ - **Monetization**: none / premium / in-app purchases / ads / mix. This only decides which
65
+ handoff skill you invoke in Step 7 — don't integrate it now.
66
+
67
+ Confirm the Editor version to use (**default: latest LTS** — see `unity-cli` for the LTS vs. Tech
68
+ vs. beta trade-off). Ask this *now*, before kicking off the install, so you don't install the
69
+ wrong one.
70
+
71
+ Then confirm prerequisites and **launch the Editor install as a background task** so it runs while
72
+ you continue. See the `unity-cli` skill for exact syntax, module names per platform, and auth /
73
+ license setup:
74
+
75
+ ```bash
76
+ unity --version
77
+ unity auth status --format json # if signed out: unity auth login
78
+ unity license status --format json # if none active: unity license activate
79
+
80
+ # Start in the BACKGROUND, then go straight back to the conversation. Module names per platform
81
+ # (android / ios / webgl / …) are in the unity-cli skill.
82
+ unity install lts --module <platform-modules> --yes --accept-eula
83
+ ```
84
+
85
+ Run that install as a **background task** (don't block on it). If you have nothing left to ask,
86
+ it's fine to just wait — the parallelism only helps when there's a conversation to overlap.
87
+
88
+ ## Step 3 — Join: Editor ready
89
+
90
+ Before creating the project, confirm the background install finished:
91
+
92
+ ```bash
93
+ unity editors --installed --format json
94
+ ```
95
+
96
+ If it failed, surface the error (see `unity-cli` troubleshooting) and stop — nothing downstream
97
+ works without an Editor.
98
+
99
+ ## Step 4 — Create the project + source control
100
+
101
+ Follow the **`unity-cli`** "Bootstrap a new project from scratch" workflow verbatim:
102
+
103
+ - List the **real** template ids the Editor offers (`unity templates list`) and pick one matching
104
+ 2D/3D and render pipeline from the brief — don't guess ids.
105
+ - Create with `unity projects create "<Name>" --path <dir> --editor-version <v> --template <id>`.
106
+ - Set up source control — **ask the user which they want**, don't assume: Git (GitHub / GitLab;
107
+ add `--git-lfs` for asset-heavy games) or **Unity Version Control** (`--vcs uvcs`, which handles
108
+ large binary assets natively — no LFS), or a purely local `git init` + Unity `.gitignore`.
109
+ Publish in one step with `unity projects create --vcs … --git-token-stdin --no-initial-commit`
110
+ (tokens on stdin). Pass **`--no-initial-commit`** so the CLI doesn't commit the bare project
111
+ before packages and `.meta` files exist — you make the real first commit/check-in in Step 6.
112
+ See the `unity-cli` workflow for exact flags.
113
+
114
+ ## Step 5 — Packages
115
+
116
+ Map the brief to a concrete package list and install it via the **`unity-package-management`**
117
+ skill (C# PackageManager Client API — **never** hand-edit `manifest.json`). Read that skill for
118
+ the genre/platform/monetization → package mapping, the installer script, and the `-quit` gotcha.
119
+ Read the final list back to the user before installing; verify `manifest.json` afterward.
120
+
121
+ ## Step 6 — Save & first commit
122
+
123
+ Open the project once so Unity imports the assets and generates every `.meta` file, then make
124
+ the first commit **with whichever VCS you set up in Step 4**:
125
+
126
+ ```bash
127
+ unity open "<project-path>" # imports + generates .meta; for headless/CI use the
128
+ # "Import & save headlessly" method in unity-package-management
129
+ ```
130
+
131
+ - **Git (GitHub / GitLab / local):**
132
+ ```bash
133
+ cd "<project-path>"
134
+ git add -A
135
+ git status # Library/ Temp/ obj/ Build/ must NOT be staged
136
+ git commit -m "Initial Unity project: <Name>"
137
+ ```
138
+ Every `.cs`/asset must be committed together with its `.meta`.
139
+ - **Unity Version Control (UVCS):** check in through your UVCS client/workspace (created during
140
+ Step 4) — there's no `git` step. Generated folders are still excluded by the ignore rules.
141
+
142
+ If you published via `--vcs` in Step 4 **without** `--no-initial-commit`, the CLI already made an
143
+ initial commit of the bare project — add a follow-up commit here rather than double-committing.
144
+
145
+ ## Step 7 — Hand off
146
+
147
+ Based on Step 2 monetization, invoke the matching skill for the actual integration:
148
+ - IAP → **implement-in-app-purchases**
149
+ - Ads → **levelplay-unity-integration**
150
+ - Accounts / cloud save / economy / remote config / leaderboards → **build-live-game**
151
+
152
+ Report the project path, Editor version, installed packages, and next steps.
153
+
154
+ ## Scope — what this skill does NOT do
155
+
156
+ - **No gameplay scaffolding.** It gets you to a running, empty-but-wired project; building the
157
+ actual game (scenes, controllers, art) is the next conversation — iterate there with the Editor
158
+ via the `unity-cli` MCP server and the Package Manager. Generic genre skeletons tend to produce
159
+ throwaway mocked primitives, so this skill intentionally stops at a clean starting point.
160
+ - **No command reference.** Syntax lives in `unity-cli` / `unity-package-management`.
161
+
162
+ ## Checklist
163
+
164
+ - [ ] Concept brief captured and confirmed (genre, look, gameplay, scope, name)
165
+ - [ ] Platforms + monetization recorded; Editor version chosen
166
+ - [ ] Editor + platform modules installed (started in the background during Step 2)
167
+ - [ ] Project created from a matching template; git initialized with a Unity `.gitignore`
168
+ - [ ] Packages installed via the C# Client API; `manifest.json` verified
169
+ - [ ] Project opened/saved so `.meta` files exist; first commit made; `Library/` excluded
170
+ - [ ] Handed off to the monetization/backend skill if applicable
171
+
172
+ ## Common mistakes
173
+
174
+ - **Blocking on the Editor install** instead of backgrounding it while you ask questions.
175
+ - **Installing the wrong Editor** because the version wasn't confirmed before the background install.
176
+ - **Gathering all questions up front** — platform/monetization answers change the modules and packages.
177
+ - **Hand-editing `manifest.json`** instead of using the Client API (see `unity-package-management`).
178
+ - **Committing `Library/`/`Temp/`/`obj/`/`Build/`**, or scripts without their `.meta` files.
179
+ - **Missing Editor modules** — a mobile target needs `android`/`ios`; WebGL needs `webgl`.