moai-adk 0.8.0__py3-none-any.whl → 1.1.0__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.
Files changed (881) hide show
  1. moai_adk/__init__.py +2 -6
  2. moai_adk/__main__.py +267 -21
  3. moai_adk/astgrep/__init__.py +37 -0
  4. moai_adk/astgrep/analyzer.py +522 -0
  5. moai_adk/astgrep/models.py +124 -0
  6. moai_adk/astgrep/rules.py +179 -0
  7. moai_adk/cli/__init__.py +6 -2
  8. moai_adk/cli/commands/__init__.py +1 -4
  9. moai_adk/cli/commands/analyze.py +125 -0
  10. moai_adk/cli/commands/doctor.py +24 -6
  11. moai_adk/cli/commands/init.py +437 -57
  12. moai_adk/cli/commands/language.py +254 -0
  13. moai_adk/cli/commands/rank.py +449 -0
  14. moai_adk/cli/commands/status.py +15 -14
  15. moai_adk/cli/commands/switch.py +325 -0
  16. moai_adk/cli/commands/update.py +2195 -93
  17. moai_adk/cli/main.py +3 -2
  18. moai_adk/cli/prompts/init_prompts.py +457 -108
  19. moai_adk/cli/prompts/translations/__init__.py +573 -0
  20. moai_adk/cli/spec_status.py +263 -0
  21. moai_adk/cli/ui/__init__.py +44 -0
  22. moai_adk/cli/ui/progress.py +422 -0
  23. moai_adk/cli/ui/prompts.py +448 -0
  24. moai_adk/cli/ui/theme.py +129 -0
  25. moai_adk/cli/worktree/__init__.py +27 -0
  26. moai_adk/cli/worktree/__main__.py +31 -0
  27. moai_adk/cli/worktree/cli.py +788 -0
  28. moai_adk/cli/worktree/exceptions.py +89 -0
  29. moai_adk/cli/worktree/manager.py +648 -0
  30. moai_adk/cli/worktree/models.py +65 -0
  31. moai_adk/cli/worktree/registry.py +422 -0
  32. moai_adk/core/PHASE2_OPTIMIZATIONS.md +467 -0
  33. moai_adk/core/__init__.py +0 -1
  34. moai_adk/core/analysis/__init__.py +9 -0
  35. moai_adk/core/analysis/session_analyzer.py +400 -0
  36. moai_adk/core/claude_integration.py +393 -0
  37. moai_adk/core/command_helpers.py +270 -0
  38. moai_adk/core/comprehensive_monitoring_system.py +1183 -0
  39. moai_adk/core/config/__init__.py +6 -0
  40. moai_adk/core/config/migration.py +148 -17
  41. moai_adk/core/config/unified.py +617 -0
  42. moai_adk/core/context_manager.py +273 -0
  43. moai_adk/core/credentials.py +264 -0
  44. moai_adk/core/diagnostics/slash_commands.py +0 -1
  45. moai_adk/core/enterprise_features.py +1404 -0
  46. moai_adk/core/error_recovery_system.py +1920 -0
  47. moai_adk/core/event_driven_hook_system.py +1371 -0
  48. moai_adk/core/git/__init__.py +8 -1
  49. moai_adk/core/git/branch.py +0 -1
  50. moai_adk/core/git/branch_manager.py +2 -10
  51. moai_adk/core/git/checkpoint.py +1 -7
  52. moai_adk/core/git/commit.py +0 -1
  53. moai_adk/core/git/conflict_detector.py +422 -0
  54. moai_adk/core/git/event_detector.py +16 -7
  55. moai_adk/core/git/manager.py +91 -2
  56. moai_adk/core/input_validation_middleware.py +1006 -0
  57. moai_adk/core/integration/__init__.py +22 -0
  58. moai_adk/core/integration/engine.py +157 -0
  59. moai_adk/core/integration/integration_tester.py +226 -0
  60. moai_adk/core/integration/models.py +88 -0
  61. moai_adk/core/integration/utils.py +211 -0
  62. moai_adk/core/issue_creator.py +305 -0
  63. moai_adk/core/jit_context_loader.py +956 -0
  64. moai_adk/core/jit_enhanced_hook_manager.py +1987 -0
  65. moai_adk/core/language_config.py +202 -0
  66. moai_adk/core/language_config_resolver.py +578 -0
  67. moai_adk/core/language_validator.py +543 -0
  68. moai_adk/core/mcp/setup.py +116 -0
  69. moai_adk/core/merge/__init__.py +9 -0
  70. moai_adk/core/merge/analyzer.py +666 -0
  71. moai_adk/core/migration/__init__.py +18 -0
  72. moai_adk/core/migration/alfred_to_moai_migrator.py +389 -0
  73. moai_adk/core/migration/backup_manager.py +327 -0
  74. moai_adk/core/migration/custom_element_scanner.py +358 -0
  75. moai_adk/core/migration/file_migrator.py +381 -0
  76. moai_adk/core/migration/interactive_checkbox_ui.py +499 -0
  77. moai_adk/core/migration/selective_restorer.py +470 -0
  78. moai_adk/core/migration/template_utils.py +74 -0
  79. moai_adk/core/migration/user_selection_ui.py +338 -0
  80. moai_adk/core/migration/version_detector.py +243 -0
  81. moai_adk/core/migration/version_migrator.py +263 -0
  82. moai_adk/core/model_allocator.py +241 -0
  83. moai_adk/core/performance/__init__.py +6 -0
  84. moai_adk/core/performance/cache_system.py +316 -0
  85. moai_adk/core/performance/parallel_processor.py +116 -0
  86. moai_adk/core/phase_optimized_hook_scheduler.py +879 -0
  87. moai_adk/core/project/__init__.py +0 -1
  88. moai_adk/core/project/backup_utils.py +13 -8
  89. moai_adk/core/project/checker.py +2 -4
  90. moai_adk/core/project/detector.py +189 -22
  91. moai_adk/core/project/initializer.py +177 -29
  92. moai_adk/core/project/phase_executor.py +482 -48
  93. moai_adk/core/project/validator.py +22 -32
  94. moai_adk/core/quality/__init__.py +1 -1
  95. moai_adk/core/quality/trust_checker.py +66 -110
  96. moai_adk/core/quality/validators/__init__.py +1 -1
  97. moai_adk/core/quality/validators/base_validator.py +1 -1
  98. moai_adk/core/realtime_monitoring_dashboard.py +1724 -0
  99. moai_adk/core/robust_json_parser.py +611 -0
  100. moai_adk/core/rollback_manager.py +953 -0
  101. moai_adk/core/session_manager.py +651 -0
  102. moai_adk/core/skill_loading_system.py +579 -0
  103. moai_adk/core/spec_status_manager.py +478 -0
  104. moai_adk/core/template/__init__.py +0 -1
  105. moai_adk/core/template/backup.py +168 -21
  106. moai_adk/core/template/config.py +141 -45
  107. moai_adk/core/template/languages.py +0 -1
  108. moai_adk/core/template/merger.py +107 -32
  109. moai_adk/core/template/processor.py +1075 -74
  110. moai_adk/core/template_engine.py +319 -0
  111. moai_adk/core/template_variable_synchronizer.py +431 -0
  112. moai_adk/core/unified_permission_manager.py +745 -0
  113. moai_adk/core/user_behavior_analytics.py +851 -0
  114. moai_adk/core/version_sync.py +477 -0
  115. moai_adk/foundation/__init__.py +37 -0
  116. moai_adk/foundation/backend.py +1027 -0
  117. moai_adk/foundation/database.py +1115 -0
  118. moai_adk/foundation/devops.py +1585 -0
  119. moai_adk/foundation/ears.py +431 -0
  120. moai_adk/foundation/frontend.py +870 -0
  121. moai_adk/foundation/git/__init__.py +376 -0
  122. moai_adk/foundation/git/commit_templates.py +557 -0
  123. moai_adk/foundation/langs.py +484 -0
  124. moai_adk/foundation/ml_ops.py +1162 -0
  125. moai_adk/foundation/testing.py +1524 -0
  126. moai_adk/foundation/trust/trust_principles.py +676 -0
  127. moai_adk/foundation/trust/validation_checklist.py +1573 -0
  128. moai_adk/loop/__init__.py +54 -0
  129. moai_adk/loop/controller.py +305 -0
  130. moai_adk/loop/feedback.py +230 -0
  131. moai_adk/loop/state.py +209 -0
  132. moai_adk/loop/storage.py +220 -0
  133. moai_adk/lsp/__init__.py +70 -0
  134. moai_adk/lsp/client.py +320 -0
  135. moai_adk/lsp/models.py +261 -0
  136. moai_adk/lsp/protocol.py +404 -0
  137. moai_adk/lsp/server_manager.py +248 -0
  138. moai_adk/project/__init__.py +0 -0
  139. moai_adk/project/configuration.py +1091 -0
  140. moai_adk/project/documentation.py +566 -0
  141. moai_adk/project/schema.py +447 -0
  142. moai_adk/py.typed +0 -0
  143. moai_adk/ralph/__init__.py +37 -0
  144. moai_adk/ralph/engine.py +307 -0
  145. moai_adk/rank/__init__.py +21 -0
  146. moai_adk/rank/auth.py +425 -0
  147. moai_adk/rank/client.py +557 -0
  148. moai_adk/rank/config.py +147 -0
  149. moai_adk/rank/hook.py +1503 -0
  150. moai_adk/rank/py.typed +0 -0
  151. moai_adk/statusline/__init__.py +41 -0
  152. moai_adk/statusline/alfred_detector.py +105 -0
  153. moai_adk/statusline/config.py +376 -0
  154. moai_adk/statusline/enhanced_output_style_detector.py +372 -0
  155. moai_adk/statusline/git_collector.py +190 -0
  156. moai_adk/statusline/main.py +341 -0
  157. moai_adk/statusline/memory_collector.py +268 -0
  158. moai_adk/statusline/metrics_tracker.py +78 -0
  159. moai_adk/statusline/renderer.py +359 -0
  160. moai_adk/statusline/update_checker.py +129 -0
  161. moai_adk/statusline/version_reader.py +741 -0
  162. moai_adk/tag_system/__init__.py +48 -0
  163. moai_adk/tag_system/atomic_ops.py +117 -0
  164. moai_adk/tag_system/linkage.py +335 -0
  165. moai_adk/tag_system/parser.py +176 -0
  166. moai_adk/tag_system/validator.py +200 -0
  167. moai_adk/templates/.claude/agents/moai/builder-agent.md +490 -0
  168. moai_adk/templates/.claude/agents/moai/builder-command.md +1218 -0
  169. moai_adk/templates/.claude/agents/moai/builder-plugin.md +763 -0
  170. moai_adk/templates/.claude/agents/moai/builder-skill.md +682 -0
  171. moai_adk/templates/.claude/agents/moai/expert-backend.md +963 -0
  172. moai_adk/templates/.claude/agents/moai/expert-debug.md +407 -0
  173. moai_adk/templates/.claude/agents/moai/expert-devops.md +722 -0
  174. moai_adk/templates/.claude/agents/moai/expert-frontend.md +748 -0
  175. moai_adk/templates/.claude/agents/moai/expert-performance.md +661 -0
  176. moai_adk/templates/.claude/agents/moai/expert-refactoring.md +228 -0
  177. moai_adk/templates/.claude/agents/moai/expert-security.md +525 -0
  178. moai_adk/templates/.claude/agents/moai/expert-testing.md +737 -0
  179. moai_adk/templates/.claude/agents/moai/manager-claude-code.md +438 -0
  180. moai_adk/templates/.claude/agents/moai/manager-docs.md +578 -0
  181. moai_adk/templates/.claude/agents/moai/manager-git.md +1092 -0
  182. moai_adk/templates/.claude/agents/moai/manager-project.md +971 -0
  183. moai_adk/templates/.claude/agents/moai/manager-quality.md +641 -0
  184. moai_adk/templates/.claude/agents/moai/manager-spec.md +815 -0
  185. moai_adk/templates/.claude/agents/moai/manager-strategy.md +811 -0
  186. moai_adk/templates/.claude/agents/moai/manager-tdd.md +797 -0
  187. moai_adk/templates/.claude/commands/moai/0-project.md +438 -0
  188. moai_adk/templates/.claude/commands/moai/1-plan.md +1447 -0
  189. moai_adk/templates/.claude/commands/moai/2-run.md +850 -0
  190. moai_adk/templates/.claude/commands/moai/3-sync.md +1398 -0
  191. moai_adk/templates/.claude/commands/moai/9-feedback.md +330 -0
  192. moai_adk/templates/.claude/commands/moai/alfred.md +339 -0
  193. moai_adk/templates/.claude/commands/moai/cancel-loop.md +163 -0
  194. moai_adk/templates/.claude/commands/moai/fix.md +264 -0
  195. moai_adk/templates/.claude/commands/moai/loop.md +363 -0
  196. moai_adk/templates/.claude/hooks/__init__.py +8 -0
  197. moai_adk/templates/.claude/hooks/moai/__init__.py +8 -0
  198. moai_adk/templates/.claude/hooks/moai/lib/README.md +143 -0
  199. moai_adk/templates/.claude/hooks/moai/lib/__init__.py +41 -0
  200. moai_adk/templates/.claude/hooks/moai/lib/alfred_detector.py +105 -0
  201. moai_adk/templates/.claude/hooks/moai/lib/atomic_write.py +122 -0
  202. moai_adk/templates/.claude/hooks/{alfred/core → moai/lib}/checkpoint.py +13 -37
  203. moai_adk/templates/.claude/hooks/moai/lib/common.py +161 -0
  204. moai_adk/templates/.claude/hooks/moai/lib/config.py +376 -0
  205. moai_adk/templates/.claude/hooks/moai/lib/config_manager.py +442 -0
  206. moai_adk/templates/.claude/hooks/moai/lib/config_validator.py +639 -0
  207. moai_adk/templates/.claude/hooks/moai/lib/enhanced_output_style_detector.py +372 -0
  208. moai_adk/templates/.claude/hooks/moai/lib/example_config.json +104 -0
  209. moai_adk/templates/.claude/hooks/moai/lib/exceptions.py +171 -0
  210. moai_adk/templates/.claude/hooks/moai/lib/file_utils.py +95 -0
  211. moai_adk/templates/.claude/hooks/moai/lib/git_collector.py +190 -0
  212. moai_adk/templates/.claude/hooks/moai/lib/git_operations_manager.py +592 -0
  213. moai_adk/templates/.claude/hooks/moai/lib/language_detector.py +298 -0
  214. moai_adk/templates/.claude/hooks/moai/lib/language_validator.py +417 -0
  215. moai_adk/templates/.claude/hooks/moai/lib/main.py +341 -0
  216. moai_adk/templates/.claude/hooks/moai/lib/memory_collector.py +268 -0
  217. moai_adk/templates/.claude/hooks/moai/lib/metrics_tracker.py +78 -0
  218. moai_adk/templates/.claude/hooks/moai/lib/models.py +104 -0
  219. moai_adk/templates/.claude/hooks/moai/lib/path_utils.py +219 -0
  220. moai_adk/templates/.claude/hooks/moai/lib/project.py +777 -0
  221. moai_adk/templates/.claude/hooks/moai/lib/renderer.py +359 -0
  222. moai_adk/templates/.claude/hooks/moai/lib/tag_linkage.py +333 -0
  223. moai_adk/templates/.claude/hooks/moai/lib/tag_parser.py +176 -0
  224. moai_adk/templates/.claude/hooks/moai/lib/tag_validator.py +200 -0
  225. moai_adk/templates/.claude/hooks/moai/lib/test_hooks_improvements.py +443 -0
  226. moai_adk/templates/.claude/hooks/moai/lib/timeout.py +160 -0
  227. moai_adk/templates/.claude/hooks/moai/lib/tool_registry.py +896 -0
  228. moai_adk/templates/.claude/hooks/moai/lib/unified_timeout_manager.py +542 -0
  229. moai_adk/templates/.claude/hooks/moai/lib/update_checker.py +129 -0
  230. moai_adk/templates/.claude/hooks/moai/lib/version_reader.py +741 -0
  231. moai_adk/templates/.claude/hooks/moai/post_tool__ast_grep_scan.py +276 -0
  232. moai_adk/templates/.claude/hooks/moai/post_tool__code_formatter.py +255 -0
  233. moai_adk/templates/.claude/hooks/moai/post_tool__coverage_guard.py +325 -0
  234. moai_adk/templates/.claude/hooks/moai/post_tool__linter.py +315 -0
  235. moai_adk/templates/.claude/hooks/moai/post_tool__lsp_diagnostic.py +508 -0
  236. moai_adk/templates/.claude/hooks/moai/pre_commit__tag_validator.py +287 -0
  237. moai_adk/templates/.claude/hooks/moai/pre_tool__security_guard.py +268 -0
  238. moai_adk/templates/.claude/hooks/moai/pre_tool__tdd_enforcer.py +208 -0
  239. moai_adk/templates/.claude/hooks/moai/session_end__auto_cleanup.py +894 -0
  240. moai_adk/templates/.claude/hooks/moai/session_end__rank_submit.py +69 -0
  241. moai_adk/templates/.claude/hooks/moai/session_start__show_project_info.py +1170 -0
  242. moai_adk/templates/.claude/hooks/moai/shared/utils/announcement_translator.py +206 -0
  243. moai_adk/templates/.claude/hooks/moai/stop__loop_controller.py +621 -0
  244. moai_adk/templates/.claude/output-styles/moai/alfred.md +758 -0
  245. moai_adk/templates/.claude/output-styles/moai/r2d2.md +643 -0
  246. moai_adk/templates/.claude/output-styles/moai/yoda.md +359 -0
  247. moai_adk/templates/.claude/settings.json +177 -72
  248. moai_adk/templates/.claude/skills/moai-docs-generation/SKILL.md +303 -0
  249. moai_adk/templates/.claude/skills/moai-docs-generation/examples.md +252 -0
  250. moai_adk/templates/.claude/skills/moai-docs-generation/modules/README.md +56 -0
  251. moai_adk/templates/.claude/skills/moai-docs-generation/modules/api-documentation.md +120 -0
  252. moai_adk/templates/.claude/skills/moai-docs-generation/modules/code-documentation.md +152 -0
  253. moai_adk/templates/.claude/skills/moai-docs-generation/modules/multi-format-output.md +185 -0
  254. moai_adk/templates/.claude/skills/moai-docs-generation/modules/user-guides.md +207 -0
  255. moai_adk/templates/.claude/skills/moai-docs-generation/reference.md +234 -0
  256. moai_adk/templates/.claude/skills/moai-domain-backend/SKILL.md +132 -281
  257. moai_adk/templates/.claude/skills/moai-domain-backend/examples.md +610 -1525
  258. moai_adk/templates/.claude/skills/moai-domain-backend/reference.md +423 -619
  259. moai_adk/templates/.claude/skills/moai-domain-database/SKILL.md +133 -77
  260. moai_adk/templates/.claude/skills/moai-domain-database/examples.md +817 -16
  261. moai_adk/templates/.claude/skills/moai-domain-database/modules/README.md +53 -0
  262. moai_adk/templates/.claude/skills/moai-domain-database/modules/mongodb.md +231 -0
  263. moai_adk/templates/.claude/skills/moai-domain-database/modules/postgresql.md +169 -0
  264. moai_adk/templates/.claude/skills/moai-domain-database/modules/redis.md +262 -0
  265. moai_adk/templates/.claude/skills/moai-domain-database/reference.md +532 -17
  266. moai_adk/templates/.claude/skills/moai-domain-frontend/SKILL.md +91 -78
  267. moai_adk/templates/.claude/skills/moai-domain-frontend/examples.md +955 -16
  268. moai_adk/templates/.claude/skills/moai-domain-frontend/modules/component-architecture.md +723 -0
  269. moai_adk/templates/.claude/skills/moai-domain-frontend/modules/nextjs16-patterns.md +713 -0
  270. moai_adk/templates/.claude/skills/moai-domain-frontend/modules/performance-optimization.md +694 -0
  271. moai_adk/templates/.claude/skills/moai-domain-frontend/modules/react19-patterns.md +591 -0
  272. moai_adk/templates/.claude/skills/moai-domain-frontend/modules/state-management.md +680 -0
  273. moai_adk/templates/.claude/skills/moai-domain-frontend/modules/vue35-patterns.md +802 -0
  274. moai_adk/templates/.claude/skills/moai-domain-frontend/reference.md +651 -18
  275. moai_adk/templates/.claude/skills/moai-domain-uiux/SKILL.md +234 -0
  276. moai_adk/templates/.claude/skills/moai-domain-uiux/examples.md +560 -0
  277. moai_adk/templates/.claude/skills/moai-domain-uiux/modules/accessibility-wcag.md +260 -0
  278. moai_adk/templates/.claude/skills/moai-domain-uiux/modules/component-architecture.md +228 -0
  279. moai_adk/templates/.claude/skills/moai-domain-uiux/modules/icon-libraries.md +401 -0
  280. moai_adk/templates/.claude/skills/moai-domain-uiux/modules/theming-system.md +373 -0
  281. moai_adk/templates/.claude/skills/moai-domain-uiux/reference.md +243 -0
  282. moai_adk/templates/.claude/skills/moai-formats-data/SKILL.md +189 -0
  283. moai_adk/templates/.claude/skills/moai-formats-data/examples.md +804 -0
  284. moai_adk/templates/.claude/skills/moai-formats-data/modules/README.md +327 -0
  285. moai_adk/templates/.claude/skills/moai-formats-data/modules/SKILL-MODULARIZATION-TEMPLATE.md +278 -0
  286. moai_adk/templates/.claude/skills/moai-formats-data/modules/caching-performance.md +459 -0
  287. moai_adk/templates/.claude/skills/moai-formats-data/modules/data-validation.md +485 -0
  288. moai_adk/templates/.claude/skills/moai-formats-data/modules/json-optimization.md +374 -0
  289. moai_adk/templates/.claude/skills/moai-formats-data/modules/toon-encoding.md +308 -0
  290. moai_adk/templates/.claude/skills/moai-formats-data/reference.md +585 -0
  291. moai_adk/templates/.claude/skills/moai-foundation-claude/SKILL.md +225 -0
  292. moai_adk/templates/.claude/skills/moai-foundation-claude/examples.md +732 -0
  293. moai_adk/templates/.claude/skills/moai-foundation-claude/reference/advanced-agent-patterns.md +370 -0
  294. moai_adk/templates/.claude/skills/moai-foundation-claude/reference/best-practices-checklist.md +616 -0
  295. moai_adk/templates/.claude/skills/moai-foundation-claude/reference/claude-code-cli-reference-official.md +420 -0
  296. moai_adk/templates/.claude/skills/moai-foundation-claude/reference/claude-code-custom-slash-commands-official.md +739 -0
  297. moai_adk/templates/.claude/skills/moai-foundation-claude/reference/claude-code-devcontainers-official.md +381 -0
  298. moai_adk/templates/.claude/skills/moai-foundation-claude/reference/claude-code-discover-plugins-official.md +379 -0
  299. moai_adk/templates/.claude/skills/moai-foundation-claude/reference/claude-code-headless-official.md +378 -0
  300. moai_adk/templates/.claude/skills/moai-foundation-claude/reference/claude-code-hooks-official.md +670 -0
  301. moai_adk/templates/.claude/skills/moai-foundation-claude/reference/claude-code-iam-official.md +635 -0
  302. moai_adk/templates/.claude/skills/moai-foundation-claude/reference/claude-code-memory-official.md +543 -0
  303. moai_adk/templates/.claude/skills/moai-foundation-claude/reference/claude-code-plugin-marketplaces-official.md +308 -0
  304. moai_adk/templates/.claude/skills/moai-foundation-claude/reference/claude-code-plugins-official.md +640 -0
  305. moai_adk/templates/.claude/skills/moai-foundation-claude/reference/claude-code-sandboxing-official.md +282 -0
  306. moai_adk/templates/.claude/skills/moai-foundation-claude/reference/claude-code-settings-official.md +663 -0
  307. moai_adk/templates/.claude/skills/moai-foundation-claude/reference/claude-code-skills-official.md +467 -0
  308. moai_adk/templates/.claude/skills/moai-foundation-claude/reference/claude-code-statusline-official.md +293 -0
  309. moai_adk/templates/.claude/skills/moai-foundation-claude/reference/claude-code-sub-agents-official.md +420 -0
  310. moai_adk/templates/.claude/skills/moai-foundation-claude/reference/complete-configuration-guide.md +175 -0
  311. moai_adk/templates/.claude/skills/moai-foundation-claude/reference/skill-examples.md +1674 -0
  312. moai_adk/templates/.claude/skills/moai-foundation-claude/reference/skill-formatting-guide.md +729 -0
  313. moai_adk/templates/.claude/skills/moai-foundation-claude/reference/sub-agents/sub-agent-examples.md +1513 -0
  314. moai_adk/templates/.claude/skills/moai-foundation-claude/reference/sub-agents/sub-agent-formatting-guide.md +1086 -0
  315. moai_adk/templates/.claude/skills/moai-foundation-claude/reference/sub-agents/sub-agent-integration-patterns.md +1100 -0
  316. moai_adk/templates/.claude/skills/moai-foundation-claude/reference.md +209 -0
  317. moai_adk/templates/.claude/skills/moai-foundation-context/SKILL.md +221 -0
  318. moai_adk/templates/.claude/skills/moai-foundation-context/examples.md +1048 -0
  319. moai_adk/templates/.claude/skills/moai-foundation-context/reference.md +246 -0
  320. moai_adk/templates/.claude/skills/moai-foundation-core/SKILL.md +242 -0
  321. moai_adk/templates/.claude/skills/moai-foundation-core/examples.md +358 -0
  322. moai_adk/templates/.claude/skills/moai-foundation-core/modules/README.md +296 -0
  323. moai_adk/templates/.claude/skills/moai-foundation-core/modules/agents-reference.md +359 -0
  324. moai_adk/templates/.claude/skills/moai-foundation-core/modules/commands-reference.md +432 -0
  325. moai_adk/templates/.claude/skills/moai-foundation-core/modules/delegation-advanced.md +279 -0
  326. moai_adk/templates/.claude/skills/moai-foundation-core/modules/delegation-implementation.md +267 -0
  327. moai_adk/templates/.claude/skills/moai-foundation-core/modules/delegation-patterns.md +228 -0
  328. moai_adk/templates/.claude/skills/moai-foundation-core/modules/execution-rules.md +687 -0
  329. moai_adk/templates/.claude/skills/moai-foundation-core/modules/modular-system.md +665 -0
  330. moai_adk/templates/.claude/skills/moai-foundation-core/modules/patterns.md +22 -0
  331. moai_adk/templates/.claude/skills/moai-foundation-core/modules/progressive-disclosure.md +649 -0
  332. moai_adk/templates/.claude/skills/moai-foundation-core/modules/spec-ears-format.md +200 -0
  333. moai_adk/templates/.claude/skills/moai-foundation-core/modules/spec-first-tdd.md +171 -0
  334. moai_adk/templates/.claude/skills/moai-foundation-core/modules/spec-tdd-implementation.md +275 -0
  335. moai_adk/templates/.claude/skills/moai-foundation-core/modules/token-optimization.md +708 -0
  336. moai_adk/templates/.claude/skills/moai-foundation-core/modules/trust-5-framework.md +239 -0
  337. moai_adk/templates/.claude/skills/moai-foundation-core/modules/trust-5-implementation.md +244 -0
  338. moai_adk/templates/.claude/skills/moai-foundation-core/modules/trust-5-validation.md +219 -0
  339. moai_adk/templates/.claude/skills/moai-foundation-core/reference.md +478 -0
  340. moai_adk/templates/.claude/skills/moai-foundation-philosopher/SKILL.md +311 -0
  341. moai_adk/templates/.claude/skills/moai-foundation-philosopher/examples.md +228 -0
  342. moai_adk/templates/.claude/skills/moai-foundation-philosopher/modules/assumption-matrix.md +80 -0
  343. moai_adk/templates/.claude/skills/moai-foundation-philosopher/modules/cognitive-bias.md +199 -0
  344. moai_adk/templates/.claude/skills/moai-foundation-philosopher/modules/first-principles.md +140 -0
  345. moai_adk/templates/.claude/skills/moai-foundation-philosopher/modules/trade-off-analysis.md +154 -0
  346. moai_adk/templates/.claude/skills/moai-foundation-philosopher/reference.md +157 -0
  347. moai_adk/templates/.claude/skills/moai-foundation-quality/SKILL.md +180 -0
  348. moai_adk/templates/.claude/skills/moai-foundation-quality/examples.md +1232 -0
  349. moai_adk/templates/.claude/skills/moai-foundation-quality/modules/best-practices.md +261 -0
  350. moai_adk/templates/.claude/skills/moai-foundation-quality/modules/integration-patterns.md +194 -0
  351. moai_adk/templates/.claude/skills/moai-foundation-quality/modules/proactive-analysis.md +229 -0
  352. moai_adk/templates/.claude/skills/moai-foundation-quality/modules/trust5-validation.md +169 -0
  353. moai_adk/templates/.claude/skills/moai-foundation-quality/reference.md +1266 -0
  354. moai_adk/templates/.claude/skills/moai-foundation-quality/scripts/quality-gate.sh +668 -0
  355. moai_adk/templates/.claude/skills/moai-foundation-quality/templates/github-actions-quality.yml +481 -0
  356. moai_adk/templates/.claude/skills/moai-foundation-quality/templates/quality-config.yaml +519 -0
  357. moai_adk/templates/.claude/skills/moai-framework-electron/SKILL.md +288 -0
  358. moai_adk/templates/.claude/skills/moai-framework-electron/examples.md +2082 -0
  359. moai_adk/templates/.claude/skills/moai-framework-electron/reference.md +1649 -0
  360. moai_adk/templates/.claude/skills/moai-lang-cpp/SKILL.md +96 -77
  361. moai_adk/templates/.claude/skills/moai-lang-cpp/examples.md +1226 -16
  362. moai_adk/templates/.claude/skills/moai-lang-cpp/modules/advanced-patterns.md +401 -0
  363. moai_adk/templates/.claude/skills/moai-lang-cpp/reference.md +1119 -14
  364. moai_adk/templates/.claude/skills/moai-lang-csharp/SKILL.md +80 -79
  365. moai_adk/templates/.claude/skills/moai-lang-csharp/examples.md +572 -16
  366. moai_adk/templates/.claude/skills/moai-lang-csharp/modules/aspnet-core.md +627 -0
  367. moai_adk/templates/.claude/skills/moai-lang-csharp/modules/blazor-components.md +767 -0
  368. moai_adk/templates/.claude/skills/moai-lang-csharp/modules/cqrs-validation.md +626 -0
  369. moai_adk/templates/.claude/skills/moai-lang-csharp/modules/csharp12-features.md +580 -0
  370. moai_adk/templates/.claude/skills/moai-lang-csharp/modules/efcore-patterns.md +622 -0
  371. moai_adk/templates/.claude/skills/moai-lang-csharp/reference.md +388 -15
  372. moai_adk/templates/.claude/skills/moai-lang-elixir/SKILL.md +135 -0
  373. moai_adk/templates/.claude/skills/moai-lang-elixir/examples.md +1171 -0
  374. moai_adk/templates/.claude/skills/moai-lang-elixir/modules/advanced-patterns.md +531 -0
  375. moai_adk/templates/.claude/skills/moai-lang-elixir/reference.md +889 -0
  376. moai_adk/templates/.claude/skills/moai-lang-flutter/SKILL.md +104 -0
  377. moai_adk/templates/.claude/skills/moai-lang-flutter/examples.md +1090 -0
  378. moai_adk/templates/.claude/skills/moai-lang-flutter/reference.md +686 -0
  379. moai_adk/templates/.claude/skills/moai-lang-go/SKILL.md +153 -80
  380. moai_adk/templates/.claude/skills/moai-lang-go/examples.md +906 -16
  381. moai_adk/templates/.claude/skills/moai-lang-go/reference.md +721 -15
  382. moai_adk/templates/.claude/skills/moai-lang-java/SKILL.md +117 -80
  383. moai_adk/templates/.claude/skills/moai-lang-java/examples.md +851 -16
  384. moai_adk/templates/.claude/skills/moai-lang-java/reference.md +278 -18
  385. moai_adk/templates/.claude/skills/moai-lang-javascript/SKILL.md +133 -79
  386. moai_adk/templates/.claude/skills/moai-lang-javascript/examples.md +960 -16
  387. moai_adk/templates/.claude/skills/moai-lang-javascript/reference.md +1528 -17
  388. moai_adk/templates/.claude/skills/moai-lang-kotlin/SKILL.md +100 -79
  389. moai_adk/templates/.claude/skills/moai-lang-kotlin/examples.md +993 -16
  390. moai_adk/templates/.claude/skills/moai-lang-kotlin/reference.md +549 -18
  391. moai_adk/templates/.claude/skills/moai-lang-php/SKILL.md +135 -76
  392. moai_adk/templates/.claude/skills/moai-lang-php/examples.md +1595 -16
  393. moai_adk/templates/.claude/skills/moai-lang-php/modules/advanced-patterns.md +538 -0
  394. moai_adk/templates/.claude/skills/moai-lang-php/reference.md +1309 -16
  395. moai_adk/templates/.claude/skills/moai-lang-python/SKILL.md +141 -341
  396. moai_adk/templates/.claude/skills/moai-lang-python/examples.md +849 -496
  397. moai_adk/templates/.claude/skills/moai-lang-python/reference.md +731 -243
  398. moai_adk/templates/.claude/skills/moai-lang-r/SKILL.md +134 -76
  399. moai_adk/templates/.claude/skills/moai-lang-r/examples.md +1141 -16
  400. moai_adk/templates/.claude/skills/moai-lang-r/modules/advanced-patterns.md +489 -0
  401. moai_adk/templates/.claude/skills/moai-lang-r/reference.md +1074 -17
  402. moai_adk/templates/.claude/skills/moai-lang-ruby/SKILL.md +136 -77
  403. moai_adk/templates/.claude/skills/moai-lang-ruby/examples.md +1093 -16
  404. moai_adk/templates/.claude/skills/moai-lang-ruby/modules/advanced-patterns.md +309 -0
  405. moai_adk/templates/.claude/skills/moai-lang-ruby/modules/testing-patterns.md +306 -0
  406. moai_adk/templates/.claude/skills/moai-lang-ruby/reference.md +1010 -17
  407. moai_adk/templates/.claude/skills/moai-lang-rust/SKILL.md +112 -78
  408. moai_adk/templates/.claude/skills/moai-lang-rust/examples.md +646 -16
  409. moai_adk/templates/.claude/skills/moai-lang-rust/reference.md +491 -18
  410. moai_adk/templates/.claude/skills/moai-lang-scala/SKILL.md +113 -75
  411. moai_adk/templates/.claude/skills/moai-lang-scala/examples.md +620 -16
  412. moai_adk/templates/.claude/skills/moai-lang-scala/modules/akka-actors.md +479 -0
  413. moai_adk/templates/.claude/skills/moai-lang-scala/modules/cats-effect.md +489 -0
  414. moai_adk/templates/.claude/skills/moai-lang-scala/modules/functional-programming.md +460 -0
  415. moai_adk/templates/.claude/skills/moai-lang-scala/modules/spark-data.md +498 -0
  416. moai_adk/templates/.claude/skills/moai-lang-scala/modules/zio-patterns.md +541 -0
  417. moai_adk/templates/.claude/skills/moai-lang-scala/reference.md +410 -17
  418. moai_adk/templates/.claude/skills/moai-lang-swift/SKILL.md +88 -83
  419. moai_adk/templates/.claude/skills/moai-lang-swift/examples.md +905 -16
  420. moai_adk/templates/.claude/skills/moai-lang-swift/modules/combine-reactive.md +256 -0
  421. moai_adk/templates/.claude/skills/moai-lang-swift/modules/concurrency.md +270 -0
  422. moai_adk/templates/.claude/skills/moai-lang-swift/modules/swift6-features.md +265 -0
  423. moai_adk/templates/.claude/skills/moai-lang-swift/modules/swiftui-patterns.md +314 -0
  424. moai_adk/templates/.claude/skills/moai-lang-swift/reference.md +659 -17
  425. moai_adk/templates/.claude/skills/moai-lang-typescript/SKILL.md +115 -82
  426. moai_adk/templates/.claude/skills/moai-lang-typescript/examples.md +1076 -16
  427. moai_adk/templates/.claude/skills/moai-lang-typescript/reference.md +718 -21
  428. moai_adk/templates/.claude/skills/moai-library-mermaid/SKILL.md +145 -0
  429. moai_adk/templates/.claude/skills/moai-library-mermaid/examples.md +270 -0
  430. moai_adk/templates/.claude/skills/moai-library-mermaid/modules/advanced-patterns.md +465 -0
  431. moai_adk/templates/.claude/skills/moai-library-mermaid/modules/optimization.md +440 -0
  432. moai_adk/templates/.claude/skills/moai-library-mermaid/reference.md +228 -0
  433. moai_adk/templates/.claude/skills/moai-library-nextra/SKILL.md +143 -0
  434. moai_adk/templates/.claude/skills/moai-library-nextra/examples.md +592 -0
  435. moai_adk/templates/.claude/skills/moai-library-nextra/modules/advanced-deployment-patterns.md +182 -0
  436. moai_adk/templates/.claude/skills/moai-library-nextra/modules/advanced-patterns.md +336 -0
  437. moai_adk/templates/.claude/skills/moai-library-nextra/modules/configuration.md +350 -0
  438. moai_adk/templates/.claude/skills/moai-library-nextra/modules/content-architecture-optimization.md +162 -0
  439. moai_adk/templates/.claude/skills/moai-library-nextra/modules/deployment.md +52 -0
  440. moai_adk/templates/.claude/skills/moai-library-nextra/modules/framework-core-configuration.md +186 -0
  441. moai_adk/templates/.claude/skills/moai-library-nextra/modules/i18n-setup.md +55 -0
  442. moai_adk/templates/.claude/skills/moai-library-nextra/modules/mdx-components.md +52 -0
  443. moai_adk/templates/.claude/skills/moai-library-nextra/modules/optimization.md +303 -0
  444. moai_adk/templates/.claude/skills/moai-library-nextra/reference.md +379 -0
  445. moai_adk/templates/.claude/skills/moai-library-shadcn/SKILL.md +175 -0
  446. moai_adk/templates/.claude/skills/moai-library-shadcn/examples.md +575 -0
  447. moai_adk/templates/.claude/skills/moai-library-shadcn/modules/advanced-patterns.md +394 -0
  448. moai_adk/templates/.claude/skills/moai-library-shadcn/modules/optimization.md +278 -0
  449. moai_adk/templates/.claude/skills/moai-library-shadcn/modules/shadcn-components.md +457 -0
  450. moai_adk/templates/.claude/skills/moai-library-shadcn/modules/shadcn-theming.md +373 -0
  451. moai_adk/templates/.claude/skills/moai-library-shadcn/reference.md +74 -0
  452. moai_adk/templates/.claude/skills/moai-platform-auth0/SKILL.md +284 -0
  453. moai_adk/templates/.claude/skills/moai-platform-auth0/examples.md +2446 -0
  454. moai_adk/templates/.claude/skills/moai-platform-auth0/modules/adaptive-mfa.md +233 -0
  455. moai_adk/templates/.claude/skills/moai-platform-auth0/modules/akamai-integration.md +214 -0
  456. moai_adk/templates/.claude/skills/moai-platform-auth0/modules/application-credentials.md +280 -0
  457. moai_adk/templates/.claude/skills/moai-platform-auth0/modules/attack-protection-log-events.md +224 -0
  458. moai_adk/templates/.claude/skills/moai-platform-auth0/modules/attack-protection-overview.md +140 -0
  459. moai_adk/templates/.claude/skills/moai-platform-auth0/modules/bot-detection.md +144 -0
  460. moai_adk/templates/.claude/skills/moai-platform-auth0/modules/breached-password-detection.md +187 -0
  461. moai_adk/templates/.claude/skills/moai-platform-auth0/modules/brute-force-protection.md +189 -0
  462. moai_adk/templates/.claude/skills/moai-platform-auth0/modules/certifications.md +282 -0
  463. moai_adk/templates/.claude/skills/moai-platform-auth0/modules/compliance-overview.md +263 -0
  464. moai_adk/templates/.claude/skills/moai-platform-auth0/modules/continuous-session-protection.md +307 -0
  465. moai_adk/templates/.claude/skills/moai-platform-auth0/modules/customize-mfa.md +177 -0
  466. moai_adk/templates/.claude/skills/moai-platform-auth0/modules/dpop-implementation.md +283 -0
  467. moai_adk/templates/.claude/skills/moai-platform-auth0/modules/fapi-implementation.md +259 -0
  468. moai_adk/templates/.claude/skills/moai-platform-auth0/modules/gdpr-compliance.md +313 -0
  469. moai_adk/templates/.claude/skills/moai-platform-auth0/modules/guardian-configuration.md +269 -0
  470. moai_adk/templates/.claude/skills/moai-platform-auth0/modules/highly-regulated-identity.md +272 -0
  471. moai_adk/templates/.claude/skills/moai-platform-auth0/modules/jwt-fundamentals.md +248 -0
  472. moai_adk/templates/.claude/skills/moai-platform-auth0/modules/mdl-verification.md +210 -0
  473. moai_adk/templates/.claude/skills/moai-platform-auth0/modules/mfa-api-management.md +278 -0
  474. moai_adk/templates/.claude/skills/moai-platform-auth0/modules/mfa-factors.md +226 -0
  475. moai_adk/templates/.claude/skills/moai-platform-auth0/modules/mfa-overview.md +174 -0
  476. moai_adk/templates/.claude/skills/moai-platform-auth0/modules/mtls-sender-constraining.md +316 -0
  477. moai_adk/templates/.claude/skills/moai-platform-auth0/modules/ropg-flow-mfa.md +216 -0
  478. moai_adk/templates/.claude/skills/moai-platform-auth0/modules/security-center.md +325 -0
  479. moai_adk/templates/.claude/skills/moai-platform-auth0/modules/security-guidance.md +277 -0
  480. moai_adk/templates/.claude/skills/moai-platform-auth0/modules/state-parameters.md +177 -0
  481. moai_adk/templates/.claude/skills/moai-platform-auth0/modules/step-up-authentication.md +251 -0
  482. moai_adk/templates/.claude/skills/moai-platform-auth0/modules/suspicious-ip-throttling.md +240 -0
  483. moai_adk/templates/.claude/skills/moai-platform-auth0/modules/tenant-access-control.md +179 -0
  484. moai_adk/templates/.claude/skills/moai-platform-auth0/modules/webauthn-fido.md +235 -0
  485. moai_adk/templates/.claude/skills/moai-platform-auth0/reference.md +224 -0
  486. moai_adk/templates/.claude/skills/moai-platform-clerk/SKILL.md +135 -0
  487. moai_adk/templates/.claude/skills/moai-platform-clerk/examples.md +1426 -0
  488. moai_adk/templates/.claude/skills/moai-platform-clerk/modules/advanced-patterns.md +417 -0
  489. moai_adk/templates/.claude/skills/moai-platform-clerk/reference.md +273 -0
  490. moai_adk/templates/.claude/skills/moai-platform-convex/SKILL.md +158 -0
  491. moai_adk/templates/.claude/skills/moai-platform-convex/examples.md +506 -0
  492. moai_adk/templates/.claude/skills/moai-platform-convex/modules/auth-integration.md +421 -0
  493. moai_adk/templates/.claude/skills/moai-platform-convex/modules/file-storage.md +474 -0
  494. moai_adk/templates/.claude/skills/moai-platform-convex/modules/reactive-queries.md +302 -0
  495. moai_adk/templates/.claude/skills/moai-platform-convex/modules/server-functions.md +452 -0
  496. moai_adk/templates/.claude/skills/moai-platform-convex/reference.md +385 -0
  497. moai_adk/templates/.claude/skills/moai-platform-firebase-auth/SKILL.md +166 -0
  498. moai_adk/templates/.claude/skills/moai-platform-firebase-auth/examples.md +514 -0
  499. moai_adk/templates/.claude/skills/moai-platform-firebase-auth/modules/custom-claims.md +374 -0
  500. moai_adk/templates/.claude/skills/moai-platform-firebase-auth/modules/phone-auth.md +372 -0
  501. moai_adk/templates/.claude/skills/moai-platform-firebase-auth/modules/social-auth.md +339 -0
  502. moai_adk/templates/.claude/skills/moai-platform-firebase-auth/reference.md +382 -0
  503. moai_adk/templates/.claude/skills/moai-platform-firestore/SKILL.md +127 -0
  504. moai_adk/templates/.claude/skills/moai-platform-firestore/examples.md +445 -0
  505. moai_adk/templates/.claude/skills/moai-platform-firestore/modules/offline-cache.md +392 -0
  506. moai_adk/templates/.claude/skills/moai-platform-firestore/modules/realtime-listeners.md +441 -0
  507. moai_adk/templates/.claude/skills/moai-platform-firestore/modules/security-rules.md +352 -0
  508. moai_adk/templates/.claude/skills/moai-platform-firestore/modules/transactions.md +452 -0
  509. moai_adk/templates/.claude/skills/moai-platform-firestore/reference.md +322 -0
  510. moai_adk/templates/.claude/skills/moai-platform-neon/SKILL.md +156 -0
  511. moai_adk/templates/.claude/skills/moai-platform-neon/examples.md +470 -0
  512. moai_adk/templates/.claude/skills/moai-platform-neon/modules/auto-scaling.md +349 -0
  513. moai_adk/templates/.claude/skills/moai-platform-neon/modules/branching-workflows.md +354 -0
  514. moai_adk/templates/.claude/skills/moai-platform-neon/modules/connection-pooling.md +412 -0
  515. moai_adk/templates/.claude/skills/moai-platform-neon/modules/pitr-backups.md +458 -0
  516. moai_adk/templates/.claude/skills/moai-platform-neon/reference.md +272 -0
  517. moai_adk/templates/.claude/skills/moai-platform-railway/SKILL.md +146 -0
  518. moai_adk/templates/.claude/skills/moai-platform-railway/examples.md +539 -0
  519. moai_adk/templates/.claude/skills/moai-platform-railway/modules/docker-deployment.md +261 -0
  520. moai_adk/templates/.claude/skills/moai-platform-railway/modules/multi-service.md +291 -0
  521. moai_adk/templates/.claude/skills/moai-platform-railway/modules/networking-domains.md +338 -0
  522. moai_adk/templates/.claude/skills/moai-platform-railway/modules/volumes-storage.md +353 -0
  523. moai_adk/templates/.claude/skills/moai-platform-railway/reference.md +374 -0
  524. moai_adk/templates/.claude/skills/moai-platform-supabase/SKILL.md +141 -0
  525. moai_adk/templates/.claude/skills/moai-platform-supabase/examples.md +502 -0
  526. moai_adk/templates/.claude/skills/moai-platform-supabase/modules/auth-integration.md +384 -0
  527. moai_adk/templates/.claude/skills/moai-platform-supabase/modules/edge-functions.md +371 -0
  528. moai_adk/templates/.claude/skills/moai-platform-supabase/modules/postgresql-pgvector.md +231 -0
  529. moai_adk/templates/.claude/skills/moai-platform-supabase/modules/realtime-presence.md +354 -0
  530. moai_adk/templates/.claude/skills/moai-platform-supabase/modules/row-level-security.md +286 -0
  531. moai_adk/templates/.claude/skills/moai-platform-supabase/modules/storage-cdn.md +319 -0
  532. moai_adk/templates/.claude/skills/moai-platform-supabase/modules/typescript-patterns.md +453 -0
  533. moai_adk/templates/.claude/skills/moai-platform-supabase/reference.md +284 -0
  534. moai_adk/templates/.claude/skills/moai-platform-vercel/SKILL.md +132 -0
  535. moai_adk/templates/.claude/skills/moai-platform-vercel/examples.md +502 -0
  536. moai_adk/templates/.claude/skills/moai-platform-vercel/modules/analytics-speed.md +348 -0
  537. moai_adk/templates/.claude/skills/moai-platform-vercel/modules/deployment-config.md +344 -0
  538. moai_adk/templates/.claude/skills/moai-platform-vercel/modules/edge-functions.md +222 -0
  539. moai_adk/templates/.claude/skills/moai-platform-vercel/modules/isr-caching.md +306 -0
  540. moai_adk/templates/.claude/skills/moai-platform-vercel/modules/kv-storage.md +399 -0
  541. moai_adk/templates/.claude/skills/moai-platform-vercel/reference.md +360 -0
  542. moai_adk/templates/.claude/skills/moai-tool-ast-grep/SKILL.md +193 -0
  543. moai_adk/templates/.claude/skills/moai-tool-ast-grep/examples.md +1099 -0
  544. moai_adk/templates/.claude/skills/moai-tool-ast-grep/modules/language-specific.md +307 -0
  545. moai_adk/templates/.claude/skills/moai-tool-ast-grep/modules/pattern-syntax.md +237 -0
  546. moai_adk/templates/.claude/skills/moai-tool-ast-grep/modules/refactoring-patterns.md +260 -0
  547. moai_adk/templates/.claude/skills/moai-tool-ast-grep/modules/security-rules.md +239 -0
  548. moai_adk/templates/.claude/skills/moai-tool-ast-grep/reference.md +288 -0
  549. moai_adk/templates/.claude/skills/moai-tool-ast-grep/rules/languages/go.yml +90 -0
  550. moai_adk/templates/.claude/skills/moai-tool-ast-grep/rules/languages/python.yml +101 -0
  551. moai_adk/templates/.claude/skills/moai-tool-ast-grep/rules/languages/typescript.yml +83 -0
  552. moai_adk/templates/.claude/skills/moai-tool-ast-grep/rules/quality/complexity-check.yml +94 -0
  553. moai_adk/templates/.claude/skills/moai-tool-ast-grep/rules/quality/deprecated-apis.yml +84 -0
  554. moai_adk/templates/.claude/skills/moai-tool-ast-grep/rules/security/secrets-detection.yml +89 -0
  555. moai_adk/templates/.claude/skills/moai-tool-ast-grep/rules/security/sql-injection.yml +45 -0
  556. moai_adk/templates/.claude/skills/moai-tool-ast-grep/rules/security/xss-prevention.yml +50 -0
  557. moai_adk/templates/.claude/skills/moai-tool-ast-grep/rules/sgconfig.yml +54 -0
  558. moai_adk/templates/.claude/skills/moai-workflow-jit-docs/SKILL.md +251 -0
  559. moai_adk/templates/.claude/skills/moai-workflow-jit-docs/examples.md +544 -0
  560. moai_adk/templates/.claude/skills/moai-workflow-jit-docs/modules/advanced-patterns.md +379 -0
  561. moai_adk/templates/.claude/skills/moai-workflow-jit-docs/modules/optimization.md +286 -0
  562. moai_adk/templates/.claude/skills/moai-workflow-jit-docs/reference.md +307 -0
  563. moai_adk/templates/.claude/skills/moai-workflow-loop/SKILL.md +197 -0
  564. moai_adk/templates/.claude/skills/moai-workflow-loop/examples.md +1063 -0
  565. moai_adk/templates/.claude/skills/moai-workflow-loop/reference.md +1414 -0
  566. moai_adk/templates/.claude/skills/moai-workflow-project/README.md +190 -0
  567. moai_adk/templates/.claude/skills/moai-workflow-project/SKILL.md +287 -0
  568. moai_adk/templates/.claude/skills/moai-workflow-project/examples.md +547 -0
  569. moai_adk/templates/.claude/skills/moai-workflow-project/reference.md +275 -0
  570. moai_adk/templates/.claude/skills/moai-workflow-project/schemas/config-schema.json +316 -0
  571. moai_adk/templates/.claude/skills/moai-workflow-project/schemas/tab_schema.json +1434 -0
  572. moai_adk/templates/.claude/skills/moai-workflow-project/templates/config-template.json +71 -0
  573. moai_adk/templates/.claude/skills/moai-workflow-project/templates/doc-templates/product-template.md +44 -0
  574. moai_adk/templates/.claude/skills/moai-workflow-project/templates/doc-templates/structure-template.md +48 -0
  575. moai_adk/templates/.claude/skills/moai-workflow-project/templates/doc-templates/tech-template.md +92 -0
  576. moai_adk/templates/.claude/skills/moai-workflow-project/templates/question-templates/config-manager-setup.json +109 -0
  577. moai_adk/templates/.claude/skills/moai-workflow-project/templates/question-templates/language-initializer.json +228 -0
  578. moai_adk/templates/.claude/skills/moai-workflow-project/templates/question-templates/menu-project-config.json +130 -0
  579. moai_adk/templates/.claude/skills/moai-workflow-project/templates/question-templates/project-batch-questions.json +97 -0
  580. moai_adk/templates/.claude/skills/moai-workflow-project/templates/question-templates/spec-workflow-setup.json +150 -0
  581. moai_adk/templates/.claude/skills/moai-workflow-spec/SKILL.md +337 -0
  582. moai_adk/templates/.claude/skills/moai-workflow-spec/examples.md +900 -0
  583. moai_adk/templates/.claude/skills/moai-workflow-spec/modules/advanced-patterns.md +237 -0
  584. moai_adk/templates/.claude/skills/moai-workflow-spec/reference.md +704 -0
  585. moai_adk/templates/.claude/skills/moai-workflow-templates/SKILL.md +270 -0
  586. moai_adk/templates/.claude/skills/moai-workflow-templates/examples.md +552 -0
  587. moai_adk/templates/.claude/skills/moai-workflow-templates/modules/code-templates.md +124 -0
  588. moai_adk/templates/.claude/skills/moai-workflow-templates/modules/feedback-templates.md +100 -0
  589. moai_adk/templates/.claude/skills/moai-workflow-templates/modules/template-optimizer.md +138 -0
  590. moai_adk/templates/.claude/skills/moai-workflow-templates/reference.md +346 -0
  591. moai_adk/templates/.claude/skills/moai-workflow-testing/LICENSE.txt +202 -0
  592. moai_adk/templates/.claude/skills/moai-workflow-testing/SKILL.md +269 -0
  593. moai_adk/templates/.claude/skills/moai-workflow-testing/examples/ai-powered-testing.py +294 -0
  594. moai_adk/templates/.claude/skills/moai-workflow-testing/examples/console_logging.py +35 -0
  595. moai_adk/templates/.claude/skills/moai-workflow-testing/examples/element_discovery.py +40 -0
  596. moai_adk/templates/.claude/skills/moai-workflow-testing/examples/static_html_automation.py +34 -0
  597. moai_adk/templates/.claude/skills/moai-workflow-testing/examples.md +672 -0
  598. moai_adk/templates/.claude/skills/moai-workflow-testing/modules/README.md +269 -0
  599. moai_adk/templates/.claude/skills/moai-workflow-testing/modules/advanced-patterns.md +576 -0
  600. moai_adk/templates/.claude/skills/moai-workflow-testing/modules/ai-debugging.md +302 -0
  601. moai_adk/templates/.claude/skills/moai-workflow-testing/modules/automated-code-review/context7-integration.md +286 -0
  602. moai_adk/templates/.claude/skills/moai-workflow-testing/modules/automated-code-review/review-workflows.md +500 -0
  603. moai_adk/templates/.claude/skills/moai-workflow-testing/modules/automated-code-review/trust5-framework/relevance-analysis.md +154 -0
  604. moai_adk/templates/.claude/skills/moai-workflow-testing/modules/automated-code-review/trust5-framework/safety-analysis.md +148 -0
  605. moai_adk/templates/.claude/skills/moai-workflow-testing/modules/automated-code-review/trust5-framework/scoring-algorithms.md +196 -0
  606. moai_adk/templates/.claude/skills/moai-workflow-testing/modules/automated-code-review/trust5-framework/timeliness-analysis.md +168 -0
  607. moai_adk/templates/.claude/skills/moai-workflow-testing/modules/automated-code-review/trust5-framework/truthfulness-analysis.md +136 -0
  608. moai_adk/templates/.claude/skills/moai-workflow-testing/modules/automated-code-review/trust5-framework/usability-analysis.md +153 -0
  609. moai_adk/templates/.claude/skills/moai-workflow-testing/modules/automated-code-review/trust5-framework.md +257 -0
  610. moai_adk/templates/.claude/skills/moai-workflow-testing/modules/automated-code-review.md +263 -0
  611. moai_adk/templates/.claude/skills/moai-workflow-testing/modules/code-review/analysis-patterns.md +340 -0
  612. moai_adk/templates/.claude/skills/moai-workflow-testing/modules/code-review/core-classes.md +299 -0
  613. moai_adk/templates/.claude/skills/moai-workflow-testing/modules/code-review/tool-integration.md +380 -0
  614. moai_adk/templates/.claude/skills/moai-workflow-testing/modules/debugging/debugging-workflows.md +451 -0
  615. moai_adk/templates/.claude/skills/moai-workflow-testing/modules/debugging/error-analysis.md +442 -0
  616. moai_adk/templates/.claude/skills/moai-workflow-testing/modules/optimization.md +505 -0
  617. moai_adk/templates/.claude/skills/moai-workflow-testing/modules/performance/optimization-patterns.md +473 -0
  618. moai_adk/templates/.claude/skills/moai-workflow-testing/modules/performance/profiling-techniques.md +481 -0
  619. moai_adk/templates/.claude/skills/moai-workflow-testing/modules/performance-optimization/ai-optimization.md +241 -0
  620. moai_adk/templates/.claude/skills/moai-workflow-testing/modules/performance-optimization/bottleneck-detection.md +397 -0
  621. moai_adk/templates/.claude/skills/moai-workflow-testing/modules/performance-optimization/optimization-plan.md +315 -0
  622. moai_adk/templates/.claude/skills/moai-workflow-testing/modules/performance-optimization/profiler-core.md +277 -0
  623. moai_adk/templates/.claude/skills/moai-workflow-testing/modules/performance-optimization/real-time-monitoring.md +187 -0
  624. moai_adk/templates/.claude/skills/moai-workflow-testing/modules/performance-optimization.md +327 -0
  625. moai_adk/templates/.claude/skills/moai-workflow-testing/modules/quality-metrics.md +415 -0
  626. moai_adk/templates/.claude/skills/moai-workflow-testing/modules/refactoring/ai-workflows.md +620 -0
  627. moai_adk/templates/.claude/skills/moai-workflow-testing/modules/refactoring/patterns.md +692 -0
  628. moai_adk/templates/.claude/skills/moai-workflow-testing/modules/security-analysis.md +429 -0
  629. moai_adk/templates/.claude/skills/moai-workflow-testing/modules/smart-refactoring.md +313 -0
  630. moai_adk/templates/.claude/skills/moai-workflow-testing/modules/static-analysis.md +438 -0
  631. moai_adk/templates/.claude/skills/moai-workflow-testing/modules/tdd/core-classes.md +397 -0
  632. moai_adk/templates/.claude/skills/moai-workflow-testing/modules/tdd-context7/advanced-features.md +494 -0
  633. moai_adk/templates/.claude/skills/moai-workflow-testing/modules/tdd-context7/red-green-refactor.md +316 -0
  634. moai_adk/templates/.claude/skills/moai-workflow-testing/modules/tdd-context7/test-generation.md +471 -0
  635. moai_adk/templates/.claude/skills/moai-workflow-testing/modules/tdd-context7/test-patterns.md +371 -0
  636. moai_adk/templates/.claude/skills/moai-workflow-testing/modules/tdd-context7.md +265 -0
  637. moai_adk/templates/.claude/skills/moai-workflow-testing/modules/trust5-validation.md +428 -0
  638. moai_adk/templates/.claude/skills/moai-workflow-testing/reference/playwright-best-practices.md +57 -0
  639. moai_adk/templates/.claude/skills/moai-workflow-testing/reference.md +440 -0
  640. moai_adk/templates/.claude/skills/moai-workflow-testing/scripts/with_server.py +218 -0
  641. moai_adk/templates/.claude/skills/moai-workflow-testing/templates/alfred-integration.md +376 -0
  642. moai_adk/templates/.claude/skills/moai-workflow-testing/workflows/enterprise-testing-workflow.py +571 -0
  643. moai_adk/templates/.claude/skills/moai-workflow-worktree/SKILL.md +228 -0
  644. moai_adk/templates/.claude/skills/moai-workflow-worktree/examples.md +606 -0
  645. moai_adk/templates/.claude/skills/moai-workflow-worktree/modules/integration-patterns.md +149 -0
  646. moai_adk/templates/.claude/skills/moai-workflow-worktree/modules/moai-adk-integration.md +245 -0
  647. moai_adk/templates/.claude/skills/moai-workflow-worktree/modules/parallel-advanced.md +310 -0
  648. moai_adk/templates/.claude/skills/moai-workflow-worktree/modules/parallel-development.md +202 -0
  649. moai_adk/templates/.claude/skills/moai-workflow-worktree/modules/parallel-workflows.md +302 -0
  650. moai_adk/templates/.claude/skills/moai-workflow-worktree/modules/registry-architecture.md +271 -0
  651. moai_adk/templates/.claude/skills/moai-workflow-worktree/modules/resource-optimization.md +300 -0
  652. moai_adk/templates/.claude/skills/moai-workflow-worktree/modules/tools-integration.md +280 -0
  653. moai_adk/templates/.claude/skills/moai-workflow-worktree/modules/troubleshooting.md +397 -0
  654. moai_adk/templates/.claude/skills/moai-workflow-worktree/modules/worktree-commands.md +296 -0
  655. moai_adk/templates/.claude/skills/moai-workflow-worktree/modules/worktree-management.md +217 -0
  656. moai_adk/templates/.claude/skills/moai-workflow-worktree/reference.md +357 -0
  657. moai_adk/templates/.git-hooks/pre-commit +128 -0
  658. moai_adk/templates/.git-hooks/pre-push +468 -0
  659. moai_adk/templates/.github/workflows/ci-universal.yml +1314 -0
  660. moai_adk/templates/.github/workflows/security-secrets-check.yml +179 -0
  661. moai_adk/templates/.github/workflows/spec-issue-sync.yml +206 -36
  662. moai_adk/templates/.gitignore +152 -13
  663. moai_adk/templates/.lsp.json +152 -0
  664. moai_adk/templates/.mcp.json +13 -0
  665. moai_adk/templates/.moai/announcements/en.json +18 -0
  666. moai_adk/templates/.moai/announcements/ja.json +18 -0
  667. moai_adk/templates/.moai/announcements/ko.json +18 -0
  668. moai_adk/templates/.moai/announcements/zh.json +18 -0
  669. moai_adk/templates/.moai/config/config.yaml +64 -0
  670. moai_adk/templates/.moai/config/multilingual-triggers.yaml +213 -0
  671. moai_adk/templates/.moai/config/sections/git-strategy.yaml +116 -0
  672. moai_adk/templates/.moai/config/sections/language.yaml +11 -0
  673. moai_adk/templates/.moai/config/sections/llm.yaml +41 -0
  674. moai_adk/templates/.moai/config/sections/pricing.yaml +30 -0
  675. moai_adk/templates/.moai/config/sections/project.yaml +13 -0
  676. moai_adk/templates/.moai/config/sections/quality.yaml +55 -0
  677. moai_adk/templates/.moai/config/sections/ralph.yaml +55 -0
  678. moai_adk/templates/.moai/config/sections/system.yaml +59 -0
  679. moai_adk/templates/.moai/config/sections/user.yaml +5 -0
  680. moai_adk/templates/.moai/config/statusline-config.yaml +92 -0
  681. moai_adk/templates/.moai/llm-configs/glm.json +22 -0
  682. moai_adk/templates/CLAUDE.ja.md +343 -0
  683. moai_adk/templates/CLAUDE.ko.md +343 -0
  684. moai_adk/templates/CLAUDE.md +274 -246
  685. moai_adk/templates/CLAUDE.zh.md +343 -0
  686. moai_adk/utils/__init__.py +24 -2
  687. moai_adk/utils/banner.py +9 -13
  688. moai_adk/utils/common.py +331 -0
  689. moai_adk/utils/link_validator.py +241 -0
  690. moai_adk/utils/logger.py +4 -9
  691. moai_adk/utils/safe_file_reader.py +206 -0
  692. moai_adk/utils/timeout.py +160 -0
  693. moai_adk/utils/toon_utils.py +256 -0
  694. moai_adk/version.py +22 -0
  695. moai_adk-1.1.0.dist-info/METADATA +2443 -0
  696. moai_adk-1.1.0.dist-info/RECORD +701 -0
  697. {moai_adk-0.8.0.dist-info → moai_adk-1.1.0.dist-info}/WHEEL +1 -1
  698. moai_adk-1.1.0.dist-info/entry_points.txt +5 -0
  699. moai_adk-1.1.0.dist-info/licenses/LICENSE +99 -0
  700. moai_adk/cli/commands/backup.py +0 -80
  701. moai_adk/templates/.claude/agents/alfred/cc-manager.md +0 -293
  702. moai_adk/templates/.claude/agents/alfred/debug-helper.md +0 -196
  703. moai_adk/templates/.claude/agents/alfred/doc-syncer.md +0 -207
  704. moai_adk/templates/.claude/agents/alfred/git-manager.md +0 -375
  705. moai_adk/templates/.claude/agents/alfred/implementation-planner.md +0 -343
  706. moai_adk/templates/.claude/agents/alfred/project-manager.md +0 -246
  707. moai_adk/templates/.claude/agents/alfred/quality-gate.md +0 -320
  708. moai_adk/templates/.claude/agents/alfred/skill-factory.md +0 -837
  709. moai_adk/templates/.claude/agents/alfred/spec-builder.md +0 -272
  710. moai_adk/templates/.claude/agents/alfred/tag-agent.md +0 -265
  711. moai_adk/templates/.claude/agents/alfred/tdd-implementer.md +0 -311
  712. moai_adk/templates/.claude/agents/alfred/trust-checker.md +0 -352
  713. moai_adk/templates/.claude/commands/alfred/0-project.md +0 -1184
  714. moai_adk/templates/.claude/commands/alfred/1-plan.md +0 -665
  715. moai_adk/templates/.claude/commands/alfred/2-run.md +0 -488
  716. moai_adk/templates/.claude/commands/alfred/3-sync.md +0 -623
  717. moai_adk/templates/.claude/hooks/alfred/HOOK_SCHEMA_VALIDATION.md +0 -313
  718. moai_adk/templates/.claude/hooks/alfred/README.md +0 -230
  719. moai_adk/templates/.claude/hooks/alfred/alfred_hooks.py +0 -174
  720. moai_adk/templates/.claude/hooks/alfred/core/__init__.py +0 -170
  721. moai_adk/templates/.claude/hooks/alfred/core/context.py +0 -67
  722. moai_adk/templates/.claude/hooks/alfred/core/project.py +0 -416
  723. moai_adk/templates/.claude/hooks/alfred/core/tags.py +0 -198
  724. moai_adk/templates/.claude/hooks/alfred/handlers/__init__.py +0 -21
  725. moai_adk/templates/.claude/hooks/alfred/handlers/notification.py +0 -25
  726. moai_adk/templates/.claude/hooks/alfred/handlers/session.py +0 -161
  727. moai_adk/templates/.claude/hooks/alfred/handlers/tool.py +0 -90
  728. moai_adk/templates/.claude/hooks/alfred/handlers/user.py +0 -42
  729. moai_adk/templates/.claude/hooks/alfred/test_hook_output.py +0 -175
  730. moai_adk/templates/.claude/output-styles/alfred/agentic-coding.md +0 -640
  731. moai_adk/templates/.claude/output-styles/alfred/moai-adk-learning.md +0 -696
  732. moai_adk/templates/.claude/output-styles/alfred/study-with-alfred.md +0 -474
  733. moai_adk/templates/.claude/skills/moai-alfred-ears-authoring/SKILL.md +0 -113
  734. moai_adk/templates/.claude/skills/moai-alfred-ears-authoring/examples.md +0 -29
  735. moai_adk/templates/.claude/skills/moai-alfred-ears-authoring/reference.md +0 -28
  736. moai_adk/templates/.claude/skills/moai-alfred-git-workflow/SKILL.md +0 -122
  737. moai_adk/templates/.claude/skills/moai-alfred-git-workflow/examples.md +0 -29
  738. moai_adk/templates/.claude/skills/moai-alfred-git-workflow/reference.md +0 -29
  739. moai_adk/templates/.claude/skills/moai-alfred-interactive-questions/SKILL.md +0 -237
  740. moai_adk/templates/.claude/skills/moai-alfred-interactive-questions/examples.md +0 -615
  741. moai_adk/templates/.claude/skills/moai-alfred-interactive-questions/reference.md +0 -653
  742. moai_adk/templates/.claude/skills/moai-alfred-language-detection/SKILL.md +0 -113
  743. moai_adk/templates/.claude/skills/moai-alfred-language-detection/examples.md +0 -29
  744. moai_adk/templates/.claude/skills/moai-alfred-language-detection/reference.md +0 -28
  745. moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-validation/SKILL.md +0 -113
  746. moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-validation/examples.md +0 -29
  747. moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-validation/reference.md +0 -28
  748. moai_adk/templates/.claude/skills/moai-alfred-tag-scanning/SKILL.md +0 -113
  749. moai_adk/templates/.claude/skills/moai-alfred-tag-scanning/examples.md +0 -29
  750. moai_adk/templates/.claude/skills/moai-alfred-tag-scanning/reference.md +0 -28
  751. moai_adk/templates/.claude/skills/moai-alfred-trust-validation/SKILL.md +0 -113
  752. moai_adk/templates/.claude/skills/moai-alfred-trust-validation/examples.md +0 -29
  753. moai_adk/templates/.claude/skills/moai-alfred-trust-validation/reference.md +0 -28
  754. moai_adk/templates/.claude/skills/moai-cc-agents/SKILL.md +0 -269
  755. moai_adk/templates/.claude/skills/moai-cc-agents/templates/agent-template.md +0 -32
  756. moai_adk/templates/.claude/skills/moai-cc-claude-md/SKILL.md +0 -298
  757. moai_adk/templates/.claude/skills/moai-cc-claude-md/templates/CLAUDE-template.md +0 -26
  758. moai_adk/templates/.claude/skills/moai-cc-commands/SKILL.md +0 -307
  759. moai_adk/templates/.claude/skills/moai-cc-commands/templates/command-template.md +0 -21
  760. moai_adk/templates/.claude/skills/moai-cc-hooks/SKILL.md +0 -252
  761. moai_adk/templates/.claude/skills/moai-cc-hooks/scripts/pre-bash-check.sh +0 -19
  762. moai_adk/templates/.claude/skills/moai-cc-hooks/scripts/preserve-permissions.sh +0 -19
  763. moai_adk/templates/.claude/skills/moai-cc-hooks/scripts/validate-bash-command.py +0 -24
  764. moai_adk/templates/.claude/skills/moai-cc-mcp-plugins/SKILL.md +0 -199
  765. moai_adk/templates/.claude/skills/moai-cc-mcp-plugins/templates/settings-mcp-template.json +0 -39
  766. moai_adk/templates/.claude/skills/moai-cc-memory/SKILL.md +0 -316
  767. moai_adk/templates/.claude/skills/moai-cc-memory/templates/session-summary-template.md +0 -18
  768. moai_adk/templates/.claude/skills/moai-cc-settings/SKILL.md +0 -263
  769. moai_adk/templates/.claude/skills/moai-cc-settings/templates/settings-complete-template.json +0 -30
  770. moai_adk/templates/.claude/skills/moai-cc-skills/SKILL.md +0 -291
  771. moai_adk/templates/.claude/skills/moai-cc-skills/templates/SKILL-template.md +0 -15
  772. moai_adk/templates/.claude/skills/moai-domain-cli-tool/SKILL.md +0 -123
  773. moai_adk/templates/.claude/skills/moai-domain-cli-tool/examples.md +0 -29
  774. moai_adk/templates/.claude/skills/moai-domain-cli-tool/reference.md +0 -30
  775. moai_adk/templates/.claude/skills/moai-domain-data-science/SKILL.md +0 -123
  776. moai_adk/templates/.claude/skills/moai-domain-data-science/examples.md +0 -29
  777. moai_adk/templates/.claude/skills/moai-domain-data-science/reference.md +0 -30
  778. moai_adk/templates/.claude/skills/moai-domain-devops/SKILL.md +0 -124
  779. moai_adk/templates/.claude/skills/moai-domain-devops/examples.md +0 -29
  780. moai_adk/templates/.claude/skills/moai-domain-devops/reference.md +0 -31
  781. moai_adk/templates/.claude/skills/moai-domain-ml/SKILL.md +0 -123
  782. moai_adk/templates/.claude/skills/moai-domain-ml/examples.md +0 -29
  783. moai_adk/templates/.claude/skills/moai-domain-ml/reference.md +0 -30
  784. moai_adk/templates/.claude/skills/moai-domain-mobile-app/SKILL.md +0 -123
  785. moai_adk/templates/.claude/skills/moai-domain-mobile-app/examples.md +0 -29
  786. moai_adk/templates/.claude/skills/moai-domain-mobile-app/reference.md +0 -30
  787. moai_adk/templates/.claude/skills/moai-domain-security/SKILL.md +0 -123
  788. moai_adk/templates/.claude/skills/moai-domain-security/examples.md +0 -29
  789. moai_adk/templates/.claude/skills/moai-domain-security/reference.md +0 -30
  790. moai_adk/templates/.claude/skills/moai-domain-web-api/SKILL.md +0 -123
  791. moai_adk/templates/.claude/skills/moai-domain-web-api/examples.md +0 -29
  792. moai_adk/templates/.claude/skills/moai-domain-web-api/reference.md +0 -30
  793. moai_adk/templates/.claude/skills/moai-essentials-debug/SKILL.md +0 -303
  794. moai_adk/templates/.claude/skills/moai-essentials-debug/examples.md +0 -1064
  795. moai_adk/templates/.claude/skills/moai-essentials-debug/reference.md +0 -1047
  796. moai_adk/templates/.claude/skills/moai-essentials-perf/SKILL.md +0 -113
  797. moai_adk/templates/.claude/skills/moai-essentials-perf/examples.md +0 -29
  798. moai_adk/templates/.claude/skills/moai-essentials-perf/reference.md +0 -28
  799. moai_adk/templates/.claude/skills/moai-essentials-refactor/SKILL.md +0 -113
  800. moai_adk/templates/.claude/skills/moai-essentials-refactor/examples.md +0 -29
  801. moai_adk/templates/.claude/skills/moai-essentials-refactor/reference.md +0 -28
  802. moai_adk/templates/.claude/skills/moai-essentials-review/SKILL.md +0 -113
  803. moai_adk/templates/.claude/skills/moai-essentials-review/examples.md +0 -29
  804. moai_adk/templates/.claude/skills/moai-essentials-review/reference.md +0 -28
  805. moai_adk/templates/.claude/skills/moai-foundation-ears/SKILL.md +0 -113
  806. moai_adk/templates/.claude/skills/moai-foundation-ears/examples.md +0 -29
  807. moai_adk/templates/.claude/skills/moai-foundation-ears/reference.md +0 -28
  808. moai_adk/templates/.claude/skills/moai-foundation-git/SKILL.md +0 -122
  809. moai_adk/templates/.claude/skills/moai-foundation-git/examples.md +0 -29
  810. moai_adk/templates/.claude/skills/moai-foundation-git/reference.md +0 -29
  811. moai_adk/templates/.claude/skills/moai-foundation-langs/SKILL.md +0 -113
  812. moai_adk/templates/.claude/skills/moai-foundation-langs/examples.md +0 -29
  813. moai_adk/templates/.claude/skills/moai-foundation-langs/reference.md +0 -28
  814. moai_adk/templates/.claude/skills/moai-foundation-specs/SKILL.md +0 -113
  815. moai_adk/templates/.claude/skills/moai-foundation-specs/examples.md +0 -29
  816. moai_adk/templates/.claude/skills/moai-foundation-specs/reference.md +0 -28
  817. moai_adk/templates/.claude/skills/moai-foundation-tags/SKILL.md +0 -113
  818. moai_adk/templates/.claude/skills/moai-foundation-tags/examples.md +0 -29
  819. moai_adk/templates/.claude/skills/moai-foundation-tags/reference.md +0 -28
  820. moai_adk/templates/.claude/skills/moai-foundation-trust/SKILL.md +0 -307
  821. moai_adk/templates/.claude/skills/moai-foundation-trust/examples.md +0 -0
  822. moai_adk/templates/.claude/skills/moai-foundation-trust/reference.md +0 -1099
  823. moai_adk/templates/.claude/skills/moai-lang-c/SKILL.md +0 -124
  824. moai_adk/templates/.claude/skills/moai-lang-c/examples.md +0 -29
  825. moai_adk/templates/.claude/skills/moai-lang-c/reference.md +0 -31
  826. moai_adk/templates/.claude/skills/moai-lang-dart/SKILL.md +0 -123
  827. moai_adk/templates/.claude/skills/moai-lang-dart/examples.md +0 -29
  828. moai_adk/templates/.claude/skills/moai-lang-dart/reference.md +0 -30
  829. moai_adk/templates/.claude/skills/moai-lang-shell/SKILL.md +0 -123
  830. moai_adk/templates/.claude/skills/moai-lang-shell/examples.md +0 -29
  831. moai_adk/templates/.claude/skills/moai-lang-shell/reference.md +0 -30
  832. moai_adk/templates/.claude/skills/moai-lang-sql/SKILL.md +0 -124
  833. moai_adk/templates/.claude/skills/moai-lang-sql/examples.md +0 -29
  834. moai_adk/templates/.claude/skills/moai-lang-sql/reference.md +0 -31
  835. moai_adk/templates/.claude/skills/moai-skill-factory/CHECKLIST.md +0 -482
  836. moai_adk/templates/.claude/skills/moai-skill-factory/EXAMPLES.md +0 -278
  837. moai_adk/templates/.claude/skills/moai-skill-factory/INTERACTIVE-DISCOVERY.md +0 -524
  838. moai_adk/templates/.claude/skills/moai-skill-factory/METADATA.md +0 -477
  839. moai_adk/templates/.claude/skills/moai-skill-factory/PARALLEL-ANALYSIS-REPORT.md +0 -429
  840. moai_adk/templates/.claude/skills/moai-skill-factory/PYTHON-VERSION-MATRIX.md +0 -391
  841. moai_adk/templates/.claude/skills/moai-skill-factory/SKILL-FACTORY-WORKFLOW.md +0 -431
  842. moai_adk/templates/.claude/skills/moai-skill-factory/SKILL-UPDATE-ADVISOR.md +0 -577
  843. moai_adk/templates/.claude/skills/moai-skill-factory/SKILL.md +0 -271
  844. moai_adk/templates/.claude/skills/moai-skill-factory/STEP-BY-STEP-GUIDE.md +0 -466
  845. moai_adk/templates/.claude/skills/moai-skill-factory/STRUCTURE.md +0 -583
  846. moai_adk/templates/.claude/skills/moai-skill-factory/WEB-RESEARCH.md +0 -526
  847. moai_adk/templates/.claude/skills/moai-skill-factory/reference.md +0 -465
  848. moai_adk/templates/.claude/skills/moai-skill-factory/scripts/generate-structure.sh +0 -328
  849. moai_adk/templates/.claude/skills/moai-skill-factory/scripts/validate-skill.sh +0 -312
  850. moai_adk/templates/.claude/skills/moai-skill-factory/templates/SKILL_TEMPLATE.md +0 -245
  851. moai_adk/templates/.claude/skills/moai-skill-factory/templates/examples-template.md +0 -285
  852. moai_adk/templates/.claude/skills/moai-skill-factory/templates/reference-template.md +0 -278
  853. moai_adk/templates/.claude/skills/moai-skill-factory/templates/scripts-template.sh +0 -303
  854. moai_adk/templates/.claude/skills/moai-spec-authoring/README.md +0 -137
  855. moai_adk/templates/.claude/skills/moai-spec-authoring/SKILL.md +0 -218
  856. moai_adk/templates/.claude/skills/moai-spec-authoring/examples/validate-spec.sh +0 -161
  857. moai_adk/templates/.claude/skills/moai-spec-authoring/examples.md +0 -541
  858. moai_adk/templates/.claude/skills/moai-spec-authoring/reference.md +0 -622
  859. moai_adk/templates/.github/ISSUE_TEMPLATE/spec.yml +0 -176
  860. moai_adk/templates/.github/PULL_REQUEST_TEMPLATE.md +0 -69
  861. moai_adk/templates/.github/workflows/moai-gitflow.yml +0 -256
  862. moai_adk/templates/.moai/config.json +0 -96
  863. moai_adk/templates/.moai/memory/CLAUDE-AGENTS-GUIDE.md +0 -208
  864. moai_adk/templates/.moai/memory/CLAUDE-PRACTICES.md +0 -369
  865. moai_adk/templates/.moai/memory/CLAUDE-RULES.md +0 -539
  866. moai_adk/templates/.moai/memory/CONFIG-SCHEMA.md +0 -444
  867. moai_adk/templates/.moai/memory/DEVELOPMENT-GUIDE.md +0 -344
  868. moai_adk/templates/.moai/memory/GITFLOW-PROTECTION-POLICY.md +0 -220
  869. moai_adk/templates/.moai/memory/SKILLS-DESCRIPTION-POLICY.md +0 -218
  870. moai_adk/templates/.moai/memory/SPEC-METADATA.md +0 -356
  871. moai_adk/templates/.moai/memory/config-schema.md +0 -444
  872. moai_adk/templates/.moai/memory/gitflow-protection-policy.md +0 -220
  873. moai_adk/templates/.moai/memory/spec-metadata.md +0 -356
  874. moai_adk/templates/.moai/project/product.md +0 -161
  875. moai_adk/templates/.moai/project/structure.md +0 -156
  876. moai_adk/templates/.moai/project/tech.md +0 -227
  877. moai_adk/templates/__init__.py +0 -2
  878. moai_adk-0.8.0.dist-info/METADATA +0 -1722
  879. moai_adk-0.8.0.dist-info/RECORD +0 -282
  880. moai_adk-0.8.0.dist-info/entry_points.txt +0 -2
  881. moai_adk-0.8.0.dist-info/licenses/LICENSE +0 -21
@@ -0,0 +1,1447 @@
1
+ ---
2
+ description: "Define specifications and create development branch or worktree"
3
+ argument-hint: Title 1 Title 2 ... | SPEC-ID modifications [--worktree | --branch]
4
+ type: workflow
5
+ allowed-tools: Task, AskUserQuestion, TodoWrite, Bash, Read, Write, Edit, Glob, Grep
6
+ model: inherit
7
+ ---
8
+
9
+ ## Pre-execution Context
10
+
11
+ !git status --porcelain
12
+ !git branch --show-current
13
+ !git log --oneline -10
14
+ !git diff --name-only HEAD
15
+ !find .moai/specs -name "\*.md" -type f 2>/dev/null
16
+
17
+ ## Essential Files
18
+
19
+ @.moai/config/config.yaml
20
+ @.moai/project/product.md
21
+ @.moai/project/structure.md
22
+ @.moai/project/tech.md
23
+ .moai/specs/
24
+
25
+ ---
26
+
27
+ # MoAI-ADK Step 1: Establish a plan (Plan) - Always make a plan first and then proceed
28
+
29
+ User Interaction Architecture: AskUserQuestion must be used at COMMAND level only. Subagents invoked via Task() operate in isolated, stateless contexts and cannot interact with users. Collect all user input BEFORE delegating to agents.
30
+
31
+ [HARD] AskUserQuestion Mandatory Usage:
32
+
33
+ Requirement: All user decisions MUST be collected via AskUserQuestion tool before proceeding
34
+ WHY: Ensures explicit user consent and prevents unintended actions
35
+ IMPACT: Skipping AskUserQuestion causes unpredictable behavior and user confusion
36
+
37
+ Mandatory Decision Points:
38
+
39
+ 1. SPEC Creation Approval: Ask before creating SPEC files (Step 1B.2)
40
+ 2. Development Environment Selection: Ask for worktree/branch/current choice (Step 2.2)
41
+ 3. Next Action Selection: Ask after SPEC creation completes (Final Step)
42
+
43
+ Batched Design: All AskUserQuestion calls follow batched design principles (1-4 questions per call, max 4 options per question) to minimize user interaction turns. See CLAUDE.md section "User Interaction Architecture" for details.
44
+
45
+ 4-Step Workflow Integration: This command implements Steps 1-2 of Alfred's workflow (Intent Understanding → Plan Creation). See CLAUDE.md for full workflow details.
46
+
47
+ ## Command Purpose
48
+
49
+ "Plan → Run → Sync" As the first step in the workflow, it supports the entire planning process from ideation to plan creation.
50
+
51
+ Plan for: $ARGUMENTS
52
+
53
+ ### Usage Scenarios (3 Execution Patterns)
54
+
55
+ Scenario 1: SPEC Only (Default)
56
+
57
+ - Command: /moai:1-plan "User authentication system"
58
+ - Creates SPEC documents only
59
+ - Follows existing branch creation logic
60
+
61
+ Scenario 2: SPEC + Branch (Legacy)
62
+
63
+ - Command: /moai:1-plan "User authentication system" --branch
64
+ - Creates SPEC documents plus Git branch
65
+ - Traditional feature branch workflow
66
+
67
+ Scenario 3: SPEC + Worktree (NEW)
68
+
69
+ - Command: /moai:1-plan "User authentication system" --worktree
70
+ - Creates SPEC documents plus Git worktree
71
+ - Isolated development environment for parallel SPEC work
72
+ - Displays guidance messages for worktree navigation
73
+
74
+ Flag Priority: --worktree takes precedence over --branch, which takes precedence over default (SPEC only)
75
+
76
+ ## CodeRabbit AI Integration (Local Only)
77
+
78
+ This local environment includes CodeRabbit AI review integration for SPEC documents:
79
+
80
+ Automatic workflows:
81
+
82
+ - SPEC review: CodeRabbit analyzes SPEC metadata and EARS structure
83
+ - GitHub Issue sync: SPEC files automatically create and update GitHub Issues
84
+ - Auto-approval: Draft PRs are approved when quality meets standards (80%+)
85
+ - SPEC quality validation: Checklist for metadata, structure, and content
86
+
87
+ Scope:
88
+
89
+ - Local environment: Full CodeRabbit integration with auto-approval
90
+ - Published packages: Users get GitHub Issue sync only (no CodeRabbit)
91
+
92
+ > See `.coderabbit.yaml` for detailed review rules and SPEC validation checklist
93
+
94
+ ---
95
+
96
+ ## Associated Agents and Skills
97
+
98
+ Associated Agents for SPEC Planning and Creation:
99
+
100
+ - Explore: Codebase exploration and file system analysis
101
+ WHY: Fast, focused discovery without blocking agent
102
+ IMPACT: Reduces manual project discovery time
103
+
104
+ - manager-spec: SPEC generation in EARS format and planning
105
+ WHY: Specialized domain knowledge for structured requirements
106
+ IMPACT: Ensures consistent SPEC document quality
107
+
108
+ - manager-git: Git workflow and branch management
109
+ WHY: Encapsulates git operations with proper error handling
110
+ IMPACT: Prevents manual git errors and ensures consistency
111
+
112
+ ### Agent Delegation Strategy
113
+
114
+ Phase 1A: Research & Analysis
115
+
116
+ - Use built-in Explore agent for fast codebase analysis (read-only)
117
+ - Use Plan agent (auto-invoked in plan mode) for SPEC research
118
+ - Use MoAI manager-spec agent for SPEC generation
119
+
120
+ Phase 1B: Specialized Analysis
121
+
122
+ - Use MoAI domain agents (expert-backend, expert-database, etc.) for specialized decisions
123
+ - Use mcp-context7 for API documentation research
124
+ - Use mcp-sequential-thinking for complex architectural decisions
125
+
126
+ ---
127
+
128
+ ## Agent Invocation Patterns (CLAUDE.md Compliance)
129
+
130
+ This command uses agent execution patterns defined in CLAUDE.md (lines 96-120).
131
+
132
+ ### Sequential Phase-Based Chaining PASS
133
+
134
+ Command implements sequential chaining through 4 distinct phases:
135
+
136
+ Phase Flow:
137
+
138
+ - Phase 1A (Optional): Project Exploration via Explore subagent
139
+ - Phase 1B (Required): SPEC Planning via manager-spec subagent
140
+ - Phase 2: SPEC Document Creation via manager-spec subagent
141
+ - Phase 3: Git Branch Setup via manager-git subagent (conditional)
142
+
143
+ Each phase receives context and outputs from previous phases.
144
+
145
+ WHY: Sequential execution ensures proper dependency management
146
+
147
+ - Phase 1B needs exploration results from 1A (if applicable)
148
+ - Phase 2 requires approved plan from Phase 1B
149
+ - Phase 3 depends on created SPEC files from Phase 2
150
+
151
+ IMPACT: Skipping phases or parallel execution would violate dependencies and create incomplete specifications
152
+
153
+ ### Parallel Execution FAIL
154
+
155
+ Not applicable - phases have explicit dependencies
156
+
157
+ WHY: Each phase depends on outputs from previous phase
158
+
159
+ - Cannot create SPEC documents before plan approval
160
+ - Cannot create git branch before SPEC files exist
161
+
162
+ IMPACT: Parallel execution would cause file system inconsistencies and incomplete workflows
163
+
164
+ ### Resumable Agent Support PASS
165
+
166
+ Command supports resume pattern for draft SPECs:
167
+
168
+ Resume Command:
169
+
170
+ - `/moai:1-plan resume SPEC-XXX`
171
+ - Continues from last saved draft state
172
+ - Preserves user input and planning context
173
+
174
+ WHY: Complex planning sessions may require multiple iterations
175
+ IMPACT: Resume capability prevents loss of planning work and enables iterative refinement
176
+
177
+ ---
178
+
179
+ Refer to CLAUDE.md "Agent Chaining Patterns" (lines 96-120) for complete pattern architecture.
180
+
181
+ ---
182
+
183
+ ## Execution Philosophy: "Always make a plan first and then proceed."
184
+
185
+ /moai:1-plan performs SPEC planning through complete agent delegation:
186
+
187
+ Execution Flow:
188
+
189
+ - User Command: /moai:1-plan "description"
190
+ - /moai:1-plan Command delegates to Task with subagent_type set to Explore or manager-spec
191
+ - Phase 1A (Optional): Project Exploration
192
+ - Phase 1B (Required): SPEC Planning
193
+ - Phase 2: SPEC Document Creation
194
+ - Phase 3: Git Branch and PR Setup
195
+ - Output: SPEC documents plus branch (conditional) plus next steps
196
+
197
+ ### Tool Usage Guidelines
198
+
199
+ This command has access to all tools for flexibility:
200
+
201
+ - Task() for agent orchestration (recommended for complex tasks)
202
+ - AskUserQuestion() for user interaction at command level
203
+ - Read, Write, Edit, Bash, Glob, Grep for direct operations when needed
204
+
205
+ Agent delegation is recommended for complex tasks that benefit from specialized expertise. Direct tool usage is permitted when appropriate for simpler operations.
206
+
207
+ ---
208
+
209
+ ## The 4-Step Agent-Based Workflow Command Logic (v5.0.0)
210
+
211
+ This command implements the first 2 steps of Alfred's 4-step workflow:
212
+
213
+ 1. STEP 1: Intent Understanding (Clarify user requirements)
214
+ 2. STEP 2: Plan Creation (Create execution strategy with agent delegation)
215
+ 3. STEP 3: Task Execution (Execute via manager-tdd - NOT in this command)
216
+ 4. STEP 4: Report & Commit (Documentation and git operations - NOT in this command)
217
+
218
+ Command Scope: Only executes Steps 1-2. Steps 3-4 are executed by `/moai:2-run` and `/moai:3-sync`.
219
+
220
+ ---
221
+
222
+ ## The Command Has THREE Execution Phases
223
+
224
+ 1. PHASE 1: Project Analysis & SPEC Planning (STEP 1)
225
+ 2. PHASE 2: SPEC Document Creation (STEP 2)
226
+ 3. PHASE 3: Git Branch & PR Setup (STEP 2 continuation)
227
+
228
+ Each phase contains explicit step-by-step instructions.
229
+
230
+ ---
231
+
232
+ ## PHASE 1: Project Analysis and SPEC Planning (STEP 1)
233
+
234
+ PHASE 1 consists of two independent sub-phases to provide flexible workflow based on user request clarity:
235
+
236
+ ### PHASE 1 Workflow Overview
237
+
238
+ PHASE 1 Structure:
239
+
240
+ Phase A (OPTIONAL) - Explore Agent:
241
+
242
+ - Find relevant files by keywords
243
+ - Locate existing SPEC documents
244
+ - Identify implementation patterns
245
+ - Output: Exploration results passed to Phase B
246
+
247
+ Phase B (REQUIRED) - manager-spec Agent:
248
+
249
+ - Analyze project documents
250
+ - Propose SPEC candidates
251
+ - Design EARS structure
252
+ - Request user approval
253
+
254
+ After Phase B: Progress Report and User Confirmation
255
+
256
+ - Display analysis results and plan summary
257
+ - Show next steps and deliverables
258
+ - Request final user approval
259
+ - Proceed to PHASE 2
260
+
261
+ Key Points:
262
+
263
+ - Phase A is optional - Skip if user provides clear SPEC title
264
+ - Phase B is required - Always runs to analyze project and create SPEC
265
+
266
+ ---
267
+
268
+ ### PHASE 1A: Project Exploration (Optional - if needed)
269
+
270
+ #### When to run Phase A
271
+
272
+ This phase executes conditionally based on request clarity:
273
+
274
+ - [SOFT] User provides only vague/unstructured request
275
+ WHY: Vague requests require exploration to identify relevant context
276
+ IMPACT: Skipping exploration for vague requests produces unfocused SPECs
277
+
278
+ - [SOFT] Need to find existing files and patterns
279
+ WHY: Discovery prevents duplicate work and informs architecture decisions
280
+ IMPACT: Missing patterns leads to inconsistent implementation approaches
281
+
282
+ - [SOFT] Unclear about current project state
283
+ WHY: Project context shapes technical constraints and dependencies
284
+ IMPACT: Uninformed SPECs fail to account for existing architecture
285
+
286
+ #### Step 1A.1: Invoke Explore Agent (Optional)
287
+
288
+ Conditional Execution: Run Phase A ONLY if user request lacks clarity
289
+
290
+ If user request is vague or needs exploration:
291
+
292
+ Use the Explore subagent to:
293
+
294
+ Analyze the current project directory structure and relevant files based on the user request: "$ARGUMENTS"
295
+
296
+ Tasks:
297
+
298
+ 1. Find relevant files by keywords from the user request
299
+ 2. Locate existing SPEC documents (.moai/specs/\*.md)
300
+ 3. Identify implementation patterns and dependencies
301
+ 4. Discover project configuration files
302
+ 5. Analyze existing codebase structure
303
+
304
+ Report back:
305
+
306
+ - List of relevant files found
307
+ - Existing SPEC candidates discovered
308
+ - Implementation patterns identified
309
+ - Technical constraints and dependencies
310
+ - Recommendations for user clarification
311
+
312
+ Return comprehensive results to guide manager-spec agent.
313
+
314
+ Phase 1A Completion:
315
+
316
+ - Log exploration completion status
317
+ - Proceed to Phase 1B with exploration context
318
+
319
+ Else (user provided clear SPEC title):
320
+
321
+ - Skip Phase A
322
+ - Log Phase 1A as skipped
323
+ - Proceed directly to Phase 1B
324
+
325
+ Decision Logic: If user provided clear SPEC title (like "Add authentication module"), skip Phase A entirely and proceed directly to Phase B.
326
+
327
+ ---
328
+
329
+ ### PHASE 1B: SPEC Planning (Required)
330
+
331
+ #### Step 1B.1: Invoke manager-spec for project analysis
332
+
333
+ Use the manager-spec subagent to:
334
+
335
+ Analyze project and create SPEC plan for: $ARGUMENTS
336
+
337
+ Context Handling:
338
+
339
+ - If Phase 1A was executed: Continue from project exploration results
340
+ - If Phase 1A was skipped: Start fresh analysis based on user request: "$ARGUMENTS"
341
+
342
+ Language Configuration:
343
+
344
+ - conversation_language: {{CONVERSATION_LANGUAGE}}
345
+ - language_name: {{CONVERSATION_LANGUAGE_NAME}}
346
+
347
+ Critical Language Rules:
348
+
349
+ - Receive instructions in agent_prompt_language from config (default: English)
350
+ - Respond in conversation_language from config (user's preferred language)
351
+ - All SPEC documents content must be written in {{CONVERSATION_LANGUAGE}}
352
+ - Code examples and technical keywords remain in English (global standard)
353
+
354
+ Task Instructions:
355
+
356
+ PHASE 1B.1: Project Analysis and SPEC Discovery
357
+
358
+ 1. Document Analysis: Scan for existing documentation and patterns
359
+ - Product document: Find relevant files
360
+ - Structure document: Identify architectural patterns
361
+ - Tech document: Discover technical constraints
362
+
363
+ 2. SPEC Candidate Generation: Create 1-3 SPEC candidates
364
+ - Analyze existing SPECs in `.moai/specs/` for duplicates
365
+ - Check related GitHub issues via appropriate tools
366
+ - Generate unique SPEC candidates with proper naming
367
+
368
+ 3. EARS Structure Design: For each SPEC candidate:
369
+ - Define clear requirements using EARS grammar
370
+ - Design acceptance criteria with Given/When/Then
371
+ - Identify technical dependencies and constraints
372
+
373
+ PHASE 1B.2: Implementation Plan Creation
374
+ For the selected SPEC candidate, create a comprehensive implementation plan:
375
+
376
+ Technical Constraints & Dependencies:
377
+
378
+ - Library versions: Find latest stable versions
379
+ - Specify exact versions (e.g., `fastapi>=0.118.3`)
380
+ - Exclude beta/alpha versions, select only production stable versions
381
+ - Note: Detailed versions finalized in `/moai:2-run` stage
382
+
383
+ Precautions:
384
+
385
+ - Technical constraints: [Restraints to consider]
386
+ - Dependency: [Relevance with other SPECs]
387
+ - Branch strategy: [Processing by Personal/Team mode]
388
+
389
+ Expected deliverables:
390
+
391
+ - spec.md: [Core specifications of the EARS structure]
392
+ - plan.md: [Implementation plan]
393
+ - acceptance.md: [Acceptance criteria]
394
+ - Branches/PR: [Git operations by mode]
395
+
396
+ Phase 1B Completion:
397
+
398
+ - Log planning completion status
399
+ - Store context for subsequent phases
400
+
401
+ #### Step 1B.2: Request user approval
402
+
403
+ After the manager-spec presents the implementation plan report, use AskUserQuestion tool for explicit approval:
404
+
405
+ Tool: AskUserQuestion
406
+ Parameters:
407
+ questions:
408
+
409
+ - question: "Planning is complete. Would you like to proceed with SPEC creation based on this plan?"
410
+ header: "SPEC Generation"
411
+ multiSelect: false
412
+ options:
413
+ - label: "Proceed with SPEC Creation"
414
+ description: "Create SPEC files in .moai/specs/SPEC-{ID}/ based on approved plan"
415
+ - label: "Request Plan Modification"
416
+ description: "Modify plan content before SPEC creation"
417
+ - label: "Save as Draft"
418
+ description: "Save plan as draft and continue later"
419
+ - label: "Cancel"
420
+ description: "Discard plan and return to planning stage"
421
+
422
+ After AskUserQuestion returns user selection, proceed to Step 3.5.
423
+
424
+ #### Step 3.5: Progress Report and User Confirmation
425
+
426
+ This step automatically executes after PHASE 1 completion.
427
+
428
+ Display detailed progress report to user and get final approval:
429
+
430
+ Progress Report for PHASE 1 Completion:
431
+
432
+ Completed Items:
433
+
434
+ - Project document analysis completed
435
+ - Existing SPEC scan completed
436
+ - SPEC candidate generation completed
437
+ - Technical constraint analysis completed
438
+
439
+ Plan Summary:
440
+
441
+ - Selected SPEC: [SPEC ID] - [SPEC Title]
442
+ - Priority: [Priority value]
443
+ - Main technology stack: [Technology Stack]
444
+
445
+ Next Phase Plan (PHASE 2):
446
+
447
+ - spec.md creation: Core specifications with EARS structure
448
+ - plan.md creation: Detailed implementation plan
449
+ - acceptance.md creation: Acceptance criteria and scenarios
450
+ - Directory: .moai/specs/SPEC-[ID]/
451
+
452
+ Important Notes:
453
+
454
+ - Existing files may be overwritten
455
+ - Dependencies: [Dependencies list]
456
+ - Resource requirements: [Resource Requirements]
457
+
458
+ Tool: AskUserQuestion
459
+ Parameters:
460
+ questions:
461
+
462
+ - question: "Plan completion and progress report\n\nAnalysis results:\n- SPEC candidates found: [Number]\n- Priority: [Priority]\n- Estimated work time: [Time Estimation]\n\nNext steps:\n1. PHASE 2: SPEC file creation\n - .moai/specs/SPEC-{ID}/\n - spec.md, plan.md, acceptance.md creation\n\nProceed with the plan?"
463
+ header: "Plan Confirmation"
464
+ multiSelect: false
465
+ options:
466
+ - label: "Proceed"
467
+ description: "Start SPEC creation according to plan"
468
+ - label: "Detailed Revision"
469
+ description: "Revise plan content then proceed"
470
+ - label: "Save as Draft"
471
+ description: "Save plan and continue later"
472
+ - label: "Cancel"
473
+ description: "Cancel operation and discard plan"
474
+
475
+ Process user response from AskUserQuestion in Step 4.
476
+
477
+ #### Step 4: Process user's answer
478
+
479
+ Based on the user's choice:
480
+
481
+ IF user selected "Proceed":
482
+
483
+ 1. Store approval confirmation
484
+ 2. Print: Plan approved. Proceeding to PHASE 2.
485
+ 3. Proceed to PHASE 2 (SPEC Document Creation)
486
+
487
+ IF user selected "Detailed Revision":
488
+
489
+ 1. Ask the user: "What changes would you like to make to the plan?"
490
+ 2. Collect user's feedback via AskUserQuestion
491
+ 3. Pass feedback to manager-spec agent
492
+ 4. manager-spec updates the plan
493
+ 5. Return to Step 3.5 (request approval again with updated plan)
494
+
495
+ IF user selected "Save as Draft":
496
+
497
+ 1. Create directory: `.moai/specs/SPEC-{ID}/`
498
+ 2. Save plan to `.moai/specs/SPEC-{ID}/plan.md` with status: draft
499
+ 3. Create commit: `draft(spec): WIP SPEC-{ID} - {title}`
500
+ 4. Print to user: "Draft saved. Resume with: `/moai:1-plan resume SPEC-{ID}`"
501
+ 5. End command execution (stop here)
502
+
503
+ IF user selected "Cancel":
504
+
505
+ 1. Print to user: "Plan discarded. No files created."
506
+ 2. End command execution (stop here)
507
+
508
+ ---
509
+
510
+ ## PHASE 2: SPEC Document Creation (STEP 2 - After Approval)
511
+
512
+ This phase ONLY executes IF the user selected "Proceed" in Step 3.5.
513
+
514
+ Your task is to create the SPEC document files in the correct directory structure.
515
+
516
+ ### Critical Rule: Directory Naming Convention
517
+
518
+ [HARD] SPEC Directory Structure Requirement:
519
+
520
+ Format requirement: `.moai/specs/SPEC-{ID}/`
521
+ WHY: Standardized directory structure enables automated discovery and tooling
522
+ IMPACT: Non-standard naming breaks automation and causes deployment failures
523
+
524
+ Correct Examples of Required Format:
525
+
526
+ - `SPEC-AUTH-001/` - Domain single, properly formatted
527
+ - `SPEC-REFACTOR-001/` - Domain single, properly formatted
528
+ - `SPEC-UPDATE-REFACTOR-001/` - Composite domains (2), properly formatted
529
+
530
+ Examples of Incorrect Formats to Avoid:
531
+
532
+ - `AUTH-001/` - Missing SPEC- prefix breaks automation
533
+ - `SPEC-001-auth/` - Additional text after ID violates convention
534
+ - `SPEC-AUTH-001-jwt/` - Additional text after ID violates convention
535
+
536
+ [EXCEPTION] Direct Glob Usage for SPEC ID Validation:
537
+
538
+ This command has a selective exception allowing direct Glob tool usage for SPEC ID uniqueness verification.
539
+
540
+ Usage Pattern:
541
+
542
+ - Use Glob(".moai/specs/\*_/SPEC-_.md") to check existing SPEC list directly
543
+ - Verify new SPEC ID does not conflict with existing ones
544
+ - After validation, delegate to manager-spec agent for SPEC creation
545
+
546
+ WHY: SPEC ID validation is a performance bottleneck (30-40% speedup with direct Glob)
547
+ SCOPE: Read-only Glob only; file creation/modification must be delegated to agents
548
+ CONSTRAINT: This exception applies ONLY to SPEC ID uniqueness checks, not other operations
549
+
550
+ [HARD] ID Uniqueness Verification Requirement:
551
+
552
+ Verification scope: Search entire .moai/specs/ directory before creation
553
+ WHY: Duplicate IDs cause merge conflicts and implementation uncertainty
554
+ IMPACT: Duplicate IDs create version ambiguity and maintenance chaos
555
+
556
+ Verification output must include:
557
+
558
+ - exists: Boolean indicating whether ID already exists
559
+ - locations: Array of all conflicting file paths (empty if no conflicts)
560
+ - recommendation: Text assessment ("safe to create" or "duplicate found - use ID-XXX instead")
561
+
562
+ [SOFT] Composite Domain Naming Guidance:
563
+
564
+ - Allow: `UPDATE-REFACTOR-001` (2 domains maximum)
565
+ WHY: Two domains indicate coordinated work without excessive complexity
566
+ IMPACT: Two-domain SPECs maintain focus and scope
567
+
568
+ - Caution: `UPDATE-REFACTOR-FIX-001` (3+ domains not recommended)
569
+ WHY: Three or more domains indicate scope creep and mixed concerns
570
+ IMPACT: Complex domain names signal SPECs that should be split
571
+
572
+ ### Step 1: Invoke manager-spec for SPEC creation
573
+
574
+ Use the manager-spec subagent to:
575
+
576
+ Create SPEC document files for approved plan
577
+
578
+ Context Continuity:
579
+
580
+ - Continue from the SPEC planning phase in Phase 1B
581
+ - Use full planning context (project analysis, SPEC candidates, implementation plan) to generate comprehensive SPEC document files
582
+
583
+ Language Configuration:
584
+
585
+ - conversation_language: {{CONVERSATION_LANGUAGE}}
586
+ - language_name: {{CONVERSATION_LANGUAGE_NAME}}
587
+
588
+ Critical Language Rules:
589
+
590
+ - Receive instructions in agent_prompt_language from config (default: English)
591
+ - Respond in conversation_language from config (user's preferred language)
592
+ - All SPEC documents content must be written in {{CONVERSATION_LANGUAGE}}
593
+ - Technical terms and function names remain in English (global standard)
594
+
595
+ SPEC File Generation Rules (MANDATORY):
596
+
597
+ [HARD] Create Directory Structure, Not Single Files:
598
+
599
+ Requirement: Always create folder structure for SPEC documents
600
+ WHY: Directory structure enables multi-file organization and metadata storage
601
+ IMPACT: Single .md files prevent future tool integration and violate structure assumptions
602
+
603
+ Correct approach: Create `.moai/specs/SPEC-AUTH-001/` as directory
604
+ Incorrect approach: Create `.moai/specs/SPEC-AUTH-001.md` as single file
605
+
606
+ [HARD] Verify Before Creation:
607
+
608
+ Requirement: Check directory name format and ID duplicates before writing files
609
+ WHY: Pre-flight verification prevents invalid states and merge conflicts
610
+ IMPACT: Writing invalid files creates cleanup burden and workflow disruption
611
+
612
+ [HARD] Quality Gate Compliance:
613
+
614
+ Requirement: Follow these rules exactly for quality gate to pass
615
+ WHY: Quality gates ensure system reliability and consistency
616
+ IMPACT: Non-compliance causes pipeline failures and deployment blocks
617
+
618
+ SPEC Document Creation (Step-by-Step):
619
+
620
+ Step 1: Verify SPEC ID Format
621
+
622
+ - Format: SPEC-{DOMAIN}-{NUMBER}
623
+ - Examples: SPEC-AUTH-001, SPEC-REFACTOR-001, SPEC-UPDATE-REFACTOR-001
624
+ - Wrong: AUTH-001, SPEC-001-auth, SPEC-AUTH-001-jwt
625
+
626
+ Step 2: Verify ID Uniqueness
627
+
628
+ - Search .moai/specs/ for existing SPEC files
629
+ - If duplicate ID found → Change ID or update existing SPEC
630
+ - If ID is unique → Proceed to Step 3
631
+
632
+ Step 3: Create Directory Structure
633
+
634
+ - Create directory: .moai/specs/SPEC-{SPEC_ID}/
635
+ - Directory creation completes synchronously before Step 4
636
+
637
+ Step 4: Generate 3 SPEC Files (SIMULTANEOUS - Required)
638
+
639
+ - Create all 3 files at once:
640
+ - .moai/specs/SPEC-{SPEC_ID}/spec.md
641
+ - .moai/specs/SPEC-{SPEC_ID}/plan.md
642
+ - .moai/specs/SPEC-{SPEC_ID}/acceptance.md
643
+
644
+ File Requirements:
645
+
646
+ spec.md Requirements:
647
+
648
+ - YAML frontmatter with all 7 required fields:
649
+ - id: SPEC-{SPEC_ID}
650
+ - version: "1.0.0"
651
+ - status: "draft"
652
+ - created: "{{YYYY-MM-DD}}"
653
+ - updated: "{{YYYY-MM-DD}}"
654
+ - author: "{{AUTHOR_NAME}}"
655
+ - priority: "{{HIGH|MEDIUM|LOW}}"
656
+ - HISTORY section immediately after frontmatter
657
+ - Complete EARS structure with all 5 requirement types
658
+
659
+ plan.md Requirements:
660
+
661
+ - Implementation plan with detailed steps
662
+ - Task decomposition and dependencies
663
+ - Resource requirements and timeline
664
+ - Technology stack specifications
665
+ - Risk analysis and mitigation strategies
666
+
667
+ acceptance.md Requirements:
668
+
669
+ - Minimum 2 Given/When/Then test scenarios
670
+ - Edge case testing scenarios
671
+ - Success criteria and validation methods
672
+ - Performance/quality gate criteria
673
+
674
+ Quality Assurance:
675
+
676
+ - Information not in product/structure/tech document supplemented by asking new questions
677
+ - Acceptance Criteria written at least 2 times in Given/When/Then format
678
+ - Number of requirement modules ≤ 5 (if exceeded, include justification in SPEC)
679
+
680
+ Git Integration:
681
+
682
+ - Generate commit messages following conventional commits
683
+ - Create appropriate branch names based on git strategy
684
+ - Include SPEC identifiers in commit messages
685
+
686
+ ---
687
+
688
+ ## PHASE 3: Git Branch and PR Setup (STEP 2 continuation)
689
+
690
+ ### CRITICAL: PHASE 3 Execution is Conditional on Config AND Flags
691
+
692
+ PHASE 3 executes ONLY IF:
693
+
694
+ 1. PHASE 2 completed successfully
695
+ 2. One of these conditions is met:
696
+ - `--worktree` flag is provided (NEW: Worktree creation)
697
+ - `--branch` flag is provided OR user chose branch creation
698
+ - Configuration permits branch creation
699
+ - `github.spec_git_workflow` is explicitly configured
700
+
701
+ PHASE 3 Branch Logic:
702
+
703
+ - If `--worktree` flag: Skip traditional branch creation, create worktree instead
704
+ - If `--branch` flag: Follow traditional branch creation logic
705
+ - If no flags: Follow existing AskUserQuestion flow for branch choice
706
+
707
+ PHASE 3 is SKIPPED IF:
708
+
709
+ - `github.spec_git_workflow == "develop_direct"` (Direct commits, no branches)
710
+ - Configuration validation fails
711
+ - User permissions insufficient
712
+ - No branch/worktree creation flags provided AND user chooses "no branch"
713
+
714
+ ---
715
+
716
+ ### Step 1: Read and Validate Git Configuration
717
+
718
+ MANDATORY: Read configuration BEFORE any git operations
719
+
720
+ Execute configuration validation following this decision process:
721
+
722
+ Step 1A - Read Configuration:
723
+
724
+ - Read the configuration file from .moai/config/config.yaml
725
+ - Extract git_mode value from git_strategy.mode (expected values: "personal" or "team")
726
+ - Extract spec_workflow value from github.spec_git_workflow (this is required)
727
+
728
+ Step 1B - Validate spec_git_workflow Value:
729
+
730
+ - Check if spec_workflow is one of the valid values: "develop_direct", "feature_branch", or "per_spec"
731
+ - If spec_workflow is not one of these valid values:
732
+ - Report error indicating the invalid spec_git_workflow value
733
+ - Report error listing the valid workflow options
734
+ - Set SKIP_PHASE_3 to true
735
+ - Abort all git operations
736
+
737
+ Step 1C - Validate Configuration Consistency:
738
+
739
+ - If git_mode equals "personal" and spec_workflow equals "develop_direct":
740
+ - Configuration is consistent, proceed normally
741
+ - If git_mode equals "personal" and spec_workflow equals "feature_branch" or "per_spec":
742
+ - Issue warning that personal mode with branch creation is non-standard but allowed
743
+ - Configuration is acceptable, proceed with caution
744
+ - If git_mode equals "team" and spec_workflow equals "feature_branch" or "per_spec":
745
+ - Configuration is consistent, proceed normally
746
+ - Otherwise:
747
+ - Report error for inconsistent git configuration
748
+ - Abort all git operations
749
+
750
+ Step 1D - Log Configuration Status:
751
+
752
+ - Log the final git configuration showing mode and spec_workflow values
753
+
754
+ Configuration Validation Decision Logic:
755
+
756
+ If git_mode equals "personal":
757
+
758
+ - If spec_workflow equals "develop_direct": PHASE 3 SKIPPED (ROUTE A)
759
+ - If spec_workflow equals "feature_branch": PHASE 3 EXECUTES (ROUTE B)
760
+ - If spec_workflow equals "per_spec": PHASE 3 WITH USER ASK (ROUTE C)
761
+
762
+ If git_mode equals "team":
763
+
764
+ - spec_workflow value is ignored: PHASE 3 EXECUTES (ROUTE D - Team Mode)
765
+
766
+ ---
767
+
768
+ ### Step 2: Branch Creation Logic (All 3 Modes)
769
+
770
+ All modes use common `branch_creation.prompt_always` configuration
771
+
772
+ #### Step 2.1: Determine Branch Creation Behavior
773
+
774
+ Based on config git_strategy.branch_creation.prompt_always:
775
+
776
+ Step 2.1: Read branch creation configuration
777
+
778
+ - Read prompt_always from git_strategy.branch_creation.prompt_always
779
+ - Default value is true if not specified
780
+
781
+ Decision Logic:
782
+
783
+ - If prompt_always equals true: ACTION is ASK_USER_FOR_BRANCH_CREATION
784
+ - If prompt_always equals false:
785
+ - If git_mode equals "manual": ACTION is SKIP_BRANCH_CREATION
786
+ - If git_mode equals "personal" or "team": ACTION is AUTO_CREATE_BRANCH
787
+
788
+ ---
789
+
790
+ #### Step 2.2: Route A - Ask User (When `prompt_always: true`)
791
+
792
+ CONDITION: `branch_creation.prompt_always == true`
793
+
794
+ ACTION: Ask user for branch/worktree creation preference
795
+
796
+ **Step 1: Check auto_branch configuration**
797
+
798
+ Read configuration value from config.yaml:
799
+
800
+ - Path: git_strategy.automation.auto_branch
801
+ - Default: true
802
+
803
+ **Step 2: Early exit if auto_branch is disabled**
804
+
805
+ If auto_branch equals false:
806
+
807
+ - Set ROUTE to USE_CURRENT_BRANCH
808
+ - Skip to Step 2.4 immediately
809
+ - Do NOT ask user any questions
810
+
811
+ **Step 3: Ask user if auto_branch is enabled**
812
+
813
+ Use AskUserQuestion tool with the following parameters:
814
+
815
+ - Question: "Create a development environment for this SPEC?"
816
+ - Header: "Development Environment"
817
+ - MultiSelect: false
818
+ - Options:
819
+ 1. "Create Worktree" - Create isolated worktree environment (recommended for parallel SPEC development)
820
+ 2. "Create Branch" - Create feature/SPEC-{SPEC_ID} branch (traditional workflow)
821
+ 3. "Use current branch" - Work directly on current branch
822
+
823
+ **Step 4: Determine route based on user choice**
824
+
825
+ Based on user selection:
826
+
827
+ - If "Create Worktree" selected: Set ROUTE to CREATE_WORKTREE
828
+ - If "Create Branch" selected: Set ROUTE to CREATE_BRANCH
829
+ - If "Use current branch" selected: Set ROUTE to USE_CURRENT_BRANCH
830
+
831
+ Next Step: Go to Step 2.5 (worktree), 2.3 (branch), or 2.4 (current) based on route
832
+
833
+ ---
834
+
835
+ #### Step 2.3: Create Feature Branch (After User Choice OR Auto-Creation)
836
+
837
+ CONDITION:
838
+
839
+ - User selected "Create Branch"
840
+ - OR (`prompt_always: false` AND git_mode in [personal, team])
841
+ - AND `git_strategy.automation.auto_branch == true`
842
+
843
+ If `auto_branch: false`: Skip to Step 2.4 (Use current branch)
844
+
845
+ ACTION: Invoke manager-git to create feature branch
846
+
847
+ Use the manager-git subagent to:
848
+
849
+ Create feature branch for SPEC implementation
850
+
851
+ Instructions:
852
+
853
+ - MODE: {git_mode} (manual/personal/team)
854
+ - BRANCH_CREATION: prompt_always = {prompt_always}
855
+
856
+ Tasks:
857
+
858
+ 1. Create branch: `feature/SPEC-{SPEC_ID}-{description}`
859
+ 2. Set tracking upstream if remote exists
860
+ 3. Switch to new branch
861
+ 4. Create initial commit (if appropriate for mode)
862
+
863
+ Validation:
864
+
865
+ - Verify branch was created and checked out
866
+ - Verify current branch is feature/SPEC-{SPEC_ID}
867
+ - Return branch creation status
868
+
869
+ Note: PR creation is handled separately in /moai:2-run or /moai:3-sync (Team mode only)
870
+
871
+ Expected Outcome:
872
+
873
+ - Feature branch created: feature/SPEC-[SPEC_ID]-description
874
+ - Current branch switched to feature branch
875
+ - Ready for implementation in /moai:2-run
876
+
877
+ ---
878
+
879
+ #### Step 2.4: Skip Branch Creation (After User Choice OR Manual Mode)
880
+
881
+ CONDITION: User selected "Use current branch" OR (`prompt_always: false` AND git_mode == manual)
882
+
883
+ ACTION: Skip branch creation, continue with current branch
884
+
885
+ Branch creation skipped:
886
+
887
+ - SPEC files created on current branch
888
+ - NO manager-git agent invoked
889
+ - Ready for /moai:2-run implementation
890
+ - Commits will be made directly to current branch during TDD cycle
891
+
892
+ ---
893
+
894
+ #### Step 2.5: Worktree Creation (NEW - When --worktree flag provided)
895
+
896
+ CONDITION: `--worktree` flag is provided in user command
897
+
898
+ ACTION: Create Git worktree using WorktreeManager
899
+
900
+ [HARD] SPEC Commit Before Worktree Creation:
901
+
902
+ Requirement: When --worktree flag is provided, SPEC files MUST be committed before worktree creation
903
+ WHY: Worktree is created from the current commit; uncommitted SPEC files won't exist in the worktree
904
+ IMPACT: Uncommitted SPECs cause missing files in worktree and inconsistent state
905
+
906
+ Step 2.5A - Parse Command Arguments:
907
+
908
+ - Parse the command arguments from ARGUMENTS variable
909
+ - Check if --worktree flag is present in the arguments
910
+ - Check if --branch flag is present in the arguments
911
+
912
+ Step 2.5B - MANDATORY SPEC Commit (when --worktree flag is present):
913
+
914
+ Before worktree creation, commit SPEC files:
915
+
916
+ 1. Stage SPEC files: `git add .moai/specs/SPEC-{SPEC_ID}/`
917
+ 2. Create commit with message: `feat(spec): Add SPEC-{SPEC_ID} - {title}`
918
+ 3. Verify commit was successful before proceeding
919
+ 4. If commit fails, abort worktree creation and report error
920
+
921
+ Step 2.5C - Worktree Creation (after SPEC commit):
922
+
923
+ - Determine project root as the current working directory
924
+ - Set worktree root to the user home directory under worktrees/MoAI-ADK
925
+ - Initialize the WorktreeManager with project root and worktree root paths
926
+ - Create worktree for the SPEC with the following parameters:
927
+ - spec_id: The generated SPEC ID (e.g., SPEC-AUTH-001)
928
+ - branch_name: Feature branch name in format feature/SPEC-{ID}
929
+ - base_branch: main (or current branch with SPEC commit)
930
+
931
+ Step 2.5D - Success Output:
932
+
933
+ - Display confirmation that SPEC was created and committed with the SPEC ID
934
+ - Display the worktree path that was created
935
+ - Provide next steps guidance:
936
+ - Option 1: Switch to worktree using moai-worktree switch command
937
+ - Option 2: Use shell eval with moai-worktree go command
938
+ - Option 3: Run /moai:2-run with the SPEC ID
939
+
940
+ Step 2.5E - Error Handling:
941
+
942
+ - If SPEC commit fails:
943
+ - Display error message with the failure reason
944
+ - Abort worktree creation (do NOT create worktree with uncommitted SPEC)
945
+ - Suggest manual commit: `git add .moai/specs/SPEC-{ID}/ && git commit -m "feat(spec): Add SPEC-{ID}"`
946
+ - After manual commit, retry worktree creation
947
+
948
+ - If worktree creation fails (after successful SPEC commit):
949
+ - Display error message with the failure reason
950
+ - Confirm that the SPEC was committed successfully
951
+ - Provide manual worktree creation command as fallback
952
+
953
+ Expected Success Outcome:
954
+
955
+ - SPEC created: SPEC-AUTH-001
956
+ - SPEC committed: `feat(spec): Add SPEC-AUTH-001 - {title}`
957
+ - Worktree created: ~/worktrees/MoAI-ADK/SPEC-AUTH-001
958
+
959
+ Next steps:
960
+
961
+ 1. Switch to worktree: moai-worktree switch SPEC-AUTH-001
962
+ 2. Or use shell eval: eval $(moai-worktree go SPEC-AUTH-001)
963
+ 3. Then run: /moai:2-run SPEC-AUTH-001
964
+
965
+ Error Handling:
966
+
967
+ - If SPEC commit fails: Abort worktree creation, show manual commit instructions
968
+ - If worktree creation fails: SPEC is committed, show manual worktree creation instructions
969
+ - If worktree already exists: Show switch instructions
970
+ - If WorktreeManager not available: Show installation/dependency instructions
971
+
972
+ ---
973
+
974
+ #### Step 2.6: Team Mode - Create Draft PR (After Branch Creation)
975
+
976
+ CONDITION: `git_mode == "team"` AND branch was created (Step 2.3) AND NOT `--worktree` flag
977
+
978
+ ACTION: Create draft PR for team review
979
+
980
+ Use the manager-git subagent to:
981
+
982
+ Create draft pull request for SPEC implementation (Team mode only)
983
+
984
+ Critical Config: git_strategy.mode == "team"
985
+ → Team mode REQUIRES draft PRs for review coordination
986
+
987
+ Tasks:
988
+
989
+ 1. Create draft PR: feature/SPEC-{SPEC_ID} → main/develop branch
990
+ 2. PR title: "feat(spec): Add SPEC-{SPEC_ID} [DRAFT]"
991
+ 3. PR body: Include SPEC ID, description, and checklist
992
+ 4. Add appropriate labels (spec, draft, etc.)
993
+ 5. Assign reviewers from team config (if configured)
994
+ 6. Set PR as DRAFT (do NOT auto-merge)
995
+
996
+ Validation:
997
+
998
+ - Verify PR was created in draft status
999
+ - Return PR URL and status
1000
+
1001
+ Expected Outcome:
1002
+
1003
+ - Feature branch: feature/SPEC-[SPEC_ID]
1004
+ - Draft PR created for team review
1005
+ - Ready for /moai:2-run implementation
1006
+
1007
+ ---
1008
+
1009
+ ### Step 3: Conditional Status Report
1010
+
1011
+ Display status based on configuration and execution result:
1012
+
1013
+ #### Case 1: Branch Creation Prompted (`prompt_always: true`) - User Selected "Auto create"
1014
+
1015
+ ```
1016
+ Phase 3 Status: Feature Branch Created (User Choice)
1017
+
1018
+ Configuration: git_strategy.mode = "{git_mode}"
1019
+ Branch Creation: prompt_always = true → User chose "Auto create"
1020
+
1021
+ Feature Branch Created:
1022
+ - Branch: `feature/SPEC-{SPEC_ID}`
1023
+ - Current branch switched to feature branch
1024
+ - Ready for implementation on isolated branch
1025
+
1026
+ {IF TEAM MODE:
1027
+ Draft PR Created (Team Mode):
1028
+ - PR Title: "feat(spec): Add SPEC-{SPEC_ID} [DRAFT]"
1029
+ - Target Branch: develop/main
1030
+ - Status: DRAFT (awaiting review)
1031
+ }
1032
+
1033
+ Next Steps:
1034
+ 1. Review SPEC in `.moai/specs/SPEC-{SPEC_ID}/`
1035
+ 2. Execute `/moai:2-run SPEC-{SPEC_ID}` to begin implementation
1036
+ 3. 🌿 All commits will be made to feature branch
1037
+ {IF TEAM MODE:
1038
+ 4. Share draft PR with team for early review (already created)
1039
+ 5. Team can comment during development
1040
+ 6. Finalize PR in `/moai:3-sync` when complete
1041
+ :ELSE:
1042
+ 4. Create PR in `/moai:3-sync` when implementation complete
1043
+ }
1044
+ ```
1045
+
1046
+ ---
1047
+
1048
+ #### Case 2: Branch Creation Prompted (`prompt_always: true`) - User Selected "Use current branch"
1049
+
1050
+ ```
1051
+ Phase 3 Status: Direct Commit Mode (User Choice)
1052
+
1053
+ Configuration: git_strategy.mode = "{git_mode}"
1054
+ Branch Creation: prompt_always = true → User chose "Use current branch"
1055
+
1056
+ No Branch Created:
1057
+ - SPEC files created on current branch
1058
+ - Ready for direct implementation
1059
+ - Commits will be made directly to current branch
1060
+
1061
+ Next Steps:
1062
+ 1. Review SPEC in `.moai/specs/SPEC-{SPEC_ID}/`
1063
+ 2. Execute `/moai:2-run SPEC-{SPEC_ID}` to begin implementation
1064
+ 3. All commits will be made directly to current branch
1065
+ 4. Follow TDD: RED → GREEN → REFACTOR cycles
1066
+ ```
1067
+
1068
+ ---
1069
+
1070
+ #### Case 3: Branch Creation Auto-Skipped (Manual Mode + `prompt_always: false`)
1071
+
1072
+ ```
1073
+ Phase 3 Status: Direct Commit Mode (Configuration)
1074
+
1075
+ Configuration: git_strategy.mode = "manual"
1076
+ Branch Creation: prompt_always = false → Auto-skipped
1077
+
1078
+ No Branch Created (Manual Mode Default):
1079
+ - SPEC files created on current branch
1080
+ - NO manager-git invoked (as configured)
1081
+ - Ready for direct implementation
1082
+ - Commits will be made directly to current branch
1083
+
1084
+ Next Steps:
1085
+ 1. Review SPEC in `.moai/specs/SPEC-{SPEC_ID}/`
1086
+ 2. Execute `/moai:2-run SPEC-{SPEC_ID}` to begin implementation
1087
+ 3. Make commits directly to current branch
1088
+ 4. Follow TDD: RED → GREEN → REFACTOR cycles
1089
+ ```
1090
+
1091
+ ---
1092
+
1093
+ #### Case 4: Branch Creation Skipped with Auto-Enable Prompt (Personal/Team + `prompt_always: false` + `auto_enabled: false`)
1094
+
1095
+ ```
1096
+ Phase 3 Status: Direct Commit Mode (Manual Default for Personal/Team)
1097
+
1098
+ Configuration: git_strategy.mode = "{git_mode}" (personal or team)
1099
+ Branch Creation: prompt_always = false, auto_enabled = false → Manual Default
1100
+
1101
+ Branch Creation: Not created yet (pending user approval)
1102
+ - SPEC files created on current branch
1103
+ - Ready for implementation
1104
+ - Commits will be made directly to current branch initially
1105
+
1106
+ Automation Approval Offered:
1107
+ ─────────────────────────────────────────
1108
+ Would you like to enable automatic branch creation for future SPEC creations?
1109
+ (This will update your config.yaml)
1110
+
1111
+ Yes → Set branch_creation.auto_enabled = true
1112
+ → Next SPEC will auto-create feature/SPEC-XXX branch
1113
+
1114
+ No → Keep manual mode
1115
+ → Continue working on current branch for this SPEC
1116
+ → No config changes made
1117
+ ─────────────────────────────────────────
1118
+
1119
+ Next Steps:
1120
+ 1. Review SPEC in `.moai/specs/SPEC-{SPEC_ID}/`
1121
+ 2. Execute `/moai:2-run SPEC-{SPEC_ID}` to begin implementation
1122
+ 3. Make commits directly to current branch
1123
+ 4. Follow TDD: RED → GREEN → REFACTOR cycles
1124
+ 5. Create PR in `/moai:3-sync` when implementation complete
1125
+ ```
1126
+
1127
+ ---
1128
+
1129
+ #### Case 5: Branch Creation Auto-Enabled (Personal/Team + `prompt_always: false` + `auto_enabled: true`)
1130
+
1131
+ ```
1132
+ Phase 3 Status: Feature Branch Created (Auto-Enabled)
1133
+
1134
+ Configuration: git_strategy.mode = "{git_mode}" (personal or team)
1135
+ Branch Creation: prompt_always = false, auto_enabled = true → Auto-enabled
1136
+
1137
+ Feature Branch Created:
1138
+ - Branch: `feature/SPEC-{SPEC_ID}`
1139
+ - Current branch switched to feature branch
1140
+ - Ready for implementation on isolated branch
1141
+
1142
+ {IF TEAM MODE:
1143
+ Draft PR Created (Team Mode):
1144
+ - PR Title: "feat(spec): Add SPEC-{SPEC_ID} [DRAFT]"
1145
+ - Target Branch: develop/main
1146
+ - Status: DRAFT (awaiting review)
1147
+ }
1148
+
1149
+ Next Steps:
1150
+ 1. Review SPEC in `.moai/specs/SPEC-{SPEC_ID}/`
1151
+ 2. Execute `/moai:2-run SPEC-{SPEC_ID}` to begin implementation
1152
+ 3. 🌿 All commits will be made to feature branch
1153
+ {IF TEAM MODE:
1154
+ 4. Share draft PR with team for early review
1155
+ 5. Team can comment on draft PR during development
1156
+ 6. Finalize PR in `/moai:3-sync` when complete
1157
+ :ELSE:
1158
+ 4. Create PR in `/moai:3-sync` when implementation complete
1159
+ }
1160
+ ```
1161
+
1162
+ ---
1163
+
1164
+ #### Case 6: Worktree Creation (--worktree flag or user choice)
1165
+
1166
+ ```
1167
+ Phase 3 Status: Worktree Created (Isolated Development Environment)
1168
+
1169
+ Worktree Creation: --worktree flag provided OR user chose "Create Worktree"
1170
+ SPEC Created: SPEC-{SPEC_ID} documents generated successfully
1171
+ SPEC Committed: feat(spec): Add SPEC-{SPEC_ID} - {title}
1172
+
1173
+ Isolated Worktree Created:
1174
+ - Path: ~/worktrees/MoAI-ADK/SPEC-{SPEC_ID}/
1175
+ - Branch: feature/SPEC-{SPEC_ID}
1176
+ - Base Commit: Contains committed SPEC files
1177
+ - Status: Ready for parallel development
1178
+
1179
+ Next Steps:
1180
+ 1. Switch to worktree: `moai-worktree switch SPEC-{SPEC_ID}`
1181
+ 2. Or use shell eval: `eval $(moai-worktree go SPEC-{SPEC_ID})`
1182
+ 3. Review SPEC documents in worktree: `.moai/specs/SPEC-{SPEC_ID}/`
1183
+ 4. Execute `/moai:2-run SPEC-{SPEC_ID}` to begin TDD implementation
1184
+ 5. Work on isolated environment without affecting other SPECs
1185
+
1186
+ Benefits of Worktree Development:
1187
+ - Complete isolation from other SPEC work
1188
+ - 🔀 Easy switching between multiple SPECs
1189
+ - 🧹 Automatic cleanup when SPEC is completed
1190
+ - Lower memory usage than full repository clones
1191
+ - SPEC files guaranteed in worktree (committed before creation)
1192
+ ```
1193
+
1194
+ ---
1195
+
1196
+ ## Output Format
1197
+
1198
+ ### Output Format Rules
1199
+
1200
+ [HARD] User-Facing Reports: Always use Markdown formatting for user communication. Never display XML tags to users.
1201
+ WHY: Users expect readable formatted text, not markup
1202
+ IMPACT: XML tags in user output create confusion and reduce comprehension
1203
+
1204
+ [HARD] Internal Agent Data: XML tags are reserved for agent-to-agent data transfer only.
1205
+ WHY: XML structure enables automated parsing for downstream agent coordination
1206
+ IMPACT: Using XML for user output degrades user experience
1207
+
1208
+ ### User-Facing Output (Markdown)
1209
+
1210
+ Progress reports must use Markdown with clear sections:
1211
+
1212
+ **Analysis Output**:
1213
+ - **Context**: Current project state and relevant files discovered
1214
+ - **Findings**: SPEC candidates identified with rationale
1215
+ - **Assessment**: Technical constraints and implementation feasibility
1216
+ - **Recommendations**: Next steps and decision options
1217
+
1218
+ **Plan Output**:
1219
+ - **Requirements**: Approved SPEC title, ID, priority, and scope
1220
+ - **Architecture**: Technical stack, dependencies, and integration points
1221
+ - **Decomposition**: Task breakdown and implementation sequence
1222
+ - **Validation**: Quality criteria and acceptance conditions
1223
+
1224
+ **Implementation Output**:
1225
+ - **Status**: Phase completion status and artifacts created
1226
+ - **Artifacts**: Location and format of created SPEC files
1227
+ - **Validation**: Quality gate results and compliance verification
1228
+ - **NextSteps**: User guidance for proceeding to implementation phase
1229
+
1230
+ ### Internal Agent Communication (XML)
1231
+
1232
+ For agent-to-agent data transfer only (never displayed to users):
1233
+
1234
+ ```xml
1235
+ <analysis>Context, findings, assessment, and recommendations</analysis>
1236
+ <plan>Requirements, architecture, decomposition, and validation criteria</plan>
1237
+ <implementation>Status, artifacts, validation results, and next steps</implementation>
1238
+ ```
1239
+
1240
+ WHY: Structured output enables parsing for automated workflows and tool integration
1241
+ IMPACT: Unstructured output prevents downstream automation and creates manual overhead
1242
+
1243
+ ---
1244
+
1245
+ ## Summary: Your Execution Checklist
1246
+
1247
+ Before you consider this command complete, verify:
1248
+
1249
+ ### AskUserQuestion Compliance (HARD Rules)
1250
+ - [ ] SPEC Creation Approval: AskUserQuestion used before creating SPEC files
1251
+ - [ ] Development Environment Selection: AskUserQuestion used for worktree/branch/current choice
1252
+ - [ ] Next Action Selection: AskUserQuestion used after SPEC creation completes
1253
+
1254
+ ### PHASE 1 Checklist
1255
+ - [ ] PHASE 1 executed: manager-spec analyzed project and proposed SPEC candidates
1256
+ - [ ] Progress report displayed: User shown detailed progress report with analysis results
1257
+ - [ ] User approval obtained: User explicitly approved SPEC creation (via AskUserQuestion)
1258
+
1259
+ ### PHASE 2 Checklist
1260
+ - [ ] PHASE 2 executed: manager-spec created all 3 SPEC files (spec.md, plan.md, acceptance.md)
1261
+ - [ ] Directory naming correct: `.moai/specs/SPEC-{ID}/` format followed
1262
+ - [ ] YAML frontmatter valid: All 7 required fields present
1263
+ - [ ] HISTORY section present: Immediately after YAML frontmatter
1264
+ - [ ] EARS structure complete: All 5 requirement types included
1265
+
1266
+ ### PHASE 3 Checklist
1267
+ - [ ] PHASE 3 executed: Appropriate action taken based on flags/user choice:
1268
+ - [ ] If --worktree: SPEC committed BEFORE worktree creation (HARD rule)
1269
+ - [ ] If --worktree: WorktreeManager created isolated worktree environment
1270
+ - [ ] If --branch: manager-git created feature branch
1271
+ - [ ] If prompt: User choice implemented via AskUserQuestion (worktree/branch/current)
1272
+ - [ ] If Team mode: Draft PR created (when branch created, not worktree)
1273
+ - [ ] Branch/Worktree naming correct: `feature/SPEC-{ID}` format for branches, `SPEC-{ID}` for worktrees
1274
+ - [ ] Next steps presented: User shown appropriate guidance for worktree navigation or branch development
1275
+ - [ ] Worktree guidance displayed: Worktree switch/eval instructions shown (when applicable)
1276
+
1277
+ IF all checkboxes are checked → Command execution successful
1278
+
1279
+ IF any checkbox is unchecked → Identify missing step and complete it before ending
1280
+
1281
+ ---
1282
+
1283
+ ## Quick Reference
1284
+
1285
+ Scenario: Clear feature request
1286
+
1287
+ - Mode: Direct to Planning
1288
+ - Entry Point: /moai:1-plan "feature description"
1289
+ - Key Phases: Phase 1B then Phase 2 then Phase 3
1290
+ - Expected Outcome: SPEC created plus branch/worktree (conditional)
1291
+
1292
+ Scenario: Vague user request
1293
+
1294
+ - Mode: Exploration First
1295
+ - Entry Point: /moai:1-plan "vague request"
1296
+ - Key Phases: Phase 1A then Phase 1B then Phase 2 then Phase 3
1297
+ - Expected Outcome: Exploration then SPEC plus branch/worktree
1298
+
1299
+ Scenario: Resume draft SPEC
1300
+
1301
+ - Mode: Resume Existing
1302
+ - Entry Point: /moai:1-plan resume SPEC-XXX
1303
+ - Key Phases: Phase 1B then Phase 2 then Phase 3
1304
+ - Expected Outcome: Complete existing SPEC
1305
+
1306
+ Scenario: Worktree creation (NEW)
1307
+
1308
+ - Mode: NEW
1309
+ - Entry Point: /moai:1-plan "feature" --worktree
1310
+ - Key Phases: Phase 1B then Phase 2 then Phase 3 (worktree)
1311
+ - Expected Outcome: SPEC plus isolated worktree environment
1312
+
1313
+ Scenario: Branch creation prompt
1314
+
1315
+ - Mode: User Choice
1316
+ - Entry Point: /moai:1-plan "feature" (prompt_always: true)
1317
+ - Key Phases: Phase 1-2 then User chooses (worktree/branch/current) then Phase 3
1318
+ - Expected Outcome: SPEC plus user-selected strategy
1319
+
1320
+ Scenario: Auto branch creation
1321
+
1322
+ - Mode: Automated
1323
+ - Entry Point: /moai:1-plan "feature" (prompt_always: false, auto_enabled: true)
1324
+ - Key Phases: Phase 1-2 then Auto branch creation then Phase 3
1325
+ - Expected Outcome: SPEC plus auto branch (Personal/Team)
1326
+
1327
+ ### New Worktree Workflow Examples
1328
+
1329
+ Basic Worktree Creation:
1330
+
1331
+ - Command: /moai:1-plan "User authentication system" --worktree
1332
+ - Output: SPEC created: SPEC-AUTH-001, Worktree created: ~/worktrees/MoAI-ADK/SPEC-AUTH-001
1333
+ - Next steps:
1334
+ 1. Switch to worktree: moai-worktree switch SPEC-AUTH-001
1335
+ 2. Or use shell eval: eval $(moai-worktree go SPEC-AUTH-001)
1336
+
1337
+ Interactive Environment Selection:
1338
+
1339
+ - Command: /moai:1-plan "Payment integration"
1340
+ - User prompted to choose:
1341
+ - Create Worktree (recommended for parallel development)
1342
+ - Create Branch (traditional workflow)
1343
+ - Use current branch
1344
+
1345
+ Associated Agents & Components:
1346
+
1347
+ - `Explore` - Project exploration and file discovery (Phase 1A, optional)
1348
+ - `manager-spec` - SPEC planning and document creation (Phase 1B-2, required)
1349
+ - `manager-git` - Branch and PR creation (Phase 3, conditional)
1350
+ - WorktreeManager - Worktree creation and management (Phase 3, when --worktree flag used)
1351
+
1352
+ Key Integration Points:
1353
+
1354
+ - WorktreeManager Import: `from moai_adk.cli.worktree.manager import WorktreeManager`
1355
+ - Worktree Registry: Automatic registration in `~/worktrees/MoAI-ADK/.moai-worktree-registry.json`
1356
+ - Git Integration: Creates feature branch `feature/SPEC-{ID}` and associated worktree
1357
+ - Error Handling: Graceful fallback if worktree creation fails
1358
+
1359
+ SPEC Documents Directory:
1360
+
1361
+ - Location: `.moai/specs/SPEC-{ID}/` (directory format, NOT single .md file)
1362
+ - Files: `spec.md`, `plan.md`, `acceptance.md` (created simultaneously via MultiEdit)
1363
+ - Format: EARS structure with YAML frontmatter + HISTORY section
1364
+ - Language: All content in user's conversation_language
1365
+
1366
+ Version: 5.1.0 (4-Step Agent-Based Workflow + Worktree Integration)
1367
+ Last Updated: 2025-11-28
1368
+ Architecture: Commands → Agents → Skills (Complete delegation)
1369
+ NEW: WorktreeManager integration for parallel SPEC development
1370
+
1371
+ ---
1372
+
1373
+ ## SPEC-WORKTREE-001 Integration Status
1374
+
1375
+ Status: COMPLETE - Full integration achieved on 2025-11-28
1376
+
1377
+ ### What Was Implemented
1378
+
1379
+ 1. --worktree Flag Support: Added argument parsing for --worktree flag in /moai:1-plan
1380
+ 2. WorktreeManager Integration: Automatic worktree creation using existing src/moai_adk/cli/worktree/manager.py
1381
+ 3. Guidance Messages: Clear next-step instructions for worktree navigation
1382
+ 4. Interactive Flow: AskUserQuestion integration for worktree/branch/current choice
1383
+ 5. Error Handling: Graceful fallback when worktree creation fails
1384
+
1385
+ ### Expected Behavior
1386
+
1387
+ Command execution: /moai:1-plan "User authentication" --worktree
1388
+
1389
+ Expected output:
1390
+
1391
+ - SPEC created: SPEC-AUTH-001
1392
+ - Worktree created: ~/worktrees/MoAI-ADK/SPEC-AUTH-001
1393
+
1394
+ Next steps:
1395
+
1396
+ 1. Switch to worktree: moai-worktree switch SPEC-AUTH-001
1397
+ 2. Or use shell eval: eval $(moai-worktree go SPEC-AUTH-001)
1398
+ 3. Then run: /moai:2-run SPEC-AUTH-001
1399
+
1400
+ ### Integration Points
1401
+
1402
+ - Import: from moai_adk.cli.worktree.manager import WorktreeManager
1403
+ - Worktree Registry: Automatic registration in ~/worktrees/MoAI-ADK/.moai-worktree-registry.json
1404
+ - Branch Creation: Creates feature branch feature/SPEC-[SPEC_ID] automatically
1405
+ - Documentation: Updated all examples, checklists, and status reports
1406
+
1407
+ ### Completion Criteria (All Met)
1408
+
1409
+ - Flag Parsing: --worktree flag detected and processed correctly
1410
+ - Worktree Creation: WorktreeManager.create() called with correct parameters
1411
+ - User Guidance: Next steps displayed in user-friendly format
1412
+ - Error Handling: Fallback messages when worktree creation fails
1413
+ - Documentation: All references updated with worktree scenarios
1414
+ - Backward Compatibility: Existing --branch and default behavior preserved
1415
+
1416
+ SPEC-WORKTREE-001: 100% Complete - All 85% existing implementation plus 15% missing integration now complete
1417
+
1418
+ ---
1419
+
1420
+ ## End of command execution guide
1421
+
1422
+ ## Final Step: Next Action Selection
1423
+
1424
+ After SPEC creation completes, use AskUserQuestion tool to guide user to next action:
1425
+
1426
+ Question: SPEC document creation is complete. What would you like to do next?
1427
+ Header: Next Steps
1428
+ MultiSelect: false
1429
+ Options:
1430
+
1431
+ - Start Implementation - Execute /moai:2-run to begin TDD development
1432
+ - Modify Plan - Modify and enhance SPEC content
1433
+ - Add New Feature - Create additional SPEC document
1434
+
1435
+ Important:
1436
+
1437
+ - Use conversation language from config
1438
+ - No emojis in any AskUserQuestion fields
1439
+ - Always provide clear next step options
1440
+
1441
+ ## EXECUTION DIRECTIVE
1442
+
1443
+ You must NOW execute the command following the "The 4-Step Agent-Based Workflow Command Logic" described above.
1444
+
1445
+ 1. Start PHASE 1: Project Analysis & SPEC Planning immediately.
1446
+ 2. Use the manager-spec subagent (or Explore subagent as appropriate).
1447
+ 3. Do NOT just describe what you will do. DO IT.