moai-adk 0.35.1__py3-none-any.whl

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.

Potentially problematic release.


This version of moai-adk might be problematic. Click here for more details.

Files changed (502) hide show
  1. moai_adk/__init__.py +10 -0
  2. moai_adk/__main__.py +199 -0
  3. moai_adk/cli/__init__.py +6 -0
  4. moai_adk/cli/commands/__init__.py +17 -0
  5. moai_adk/cli/commands/analyze.py +116 -0
  6. moai_adk/cli/commands/doctor.py +272 -0
  7. moai_adk/cli/commands/init.py +372 -0
  8. moai_adk/cli/commands/language.py +248 -0
  9. moai_adk/cli/commands/status.py +104 -0
  10. moai_adk/cli/commands/update.py +2686 -0
  11. moai_adk/cli/main.py +13 -0
  12. moai_adk/cli/prompts/__init__.py +5 -0
  13. moai_adk/cli/prompts/init_prompts.py +219 -0
  14. moai_adk/cli/spec_status.py +263 -0
  15. moai_adk/cli/ui/__init__.py +44 -0
  16. moai_adk/cli/ui/progress.py +422 -0
  17. moai_adk/cli/ui/prompts.py +389 -0
  18. moai_adk/cli/ui/theme.py +129 -0
  19. moai_adk/cli/worktree/__init__.py +27 -0
  20. moai_adk/cli/worktree/__main__.py +31 -0
  21. moai_adk/cli/worktree/cli.py +683 -0
  22. moai_adk/cli/worktree/exceptions.py +89 -0
  23. moai_adk/cli/worktree/manager.py +493 -0
  24. moai_adk/cli/worktree/models.py +65 -0
  25. moai_adk/cli/worktree/registry.py +422 -0
  26. moai_adk/core/PHASE2_OPTIMIZATIONS.md +467 -0
  27. moai_adk/core/__init__.py +1 -0
  28. moai_adk/core/analysis/__init__.py +9 -0
  29. moai_adk/core/analysis/session_analyzer.py +400 -0
  30. moai_adk/core/claude_integration.py +393 -0
  31. moai_adk/core/command_helpers.py +270 -0
  32. moai_adk/core/comprehensive_monitoring_system.py +1183 -0
  33. moai_adk/core/config/__init__.py +19 -0
  34. moai_adk/core/config/auto_spec_config.py +340 -0
  35. moai_adk/core/config/migration.py +244 -0
  36. moai_adk/core/config/unified.py +436 -0
  37. moai_adk/core/context_manager.py +273 -0
  38. moai_adk/core/diagnostics/__init__.py +19 -0
  39. moai_adk/core/diagnostics/slash_commands.py +159 -0
  40. moai_adk/core/enterprise_features.py +1404 -0
  41. moai_adk/core/error_recovery_system.py +1902 -0
  42. moai_adk/core/event_driven_hook_system.py +1371 -0
  43. moai_adk/core/git/__init__.py +31 -0
  44. moai_adk/core/git/branch.py +25 -0
  45. moai_adk/core/git/branch_manager.py +129 -0
  46. moai_adk/core/git/checkpoint.py +134 -0
  47. moai_adk/core/git/commit.py +67 -0
  48. moai_adk/core/git/conflict_detector.py +413 -0
  49. moai_adk/core/git/event_detector.py +79 -0
  50. moai_adk/core/git/manager.py +216 -0
  51. moai_adk/core/hooks/post_tool_auto_spec_completion.py +901 -0
  52. moai_adk/core/input_validation_middleware.py +1006 -0
  53. moai_adk/core/integration/__init__.py +22 -0
  54. moai_adk/core/integration/engine.py +157 -0
  55. moai_adk/core/integration/integration_tester.py +226 -0
  56. moai_adk/core/integration/models.py +88 -0
  57. moai_adk/core/integration/utils.py +211 -0
  58. moai_adk/core/issue_creator.py +305 -0
  59. moai_adk/core/jit_context_loader.py +956 -0
  60. moai_adk/core/jit_enhanced_hook_manager.py +1987 -0
  61. moai_adk/core/language_config.py +202 -0
  62. moai_adk/core/language_config_resolver.py +572 -0
  63. moai_adk/core/language_validator.py +543 -0
  64. moai_adk/core/mcp/setup.py +116 -0
  65. moai_adk/core/merge/__init__.py +9 -0
  66. moai_adk/core/merge/analyzer.py +605 -0
  67. moai_adk/core/migration/__init__.py +18 -0
  68. moai_adk/core/migration/alfred_to_moai_migrator.py +383 -0
  69. moai_adk/core/migration/backup_manager.py +277 -0
  70. moai_adk/core/migration/custom_element_scanner.py +358 -0
  71. moai_adk/core/migration/file_migrator.py +209 -0
  72. moai_adk/core/migration/interactive_checkbox_ui.py +488 -0
  73. moai_adk/core/migration/selective_restorer.py +470 -0
  74. moai_adk/core/migration/template_utils.py +74 -0
  75. moai_adk/core/migration/user_selection_ui.py +338 -0
  76. moai_adk/core/migration/version_detector.py +139 -0
  77. moai_adk/core/migration/version_migrator.py +228 -0
  78. moai_adk/core/performance/__init__.py +6 -0
  79. moai_adk/core/performance/cache_system.py +316 -0
  80. moai_adk/core/performance/parallel_processor.py +116 -0
  81. moai_adk/core/phase_optimized_hook_scheduler.py +879 -0
  82. moai_adk/core/project/__init__.py +1 -0
  83. moai_adk/core/project/backup_utils.py +70 -0
  84. moai_adk/core/project/checker.py +300 -0
  85. moai_adk/core/project/detector.py +293 -0
  86. moai_adk/core/project/initializer.py +387 -0
  87. moai_adk/core/project/phase_executor.py +716 -0
  88. moai_adk/core/project/validator.py +139 -0
  89. moai_adk/core/quality/__init__.py +6 -0
  90. moai_adk/core/quality/trust_checker.py +377 -0
  91. moai_adk/core/quality/validators/__init__.py +6 -0
  92. moai_adk/core/quality/validators/base_validator.py +19 -0
  93. moai_adk/core/realtime_monitoring_dashboard.py +1724 -0
  94. moai_adk/core/robust_json_parser.py +611 -0
  95. moai_adk/core/rollback_manager.py +918 -0
  96. moai_adk/core/session_manager.py +651 -0
  97. moai_adk/core/skill_loading_system.py +579 -0
  98. moai_adk/core/spec/confidence_scoring.py +680 -0
  99. moai_adk/core/spec/ears_template_engine.py +1247 -0
  100. moai_adk/core/spec/quality_validator.py +687 -0
  101. moai_adk/core/spec_status_manager.py +478 -0
  102. moai_adk/core/template/__init__.py +7 -0
  103. moai_adk/core/template/backup.py +174 -0
  104. moai_adk/core/template/config.py +191 -0
  105. moai_adk/core/template/languages.py +43 -0
  106. moai_adk/core/template/merger.py +233 -0
  107. moai_adk/core/template/processor.py +1200 -0
  108. moai_adk/core/template_engine.py +310 -0
  109. moai_adk/core/template_variable_synchronizer.py +417 -0
  110. moai_adk/core/unified_permission_manager.py +745 -0
  111. moai_adk/core/user_behavior_analytics.py +851 -0
  112. moai_adk/core/version_sync.py +429 -0
  113. moai_adk/foundation/__init__.py +56 -0
  114. moai_adk/foundation/backend.py +1027 -0
  115. moai_adk/foundation/database.py +1115 -0
  116. moai_adk/foundation/devops.py +1585 -0
  117. moai_adk/foundation/ears.py +431 -0
  118. moai_adk/foundation/frontend.py +870 -0
  119. moai_adk/foundation/git/commit_templates.py +557 -0
  120. moai_adk/foundation/git.py +376 -0
  121. moai_adk/foundation/langs.py +484 -0
  122. moai_adk/foundation/ml_ops.py +1162 -0
  123. moai_adk/foundation/testing.py +1524 -0
  124. moai_adk/foundation/trust/trust_principles.py +676 -0
  125. moai_adk/foundation/trust/validation_checklist.py +1573 -0
  126. moai_adk/project/__init__.py +0 -0
  127. moai_adk/project/configuration.py +1084 -0
  128. moai_adk/project/documentation.py +566 -0
  129. moai_adk/project/schema.py +447 -0
  130. moai_adk/statusline/__init__.py +38 -0
  131. moai_adk/statusline/alfred_detector.py +105 -0
  132. moai_adk/statusline/config.py +376 -0
  133. moai_adk/statusline/enhanced_output_style_detector.py +372 -0
  134. moai_adk/statusline/git_collector.py +190 -0
  135. moai_adk/statusline/main.py +322 -0
  136. moai_adk/statusline/metrics_tracker.py +78 -0
  137. moai_adk/statusline/renderer.py +343 -0
  138. moai_adk/statusline/update_checker.py +129 -0
  139. moai_adk/statusline/version_reader.py +741 -0
  140. moai_adk/templates/.claude/agents/moai/ai-nano-banana.md +714 -0
  141. moai_adk/templates/.claude/agents/moai/builder-agent.md +474 -0
  142. moai_adk/templates/.claude/agents/moai/builder-command.md +1172 -0
  143. moai_adk/templates/.claude/agents/moai/builder-plugin.md +637 -0
  144. moai_adk/templates/.claude/agents/moai/builder-skill.md +666 -0
  145. moai_adk/templates/.claude/agents/moai/expert-backend.md +899 -0
  146. moai_adk/templates/.claude/agents/moai/expert-database.md +777 -0
  147. moai_adk/templates/.claude/agents/moai/expert-debug.md +401 -0
  148. moai_adk/templates/.claude/agents/moai/expert-devops.md +720 -0
  149. moai_adk/templates/.claude/agents/moai/expert-frontend.md +734 -0
  150. moai_adk/templates/.claude/agents/moai/expert-performance.md +657 -0
  151. moai_adk/templates/.claude/agents/moai/expert-security.md +513 -0
  152. moai_adk/templates/.claude/agents/moai/expert-testing.md +733 -0
  153. moai_adk/templates/.claude/agents/moai/expert-uiux.md +1041 -0
  154. moai_adk/templates/.claude/agents/moai/manager-claude-code.md +432 -0
  155. moai_adk/templates/.claude/agents/moai/manager-docs.md +573 -0
  156. moai_adk/templates/.claude/agents/moai/manager-git.md +1060 -0
  157. moai_adk/templates/.claude/agents/moai/manager-project.md +891 -0
  158. moai_adk/templates/.claude/agents/moai/manager-quality.md +624 -0
  159. moai_adk/templates/.claude/agents/moai/manager-spec.md +809 -0
  160. moai_adk/templates/.claude/agents/moai/manager-strategy.md +780 -0
  161. moai_adk/templates/.claude/agents/moai/manager-tdd.md +784 -0
  162. moai_adk/templates/.claude/agents/moai/mcp-context7.md +458 -0
  163. moai_adk/templates/.claude/agents/moai/mcp-figma.md +1607 -0
  164. moai_adk/templates/.claude/agents/moai/mcp-notion.md +789 -0
  165. moai_adk/templates/.claude/agents/moai/mcp-playwright.md +469 -0
  166. moai_adk/templates/.claude/agents/moai/mcp-sequential-thinking.md +1032 -0
  167. moai_adk/templates/.claude/commands/moai/0-project.md +1386 -0
  168. moai_adk/templates/.claude/commands/moai/1-plan.md +1427 -0
  169. moai_adk/templates/.claude/commands/moai/2-run.md +943 -0
  170. moai_adk/templates/.claude/commands/moai/3-sync.md +1324 -0
  171. moai_adk/templates/.claude/commands/moai/9-feedback.md +314 -0
  172. moai_adk/templates/.claude/hooks/__init__.py +8 -0
  173. moai_adk/templates/.claude/hooks/moai/__init__.py +8 -0
  174. moai_adk/templates/.claude/hooks/moai/lib/__init__.py +85 -0
  175. moai_adk/templates/.claude/hooks/moai/lib/checkpoint.py +244 -0
  176. moai_adk/templates/.claude/hooks/moai/lib/common.py +131 -0
  177. moai_adk/templates/.claude/hooks/moai/lib/config_manager.py +446 -0
  178. moai_adk/templates/.claude/hooks/moai/lib/config_validator.py +639 -0
  179. moai_adk/templates/.claude/hooks/moai/lib/example_config.json +104 -0
  180. moai_adk/templates/.claude/hooks/moai/lib/git_operations_manager.py +590 -0
  181. moai_adk/templates/.claude/hooks/moai/lib/language_validator.py +317 -0
  182. moai_adk/templates/.claude/hooks/moai/lib/models.py +102 -0
  183. moai_adk/templates/.claude/hooks/moai/lib/path_utils.py +28 -0
  184. moai_adk/templates/.claude/hooks/moai/lib/project.py +768 -0
  185. moai_adk/templates/.claude/hooks/moai/lib/test_hooks_improvements.py +443 -0
  186. moai_adk/templates/.claude/hooks/moai/lib/timeout.py +160 -0
  187. moai_adk/templates/.claude/hooks/moai/lib/unified_timeout_manager.py +530 -0
  188. moai_adk/templates/.claude/hooks/moai/session_end__auto_cleanup.py +862 -0
  189. moai_adk/templates/.claude/hooks/moai/session_start__show_project_info.py +1083 -0
  190. moai_adk/templates/.claude/output-styles/moai/r2d2.md +560 -0
  191. moai_adk/templates/.claude/output-styles/moai/yoda.md +359 -0
  192. moai_adk/templates/.claude/settings.json +172 -0
  193. moai_adk/templates/.claude/skills/moai-ai-nano-banana/SKILL.md +307 -0
  194. moai_adk/templates/.claude/skills/moai-ai-nano-banana/examples.md +431 -0
  195. moai_adk/templates/.claude/skills/moai-ai-nano-banana/scripts/batch_generate.py +560 -0
  196. moai_adk/templates/.claude/skills/moai-ai-nano-banana/scripts/generate_image.py +362 -0
  197. moai_adk/templates/.claude/skills/moai-docs-generation/SKILL.md +249 -0
  198. moai_adk/templates/.claude/skills/moai-docs-generation/examples.md +406 -0
  199. moai_adk/templates/.claude/skills/moai-docs-generation/modules/README.md +44 -0
  200. moai_adk/templates/.claude/skills/moai-docs-generation/modules/api-documentation.md +130 -0
  201. moai_adk/templates/.claude/skills/moai-docs-generation/modules/code-documentation.md +152 -0
  202. moai_adk/templates/.claude/skills/moai-docs-generation/modules/multi-format-output.md +178 -0
  203. moai_adk/templates/.claude/skills/moai-docs-generation/modules/user-guides.md +147 -0
  204. moai_adk/templates/.claude/skills/moai-docs-generation/reference.md +328 -0
  205. moai_adk/templates/.claude/skills/moai-domain-backend/SKILL.md +320 -0
  206. moai_adk/templates/.claude/skills/moai-domain-backend/examples.md +718 -0
  207. moai_adk/templates/.claude/skills/moai-domain-backend/reference.md +464 -0
  208. moai_adk/templates/.claude/skills/moai-domain-database/SKILL.md +323 -0
  209. moai_adk/templates/.claude/skills/moai-domain-database/examples.md +830 -0
  210. moai_adk/templates/.claude/skills/moai-domain-database/modules/README.md +53 -0
  211. moai_adk/templates/.claude/skills/moai-domain-database/modules/mongodb.md +231 -0
  212. moai_adk/templates/.claude/skills/moai-domain-database/modules/postgresql.md +169 -0
  213. moai_adk/templates/.claude/skills/moai-domain-database/modules/redis.md +262 -0
  214. moai_adk/templates/.claude/skills/moai-domain-database/reference.md +545 -0
  215. moai_adk/templates/.claude/skills/moai-domain-frontend/SKILL.md +497 -0
  216. moai_adk/templates/.claude/skills/moai-domain-frontend/examples.md +968 -0
  217. moai_adk/templates/.claude/skills/moai-domain-frontend/reference.md +664 -0
  218. moai_adk/templates/.claude/skills/moai-domain-uiux/SKILL.md +455 -0
  219. moai_adk/templates/.claude/skills/moai-domain-uiux/examples.md +560 -0
  220. moai_adk/templates/.claude/skills/moai-domain-uiux/modules/accessibility-wcag.md +260 -0
  221. moai_adk/templates/.claude/skills/moai-domain-uiux/modules/component-architecture.md +228 -0
  222. moai_adk/templates/.claude/skills/moai-domain-uiux/modules/icon-libraries.md +401 -0
  223. moai_adk/templates/.claude/skills/moai-domain-uiux/modules/theming-system.md +373 -0
  224. moai_adk/templates/.claude/skills/moai-domain-uiux/reference.md +243 -0
  225. moai_adk/templates/.claude/skills/moai-formats-data/SKILL.md +492 -0
  226. moai_adk/templates/.claude/skills/moai-formats-data/examples.md +804 -0
  227. moai_adk/templates/.claude/skills/moai-formats-data/modules/README.md +98 -0
  228. moai_adk/templates/.claude/skills/moai-formats-data/modules/SKILL-MODULARIZATION-TEMPLATE.md +278 -0
  229. moai_adk/templates/.claude/skills/moai-formats-data/modules/caching-performance.md +459 -0
  230. moai_adk/templates/.claude/skills/moai-formats-data/modules/data-validation.md +485 -0
  231. moai_adk/templates/.claude/skills/moai-formats-data/modules/json-optimization.md +374 -0
  232. moai_adk/templates/.claude/skills/moai-formats-data/modules/toon-encoding.md +308 -0
  233. moai_adk/templates/.claude/skills/moai-formats-data/reference.md +585 -0
  234. moai_adk/templates/.claude/skills/moai-foundation-claude/SKILL.md +202 -0
  235. moai_adk/templates/.claude/skills/moai-foundation-claude/examples.md +732 -0
  236. moai_adk/templates/.claude/skills/moai-foundation-claude/reference/best-practices-checklist.md +616 -0
  237. moai_adk/templates/.claude/skills/moai-foundation-claude/reference/claude-code-custom-slash-commands-official.md +729 -0
  238. moai_adk/templates/.claude/skills/moai-foundation-claude/reference/claude-code-hooks-official.md +560 -0
  239. moai_adk/templates/.claude/skills/moai-foundation-claude/reference/claude-code-iam-official.md +635 -0
  240. moai_adk/templates/.claude/skills/moai-foundation-claude/reference/claude-code-memory-official.md +543 -0
  241. moai_adk/templates/.claude/skills/moai-foundation-claude/reference/claude-code-settings-official.md +663 -0
  242. moai_adk/templates/.claude/skills/moai-foundation-claude/reference/claude-code-skills-official.md +113 -0
  243. moai_adk/templates/.claude/skills/moai-foundation-claude/reference/claude-code-sub-agents-official.md +238 -0
  244. moai_adk/templates/.claude/skills/moai-foundation-claude/reference/complete-configuration-guide.md +175 -0
  245. moai_adk/templates/.claude/skills/moai-foundation-claude/reference/skill-examples.md +1674 -0
  246. moai_adk/templates/.claude/skills/moai-foundation-claude/reference/skill-formatting-guide.md +729 -0
  247. moai_adk/templates/.claude/skills/moai-foundation-claude/reference/sub-agents/sub-agent-examples.md +1513 -0
  248. moai_adk/templates/.claude/skills/moai-foundation-claude/reference/sub-agents/sub-agent-formatting-guide.md +1086 -0
  249. moai_adk/templates/.claude/skills/moai-foundation-claude/reference/sub-agents/sub-agent-integration-patterns.md +1100 -0
  250. moai_adk/templates/.claude/skills/moai-foundation-claude/reference.md +209 -0
  251. moai_adk/templates/.claude/skills/moai-foundation-context/SKILL.md +441 -0
  252. moai_adk/templates/.claude/skills/moai-foundation-context/examples.md +1048 -0
  253. moai_adk/templates/.claude/skills/moai-foundation-context/reference.md +246 -0
  254. moai_adk/templates/.claude/skills/moai-foundation-core/SKILL.md +420 -0
  255. moai_adk/templates/.claude/skills/moai-foundation-core/examples.md +358 -0
  256. moai_adk/templates/.claude/skills/moai-foundation-core/modules/README.md +296 -0
  257. moai_adk/templates/.claude/skills/moai-foundation-core/modules/agents-reference.md +359 -0
  258. moai_adk/templates/.claude/skills/moai-foundation-core/modules/commands-reference.md +432 -0
  259. moai_adk/templates/.claude/skills/moai-foundation-core/modules/delegation-patterns.md +757 -0
  260. moai_adk/templates/.claude/skills/moai-foundation-core/modules/execution-rules.md +687 -0
  261. moai_adk/templates/.claude/skills/moai-foundation-core/modules/modular-system.md +665 -0
  262. moai_adk/templates/.claude/skills/moai-foundation-core/modules/progressive-disclosure.md +649 -0
  263. moai_adk/templates/.claude/skills/moai-foundation-core/modules/spec-first-tdd.md +864 -0
  264. moai_adk/templates/.claude/skills/moai-foundation-core/modules/token-optimization.md +708 -0
  265. moai_adk/templates/.claude/skills/moai-foundation-core/modules/trust-5-framework.md +981 -0
  266. moai_adk/templates/.claude/skills/moai-foundation-core/reference.md +478 -0
  267. moai_adk/templates/.claude/skills/moai-foundation-philosopher/SKILL.md +315 -0
  268. moai_adk/templates/.claude/skills/moai-foundation-philosopher/examples.md +228 -0
  269. moai_adk/templates/.claude/skills/moai-foundation-philosopher/modules/assumption-matrix.md +80 -0
  270. moai_adk/templates/.claude/skills/moai-foundation-philosopher/modules/cognitive-bias.md +199 -0
  271. moai_adk/templates/.claude/skills/moai-foundation-philosopher/modules/first-principles.md +140 -0
  272. moai_adk/templates/.claude/skills/moai-foundation-philosopher/modules/trade-off-analysis.md +154 -0
  273. moai_adk/templates/.claude/skills/moai-foundation-philosopher/reference.md +157 -0
  274. moai_adk/templates/.claude/skills/moai-foundation-quality/SKILL.md +364 -0
  275. moai_adk/templates/.claude/skills/moai-foundation-quality/examples.md +1232 -0
  276. moai_adk/templates/.claude/skills/moai-foundation-quality/modules/best-practices.md +261 -0
  277. moai_adk/templates/.claude/skills/moai-foundation-quality/modules/integration-patterns.md +194 -0
  278. moai_adk/templates/.claude/skills/moai-foundation-quality/modules/proactive-analysis.md +229 -0
  279. moai_adk/templates/.claude/skills/moai-foundation-quality/modules/trust5-validation.md +169 -0
  280. moai_adk/templates/.claude/skills/moai-foundation-quality/reference.md +1266 -0
  281. moai_adk/templates/.claude/skills/moai-foundation-quality/scripts/quality-gate.sh +668 -0
  282. moai_adk/templates/.claude/skills/moai-foundation-quality/templates/github-actions-quality.yml +481 -0
  283. moai_adk/templates/.claude/skills/moai-foundation-quality/templates/quality-config.yaml +519 -0
  284. moai_adk/templates/.claude/skills/moai-lang-cpp/SKILL.md +649 -0
  285. moai_adk/templates/.claude/skills/moai-lang-csharp/SKILL.md +478 -0
  286. moai_adk/templates/.claude/skills/moai-lang-elixir/SKILL.md +612 -0
  287. moai_adk/templates/.claude/skills/moai-lang-flutter/SKILL.md +477 -0
  288. moai_adk/templates/.claude/skills/moai-lang-flutter/examples.md +1090 -0
  289. moai_adk/templates/.claude/skills/moai-lang-flutter/reference.md +686 -0
  290. moai_adk/templates/.claude/skills/moai-lang-go/SKILL.md +376 -0
  291. moai_adk/templates/.claude/skills/moai-lang-go/examples.md +919 -0
  292. moai_adk/templates/.claude/skills/moai-lang-go/reference.md +737 -0
  293. moai_adk/templates/.claude/skills/moai-lang-java/SKILL.md +385 -0
  294. moai_adk/templates/.claude/skills/moai-lang-java/examples.md +864 -0
  295. moai_adk/templates/.claude/skills/moai-lang-java/reference.md +291 -0
  296. moai_adk/templates/.claude/skills/moai-lang-kotlin/SKILL.md +382 -0
  297. moai_adk/templates/.claude/skills/moai-lang-kotlin/examples.md +1006 -0
  298. moai_adk/templates/.claude/skills/moai-lang-kotlin/reference.md +562 -0
  299. moai_adk/templates/.claude/skills/moai-lang-php/SKILL.md +644 -0
  300. moai_adk/templates/.claude/skills/moai-lang-python/SKILL.md +481 -0
  301. moai_adk/templates/.claude/skills/moai-lang-python/examples.md +977 -0
  302. moai_adk/templates/.claude/skills/moai-lang-python/reference.md +804 -0
  303. moai_adk/templates/.claude/skills/moai-lang-r/SKILL.md +579 -0
  304. moai_adk/templates/.claude/skills/moai-lang-ruby/SKILL.md +687 -0
  305. moai_adk/templates/.claude/skills/moai-lang-rust/SKILL.md +372 -0
  306. moai_adk/templates/.claude/skills/moai-lang-rust/examples.md +659 -0
  307. moai_adk/templates/.claude/skills/moai-lang-rust/reference.md +504 -0
  308. moai_adk/templates/.claude/skills/moai-lang-scala/SKILL.md +497 -0
  309. moai_adk/templates/.claude/skills/moai-lang-scala/examples.md +633 -0
  310. moai_adk/templates/.claude/skills/moai-lang-scala/reference.md +423 -0
  311. moai_adk/templates/.claude/skills/moai-lang-swift/SKILL.md +497 -0
  312. moai_adk/templates/.claude/skills/moai-lang-swift/examples.md +918 -0
  313. moai_adk/templates/.claude/skills/moai-lang-swift/reference.md +672 -0
  314. moai_adk/templates/.claude/skills/moai-lang-typescript/SKILL.md +368 -0
  315. moai_adk/templates/.claude/skills/moai-lang-typescript/examples.md +1089 -0
  316. moai_adk/templates/.claude/skills/moai-lang-typescript/reference.md +731 -0
  317. moai_adk/templates/.claude/skills/moai-library-mermaid/SKILL.md +300 -0
  318. moai_adk/templates/.claude/skills/moai-library-mermaid/advanced-patterns.md +465 -0
  319. moai_adk/templates/.claude/skills/moai-library-mermaid/examples.md +270 -0
  320. moai_adk/templates/.claude/skills/moai-library-mermaid/optimization.md +440 -0
  321. moai_adk/templates/.claude/skills/moai-library-mermaid/reference.md +228 -0
  322. moai_adk/templates/.claude/skills/moai-library-nextra/SKILL.md +319 -0
  323. moai_adk/templates/.claude/skills/moai-library-nextra/advanced-patterns.md +336 -0
  324. moai_adk/templates/.claude/skills/moai-library-nextra/examples.md +592 -0
  325. moai_adk/templates/.claude/skills/moai-library-nextra/modules/advanced-deployment-patterns.md +182 -0
  326. moai_adk/templates/.claude/skills/moai-library-nextra/modules/advanced-patterns.md +17 -0
  327. moai_adk/templates/.claude/skills/moai-library-nextra/modules/configuration.md +57 -0
  328. moai_adk/templates/.claude/skills/moai-library-nextra/modules/content-architecture-optimization.md +162 -0
  329. moai_adk/templates/.claude/skills/moai-library-nextra/modules/deployment.md +52 -0
  330. moai_adk/templates/.claude/skills/moai-library-nextra/modules/framework-core-configuration.md +186 -0
  331. moai_adk/templates/.claude/skills/moai-library-nextra/modules/i18n-setup.md +55 -0
  332. moai_adk/templates/.claude/skills/moai-library-nextra/modules/mdx-components.md +52 -0
  333. moai_adk/templates/.claude/skills/moai-library-nextra/optimization.md +303 -0
  334. moai_adk/templates/.claude/skills/moai-library-nextra/reference.md +379 -0
  335. moai_adk/templates/.claude/skills/moai-library-shadcn/SKILL.md +372 -0
  336. moai_adk/templates/.claude/skills/moai-library-shadcn/examples.md +575 -0
  337. moai_adk/templates/.claude/skills/moai-library-shadcn/modules/advanced-patterns.md +394 -0
  338. moai_adk/templates/.claude/skills/moai-library-shadcn/modules/optimization.md +278 -0
  339. moai_adk/templates/.claude/skills/moai-library-shadcn/modules/shadcn-components.md +457 -0
  340. moai_adk/templates/.claude/skills/moai-library-shadcn/modules/shadcn-theming.md +373 -0
  341. moai_adk/templates/.claude/skills/moai-library-shadcn/reference.md +74 -0
  342. moai_adk/templates/.claude/skills/moai-mcp-figma/SKILL.md +402 -0
  343. moai_adk/templates/.claude/skills/moai-mcp-figma/advanced-patterns.md +607 -0
  344. moai_adk/templates/.claude/skills/moai-mcp-notion/SKILL.md +300 -0
  345. moai_adk/templates/.claude/skills/moai-mcp-notion/advanced-patterns.md +537 -0
  346. moai_adk/templates/.claude/skills/moai-platform-auth0/SKILL.md +291 -0
  347. moai_adk/templates/.claude/skills/moai-platform-clerk/SKILL.md +390 -0
  348. moai_adk/templates/.claude/skills/moai-platform-convex/SKILL.md +398 -0
  349. moai_adk/templates/.claude/skills/moai-platform-firebase-auth/SKILL.md +379 -0
  350. moai_adk/templates/.claude/skills/moai-platform-firestore/SKILL.md +358 -0
  351. moai_adk/templates/.claude/skills/moai-platform-neon/SKILL.md +467 -0
  352. moai_adk/templates/.claude/skills/moai-platform-railway/SKILL.md +377 -0
  353. moai_adk/templates/.claude/skills/moai-platform-supabase/SKILL.md +466 -0
  354. moai_adk/templates/.claude/skills/moai-platform-vercel/SKILL.md +482 -0
  355. moai_adk/templates/.claude/skills/moai-plugin-builder/SKILL.md +474 -0
  356. moai_adk/templates/.claude/skills/moai-plugin-builder/examples.md +621 -0
  357. moai_adk/templates/.claude/skills/moai-plugin-builder/migration.md +341 -0
  358. moai_adk/templates/.claude/skills/moai-plugin-builder/reference.md +463 -0
  359. moai_adk/templates/.claude/skills/moai-plugin-builder/validation.md +373 -0
  360. moai_adk/templates/.claude/skills/moai-security-auth0/SKILL.md +275 -0
  361. moai_adk/templates/.claude/skills/moai-security-auth0/modules/adaptive-mfa.md +233 -0
  362. moai_adk/templates/.claude/skills/moai-security-auth0/modules/akamai-integration.md +215 -0
  363. moai_adk/templates/.claude/skills/moai-security-auth0/modules/application-credentials.md +280 -0
  364. moai_adk/templates/.claude/skills/moai-security-auth0/modules/attack-protection-log-events.md +225 -0
  365. moai_adk/templates/.claude/skills/moai-security-auth0/modules/attack-protection-overview.md +140 -0
  366. moai_adk/templates/.claude/skills/moai-security-auth0/modules/bot-detection.md +144 -0
  367. moai_adk/templates/.claude/skills/moai-security-auth0/modules/breached-password-detection.md +187 -0
  368. moai_adk/templates/.claude/skills/moai-security-auth0/modules/brute-force-protection.md +189 -0
  369. moai_adk/templates/.claude/skills/moai-security-auth0/modules/certifications.md +282 -0
  370. moai_adk/templates/.claude/skills/moai-security-auth0/modules/compliance-overview.md +263 -0
  371. moai_adk/templates/.claude/skills/moai-security-auth0/modules/continuous-session-protection.md +307 -0
  372. moai_adk/templates/.claude/skills/moai-security-auth0/modules/customize-mfa.md +178 -0
  373. moai_adk/templates/.claude/skills/moai-security-auth0/modules/dpop-implementation.md +283 -0
  374. moai_adk/templates/.claude/skills/moai-security-auth0/modules/fapi-implementation.md +259 -0
  375. moai_adk/templates/.claude/skills/moai-security-auth0/modules/gdpr-compliance.md +313 -0
  376. moai_adk/templates/.claude/skills/moai-security-auth0/modules/guardian-configuration.md +269 -0
  377. moai_adk/templates/.claude/skills/moai-security-auth0/modules/highly-regulated-identity.md +272 -0
  378. moai_adk/templates/.claude/skills/moai-security-auth0/modules/jwt-fundamentals.md +248 -0
  379. moai_adk/templates/.claude/skills/moai-security-auth0/modules/mdl-verification.md +211 -0
  380. moai_adk/templates/.claude/skills/moai-security-auth0/modules/mfa-api-management.md +278 -0
  381. moai_adk/templates/.claude/skills/moai-security-auth0/modules/mfa-factors.md +226 -0
  382. moai_adk/templates/.claude/skills/moai-security-auth0/modules/mfa-overview.md +174 -0
  383. moai_adk/templates/.claude/skills/moai-security-auth0/modules/mtls-sender-constraining.md +316 -0
  384. moai_adk/templates/.claude/skills/moai-security-auth0/modules/ropg-flow-mfa.md +217 -0
  385. moai_adk/templates/.claude/skills/moai-security-auth0/modules/security-center.md +325 -0
  386. moai_adk/templates/.claude/skills/moai-security-auth0/modules/security-guidance.md +277 -0
  387. moai_adk/templates/.claude/skills/moai-security-auth0/modules/state-parameters.md +178 -0
  388. moai_adk/templates/.claude/skills/moai-security-auth0/modules/step-up-authentication.md +251 -0
  389. moai_adk/templates/.claude/skills/moai-security-auth0/modules/suspicious-ip-throttling.md +240 -0
  390. moai_adk/templates/.claude/skills/moai-security-auth0/modules/tenant-access-control.md +180 -0
  391. moai_adk/templates/.claude/skills/moai-security-auth0/modules/webauthn-fido.md +235 -0
  392. moai_adk/templates/.claude/skills/moai-workflow-jit-docs/SKILL.md +449 -0
  393. moai_adk/templates/.claude/skills/moai-workflow-jit-docs/advanced-patterns.md +379 -0
  394. moai_adk/templates/.claude/skills/moai-workflow-jit-docs/examples.md +544 -0
  395. moai_adk/templates/.claude/skills/moai-workflow-jit-docs/optimization.md +286 -0
  396. moai_adk/templates/.claude/skills/moai-workflow-jit-docs/reference.md +307 -0
  397. moai_adk/templates/.claude/skills/moai-workflow-project/README.md +190 -0
  398. moai_adk/templates/.claude/skills/moai-workflow-project/SKILL.md +390 -0
  399. moai_adk/templates/.claude/skills/moai-workflow-project/__init__.py +520 -0
  400. moai_adk/templates/.claude/skills/moai-workflow-project/complete_workflow_demo_fixed.py +574 -0
  401. moai_adk/templates/.claude/skills/moai-workflow-project/examples/complete_project_setup.py +317 -0
  402. moai_adk/templates/.claude/skills/moai-workflow-project/examples/complete_workflow_demo.py +663 -0
  403. moai_adk/templates/.claude/skills/moai-workflow-project/examples/config-migration-example.json +190 -0
  404. moai_adk/templates/.claude/skills/moai-workflow-project/examples/question-examples.json +175 -0
  405. moai_adk/templates/.claude/skills/moai-workflow-project/examples/quick_start.py +196 -0
  406. moai_adk/templates/.claude/skills/moai-workflow-project/examples.md +547 -0
  407. moai_adk/templates/.claude/skills/moai-workflow-project/modules/__init__.py +17 -0
  408. moai_adk/templates/.claude/skills/moai-workflow-project/modules/advanced-patterns.md +158 -0
  409. moai_adk/templates/.claude/skills/moai-workflow-project/modules/ask_user_integration.py +340 -0
  410. moai_adk/templates/.claude/skills/moai-workflow-project/modules/batch_questions.py +713 -0
  411. moai_adk/templates/.claude/skills/moai-workflow-project/modules/config_manager.py +538 -0
  412. moai_adk/templates/.claude/skills/moai-workflow-project/modules/documentation_manager.py +1336 -0
  413. moai_adk/templates/.claude/skills/moai-workflow-project/modules/language_initializer.py +730 -0
  414. moai_adk/templates/.claude/skills/moai-workflow-project/modules/migration_manager.py +608 -0
  415. moai_adk/templates/.claude/skills/moai-workflow-project/modules/template_optimizer.py +1005 -0
  416. moai_adk/templates/.claude/skills/moai-workflow-project/reference.md +275 -0
  417. moai_adk/templates/.claude/skills/moai-workflow-project/schemas/config-schema.json +316 -0
  418. moai_adk/templates/.claude/skills/moai-workflow-project/schemas/tab_schema.json +1434 -0
  419. moai_adk/templates/.claude/skills/moai-workflow-project/templates/config-template.json +71 -0
  420. moai_adk/templates/.claude/skills/moai-workflow-project/templates/doc-templates/product-template.md +44 -0
  421. moai_adk/templates/.claude/skills/moai-workflow-project/templates/doc-templates/structure-template.md +48 -0
  422. moai_adk/templates/.claude/skills/moai-workflow-project/templates/doc-templates/tech-template.md +92 -0
  423. moai_adk/templates/.claude/skills/moai-workflow-project/templates/question-templates/config-manager-setup.json +109 -0
  424. moai_adk/templates/.claude/skills/moai-workflow-project/templates/question-templates/language-initializer.json +228 -0
  425. moai_adk/templates/.claude/skills/moai-workflow-project/templates/question-templates/menu-project-config.json +130 -0
  426. moai_adk/templates/.claude/skills/moai-workflow-project/templates/question-templates/project-batch-questions.json +97 -0
  427. moai_adk/templates/.claude/skills/moai-workflow-project/templates/question-templates/spec-workflow-setup.json +150 -0
  428. moai_adk/templates/.claude/skills/moai-workflow-project/test_integration_simple.py +436 -0
  429. moai_adk/templates/.claude/skills/moai-workflow-spec/SKILL.md +534 -0
  430. moai_adk/templates/.claude/skills/moai-workflow-spec/examples.md +900 -0
  431. moai_adk/templates/.claude/skills/moai-workflow-spec/reference.md +704 -0
  432. moai_adk/templates/.claude/skills/moai-workflow-templates/SKILL.md +377 -0
  433. moai_adk/templates/.claude/skills/moai-workflow-templates/examples.md +552 -0
  434. moai_adk/templates/.claude/skills/moai-workflow-templates/modules/code-templates.md +124 -0
  435. moai_adk/templates/.claude/skills/moai-workflow-templates/modules/feedback-templates.md +100 -0
  436. moai_adk/templates/.claude/skills/moai-workflow-templates/modules/template-optimizer.md +138 -0
  437. moai_adk/templates/.claude/skills/moai-workflow-templates/reference.md +346 -0
  438. moai_adk/templates/.claude/skills/moai-workflow-testing/LICENSE.txt +202 -0
  439. moai_adk/templates/.claude/skills/moai-workflow-testing/SKILL.md +456 -0
  440. moai_adk/templates/.claude/skills/moai-workflow-testing/advanced-patterns.md +576 -0
  441. moai_adk/templates/.claude/skills/moai-workflow-testing/examples/ai-powered-testing.py +294 -0
  442. moai_adk/templates/.claude/skills/moai-workflow-testing/examples/console_logging.py +35 -0
  443. moai_adk/templates/.claude/skills/moai-workflow-testing/examples/element_discovery.py +40 -0
  444. moai_adk/templates/.claude/skills/moai-workflow-testing/examples/static_html_automation.py +34 -0
  445. moai_adk/templates/.claude/skills/moai-workflow-testing/examples.md +672 -0
  446. moai_adk/templates/.claude/skills/moai-workflow-testing/modules/README.md +220 -0
  447. moai_adk/templates/.claude/skills/moai-workflow-testing/modules/ai-debugging.md +845 -0
  448. moai_adk/templates/.claude/skills/moai-workflow-testing/modules/automated-code-review.md +1416 -0
  449. moai_adk/templates/.claude/skills/moai-workflow-testing/modules/performance-optimization.md +1234 -0
  450. moai_adk/templates/.claude/skills/moai-workflow-testing/modules/smart-refactoring.md +1243 -0
  451. moai_adk/templates/.claude/skills/moai-workflow-testing/modules/tdd-context7.md +1260 -0
  452. moai_adk/templates/.claude/skills/moai-workflow-testing/optimization.md +505 -0
  453. moai_adk/templates/.claude/skills/moai-workflow-testing/reference/playwright-best-practices.md +57 -0
  454. moai_adk/templates/.claude/skills/moai-workflow-testing/reference.md +440 -0
  455. moai_adk/templates/.claude/skills/moai-workflow-testing/scripts/with_server.py +218 -0
  456. moai_adk/templates/.claude/skills/moai-workflow-testing/templates/alfred-integration.md +376 -0
  457. moai_adk/templates/.claude/skills/moai-workflow-testing/workflows/enterprise-testing-workflow.py +571 -0
  458. moai_adk/templates/.claude/skills/moai-worktree/SKILL.md +411 -0
  459. moai_adk/templates/.claude/skills/moai-worktree/examples.md +606 -0
  460. moai_adk/templates/.claude/skills/moai-worktree/modules/integration-patterns.md +982 -0
  461. moai_adk/templates/.claude/skills/moai-worktree/modules/parallel-development.md +778 -0
  462. moai_adk/templates/.claude/skills/moai-worktree/modules/worktree-commands.md +646 -0
  463. moai_adk/templates/.claude/skills/moai-worktree/modules/worktree-management.md +782 -0
  464. moai_adk/templates/.claude/skills/moai-worktree/reference.md +357 -0
  465. moai_adk/templates/.git-hooks/pre-commit +128 -0
  466. moai_adk/templates/.git-hooks/pre-push +365 -0
  467. moai_adk/templates/.github/workflows/ci-universal.yml +513 -0
  468. moai_adk/templates/.github/workflows/security-secrets-check.yml +179 -0
  469. moai_adk/templates/.github/workflows/spec-issue-sync.yml +337 -0
  470. moai_adk/templates/.gitignore +222 -0
  471. moai_adk/templates/.mcp.json +13 -0
  472. moai_adk/templates/.moai/config/config.yaml +58 -0
  473. moai_adk/templates/.moai/config/questions/_schema.yaml +174 -0
  474. moai_adk/templates/.moai/config/questions/tab0-init.yaml +251 -0
  475. moai_adk/templates/.moai/config/questions/tab1-user.yaml +107 -0
  476. moai_adk/templates/.moai/config/questions/tab2-project.yaml +79 -0
  477. moai_adk/templates/.moai/config/questions/tab3-git.yaml +632 -0
  478. moai_adk/templates/.moai/config/questions/tab4-quality.yaml +182 -0
  479. moai_adk/templates/.moai/config/questions/tab5-system.yaml +96 -0
  480. moai_adk/templates/.moai/config/sections/git-strategy.yaml +116 -0
  481. moai_adk/templates/.moai/config/sections/language.yaml +11 -0
  482. moai_adk/templates/.moai/config/sections/project.yaml +13 -0
  483. moai_adk/templates/.moai/config/sections/quality.yaml +17 -0
  484. moai_adk/templates/.moai/config/sections/system.yaml +24 -0
  485. moai_adk/templates/.moai/config/sections/user.yaml +5 -0
  486. moai_adk/templates/.moai/config/statusline-config.yaml +92 -0
  487. moai_adk/templates/.moai/scripts/setup-glm.py +136 -0
  488. moai_adk/templates/CLAUDE.md +642 -0
  489. moai_adk/utils/__init__.py +30 -0
  490. moai_adk/utils/banner.py +38 -0
  491. moai_adk/utils/common.py +294 -0
  492. moai_adk/utils/link_validator.py +241 -0
  493. moai_adk/utils/logger.py +147 -0
  494. moai_adk/utils/safe_file_reader.py +206 -0
  495. moai_adk/utils/timeout.py +160 -0
  496. moai_adk/utils/toon_utils.py +256 -0
  497. moai_adk/version.py +22 -0
  498. moai_adk-0.35.1.dist-info/METADATA +3018 -0
  499. moai_adk-0.35.1.dist-info/RECORD +502 -0
  500. moai_adk-0.35.1.dist-info/WHEEL +4 -0
  501. moai_adk-0.35.1.dist-info/entry_points.txt +3 -0
  502. moai_adk-0.35.1.dist-info/licenses/LICENSE +21 -0
@@ -0,0 +1,1386 @@
1
+ ---
2
+ name: moai:0-project
3
+ description: "Initialize project metadata and documentation"
4
+ argument-hint: "[<empty>|setting|update|--glm-on <token>]"
5
+ allowed-tools: Read, Write, Edit, Grep, Glob, WebFetch, WebSearch, Bash, TodoWrite, AskUserQuestion, Task, Skill
6
+ model: inherit
7
+ ---
8
+
9
+ ## Pre-execution Context
10
+
11
+ !git status --porcelain
12
+ !git config --get user.name
13
+ !git config --get user.email
14
+ !git branch --show-current
15
+
16
+ ## Essential Files
17
+
18
+ @.moai/config/config.yaml
19
+ @.moai/project/product.md
20
+ @.moai/project/structure.md
21
+ @.moai/project/tech.md
22
+
23
+ ---
24
+
25
+ # MoAI-ADK Step 0: Initialize/Update Project (Project Setup)
26
+
27
+ User Interaction Architecture: AskUserQuestion tool must be used at COMMAND level only, not within subagents. Subagents invoked via Task() operate in isolated, stateless contexts and cannot interact with users directly.
28
+
29
+ Correct Pattern: Command collects user input via AskUserQuestion BEFORE delegating to agents. Pass collected choices as parameters to Task() calls.
30
+
31
+ Architecture: Commands delegate to Agents, which coordinate Skills. This command orchestrates exclusively through Task() tool.
32
+
33
+ Delegation Model: Complete agent-first pattern. All execution delegated to manager-project agent. Agents receive pre-collected user choices and execute without further user interaction.
34
+
35
+ Workflow Integration: This command implements Step 0 of Alfred's three-step execution model (Understand-Plan-Execute). See CLAUDE.md for complete workflow details.
36
+
37
+ ---
38
+
39
+ ## Command Purpose
40
+
41
+ Initialize or update project metadata using language-first architecture. The system supports five execution modes:
42
+
43
+ INITIALIZATION Mode: First-time project setup and configuration
44
+ AUTO-DETECT Mode: Existing projects with optional modification or re-initialization
45
+ SETTINGS Mode: Interactive tab-based configuration management with validation
46
+ UPDATE Mode: Template optimization after moai-adk package update
47
+ GLM Configuration Mode: GLM API integration setup via --glm-on parameter
48
+
49
+ WHY: Multi-mode design accommodates diverse user scenarios from fresh installs to updates.
50
+
51
+ IMPACT: Users can navigate project lifecycle without manual intervention.
52
+
53
+ ---
54
+
55
+ ## Associated Agents and Skills
56
+
57
+ The following agents and skills support this command:
58
+
59
+ manager-project agent orchestrates language-first initialization and configuration workflows.
60
+
61
+ moai-workflow-project skill provides unified project management including language initialization, atomic config operations, template merging, and tab-based batch question execution.
62
+
63
+ moai-workflow-templates skill manages template generation and customization.
64
+
65
+ WHY: Distributed responsibility enables specialized expertise and focused tool access.
66
+
67
+ IMPACT: Each agent optimizes its domain while maintaining system coherence.
68
+
69
+ ---
70
+
71
+ ## Language Configuration
72
+
73
+ Core Principle: Language configuration originates from moai-adk CLI initialization or update commands.
74
+
75
+ [HARD] Read language from .moai/config/config.yaml before starting any mode.
76
+
77
+ WHY: Preserving existing language settings prevents disruption to user experience.
78
+
79
+ IMPACT: Missing language context causes mode selection ambiguity.
80
+
81
+ Language is preserved across modes except when:
82
+
83
+ - [SOFT] User explicitly requests language change via SETTINGS mode, Tab 1
84
+ - [SOFT] Update mode detects language-compatible improvements
85
+
86
+ Execution sequence varies by mode:
87
+
88
+ Initialization mode: Read language from config if present, conduct project interview, generate documentation.
89
+
90
+ Auto-Detect mode: Display current language, offer settings modification with language change shortcut.
91
+
92
+ Settings mode: Display current language in Tab 1, allow optional language modification.
93
+
94
+ Update mode: Preserve language from backup, perform template optimization.
95
+
96
+ WHY: Mode-specific language handling respects existing configuration while enabling user choice.
97
+
98
+ ---
99
+
100
+ ## YAML-Based Question System
101
+
102
+ ### Question Definition Files
103
+
104
+ All configuration questions are defined in YAML files under .moai/config/questions/:
105
+
106
+ - _schema.yaml: Schema definition and constraints
107
+ - tab1-user.yaml: User and language settings (3 questions)
108
+ - tab2-project.yaml: Project metadata (2 questions)
109
+ - tab3-git.yaml: Git strategy and workflow (26 questions, includes GitHub Profile)
110
+ - tab4-quality.yaml: Quality principles and reports (7 questions)
111
+ - tab5-system.yaml: System and GitHub integration (7 questions)
112
+
113
+ WHY: YAML-based questions enable consistent structure and easy maintenance.
114
+
115
+ IMPACT: Question changes require only YAML updates, not code modifications.
116
+
117
+ ### Language-Aware Question Execution
118
+
119
+ [HARD] When executing questions from .moai/config/questions/*.yaml, translate to user's conversation_language at runtime.
120
+
121
+ Question files are written in English (source of truth). At execution time:
122
+ - Read user's conversation_language from sections/language.yaml
123
+ - Translate question text, options, and descriptions to user's language
124
+ - Present AskUserQuestion in user's language
125
+ - Store answer values in English (field values remain English)
126
+
127
+ Example Translation Flow:
128
+ - Question YAML (English): "What is your name?"
129
+ - User Language: Korean (ko)
130
+ - AskUserQuestion presented: Korean translation of question
131
+ - Answer stored: user.name = "GOOS" (value unchanged)
132
+
133
+ WHY: Single-source English questions with runtime translation reduces maintenance burden.
134
+
135
+ IMPACT: Adding new languages requires only translation logic, not question file duplication.
136
+
137
+ ### Question Loading Priority
138
+
139
+ 1. Load question definitions from .moai/config/questions/tab*.yaml
140
+ 2. Read current values from .moai/config/sections/*.yaml
141
+ 3. Present questions with current values as defaults
142
+ 4. Store updated values back to sections/*.yaml
143
+
144
+ ### Section File Updates
145
+
146
+ Configuration values are stored in modular section files:
147
+ - sections/user.yaml: User name (loaded by CLAUDE.md)
148
+ - sections/language.yaml: All language settings (loaded by CLAUDE.md)
149
+ - sections/project.yaml: Project metadata
150
+ - sections/git-strategy.yaml: Git workflow configuration
151
+ - sections/quality.yaml: TDD and quality settings
152
+ - sections/system.yaml: MoAI system settings
153
+
154
+ WHY: Modular sections enable token-efficient CLAUDE.md loading.
155
+
156
+ IMPACT: CLAUDE.md loads only user.yaml and language.yaml (~17 lines vs 400+ full config).
157
+
158
+ ---
159
+
160
+ ## Agent Invocation Patterns (CLAUDE.md Compliance)
161
+
162
+ This command uses agent execution patterns defined in CLAUDE.md (lines 96-120).
163
+
164
+ ### Sequential Phase-Based Chaining PASS
165
+
166
+ Command implements sequential chaining through 3 main phases:
167
+
168
+ Phase Flow:
169
+ - Phase 1: Mode Detection & Language Configuration (determines operation mode and loads language)
170
+ - Phase 2: User Intent Collection (gathers project metadata and preferences via AskUserQuestion)
171
+ - Phase 3: Configuration & Documentation Generation (manager-project generates all project files)
172
+
173
+ Each phase receives outputs from previous phases as context.
174
+
175
+ WHY: Sequential execution ensures proper configuration and file generation
176
+ - Phase 2 requires mode and language from Phase 1 to display appropriate questions
177
+ - Phase 3 requires user responses from Phase 2 to generate correct configuration
178
+ - File generation requires complete configuration before creating documentation
179
+
180
+ IMPACT: Skipping phases would create incomplete or misconfigured project setup
181
+
182
+ ### Parallel Execution FAIL
183
+
184
+ Not applicable - configuration requires sequential processing
185
+
186
+ WHY: Project initialization has strict ordering requirements
187
+ - Language must be determined before asking questions
188
+ - User responses must be collected before generating files
189
+ - Configuration must be validated before documentation generation
190
+
191
+ IMPACT: Parallel execution would create configuration conflicts and invalid project state
192
+
193
+ ### Resumable Agent Support FAIL
194
+
195
+ Not applicable - command completes in single execution
196
+
197
+ WHY: Project setup is fast atomic operation
198
+ - Most setups complete in under 1 minute
199
+ - Configuration operations are atomic and transactional
200
+ - No long-running processes requiring checkpoints
201
+
202
+ IMPACT: Resume pattern unnecessary for typical project initialization
203
+
204
+ ---
205
+
206
+ Refer to CLAUDE.md "Agent Chaining Patterns" (lines 96-120) for complete pattern architecture.
207
+
208
+ ---
209
+
210
+ ## Execution Philosophy
211
+
212
+ The project setup follows explicit delegation pattern: Understand the user intent, Plan the execution, Execute through specialized agents.
213
+
214
+ The command delegates all functional work to manager-project agent through Task() invocation.
215
+
216
+ The command maintains zero direct tool usage except for Task() orchestration and AskUserQuestion() user interaction.
217
+
218
+ [HARD] Tool Usage Restrictions:
219
+
220
+ - DO NOT use Read for file operations (delegated to manager-project)
221
+ - DO NOT use Write for file operations (delegated to manager-project)
222
+ - DO NOT use Edit for file modifications (delegated to manager-project)
223
+ - DO NOT use Bash for command execution (delegated to manager-project)
224
+ - DO NOT use TodoWrite for task management (delegated to manager-project)
225
+ - DO use Task() for agent orchestration
226
+ - DO use AskUserQuestion() for user interaction
227
+
228
+ WHY: Delegation enables specialized agent tool access and consistent execution context.
229
+
230
+ IMPACT: Direct tool usage would bypass agent expertise and validation layers.
231
+
232
+ Manager-project agent handles all implementation complexity including file operations, configuration management, and validation logic.
233
+
234
+ ---
235
+
236
+ ## PHASE 1: Command Routing and Analysis
237
+
238
+ Goal: Detect subcommand intent and prepare execution context for delegation.
239
+
240
+ ### Step 1: Analyze User Command Arguments
241
+
242
+ [HARD] Parse user command to determine execution mode.
243
+
244
+ WHY: Correct mode detection ensures appropriate workflow execution.
245
+
246
+ IMPACT: Incorrect routing causes wrong execution flow.
247
+
248
+ The system routes based on provided arguments:
249
+
250
+ GLM Configuration: Command includes --glm-on with optional API token
251
+ - Detect token in --glm-on parameter
252
+ - If token missing: Attempt auto-load from .env.glm file
253
+ - If token missing: Attempt auto-load from ANTHROPIC_AUTH_TOKEN environment variable
254
+ - If all sources missing: Request token from user via AskUserQuestion
255
+
256
+ SETTINGS Mode: Command includes setting argument
257
+ - Always use interactive tab selection via AskUserQuestion
258
+ - User selects specific tab or "Modify All Tabs" option
259
+
260
+ UPDATE Mode: Command includes update argument
261
+ - No additional argument parsing required
262
+
263
+ INITIALIZATION or AUTO-DETECT: Command has no arguments
264
+ - [HARD] Check if .moai/config/config.yaml exists
265
+ - File exists: Route to AUTO-DETECT MODE
266
+ - File missing: Route to INITIALIZATION MODE
267
+
268
+ Invalid Arguments: Unrecognized command format
269
+ - Display error message explaining valid command syntax
270
+ - Exit with error state
271
+
272
+ WHY: Argument-driven routing prevents mode confusion.
273
+
274
+ IMPACT: Ambiguous routing leads to wrong workflow execution.
275
+
276
+ ### Step 2: Delegate to Manager-Project Agent
277
+
278
+ [HARD] Invoke manager-project subagent with detected mode and context.
279
+
280
+ WHY: Specialized agent handles mode-specific complexity.
281
+
282
+ IMPACT: Direct execution would bypass validation and expertise layers.
283
+
284
+ Pass the following context to manager-project agent:
285
+
286
+ - Detected Mode value (INITIALIZATION, AUTO-DETECT, SETTINGS, UPDATE, or GLM_CONFIGURATION)
287
+ - Language Context read from .moai/config/config.yaml if present
288
+ - GLM Token value if GLM_CONFIGURATION mode selected
289
+ - User command arguments for reference
290
+
291
+ For INITIALIZATION:
292
+
293
+ - Check .moai/config.yaml for language setting
294
+ - If missing: Use moai-workflow-project skill for language detection
295
+ - If present: Use existing language, skip language selection
296
+ - Conduct language-aware user interview
297
+ - Generate project documentation
298
+ - Use moai-workflow-project skill for config creation
299
+
300
+ For AUTO-DETECT:
301
+
302
+ - Read current language from .moai/config.yaml
303
+ - Check if project documentation exists (.moai/project/product.md, structure.md, tech.md)
304
+ - If docs missing → PARTIAL INITIALIZATION state detected
305
+ - Use AskUserQuestion to ask user: "Your configuration exists but project documentation is missing. Would you like to complete the initialization now?"
306
+ - Options: "Yes, complete initialization" / "No, review configuration" / "Cancel"
307
+ - If user selects "Yes" → Switch to INITIALIZATION workflow
308
+ - Otherwise → Continue with regular AUTO-DETECT options
309
+ - Display current configuration (including language)
310
+ - Offer: Modify Settings / Change Language Only / Review Configuration / Re-initialize / Cancel
311
+ - If "Change Language Only" → Go to Tab 1 in SETTINGS mode
312
+ - Otherwise route to selected sub-action
313
+
314
+ For SETTINGS:
315
+
316
+ - Load current language from .moai/config.yaml
317
+ - Load tab schema from appropriate skill schema
318
+ - Execute batch questions via moai-workflow-project skill
319
+ - Process responses and update config.yaml atomically via moai-workflow-project skill
320
+ - Report changes and validation results
321
+
322
+ For UPDATE:
323
+
324
+ - Read language from config backup (preserve existing setting)
325
+ - Use moai-workflow-project skill for smart merging
326
+ - Update templates and configuration
327
+ - Auto-translate announcements to current language if needed
328
+
329
+ For GLM_CONFIGURATION:
330
+
331
+ - Receive GLM API token from parameter (or detect from environment)
332
+ - Check token resolution sequence:
333
+ 1. Use provided token from `--glm-on <token>` argument (if not empty)
334
+ 2. Auto-load from existing `.env.glm` file (if exists and token missing)
335
+ 3. Auto-load from `ANTHROPIC_AUTH_TOKEN` environment variable (if set)
336
+ 4. Request from user via AskUserQuestion (if all above missing)
337
+ - Execute GLM setup script: `uv run .moai/scripts/setup-glm.py <GLM_TOKEN>`
338
+ - Verify configuration in .claude/settings.local.json with proper keys
339
+ - Verify .env.glm created with secure permissions (0o600)
340
+ - Verify .gitignore includes .env.glm entry
341
+ - Report GLM configuration success to user with all configured keys
342
+ - Remind user: "Restart Claude Code to automatically load the new settings"
343
+
344
+ Output: Mode-specific completion report with next steps
345
+
346
+ Store: Response in `$MODE_EXECUTION_RESULT`
347
+
348
+ ---
349
+
350
+ ## PHASE 1.5: Smart Question System (INITIALIZATION Mode Only)
351
+
352
+ Goal: Collect minimal user input, research best practices via web search, and propose optimized project configuration.
353
+
354
+ WHY: Reduce user burden from 40+ questions to 3 essential questions while providing expert-level recommendations based on current industry standards.
355
+
356
+ IMPACT: Non-developers can create production-ready projects with minimal technical knowledge.
357
+
358
+ ### Step 1: Collect Essential Information (3 Questions Only)
359
+
360
+ [HARD] Use AskUserQuestion to collect ONLY 3 required fields at COMMAND level.
361
+
362
+ WHY: Minimal questions reduce user friction while capturing essential project identity.
363
+
364
+ IMPACT: More questions would overwhelm non-developers and slow down project creation.
365
+
366
+ Question 1 - Project Name:
367
+
368
+ - question: Translate to user's conversation_language with friendly guidance:
369
+ - Korean: "프로젝트 이름을 정해주세요. 영어 소문자와 하이픈(-)만 사용할 수 있어요."
370
+ - English: "Choose a project name. Use only lowercase letters and hyphens (-)."
371
+ - header: "Project Name"
372
+ - type: text input (user selects "Other" to type)
373
+ - examples shown to user:
374
+ - "snake-game" (게임 프로젝트)
375
+ - "my-first-app" (첫 번째 앱)
376
+ - "todo-list" (할 일 목록)
377
+ - validation: lowercase, no spaces, valid directory name
378
+ - helper: If user enters Korean or spaces, suggest alternatives automatically
379
+
380
+ Question 2 - Project Type:
381
+
382
+ - question: Translate to user's conversation_language with beginner-friendly tone:
383
+ - Korean: "어떤 종류의 프로젝트를 만들고 싶으세요?"
384
+ - English: "What kind of project would you like to create?"
385
+ - header: "Project Type"
386
+ - multiSelect: false
387
+ - options (max 4, beginner-friendly labels):
388
+ - label: "Web Browser App"
389
+ korean_label: "웹 브라우저에서 보는 것"
390
+ description: "크롬, 사파리 등 브라우저에서 열어보는 프로그램 (게임, 웹사이트 등)"
391
+ tech_hint: "HTML, CSS, JavaScript 또는 React, Vue 사용"
392
+ - label: "Mobile App"
393
+ korean_label: "스마트폰 앱"
394
+ description: "아이폰이나 안드로이드에서 설치해서 사용하는 앱"
395
+ tech_hint: "React Native, Flutter 사용"
396
+ - label: "Command Line Tool"
397
+ korean_label: "터미널에서 실행하는 도구"
398
+ description: "명령어로 실행하는 프로그램 (자동화 스크립트 등)"
399
+ tech_hint: "Python, Node.js, Go 사용"
400
+ - label: "Backend API"
401
+ korean_label: "서버/백엔드 서비스"
402
+ description: "데이터를 저장하고 처리하는 서버 프로그램"
403
+ tech_hint: "FastAPI, Express, Django 사용"
404
+
405
+ Question 3 - Project Description:
406
+
407
+ - question: Translate to user's conversation_language with examples:
408
+ - Korean: "만들고 싶은 것을 한 문장으로 설명해주세요."
409
+ - English: "Describe what you want to build in one sentence."
410
+ - header: "Description"
411
+ - type: text input (user selects "Other" to type)
412
+ - examples shown to user (in conversation_language):
413
+ - "방향키로 뱀을 조종해서 음식을 먹는 게임" (스네이크 게임)
414
+ - "할 일을 추가하고 완료 표시하는 앱" (투두 리스트)
415
+ - "날씨 정보를 보여주는 웹페이지" (날씨 앱)
416
+ - "사진을 업로드하고 공유하는 서비스" (갤러리)
417
+ - validation: non-empty string
418
+ - helper: Encourage natural language description, no technical terms required
419
+
420
+ Store responses in: $PROJECT_ESSENTIAL_INFO
421
+
422
+ ### Step 2: Web Search for Best Practices
423
+
424
+ [HARD] After collecting essential info, perform targeted web searches using WebSearch tool.
425
+
426
+ WHY: Real-time research ensures recommendations reflect current industry standards (2025).
427
+
428
+ IMPACT: Outdated recommendations would create technical debt from project start.
429
+
430
+ Based on collected project_type, execute 3 parallel searches:
431
+
432
+ Search Query 1: "[project_type] best practices 2025"
433
+ - Extract: Design patterns, architecture recommendations, common pitfalls
434
+
435
+ Search Query 2: "[project_type] recommended tech stack 2025"
436
+ - Extract: Framework comparisons, library recommendations, version requirements
437
+
438
+ Search Query 3: "[project_type] [project_description keywords] architecture patterns"
439
+ - Extract: Domain-specific patterns, similar project architectures
440
+
441
+ Analyze search results and compile:
442
+
443
+ - Recommended Frameworks: Top 2-3 options with pros/cons
444
+ - UI Library: Best options for project type
445
+ - Testing Framework: Industry standard for project type
446
+ - Build Tools: Current best practices
447
+ - Deployment Target: Common deployment platforms
448
+
449
+ Store analysis in: $BEST_PRACTICES_ANALYSIS
450
+
451
+ ### Step 3: Generate Smart Proposal
452
+
453
+ [HARD] Create structured proposal based on web search analysis.
454
+
455
+ WHY: Expert-curated recommendations reduce decision paralysis for non-developers.
456
+
457
+ IMPACT: Poor recommendations would lead to project failure or rework.
458
+
459
+ Proposal Structure:
460
+
461
+ Complexity Detection (before proposing):
462
+ - Simple Projects (recommend NO framework):
463
+ - Keywords: "게임", "game", "간단한", "simple", "첫", "first", "연습", "practice"
464
+ - Project types: Browser games, simple utilities, learning projects
465
+ - Recommended stack: HTML5 + CSS3 + Vanilla JavaScript (+ Canvas for games)
466
+ - Rationale: "프레임워크 없이 기본 기술만으로 빠르게 만들 수 있어요"
467
+
468
+ - Medium Projects (recommend lightweight framework):
469
+ - Keywords: "블로그", "포트폴리오", "랜딩페이지"
470
+ - Recommended stack: Next.js or Astro with minimal dependencies
471
+
472
+ - Complex Projects (recommend full framework):
473
+ - Keywords: "대시보드", "관리자", "SaaS", "플랫폼"
474
+ - Recommended stack: Full framework with state management, testing, etc.
475
+
476
+ Technology Stack Proposal:
477
+ - For Simple Projects (games, learning):
478
+ - Framework: "프레임워크 없음 - 순수 HTML/CSS/JavaScript로 충분해요"
479
+ - UI: "CSS만 사용 (Canvas for games)"
480
+ - Testing: "브라우저 개발자 도구로 확인"
481
+ - Build: "빌드 도구 없음 - 파일을 바로 브라우저에서 열면 됩니다"
482
+
483
+ - For Medium/Complex Projects:
484
+ - Framework: Primary recommendation with rationale
485
+ - UI Library: Recommended option
486
+ - Testing: Standard for project type
487
+ - Build Tools: Current best practice
488
+
489
+ Architecture Proposal:
490
+ - Directory Structure: Recommended layout for project type
491
+ - Key Patterns: Component patterns, state management approach
492
+ - Data Flow: How data moves through the application
493
+
494
+ Quality Standards:
495
+ - Test Coverage Target: Industry standard percentage
496
+ - TRUST 5 Level: Recommended validation level
497
+ - Accessibility: WCAG level appropriate for project
498
+
499
+ Store proposal in: $SMART_PROPOSAL
500
+
501
+ ### Step 4: Present Proposal and Get User Approval
502
+
503
+ [HARD] Use AskUserQuestion to present proposal and get explicit user approval.
504
+
505
+ WHY: User must consent before any files are created or configuration applied.
506
+
507
+ IMPACT: Automatic execution without approval violates user autonomy and may create unwanted configuration.
508
+
509
+ Proposal Presentation Format:
510
+
511
+ Present in user's conversation_language with clear sections:
512
+
513
+ ```markdown
514
+ Based on your project "{project_name}" ({project_type}), here is my recommendation:
515
+
516
+ **Technology Stack**
517
+ - Framework: {framework} - {brief_rationale}
518
+ - UI: {ui_library} - {brief_rationale}
519
+ - Testing: {test_framework}
520
+ - Build: {build_tools}
521
+
522
+ **Architecture**
523
+ - Structure: {directory_pattern}
524
+ - Patterns: {key_patterns}
525
+
526
+ **Quality Standards**
527
+ - Coverage: {coverage_target}%
528
+ - TRUST Level: {trust_level}
529
+
530
+ Sources: [List actual WebSearch sources used]
531
+ ```
532
+
533
+ Approval Question:
534
+
535
+ - question: Translate "Do you approve this configuration? You can modify specific parts or request a different approach." to user's conversation_language
536
+ - header: "Approval"
537
+ - multiSelect: false
538
+ - options:
539
+ - label: "Approve and Continue"
540
+ description: "Create project with these settings"
541
+ - label: "Modify Tech Stack"
542
+ description: "Keep architecture, change framework/libraries"
543
+ - label: "Modify Architecture"
544
+ description: "Keep tech stack, change structure/patterns"
545
+ - label: "Start Over"
546
+ description: "Re-run search with different criteria"
547
+
548
+ If user selects "Modify":
549
+ - Use additional AskUserQuestion to collect specific changes
550
+ - Update $SMART_PROPOSAL with modifications
551
+ - Re-present for approval
552
+
553
+ Loop until user selects "Approve and Continue"
554
+
555
+ Store approval in: $USER_APPROVAL
556
+
557
+ ### Step 5: Delegate to Manager-Project Agent
558
+
559
+ [HARD] After user approval, invoke manager-project agent with complete context.
560
+
561
+ WHY: Agent receives all necessary information to generate files without further user interaction.
562
+
563
+ IMPACT: Missing context would force agent to make assumptions or fail.
564
+
565
+ Pass to manager-project via Task():
566
+
567
+ - Mode: INITIALIZATION
568
+ - Language: User's conversation_language
569
+ - Project Essential Info: $PROJECT_ESSENTIAL_INFO (name, type, description)
570
+ - Approved Proposal: $SMART_PROPOSAL (tech stack, architecture, quality)
571
+ - User Approval Status: $USER_APPROVAL
572
+ - WebSearch Sources: URLs used for recommendations
573
+
574
+ Agent responsibilities:
575
+ - Generate .moai/project/product.md from project description + approved proposal
576
+ - Generate .moai/project/structure.md from architecture proposal
577
+ - Generate .moai/project/tech.md from technology stack proposal
578
+ - Create .moai/config/config.yaml with all settings
579
+ - Apply language settings throughout
580
+
581
+ Output: Complete project initialization with documentation
582
+
583
+ ---
584
+
585
+ ## PHASE 2: Execute Mode
586
+
587
+ Goal: Execute the appropriate mode based on routing decision.
588
+
589
+ ### Mode Handler: manager-project Agent
590
+
591
+ The manager-project agent handles all mode-specific workflows:
592
+
593
+ INITIALIZATION MODE:
594
+
595
+ - Read language from config.yaml (or use CLI default if missing)
596
+ - Conduct language-aware user interview (via Skill)
597
+ - Project type detection and configuration
598
+ - Documentation generation
599
+ - Auto-translate announcements to selected language
600
+
601
+ AUTO-DETECT MODE:
602
+
603
+ - Read current language from config.yaml
604
+ - CRITICAL CHECK: Detect partial initialization state
605
+ - Check if project documentation exists in `.moai/project/`:
606
+ - product.md, structure.md, tech.md
607
+ - If ANY doc missing → Use AskUserQuestion (in user's language)
608
+ - Question: "Your configuration exists but project documentation is missing. Would you like to complete the initialization?"
609
+ - Options: "Yes, complete initialization" / "No, review configuration" / "Cancel"
610
+ - If "Yes" → Switch to INITIALIZATION workflow
611
+ - Display current configuration (including language, initialization status)
612
+ - Offer: Modify Settings / Change Language Only / Review Configuration / Re-initialize / Cancel
613
+ - "Change Language Only" shortcut → SETTINGS mode, Tab 1 only
614
+ - Route to selected sub-action
615
+ - Language-Aware: All AskUserQuestion calls in user's conversation_language (NO EMOJIS)
616
+
617
+ SETTINGS MODE (NEW):
618
+
619
+ - Read current language from config.yaml
620
+ - Load tab schema for batch-based questions
621
+ - Execute batch questions with AskUserQuestion
622
+ - Process user responses
623
+ - Validate settings at critical checkpoints
624
+ - Delegate config update to UnifiedConfigManager from moai-workflow-project
625
+ - Report changes
626
+
627
+ UPDATE MODE:
628
+
629
+ - Preserve language from config backup
630
+ - **Config Format Migration (v0.32.0+):**
631
+ - Check if `.moai/config/config.yaml` exists (legacy format)
632
+ - If exists: Convert to `config.yaml` with intelligent optimization:
633
+ - Preserve all user settings and customizations
634
+ - Add meaningful comments explaining each section
635
+ - Optimize structure (remove dead fields, consolidate duplicates)
636
+ - Use YAML's native features:
637
+ - Multi-line strings for long descriptions
638
+ - Inline comments for field explanations
639
+ - Better readability with proper indentation
640
+ - Report migration success to user
641
+ - Analyze backup and compare templates
642
+ - Perform smart template merging
643
+ - Update `.moai/` files with new features
644
+ - Auto-translate announcements to current language if needed
645
+
646
+ ### Language-Aware Announcements
647
+
648
+ After any language selection or change, auto-translate company announcements:
649
+
650
+ ```bash
651
+ uv run $CLAUDE_PROJECT_DIR/.claude/hooks/moai/shared/utils/announcement_translator.py
652
+ ```
653
+
654
+ This ensures `.claude/settings.json` contains announcements in the user's selected language.
655
+
656
+ ---
657
+
658
+ ## SETTINGS MODE: Tab-Based Configuration (NEW)
659
+
660
+ > Version: v2.0.0 | Last Updated: 2025-11-19 | Changes: Removed [tab_ID] arg, added git_strategy.mode selection, expanded Tab 3 with conditional batches, fixed 26 field name errors, +16 settings
661
+
662
+ ### Overview
663
+
664
+ The SETTINGS MODE uses a tab-based batch question system to provide organized, user-friendly configuration management:
665
+
666
+ - 5 tabs: Organized by configuration domain
667
+ - 17 batches: Grouped questions within tabs (added 5 batches: Batch 3.0, 3.3, 3.5, 3.6, improved organization)
668
+ - 57 settings: Complete config.yaml v0.28.0 coverage (+39% from v1.0.0)
669
+ - 54 questions: User-facing questions (+14 from v1.0.0)
670
+ - Conditional batches: Tab 3 shows Personal/Team/Hybrid batches based on mode selection
671
+ - Atomic updates: Safe deep merge with backup/rollback
672
+
673
+ ### Initial Entry Point: Tab Selection Screen
674
+
675
+ When user runs `/moai:0-project setting` (without tab_ID), present tab selection:
676
+
677
+ ```markdown
678
+ Which settings tab would you like to modify?
679
+
680
+ Options:
681
+
682
+ 1. Tab 1: User & Language
683
+
684
+ - Configure user name, conversation language, agent prompt language
685
+
686
+ 2. Tab 2: Project Settings
687
+
688
+ - Configure project name, description
689
+
690
+ 3. Tab 3: Git Strategy & Workflow
691
+
692
+ - Configure GitHub profile, Manual/Personal/Team Git settings, commit/branch strategy
693
+
694
+ 4. Tab 4: Quality Principles & Reports
695
+
696
+ - Configure TRUST 5, report generation, storage location
697
+
698
+ 5. Tab 5: System & GitHub Integration
699
+
700
+ - Configure MoAI system, GitHub automation
701
+
702
+ 6. Modify All Tabs
703
+ - Recommended: Tab 1 → Tab 2 → Tab 3 → Others
704
+ ```
705
+
706
+ After Tab Completion:
707
+
708
+ ```markdown
709
+ Would you like to modify another settings tab?
710
+
711
+ 1. No, finish settings
712
+ 2. Select another tab
713
+ ```
714
+
715
+ ### Tab Schema Reference
716
+
717
+ Location: `.claude/skills/moai-workflow-project/schemas/tab_schema.json`
718
+
719
+ Tab 1: User & Language (Required Foundation)
720
+
721
+ - Batch 1.1: Basic settings (3 questions - UPDATED: removed conversation_language_name)
722
+ - User name, conversation language, agent prompt language
723
+ - NOTE: conversation_language_name is auto-updated when conversation_language changes
724
+ - Setting count: 3 | Critical checkpoint
725
+
726
+ Tab 2: Project Settings (Recommended)
727
+
728
+ - Batch 2.1: Project metadata (2 questions)
729
+ - Project name, description
730
+ - NOTE: GitHub Profile moved to Tab 3, Project Mode removed
731
+ - Batch 2.2: Auto-processed locale settings (0 questions - internal analysis only)
732
+ - project.locale, default_language, optimized_for_language (auto-determined from conversation_language)
733
+ - NOTE: No user input needed. These 3 fields update automatically when conversation_language changes
734
+ - Auto-Processing Delegation: Command does NOT perform auto-processing. manager-project agent receives user selections, determines derived fields, then delegates atomic update to UnifiedConfigManager skill.
735
+ - Setting count: 2
736
+
737
+ Tab 3: Git Strategy & Workflow (Recommended with Validation - REDESIGNED v2.0.0)
738
+
739
+ - Batch 3.0a: GitHub Profile (1 question) - Always shown, required for all modes
740
+ - GitHub username (e.g., @GoosLab) - moved from Tab 2
741
+ - Batch 3.0: Workflow mode selection (1 question - Manual/Personal/Team) - Controls visibility of subsequent batches
742
+ - Batch 3.1: Manual core settings (4 questions) - CONDITIONAL (Manual only)
743
+ - Batch 3.2: Manual push settings (1 question) - CONDITIONAL (Manual only)
744
+ - Batch 3.3: Personal core settings (4 questions) - CONDITIONAL (Personal only)
745
+ - Batch 3.4: Personal commit & push settings (3 questions) - CONDITIONAL (Personal only)
746
+ - Batch 3.5: Personal branch settings (2 questions) - CONDITIONAL (Personal only)
747
+ - Batch 3.6: Team core settings (4 questions) - CONDITIONAL (Team only)
748
+ - Batch 3.7: Team commit & PR settings (3 questions) - CONDITIONAL (Team only)
749
+ - Batch 3.8: Team branch & protection settings (3 questions) - CONDITIONAL (Team only)
750
+ - Batch 3.9: Team branch naming settings (2 questions) - CONDITIONAL (Team only)
751
+ - Setting count: 26 | Critical checkpoint for Git conflicts & mode consistency
752
+
753
+ Tab 4: Quality Principles & Reports (Optional - UPDATED v2.0.0)
754
+
755
+ - Batch 4.1: Constitution settings (3 questions - reduced from 4, renamed minimum_test_coverage→test_coverage_target)
756
+ - Batch 4.2: Report generation policy (4 questions - expanded, added warn_user & user_choice)
757
+ - Setting count: 9 (same count, better fields)
758
+
759
+ Tab 5: System & GitHub Integration (Optional - UPDATED v2.0.0)
760
+
761
+ - Batch 5.1: MoAI system settings (3 questions - updated, aligned with config.yaml v0.28.0)
762
+ - Batch 5.2: GitHub automation settings (5 questions - expanded from 3, added templates & spec_workflow fields)
763
+ - Setting count: 11 (+3 from v1.0.0)
764
+
765
+ ### Batch Execution Flow
766
+
767
+ #### Step 1: Load Tab Schema
768
+
769
+ ```markdown
770
+ Load: .claude/skills/moai-workflow-project/schemas/tab_schema.json
771
+ Extract:
772
+
773
+ - Tab definition (label, batches)
774
+ - Batch questions (max 4 per batch)
775
+ - Field mappings to config.yaml paths
776
+ - Current values from existing config
777
+ - Validation rules
778
+ ```
779
+
780
+ #### Step 2: Execute Batch via AskUserQuestion
781
+
782
+ Single Batch Execution Example (Tab 1, Batch 1.1):
783
+
784
+ ```markdown
785
+ Call: AskUserQuestion(
786
+ questions: [
787
+ {
788
+ question: "What is your name? To change, type your name in the text field below. (current: GoosLab)",
789
+ header: "User Name",
790
+ multiSelect: false,
791
+ options: [
792
+ {label: "Keep Current Value", description: "Continue using GoosLab (to change, type in the field below)"}
793
+ ]
794
+ },
795
+ {
796
+ question: "What language should Alfred use in conversations? (current: Korean/ko)",
797
+ header: "Conversation Language",
798
+ multiSelect: false,
799
+ options: [
800
+ {label: "Korean (한국어)", description: "모든 콘텐츠를 한국어로 생성"},
801
+ {label: "English (English)", description: "All content will be generated in English"},
802
+ {label: "Japanese (日本語)", description: "日本語で全てのコンテンツを生成"},
803
+ {label: "Chinese (中文)", description: "中文内容生成"},
804
+ {label: "Custom (기타)", description: "직접 언어 코드 입력 (예: th, ar, vi, nl)"}
805
+ ]
806
+ },
807
+ {
808
+ question: "What is the display name for the selected language? (current: Korean)",
809
+ header: "Language Display Name",
810
+ multiSelect: false,
811
+ options: [...]
812
+ },
813
+ {
814
+ question: "What language should agent prompts use? (current: same as conversation)",
815
+ header: "Agent Prompt Language",
816
+ multiSelect: false,
817
+ options: [...]
818
+ }
819
+ ]
820
+ )
821
+
822
+ Process user responses from AskUserQuestion into config update:
823
+ user.name → user_input_or_keep_current
824
+ language.conversation_language → selected_value
825
+ language.conversation_language_name → user_input_or_keep_current
826
+ language.agent_prompt_language → selected_value
827
+ ```
828
+
829
+ #### Step 3: Process Responses
830
+
831
+ Mapping Logic:
832
+
833
+ ```markdown
834
+ For each question in batch:
835
+
836
+ 1. Get field path from schema (e.g., "user.name")
837
+ 2. Get user's response (selected option or custom input from "Type something" field)
838
+ 3. Convert to config.yaml value:
839
+ - Custom text input (from "Type something" field) → Use the typed value directly
840
+ - Selected preset option → Use option's mapped value
841
+ - "Keep Current Value" option → Use existing value from config
842
+ 4. Build update object: {field_path: new_value}
843
+ 5. Collect all updates from batch
844
+
845
+ Note: The "Type something" input field is auto-added by AskUserQuestion tool.
846
+ Users type custom values directly in this field instead of selecting an "Other" option.
847
+ ```
848
+
849
+ #### Step 4: Validate at Checkpoints
850
+
851
+ Checkpoint Locations (from tab_schema navigation_flow):
852
+
853
+ 1. After Tab 1 (Language settings):
854
+
855
+ - Verify conversation_language is valid (ko, en, ja, es, etc)
856
+ - Verify agent_prompt_language consistency
857
+ - Error recovery: Re-ask Tab 1 if validation fails
858
+
859
+ 2. After Tab 3 (Git strategy):
860
+
861
+ - Validate Personal/Team mode conflicts
862
+ - If Personal: main_branch should not be "develop"
863
+ - If Team: PR base must be develop or main (never direct to main)
864
+ - Validate branch naming consistency
865
+ - Error recovery: Highlight conflicts, offer fix suggestions
866
+
867
+ 3. Before Config Update (Final validation):
868
+ - Check all required fields are set (marked required: true in schema)
869
+ - Verify no conflicting settings
870
+ - Validate field value types (string, bool, number, array)
871
+ - Report validation results to user
872
+
873
+ #### Step 5: Delegate Atomic Config Update to Skill
874
+
875
+ Update Pattern (Skill-delegated):
876
+
877
+ ```markdown
878
+ Delegate ALL config update operations to UnifiedConfigManager from moai-workflow-project:
879
+
880
+ - Manager handles backup/rollback logic internally
881
+ - Manager performs deep merge with validation
882
+ - Manager writes atomically to config.yaml
883
+ - Manager reports success/failure
884
+
885
+ Agent responsibilities:
886
+
887
+ - Collect user responses from AskUserQuestion
888
+ - Map responses to config field paths
889
+ - Pass update map to Skill
890
+ - Report results to user
891
+ ```
892
+
893
+ UnifiedConfigManager Responsibilities:
894
+
895
+ - UnifiedConfigManager from moai-workflow-project handles ALL file operations
896
+ - Internal backup/rollback if needed
897
+ - Atomic write and validation
898
+ - Error reporting
899
+
900
+ ### Implementation Details
901
+
902
+ #### Tab 1 Execution Example
903
+
904
+ User runs: `/moai:0-project setting tab_1_user_language`
905
+
906
+ ```
907
+ Step 1: Project-manager loads tab schema
908
+ Step 2: Extracts Tab 1 (tab_1_user_language)
909
+ Step 3: Gets Batch 1.1 (基本設定)
910
+ Step 4: Loads current values from config.yaml including extended language settings:
911
+ - User configuration: user.name value
912
+ - Conversation language: language.conversation_language (ko, en, ja, zh, etc.)
913
+ - Agent prompt language: language.agent_prompt_language
914
+ - Additional language settings: git_commit_messages, code_comments, documentation, error_messages
915
+ Step 5: Calls AskUserQuestion with 3 questions for core language settings
916
+ - Question 1: "The user name is currently set to [current value]. Is this correct?"
917
+ - Question 2: "What language should Alfred use in conversations? (current: [language display name]/[code])"
918
+ - Question 3: "The agent internal prompt language is currently set to [display name]/[code]. How would you like to configure this?"
919
+ Step 6: Receives user responses and maps them to configuration fields
920
+ Step 7: Processes each response (map to config fields)
921
+ - user.name response → user.name
922
+ - conversation_language response → language.conversation_language
923
+ - Auto-update: conversation_language_name (ko → Korean, en → English, ja → Japanese, es → Spanish)
924
+ - agent_prompt_language response → language.agent_prompt_language
925
+ Step 8: Runs Tab 1 validation checkpoint
926
+ - Check language is valid
927
+ - Verify consistency
928
+ Step 9: Delegates atomic update to UnifiedConfigManager from moai-workflow-project
929
+ - Manager handles backup/rollback internally
930
+ - Manager performs deep merge (including auto-updated conversation_language_name)
931
+ - Manager verifies final structure
932
+ Step 10: Receives result from Manager
933
+ - Success: Report changes made (4 fields: user.name, conversation_language, conversation_language_name [auto], agent_prompt_language)
934
+ - Failure: Report error from Skill with recovery suggestions
935
+ ```
936
+
937
+ #### Tab 3 Validation Example (Complex - NEW v2.0.0)
938
+
939
+ User runs: `/moai:0-project setting` (or `/moai:0-project setting tab_3_git_strategy`)
940
+
941
+ ```
942
+ Step 1: Load Tab 3 (tab_3_git_strategy) - 6 batches total
943
+ Step 2: Execute Batch 3.0 (Workflow Mode Selection)
944
+ - User selects: Personal, Team, or Hybrid
945
+ - Validation: Confirm mode selection
946
+ Step 3: CONDITIONAL LOGIC - Based on mode:
947
+
948
+ IF mode = Personal:
949
+ - Execute Batch 3.1 (Personal core settings)
950
+ - Execute Batch 3.2 (Personal branch & cleanup)
951
+ - Execute Batch 3.3 (Personal protection & merge)
952
+ - Skip Batches 3.4, 3.5, 3.6 (Team batches)
953
+
954
+ ELSE IF mode = Team:
955
+ - Skip Batches 3.1, 3.2, 3.3 (Personal batches)
956
+ - Execute Batch 3.4 (Team core settings)
957
+ - Execute Batch 3.5 (Team branch & protection)
958
+ - Execute Batch 3.6 (Team safety & merge)
959
+
960
+ ELSE IF mode = Hybrid:
961
+ - Execute ALL batches (3.1-3.6) for full flexibility
962
+
963
+ Step 4: Run Tab 3 validation checkpoint
964
+ - Validate mode selection consistency
965
+ - Check Personal/Team conflicts
966
+ - Example: If Personal: base_branch should be "main" (not "develop")
967
+ - Example: If Team: prevent_main_direct_merge should be true
968
+ - Example: If Team: default_pr_base must be "develop" or "main"
969
+ - Branch naming consistency
970
+ - Let user confirm or retry if conflicts found
971
+
972
+ Step 5: Merge all executed batches into single update object
973
+ Step 6: Delegate atomic update to UnifiedConfigManager from moai-workflow-project
974
+ - Manager handles backup/rollback internally
975
+ - Manager performs deep merge with final validation
976
+
977
+ Step 7: Report all 29 settings changes (or 16-20 depending on mode)
978
+ ```
979
+
980
+ #### Multi-Tab Workflow Example
981
+
982
+ User runs: `/moai:0-project setting` (always interactive, no tab_ID) → Tab Selection Screen
983
+
984
+ ```
985
+ Flow:
986
+ 1. Show Tab Selection Screen (Which settings tab would you like to modify?)
987
+ 2. User selects tab or "Modify All Tabs"
988
+ 3. Execute selected tab
989
+ - Tab 1 (REQUIRED): User & Language (1 batch, 3 questions)
990
+ - Tab 2 (RECOMMENDED): Project Info (2 batches, 2 questions in batch 2.1 + 0 questions auto-processing in batch 2.2)
991
+ - Tab 3 (RECOMMENDED): Git Strategy (10 batches, 26 questions total, conditional by mode)
992
+ * Batch 3.0a: GitHub Profile (1 question) - always shown
993
+ * Batch 3.0: Mode selection (1 question)
994
+ * Manual mode: Batches 3.1-3.2 (5 questions)
995
+ * Personal mode: Batches 3.3-3.5 (9 questions)
996
+ * Team mode: Batches 3.6-3.9 (12 questions)
997
+ - Tab 4 (OPTIONAL): Quality & Reports (2 batches, 7 questions)
998
+ - Tab 5 (OPTIONAL): System & GitHub (2 batches, 8 questions)
999
+ 4. After tab completion, ask: "Would you like to modify another settings tab?"
1000
+ - No, finish settings (exit)
1001
+ - Select another tab (return to step 1)
1002
+ 5. Final atomic update after user finishes all selected tabs
1003
+
1004
+ Tab-level behavior:
1005
+ - If user cancels mid-tab, changes NOT saved
1006
+ - If tab validation fails, user can retry or skip tab
1007
+ - After ALL selected tabs complete successfully, perform final atomic update
1008
+ - Auto-processing happens during atomic update (e.g., conversation_language_name, locale)
1009
+ - Tab 3 conditional batches respect mode selection (shown/hidden based on git_strategy.mode)
1010
+
1011
+ Tab completion order (recommended):
1012
+ - Tab 1 (REQUIRED): Foundation language settings
1013
+ - Tab 2: Project metadata
1014
+ - Tab 3: Git workflow strategy (includes GitHub Profile)
1015
+ - Tab 4: Quality principles
1016
+ - Tab 5: System integration
1017
+ ```
1018
+
1019
+ ### Tab Schema Structure
1020
+
1021
+ ```json
1022
+ {
1023
+ "version": "1.0.0",
1024
+ "tabs": [
1025
+ {
1026
+ "id": "tab_1_user_language",
1027
+ "label": "Tab 1: User & Language",
1028
+ "batches": [
1029
+ {
1030
+ "batch_id": "1.1",
1031
+ "questions": [
1032
+ {
1033
+ "question": "...",
1034
+ "header": "...",
1035
+ "field": "user.name",
1036
+ "type": "text_input|select_single|select_multiple|number_input",
1037
+ "multiSelect": false,
1038
+ "options": [...],
1039
+ "current_value": "...",
1040
+ "required": true
1041
+ }
1042
+ ]
1043
+ }
1044
+ ]
1045
+ }
1046
+ ],
1047
+ "navigation_flow": {
1048
+ "completion_order": ["tab_1", "tab_2", "tab_3", "tab_4", "tab_5"],
1049
+ "validation_sequence": [
1050
+ "Tab 1 checkpoint",
1051
+ "Tab 3 checkpoint",
1052
+ "Final validation"
1053
+ ]
1054
+ }
1055
+ }
1056
+ ```
1057
+
1058
+ ### Critical Rules
1059
+
1060
+ MANDATORY:
1061
+
1062
+ - Execute ONLY ONE tab per command invocation (unless user specifies "all tabs")
1063
+ - READ language context from config.yaml before starting SETTINGS MODE
1064
+ - Run validation at Tab 1, Tab 3, and before final update
1065
+ - Delegate config update to UnifiedConfigManager from moai-workflow-project (no direct backup in command)
1066
+ - Report all changes made
1067
+ - Use AskUserQuestion for ALL user interaction
1068
+
1069
+ Configuration Priority:
1070
+
1071
+ - `.moai/config/config.yaml` settings ALWAYS take priority
1072
+ - Existing language settings respected unless user explicitly requests change in Tab 1
1073
+ - Fresh installs: Language already set by moai-adk CLI, skip language selection
1074
+
1075
+ Language:
1076
+
1077
+ - Tab schema stored in English (technical field names)
1078
+ - All user-facing questions in user's conversation_language
1079
+ - AskUserQuestion must use user's conversation_language for ALL fields
1080
+
1081
+ ---
1082
+
1083
+ ## PHASE 2.5: Save Phase Context
1084
+
1085
+ Goal: Persist phase execution results for explicit context passing to subsequent commands.
1086
+
1087
+ ### Step 1: Extract Context from Agent Response
1088
+
1089
+ After manager-project agent completes, extract the following information:
1090
+
1091
+ - Project metadata: name, description, language
1092
+ - Files created: List of generated files with absolute paths
1093
+ - Tech stack: Primary codebase language
1094
+ - Next phase: Recommended next command (1-plan)
1095
+
1096
+ ### Step 2: Delegate Context Saving to manager-project
1097
+
1098
+ The manager-project agent handles all context saving:
1099
+
1100
+ ```markdown
1101
+ Context data to persist:
1102
+
1103
+ - Phase: "0-project"
1104
+ - Mode: INITIALIZATION|AUTO-DETECT|SETTINGS|UPDATE
1105
+ - Timestamp: ISO8601 UTC
1106
+ - Status: completed|failed
1107
+ - Outputs:
1108
+ - project_name
1109
+ - project_description
1110
+ - language (conversation_language)
1111
+ - tech_stack (detected primary language)
1112
+ - github_profile (from Tab 3)
1113
+ - Files created: [list of absolute paths]
1114
+ - Next phase: "1-plan"
1115
+
1116
+ Agent delegates to UnifiedConfigManager from moai-workflow-project:
1117
+
1118
+ - Save context via ContextManager
1119
+ - Handle file path validation
1120
+ - Implement error recovery (non-blocking)
1121
+ - Report success/failure
1122
+ ```
1123
+
1124
+ Error Handling Strategy:
1125
+
1126
+ - Context save failures should NOT block command completion
1127
+ - Log clear warning messages for debugging
1128
+ - Allow user to retry manually if needed
1129
+
1130
+ ---
1131
+
1132
+ ## PHASE 3: Completion & Next Steps
1133
+
1134
+ Goal: Guide user to next action in their selected language.
1135
+
1136
+ ### Step 1: Display Completion Status
1137
+
1138
+ Show mode-specific completion message in user's language:
1139
+
1140
+ - INITIALIZATION: "Project initialization complete"
1141
+ - AUTO-DETECT: Configuration review/modification complete
1142
+ - SETTINGS: "Settings updated successfully"
1143
+ - UPDATE: "Templates optimized and updated"
1144
+
1145
+ ### Step 2: Offer Next Steps
1146
+
1147
+ Use AskUserQuestion in user's language:
1148
+
1149
+ - From Initialization: Write SPEC / Review Structure / New Session
1150
+ - From Settings: Continue Settings / Sync Documentation / Exit
1151
+ - From Update: Review Changes / Modify Settings / Exit
1152
+
1153
+ Critical: NO EMOJIS in AskUserQuestion fields. Use clear text only.
1154
+
1155
+ ---
1156
+
1157
+ ## Critical Rules
1158
+
1159
+ ### Mode Execution
1160
+
1161
+ [HARD] Execute exactly ONE mode per command invocation.
1162
+
1163
+ WHY: Multi-mode execution causes state inconsistency.
1164
+
1165
+ IMPACT: Executing multiple modes corrupts configuration state.
1166
+
1167
+ Exception: [SOFT] Allow mode switching only when user explicitly selects different mode in SETTINGS tab selection screen.
1168
+
1169
+ ### Language Handling
1170
+
1171
+ [HARD] Always use user's conversation_language for all output and prompts.
1172
+
1173
+ WHY: User comprehension requires language consistency.
1174
+
1175
+ IMPACT: Using wrong language reduces accessibility.
1176
+
1177
+ [HARD] Never skip language confirmation in INITIALIZATION mode.
1178
+
1179
+ WHY: Language choice determines all subsequent output.
1180
+
1181
+ IMPACT: Missing language selection blocks localized experience.
1182
+
1183
+ [SOFT] Auto-translate announcements after language changes using announcement_translator.py.
1184
+
1185
+ WHY: Announcements should reflect user's selected language.
1186
+
1187
+ ### Agent Delegation
1188
+
1189
+ [HARD] Delegate ALL execution to manager-project agent.
1190
+
1191
+ WHY: Agent provides specialized expertise and validation.
1192
+
1193
+ IMPACT: Direct execution bypasses error recovery and consistency checks.
1194
+
1195
+ [HARD] Route to correct mode based on command argument analysis.
1196
+
1197
+ WHY: Correct routing enables appropriate workflow.
1198
+
1199
+ IMPACT: Wrong routing causes unexpected behavior.
1200
+
1201
+ ### User Interaction
1202
+
1203
+ [HARD] Use AskUserQuestion for ALL user interaction at COMMAND level only.
1204
+
1205
+ WHY: Subagents invoked via Task() operate in isolated, stateless contexts and cannot interact with users. AskUserQuestion requires real-time user response which subagents cannot receive.
1206
+
1207
+ IMPACT: Attempting AskUserQuestion in subagents causes workflow failures or silent failures.
1208
+
1209
+ [HARD] Collect all user choices via AskUserQuestion BEFORE delegating to agents.
1210
+
1211
+ WHY: Subagents need pre-collected user decisions to execute without interaction.
1212
+
1213
+ IMPACT: Missing parameters force subagents to make assumptions or fail.
1214
+
1215
+ [HARD] Pass user choices as parameters when invoking Task().
1216
+
1217
+ WHY: Agents must receive all necessary context at invocation time since they cannot request more.
1218
+
1219
+ IMPACT: Incomplete context causes agents to fail or produce incorrect results.
1220
+
1221
+ [HARD] Never include EMOJI characters in AskUserQuestion fields.
1222
+
1223
+ WHY: Emoji parsing varies across platforms and may cause display issues.
1224
+
1225
+ IMPACT: Platform inconsistencies create confusing user experience.
1226
+
1227
+ [HARD] Maximum 4 options per AskUserQuestion question.
1228
+
1229
+ WHY: Tool constraint limits options to 4 per question.
1230
+
1231
+ IMPACT: Exceeding 4 options causes tool execution failure. Use multi-step questions for more choices.
1232
+
1233
+ ### Tool Usage Constraints
1234
+
1235
+ [HARD] Use ONLY Task() for agent orchestration and AskUserQuestion() for interaction.
1236
+
1237
+ WHY: Direct tool usage bypasses agent expertise.
1238
+
1239
+ IMPACT: Tool misuse causes validation and consistency failures.
1240
+
1241
+ Prohibited Direct Tools:
1242
+
1243
+ - NO Read for file operations
1244
+ - NO Write for file creation or modification
1245
+ - NO Edit for configuration changes
1246
+ - NO Bash for command execution
1247
+ - NO TodoWrite for task management
1248
+
1249
+ All tool-based operations delegate to manager-project agent.
1250
+
1251
+ ### Configuration Management
1252
+
1253
+ [HARD] .moai/config/config.yaml settings ALWAYS take priority over defaults.
1254
+
1255
+ WHY: Existing configuration represents user intent.
1256
+
1257
+ IMPACT: Ignoring existing config causes destructive overwrites.
1258
+
1259
+ [SOFT] Respect existing language settings unless user explicitly requests change via SETTINGS Tab 1.
1260
+
1261
+ WHY: Unexpected language changes disrupt user workflow.
1262
+
1263
+ IMPACT: Automatic changes without user consent reduce trust.
1264
+
1265
+ [SOFT] For fresh installs: language selection occurs FIRST before other configuration.
1266
+
1267
+ WHY: Language choice affects all subsequent interactions.
1268
+
1269
+ IMPACT: Deferred language selection complicates initial setup.
1270
+
1271
+ ---
1272
+
1273
+ ## Output Format
1274
+
1275
+ Responses and status reports must follow structured XML format for clarity and automated processing:
1276
+
1277
+ <analysis>
1278
+ Context assessment including detected mode, language context, and user command arguments.
1279
+ Example: "Detected AUTO-DETECT mode, user language is Korean (ko), existing config found at .moai/config/config.yaml"
1280
+ </analysis>
1281
+
1282
+ <approach>
1283
+ Execution strategy selected based on analysis, including manager-project agent invocation parameters.
1284
+ Example: "Delegating to manager-project agent with AUTO-DETECT mode context, language: ko, requesting settings review"
1285
+ </approach>
1286
+
1287
+ <phase>
1288
+ Current execution phase (Phase 1, Phase 2, Phase 2.5, or Phase 3) with step-by-step progress.
1289
+ Example: "Phase 2: Execute AUTO-DETECT Mode - Displaying current configuration and offering modification options"
1290
+ </phase>
1291
+
1292
+ <verification>
1293
+ Quality checks and validation results at checkpoints, including language validation and configuration consistency checks.
1294
+ Example: "Language validation passed (ko is valid), configuration loaded successfully, ready for user interaction"
1295
+ </verification>
1296
+
1297
+ <completion>
1298
+ Mode-specific completion summary with files created, settings modified, and next recommended action.
1299
+ Example: "Settings updated successfully. Modified 4 fields: user.name, conversation_language, language_name [auto], agent_prompt_language. Recommend next step: /moai:1-plan"
1300
+ </completion>
1301
+
1302
+ WHY: Structured output enables automated parsing and consistent status tracking across command executions.
1303
+
1304
+ IMPACT: Unstructured output reduces ability to track execution state and causes user confusion about command progress.
1305
+
1306
+ ---
1307
+
1308
+ ## Quick Reference
1309
+
1310
+ | Scenario | Mode | Entry Point | Key Phases |
1311
+ | -------------------- | -------------- | --------------------------------- | -------------------------------------------------------------- |
1312
+ | First-time setup | INITIALIZATION | `/moai:0-project` (no config) | Read language → Interview → Docs |
1313
+ | Existing project | AUTO-DETECT | `/moai:0-project` (config exists) | Read language → Display → Options |
1314
+ | Modify config | SETTINGS | `/moai:0-project setting` | Interactive tab selection → Conditional batches → Skill update |
1315
+ | After package update | UPDATE | `/moai:0-project update` | Preserve language → Template merge → Announce |
1316
+
1317
+ Associated Skills:
1318
+
1319
+ - moai-workflow-project - Unified project management skill providing:
1320
+ - Language selection/change
1321
+ - Config operations (atomic updates, backup/rollback)
1322
+ - Template merging
1323
+ - Tab-based batch questions
1324
+
1325
+ Project Documentation Directory:
1326
+
1327
+ - Location: `.moai/project/` (singular, NOT `.moai/projects/`)
1328
+ - Files: `product.md`, `structure.md`, `tech.md` (auto-generated or interactive)
1329
+ - Language: Auto-translated to user's conversation_language
1330
+
1331
+ Version: 2.0.0 (Tab-based Configuration with Conditional Batches & Fixed Field Alignment)
1332
+ Last Updated: 2025-11-19
1333
+ Architecture: Commands → Agents → Skills (Complete delegation, no direct backup in command)
1334
+ Tab Schema: Available in moai-workflow-project skill (v2.0.0)
1335
+ Improvements in v2.0.0:
1336
+
1337
+ - Removed `[tab_ID]` argument → Always use interactive tab selection
1338
+ - Added git_strategy.mode selection (Batch 3.0) with Personal/Team/Hybrid conditional logic
1339
+ - Expanded Tab 3: 16 → 29 settings (+81%)
1340
+ - Fixed 26 outdated/incorrect field names (checkpoint_enabled→auto_checkpoint, etc)
1341
+ - Enhanced validation checkpoints: 3 → 6 rules
1342
+ - Total coverage: 41 → 57 settings (+39%)
1343
+
1344
+ ---
1345
+
1346
+ ## Final Step: Next Action Selection
1347
+
1348
+ After command execution completes, use AskUserQuestion tool to guide user to next action:
1349
+
1350
+ ```python
1351
+ AskUserQuestion({
1352
+ "questions": [{
1353
+ "question": "Project setup is complete. What would you like to do next?",
1354
+ "header": "Next Steps",
1355
+ "multiSelect": false,
1356
+ "options": [
1357
+ {
1358
+ "label": "Write Specification",
1359
+ "description": "Execute /moai:1-plan to define feature specifications"
1360
+ },
1361
+ {
1362
+ "label": "Review Project Structure",
1363
+ "description": "Check current project status and settings"
1364
+ },
1365
+ {
1366
+ "label": "Start New Session",
1367
+ "description": "Initialize workspace and start fresh"
1368
+ }
1369
+ ]
1370
+ }]
1371
+ })
1372
+ ```
1373
+
1374
+ Important:
1375
+
1376
+ - Use conversation language from config
1377
+ - No emojis in any AskUserQuestion fields
1378
+ - Always provide clear next step options
1379
+
1380
+ ## EXECUTION DIRECTIVE
1381
+
1382
+ You must NOW execute the command following the "Execution Philosophy" described above.
1383
+
1384
+ 1. Analyze the subcommand/context.
1385
+ 2. Use the manager-project subagent to handle project setup.
1386
+ 3. Do NOT just describe what you will do. DO IT.