nccgs 2.1.1 → 3.0.0-rc.2

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 (705) hide show
  1. package/CHANGELOG.md +76 -235
  2. package/LICENSE +1 -1
  3. package/README.md +87 -206
  4. package/THIRD_PARTY_NOTICES.md +6 -34
  5. package/bin/nccgs.mjs +96 -0
  6. package/cli/doctor.mjs +82 -0
  7. package/cli/feedback.mjs +13 -0
  8. package/cli/install.mjs +111 -0
  9. package/cli/release.mjs +59 -0
  10. package/cli/run.mjs +35 -0
  11. package/cli/spawn.mjs +20 -0
  12. package/cli/uninstall.mjs +43 -0
  13. package/cli/update-check.mjs +66 -0
  14. package/docs/EVIDENCE-VERIFICATION.md +22 -0
  15. package/package.json +23 -30
  16. package/runtime/core/diag.mjs +43 -0
  17. package/runtime/core/feedback-policy.mjs +54 -0
  18. package/runtime/core/fs.mjs +80 -0
  19. package/runtime/core/job-object.mjs +73 -0
  20. package/runtime/core/modes.mjs +87 -0
  21. package/runtime/core/process-tree.mjs +109 -0
  22. package/runtime/core/project.mjs +113 -0
  23. package/runtime/core/snapshot.mjs +114 -0
  24. package/runtime/hooks/common.mjs +22 -0
  25. package/runtime/hooks/done-guard.mjs +15 -0
  26. package/runtime/hooks/guard-mcp.mjs +8 -0
  27. package/runtime/hooks/guard-shell.mjs +16 -0
  28. package/runtime/hooks/guard-write.mjs +25 -0
  29. package/runtime/hooks/session-log.mjs +7 -0
  30. package/runtime/hooks/session-start.mjs +40 -0
  31. package/runtime/hooks/unity-transport.mjs +12 -0
  32. package/runtime/modes.json +39 -0
  33. package/runtime/task/cost.mjs +103 -0
  34. package/runtime/task/criteria.mjs +128 -0
  35. package/runtime/task/feedback.mjs +136 -0
  36. package/runtime/task/ledger.mjs +109 -0
  37. package/runtime/task/plan.mjs +69 -0
  38. package/runtime/task/project.mjs +79 -0
  39. package/runtime/task/report.mjs +252 -0
  40. package/runtime/task/task.mjs +238 -0
  41. package/runtime/unity/assets.mjs +51 -0
  42. package/runtime/unity/playtest.mjs +145 -0
  43. package/runtime/unity/unity.mjs +350 -0
  44. package/scripts/check-job-object.mjs +18 -0
  45. package/scripts/sync-unity-skills.mjs +35 -119
  46. package/template/CLAUDE.md +39 -0
  47. package/template/agents/fast-fix.md +9 -0
  48. package/template/agents/implementer.md +19 -0
  49. package/template/agents/playtester.md +15 -0
  50. package/template/agents/reviewer.md +19 -0
  51. package/template/agents/scout.md +9 -0
  52. package/template/ponytail/README.md +8 -0
  53. package/{.claude/nccgs/packages → template}/ponytail/engineering.md +10 -0
  54. package/template/protocols/evidence.md +52 -0
  55. package/template/protocols/playtest.md +45 -0
  56. package/template/protocols/review.md +34 -0
  57. package/template/protocols/unity-cli-notes.md +56 -0
  58. package/template/settings.fragment.json +33 -0
  59. package/template/skills/art-bible/SKILL.md +19 -0
  60. package/template/skills/asset-spec/SKILL.md +19 -0
  61. package/template/skills/brainstorm/SKILL.md +17 -0
  62. package/template/skills/feedback/SKILL.md +16 -0
  63. package/template/skills/map-systems/SKILL.md +25 -0
  64. package/template/skills/playtest/SKILL.md +17 -0
  65. package/template/skills/status/SKILL.md +18 -0
  66. package/template/skills/test/SKILL.md +34 -0
  67. package/template/skills/unity-foundation/SKILL.md +17 -0
  68. package/template/skills/vertical-slice/SKILL.md +17 -0
  69. package/template/skills/work/SKILL.md +65 -0
  70. package/tools/feedback-worker/README.md +12 -0
  71. package/tools/feedback-worker/worker.js +39 -0
  72. package/tools/feedback-worker/wrangler.toml +12 -0
  73. package/unity-skills/2d-pixel-perfect/SKILL.md +208 -0
  74. package/unity-skills/2d-pixel-perfect/references/api-reference.md +81 -0
  75. package/unity-skills/2d-pixel-perfect/references/camera-setup-builtin.cs +40 -0
  76. package/unity-skills/2d-pixel-perfect/references/camera-setup-urp.cs +49 -0
  77. package/unity-skills/2d-pixel-perfect/references/pipeline-detection.cs +50 -0
  78. package/unity-skills/2d-pixel-perfect/references/sprite-settings.cs +37 -0
  79. package/unity-skills/asset-transformer-toolkit/SECURITY.md +15 -0
  80. package/unity-skills/asset-transformer-toolkit/SKILL.md +39 -0
  81. package/unity-skills/asset-transformer-toolkit/references/create-importer.md +121 -0
  82. package/unity-skills/asset-transformer-toolkit/references/lods.md +61 -0
  83. package/unity-skills/asset-transformer-toolkit/references/rule-api.md +154 -0
  84. package/unity-skills/asset-transformer-toolkit/references/ruleblock-api.md +37 -0
  85. package/unity-skills/asset-transformer-toolkit/references/ruleset-api.md +138 -0
  86. package/unity-skills/asset-transformer-toolkit/references/rulesets-and-actions.md +227 -0
  87. package/unity-skills/audio-setup-mixers/SECURITY.md +16 -0
  88. package/unity-skills/audio-setup-mixers/SKILL.md +127 -0
  89. package/unity-skills/audio-setup-mixers/references/api.md +162 -0
  90. package/unity-skills/build-gtk/SKILL.md +242 -0
  91. package/unity-skills/build-gtk/references/graph-api.md +324 -0
  92. package/unity-skills/build-gtk/references/pitfalls.md +86 -0
  93. package/unity-skills/build-gtk/references/runtime-and-visualization.md +196 -0
  94. package/unity-skills/build-gtk/references/state-machine-api.md +286 -0
  95. package/unity-skills/build-live-game/SKILL.md +255 -0
  96. package/{.claude/skills → unity-skills}/build-live-game/references/achievements.md +132 -154
  97. package/{.claude/skills → unity-skills}/build-live-game/references/apis.md +10 -19
  98. package/{.claude/skills → unity-skills}/build-live-game/references/authentication.md +14 -20
  99. package/{.claude/skills → unity-skills}/build-live-game/references/battlepass.md +269 -225
  100. package/unity-skills/build-live-game/references/blueprints-and-samples.md +75 -0
  101. package/unity-skills/build-live-game/references/cloud-code-cloudbehaviours.md +1111 -0
  102. package/unity-skills/build-live-game/references/cloud-code-modules.md +1276 -0
  103. package/unity-skills/build-live-game/references/cloud-code.md +58 -0
  104. package/{.claude/skills → unity-skills}/build-live-game/references/cloud-save.md +15 -25
  105. package/{.claude/skills → unity-skills}/build-live-game/references/deployment.md +33 -18
  106. package/{.claude/skills → unity-skills}/build-live-game/references/player-account.md +31 -23
  107. package/{.claude/skills → unity-skills}/build-live-game/references/tooling.md +0 -56
  108. package/unity-skills/build-live-game/references/ugs-cli.md +86 -0
  109. package/unity-skills/craft-game-floors/SECURITY.md +23 -0
  110. package/unity-skills/craft-game-floors/SKILL.md +134 -0
  111. package/unity-skills/craft-game-floors/references/art-direction.md +85 -0
  112. package/unity-skills/craft-game-floors/references/camera-rigs.md +51 -0
  113. package/unity-skills/craft-game-floors/references/character-motion.md +35 -0
  114. package/unity-skills/craft-game-floors/references/game-audio.md +47 -0
  115. package/unity-skills/craft-game-floors/references/game-feel.md +68 -0
  116. package/unity-skills/craft-game-floors/references/game-shell.md +45 -0
  117. package/unity-skills/craft-game-floors/references/live-floor.md +35 -0
  118. package/unity-skills/craft-game-floors/references/placeholder-assets.md +35 -0
  119. package/unity-skills/craft-game-floors/references/scene-lighting.md +52 -0
  120. package/unity-skills/craft-game-floors/references/toon-shading.md +34 -0
  121. package/unity-skills/craft-game-floors/references/vfx.md +40 -0
  122. package/unity-skills/craft-game-floors/references/visual-scorecard.md +43 -0
  123. package/unity-skills/create-2d-physics/SECURITY.md +16 -0
  124. package/unity-skills/create-2d-physics/SKILL.md +128 -0
  125. package/unity-skills/create-2d-physics/references/2d-physics-core.md +155 -0
  126. package/unity-skills/create-2d-physics/references/legacy-2d-physics.md +45 -0
  127. package/unity-skills/create-tile-palette-or-rule-tiles/SKILL.md +12 -0
  128. package/unity-skills/create-tile-palette-or-rule-tiles/references/hexagonalruletile.md +71 -0
  129. package/unity-skills/create-tile-palette-or-rule-tiles/references/palette-create.md +38 -0
  130. package/unity-skills/create-tile-palette-or-rule-tiles/references/ruletile-createempty.md +35 -0
  131. package/unity-skills/create-tile-palette-or-rule-tiles/references/ruletile-createfromsegment.md +212 -0
  132. package/unity-skills/create-tile-palette-or-rule-tiles/references/ruletile.md +90 -0
  133. package/unity-skills/create-tile-palette-or-rule-tiles/scripts/CreatePaletteTemplate.cs +148 -0
  134. package/unity-skills/create-tile-palette-or-rule-tiles/scripts/ManualWorkflowExample.cs +63 -0
  135. package/unity-skills/create-tile-palette-or-rule-tiles/scripts/RuleTileGenerator.cs +61 -0
  136. package/unity-skills/create-tile-palette-or-rule-tiles/scripts/TilemapRuleTileCreateFromSegment.cs +225 -0
  137. package/unity-skills/generate-editor-search-query/SECURITY.md +17 -0
  138. package/unity-skills/generate-editor-search-query/SKILL.md +117 -0
  139. package/unity-skills/generate-editor-search-query/references/open-search-window.md +70 -0
  140. package/unity-skills/generate-editor-search-query/references/query-patterns.md +124 -0
  141. package/{.claude/skills → unity-skills}/implement-in-app-purchases/SKILL.md +1 -2
  142. package/{.claude/skills → unity-skills}/implement-in-app-purchases/references/api-notes.md +25 -28
  143. package/{.claude/skills → unity-skills}/implement-in-app-purchases/references/path-convert-native-google-billing.md +1 -1
  144. package/{.claude/skills → unity-skills}/implement-in-app-purchases/references/path-implement-iap-d2c.md +40 -5
  145. package/{.claude/skills → unity-skills}/initialize-ai-navigation/SKILL.md +4 -4
  146. package/{.claude/skills → unity-skills}/initialize-ai-navigation/references/navigation-system.md +3 -3
  147. package/{.claude/skills → unity-skills}/levelplay-unity-integration/CHANGELOG.md +12 -0
  148. package/{.claude/skills → unity-skills}/levelplay-unity-integration/README.md +9 -5
  149. package/unity-skills/levelplay-unity-integration/SKILL.md +442 -0
  150. package/{.claude/skills → unity-skills}/levelplay-unity-integration/references/banner-api.md +15 -8
  151. package/{.claude/skills → unity-skills}/levelplay-unity-integration/references/best-practices.md +604 -536
  152. package/unity-skills/levelplay-unity-integration/references/dependency-resolution.md +94 -0
  153. package/{.claude/skills → unity-skills}/levelplay-unity-integration/references/ilrd-api.md +2 -2
  154. package/{.claude/skills → unity-skills}/levelplay-unity-integration/references/initialization-api.md +221 -0
  155. package/{.claude/skills → unity-skills}/levelplay-unity-integration/references/interstitial-api.md +11 -3
  156. package/{.claude/skills → unity-skills}/levelplay-unity-integration/references/ios-setup.md +6 -34
  157. package/{.claude/skills → unity-skills}/levelplay-unity-integration/references/migration-sdk-9.md +1 -1
  158. package/{.claude/skills → unity-skills}/levelplay-unity-integration/references/privacy-settings.md +14 -29
  159. package/{.claude/skills → unity-skills}/levelplay-unity-integration/references/rewarded-api.md +20 -4
  160. package/unity-skills/levelplay-unity-integration/references/testing-and-validation.md +222 -0
  161. package/unity-skills/levelplay-unity-integration/references/troubleshooting.md +99 -0
  162. package/unity-skills/localization/SKILL.md +347 -0
  163. package/{.claude/skills → unity-skills}/localization/references/api-notes.md +4 -0
  164. package/unity-skills/localization/resources/L10nBatchProcessor.cs +191 -0
  165. package/unity-skills/manage-sprite-atlas/SKILL.md +351 -0
  166. package/unity-skills/manage-sprite-atlas/references/addressables-delivery.md +58 -0
  167. package/unity-skills/manage-sprite-atlas/references/api.md +382 -0
  168. package/unity-skills/manage-sprite-atlas/references/best-practices.md +183 -0
  169. package/unity-skills/manage-sprite-atlas/references/common-errors.md +123 -0
  170. package/unity-skills/manage-sprite-atlas/references/custom-packing.md +147 -0
  171. package/unity-skills/manage-sprite-atlas/references/manual-authoring.md +39 -0
  172. package/unity-skills/manage-sprite-atlas/resources/authoringvsruntime.cs +176 -0
  173. package/unity-skills/manage-sprite-atlas/resources/buildaddressablespostprocess.cs +59 -0
  174. package/unity-skills/manage-sprite-atlas/resources/cacheloadedatlases.cs +145 -0
  175. package/unity-skills/manage-sprite-atlas/resources/cleanupbatchoperations.cs +119 -0
  176. package/unity-skills/manage-sprite-atlas/resources/createandconfiguremasteratlas.cs +57 -0
  177. package/unity-skills/manage-sprite-atlas/resources/custompackersetup.cs +88 -0
  178. package/unity-skills/manage-sprite-atlas/resources/deprecatedmethods.cs +142 -0
  179. package/unity-skills/manage-sprite-atlas/resources/dontmodifywithoutsaving.cs +120 -0
  180. package/unity-skills/manage-sprite-atlas/resources/dontpackinruntimebuilds.cs +190 -0
  181. package/unity-skills/manage-sprite-atlas/resources/dontscriptspriteatlasineditor.cs +114 -0
  182. package/unity-skills/manage-sprite-atlas/resources/editorconfiguration.cs +95 -0
  183. package/unity-skills/manage-sprite-atlas/resources/enablespritepacking.cs +172 -0
  184. package/unity-skills/manage-sprite-atlas/resources/gridspritepacker.cs +50 -0
  185. package/unity-skills/manage-sprite-atlas/resources/handlelatebinding.cs +147 -0
  186. package/unity-skills/manage-sprite-atlas/resources/handlenullcases.cs +141 -0
  187. package/unity-skills/manage-sprite-atlas/resources/migratev1tov2.cs +335 -0
  188. package/unity-skills/manage-sprite-atlas/resources/multipagepacker.cs +80 -0
  189. package/unity-skills/manage-sprite-atlas/resources/optimizetexturesettings.cs +191 -0
  190. package/unity-skills/manage-sprite-atlas/resources/packerdebugging.cs +158 -0
  191. package/unity-skills/manage-sprite-atlas/resources/packtransform.cs +51 -0
  192. package/unity-skills/manage-sprite-atlas/resources/platformnames.cs +127 -0
  193. package/unity-skills/manage-sprite-atlas/resources/queryspritesefficiently.cs +222 -0
  194. package/unity-skills/manage-sprite-atlas/resources/registercallbacks.cs +152 -0
  195. package/unity-skills/manage-sprite-atlas/resources/runtimeatlasloader.cs +15 -0
  196. package/unity-skills/manage-sprite-atlas/resources/runtimespriteaccess.cs +19 -0
  197. package/unity-skills/manage-sprite-atlas/resources/savespriteatlasasset.cs +107 -0
  198. package/unity-skills/manage-sprite-atlas/resources/scriptablepacker.cs +81 -0
  199. package/unity-skills/manage-sprite-atlas/resources/setincludeinbuild.cs +164 -0
  200. package/unity-skills/manage-sprite-atlas/resources/sizeoptimizedpacker.cs +88 -0
  201. package/unity-skills/manage-sprite-atlas/resources/spriteatlaslatebinding.cs +123 -0
  202. package/unity-skills/manage-sprite-atlas/resources/spriteatlasprebuildgenerator.cs +219 -0
  203. package/unity-skills/manage-sprite-atlas/resources/spritedata.cs +35 -0
  204. package/unity-skills/manage-sprite-atlas/resources/spritepack.cs +39 -0
  205. package/unity-skills/manage-sprite-atlas/resources/texturedata.cs +15 -0
  206. package/unity-skills/manage-sprite-atlas/resources/updatebuildscripts.cs +357 -0
  207. package/unity-skills/manage-sprite-atlas/resources/updatesettingsconfiguration.cs +135 -0
  208. package/unity-skills/manage-sprite-atlas/resources/usevariantswisely.cs +179 -0
  209. package/unity-skills/manage-sprite-atlas/resources/variantatlas.cs +39 -0
  210. package/unity-skills/manifest.json +1155 -0
  211. package/unity-skills/migrate-birp-to-urp/SECURITY.md +16 -0
  212. package/unity-skills/migrate-birp-to-urp/SKILL.md +543 -0
  213. package/unity-skills/migrate-birp-to-urp/references/capturing-the-editor.md +66 -0
  214. package/unity-skills/migrate-birp-to-urp/references/complex-shader-situations.md +272 -0
  215. package/unity-skills/migrate-birp-to-urp/references/custom-shader-triage.md +123 -0
  216. package/unity-skills/migrate-birp-to-urp/references/implementation-patterns.md +529 -0
  217. package/unity-skills/migrate-birp-to-urp/references/migration-workflow.md +265 -0
  218. package/unity-skills/migrate-birp-to-urp/references/quality-settings-map.md +69 -0
  219. package/unity-skills/new-unity-project/SECURITY.md +26 -0
  220. package/unity-skills/new-unity-project/SKILL.md +386 -0
  221. package/unity-skills/new-unity-project/references/skill-setup.md +66 -0
  222. package/unity-skills/optimize-audio/SECURITY.md +16 -0
  223. package/{.claude/skills → unity-skills}/optimize-audio/SKILL.md +17 -17
  224. package/{.claude/skills → unity-skills}/optimize-audio/resources/audio-import-api.md +8 -5
  225. package/{.claude/skills → unity-skills}/optimize-text-mesh-pro/SKILL.md +1 -11
  226. package/unity-skills/optimize-web/SECURITY.md +16 -0
  227. package/{.claude/skills → unity-skills}/optimize-web/SKILL.md +164 -27
  228. package/unity-skills/optimize-web/scripts/WebOptimizer.cs +46 -0
  229. package/unity-skills/optimize-web/scripts/toktx-examples.sh +11 -0
  230. package/{.claude/skills → unity-skills}/physics-3d-collision/SKILL.md +2 -2
  231. package/unity-skills/physics-3d-collision/references/troubleshooting.md +8 -0
  232. package/unity-skills/project-auditor-fixes/SKILL.md +64 -0
  233. package/{.claude/skills → unity-skills}/setup-multiplayer-services/SKILL.md +1 -4
  234. package/{.claude/skills → unity-skills}/setup-vivox-voice-chat/SKILL.md +1 -1
  235. package/{.claude/skills → unity-skills}/shader-graph-create-custom-node/SKILL.md +1 -1
  236. package/unity-skills/sprite-editor/SECURITY.md +16 -0
  237. package/{.claude/skills → unity-skills}/sprite-editor/SKILL.md +9 -9
  238. package/{.claude/skills → unity-skills}/sprite-editor/references/templates.md +1 -1
  239. package/unity-skills/sprite-segment-3x3grid/SKILL.md +136 -0
  240. package/unity-skills/sprite-segment-3x3grid/scripts/SpriteGridAnalysis.cs +119 -0
  241. package/{.claude/skills → unity-skills}/ui/SKILL.md +1 -1
  242. package/{.claude/skills → unity-skills}/ui-imgui/SKILL.md +1 -7
  243. package/{.claude/skills → unity-skills}/ui-ugui/SKILL.md +3 -9
  244. package/{.claude/skills → unity-skills}/ui-uitk/SKILL.md +8 -14
  245. package/{.claude/skills → unity-skills}/ui-uitk/references/custom-elements.md +1 -1
  246. package/unity-skills/unity-cli/CHANGELOG.md +515 -0
  247. package/unity-skills/unity-cli/SECURITY.md +68 -0
  248. package/unity-skills/unity-cli/SKILL.md +723 -0
  249. package/unity-skills/unity-cli/references/auth-license-cloud.md +318 -0
  250. package/unity-skills/unity-cli/references/build-run-test.md +555 -0
  251. package/unity-skills/unity-cli/references/cloud-automation.md +736 -0
  252. package/{.claude/skills → unity-skills}/unity-cli/references/collaboration.md +166 -105
  253. package/unity-skills/unity-cli/references/config-hub.md +239 -0
  254. package/unity-skills/unity-cli/references/diagnostics-maintenance.md +720 -0
  255. package/unity-skills/unity-cli/references/docs-workflow.md +179 -0
  256. package/unity-skills/unity-cli/references/editors-install.md +476 -0
  257. package/unity-skills/unity-cli/references/integration-advanced.md +1130 -0
  258. package/unity-skills/unity-cli/references/playmode-verification-loop.md +279 -0
  259. package/unity-skills/unity-cli/references/projects-templates.md +996 -0
  260. package/unity-skills/unity-cli/references/version-control.md +612 -0
  261. package/{.claude/skills → unity-skills}/unity-package-management/SKILL.md +60 -12
  262. package/{.claude/skills → unity-skills}/unity-package-management/references/select-packages.md +39 -21
  263. package/unity-skills/unity-pipeline/SECURITY.md +17 -0
  264. package/unity-skills/unity-pipeline/SKILL.md +335 -0
  265. package/unity-skills/urp-postprocessing/SECURITY.md +16 -0
  266. package/{.claude/skills → unity-skills}/urp-postprocessing/SKILL.md +12 -12
  267. package/{.claude/skills → unity-skills}/urp-postprocessing/references/code-templates.md +39 -8
  268. package/{.claude/skills → unity-skills}/validate-urp-render-graph-renderer-feature/SKILL.md +1 -1
  269. package/.claude/agents/nccgs-adversarial-reviewer.md +0 -43
  270. package/.claude/agents/nccgs-engine-programmer.md +0 -27
  271. package/.claude/agents/nccgs-fast-implementer.md +0 -30
  272. package/.claude/agents/nccgs-game-designer.md +0 -26
  273. package/.claude/agents/nccgs-gameplay-programmer.md +0 -26
  274. package/.claude/agents/nccgs-qa-engineer.md +0 -27
  275. package/.claude/agents/nccgs-task-scout.md +0 -24
  276. package/.claude/agents/nccgs-ui-programmer.md +0 -27
  277. package/.claude/agents/nccgs-unity-build-specialist.md +0 -27
  278. package/.claude/agents/nccgs-unity-implementer.md +0 -28
  279. package/.claude/agents/nccgs-unity-systems-specialist.md +0 -27
  280. package/.claude/agents/nccgs-unity-ui-specialist.md +0 -27
  281. package/.claude/agents/nccgs-verification-engineer.md +0 -27
  282. package/.claude/nccgs/MEMORY.md +0 -66
  283. package/.claude/nccgs/THIRD_PARTY_NOTICES.md +0 -29
  284. package/.claude/nccgs/VERSION +0 -1
  285. package/.claude/nccgs/agent-library/nccgs-accessibility-specialist.md +0 -25
  286. package/.claude/nccgs/agent-library/nccgs-adversarial-reviewer.md +0 -41
  287. package/.claude/nccgs/agent-library/nccgs-ai-programmer.md +0 -25
  288. package/.claude/nccgs/agent-library/nccgs-analytics-engineer.md +0 -25
  289. package/.claude/nccgs/agent-library/nccgs-art-direction-lead.md +0 -25
  290. package/.claude/nccgs/agent-library/nccgs-audio-direction-lead.md +0 -25
  291. package/.claude/nccgs/agent-library/nccgs-creative-director.md +0 -25
  292. package/.claude/nccgs/agent-library/nccgs-documentation-manager.md +0 -25
  293. package/.claude/nccgs/agent-library/nccgs-economy-designer.md +0 -25
  294. package/.claude/nccgs/agent-library/nccgs-engine-programmer.md +0 -25
  295. package/.claude/nccgs/agent-library/nccgs-fast-implementer.md +0 -28
  296. package/.claude/nccgs/agent-library/nccgs-game-design-lead.md +0 -25
  297. package/.claude/nccgs/agent-library/nccgs-game-designer.md +0 -24
  298. package/.claude/nccgs/agent-library/nccgs-gameplay-programmer.md +0 -24
  299. package/.claude/nccgs/agent-library/nccgs-level-designer.md +0 -25
  300. package/.claude/nccgs/agent-library/nccgs-live-ops-designer.md +0 -25
  301. package/.claude/nccgs/agent-library/nccgs-localization-lead.md +0 -25
  302. package/.claude/nccgs/agent-library/nccgs-narrative-lead.md +0 -25
  303. package/.claude/nccgs/agent-library/nccgs-network-programmer.md +0 -25
  304. package/.claude/nccgs/agent-library/nccgs-performance-analyst.md +0 -25
  305. package/.claude/nccgs/agent-library/nccgs-producer.md +0 -25
  306. package/.claude/nccgs/agent-library/nccgs-production-coordinator.md +0 -22
  307. package/.claude/nccgs/agent-library/nccgs-programming-lead.md +0 -25
  308. package/.claude/nccgs/agent-library/nccgs-prototyper.md +0 -25
  309. package/.claude/nccgs/agent-library/nccgs-qa-engineer.md +0 -25
  310. package/.claude/nccgs/agent-library/nccgs-qa-lead.md +0 -25
  311. package/.claude/nccgs/agent-library/nccgs-release-engineer.md +0 -25
  312. package/.claude/nccgs/agent-library/nccgs-release-lead.md +0 -25
  313. package/.claude/nccgs/agent-library/nccgs-security-engineer.md +0 -25
  314. package/.claude/nccgs/agent-library/nccgs-sound-designer.md +0 -25
  315. package/.claude/nccgs/agent-library/nccgs-systems-designer.md +0 -25
  316. package/.claude/nccgs/agent-library/nccgs-task-scout.md +0 -22
  317. package/.claude/nccgs/agent-library/nccgs-technical-architect.md +0 -25
  318. package/.claude/nccgs/agent-library/nccgs-technical-artist.md +0 -25
  319. package/.claude/nccgs/agent-library/nccgs-technical-director.md +0 -25
  320. package/.claude/nccgs/agent-library/nccgs-tools-programmer.md +0 -25
  321. package/.claude/nccgs/agent-library/nccgs-ui-programmer.md +0 -25
  322. package/.claude/nccgs/agent-library/nccgs-unity-build-specialist.md +0 -25
  323. package/.claude/nccgs/agent-library/nccgs-unity-content-specialist.md +0 -25
  324. package/.claude/nccgs/agent-library/nccgs-unity-implementer.md +0 -26
  325. package/.claude/nccgs/agent-library/nccgs-unity-rendering-specialist.md +0 -25
  326. package/.claude/nccgs/agent-library/nccgs-unity-systems-specialist.md +0 -25
  327. package/.claude/nccgs/agent-library/nccgs-unity-ui-specialist.md +0 -25
  328. package/.claude/nccgs/agent-library/nccgs-ux-designer.md +0 -25
  329. package/.claude/nccgs/agent-library/nccgs-verification-engineer.md +0 -25
  330. package/.claude/nccgs/agent-library/nccgs-world-builder.md +0 -25
  331. package/.claude/nccgs/agent-library/nccgs-writer.md +0 -25
  332. package/.claude/nccgs/constitution.md +0 -187
  333. package/.claude/nccgs/hooks/agent-audit.mjs +0 -16
  334. package/.claude/nccgs/hooks/closure-guard.mjs +0 -59
  335. package/.claude/nccgs/hooks/common.mjs +0 -42
  336. package/.claude/nccgs/hooks/post-compact.mjs +0 -1
  337. package/.claude/nccgs/hooks/pre-compact.mjs +0 -8
  338. package/.claude/nccgs/hooks/protect-git.mjs +0 -22
  339. package/.claude/nccgs/hooks/protect-write.mjs +0 -17
  340. package/.claude/nccgs/hooks/runtime-observation.mjs +0 -11
  341. package/.claude/nccgs/hooks/session-start.mjs +0 -29
  342. package/.claude/nccgs/hooks/session-stop.mjs +0 -7
  343. package/.claude/nccgs/hooks/unity-transport-guard.mjs +0 -11
  344. package/.claude/nccgs/packages/ponytail/README.md +0 -46
  345. package/.claude/nccgs/packages/ponytail/manifest.json +0 -24
  346. package/.claude/nccgs/pipeline.json +0 -260
  347. package/.claude/nccgs/protocols/agent-contract.md +0 -101
  348. package/.claude/nccgs/protocols/astra-claude.md +0 -111
  349. package/.claude/nccgs/protocols/bounded-repair.md +0 -246
  350. package/.claude/nccgs/protocols/context-packets.md +0 -23
  351. package/.claude/nccgs/protocols/delivery-acceptance.md +0 -105
  352. package/.claude/nccgs/protocols/design-lifecycle.md +0 -139
  353. package/.claude/nccgs/protocols/editor-session-evidence.md +0 -52
  354. package/.claude/nccgs/protocols/evidence.md +0 -31
  355. package/.claude/nccgs/protocols/model-routing.md +0 -46
  356. package/.claude/nccgs/protocols/orchestration.md +0 -74
  357. package/.claude/nccgs/protocols/review-handoff.md +0 -101
  358. package/.claude/nccgs/protocols/shared-workflow-context.md +0 -33
  359. package/.claude/nccgs/protocols/standalone-gates.md +0 -329
  360. package/.claude/nccgs/protocols/standalone-pilot.md +0 -144
  361. package/.claude/nccgs/protocols/standalone.md +0 -207
  362. package/.claude/nccgs/protocols/task-autonomy.md +0 -55
  363. package/.claude/nccgs/protocols/task-gates.md +0 -144
  364. package/.claude/nccgs/protocols/task-slices.md +0 -106
  365. package/.claude/nccgs/protocols/unity-boundary.md +0 -31
  366. package/.claude/nccgs/routing.generated.md +0 -49
  367. package/.claude/nccgs/settings.fragment.json +0 -213
  368. package/.claude/nccgs/studio.json +0 -472
  369. package/.claude/nccgs/tools/approve-overrides.mjs +0 -81
  370. package/.claude/nccgs/tools/autonomy.mjs +0 -40
  371. package/.claude/nccgs/tools/command-process.mjs +0 -50
  372. package/.claude/nccgs/tools/command-tokens.mjs +0 -22
  373. package/.claude/nccgs/tools/compile-policy.mjs +0 -121
  374. package/.claude/nccgs/tools/configure-models.mjs +0 -96
  375. package/.claude/nccgs/tools/criteria.mjs +0 -121
  376. package/.claude/nccgs/tools/delivery-budget.mjs +0 -52
  377. package/.claude/nccgs/tools/design-readiness.mjs +0 -158
  378. package/.claude/nccgs/tools/editor-session-evidence.mjs +0 -66
  379. package/.claude/nccgs/tools/evidence.mjs +0 -153
  380. package/.claude/nccgs/tools/gates.mjs +0 -297
  381. package/.claude/nccgs/tools/handoff.mjs +0 -51
  382. package/.claude/nccgs/tools/hook-transport.mjs +0 -34
  383. package/.claude/nccgs/tools/inputs.mjs +0 -108
  384. package/.claude/nccgs/tools/installation-guard.mjs +0 -55
  385. package/.claude/nccgs/tools/integrity.mjs +0 -69
  386. package/.claude/nccgs/tools/lifecycle.mjs +0 -542
  387. package/.claude/nccgs/tools/native-completion.mjs +0 -30
  388. package/.claude/nccgs/tools/orchestration.mjs +0 -680
  389. package/.claude/nccgs/tools/paths.mjs +0 -60
  390. package/.claude/nccgs/tools/policy.mjs +0 -107
  391. package/.claude/nccgs/tools/process-lock.mjs +0 -74
  392. package/.claude/nccgs/tools/repair-packet.mjs +0 -106
  393. package/.claude/nccgs/tools/returned-handoff.mjs +0 -47
  394. package/.claude/nccgs/tools/review-budget.mjs +0 -171
  395. package/.claude/nccgs/tools/review-handoff.mjs +0 -66
  396. package/.claude/nccgs/tools/runtime.mjs +0 -71
  397. package/.claude/nccgs/tools/session-budget.mjs +0 -67
  398. package/.claude/nccgs/tools/shared-context-guard.mjs +0 -60
  399. package/.claude/nccgs/tools/shared-context.mjs +0 -25
  400. package/.claude/nccgs/tools/task-slices.mjs +0 -147
  401. package/.claude/nccgs/tools/task.mjs +0 -145
  402. package/.claude/nccgs/tools/tool-guard.mjs +0 -120
  403. package/.claude/nccgs/tools/unity-repair.mjs +0 -128
  404. package/.claude/nccgs/tools/unity-transport.mjs +0 -170
  405. package/.claude/nccgs/tools/verification-jobs.mjs +0 -171
  406. package/.claude/nccgs/tools/verification-worker.mjs +0 -71
  407. package/.claude/nccgs/tools/windows-compiler-server.cs +0 -163
  408. package/.claude/nccgs/tools/windows-job.cs +0 -103
  409. package/.claude/nccgs/unity-skills-manifest.json +0 -727
  410. package/.claude/nccgs/workflow-catalog.json +0 -654
  411. package/.claude/rules/nccgs-canonical-docs.md +0 -19
  412. package/.claude/rules/nccgs-editor-tools.md +0 -12
  413. package/.claude/rules/nccgs-localization.md +0 -12
  414. package/.claude/rules/nccgs-networking.md +0 -13
  415. package/.claude/rules/nccgs-performance.md +0 -14
  416. package/.claude/rules/nccgs-rendering.md +0 -16
  417. package/.claude/rules/nccgs-security.md +0 -13
  418. package/.claude/rules/nccgs-tests.md +0 -18
  419. package/.claude/rules/nccgs-ui.md +0 -14
  420. package/.claude/rules/nccgs-unity-assets.md +0 -21
  421. package/.claude/rules/nccgs-unity-code.md +0 -22
  422. package/.claude/skills/accessibility-review/SKILL.md +0 -22
  423. package/.claude/skills/accessibility-review/references/astra.md +0 -17
  424. package/.claude/skills/accessibility-review/references/legacy.md +0 -7
  425. package/.claude/skills/architecture-decision/SKILL.md +0 -22
  426. package/.claude/skills/architecture-decision/references/astra.md +0 -12
  427. package/.claude/skills/architecture-decision/references/legacy.md +0 -7
  428. package/.claude/skills/asset-audit/SKILL.md +0 -22
  429. package/.claude/skills/asset-audit/references/astra.md +0 -17
  430. package/.claude/skills/asset-audit/references/legacy.md +0 -7
  431. package/.claude/skills/audit/SKILL.md +0 -22
  432. package/.claude/skills/audit/references/astra.md +0 -17
  433. package/.claude/skills/audit/references/dimensions.md +0 -46
  434. package/.claude/skills/audit/references/legacy.md +0 -9
  435. package/.claude/skills/balance-review/SKILL.md +0 -22
  436. package/.claude/skills/balance-review/references/astra.md +0 -17
  437. package/.claude/skills/balance-review/references/legacy.md +0 -7
  438. package/.claude/skills/bug-triage/SKILL.md +0 -22
  439. package/.claude/skills/bug-triage/references/astra.md +0 -27
  440. package/.claude/skills/bug-triage/references/legacy.md +0 -7
  441. package/.claude/skills/build-live-game/SKILL.md +0 -317
  442. package/.claude/skills/build-live-game/references/cloud-code.md +0 -563
  443. package/.claude/skills/closure/SKILL.md +0 -22
  444. package/.claude/skills/closure/references/astra.md +0 -15
  445. package/.claude/skills/closure/references/legacy.md +0 -7
  446. package/.claude/skills/compatibility-review/SKILL.md +0 -22
  447. package/.claude/skills/compatibility-review/references/astra.md +0 -17
  448. package/.claude/skills/compatibility-review/references/legacy.md +0 -7
  449. package/.claude/skills/context-pack/SKILL.md +0 -22
  450. package/.claude/skills/context-pack/references/astra.md +0 -12
  451. package/.claude/skills/context-pack/references/legacy.md +0 -7
  452. package/.claude/skills/dependency-review/SKILL.md +0 -22
  453. package/.claude/skills/dependency-review/references/astra.md +0 -17
  454. package/.claude/skills/dependency-review/references/legacy.md +0 -7
  455. package/.claude/skills/design/SKILL.md +0 -24
  456. package/.claude/skills/design/references/astra.md +0 -12
  457. package/.claude/skills/design/references/legacy.md +0 -13
  458. package/.claude/skills/design-review/SKILL.md +0 -24
  459. package/.claude/skills/design-review/references/astra.md +0 -17
  460. package/.claude/skills/design-review/references/legacy.md +0 -7
  461. package/.claude/skills/evidence-review/SKILL.md +0 -22
  462. package/.claude/skills/evidence-review/references/astra.md +0 -17
  463. package/.claude/skills/evidence-review/references/legacy.md +0 -7
  464. package/.claude/skills/hotfix/SKILL.md +0 -22
  465. package/.claude/skills/hotfix/references/astra.md +0 -30
  466. package/.claude/skills/hotfix/references/legacy.md +0 -7
  467. package/.claude/skills/incident-recovery/SKILL.md +0 -22
  468. package/.claude/skills/incident-recovery/references/astra.md +0 -27
  469. package/.claude/skills/incident-recovery/references/legacy.md +0 -7
  470. package/.claude/skills/levelplay-unity-integration/SKILL.md +0 -1126
  471. package/.claude/skills/localization/SKILL.md +0 -135
  472. package/.claude/skills/localization/resources/L10nBatchProcessor.cs +0 -69
  473. package/.claude/skills/localize-game/SKILL.md +0 -22
  474. package/.claude/skills/localize-game/references/astra.md +0 -27
  475. package/.claude/skills/localize-game/references/legacy.md +0 -7
  476. package/.claude/skills/migrate-project/SKILL.md +0 -22
  477. package/.claude/skills/migrate-project/references/astra.md +0 -30
  478. package/.claude/skills/migrate-project/references/legacy.md +0 -19
  479. package/.claude/skills/migrate-project/references/procedure.md +0 -96
  480. package/.claude/skills/milestone-review/SKILL.md +0 -22
  481. package/.claude/skills/milestone-review/references/astra.md +0 -12
  482. package/.claude/skills/milestone-review/references/legacy.md +0 -7
  483. package/.claude/skills/nccgs-code-review/SKILL.md +0 -22
  484. package/.claude/skills/nccgs-code-review/references/astra.md +0 -21
  485. package/.claude/skills/nccgs-code-review/references/legacy.md +0 -7
  486. package/.claude/skills/new-unity-project/SKILL.md +0 -179
  487. package/.claude/skills/performance-audit/SKILL.md +0 -22
  488. package/.claude/skills/performance-audit/references/astra.md +0 -17
  489. package/.claude/skills/performance-audit/references/legacy.md +0 -7
  490. package/.claude/skills/physics-3d-collision/references/troubleshooting.md +0 -41
  491. package/.claude/skills/plan-feature/SKILL.md +0 -22
  492. package/.claude/skills/plan-feature/references/astra.md +0 -12
  493. package/.claude/skills/plan-feature/references/legacy.md +0 -7
  494. package/.claude/skills/playtest/SKILL.md +0 -22
  495. package/.claude/skills/playtest/references/astra.md +0 -31
  496. package/.claude/skills/playtest/references/legacy.md +0 -7
  497. package/.claude/skills/project-stage/SKILL.md +0 -22
  498. package/.claude/skills/project-stage/references/astra.md +0 -12
  499. package/.claude/skills/project-stage/references/legacy.md +0 -7
  500. package/.claude/skills/prototype-feature/SKILL.md +0 -22
  501. package/.claude/skills/prototype-feature/references/astra.md +0 -31
  502. package/.claude/skills/prototype-feature/references/legacy.md +0 -7
  503. package/.claude/skills/qa-plan/SKILL.md +0 -22
  504. package/.claude/skills/qa-plan/references/astra.md +0 -12
  505. package/.claude/skills/qa-plan/references/legacy.md +0 -7
  506. package/.claude/skills/release/SKILL.md +0 -22
  507. package/.claude/skills/release/references/astra.md +0 -30
  508. package/.claude/skills/release/references/legacy.md +0 -11
  509. package/.claude/skills/release-readiness/SKILL.md +0 -22
  510. package/.claude/skills/release-readiness/references/astra.md +0 -17
  511. package/.claude/skills/release-readiness/references/legacy.md +0 -7
  512. package/.claude/skills/retrospective/SKILL.md +0 -22
  513. package/.claude/skills/retrospective/references/astra.md +0 -12
  514. package/.claude/skills/retrospective/references/legacy.md +0 -7
  515. package/.claude/skills/review/SKILL.md +0 -22
  516. package/.claude/skills/review/references/astra.md +0 -21
  517. package/.claude/skills/review/references/legacy.md +0 -9
  518. package/.claude/skills/security-audit/SKILL.md +0 -22
  519. package/.claude/skills/security-audit/references/astra.md +0 -17
  520. package/.claude/skills/security-audit/references/legacy.md +0 -7
  521. package/.claude/skills/sprint-plan/SKILL.md +0 -22
  522. package/.claude/skills/sprint-plan/references/astra.md +0 -12
  523. package/.claude/skills/sprint-plan/references/legacy.md +0 -7
  524. package/.claude/skills/status/SKILL.md +0 -22
  525. package/.claude/skills/status/references/astra.md +0 -19
  526. package/.claude/skills/status/references/legacy.md +0 -9
  527. package/.claude/skills/story-readiness/SKILL.md +0 -24
  528. package/.claude/skills/story-readiness/references/astra.md +0 -17
  529. package/.claude/skills/story-readiness/references/legacy.md +0 -7
  530. package/.claude/skills/test/SKILL.md +0 -22
  531. package/.claude/skills/test/references/astra.md +0 -27
  532. package/.claude/skills/test/references/legacy.md +0 -9
  533. package/.claude/skills/ui-review/SKILL.md +0 -22
  534. package/.claude/skills/ui-review/references/astra.md +0 -17
  535. package/.claude/skills/ui-review/references/legacy.md +0 -7
  536. package/.claude/skills/unity-cli/CHANGELOG.md +0 -233
  537. package/.claude/skills/unity-cli/SECURITY.md +0 -22
  538. package/.claude/skills/unity-cli/SKILL.md +0 -414
  539. package/.claude/skills/unity-cli/references/auth-license-cloud.md +0 -146
  540. package/.claude/skills/unity-cli/references/build-run-test.md +0 -349
  541. package/.claude/skills/unity-cli/references/config-hub.md +0 -103
  542. package/.claude/skills/unity-cli/references/diagnostics-maintenance.md +0 -326
  543. package/.claude/skills/unity-cli/references/editors-install.md +0 -327
  544. package/.claude/skills/unity-cli/references/integration-advanced.md +0 -472
  545. package/.claude/skills/unity-cli/references/projects-templates.md +0 -574
  546. package/.claude/skills/work/SKILL.md +0 -22
  547. package/.claude/skills/work/references/astra.md +0 -32
  548. package/.claude/skills/work/references/classification.md +0 -41
  549. package/.claude/skills/work/references/closure.md +0 -60
  550. package/.claude/skills/work/references/feature-contracts.md +0 -36
  551. package/.claude/skills/work/references/legacy.md +0 -29
  552. package/.claude/skills/work/references/verification.md +0 -26
  553. package/CLAUDE.md +0 -10
  554. package/MEMORY.md +0 -109
  555. package/UPGRADING.md +0 -130
  556. package/VERSION +0 -1
  557. package/docs/ARCHITECTURE.md +0 -131
  558. package/docs/ASSET-PRODUCTION-GRAPHIFY-PLAN.md +0 -230
  559. package/docs/BOUNDED-REPAIR.md +0 -80
  560. package/docs/EDITOR-SESSION-EVIDENCE.md +0 -52
  561. package/docs/HANDOFF-AUTOMATION.md +0 -144
  562. package/docs/HUONG-DAN-MIGRATE-VA-SU-DUNG.md +0 -117
  563. package/docs/MIGRATION-MATRIX.md +0 -23
  564. package/docs/NCCGS-1.3.md +0 -13
  565. package/docs/NCCGS-1.4.1.md +0 -149
  566. package/docs/NCCGS-1.4.md +0 -184
  567. package/docs/NCCGS-1.5-IMPLEMENTATION-PLAN.md +0 -378
  568. package/docs/NCCGS-1.5-PILOT.md +0 -130
  569. package/docs/NCCGS-1.5.md +0 -237
  570. package/docs/PHASE-1-OPERATIONS.md +0 -278
  571. package/docs/PHASE-2-OPERATIONS.md +0 -183
  572. package/docs/PROJECT-POLICY.md +0 -94
  573. package/docs/RELEASE-STATUS.md +0 -150
  574. package/docs/TASK-SLICING.md +0 -57
  575. package/docs/UNINSTALL.md +0 -134
  576. package/docs/UPGRADE-QUALIFICATION.md +0 -45
  577. package/docs/WFK17-HOOK-REPAIR.md +0 -71
  578. package/docs/WORKFLOWS.md +0 -85
  579. package/package-assets/nccgs-project.gitignore +0 -2
  580. package/package-assets/setup-vivox-voice-chat-evals.gitignore +0 -7
  581. package/scaffold/.nccgs/autonomy.json +0 -4
  582. package/scaffold/.nccgs/bugs/.gitkeep +0 -1
  583. package/scaffold/.nccgs/closures/.gitkeep +0 -1
  584. package/scaffold/.nccgs/context/.gitkeep +0 -1
  585. package/scaffold/.nccgs/decisions/.gitkeep +0 -1
  586. package/scaffold/.nccgs/evidence/.gitkeep +0 -1
  587. package/scaffold/.nccgs/execution.json +0 -10
  588. package/scaffold/.nccgs/features/.gitkeep +0 -1
  589. package/scaffold/.nccgs/gates.json +0 -7
  590. package/scaffold/.nccgs/inputs.json +0 -6
  591. package/scaffold/.nccgs/migrations/.gitkeep +0 -1
  592. package/scaffold/.nccgs/playtests/.gitkeep +0 -1
  593. package/scaffold/.nccgs/project.yaml +0 -109
  594. package/scaffold/.nccgs/requirements.yaml +0 -10
  595. package/scaffold/.nccgs/reviews/.gitkeep +0 -1
  596. package/scaffold/.nccgs/state.md +0 -40
  597. package/scaffold/.nccgs/templates/agent-handoff.md +0 -37
  598. package/scaffold/.nccgs/templates/architecture-decision.md +0 -27
  599. package/scaffold/.nccgs/templates/closure-record.md +0 -62
  600. package/scaffold/.nccgs/templates/context-packet.yaml +0 -17
  601. package/scaffold/.nccgs/templates/design-contract.json +0 -34
  602. package/scaffold/.nccgs/templates/evidence-record.md +0 -23
  603. package/scaffold/.nccgs/templates/feature-contract.md +0 -60
  604. package/scaffold/.nccgs/templates/implementation-report.md +0 -52
  605. package/scaffold/.nccgs/templates/migration-plan.md +0 -40
  606. package/scaffold/.nccgs/templates/repair-packet.json +0 -14
  607. package/scaffold/.nccgs/templates/repair-unity-code.json +0 -18
  608. package/scaffold/.nccgs/templates/repair-unity-editor.json +0 -21
  609. package/scaffold/.nccgs/templates/task-slices.json +0 -28
  610. package/scaffold/.nccgs/templates/waiver.md +0 -11
  611. package/scripts/benchmark-snapshot.mjs +0 -205
  612. package/scripts/benchmark-v15.mjs +0 -173
  613. package/scripts/cli.mjs +0 -205
  614. package/scripts/doctor.mjs +0 -261
  615. package/scripts/install.mjs +0 -530
  616. package/scripts/recover-session.mjs +0 -89
  617. package/scripts/run.mjs +0 -86
  618. package/scripts/supervise.mjs +0 -152
  619. package/scripts/uninstall.mjs +0 -292
  620. package/scripts/validate.mjs +0 -285
  621. package/scripts/work-handoff.mjs +0 -38
  622. package/tests/autonomy.test.mjs +0 -126
  623. package/tests/benchmark-v15.test.mjs +0 -65
  624. package/tests/design-readiness.test.mjs +0 -200
  625. package/tests/editor-session-evidence.test.mjs +0 -45
  626. package/tests/evidence.test.mjs +0 -186
  627. package/tests/fixtures/compiler-shutdown.cs +0 -67
  628. package/tests/fixtures/native-provider.mjs +0 -61
  629. package/tests/framework.test.mjs +0 -740
  630. package/tests/gates.test.mjs +0 -479
  631. package/tests/hook-repair.test.mjs +0 -106
  632. package/tests/lifecycle-v15.test.mjs +0 -346
  633. package/tests/native-completion-notices.test.mjs +0 -181
  634. package/tests/orchestration-v15.test.mjs +0 -596
  635. package/tests/phase1.test.mjs +0 -427
  636. package/tests/phase2.test.mjs +0 -250
  637. package/tests/policy-v15.test.mjs +0 -234
  638. package/tests/ponytail-package.test.mjs +0 -75
  639. package/tests/returned-handoff-notices.test.mjs +0 -170
  640. package/tests/review-budget.test.mjs +0 -177
  641. package/tests/runtime-v15.test.mjs +0 -1198
  642. package/tests/session-budget.test.mjs +0 -34
  643. package/tests/task-slices.test.mjs +0 -285
  644. package/tests/uninstall.test.mjs +0 -477
  645. package/tests/unity-generated.test.mjs +0 -140
  646. package/tests/unity-transport.test.mjs +0 -348
  647. /package/{.claude/nccgs/packages → template}/ponytail/LICENSE +0 -0
  648. /package/{.claude/nccgs/packages → template}/ponytail/NOTICE.md +0 -0
  649. /package/{.claude/nccgs/packages → template}/ponytail/complexity-review.md +0 -0
  650. /package/{.claude/skills → unity-skills}/build-live-game/references/remote-config.md +0 -0
  651. /package/{.claude/skills → unity-skills}/implement-in-app-purchases/README.md +0 -0
  652. /package/{.claude/skills → unity-skills}/implement-in-app-purchases/references/codeless-catalog.md +0 -0
  653. /package/{.claude/skills → unity-skills}/implement-in-app-purchases/references/convert-adapty.md +0 -0
  654. /package/{.claude/skills → unity-skills}/implement-in-app-purchases/references/convert-essentialkit.md +0 -0
  655. /package/{.claude/skills → unity-skills}/implement-in-app-purchases/references/convert-revenuecat.md +0 -0
  656. /package/{.claude/skills → unity-skills}/implement-in-app-purchases/references/convert-unipay.md +0 -0
  657. /package/{.claude/skills → unity-skills}/implement-in-app-purchases/references/migration-v4-to-v5.md +0 -0
  658. /package/{.claude/skills → unity-skills}/implement-in-app-purchases/references/path-add-iap-to-new-project.md +0 -0
  659. /package/{.claude/skills → unity-skills}/implement-in-app-purchases/references/path-convert-native-storekit.md +0 -0
  660. /package/{.claude/skills → unity-skills}/implement-in-app-purchases/references/platform-notes.md +0 -0
  661. /package/{.claude/skills → unity-skills}/implement-in-app-purchases/references/pre-check.md +0 -0
  662. /package/{.claude/skills → unity-skills}/localization/resources/LocalizedFontAsset.cs +0 -0
  663. /package/{.claude/skills → unity-skills}/optimize-audio/resources/platform-settings.md +0 -0
  664. /package/{.claude/skills → unity-skills}/optimize-web/resources/WebOptimizer.cs +0 -0
  665. /package/{.claude/skills → unity-skills}/optimize-web/resources/toktx-examples.sh +0 -0
  666. /package/{.claude/skills → unity-skills}/physics-3d-collision/resources/CollisionDebugger.cs +0 -0
  667. /package/{.claude/skills → unity-skills}/setup-multiplayer-services/references/dgs-entrypoint.md +0 -0
  668. /package/{.claude/skills → unity-skills}/setup-multiplayer-services/references/entrypoints.md +0 -0
  669. /package/{.claude/skills → unity-skills}/setup-multiplayer-services/references/examples.md +0 -0
  670. /package/{.claude/skills → unity-skills}/setup-multiplayer-services/references/implementation-fit.md +0 -0
  671. /package/{.claude/skills → unity-skills}/setup-multiplayer-services/references/underlying-services.md +0 -0
  672. /package/{.claude/skills → unity-skills}/setup-multiplayer-services/references/workflows-prerequisites.md +0 -0
  673. /package/{.claude/skills → unity-skills}/setup-vivox-voice-chat/evals/.env.example +0 -0
  674. /package/{.claude/skills → unity-skills}/setup-vivox-voice-chat/evals/README.md +0 -0
  675. /package/{.claude/skills → unity-skills}/setup-vivox-voice-chat/evals/promptfooconfig.yaml +0 -0
  676. /package/{.claude/skills → unity-skills}/setup-vivox-voice-chat/evals/tests/init-and-login.yaml +0 -0
  677. /package/{.claude/skills → unity-skills}/setup-vivox-voice-chat/evals/tests/text-chat.yaml +0 -0
  678. /package/{.claude/skills → unity-skills}/setup-vivox-voice-chat/evals/tests/voice-channels.yaml +0 -0
  679. /package/{.claude/skills → unity-skills}/setup-vivox-voice-chat/references/events-and-participants.md +0 -0
  680. /package/{.claude/skills → unity-skills}/setup-vivox-voice-chat/references/init-and-login.md +0 -0
  681. /package/{.claude/skills → unity-skills}/setup-vivox-voice-chat/references/text-chat.md +0 -0
  682. /package/{.claude/skills → unity-skills}/setup-vivox-voice-chat/references/troubleshooting.md +0 -0
  683. /package/{.claude/skills → unity-skills}/setup-vivox-voice-chat/references/voice-channels.md +0 -0
  684. /package/{.claude/skills → unity-skills}/shader-graph-create-custom-node/resources/all_hints.hlsl +0 -0
  685. /package/{.claude/skills → unity-skills}/sprite-editor/references/api_reference.md +0 -0
  686. /package/{.claude/skills → unity-skills}/sprite-editor/references/background.md +0 -0
  687. /package/{.claude/skills → unity-skills}/sprite-editor/scripts/AutomaticSliceTexture.cs +0 -0
  688. /package/{.claude/skills → unity-skills}/sprite-editor/scripts/GenerateNewSpriteRects.cs +0 -0
  689. /package/{.claude/skills → unity-skills}/sprite-editor/scripts/GetTextureSourceImageSize.cs +0 -0
  690. /package/{.claude/skills → unity-skills}/sprite-editor/scripts/GetTextureToSlice.cs +0 -0
  691. /package/{.claude/skills → unity-skills}/sprite-editor/scripts/GridSliceTexture.cs +0 -0
  692. /package/{.claude/skills → unity-skills}/sprite-editor/scripts/IsometricSliceTexture.cs +0 -0
  693. /package/{.claude/skills → unity-skills}/sprite-editor/scripts/README.md +0 -0
  694. /package/{.claude/skills → unity-skills}/sprite-editor/scripts/SetPivotExample.cs +0 -0
  695. /package/{.claude/skills → unity-skills}/sprite-editor/scripts/SpriteToPng.cs +0 -0
  696. /package/{.claude/skills → unity-skills}/ui-imgui/references/gui-elements.md +0 -0
  697. /package/{.claude/skills → unity-skills}/ui-imgui/references/templates.md +0 -0
  698. /package/{.claude/skills → unity-skills}/ui-ugui/references/scrollview-setup.md +0 -0
  699. /package/{.claude/skills → unity-skills}/ui-uitk/references/common-issues.md +0 -0
  700. /package/{.claude/skills → unity-skills}/ui-uitk/references/painter2d.md +0 -0
  701. /package/{.claude/skills → unity-skills}/ui-uitk/references/pointermanipulator-guide.md +0 -0
  702. /package/{.claude/skills → unity-skills}/ui-uitk/references/svg-icons.md +0 -0
  703. /package/{.claude/skills → unity-skills}/ui-uitk/references/ui-runtime-binding.md +0 -0
  704. /package/{.claude/skills → unity-skills}/ui-uitk/references/uss-guide.md +0 -0
  705. /package/{.claude/skills → unity-skills}/urp-postprocessing/references/effect-reference.md +0 -0
@@ -0,0 +1,242 @@
1
+ ---
2
+ name: build-gtk
3
+ description: >-
4
+ Builds node-based Editor tools with Unity Graph Toolkit (GTK) on Unity 6.6+: graphs, nodes, ports
5
+ and validation, State Machine API tools on 6.7+, and runtime assets via a scripted importer. Use for
6
+ custom graph, node or state machine editors, or migrating a GraphView tool. Not for Shader Graph, VFX
7
+ Graph or Animator Controllers.
8
+ required_editor_version: ">=6000.6"
9
+ ---
10
+
11
+ # Unity Graph Toolkit (GTK)
12
+
13
+ Build Editor graph tools and state machine tools on Unity's Graph Toolkit module, using only its
14
+ public API in the `Unity.GraphToolkit.Editor` namespace.
15
+
16
+ ## Important
17
+
18
+ - Create a restore point you can roll back to if your changes fail.
19
+ - Do only what's asked. Don't change unrelated assets or files. Avoid long explanations.
20
+ - Before you go forward with a workflow or diagnosis, open and read the reference file(s) named in
21
+ that workflow and the [Topic map](#topic-map) page(s) that cover the thing you intend to do. Name
22
+ the file(s) you read in your response. This is because your training knowledge about Unity might be
23
+ out of date, incorrect, or for the wrong Unity version, and Graph Toolkit changed between 6000.4,
24
+ 6000.6 and 6000.7.
25
+
26
+ ## References
27
+
28
+ Read these as needed. Paths are relative to this skill's folder.
29
+
30
+ - `references/graph-api.md` — the Graph API surface: Graph, Node, port and option builders, context
31
+ and block nodes, subgraphs, variables, validation, toolbar and context menus. Read before writing any
32
+ graph-tool code.
33
+ - `references/state-machine-api.md` — the State Machine API (Unity 6.7+): StateMachine, State,
34
+ Condition, transitions and rules, self transitions, custom views. Read whenever states, transitions
35
+ or conditions are involved.
36
+ - `references/runtime-and-visualization.md` — compiling a graph or state machine into a runtime asset
37
+ with a ScriptedImporter, and showing live execution in the graph editor. Read when the user wants the
38
+ authored data used in the game or debugged at runtime.
39
+ - `references/pitfalls.md` — the mistakes that survive compilation. Read before handing off, and
40
+ whenever the user reports a compile error, an empty Add menu, a missing node, or an exception.
41
+
42
+ ## Step 1: Check the Editor version and pick the API
43
+
44
+ Read `m_EditorVersion` in `ProjectSettings/ProjectVersion.txt` before writing code. Graph Toolkit is
45
+ an Editor module, so there is no package to install. `com.unity.graphtoolkit` is a deprecated shim
46
+ and must not be added to the manifest.
47
+
48
+ | Editor version | What is available |
49
+ |---|---|
50
+ | Older than 6000.4 | Only the retired experimental package (0.x). Its API differs from this skill. Recommend upgrading. |
51
+ | 6000.4 to 6000.5 | Module present, but without port capacity, type casting, wire and node visualization, USS node styling, or element IDs. |
52
+ | 6000.6 | The Graph API this skill documents. |
53
+ | 6000.7 and newer | Everything above plus the State Machine API, `NodeView<T>` / `StateView<T>` / `ConditionView<T>` custom UI, `[GraphMenu]` / `[BlackboardMenu]` context menus, the `GraphLogger.GraphChanges` change delta, port type-following, and Blackboard type restriction. Members marked **6.7** in the references. |
54
+
55
+ If the user asks for a state machine tool on an Editor older than 6000.7, say plainly that the
56
+ State Machine API is not available there. Do not emulate it with the Graph API unless asked.
57
+
58
+ ## Mental model
59
+
60
+ - Graph Toolkit is an authoring framework only. It draws and persists graphs; it never executes them.
61
+ The user writes the runtime data model and the code that runs it, usually fed by a ScriptedImporter.
62
+ - One asset type per `Graph` or `StateMachine` subclass, identified by the file extension passed to
63
+ `[Graph("ext")]` or `[StateMachine("ext")]`.
64
+ - Discovery is by reflection. Node, state and condition classes in the same assembly as the graph
65
+ class are listed automatically. Classes in other assemblies opt in with `[UseWithGraph]` or
66
+ `[UseWithStateMachine]`. Abstract classes are never listed.
67
+ - Every authoring class is `[Serializable]` and lives in an Editor-only assembly, either an `Editor`
68
+ folder or an asmdef restricted to the Editor platform.
69
+ - Only the public API compiles for users. If a name from the left column appears in a draft, stop and
70
+ use the right column:
71
+
72
+ | Never write | Write instead |
73
+ |---|---|
74
+ | `GraphModel`, `GraphObject`, `GraphTool`, `Stencil`, `BaseGraphTool` | `Graph` and `GraphDatabase` |
75
+ | `NodeModel`, `PortModel`, `WireModel` | `Node`, `IPort`, `Wire` |
76
+ | `StateModel`, `TransitionModel`, `ConditionModel` | `State`, `ITransition`, `Condition<T>` |
77
+ | `GraphViewEditorWindow`, `GraphElementsExtensionMethodsCache`, `ModelView` | the window is provided; `NodeView<T>` on 6000.7 for custom UI |
78
+ | `UnityEditor.Experimental.GraphView`, `graphViewChanged`, `Port.Create` | no equivalent; model the tool as `Graph` and `Node` classes |
79
+ | `com.unity.graphtoolkit` in the manifest | nothing; the module is built in |
80
+
81
+ ## Workflow A: build a graph tool
82
+
83
+ Read `references/graph-api.md` now, before writing code; member names and builder chains come from
84
+ there, not from memory. Read `references/runtime-and-visualization.md` as well when step 5 applies.
85
+
86
+ 1. **Graph class.** `[Graph(AssetExtension)] [Serializable] class MyGraph : Graph` with a
87
+ `public const string AssetExtension`. Add a `[MenuItem("Assets/Create/...")]` static method that
88
+ calls `GraphDatabase.PromptInProjectBrowserToCreateNewAsset<MyGraph>()`. Pass
89
+ `GraphOptions.SupportsSubgraphs` in the attribute when subgraphs are wanted.
90
+ 2. **Node classes.** `[Serializable] class MyNode : Node`. Override `OnDefinePorts` and end every port
91
+ builder chain with `.Build()`. Override `OnDefineOptions` for inspector-editable settings, and read
92
+ them inside `OnDefinePorts` with `GetNodeOptionByName(name).TryGetValue<T>(out var v)` when ports
93
+ depend on them. Call `.Delayed()` on count-like options so ports are not rebuilt on every keystroke.
94
+ Use `[Node("Category/Path", iconPath, title, stylesheet)]` for placement, icon, default title and USS.
95
+ 3. **Validation.** Override `OnGraphChanged(GraphLogger logger)` and report with
96
+ `logger.LogError`, `LogWarning` or `Log`, passing the offending node or port as context so the
97
+ marker appears on it. Never mutate the graph in this callback; put the fix in a `GraphLogAction`
98
+ attached to the message, a menu item, or the importer.
99
+ 4. **Structure, as requested.** Context and block nodes, subgraphs, blackboard variables, type casting
100
+ through `IsConnectionAllowed`, a toolbar element, or a context menu. Details in `graph-api.md`.
101
+ 5. **Output.** A `ScriptedImporter` registered on the same extension compiles the graph into a plain
102
+ runtime asset. The shape is always the same:
103
+
104
+ ```csharp
105
+ var graph = GraphDatabase.LoadGraphForImporter<MyGraph>(ctx.assetPath); // never LoadGraph here
106
+ if (graph == null) return; // bad path or type: log and stop
107
+ var start = graph.GetNodes().OfType<StartNode>().FirstOrDefault();
108
+ if (start == null) return; // OnGraphChanged already reported it
109
+ var next = start.GetOutputPortByName("Next").FirstConnectedPort?.GetNode(); // null when unconnected
110
+ var titlePort = next.GetInputPortByName("Title");
111
+ titlePort.TryGetValue<string>(out var title); // the value typed on the node
112
+ if (titlePort.IsConnected) { /* resolve titlePort.FirstConnectedPort.GetNode() upstream instead */ }
113
+ ctx.AddObjectToAsset("Runtime", runtime); ctx.SetMainObject(runtime);
114
+ ```
115
+
116
+ The runtime asset and its assembly must not reference `Unity.GraphToolkit.Editor`; keep `Hash128`
117
+ IDs as `Hash128`. Debug views and code-built graphs are in `runtime-and-visualization.md`.
118
+ 6. **Verify** as described below.
119
+
120
+ ## Workflow B: build a state machine tool (Unity 6.7 and newer)
121
+
122
+ Read `references/state-machine-api.md` now; there is no manual walkthrough for this API yet, so that
123
+ file and the Script Reference are the only accurate sources for its member names.
124
+
125
+ 1. **State machine class.** `[StateMachine(AssetExtension)] [Serializable] class MySM : StateMachine`
126
+ plus a menu item calling `StateMachineDatabase.PromptInProjectBrowserToCreateNewAsset<MySM>()`.
127
+ 2. **States.** `[Serializable] class Patrol : State`. States have no ports; the state machine owns the
128
+ transitions. Options declared in `OnDefineOptions` appear only in the Graph Inspector.
129
+ 3. **Conditions.** `[Serializable] [Condition("Health")] class HealthCondition : Condition<float>` with
130
+ `protected override bool DisplayComparisonDropdown => true` when a comparison operator is wanted.
131
+ Derive from `Condition` directly for a valueless trigger. Group (And/Or) and variable conditions are
132
+ built in; do not reimplement them.
133
+ 4. **Optional.** Custom self transitions (`SelfTransition` + `[Transition(...)]`), custom UI through
134
+ `StateView<T>` and `ConditionView<T>`, and `[StateMachineMenu]` / `[ConditionMenu]` entries.
135
+ 5. **Validation.** Override `OnStateMachineChanged(StateMachineLogger logger)`. Same rules as
136
+ `OnGraphChanged`.
137
+ 6. **Output.** A `ScriptedImporter` loads with `StateMachineDatabase.LoadStateMachineForImporter<MySM>`,
138
+ then walks `GetStates()`, each state's `GetOutgoingTransitions()`, each transition's `GetRules()`,
139
+ and each rule's `RootCondition` tree. That tree always contains the built-in kinds as well as the
140
+ user's classes, so the compiler must handle `IGroupCondition` (recurse, honour `Operation`) and
141
+ `IVariableCondition` (`Variable.Name`, `Comparison`, `Value`) before matching custom `Condition<T>`
142
+ types.
143
+
144
+ ## Editing a graph from code
145
+
146
+ When a menu item, generator or tool builds or edits an asset, bracket the mutations:
147
+ `LoadGraph`/`CreateGraph` → `UndoBeginRecordGraph("Action")` → `AddNode`, `Connect`,
148
+ `port.TrySetValue`, `CreateVariable` → `GraphDatabase.SaveGraph(graph)` → `UndoEndRecordGraph()`.
149
+ The state machine equivalents are `UndoBeginRecordStateMachine`, `Connect(fromState, toState)`,
150
+ `SaveStateMachine` and `UndoEndRecordStateMachine`. Mutating inside `OnEnable`, `OnDisable`,
151
+ `OnGraphChanged` or `OnStateMachineChanged` throws `InvalidOperationException`.
152
+
153
+ ## Decisions
154
+
155
+ | The user wants | Do this | Why |
156
+ |---|---|---|
157
+ | Limit how many wires a port accepts | `.WithCapacity(PortCapacity.Single)` (or `Multi`, `None`) in the port builder | Ports default to multiple wires, so the framework enforces the limit only if you declare it |
158
+ | Connect an `int` output to a `float` input | Override `Graph.IsConnectionAllowed(IPort output, IPort input)` | Ports of different types refuse to connect by default; the graph only records the wire, your importer converts |
159
+ | One port that accepts several types, like Shader Graph | 6000.7+: `.WithDataTypes(typeof(float), typeof(int), typeof(Vector3))` on the builder. 6000.6: an untyped port plus `IsConnectionAllowed` | `WithDataTypes` does not exist on 6000.6 |
160
+ | An execution-flow port with no data type | `context.AddInputPort("In")` with no type; its `DataType` is `Untyped`. Add `.WithConnectorUI(PortConnectorUI.Arrowhead)` for a flow look | Flow ports carry no value; typing them invites wrong connections |
161
+ | Hide a node type from the Add menu | Make it `abstract`, or move it to another assembly without `[UseWithGraph]`, or set `GraphOptions.DisableAutoInclusionOfNodesFromGraphAssembly` and opt nodes in explicitly | Every concrete node class in the graph's assembly is listed automatically |
162
+ | Group nodes in the Add menu | `[Node("Category/Sub")]`. The class or title name is appended after the path | The attribute's first argument is a folder path, not the node's title |
163
+ | Know what changed, like the old `graphViewChanged` | 6000.7+: `OnGraphChanged` and `logger.GraphChanges.ChangedNodes` with `ChangeKinds` flags for added and modified nodes. Removed nodes on any version, and everything on 6000.6: diff a cached `HashSet<Hash128>` of node IDs against `GetNodes()` | `GraphChanges` was added in 6000.7 and never reports removed nodes, only removed ports |
164
+ | Several kinds of subgraph | `GraphOptions.SupportsSubgraphs` on the main graph, `[Subgraph(typeof(MainGraph))]` on each subgraph `Graph` class | Without the attribute the main graph type doubles as the only subgraph type |
165
+ | Ports on a subgraph node | Blackboard variables of kind `VariableKind.Input` or `Output` inside the subgraph | Subgraph nodes have no `OnDefinePorts`; their ports mirror the subgraph's variables |
166
+ | Node icon or USS look | `[Node(category, iconPath, title, stylesheet)]`; `d_` prefix for the dark-theme icon file | The Editor picks the `d_` file in the dark theme and falls back otherwise |
167
+ | Show which node runs and what flows through ports at runtime | GraphVisualization API, see `runtime-and-visualization.md` | Graph Toolkit has no runtime; the game must push state back into the open window |
168
+ | An Animator-like state machine editor | Workflow B on 6000.7+. On 6000.6, explain it is not available | The State Machine API does not exist before 6000.7 |
169
+ | Extra UI inside a node | `NodeView<MyNode>` on 6000.7+. On 6000.6, only USS, `DefaultColor` and `FillAmount` | `NodeView<T>` was added in 6000.7 |
170
+
171
+ ## Constraints
172
+
173
+ - Use member names exactly as the references spell them: properties are PascalCase
174
+ (`FirstConnectedPort`, `IsConnected`), attributes take positional constructor arguments, and IDs are
175
+ `Hash128`. When a member is not listed in the references, look it up at the URL pattern below rather
176
+ than guessing its name or casing, because a guessed member fails to compile and the user cannot tell
177
+ a typo from a missing feature.
178
+ - Link to the Script Reference or manual instead of restating them, so the answer stays correct when
179
+ the docs change.
180
+ - Keep runtime assemblies free of `Unity.GraphToolkit.Editor`, and put visualization code inside a
181
+ runtime assembly under `#if UNITY_EDITOR`, because the module is Editor-only and any reference to it
182
+ breaks the player build.
183
+ - Keep the user's existing tool structure and do not restyle or reorganize nodes that were not
184
+ mentioned, because node and port names are lookup keys that importers and saved assets depend on.
185
+ - Do not use Graph Toolkit internals or private types as a workaround, because they are not accessible
186
+ from user code and change without notice. If the public API cannot do something, say so and point at
187
+ the community thread list below.
188
+
189
+ ## Verify
190
+
191
+ 0. Read `references/pitfalls.md` and check the code against it before showing it to the user.
192
+ 1. The project compiles with no errors. If the Unity CLI is available, use it to build or run the
193
+ Editor headless; otherwise ask the user to focus the Editor and report the Console.
194
+ 2. Create an asset from the new menu item, double-click it, add every node or state type from the Add
195
+ menu, connect them, save, close and reopen. The Console must show no errors or warnings.
196
+ 3. With an importer, select the asset and confirm the produced runtime object is the main asset in
197
+ the Inspector.
198
+ 3b. When you wrote runtime code (an executor, a debug view), add `Debug.Log` lines that prove the
199
+ behaviour, such as the state entered or the node executed, enter Play mode, and read them. Remove or
200
+ guard them once the behaviour is confirmed.
201
+ 4. Re-read `references/pitfalls.md` and fix anything it flags.
202
+ 5. If a step fails or the Console reports an error, go back and reread the reference file and the
203
+ [Topic map](#topic-map) page for that step before retrying; the fix is usually a member name or a
204
+ version gate you missed.
205
+
206
+ ## Final report
207
+
208
+ Give the user a short checklist: the files you created or changed and where they go, how to create
209
+ and open the first asset, what the importer produces, and which Editor version the code targets. List
210
+ what is left for them to decide or do next, such as more node types, the runtime executor, or the debug
211
+ view, and any Console error you could not verify because no Editor was available.
212
+
213
+ ## Topic map
214
+
215
+ Prefer `WebFetch` over `WebSearch`; it is faster and lands on the exact page. Only fetch what you need.
216
+ Replace `<VERSION>` before fetching:
217
+
218
+ - `docs.unity.com/en-us/engine/<VERSION>` and `docs.unity3d.com/<VERSION>/Documentation`: the project's
219
+ Editor version from `ProjectSettings/ProjectVersion.txt`, for example `6000.6` or `6000.7`.
220
+ - `docs.unity3d.com/Packages/com.unity.graphtoolkit-samples@<VERSION>`: the samples package
221
+ version shown in the Package Manager, for example `0.6`.
222
+
223
+ Pages, all under `https://docs.unity.com/en-us/engine/<VERSION>/`, served as markdown when the `.md`
224
+ suffix is kept:
225
+
226
+ - Manual index: `manual/extending-the-editor/gtk-index.md`
227
+ - Implementing a graph tool: `manual/extending-the-editor/gtk-index/implementing-a-graph-tool.md`, with
228
+ child pages `implement-a-graph-tool.md`, `implement-nodes.md`, `implement-node-options.md`,
229
+ `implement-context-nodes.md`, `implement-block-nodes.md`, `type-cast-ports.md`,
230
+ `add-custom-toolbar-actions.md`, `add-subgraph-support.md`, `graph-processing.md` under that folder
231
+ - Graph window and panels: `manual/extending-the-editor/gtk-index/landing-graph-interface.md`, with
232
+ `graph-window.md`, `blackboard.md`, `graph-inspector.md`, `minimap.md` under it
233
+ - Script Reference: `script-reference/unity/graphtoolkit/editor/<type>.md` and
234
+ `.../<type>/<member>.md`, all lowercase, generic arity dropped (`condition.md` for `Condition<T>`).
235
+ Example: `script-reference/unity/graphtoolkit/editor/graph/ongraphchanged.md`. State machine types
236
+ exist from `6000.7`. The older form `https://docs.unity3d.com/<VERSION>/Documentation/ScriptReference/Unity.GraphToolkit.Editor.<Type>.html`
237
+ also resolves, as HTML.
238
+ - Samples: `https://docs.unity3d.com/Packages/com.unity.graphtoolkit-samples@<VERSION>/manual/index.html`.
239
+ Install `com.unity.graphtoolkit-samples` by name in the Package Manager, then import Texture Maker
240
+ (importer), Visual Novel Director (custom runtime and debug view) or Dungeon Graph Generator
241
+ (building a graph from code).
242
+ - Community: https://discussions.unity.com/tag/graph-toolkit
@@ -0,0 +1,324 @@
1
+ # Graph API reference (Unity 6.6 and newer)
2
+
3
+ All types live in `Unity.GraphToolkit.Editor` unless stated. Members marked **6.7** exist only on
4
+ Unity 6000.7 and newer. Every signature below was taken from the module source; when something is
5
+ not listed here, look it up at
6
+ `https://docs.unity3d.com/<VERSION>/Documentation/ScriptReference/Unity.GraphToolkit.Editor.<Type>.html`,
7
+ with `<VERSION>` the project's Editor version, for example `6000.6`.
8
+
9
+ ## Contents
10
+
11
+ 1. Graph class and asset lifecycle
12
+ 2. Nodes
13
+ 3. Ports
14
+ 4. Node options
15
+ 5. Context and block nodes
16
+ 6. Subgraphs
17
+ 7. Variables and constants
18
+ 8. Validation with OnGraphChanged
19
+ 9. Type casting between ports
20
+ 10. Toolbar elements
21
+ 11. Context menus (6.7)
22
+ 12. Node look: colors, accent, USS, custom UI
23
+ 13. Wires
24
+
25
+ ## 1. Graph class and asset lifecycle
26
+
27
+ ```csharp
28
+ [Graph(AssetExtension)] // optional second arg: GraphOptions flags
29
+ [Serializable]
30
+ class MyGraph : Graph
31
+ {
32
+ public const string AssetExtension = "mygraph";
33
+
34
+ [MenuItem("Assets/Create/My Tool/My Graph")]
35
+ static void CreateAssetFile() => GraphDatabase.PromptInProjectBrowserToCreateNewAsset<MyGraph>();
36
+ }
37
+ ```
38
+
39
+ `GraphOptions` flags: `SupportsSubgraphs`, `DisableAutoInclusionOfNodesFromGraphAssembly`.
40
+ `Default` and `None` are 0.
41
+
42
+ `GraphDatabase` (static):
43
+
44
+ - `PromptInProjectBrowserToCreateNewAsset<T>(string defaultName = "New Graph")`
45
+ - `T CreateGraph<T>(string assetPath)`, `T LoadGraph<T>(string assetPath)`, `SaveGraph(Graph)`
46
+ - `T LoadGraphForImporter<T>(string assetPath)` — the only loader to use inside a `ScriptedImporter`
47
+ - `GUID GetGraphAssetGUID(Graph)`, `string GetGraphAssetPath(Graph)`
48
+
49
+ `Graph` members:
50
+
51
+ - `Name`, `NodeCount`, `VariableCount`, `Hash128 ID`, `GUID AssetGuid`
52
+ - `GetNodes()`, `GetNode(int)`, `AddNode(Node)`, `RemoveNode(INode)`
53
+ - `bool Connect(IPort output, IPort input)`, `bool Disconnect(IPort output, IPort input)`,
54
+ `Wire GetWire(IPort output, IPort input)`
55
+ - `CreateVariable<T>(name, defaultValue, VariableKind)`, `CreateVariable(name, Type, object, VariableKind)`,
56
+ `GetVariables()`, `GetVariables(SortMethod)`, `GetVariable(int)`, `RemoveVariable(IVariable, bool forceRemove)`
57
+ - `CreateConstantNode<T>(Vector2 position, T defaultValue)`,
58
+ `AddVariableNode(IVariable, Vector2 position)`, **6.7** `AddVariableNode(IVariable, Vector2, VariableNodeMode)`,
59
+ `AddSubgraphNode(Graph subgraph, Vector2)`, `CreateLocalSubgraphNode<TSubGraph>(name, Vector2)`
60
+ - `virtual OnEnable()`, `virtual OnDisable()`, `virtual OnGraphChanged(GraphLogger)`
61
+ - `UndoBeginRecordGraph(string actionName)`, **6.7** `UndoBeginRecordGraph(string actionName, params Node[] nodesToRecord)`,
62
+ `UndoEndRecordGraph()`
63
+ - `virtual bool IsConnectionAllowed(IPort output, IPort input)`
64
+ - **6.7** `SupportedTypes`, `AvailableVariableTypes`, `AvailableConstantTypes`, and the overrides
65
+ `protected virtual IEnumerable<Type> BuildAvailableVariableTypes(IReadOnlyCollection<Type> baseSupportedTypes)`
66
+ and `BuildAvailableConstantTypes(...)` to restrict the Blackboard type list
67
+ - `protected virtual OnDefineSubgraphNodeOptions(Node.IOptionDefinitionContext)`
68
+
69
+ `OnEnable` runs when the asset is created, loaded, reopened, or after a domain reload. Mutating the
70
+ graph in `OnEnable`, `OnDisable` or `OnGraphChanged` throws `InvalidOperationException`.
71
+
72
+ ## 2. Nodes
73
+
74
+ ```csharp
75
+ [Serializable]
76
+ [Node("Math/Basic", "Icons/Add.png", "Add", "Styles/AddNode.uss")] // all args after the first are optional
77
+ class AddNode : Node
78
+ {
79
+ protected override void OnDefinePorts(IPortDefinitionContext context)
80
+ {
81
+ context.AddInputPort<float>("a").Build();
82
+ context.AddInputPort<float>("b").WithDefaultValue(1f).Build();
83
+ context.AddOutputPort<float>("result").Build();
84
+ }
85
+ }
86
+ ```
87
+
88
+ `NodeAttribute(categoryPath[, iconPath[, title[, stylesheet]]])`. The category path is a folder path
89
+ in the Add menu; the node's name is appended to it, so `"Math/Basic"` lists the node under
90
+ `Math/Basic/<title>`. Icons: provide `name.png` and `d_name.png` (dark theme), 128 px or larger.
91
+
92
+ `Node` members: `Graph`, `Hash128 ID`, `Title`, `Subtitle`, `Tooltip`, `Color DefaultColor`,
93
+ `float FillAmount`, `Vector2 Position`, `RemoveFromGraph()`,
94
+ `GetInputPorts()`, `GetInputPort(int)`, `GetInputPortByName(string)`, `InputPortCount`,
95
+ `GetOutputPorts()`, `GetOutputPort(int)`, `GetOutputPortByName(string)`, `OutputPortCount`,
96
+ `NodeOptions`, `GetNodeOption(int)`, `GetNodeOptionByName(string)`, `NodeOptionCount`.
97
+
98
+ Overrides: `OnEnable()`, `OnDisable()`, `OnDefinePorts(IPortDefinitionContext)`,
99
+ `OnDefineOptions(IOptionDefinitionContext)`, **6.7** `OnPortDataTypeChanged(IPort, Type previous, Type next)`.
100
+ Set a dynamic default title in `OnEnable` with `Title = ...`.
101
+
102
+ Discovery: node classes in the graph's assembly are listed automatically unless the graph sets
103
+ `GraphOptions.DisableAutoInclusionOfNodesFromGraphAssembly`. Nodes elsewhere use
104
+ `[UseWithGraph(typeof(MyGraph), typeof(OtherGraph))]`. Abstract and open generic classes are skipped.
105
+
106
+ ## 3. Ports
107
+
108
+ `IPortDefinitionContext`:
109
+
110
+ - `IInputPortBuilder AddInputPort(string portName)`, `IInputPortBuilder<T> AddInputPort<T>(string)`
111
+ - `IOutputPortBuilder AddOutputPort(string portName)`, `IOutputPortBuilder<T> AddOutputPort<T>(string)`
112
+
113
+ Builder methods, chain then finish with `.Build()` which returns the `IPort`:
114
+
115
+ | Method | Available on | Effect |
116
+ |---|---|---|
117
+ | `WithDisplayName(string)` | all | Label shown on the node; the constructor name stays the lookup key |
118
+ | `WithTooltip(string)` | all | Hover text |
119
+ | `WithConnectorUI(PortConnectorUI.Circle | Arrowhead)` | all | Connector shape |
120
+ | `AsVertical()` | all | Top/bottom placement; labels hidden; not on block nodes |
121
+ | `WithCapacity(PortCapacity.None | Single | Multi)` | all | Max wire count |
122
+ | `WithDataType<T>()` / `WithDataType(Type)` | untyped builders | Give a type after the fact |
123
+ | **6.7** `WithDataTypes(params Type[])` / `WithDataTypes(IEnumerable<Type>)` | untyped builders | Polymorphic port that accepts any of the listed types; at least one type, duplicates ignored |
124
+ | `WithDefaultValue(T)` | typed input | Value used when unconnected; editable on the node |
125
+ | `Delayed()` | input | Commit on Enter or focus loss |
126
+ | `AsTextArea(minLines, maxLines)` | input (string) | Multi-line field |
127
+
128
+ A port built without a type has `DataType == typeof(Untyped)`; use it for execution flow.
129
+
130
+ `IPort`: `Type DataType`, `Name`, `DisplayName`, `Tooltip`, `PortDirection Direction`,
131
+ `bool IsConnected`, `IPort FirstConnectedPort`, `GetConnectedPorts(List<IPort>)`,
132
+ `bool TryGetValue<T>(out T)`, `bool TrySetValue<T>(T)`, `Hash128 ID`, and the extension
133
+ `port.GetNode()`.
134
+
135
+ `TryGetValue` returns the embedded value of an unconnected input; when connected, follow
136
+ `FirstConnectedPort.GetNode()` upstream instead.
137
+
138
+ ## 4. Node options
139
+
140
+ Options are fields shown on the node body and in the Graph Inspector.
141
+
142
+ ```csharp
143
+ const string k_Count = "Count";
144
+
145
+ protected override void OnDefineOptions(IOptionDefinitionContext context)
146
+ {
147
+ context.AddOption<int>(k_Count).WithDisplayName("Input count").WithDefaultValue(2).Delayed();
148
+ context.AddOption<Mode>("Mode").ShowInInspectorOnly();
149
+ }
150
+
151
+ protected override void OnDefinePorts(IPortDefinitionContext context)
152
+ {
153
+ GetNodeOptionByName(k_Count).TryGetValue<int>(out var count);
154
+ for (var i = 0; i < count; i++)
155
+ context.AddInputPort<float>($"in{i}").Build();
156
+ }
157
+ ```
158
+
159
+ `IOptionDefinitionContext`: `AddOption<T>(string name)`, `AddOption(string name, Type dataType)`.
160
+ Builder: `WithDisplayName`, `WithTooltip`, `WithDefaultValue`, `Delayed`, `AsTextArea`,
161
+ `ShowInInspectorOnly`, `Build()` (optional; the option is registered without it).
162
+ Option names must be unique on the node.
163
+ `INodeOption`: `DataType`, `Name`, `DisplayName`, `Tooltip`, `TryGetValue<T>`. Options are
164
+ user-edited; set the initial value with `WithDefaultValue`, not `TrySetValue`.
165
+
166
+ Ports are rebuilt whenever an option changes, so `OnDefinePorts` must be a pure function of the
167
+ option values.
168
+
169
+ ## 5. Context and block nodes
170
+
171
+ ```csharp
172
+ [Serializable] class OnUpdateContext : ContextNode { }
173
+
174
+ [Serializable]
175
+ [UseWithContext(typeof(OnUpdateContext))] // several context types allowed; derived contexts qualify
176
+ class LogBlock : BlockNode
177
+ {
178
+ protected override void OnDefinePorts(IPortDefinitionContext context)
179
+ {
180
+ context.AddInputPort<string>("Message").Build();
181
+ }
182
+ }
183
+ ```
184
+
185
+ `ContextNode`: `BlockCount`, `BlockNodes`, `GetBlock(int)`, `AddBlockNode(BlockNode)`,
186
+ `InsertBlockNode(int, BlockNode)`, `CreateBlockNode<T>(int index = -1)`, `RemoveBlockNode`,
187
+ `ClearBlockNodes()`. `BlockNode`: `ContextNode`, `Index`. Block ports are always horizontal.
188
+
189
+ ## 6. Subgraphs
190
+
191
+ - Enable with `[Graph(ext, GraphOptions.SupportsSubgraphs)]` on the main graph.
192
+ - Without further attributes the main graph type doubles as the subgraph type. To use dedicated
193
+ subgraph classes, mark each with `[Subgraph(typeof(MainGraph))]`; several are allowed and each gets
194
+ its own "Create <Name> Subgraph from Selection" action.
195
+ - Two flavours: asset subgraphs (a separate `.ext` file, `AddSubgraphNode(graph, position)`) and
196
+ local subgraphs stored inside the parent (`CreateLocalSubgraphNode<TSub>(name, position)`).
197
+ - The subgraph node's ports come from the subgraph's Blackboard variables with `VariableKind.Input`
198
+ or `VariableKind.Output`.
199
+ - `ISubgraphNode.GetSubgraph()` returns the nested `Graph`. Override
200
+ `OnDefineSubgraphNodeOptions` on the main graph to add options to subgraph nodes.
201
+
202
+ ## 7. Variables and constants
203
+
204
+ - `graph.CreateVariable<float>("Speed", 1f, VariableKind.Local)` declares a Blackboard variable.
205
+ `VariableKind`: `Local`, `Input`, `Output`.
206
+ - `IVariable`: `Name`, `DataType`, `VariableKind`, `IsConnected`, `NodeCount`, `Graph`, **6.7** `StateMachine`, `Hash128 ID`,
207
+ `TryGetDefaultValue<T>`, `TrySetDefaultValue<T>`, `GetNodes(List<IVariableNode>)`,
208
+ `RemoveFromGraph(bool forceRemove)`.
209
+ - `graph.AddVariableNode(variable, position)` drops a variable onto the canvas; `IVariableNode.Variable`.
210
+ **6.7** adds the `VariableNodeMode.Get | Set` overload and `IVariableNode.Mode`.
211
+ - `graph.CreateConstantNode<int>(position, 5)`; `IConstantNode.DataType`, `TryGetValue`, `TrySetValue`.
212
+ - **6.7** Restrict the type dropdown by overriding `BuildAvailableVariableTypes` and
213
+ `BuildAvailableConstantTypes`; `Graph.SupportedTypes` lists the defaults. On 6.6 the Blackboard
214
+ type list is not customizable from the public API.
215
+
216
+ ## 8. Validation with OnGraphChanged
217
+
218
+ ```csharp
219
+ public override void OnGraphChanged(GraphLogger logger)
220
+ {
221
+ var starts = GetNodes().OfType<StartNode>().ToList();
222
+ if (starts.Count == 0)
223
+ logger.LogError("Add a Start node."); // marker on the graph
224
+ foreach (var extra in starts.Skip(1))
225
+ logger.LogWarning("Only one Start node is used.", extra, // marker on the node
226
+ new GraphLogAction("Remove this node", n =>
227
+ {
228
+ UndoBeginRecordGraph("Remove extra Start");
229
+ RemoveNode((INode)n);
230
+ UndoEndRecordGraph();
231
+ }));
232
+
233
+ // 6.7 and newer only: the change delta. Added and modified nodes are reported; removed nodes are
234
+ // not, only removed ports are (inside ChangedPorts with ChangeKind.Removed).
235
+ foreach (var change in logger.GraphChanges.ChangedNodes)
236
+ if (change.Node is ObjectiveNode objective) { /* added or modified: check it */ }
237
+ }
238
+ ```
239
+
240
+ `GraphLogger`: `LogError`, `LogWarning`, `Log`, each as `(object message, object context = null)` or
241
+ `(message, context, GraphLogAction)`. Context may be a node, a port, or null for the whole graph.
242
+ Messages also go to the Console. `GraphLogAction(string description, Action<object> action)` shows a
243
+ fix button on the marker.
244
+
245
+ **6.7** `GraphLogger.GraphChanges` and `ChangeKind` are the change delta. They do not exist on 6.6.
246
+ The delta lists added and modified elements only; removed nodes, variables and subgraph nodes are
247
+ not reported (removed ports are, under `ChangedNode.ChangedPorts`). So on every version, detecting a
248
+ removed node means keeping a `[NonSerialized] HashSet<Hash128>` of node IDs on the graph and diffing
249
+ it against `GetNodes()` each call; on 6.6 that diff is also the only way to find additions.
250
+
251
+ `GraphChanges`: `ChangedNodes`, `ChangedVariables`, `ChangedConstantNodes`, `ChangedSubgraphNodes`.
252
+ Entry types and their element property: `ChangedNode.Node` (`INode`), `ChangedVariable.Variable`,
253
+ `ChangedConstantNode.ConstantNode`, `ChangedSubgraphNode.SubgraphNode`; each also has `Hash128 ID` and
254
+ `ChangeKind ChangeKinds`, and `ChangedNode` adds `ChangedPorts` (`ChangedPort.Port`, `ID`, `ChangeKinds`).
255
+ `ChangeKind` flags: `Layout`, `Style`, `Data`, `Topology`, `Grouping`, `Added`, `Removed`,
256
+ `PortChanged`, `RecreateView`.
257
+
258
+ ## 9. Type casting between ports
259
+
260
+ ```csharp
261
+ public override bool IsConnectionAllowed(IPort output, IPort input)
262
+ {
263
+ if (output.DataType == typeof(int) && input.DataType == typeof(float)) return true;
264
+ return base.IsConnectionAllowed(output, input);
265
+ }
266
+ ```
267
+
268
+ The graph only records that the wire exists; the importer or runtime performs the conversion.
269
+ **6.7** `IPort.TrySetDataType(Type)` and `Node.OnPortDataTypeChanged` support ports whose type follows
270
+ a connection.
271
+
272
+ ## 10. Toolbar elements
273
+
274
+ ```csharp
275
+ [GraphToolbarElement("MyTool/Bake", typeof(MyGraph), order: 200)]
276
+ class BakeButton : EditorToolbarButton, IAccessContainerWindow
277
+ {
278
+ public EditorWindow containerWindow { get; set; }
279
+
280
+ public BakeButton()
281
+ {
282
+ text = "Bake";
283
+ clicked += () =>
284
+ {
285
+ if (containerWindow is IGraphWindow window && window.Graph is MyGraph graph)
286
+ Bake(graph);
287
+ };
288
+ }
289
+ }
290
+ ```
291
+
292
+ `UnityEditor.Toolbars.EditorToolbarButton` and `EditorToolbarToggle` both work. `IGraphWindow.Graph`
293
+ gives the open graph.
294
+
295
+ ## 11. Context menus (6.7)
296
+
297
+ ```csharp
298
+ [GraphMenu(typeof(MyGraph))]
299
+ static void AddGraphMenuEntries(GraphMenuContext context)
300
+ {
301
+ if (context.ClickedObject is INode node)
302
+ context.AppendAction("Inspect node", () => Debug.Log(node.Title));
303
+ context.AppendSeparator();
304
+ }
305
+ ```
306
+
307
+ `MenuContext`: `object ClickedObject`, `Vector2 MousePosition`, `AppendAction(name, Action)`,
308
+ `AppendAction(name, Action<DropdownMenuAction>[, status callback])`, `AppendSeparator(subMenuPath)`.
309
+ `[BlackboardMenu(typeof(MyGraph))]` receives the same context for the Blackboard.
310
+
311
+ ## 12. Node look: colors, accent, USS, custom UI
312
+
313
+ - `Node.DefaultColor` sets the accent bar color; `Node.FillAmount` fills it as a progress bar.
314
+ - `[Node(category, icon, title, stylesheet)]` applies a USS file to the node's element.
315
+ - **6.7**: `class MyNodeView : NodeView<MyNode>` adds UI Toolkit elements. Allocate in
316
+ `OnViewBuilt()` and append to `View.Root`; re-add in `OnCullingChanged(false)`; never allocate in
317
+ `OnViewAttached()`, which fires repeatedly. Also `OnViewDetached`, `OnViewLODChanged(float zoom)`.
318
+ Discovery is by the generic argument, walking up the node inheritance chain.
319
+
320
+ ## 13. Wires
321
+
322
+ `graph.GetWire(output, input)` returns a `Wire` with `OutputPort`, `InputPort`, `Graph`,
323
+ `float WidthOverride`, `float Opacity`, `bool IsDashed`. These are authoring-time styles; for runtime
324
+ styling use `WireReference` in `runtime-and-visualization.md`.
@@ -0,0 +1,86 @@
1
+ # Pitfalls that survive compilation, and the ones that do not
2
+
3
+ Check every row before handing off. File paths in this document resolve to this file's folder
4
+ (`references/`); `SKILL.md` is one level up.
5
+
6
+ ## Contents
7
+
8
+ - Wrong API generation
9
+ - Discovery and menus
10
+ - Ports and options
11
+ - Lifecycle and mutation
12
+ - Serialization
13
+ - Custom UI (6.7)
14
+ - Visualization
15
+ - Importers
16
+
17
+ ## Wrong API generation
18
+
19
+ | Symptom | Cause | Fix |
20
+ |---|---|---|
21
+ | Code uses `GraphModel`, `NodeModel`, `StateModel`, `GraphObject`, `GraphTool`, `GraphViewEditorWindow`, `Stencil`, `BlackboardGraphModel`, `GraphElementsExtensionMethodsCache`, `ModelView`, or `using Unity.GraphToolkit.ItemLibrary.Editor` | Retired Graph Tools Foundation API, internal implementation, or the 2025 experimental package; none is accessible from user code | Rewrite against `Graph`, `Node`, `State`, `GraphDatabase`, `StateMachineDatabase` and the builders in `graph-api.md` |
22
+ | `using UnityEditor.Experimental.GraphView;`, `GraphView`, `Port.Create`, `Edge`, `graphViewChanged`, `NodeCreationRequest` | The older GraphView API; Graph Toolkit is not a drop-in replacement and has no hand-written view code | Model the tool as `Graph` and `Node` classes and let the window be provided; change tracking moves to `OnGraphChanged` |
23
+ | The answer tells the user to install `com.unity.graphtoolkit` | Confusion with the experimental package; the module is built in from 6000.4 and that package name is a deprecated shim | Remove the install step; check `ProjectVersion.txt` instead |
24
+ | `StateMachine`, `State`, `Condition<T>` fail to resolve on a 6000.6 project | The State Machine API is 6000.7 and newer | Tell the user; do not fake the types |
25
+
26
+ ## Discovery and menus
27
+
28
+ | Symptom | Cause | Fix |
29
+ |---|---|---|
30
+ | A node or state never appears in the Add menu | The class is `abstract`, or an open generic, or in another assembly without `[UseWithGraph]` / `[UseWithStateMachine]`, or the graph sets `DisableAutoInclusionOf...FromGraphAssembly`, or a block node lacks `[UseWithContext]` | Make the class concrete and closed, add the matching `UseWith...` attribute, or drop the flag |
31
+ | A node appears in an odd folder such as `Math/Add/Add` | `[Node("Math/Add")]` treats the whole first argument as a category path; the title is appended after it | `[Node("Math", null, "Add")]`, or set `Title` in `OnEnable` |
32
+ | A base node type the user never meant to expose is listed | It is concrete | Mark shared base classes `abstract` |
33
+
34
+ ## Ports and options
35
+
36
+ | Symptom | Cause | Fix |
37
+ |---|---|---|
38
+ | A port is defined but nothing shows on the node | The builder chain lacks `.Build()` | End every chain with `.Build()` |
39
+ | `GetInputPortByName` or `GetNodeOptionByName` returns the wrong element | Two ports, or two options, share a name; names are lookup keys | Give every port and option a unique name |
40
+ | Ports rebuild on every keystroke of an integer option; typing "12" flashes 1 then 12 inputs | The option commits on each character | `.Delayed()` on the option |
41
+ | `GetNodeOptionByName(...)` returns null inside `OnDefinePorts` | The name differs from the one in `OnDefineOptions`, or the option is defined after it is read | Share a `const` for the name and define options before ports read them |
42
+ | `TryGetValue` on a connected input returns the stale embedded value | `TryGetValue` reads the node's own field, not the wire | When `IsConnected`, follow `FirstConnectedPort.GetNode()` upstream |
43
+ | Designers connect several wires to a port meant for one | Ports accept multiple wires by default | `.WithCapacity(PortCapacity.Single)` |
44
+ | `AsVertical()` has no effect | The node is a `BlockNode`; block ports are always horizontal | Keep block ports horizontal, or use a regular node |
45
+
46
+ ## Lifecycle and mutation
47
+
48
+ | Symptom | Cause | Fix |
49
+ |---|---|---|
50
+ | `InvalidOperationException: Cannot change the graph in OnEnable, OnDisable and OnGraphChanged` | Graph mutation inside a locked callback | Move the mutation to a menu item, toolbar button, `GraphLogAction` or importer, wrapped in `UndoBeginRecordGraph` / `UndoEndRecordGraph` |
51
+ | Programmatic edits vanish on reopen | `GraphDatabase.SaveGraph` was not called, or `LoadGraph` was used inside an importer | Call `SaveGraph` after editing; use `LoadGraphForImporter` in importers |
52
+ | Undo history is polluted or Ctrl+Z does nothing after a generator ran | Missing `UndoBeginRecordGraph` / `UndoEndRecordGraph` pair | Bracket the whole batch in one pair |
53
+ | `OnEnable` runs several times | Expected: it fires on load, reopen and domain reload | Keep `OnEnable` idempotent |
54
+
55
+ ## Serialization
56
+
57
+ | Symptom | Cause | Fix |
58
+ |---|---|---|
59
+ | Nodes disappear or reset after reopening the asset or a domain reload | A node, state, condition or self transition class lacks `[Serializable]`, or a graph field is not serializable | Add `[Serializable]` to every authoring class; use serializable field types |
60
+ | Compile error on a class declaration decorated with `[SerializeReference]` | `SerializeReference` is a field attribute | Classes take `[Serializable]`; use `[SerializeReference]` only on polymorphic fields in the runtime data model |
61
+ | `OnEnable` override on a `Condition` does not compile | `Condition` has no lifecycle callbacks; only `Graph`, `StateMachine`, `Node`, `State` and `SelfTransition` expose `OnEnable` / `OnDisable` | Remove the override; initialise in the condition's field initialisers or view |
62
+ | A field on a state machine that must not persist is written to the asset | Serializable fields on the class are saved | `[NonSerialized]` on the field, or `[field: NonSerialized]` on the property |
63
+ | Build errors about `Unity.GraphToolkit.Editor` in the player | Authoring types referenced from a runtime assembly | Move them to an Editor assembly; guard visualization code with `#if UNITY_EDITOR` |
64
+
65
+ ## Custom UI (6.7)
66
+
67
+ | Symptom | Cause | Fix |
68
+ |---|---|---|
69
+ | Duplicated labels or buttons accumulate on a node or state | UI allocated in `OnViewAttached`, which fires on every re-attach | Allocate in `OnViewBuilt`, cache, and re-add in `OnCullingChanged(false)` |
70
+ | The custom element disappears after zooming far out and back | Culling clears `Root` | Re-add the cached element in `OnCullingChanged(false)` |
71
+ | Built-in condition row fields missing or misplaced | The `ConditionView<T>` removed or reparented them | Only append to `Root`; hide built-ins with `DisplayValueField` / `DisplayTitleLabel` |
72
+
73
+ ## Visualization
74
+
75
+ | Symptom | Cause | Fix |
76
+ |---|---|---|
77
+ | `Motion.Play` and previews do nothing | The context was created with the runtime asset's own ID instead of the authored `Graph.ID`; or the graph window is not open (`IsGraphLoaded` is false); or the `*Enabled` toggle is off; or the context was disposed | Create the context with `Graph.ID`, check `IsValid` and `IsGraphLoaded`, and keep the toggles on while running |
78
+ | Previews from the previous step stay on screen | Previews persist until cleared | `ClearPreview()` when leaving a node, or `ClearAllVisualization()` at run end |
79
+
80
+ ## Importers
81
+
82
+ | Symptom | Cause | Fix |
83
+ |---|---|---|
84
+ | The `.ext` asset shows as a generic Graph Toolkit asset instead of the runtime type | `ctx.SetMainObject(runtime)` missing | Call `SetMainObject` after `AddObjectToAsset` |
85
+ | Importer changes have no effect on existing assets | Import results are cached per importer version | Bump the `ScriptedImporter` version number, or reimport |
86
+ | Importer throws on an empty graph | No entry node to start from | Return early when the entry node is missing; `OnGraphChanged` already reports it |