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,2443 @@
1
+ Metadata-Version: 2.4
2
+ Name: moai-adk
3
+ Version: 1.1.0
4
+ Summary: MoAI Agentic Development Kit - SPEC-First TDD with Alfred SuperAgent & Unified moai-core-* Skills
5
+ Project-URL: Homepage, https://github.com/modu-ai/moai-adk
6
+ Project-URL: Repository, https://github.com/modu-ai/moai-adk
7
+ Project-URL: Issues, https://github.com/modu-ai/moai-adk/issues
8
+ Project-URL: Changelog, https://github.com/modu-ai/moai-adk/releases
9
+ Author-email: MoAI Team <support@moduai.kr>
10
+ License: COPYLEFT-3.0
11
+ License-File: LICENSE
12
+ Keywords: agentic,ai,alfred,claude,development,spec-first,tdd,toolkit
13
+ Classifier: Development Status :: 5 - Production/Stable
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: License :: Other/Proprietary License
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Programming Language :: Python :: 3.14
21
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
22
+ Classifier: Topic :: Software Development :: Quality Assurance
23
+ Classifier: Topic :: Software Development :: Testing
24
+ Requires-Python: >=3.11
25
+ Requires-Dist: aiohttp>=3.13.2
26
+ Requires-Dist: click>=8.1.0
27
+ Requires-Dist: gitpython>=3.1.45
28
+ Requires-Dist: inquirerpy>=0.3.4
29
+ Requires-Dist: jinja2>=3.0.0
30
+ Requires-Dist: packaging>=21.0
31
+ Requires-Dist: psutil>=7.1.3
32
+ Requires-Dist: pyfiglet>=1.0.2
33
+ Requires-Dist: pyyaml>=6.0
34
+ Requires-Dist: questionary>=2.0.0
35
+ Requires-Dist: requests>=2.28.0
36
+ Requires-Dist: rich>=13.0.0
37
+ Provides-Extra: dev
38
+ Requires-Dist: black>=24.0.0; extra == 'dev'
39
+ Requires-Dist: hypothesis>=6.100.0; extra == 'dev'
40
+ Requires-Dist: mypy>=1.7.0; extra == 'dev'
41
+ Requires-Dist: pytest-asyncio>=1.2.0; extra == 'dev'
42
+ Requires-Dist: pytest-benchmark>=4.0.0; extra == 'dev'
43
+ Requires-Dist: pytest-cov>=7.0.0; extra == 'dev'
44
+ Requires-Dist: pytest-xdist>=3.8.0; extra == 'dev'
45
+ Requires-Dist: pytest<9.0.0,>=8.4.2; extra == 'dev'
46
+ Requires-Dist: ruff>=0.1.0; extra == 'dev'
47
+ Requires-Dist: types-pyyaml>=6.0.0; extra == 'dev'
48
+ Requires-Dist: types-requests>=2.28.0; extra == 'dev'
49
+ Provides-Extra: security
50
+ Requires-Dist: bandit>=1.8.0; extra == 'security'
51
+ Requires-Dist: pip-audit>=2.7.0; extra == 'security'
52
+ Description-Content-Type: text/markdown
53
+
54
+ # 🗿 MoAI-ADK: Agentic AI Development Framework
55
+
56
+ ![MoAI-ADK Hero Banner](./assets/images/readme/hero-banner-moai-adk.png)
57
+
58
+ **Available Languages:** [🇰🇷 한국어](./README.ko.md) | [🇺🇸 English](./README.md) | [🇯🇵 日本語](./README.ja.md) | [🇨🇳 中文](./README.zh.md)
59
+
60
+ [![PyPI version](https://img.shields.io/pypi/v/moai-adk)](https://pypi.org/project/moai-adk/)
61
+ [![License: Copyleft](https://img.shields.io/badge/License-Copyleft--3.0-blue.svg)](./LICENSE)
62
+ [![Python](https://img.shields.io/badge/Python-3.11--3.14-blue)](https://www.python.org/)
63
+
64
+ > **"The purpose of vibe coding is not rapid productivity but code quality."**
65
+
66
+ MoAI-ADK provides an **AI development environment for quality code**. SPEC-First TDD, test-driven development, continuous refactoring, and 20 specialized AI agents work together.
67
+
68
+ ---
69
+
70
+ ## 🎁 MoAI-ADK Sponsor: z.ai GLM 4.7
71
+
72
+ **💎 Optimal Solution for Cost-Effective AI Development**
73
+
74
+ MoAI-ADK partners with **z.ai GLM 4.7** to provide developers with an economical AI development environment.
75
+
76
+ ### 🚀 GLM 4.7 Special Benefits
77
+
78
+ | Benefit | Description |
79
+ | -------------------------- | -------------------------------------------------------------- |
80
+ | **💰 70% Cost Savings** | 1/7 the price of Claude with equivalent performance |
81
+ | **⚡ Fast Response Speed** | Low-latency responses with optimized infrastructure |
82
+ | **🔄 Compatibility** | Fully compatible with Claude Code, no code modification needed |
83
+ | **📈 Unlimited Usage** | Use freely without daily/weekly token limits |
84
+
85
+ ### 🎁 Sign-Up Special Discount
86
+
87
+ **👉 [GLM 4.7 Sign Up (10% Additional Discount)](https://z.ai/subscribe?ic=1NDV03BGWU)**
88
+
89
+ By signing up through this link:
90
+
91
+ - ✅ **Additional 10% discount** benefit
92
+ - ✅ **Contribute to MoAI open source development** (reward credits are used for open source projects)
93
+
94
+ ### 💡 Usage Guide
95
+
96
+ ```bash
97
+ # 1. Get GLM API Key
98
+ Sign up at the link above and get your API key
99
+
100
+ # 2. Configure GLM in MoAI-ADK
101
+ moai glm YOUR_API_KEY
102
+ ```
103
+
104
+ > **💡 Tip**: Using GLM 4.7 in a Worktree environment allows you to design with Opus and implement in bulk with GLM, saving up to 70% on costs.
105
+
106
+ ---
107
+
108
+ ## 🌟 Core Values
109
+
110
+ - **🎯 SPEC-First**: 90% reduction in rework with clear specifications
111
+ - **🔴 TDD Enforcement**: Automatic guarantee of 85%+ test coverage
112
+ - **🤖 AI Orchestration**: 20 specialized agents + 48 skills
113
+ - **🌐 Multilingual Routing**: Automatic support for Korean/English/Japanese/Chinese
114
+ - **🌳 Worktree Parallel Development**: Unlimited parallel work in completely isolated environments
115
+ - **🏆 MoAI Rank**: Motivation through vibe coding leaderboard
116
+
117
+ ---
118
+
119
+ > **📚 For detailed information, see the official online documentation:** [https://adk.mo.ai.kr](https://adk.mo.ai.kr)
120
+
121
+ ## 1. 30-Second Installation
122
+
123
+ ### 🚀 Method 1: Quick Install (Recommended)
124
+
125
+ ```bash
126
+ curl -LsSf https://modu-ai.github.io/moai-adk/install.sh | sh
127
+ ```
128
+
129
+ ### 🔧 Method 2: Manual Install
130
+
131
+ ```bash
132
+ # Step 1: Install uv (macOS/Linux)
133
+ curl -LsSf https://astral.sh/uv/install.sh | sh
134
+
135
+ # Step 2: Install MoAI-ADK
136
+ uv tool install moai-adk
137
+ ```
138
+
139
+ ### 🎨 Interactive Setup Wizard
140
+
141
+ Running `moai init` starts a **9-step interactive wizard**:
142
+
143
+ ![MoAI-ADK Init Wizard](./assets/images/readme/init-wizard-banner.png)
144
+
145
+ ---
146
+
147
+ #### Step 1: Language Selection
148
+
149
+ Select your conversation language. All subsequent instructions will be displayed in your chosen language.
150
+
151
+ ```text
152
+ 🌐 Language Selection
153
+ ❯ Select your conversation language: [↑↓] Navigate [Enter] Select
154
+ ❯ Korean (한국어)
155
+ English
156
+ Japanese (日本語)
157
+ Chinese (中文)
158
+ ```
159
+
160
+ ---
161
+
162
+ #### Step 2: Name Input
163
+
164
+ Enter your user name. AI will provide personalized responses.
165
+
166
+ ```text
167
+ 👤 User Settings
168
+ ❯ Enter your user name (optional):
169
+ ```
170
+
171
+ ---
172
+
173
+ #### Step 3: GLM API Key Input
174
+
175
+ Enter your GLM API key from Z.AI.
176
+
177
+ ```text
178
+ 🔑 API Key Input
179
+ GLM CodePlan API key (optional - press Enter to skip)
180
+
181
+ ✓ Found existing GLM API key: 99c1a2df...
182
+ Press Enter to keep existing key, or enter new key to replace
183
+
184
+ ? Enter your GLM API key:
185
+ ```
186
+
187
+ > 🎁 **GLM Sign-Up Benefit**: If you don't have a GLM account, sign up using the link below!
188
+ >
189
+ > **👉 [GLM Sign Up (10% Additional Discount)](https://z.ai/subscribe?ic=1NDV03BGWU)**
190
+ >
191
+ > By signing up through this link, you'll receive an **additional 10% discount**.
192
+ > Also, rewards generated from link sign-ups are used for **MoAI open source development**. 🙏
193
+
194
+ ---
195
+
196
+ #### Step 4: Project Setup
197
+
198
+ Enter your project name.
199
+
200
+ ```text
201
+ 📁 Project Setup
202
+ ❯ Project name: MoAI-ADK
203
+ ```
204
+
205
+ ---
206
+
207
+ #### Step 5: Git Setup
208
+
209
+ Select your Git mode.
210
+
211
+ ```text
212
+ 🔀 Git Setup
213
+ ❯ Select your Git mode: [↑↓] Navigate [Enter] Select
214
+ ❯ manual (local only) - Use local repository only
215
+ personal (GitHub personal) - Use GitHub personal account
216
+ team (GitHub team) - Use GitHub team/organization
217
+ ```
218
+
219
+ ---
220
+
221
+ #### Step 6: GitHub Username
222
+
223
+ For personal/team selection, enter your GitHub username.
224
+
225
+ ```text
226
+ ❯ GitHub username:
227
+ ```
228
+
229
+ ---
230
+
231
+ #### Step 7: Commit Message Language
232
+
233
+ Select the language for Git commit messages.
234
+
235
+ ```text
236
+ 🗣️ Output Language Settings
237
+ ❯ Commit message language: [↑↓] Navigate [Enter] Select
238
+ English
239
+ ❯ Korean (한국어)
240
+ Japanese (日本語)
241
+ Chinese (中文)
242
+ ```
243
+
244
+ ---
245
+
246
+ #### Step 8: Code Comment Language
247
+
248
+ Select the language for code comments.
249
+
250
+ ```text
251
+ ❯ Code comment language: [↑↓] Navigate [Enter] Select
252
+ English
253
+ ❯ Korean (한국어)
254
+ Japanese (日本語)
255
+ Chinese (中文)
256
+ ```
257
+
258
+ ---
259
+
260
+ #### Step 9: Documentation Language
261
+
262
+ Select the language for documentation.
263
+
264
+ ```text
265
+ ❯ Documentation language: [↑↓] Navigate [Enter] Select
266
+ English
267
+ ❯ Korean (한국어)
268
+ Japanese (日本語)
269
+ Chinese (中文)
270
+ ```
271
+
272
+ > 💡 **Token Optimization Strategy**: Internal prompts for agent instructions are **fixed in English**.
273
+ >
274
+ > **Reason**: Non-English languages consume **12-20% additional tokens** in Claude. When infinite agent loops are frequent, this significantly impacts costs and weekly token limits, so MoAI fixes internal agent instructions in English and **provides user conversations only in the user's language**.
275
+ >
276
+ > This is MoAI's **effort to reduce token waste**.
277
+
278
+ ---
279
+
280
+ #### Step 10: TAG System Activation
281
+
282
+ 🎯 TAG System: Code ↔ Documentation Tracking for TDD
283
+
284
+ The TAG system maintains traceability between code and SPEC documents
285
+ to support the TDD (Test-Driven Development) cycle.
286
+
287
+ TDD Purpose:
288
+ • RED (Write tests) → @SPEC SPEC-XXX verify
289
+ • GREEN (Implement code) → @SPEC SPEC-XXX impl
290
+ • REFACTOR (Improve) → @SPEC SPEC-XXX impl or related
291
+
292
+ Clearly tracks which SPEC each code file implements,
293
+ promoting documentation-driven development and maintaining quality.
294
+
295
+ 💡 TAG activation is recommended. Maintains consistency between code and
296
+ documentation in the TDD cycle, improving quality and maintainability.
297
+
298
+ ```text
299
+ ? Enable TAG system? (TDD recommended) (Y/n)
300
+ ```
301
+
302
+ ---
303
+
304
+ **TAG Validation Mode Guide**
305
+
306
+ • warn: Warn during development (default, recommended)
307
+ • enforce: Block commit on missing TAG (strict quality control)
308
+ • off: Skip validation (not recommended)
309
+
310
+ ```text
311
+ ❯ Select TAG validation mode: [↑↓] Navigate [Enter] Select
312
+ ❯ warn (Warning) - Show warnings for missing TAGs only. Flexible during development
313
+ enforce (Enforce) - Block commits if TAGs are missing. Strict quality control
314
+ off (Off) - Skip TAG validation. Not recommended
315
+ ```
316
+
317
+ ---
318
+
319
+ #### Installation Complete
320
+
321
+ When all settings are complete, 5-phase installation runs automatically:
322
+
323
+ ```text
324
+ 🚀 Starting installation...
325
+
326
+ Phase 1: Preparation and backup... ████████████████ 100%
327
+ Phase 2: Creating directory structure... ████████████████ 100%
328
+ Phase 3: Installing resources... ████████████████ 100%
329
+ Phase 4: Generating configurations... ████████████████ 100%
330
+ Phase 5: Validation and finalization... ████████████████ 100%
331
+
332
+ ✅ Initialization Completed Successfully!
333
+ ────────────────────────────────────────────────────────────────
334
+
335
+ 📊 Summary:
336
+ 📁 Location: /path/to/my-project
337
+ 🌐 Language: Auto-detect (use /moai:0-project)
338
+ 🔀 Git: manual (github-flow, branch: manual)
339
+ 🌍 Locale: ko
340
+ 📄 Files: 47 created
341
+ ⏱️ Duration: 1234ms
342
+
343
+ 🚀 Next Steps:
344
+ 1. Run cd my-project to enter the project
345
+ 2. Run /moai:0-project in Claude Code for full setup
346
+ 3. Start developing with MoAI-ADK!
347
+ ```
348
+
349
+ ### Add to Existing Project
350
+
351
+ ```bash
352
+ cd your-existing-project
353
+ moai init .
354
+ # Existing files are preserved
355
+ ```
356
+
357
+ ---
358
+
359
+ ### 🔄 MoAI-ADK Update
360
+
361
+ Update existing projects to the latest version.
362
+
363
+ ```bash
364
+ moai update
365
+ ```
366
+
367
+ **3-Phase Smart Update Workflow**:
368
+
369
+ ```text
370
+ Stage 1: 📦 Package Version Check
371
+ └─ Check latest version from PyPI → Auto-upgrade if needed
372
+
373
+ Stage 2: 🔍 Config Version Comparison
374
+ └─ Compare package template vs project config
375
+ └─ Skip if same (70-80% performance improvement)
376
+
377
+ Stage 3: 📄 Template Synchronization
378
+ └─ Create backup → Update template → Restore user settings
379
+ ```
380
+
381
+ **Key Options**:
382
+
383
+ ```bash
384
+ # Check version only (no update)
385
+ moai update --check
386
+
387
+ # Synchronize templates only (skip package upgrade)
388
+ moai update --templates-only
389
+
390
+ # Config edit mode (re-run init wizard)
391
+ moai update --config
392
+ moai update -c
393
+
394
+ # Force update without backup
395
+ moai update --force
396
+
397
+ # All is well~ Auto mode (auto-approve all confirmations)
398
+ moai update --yes
399
+ ```
400
+
401
+ **Merge Strategy Selection**:
402
+
403
+ ```text
404
+ 🔀 Choose merge strategy:
405
+ [1] Auto-merge (default)
406
+ → Automatically preserve template + user changes
407
+ [2] Manual merge
408
+ → Create backup + merge guide (direct control)
409
+ ```
410
+
411
+ ```bash
412
+ # Force auto-merge (default)
413
+ moai update --merge
414
+
415
+ # Force manual merge
416
+ moai update --manual
417
+ ```
418
+
419
+ **Automatically Preserved Items**:
420
+
421
+ | Item | Description |
422
+ | ------------------- | ------------------------------------------------- |
423
+ | **User Settings** | `.claude/settings.local.json` (MCP, GLM settings) |
424
+ | **Custom Agents** | User-created agents not in template |
425
+ | **Custom Commands** | User-defined slash commands |
426
+ | **Custom Skills** | User-defined skills |
427
+ | **Custom Hooks** | User-defined hook scripts |
428
+ | **SPEC Documents** | Entire `.moai/specs/` folder |
429
+ | **Reports** | Entire `.moai/reports/` folder |
430
+
431
+ > 💡 **Update Tip**: You can change language, API key, and Git settings anytime with `moai update -c`.
432
+ > It's recommended to create your commands, agents, skills, and hooks in folders other than moai.
433
+
434
+ ---
435
+
436
+ ## 2. Project Documentation Generation (Optional)
437
+
438
+ For new or existing projects, you can automatically generate **project documentation to help Claude Code understand your project**:
439
+
440
+ ```text
441
+ > /moai:0-project
442
+ ```
443
+
444
+ ### 3 Generated Files
445
+
446
+ | File | Purpose | Key Content |
447
+ | ---------------------------- | ---------------------- | ------------------------------------------------------------------------------------------ |
448
+ | `.moai/project/product.md` | **Product Overview** | Project name/description, target users, core features, use cases |
449
+ | `.moai/project/structure.md` | **Structure Analysis** | Directory tree, main folder purposes, core file locations, module composition |
450
+ | `.moai/project/tech.md` | **Tech Stack** | Technologies used, framework selection reasons, dev environment, build/deployment settings |
451
+
452
+ ### Why Do You Need This?
453
+
454
+ - **Context Provision**: Claude Code quickly grasps project context
455
+ - **Consistency Maintenance**: Share project understanding among team members
456
+ - **Onboarding Acceleration**: Reduce new developer project ramp-up time
457
+ - **AI Collaboration Optimization**: More accurate code suggestions and reviews
458
+
459
+ > 💡 **Tip**: Running `/moai:0-project` at project start or after structure changes updates documentation to the latest state.
460
+
461
+ ---
462
+
463
+ ## 3. Core Commands Collection
464
+
465
+ ### 🎯 `/moai:0-project` - Project Initialization
466
+
467
+ ```bash
468
+ > /moai:0-project
469
+ ```
470
+
471
+ Automatically analyzes your project's current state and configures the optimal development environment. Detects programming languages and frameworks, and automatically sets up Git workflows and quality assurance standards. Once all configuration is complete, you're ready to start development immediately.
472
+
473
+ **Tasks**:
474
+
475
+ - ✅ Project structure analysis
476
+ - ✅ Programming language/framework detection
477
+ - ✅ `.moai/config/config.yaml` creation
478
+ - ✅ Git workflow setup
479
+ - ✅ Session memory system configuration
480
+ - ✅ Quality assurance standards setup
481
+
482
+ ---
483
+
484
+ ### 📋 `/moai:1-plan` - SPEC Writing
485
+
486
+ ```bash
487
+ > /moai:1-plan "feature description"
488
+ ```
489
+
490
+ Automatically generates unambiguous specifications using EARS format. Includes requirements definition, success criteria, and test scenarios to clearly present development direction. The generated SPEC serves as a single source of truth that the development team and AI share the same understanding.
491
+
492
+ **Auto-generated**:
493
+
494
+ - EARS format specification
495
+ - Requirements definition
496
+ - Success criteria
497
+ - Test scenarios
498
+
499
+ **Example**:
500
+
501
+ ```bash
502
+ > /moai:1-plan "user profile page"
503
+ # → Creates SPEC-002
504
+
505
+ > /moai:1-plan "payment API"
506
+ # → Creates SPEC-003
507
+ ```
508
+
509
+ **Important**: Must execute `> /clear` next
510
+
511
+ ---
512
+
513
+ ### 💻 `/moai:2-run` - TDD Implementation
514
+
515
+ ```bash
516
+ > /moai:2-run SPEC-001
517
+ ```
518
+
519
+ Through the Red-Green-Refactor cycle, writes tests first and implements code to pass them. All implementations must pass 85%+ test coverage, linting, type checking, and security checks. Automatically validates TRUST 5 quality principles to ensure only stable code is committed.
520
+
521
+ **Auto-executed**:
522
+
523
+ - 🔴 Write tests first (Red)
524
+ - 🟢 Pass tests with code (Green)
525
+ - 🔵 Refactor (Refactor)
526
+ - ✅ TRUST 5 validation
527
+
528
+ **Verification items**:
529
+
530
+ - Test coverage >= 85%
531
+ - Pass linting
532
+ - Pass type checking
533
+ - Pass security checks
534
+
535
+ ---
536
+
537
+ ### 📚 `/moai:3-sync` - Documentation Sync
538
+
539
+ ```bash
540
+ > /clear # Always run clear before sync to reset session and run quality checks
541
+ > /moai:3-sync SPEC-001
542
+ ```
543
+
544
+ Performs quality verification followed by documentation synchronization, Git commits, and PR automation. Automatically generates API documentation, architecture diagrams, README, and CHANGELOG, keeping them up to date. Automatically commits changes and converts PRs from Draft to Ready in team mode.
545
+
546
+ **Auto-executed tasks**:
547
+
548
+ 1. **Phase 1: Quality Verification**
549
+ - Run tests (pytest, jest, go test, etc.)
550
+ - Linter checks (ruff, eslint, golangci-lint, etc.)
551
+ - Type checkers (mypy, tsc, go vet, etc.)
552
+ - Code review (manager-quality)
553
+
554
+ 2. **Phase 2-3: Documentation Sync**
555
+ - Auto-generate API documentation
556
+ - Update architecture diagrams
557
+ - Update README
558
+ - Sync SPEC documents
559
+
560
+ 3. **Phase 4: Git Automation**
561
+ - Commit changes
562
+ - PR Draft → Ready conversion
563
+ - (Optional) Auto-merge
564
+
565
+ **Execution modes**:
566
+
567
+ - `auto` (default): Selective sync of changed files only
568
+ - `force`: Regenerate all documentation
569
+ - `status`: Perform status check only
570
+ - `project`: Sync entire project
571
+
572
+ **Details**: Refer to command file
573
+
574
+ ---
575
+
576
+ ### 🚀 `/moai:alfred` - Fully Autonomous Automation
577
+
578
+ ```bash
579
+ > /moai:alfred "feature description"
580
+ ```
581
+
582
+ User presents the goal and AI autonomously performs exploration, planning, implementation, and verification. Analyzes codebase through parallel exploration and self-corrects issues through autonomous loops. Automatically terminates when completion marker (`<moai>DONE</moai>`) is detected, so developer only needs to verify final result.
583
+
584
+ #### Concept and Workflow
585
+
586
+ ```mermaid
587
+ flowchart TB
588
+ Start([User Request<br/>/moai:alfred 'feature description']) --> Phase0[Phase 0: Parallel Exploration]
589
+
590
+ Phase0 --> Explore[🔍 Explore Agent<br/>Analyze codebase structure]
591
+ Phase0 --> Research[📚 Research Agent<br/>Research technical docs]
592
+ Phase0 --> Quality[✅ Quality Agent<br/>Assess quality state]
593
+
594
+ Explore --> Phase1[Phase 1: SPEC Creation]
595
+ Research --> Phase1
596
+ Quality --> Phase1
597
+
598
+ Phase1 --> Spec[📋 EARS format SPEC doc<br/>Requirements specification]
599
+
600
+ Spec --> Phase2[Phase 2: TDD Implementation]
601
+
602
+ Phase2 --> Red[🔴 RED: Write failing test]
603
+ Red --> Green[🟢 GREEN: Minimal implementation]
604
+ Green --> Refactor[🔵 REFACTOR: Code improvement]
605
+
606
+ Refactor --> Check{Quality Check<br/>TRUST 5}
607
+
608
+ Check -->|Pass| Phase3[Phase 3: Documentation Sync]
609
+ Check -->|Fail| Loop[🔄 Autonomous Loop<br/>Auto-fix issues]
610
+
611
+ Loop --> Red
612
+
613
+ Phase3 --> Docs[📚 README, API docs<br/>Auto-update]
614
+
615
+ Docs --> Done{<moai>DONE</moai><br/>Completion marker detected}
616
+
617
+ Done -->|Yes| End([✅ Complete<br/>Deliver result only])
618
+ Done -->|No| Loop
619
+
620
+ style Phase0 fill:#e1f5fe
621
+ style Phase1 fill:#fff3e0
622
+ style Phase2 fill:#f3e5f5
623
+ style Phase3 fill:#e8f5e9
624
+ style Done fill:#c8e6c9
625
+ style End fill:#4caf50,color:#fff
626
+ ```
627
+
628
+ #### Detailed Process
629
+
630
+ **Single Execution**:
631
+
632
+ 1. **Phase 1: Parallel Exploration** (3-4x faster analysis)
633
+ - **Explore Agent**: Codebase structure, patterns, related files
634
+ - **Research Agent**: Technical docs, best practices
635
+ - **Quality Agent**: Current quality state, potential issues
636
+
637
+ 2. **Phase 2: SPEC Creation** (EARS format)
638
+ - Clear requirement definitions
639
+ - Acceptance criteria specification
640
+ - User story writing
641
+
642
+ 3. **Phase 3: TDD Implementation** (Autonomous loop)
643
+ - **RED**: Write failing test first
644
+ - **GREEN**: Minimal implementation to pass test
645
+ - **REFACTOR**: Improve code quality
646
+ - **Loop**: Auto-fix if quality check fails
647
+
648
+ 4. **Phase 4: Documentation Sync**
649
+ - README, API docs auto-update
650
+ - CHANGELOG auto-generation
651
+ - User guide update
652
+
653
+ #### When to use?
654
+
655
+ | Situation | Description | Example |
656
+ | ------------------------ | ---------------------------------------- | ------------------------------- |
657
+ | **New feature development** | AI handles everything from start to finish | "Add JWT authentication system" |
658
+ | **Complex refactoring** | Large changes affecting multiple files | "Database layer restructure" |
659
+ | **Bug fixing** | Automate from root cause analysis to fix | "Fix login failure bug" |
660
+ | **SPEC-based development** | Implement features with SPEC documents | `/moai:alfred SPEC-AUTH-001` |
661
+
662
+ **Options**:
663
+
664
+ - `--loop`: Enable autonomous iterative fixes (AI self-resolves issues)
665
+ - `--max N`: Specify max iterations (default: 100)
666
+ - `--sequential` / `--seq`: Sequential exploration (for debugging) - parallel is default
667
+ - `--branch`: Auto-create feature branch
668
+ - `--pr`: Create Pull Request after completion
669
+ - `--resume SPEC`: Resume work
670
+
671
+ > **Performance**: Parallel exploration is now the default, providing 3-4x faster analysis. Use `--sequential` only for debugging.
672
+
673
+ **Example**:
674
+
675
+ ```bash
676
+ # Basic autonomous execution (parallel by default)
677
+ > /moai:alfred "Add JWT authentication"
678
+
679
+ # Auto loop with sequential exploration (for debugging)
680
+ > /moai:alfred "JWT authentication" --loop --seq
681
+
682
+ # Resume
683
+ > /moai:alfred resume SPEC-AUTH-001
684
+ ```
685
+
686
+ ---
687
+
688
+ ### 🔁 `/moai:loop` - Autonomous Iterative Fixing
689
+
690
+ ```bash
691
+ > /moai:loop
692
+ ```
693
+
694
+ AI autonomously diagnoses and fixes LSP errors, test failures, and coverage deficiencies. Parallel diagnosis executes LSP, AST-grep, Tests, and Coverage simultaneously, resolving issues 3-4x faster. Runs autonomously until completion marker is detected or max iterations reached.
695
+
696
+ #### Concept and Workflow
697
+
698
+ ```mermaid
699
+ flowchart TB
700
+ Start([User Request<br/>/moai:loop]) --> Parallel[Parallel Diagnosis]
701
+
702
+ Parallel --> LSP[LSP Diagnosis<br/>Type errors, not found]
703
+ Parallel --> AST[AST-grep<br/>Pattern check, security]
704
+ Parallel --> Tests[Test Execution<br/>Unit, integration]
705
+ Parallel --> Coverage[Coverage<br/>85% target]
706
+
707
+ LSP --> Collect[Issue Collection]
708
+ AST --> Collect
709
+ Tests --> Collect
710
+ Coverage --> Collect
711
+
712
+ Collect --> HasIssues{Has Issues?}
713
+
714
+ HasIssues -->|No| Done[<moai>DONE</moai><br/>Completion marker]
715
+ HasIssues -->|Yes| CreateTODO[TODO Creation<br/>Priority sorted]
716
+
717
+ CreateTODO --> Process[Sequential Processing]
718
+
719
+ Process --> Fix1[Level 1: Immediate fix<br/>Import sort, whitespace]
720
+ Process --> Fix2[Level 2: Safe fix<br/>Variable name, type]
721
+ Process --> Fix3[Level 3: Approval fix<br/>Logic change]
722
+
723
+ Fix1 --> Validate[Verification]
724
+ Fix2 --> Validate
725
+ Fix3 --> Validate
726
+
727
+ Validate --> ReCheck{Diagnose again?}
728
+
729
+ ReCheck -->|Yes| Parallel
730
+ ReCheck -->|No| MaxIter{Max iteration<br/>100 reached?}
731
+
732
+ MaxIter -->|No| Parallel
733
+ MaxIter -->|Yes| Snapshot[Snapshot saved<br/>Can resume later]
734
+
735
+ Done --> End([✅ Complete])
736
+ Snapshot --> End([⏸️ Paused])
737
+
738
+ style Parallel fill:#e1f5fe
739
+ style Collect fill:#fff3e0
740
+ style Process fill:#f3e5f5
741
+ style Validate fill:#e8f5e9
742
+ style Done fill:#c8e6c9
743
+ style End fill:#4caf50,color:#fff
744
+ ```
745
+
746
+ #### Parallel Diagnosis Details
747
+
748
+ **Parallel diagnosis** (3.75x faster):
749
+
750
+ ```mermaid
751
+ flowchart TB
752
+ Start([Parallel diagnosis start]) --> Parallel
753
+
754
+ subgraph Parallel[Concurrent execution]
755
+ direction TB
756
+ LSP[LSP diagnosis]
757
+ AST[AST-grep inspection]
758
+ TESTS[Test execution]
759
+ COVERAGE[Coverage check]
760
+ end
761
+
762
+ LSP --> Collect[Issue integration and priority<br/>Level 1 → 2 → 3 order]
763
+ AST --> Collect
764
+ TESTS --> Collect
765
+ COVERAGE --> Collect
766
+
767
+ style Start fill:#e3f2fd
768
+ style Parallel fill:#f3f4f6
769
+ style LSP fill:#fff9c4
770
+ style AST fill:#ffccbc
771
+ style TESTS fill:#c8e6c9
772
+ style COVERAGE fill:#b2dfdb
773
+ style Collect fill:#e1bee7
774
+ ```
775
+
776
+ #### 📖 What is AST-grep?
777
+
778
+ > **"grep finds text, but AST-grep finds code structure."**
779
+
780
+ **Concept**:
781
+
782
+ AST-grep is a **structural code inspection tool**. Unlike normal grep or regex that searches for text, AST-grep analyzes the **Abstract Syntax Tree (AST)** of code to inspect code **structure and patterns**.
783
+
784
+ **Text search vs Structure search**:
785
+
786
+ | Feature | grep/regex | AST-grep |
787
+ | ------------ | ----------------------------- | ------------------- |
788
+ | Search target| Text strings | Code structure (AST)|
789
+ | Example | `print("hello")` | `print(__)` |
790
+ | Meaning | Find "print" characters | Find print function call pattern |
791
+ | Space sensitive? | Yes (whitespace, indent matters) | No (structure only) |
792
+ | Variable distinguish | Hard (e.g., `x=1`, `y=1` are different) | Possible (all variable assignment patterns) |
793
+
794
+ **How it works**:
795
+
796
+ ```mermaid
797
+ flowchart LR
798
+ Source[Source code<br/>def foo x:<br/> return x + 1] --> AST[AST analysis]
799
+
800
+ AST --> |transform| Tree[Abstract syntax tree<br/>Function<br/> Call<br/>]
801
+
802
+ Tree --> Pattern[Pattern matching]
803
+
804
+ Pattern --> Result1[✓ Function definition]
805
+ Pattern --> Result2[✓ Return statement]
806
+ Pattern --> Result3[✓ Addition operation]
807
+
808
+ style Source fill:#e3f2fd
809
+ style AST fill:#fff3e0
810
+ style Tree fill:#f3e5f5
811
+ style Pattern fill:#e8f5e9
812
+ style Result1 fill:#c8e6c9
813
+ style Result2 fill:#c8e6c9
814
+ style Result3 fill:#c8e6c9
815
+ ```
816
+
817
+ **What AST-grep detects**:
818
+
819
+ 1. **Security vulnerabilities**
820
+ - SQL injection patterns: `execute(f"SELECT * FROM users WHERE id={user_input}")`
821
+ - Hardcoded passwords: `password = "123456"`
822
+ - Unsafe function usage: `eval(user_input)`
823
+
824
+ 2. **Code smells**
825
+ - Duplicate code: Repetition of similar structures
826
+ - Long functions: Too much complexity
827
+ - Magic numbers: `if x == 42` (meaningless numbers)
828
+
829
+ 3. **Anti-patterns**
830
+ - Empty except blocks: `except: pass`
831
+ - Global variable modification
832
+ - Circular dependencies
833
+
834
+ 4. **Best practice violations**
835
+ - Missing type hints
836
+ - Missing documentation
837
+ - Missing error handling
838
+
839
+ **Example scenario**:
840
+
841
+ ```python
842
+ # Example code where AST-grep finds problems
843
+ def process_user_input(user_input):
844
+ # ⚠️ Warning: eval usage (security vulnerability)
845
+ result = eval(user_input)
846
+
847
+ # ⚠️ Warning: empty except (anti-pattern)
848
+ try:
849
+ save_to_database(result)
850
+ except:
851
+ pass
852
+
853
+ # ⚠️ Warning: magic number (code smell)
854
+ if result > 42:
855
+ return True
856
+ ```
857
+
858
+ **Why is it important?**
859
+
860
+ - **Accuracy**: Understands code meaning, so fewer false positives
861
+ - **40 language support**: Works on Python, TypeScript, Go, Rust, Java, etc.
862
+ - **Auto-fix possible**: Not just finds patterns, but generates fix suggestions
863
+ - **Security enhancement**: Automatically detects security vulnerabilities like OWASP Top 10
864
+
865
+ **Usage in MoAI-ADK**:
866
+
867
+ In `/moai:loop` and `/moai:fix` commands, AST-grep operates as a core component of parallel diagnosis:
868
+
869
+ - **LSP**: Type errors, find definitions
870
+ - **AST-grep**: Structural patterns, security vulnerabilities ← **This is our focus!**
871
+ - **Tests**: Test failures
872
+ - **Coverage**: Coverage deficiency
873
+
874
+ These four run **simultaneously** to diagnose code quality 3.75x faster.
875
+
876
+ ---
877
+
878
+ #### Detailed Process
879
+
880
+ **Autonomous loop flow**:
881
+
882
+ 1. **Parallel diagnosis** (concurrent execution)
883
+ - **LSP**: Type errors, definitions not found, potential bugs
884
+ - **AST-grep**: Code pattern check, security vulnerabilities
885
+ - **Tests**: Unit tests, integration tests
886
+ - **Coverage**: 85% coverage target achievement
887
+
888
+ 2. **TODO creation** (by priority)
889
+ - Level 1: Immediate fix (import sort, whitespace, formatting)
890
+ - Level 2: Safe fix (variable names, type addition)
891
+ - Level 3: Approval fix (logic change, API modification)
892
+ - Level 4: Manual needed (security, architecture)
893
+
894
+ 3. **Sequential fixing**
895
+ - Process TODO items one by one
896
+ - Verify after each fix
897
+ - Re-diagnose on failure
898
+
899
+ 4. **Repeat or complete**
900
+ - `<moai>DONE</moai>` marker when all issues resolved
901
+ - Save snapshot after max 100 iterations
902
+
903
+ #### When to use?
904
+
905
+ | Situation | Description | Example |
906
+ | ------------------------ | ---------------------------------------- | ------------------------------------ |
907
+ | **Quality after implementation** | Automatically improve quality after coding | Run `/moai:loop` after feature implementation |
908
+ | **Test failure fix** | Automatically analyze and fix test failures | Run after test execution on failure |
909
+ | **Coverage improvement** | Automatically achieve 85% target | After writing new code |
910
+ | **Refactoring** | Continuously improve code quality | Periodic execution for maintenance |
911
+
912
+ **Options**:
913
+
914
+ - `--max N`: Maximum iterations (default: 100)
915
+ - `--auto`: Enable auto-fix (Level 1-3)
916
+ - `--sequential` / `--seq`: Sequential diagnosis (for debugging) - parallel is default
917
+ - `--errors`: Fix errors only
918
+ - `--coverage`: Include coverage (100% target)
919
+ - `--resume ID`: Restore snapshot
920
+
921
+ > **Performance**: Parallel diagnosis is now the default, executing LSP, AST-grep, Tests, and Coverage simultaneously (3.75x faster).
922
+
923
+ **Example**:
924
+
925
+ ```bash
926
+ # Basic autonomous loop (parallel by default)
927
+ > /moai:loop
928
+
929
+ # Sequential + auto-fix (for debugging)
930
+ > /moai:loop --seq --auto
931
+
932
+ # Max 50 iterations
933
+ > /moai:loop --max 50
934
+
935
+ # Restore snapshot
936
+ > /moai:loop --resume latest
937
+ ```
938
+
939
+ ---
940
+
941
+ ### 🔧 `/moai:fix` - One-Shot Auto Fix
942
+
943
+ ```bash
944
+ > /moai:fix
945
+ ```
946
+
947
+ Scans LSP errors and linting issues in parallel and fixes them at once. Level 1-2 fixes immediately, Level 3 fixes after user approval, Level 4 reports as requiring manual fix. Use `--dry` option to preview before applying actual fixes.
948
+
949
+ #### Concept and Workflow
950
+
951
+ ```mermaid
952
+ flowchart
953
+ Start([User Request<br/>/moai:fix]) --> Dry{--dry mode?}
954
+
955
+ Dry -->|Yes| ScanOnly[Scan only<br/>No fixes]
956
+ Dry -->|No| Scan[Parallel scan]
957
+
958
+ Scan --> LSP[LSP diagnosis<br/>Type, definition errors]
959
+ Scan --> AST[AST-grep<br/>Patterns, security]
960
+ Scan --> Linter[Linter<br/>Style, format]
961
+
962
+ LSP --> Collect[Issue collection]
963
+ AST --> Collect
964
+ Linter --> Collect
965
+
966
+ ScanOnly --> Report[Report output<br/>Expected fix content]
967
+
968
+ Collect --> Categorize[Level classification]
969
+
970
+ Categorize --> L1[Level 1<br/>Immediate fix]
971
+ Categorize --> L2[Level 2<br/>Safe fix]
972
+ Categorize --> L3[Level 3<br/>Approval needed]
973
+ Categorize --> L4[Level 4<br/>Manual needed]
974
+
975
+ L1 --> AutoFix1[Auto fix]
976
+ L2 --> AutoFix2[Auto fix+log]
977
+ L3 --> Approve{User approval?}
978
+
979
+ Approve -->|Yes| AutoFix3[Execute fix]
980
+ Approve -->|No| Skip[Skip]
981
+
982
+ L4 --> Manual[Report manual fix needed]
983
+
984
+ AutoFix1 --> Validate[Verification]
985
+ AutoFix2 --> Validate
986
+ AutoFix3 --> Validate
987
+ Skip --> Validate
988
+
989
+ Validate --> Results[Result summary]
990
+
991
+ Manual --> Results
992
+ Report --> End([✅ Complete])
993
+ Results --> End
994
+
995
+ style Scan fill:#e1f5fe
996
+ style Collect fill:#fff3e0
997
+ style AutoFix1 fill:#c8e6c9
998
+ style AutoFix2 fill:#c8e6c9
999
+ style AutoFix3 fill:#fff9c4
1000
+ style Manual fill:#ffccbc
1001
+ style End fill:#4caf50,color:#fff
1002
+ ```
1003
+
1004
+ #### Parallel Scan Details
1005
+
1006
+ **Parallel scan** (3.75x faster):
1007
+
1008
+ ```mermaid
1009
+ flowchart TB
1010
+ Start([Parallel scan start]) --> Parallel
1011
+
1012
+ subgraph Parallel[Concurrent execution]
1013
+ direction TB
1014
+ LSP[LSP diagnosis]
1015
+ AST[AST-grep inspection]
1016
+ Linter[Linter inspection]
1017
+ end
1018
+
1019
+ LSP --> Collect[Issue integration and level classification<br/>Level 1 → 2 → 3 → 4]
1020
+ AST --> Collect
1021
+ Linter --> Collect
1022
+
1023
+ style Start fill:#e3f2fd
1024
+ style Parallel fill:#f3f4f6
1025
+ style LSP fill:#fff9c4
1026
+ style AST fill:#ffccbc
1027
+ style Linter fill:#c8e6c9
1028
+ style Collect fill:#e1bee7
1029
+ ```
1030
+
1031
+ #### Detailed Process
1032
+
1033
+ **Fix level processing**:
1034
+
1035
+ | Level | Description | Risk | Approval | Auto | Example |
1036
+ | ----- | --------------- | ------- | -------- | ------ | ------------------------------- |
1037
+ | 1 | Immediate fix | Low | Not needed | ✅ | import sorting, whitespace |
1038
+ | 2 | Safe fix | Low | Log only | ✅ | variable names, type addition |
1039
+ | 3 | Approval needed | Medium | Needed | ⚠️ | logic changes, API modification |
1040
+ | 4 | Manual needed | High | Impossible | ❌ | security, architecture |
1041
+
1042
+ **One-time execution process**:
1043
+
1044
+ 1. **Parallel scan** (concurrent execution)
1045
+ - **LSP**: Type errors, definitions not found, serious bugs
1046
+ - **AST-grep**: Code patterns, security vulnerabilities
1047
+ - **Linter**: Style, formatting, naming
1048
+
1049
+ 2. **Issue collection and classification**
1050
+ - Classify all issues by level
1051
+ - Priority: Level 1 → 2 → 3 → 4
1052
+
1053
+ 3. **Batch fix** (execute at once)
1054
+ - Level 1-2: Auto-fix immediately
1055
+ - Level 3: Fix after user approval
1056
+ - Level 4: Report manual fix needed
1057
+
1058
+ 4. **Verification and results**
1059
+ - Run tests after fixes
1060
+ - Report summary of changes
1061
+
1062
+ #### When to use?
1063
+
1064
+ | Situation | Description | Example |
1065
+ | ------------------------ | ---------------------------------------- | ------------------------------------ |
1066
+ | **Clean up after coding** | Clean up style, formatting all at once | Run `/moai:fix` after coding |
1067
+ | **Pre-commit inspection** | Resolve LSP errors, linting in advance | Run before `git commit` |
1068
+ | **Quick fix** | Solve at once without repetitive fixes | When fixing simple issues |
1069
+ | **Preview confirmation** | Check fix content before applying | Run `/moai:fix --dry` |
1070
+
1071
+ #### `/moai:fix` vs `/moai:loop` Selection Guide
1072
+
1073
+ ```mermaid
1074
+ flowchart
1075
+ Start([Code quality issue occurred]) --> Question{Need repetitive<br/>fixing?}
1076
+
1077
+ Question -->|Yes| Loop[🔄 /moai:loop<br/>Autonomous iterative fixing]
1078
+ Question -->|No| Fix{Can solve<br/>at once?}
1079
+
1080
+ Fix -->|Yes| FixCmd[🔧 /moai:fix<br/>One-shot auto fix]
1081
+ Fix -->|No| Loop
1082
+
1083
+ Loop --> LoopDesc[Complex issues<br/>Multiple files affected<br/>Repeated test failures]
1084
+ FixCmd --> FixDesc[Simple issues<br/>Style, format<br/>LSP errors]
1085
+
1086
+ LoopDesc --> When1[Usage timing:<br/>Quality after implementation]
1087
+ FixDesc --> When2[Usage timing:<br/>Quick clean up before commit]
1088
+
1089
+ style Loop fill:#f3e5f5
1090
+ style FixCmd fill:#e8f5e9
1091
+ style LoopDesc fill:#fff3e0
1092
+ style FixDesc fill:#e1f5fe
1093
+ ```
1094
+
1095
+ **Fix levels**:
1096
+
1097
+ | Level | Description | Approval | Example |
1098
+ | ----- | --------------- | ---------- | ------------------------------- |
1099
+ | 1 | Immediate fix | Not needed | import sorting, whitespace |
1100
+ | 2 | Safe fix | Log only | variable names, type addition |
1101
+ | 3 | Approval needed | Needed | logic changes, API modification |
1102
+ | 4 | Manual needed | Impossible | security, architecture |
1103
+
1104
+ **Options**:
1105
+
1106
+ - `--dry`: Preview only (no actual fixes)
1107
+ - `--sequential` / `--seq`: Sequential scan (for debugging) - parallel is default
1108
+ - `--level N`: Max fix level (default: 3)
1109
+ - `--errors`: Fix errors only
1110
+ - `--security`: Include security check
1111
+ - `--no-fmt`: Skip formatting
1112
+
1113
+ > **Performance**: Parallel scan is now the default, combining LSP, AST-grep, and Linter results simultaneously (3.75x faster).
1114
+
1115
+ **Example**:
1116
+
1117
+ ```bash
1118
+ # Basic fix (parallel by default)
1119
+ > /moai:fix
1120
+
1121
+ # Sequential scan (for debugging)
1122
+ > /moai:fix --seq
1123
+
1124
+ # Preview
1125
+ > /moai:fix --dry
1126
+
1127
+ # Specific files
1128
+ > /moai:fix src/auth.py
1129
+ ```
1130
+
1131
+ ---
1132
+
1133
+ ### ⏹️ `/moai:cancel-loop` - Cancel Loop
1134
+
1135
+ ```bash
1136
+ > /moai:cancel-loop
1137
+ ```
1138
+
1139
+ Safely cancels running autonomous loop and saves all progress state as snapshot. On cancel, TODO status, fix history, and iteration count are all preserved for later resumption. Use `--list` option to view previous snapshots and restore to specific point.
1140
+
1141
+ **Options**:
1142
+
1143
+ - `--force`: Cancel without confirmation
1144
+ - `--snapshot`: Save snapshot
1145
+ - `--keep`: Preserve state file
1146
+ - `--reason TEXT`: Record cancellation reason
1147
+ - `--list`: List snapshots
1148
+
1149
+ **Restore**:
1150
+
1151
+ ```bash
1152
+ # Restore latest snapshot
1153
+ > /moai:loop --resume latest
1154
+
1155
+ # Restore specific snapshot
1156
+ > /moai:loop --resume cancel-20240111-105230
1157
+ ```
1158
+
1159
+ **Example**:
1160
+
1161
+ ```bash
1162
+ # Basic cancel (after confirmation)
1163
+ > /moai:cancel-loop
1164
+
1165
+ # Force cancel
1166
+ > /moai:cancel-loop --force
1167
+
1168
+ # Save snapshot
1169
+ > /moai:cancel-loop --snapshot
1170
+
1171
+ # List snapshots
1172
+ > /moai:cancel-loop --list
1173
+ ```
1174
+
1175
+ **Actual Output Result**:
1176
+
1177
+ ```text
1178
+
1179
+ ⏺ ✅ Loop Cancel Complete
1180
+
1181
+ Status Report
1182
+
1183
+ ═══════════════════════════════════════════════════════
1184
+ Loop: Cancelled (No Active Loop)
1185
+ ═══════════════════════════════════════════════════════
1186
+
1187
+ ### Status
1188
+ - Running loop: None
1189
+ - Completed tasks: 100%
1190
+ - Remaining TODO: 0
1191
+
1192
+ ### Completed Tasks
1193
+ ✅ README.ko.md "3. 핵심 명령어 모음" 섹션 업데이트
1194
+ ✅ Fenced code blocks 언어 지정 추가 (MD040) - 9건
1195
+ ✅ Emphasis → Heading 변경 (MD036) - 2건
1196
+ ✅ Table column style 수정 (MD060) - 2건
1197
+
1198
+ ### Changes Summary
1199
+ - 명령어 개수: 4개 → 8개 (loop, fix, cancel-loop 추가)
1200
+ - 설명 스타일: 간단 목록 → 3문장 이상 상세 설명
1201
+ - Markdown linting: 13건 이슈 → 0건
1202
+
1203
+ ═══════════════════════════════════════════════════════
1204
+
1205
+ Final File Status
1206
+
1207
+ README.ko.md:
1208
+ - 모든 markdown linting 이슈 해결
1209
+ - 8개 핵심 명령어 상세 설명 완료
1210
+ - 표준 markdown 형식 준수
1211
+
1212
+ ---
1213
+ 모든 작업이 성공적으로 완료되었습니다! 🎉
1214
+ ```
1215
+
1216
+ ---
1217
+
1218
+ ## 4. 🤖 All is Well - Agentic Autonomous Automation
1219
+
1220
+ **The most powerful feature of MoAI-ADK**: AI autonomously explores, plans, implements, and verifies until the completion marker is detected.
1221
+
1222
+ ### Core Concept
1223
+
1224
+ ```text
1225
+ User: "Add authentication feature"
1226
+
1227
+ AI: Explore → Plan → Implement → Verify → Repeat
1228
+
1229
+ AI: All issues resolved
1230
+
1231
+ AI: <moai>DONE</moai> ← Completion Marker
1232
+ ```
1233
+
1234
+ ### Three-Command Hierarchy
1235
+
1236
+ MoAI-ADK provides three levels of autonomous automation:
1237
+
1238
+ | Command | Scope | Iteration | Purpose |
1239
+ |---------|-------|-----------|---------|
1240
+ | `/moai:fix` | Code fixes only | 1 time | Single scan + auto-fix |
1241
+ | `/moai:loop` | Code fixes | Until marker/max | Autonomous iterative fixing |
1242
+ | `/moai:alfred` | Full dev cycle | Until marker/max | Goal → SPEC → Implement → Docs |
1243
+
1244
+ ### Command Chain Relationship
1245
+
1246
+ ```text
1247
+ /moai:alfred (Full Automation)
1248
+
1249
+ ├── Phase 0: Parallel Exploration
1250
+ ├── Phase 1: SPEC Generation
1251
+ ├── Phase 2: Implementation ←─┬── /moai:loop (Iterative)
1252
+ │ │ │
1253
+ │ │ └── /moai:fix (Single)
1254
+ └── Phase 3: Documentation
1255
+ ```
1256
+
1257
+ ### Completion Markers
1258
+
1259
+ AI uses completion markers to signal task completion:
1260
+
1261
+ ```markdown
1262
+ ## Task Complete
1263
+
1264
+ All implementations done, tests passing, docs updated. <moai>DONE</moai>
1265
+ ```
1266
+
1267
+ **Supported Markers**:
1268
+ - `<moai>DONE</moai>` - Task complete
1269
+ - `<moai>COMPLETE</moai>` - Full completion
1270
+ - `<moai:done />` - XML format
1271
+
1272
+ ### Auto-Fix Levels
1273
+
1274
+ | Level | Description | Approval | Examples |
1275
+ |-------|-------------|----------|----------|
1276
+ | 1 | Immediate fix | Not required | import sorting, whitespace |
1277
+ | 2 | Safe fix | Log only | variable rename, type hints |
1278
+ | 3 | Approval needed | Required | logic changes, API modifications |
1279
+ | 4 | Manual required | Cannot auto | security, architecture |
1280
+
1281
+ ### Quick Start Examples
1282
+
1283
+ ```bash
1284
+ # Single scan and fix (parallel by default)
1285
+ > /moai:fix
1286
+
1287
+ # Autonomous loop until resolved
1288
+ > /moai:loop --max 50
1289
+
1290
+ # Full autonomous development (parallel by default)
1291
+ > /moai:alfred "Add JWT authentication" --loop
1292
+ ```
1293
+
1294
+ ### Why "All is Well"?
1295
+
1296
+ The name reflects the philosophy: **set the goal and trust the AI**. MoAI-ADK's agentic automation handles the entire development cycle autonomously. When you see `<moai>DONE</moai>`, all is truly well.
1297
+
1298
+ ---
1299
+
1300
+ ## 5. Mr.Alfred and Sub-Agents
1301
+
1302
+ ### 🎩 Mr.Alfred - Super Agent (Chief Orchestrator)
1303
+
1304
+ **Role**: Analyze user requests and delegate to appropriate specialized agents
1305
+
1306
+ **Workflow**:
1307
+
1308
+ 1. **Understand**: Request analysis and clarification
1309
+ 2. **Plan**: Establish execution plan via Plan agent
1310
+ 3. **Execute**: Delegate tasks to specialized agents (sequential/parallel)
1311
+ 4. **Integrate**: Integrate results and report to user
1312
+
1313
+ ### 🌐 Multilingual Automatic Routing (NEW)
1314
+
1315
+ Alfred automatically recognizes 4 language requests and invokes the correct agent:
1316
+
1317
+ | Request Language | Example | Agent Invoked |
1318
+ | ---------------- | --------------------------- | -------------- |
1319
+ | English | "Design backend API" | expert-backend |
1320
+ | Korean | "백엔드 API 설계해줘" | expert-backend |
1321
+ | Japanese | "バックエンドAPIを設計して" | expert-backend |
1322
+ | Chinese | "设计后端API" | expert-backend |
1323
+
1324
+ ---
1325
+
1326
+ ### 🔧 Tier 1: Domain Experts (8)
1327
+
1328
+ | Agent | Expertise | Usage Example |
1329
+ | ---------------------- | -------------------------- | ---------------------------------------- |
1330
+ | **expert-backend** | FastAPI, Django, DB design | API design, query optimization |
1331
+ | **expert-frontend** | React, Vue, Next.js | UI components, state management |
1332
+ | **expert-security** | Security analysis, OWASP | Security audit, vulnerability analysis |
1333
+ | **expert-devops** | Docker, K8s, CI/CD | Deployment automation, infrastructure |
1334
+ | **expert-debug** | Bug analysis, performance | Problem diagnosis, bottleneck resolution |
1335
+ | **expert-performance** | Profiling, optimization | Response time improvement |
1336
+ | **expert-refactoring** | Code refactoring, AST-Grep | Large-scale code transformation |
1337
+ | **expert-testing** | Test strategy, E2E | Test planning, coverage |
1338
+
1339
+ ---
1340
+
1341
+ ### 🎯 Tier 2: Workflow Managers (8)
1342
+
1343
+ | Agent | Role | Auto Invocation Timing |
1344
+ | ----------------------- | -------------------------------- | ------------------------------- |
1345
+ | **manager-spec** | SPEC writing (EARS) | `/moai:1-plan` |
1346
+ | **manager-tdd** | TDD auto execution | `/moai:2-run` |
1347
+ | **manager-docs** | Documentation auto generation | `/moai:3-sync` |
1348
+ | **manager-quality** | TRUST 5 verification | After implementation completion |
1349
+ | **manager-strategy** | Execution strategy establishment | Complex planning |
1350
+ | **manager-project** | Project initialization | `/moai:0-project` |
1351
+ | **manager-git** | Git workflow | Branch/PR management |
1352
+ | **manager-claude-code** | Claude Code integration | Settings optimization |
1353
+
1354
+ ---
1355
+
1356
+ ### 🏗️ Tier 3: Claude Code Builder (4)
1357
+
1358
+ | Agent | Role | Usage Example |
1359
+ | ------------------- | ------------------ | ----------------------------- |
1360
+ | **builder-agent** | Create new agent | Organization specialist agent |
1361
+ | **builder-skill** | Create new skill | Team-specific skill module |
1362
+ | **builder-command** | Create new command | Custom workflow |
1363
+ | **builder-plugin** | Create plugin | Distribution plugin |
1364
+
1365
+ ---
1366
+
1367
+ ## 6. Agent-Skills
1368
+
1369
+ ### 📚 Skill Library Structure
1370
+
1371
+ ```text
1372
+ 🏗️ Foundation (5) → Core philosophy, execution rules
1373
+ 🎯 Domain (4) → Domain expertise
1374
+ 💻 Language (16) → 16 programming languages
1375
+ 🚀 Platform (10) → Cloud/BaaS integration
1376
+ 📋 Workflow (7) → Automation workflows
1377
+ 📚 Library (4) → Special libraries
1378
+ 🛠️ Tool (2) → Development tools
1379
+ ```
1380
+
1381
+ ### Frequently Used Skill Combinations
1382
+
1383
+ | Purpose | Skill Combination |
1384
+ | ----------------- | ------------------------------------------------------------------------ |
1385
+ | **Backend API** | `moai-lang-python` + `moai-domain-backend` + `moai-platform-supabase` |
1386
+ | **Frontend UI** | `moai-lang-typescript` + `moai-domain-frontend` + `moai-library-shadcn` |
1387
+ | **Documentation** | `moai-library-nextra` + `moai-workflow-docs` + `moai-library-mermaid` |
1388
+ | **Testing** | `moai-lang-python` + `moai-workflow-testing` + `moai-foundation-quality` |
1389
+
1390
+ ### Skill Usage
1391
+
1392
+ ```python
1393
+ # Method 1: Direct call (Agent)
1394
+ Skill("moai-lang-python")
1395
+
1396
+ # Method 2: Alfred auto selection (general user)
1397
+ "FastAPI server 만들어줘"
1398
+ → Alfred automatically selects moai-lang-python
1399
+ ```
1400
+
1401
+ ---
1402
+
1403
+ ## 7. TRUST 5 Quality Principles
1404
+
1405
+ All MoAI-ADK projects follow the **TRUST 5** quality framework.
1406
+
1407
+ ### 🏆 TRUST 5 = Test + Readable + Unified + Secured + Trackable
1408
+
1409
+ ```mermaid
1410
+ graph TD
1411
+ T1["🔴 T: Test-First<br/>━━━━━━━━<br/>• TDD Red-Green-Refactor<br/>• 85%+ coverage<br/>• Automated testing"]
1412
+ R["📖 R: Readable<br/>━━━━━━━━<br/>• Clear naming<br/>• Code comments<br/>• Linter compliance"]
1413
+ U["🔄 U: Unified<br/>━━━━━━━━<br/>• Consistent style<br/>• Standard patterns<br/>• Error handling"]
1414
+ S["🔒 S: Secured<br/>━━━━━━━━<br/>• OWASP Top 10<br/>• Vulnerability scan<br/>• Encryption policy"]
1415
+ T2["📋 T: Trackable<br/>━━━━━━━━<br/>• Clear commits<br/>• Issue tracking<br/>• CHANGELOG"]
1416
+
1417
+ T1 --> R --> U --> S --> T2 --> Deploy["✅ Production Ready"]
1418
+ ```
1419
+
1420
+ ### T - Test-First
1421
+
1422
+ **Principle**: All implementation starts with tests
1423
+
1424
+ **Verification**:
1425
+
1426
+ - Test coverage >= 85%
1427
+ - Write failing tests first (Red)
1428
+ - Pass tests with code (Green)
1429
+ - Refactor
1430
+
1431
+ ### R - Readable
1432
+
1433
+ **Principle**: Code must be clear and easy to understand
1434
+
1435
+ **Verification**:
1436
+
1437
+ - Clear variable names
1438
+ - Comments on complex logic
1439
+ - Pass code review
1440
+ - Pass linter checks
1441
+
1442
+ ### U - Unified
1443
+
1444
+ **Principle**: Maintain consistent style across project
1445
+
1446
+ **Verification**:
1447
+
1448
+ - Follow project style guide
1449
+ - Consistent naming conventions
1450
+ - Unified error handling
1451
+ - Standard document format
1452
+
1453
+ ### S - Secured
1454
+
1455
+ **Principle**: All code must pass security verification
1456
+
1457
+ **Verification**:
1458
+
1459
+ - OWASP Top 10 checks
1460
+ - Dependency vulnerability scanning
1461
+ - Encryption policy compliance
1462
+ - Access control verification
1463
+
1464
+ ### T - Trackable
1465
+
1466
+ **Principle**: All changes must be clearly trackable
1467
+
1468
+ **Verification**:
1469
+
1470
+ - Clear commit messages
1471
+ - Issue tracking (GitHub Issues)
1472
+ - Maintain CHANGELOG
1473
+ - Code review records
1474
+
1475
+ ---
1476
+
1477
+ ## 8. TAG System v2.0 - Code-to-Documentation Traceability
1478
+
1479
+ TAG System v2.0 provides bidirectional traceability between code and SPEC documents. Use `@SPEC` tags to automatically link code to documentation and documentation to code.
1480
+
1481
+ ### Core Problem Solved: "What if I write code without a SPEC first?"
1482
+
1483
+ TAG System v2.0's **Context-Aware Validation** perfectly solves this:
1484
+
1485
+ | Situation | TAG Type | Commit without SPEC? | Description |
1486
+ | ---------------------- | ------------------------- | -------------------- | -------------------------------- |
1487
+ | **Simple fixes** | `related` (all files) | ✅ Allowed | Shows relationship only |
1488
+ | **Write tests first** | `verify` or `@TEST` (test files) | ✅ Allowed | Supports TDD workflow |
1489
+ | **Implementation code**| `impl` (implementation files) | ⚠️ Warning/block | Depends on warn/enforce mode |
1490
+ | **Show dependencies** | `depends` (all files) | ✅ Allowed | Shows dependency only |
1491
+
1492
+ ### TAG Overview
1493
+
1494
+ MoAI-ADK supports two TAG types:
1495
+
1496
+ | TAG Type | Purpose | Format | Location |
1497
+ | -------- | --------------- | ------------------------- | ------------ |
1498
+ | **@SPEC** | Code-to-SPEC link| `@SPEC SPEC-XXX [verb]` | All files |
1499
+ | **@TEST** | Test ID | `@TEST TEST-XXX` | Test files only |
1500
+
1501
+ ### TAG Usage Guide
1502
+
1503
+ #### 1. @SPEC TAG Verb Selection Guide
1504
+
1505
+ | Verb | When to use? | Usage Example |
1506
+ | --------- | ------------------------- | ------------------------------ |
1507
+ | **impl** | Implementation code links | `# @SPEC SPEC-AUTH-001 impl` |
1508
+ | **verify**| Verify SPEC in tests | `# @SPEC SPEC-AUTH-001 verify` |
1509
+ | **related**| Simple fixes/relationships | `# @SPEC SPEC-AUTH-001 related` |
1510
+ | **depends**| Dependency on other SPEC | `# @SPEC SPEC-DB-004 depends` |
1511
+
1512
+ #### 2. @TEST vs @SPEC verify Selection Guide
1513
+
1514
+ | Distinction | @TEST | @SPEC verify |
1515
+ | ----------- | ------------------------ | -------------------------- |
1516
+ | **Purpose** | Test identification | SPEC verification |
1517
+ | **SPEC link**| Optional | Required |
1518
+ | **Usage** | Independent tests | TDD (SPEC → impl → test) |
1519
+ | **Combined** | `@SPEC verify` + `@TEST` | Standalone |
1520
+
1521
+ #### 3. Recommended Usage Patterns
1522
+
1523
+ ```python
1524
+ # Pattern 1: TDD (SPEC exists)
1525
+ # @SPEC SPEC-AUTH-001 verify
1526
+ # @TEST TEST-AUTH-001
1527
+ def test_login():
1528
+ pass
1529
+
1530
+ # Pattern 2: Independent test (no SPEC)
1531
+ # @TEST TEST-AUTH-001
1532
+ def test_login():
1533
+ pass
1534
+
1535
+ # Pattern 3: Implementation code
1536
+ # @SPEC SPEC-AUTH-001 impl
1537
+ def login():
1538
+ pass
1539
+ ```
1540
+
1541
+ ### Summary: TAG Selection Decision Tree
1542
+
1543
+ ```
1544
+ Is this a test file?
1545
+ ├── Yes
1546
+ │ ├── SPEC exists and needs verification? → @SPEC verify
1547
+ │ ├── Independent test identification? → @TEST
1548
+ │ └── Need both? → @SPEC verify + @TEST
1549
+ └── No (implementation code)
1550
+ ├── SPEC exists and implementation? → @SPEC impl
1551
+ ├── Simple fix? → @SPEC related
1552
+ └── Depends on other SPEC? → @SPEC depends
1553
+ ```
1554
+
1555
+ ### TAG Syntax
1556
+
1557
+ Add @TAG in code comments. Recommended to place above the function:
1558
+
1559
+ ```python
1560
+ # Basic format
1561
+ @SPEC SPEC-{DOMAIN}-{NUMBER} [verb] # General code
1562
+ @TEST TEST-{DOMAIN}-{NUMBER} # Test code
1563
+
1564
+ # Example
1565
+ # @SPEC SPEC-AUTH-001 impl
1566
+ def login(): ...
1567
+
1568
+ # @SPEC SPEC-AUTH-001 verify
1569
+ # @TEST TEST-AUTH-001
1570
+ def test_login(): ...
1571
+ ```
1572
+
1573
+ ### Real-World Workflow
1574
+
1575
+ #### Scenario 1: Simple Bug Fix (no SPEC)
1576
+
1577
+ ```python
1578
+ # auth.py
1579
+ # @SPEC SPEC-AUTH-001 related
1580
+ def fix_login_bug():
1581
+ """Login bug fix
1582
+
1583
+ No related SPEC exists, using related
1584
+ """
1585
+ pass
1586
+ ```
1587
+
1588
+ **Pre-commit Hook Result**:
1589
+ ```
1590
+ TAG Validation Results:
1591
+ ==================================================
1592
+ auth.py:10: Hint: Consider creating SPEC for SPEC-AUTH-001
1593
+ (related TAG - SPEC not required)
1594
+ ==================================================
1595
+
1596
+ Commit allowed with warning (warn mode)
1597
+ ```
1598
+
1599
+ ✅ **Commit Allowed**: related TAG allows commit without SPEC
1600
+
1601
+ #### Scenario 2: Write Tests First (TDD)
1602
+
1603
+ ```python
1604
+ # test_auth.py
1605
+ # @SPEC SPEC-AUTH-002 verify
1606
+ # @TEST TEST-AUTH-002
1607
+ def test_login_success():
1608
+ """Login success test
1609
+
1610
+ Tests written first, impl later
1611
+ """
1612
+ pass
1613
+ ```
1614
+
1615
+ **Pre-commit Hook Result**:
1616
+ ```
1617
+ TAG Validation Results:
1618
+ ==================================================
1619
+ test_auth.py:15: Warning: Test references non-existent SPEC: SPEC-AUTH-002
1620
+ (verify TAG in test file - commit allowed)
1621
+ ==================================================
1622
+
1623
+ Commit allowed with warning (warn mode)
1624
+ ```
1625
+
1626
+ ✅ **Commit Allowed**: verify TAG in test files allows commit without SPEC
1627
+
1628
+ #### Scenario 3: Official Development (SPEC first)
1629
+
1630
+ ```bash
1631
+ # 1. Create SPEC first
1632
+ > /moai:1-plan "user authentication system"
1633
+ # → SPEC-AUTH-003 created
1634
+
1635
+ # 2. Write implementation code
1636
+ # @SPEC SPEC-AUTH-003 impl
1637
+ def login(username, password):
1638
+ """User login
1639
+
1640
+ Official development uses impl TAG
1641
+ """
1642
+ pass
1643
+
1644
+ # 3. Write test code
1645
+ # @SPEC SPEC-AUTH-003 verify
1646
+ # @TEST TEST-AUTH-003
1647
+ def test_login():
1648
+ """Login test"""
1649
+ pass
1650
+ ```
1651
+
1652
+ **Pre-commit Hook Result** (SPEC exists):
1653
+ ```
1654
+ TAG Validation: All TAGs valid
1655
+ ```
1656
+
1657
+ ✅ **Commit Allowed**: SPEC existence confirmed
1658
+
1659
+ **Pre-commit Hook Result** (SPEC doesn't exist, enforce mode):
1660
+ ```
1661
+ TAG Validation Results:
1662
+ ==================================================
1663
+ auth.py:25: Error: Implementation references non-existent SPEC: SPEC-AUTH-003
1664
+ (commit blocked in enforce mode)
1665
+ ==================================================
1666
+
1667
+ Commit blocked due to TAG validation error (enforce mode)
1668
+ ```
1669
+
1670
+ ❌ **Commit Blocked**: enforce mode blocks impl TAG without SPEC
1671
+
1672
+ ### Configuration Options
1673
+
1674
+ Configure TAG validation behavior in `.moai/config/sections/quality.yaml`:
1675
+
1676
+ ```yaml
1677
+ tag_validation:
1678
+ enabled: true # Enable TAG checking
1679
+ mode: warn # warn | enforce | off
1680
+ check_spec_exists: true # Check SPEC document exists
1681
+ max_tags_per_file: 100 # Maximum TAGs per file
1682
+ ```
1683
+
1684
+ ### Mode-Specific Behavior
1685
+
1686
+ | Mode | impl TAG (no SPEC) | verify/@TEST TAG (test file) | related TAG | depends TAG |
1687
+ | --------------- | ------------------ | ----------------------------- | ----------- | ----------- |
1688
+ | **warn** (default) | Warn then allow | Warn then allow | Hint only | Hint only |
1689
+ | **enforce** | Block commit | Allow | Hint only | Hint only |
1690
+ | **off** | No check | No check | No check | No check |
1691
+
1692
+ ### Recommended TAG Usage Strategy
1693
+
1694
+ | Development Type | Recommended Strategy | TAG Example |
1695
+ | ---------------- | ------------------------------------------- | ----------------------------------------------------------------------------------- |
1696
+ | **Hotfix** | Use `related` | `@SPEC SPEC-XXX related` |
1697
+ | **Test-first** | `verify` or `@TEST` first, then `impl` | Tests: `@SPEC SPEC-XXX verify` or `@TEST TEST-XXX` → Impl: `@SPEC SPEC-XXX impl` |
1698
+ | **Official dev** | Create SPEC first, use `impl` | `/moai:1-plan` → `@SPEC SPEC-XXX impl` |
1699
+ | **Refactoring** | Keep existing TAGs | No changes |
1700
+ | **Documentation** | Use `related` to show relationship | `@SPEC SPEC-XXX related` |
1701
+ | **Dependency** | Use `depends` to show dependency | `@SPEC SPEC-YYY depends` (depends on other SPEC) |
1702
+
1703
+ ### Pre-commit Hook Automatic Validation
1704
+
1705
+ All Git commits automatically validate TAG:
1706
+
1707
+ ```bash
1708
+ # Attempt commit
1709
+ git commit -m "Add login feature"
1710
+
1711
+ # Automatic execution
1712
+ TAG Validation Results:
1713
+ ==================================================
1714
+ auth.py:10: Hint: Consider creating SPEC for SPEC-AUTH-001
1715
+ (related TAG - SPEC not required)
1716
+ ==================================================
1717
+
1718
+ Commit allowed with warning (warn mode)
1719
+ ```
1720
+
1721
+ ### TAG Linkage Database
1722
+
1723
+ TAG System stores bidirectional mapping in `.moai/cache/tag-linkage.json`:
1724
+
1725
+ ```json
1726
+ {
1727
+ "tags": [
1728
+ {
1729
+ "spec_id": "SPEC-AUTH-001",
1730
+ "verb": "impl",
1731
+ "file_path": "src/auth.py",
1732
+ "line": 10
1733
+ }
1734
+ ],
1735
+ "files": {
1736
+ "src/auth.py": ["SPEC-AUTH-001"]
1737
+ }
1738
+ }
1739
+ ```
1740
+
1741
+ **Auto-update**:
1742
+ - Automatically extracts and saves TAGs on commit
1743
+ - Automatically removes TAGs when files are deleted
1744
+ - Detects orphaned TAGs (references to deleted SPECs)
1745
+
1746
+ ### Advanced Features
1747
+
1748
+ #### SPEC-ID Format Validation
1749
+
1750
+ ```python
1751
+ # Correct format
1752
+ @SPEC SPEC-AUTH-001 # ✅
1753
+ @SPEC SPEC-PAY-002 # ✅
1754
+ @SPEC SPEC-UI-003 # ✅
1755
+
1756
+ # Incorrect format
1757
+ @SPEC AUTH-001 # ❌ SPEC- prefix missing
1758
+ @SPEC SPEC-001 # ❌ Domain missing
1759
+ @SPEC SPEC-AUTH-1 # ❌ 3-digit number required
1760
+ ```
1761
+
1762
+ #### File Type Auto-Detection
1763
+
1764
+ TAG System auto-detects by file pattern:
1765
+ - **Test files**: `test_*.py`, `*_test.py`, `tests/` directory
1766
+ - **Implementation files**: All other Python files
1767
+
1768
+ ### Getting Started
1769
+
1770
+ ```bash
1771
+ # 1. TAG System already enabled
1772
+ cat .moai/config/sections/quality.yaml
1773
+
1774
+ # 2. Add TAGs to your code
1775
+ # auth.py (implementation file)
1776
+ # @SPEC SPEC-AUTH-001 impl
1777
+ def login():
1778
+ pass
1779
+
1780
+ # test_auth.py (test file)
1781
+ # @SPEC SPEC-AUTH-001 verify
1782
+ # @TEST TEST-AUTH-001
1783
+ def test_login():
1784
+ pass
1785
+
1786
+ # 3. Automatic validation on commit
1787
+ git add .
1788
+ git commit -m "Add login feature"
1789
+ # → TAG Validation runs automatically
1790
+ ```
1791
+
1792
+ ### Troubleshooting
1793
+
1794
+ **Q: Skip TAG validation**
1795
+ ```bash
1796
+ git commit --no-verify
1797
+ ```
1798
+
1799
+ **Q: Temporarily commit in enforce mode**
1800
+ ```yaml
1801
+ # quality.yaml (temporary change)
1802
+ tag_validation:
1803
+ mode: warn # enforce → warn
1804
+ ```
1805
+
1806
+ **Q: Find orphaned TAGs**
1807
+ ```bash
1808
+ # Orphaned TAGs = TAGs referencing non-existent SPECs
1809
+ # Automatically detected by Pre-commit Hook
1810
+ ```
1811
+
1812
+ ### Core Innovations of TAG System v2.0
1813
+
1814
+ | Problem | TAG System v1 | TAG System v2 |
1815
+ | ------------------------ | ----------------- | -------------------------------------- |
1816
+ | Write code without SPEC | ❌ Impossible | ✅ Possible with `related`/`verify` |
1817
+ | Write tests first | ❌ Impossible | ✅ Test file `verify`/`@TEST` allowed |
1818
+ | Flexible validation | ❌ All or nothing | ✅ warn/enforce/off modes |
1819
+ | File type awareness | ❌ None | ✅ Auto-detects (test/implementation) |
1820
+ | Show dependencies | ❌ Not supported | ✅ `depends` shows SPEC dependencies |
1821
+ | Test identification TAG | ❌ Not supported | ✅ `@TEST` for independent test IDs |
1822
+
1823
+ **TAG System v2.0**: Maintains SPEC-First TDD benefits while perfectly supporting real-world development flexibility.
1824
+
1825
+ ---
1826
+
1827
+ ## 10. Automated Quality Checks
1828
+
1829
+ ### 🔍 AST-Grep Based Structural Inspection
1830
+
1831
+ **AST-Grep** analyzes **code structure** not text:
1832
+
1833
+ | Feature | Description | Example |
1834
+ | -------------------------- | ---------------------------- | ----------------------------------------- |
1835
+ | **Structural Search** | AST pattern matching | Find unparameterized SQL queries |
1836
+ | **Security Scan** | Auto vulnerability detection | SQL Injection, XSS, hardcoded secrets |
1837
+ | **Pattern Refactoring** | Safe code transformation | Bulk variable rename, function extraction |
1838
+ | **Multi-language Support** | 40+ languages | Python, TypeScript, Go, Rust... |
1839
+
1840
+ ### Auto Inspection Flow
1841
+
1842
+ ```text
1843
+ Code writing
1844
+
1845
+ [Hook] AST-Grep auto scan
1846
+
1847
+ ⚠️ Immediate alert on vulnerability detection
1848
+
1849
+ ✅ Refactor to safe code
1850
+ ```
1851
+
1852
+ **Detection Example**:
1853
+
1854
+ ```bash
1855
+ ⚠️ AST-Grep: Potential SQL injection in src/auth.py:47
1856
+ Pattern: execute(f"SELECT * FROM users WHERE id={user_id}")
1857
+ Suggestion: execute("SELECT * FROM users WHERE id=%s", (user_id,))
1858
+ ```
1859
+
1860
+ ---
1861
+
1862
+ ## 11. 📊 Statusline Customization
1863
+
1864
+ MoAI-ADK provides a **customizable statusline** that displays real-time project information in Claude Code.
1865
+
1866
+ ### Default Statusline Layout
1867
+
1868
+ ```text
1869
+ 🤖 Opus 4.5 | 💰 152K/200K | 💬 Mr. Alfred | 📁 MoAI-ADK | 📊 +0 M58 ?5 | 💾 57.7MB | 🔀 main
1870
+ ```
1871
+
1872
+ ### Statusline Components
1873
+
1874
+ | Icon | Component | Description | Config Key |
1875
+ |------|-----------|-------------|------------|
1876
+ | 🤖 | **Model** | Claude model (Opus, Sonnet, etc.) | `model` |
1877
+ | 💰 | **Context** | Context window usage (e.g., 77K/200K) | `context_window` |
1878
+ | 💬 | **Style** | Active output style (e.g., Mr. Alfred) | `output_style` |
1879
+ | 📁 | **Directory** | Current project name | `directory` |
1880
+ | 📊 | **Git Status** | Staged/Modified/Untracked files | `git_status` |
1881
+ | 💾 | **Memory** | Process memory usage | `memory_usage` |
1882
+ | 🔀 | **Branch** | Current Git branch | `branch` |
1883
+ | 🔅 | **Version** | Claude Code version (optional) | `version` |
1884
+
1885
+ ### Configuration
1886
+
1887
+ Edit `.moai/config/statusline-config.yaml`:
1888
+
1889
+ ```yaml
1890
+ display:
1891
+ model: true # 🤖 Claude model
1892
+ context_window: true # 💰 Context window
1893
+ output_style: true # 💬 Output style
1894
+ directory: true # 📁 Project name
1895
+ git_status: true # 📊 Git status
1896
+ memory_usage: true # 💾 Memory usage
1897
+ branch: true # 🔀 Git branch
1898
+ version: 1.1.0 # 🔅 Version (optional)
1899
+ active_task: true # Active task
1900
+ ```
1901
+
1902
+ ### Memory Collector
1903
+
1904
+ When `memory_usage` is enabled, MoAI-ADK uses `psutil` to collect real-time memory usage:
1905
+
1906
+ - **Process Memory**: RSS (Resident Set Size) of the current Python process
1907
+ - **Caching**: Performance optimization with 10-second TTL
1908
+ - **Cross-Platform**: Supports macOS, Linux, Windows
1909
+ - **Graceful Degradation**: Displays "N/A" when psutil is unavailable
1910
+
1911
+ ### Display Modes
1912
+
1913
+ | Mode | Max Length | Use Case |
1914
+ |------|------------|----------|
1915
+ | `compact` | 80 chars | Standard terminal |
1916
+ | `extended` | 120 chars | Wide terminal |
1917
+ | `minimal` | 40 chars | Narrow terminal |
1918
+
1919
+ Set mode:
1920
+
1921
+ ```bash
1922
+ export MOAI_STATUSLINE_MODE=extended
1923
+ ```
1924
+
1925
+ ---
1926
+
1927
+ ## 12. 🌳 Worktree Parallel Development
1928
+
1929
+ MoAI-ADK's core innovation: **Worktree for complete isolation, unlimited parallel development**
1930
+
1931
+ ### 💡 Why Worktree?
1932
+
1933
+ **Problem**: Changing LLMs with `moai glm`/`moai cc` applies to **all open sessions**. Changing models in the same session leads to authentication errors, making continuation difficult.
1934
+
1935
+ **Solution**: Git Worktree completely isolates each SPEC to maintain independent LLM settings
1936
+
1937
+ ---
1938
+
1939
+ ### 📦 Worktree Workflow
1940
+
1941
+ ```text
1942
+ ┌─────────────────────────────────────────────────────────────────┐
1943
+ │ Terminal 1 (Claude Opus) - SPEC Design Only │
1944
+ │ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ │
1945
+ │ $ cd my-project │
1946
+ │ $ claude │
1947
+ │ │
1948
+ │ > /moai:1-plan "사용자 인증 시스템" --worktree │
1949
+ │ ✅ SPEC-AUTH-001 생성 완료 │
1950
+ │ ✅ Worktree 생성: ~/moai/worktrees/my-project/SPEC-AUTH-001 │
1951
+ │ ✅ Branch: feature/SPEC-AUTH-001 │
1952
+ │ │
1953
+ │ > /moai:1-plan "결제 시스템" --worktree │
1954
+ │ ✅ SPEC-PAY-002 생성 완료 │
1955
+ │ ✅ Worktree 생성: ~/moai/worktrees/my-project/SPEC-PAY-002 │
1956
+ │ │
1957
+ │ > /moai:1-plan "대시보드 UI" --worktree │
1958
+ │ ✅ SPEC-UI-003 생성 완료 │
1959
+ │ ✅ Worktree 생성: ~/moai/worktrees/my-project/SPEC-UI-003 │
1960
+ │ │
1961
+ │ 💡 Opus로 모든 SPEC 계획 완료 (세션 유지 중...) │
1962
+ └─────────────────────────────────────────────────────────────────┘
1963
+
1964
+ ┌─────────────────────────────────────────────────────────────────┐
1965
+ │ Terminal 2 - SPEC-AUTH-001 Worktree (GLM 4.7) │
1966
+ │ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ │
1967
+ │ $ moai-worktree go SPEC-AUTH-001 │
1968
+ │ # Or shortcut: moai-wt go SPEC-AUTH-001 │
1969
+ │ │
1970
+ │ 📁 Current location: ~/moai/worktrees/my-project/SPEC-AUTH-001 │
1971
+ │ 🔀 Branch: feature/SPEC-AUTH-001 │
1972
+ │ │
1973
+ │ $ moai glm │
1974
+ │ ✅ Switched to GLM backend │
1975
+ │ │
1976
+ │ $ claude │
1977
+ │ > /moai:2-run SPEC-AUTH-001 │
1978
+ │ 🔄 TDD 실행 중... (Red → Green → Refactor) │
1979
+ │ ✅ 구현 완료! │
1980
+ │ ✅ 테스트 통과 (Coverage: 92%) │
1981
+ │ │
1982
+ │ > /moai:3-sync SPEC-AUTH-001 │
1983
+ │ ✅ 문서 동기화 완료 │
1984
+ │ │
1985
+ │ # After completion, merge │
1986
+ │ $ git checkout main │
1987
+ │ $ git merge feature/SPEC-AUTH-001 │
1988
+ │ $ moai-worktree clean --merged-only │
1989
+ └─────────────────────────────────────────────────────────────────┘
1990
+
1991
+ ┌─────────────────────────────────────────────────────────────────┐
1992
+ │ Terminal 3 - SPEC-PAY-002 Worktree (GLM 4.7) │
1993
+ │ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ │
1994
+ │ $ moai-wt go SPEC-PAY-002 │
1995
+ │ $ moai glm │
1996
+ │ $ claude │
1997
+ │ │
1998
+ │ > /moai:alfred SPEC-PAY-002 │
1999
+ │ 🔄 Plan → Run → Sync 자동 실행 │
2000
+ │ ✅ 완료! │
2001
+ │ │
2002
+ │ $ git checkout main && git merge feature/SPEC-PAY-002 │
2003
+ └─────────────────────────────────────────────────────────────────┘
2004
+
2005
+ ┌─────────────────────────────────────────────────────────────────┐
2006
+ │ Terminal 4 - SPEC-UI-003 Worktree (GLM 4.7) │
2007
+ │ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ │
2008
+ │ $ moai-wt go SPEC-UI-003 │
2009
+ │ $ moai glm │
2010
+ │ $ claude │
2011
+ │ > /moai:alfred SPEC-UI-003 │
2012
+ │ ✅ 완료! │
2013
+ └─────────────────────────────────────────────────────────────────┘
2014
+ ```
2015
+
2016
+ ---
2017
+
2018
+ ### 🎯 Core Workflow
2019
+
2020
+ #### Phase 1: Plan with Claude 4.5 Opus (Terminal 1)
2021
+
2022
+ ```bash
2023
+ /moai:1-plan "feature description" --worktree
2024
+ ```
2025
+
2026
+ - ✅ SPEC document generation
2027
+ - ✅ Worktree auto creation
2028
+ - ✅ Feature branch auto creation
2029
+
2030
+ #### Phase 2: Implement with GLM 4.7 (Terminals 2, 3, 4...)
2031
+
2032
+ ```bash
2033
+ moai-wt go SPEC-ID
2034
+ moai glm
2035
+ claude
2036
+ > /moai:2-run SPEC-ID
2037
+ > /moai:3-sync SPEC-ID
2038
+ ```
2039
+
2040
+ - ✅ Isolated work environment
2041
+ - ✅ GLM cost efficiency
2042
+ - ✅ Conflict-free parallel development
2043
+
2044
+ #### Phase 3: Merge and Cleanup
2045
+
2046
+ ```bash
2047
+ # Option 1: Complete in one step (Recommended)
2048
+ moai-wt done SPEC-ID # checkout main → merge → cleanup
2049
+ moai-wt done SPEC-ID --push # above + push to remote
2050
+
2051
+ # Option 2: Manual steps
2052
+ git checkout main
2053
+ git merge feature/SPEC-ID
2054
+ moai-wt clean --merged-only
2055
+ ```
2056
+
2057
+ ---
2058
+
2059
+ ### ✨ Worktree Benefits
2060
+
2061
+ | Benefit | Description |
2062
+ | ---------------------- | -------------------------------------------------------- |
2063
+ | **Complete Isolation** | Each SPEC has independent Git state, no file conflicts |
2064
+ | **LLM Independence** | Separate LLM settings per Worktree |
2065
+ | **Unlimited Parallel** | Unlimited SPEC parallel development without dependencies |
2066
+ | **Safe Merge** | Only completed SPECs sequentially merge to main |
2067
+
2068
+ ---
2069
+
2070
+ ### 📊 Worktree Commands
2071
+
2072
+ | Command | Description | Usage Example |
2073
+ | ------------------------ | ---------------------------------- | -------------------------------- |
2074
+ | `moai-wt new SPEC-ID` | Create new Worktree | `moai-wt new SPEC-AUTH-001` |
2075
+ | `moai-wt go SPEC-ID` | Enter Worktree (open new shell) | `moai-wt go SPEC-AUTH-001` |
2076
+ | `moai-wt list` | List Worktrees | `moai-wt list` |
2077
+ | `moai-wt done SPEC-ID` | Merge and cleanup (checkout→merge) | `moai-wt done SPEC-AUTH-001` |
2078
+ | `moai-wt remove SPEC-ID` | Remove Worktree | `moai-wt remove SPEC-AUTH-001` |
2079
+ | `moai-wt status` | Check Worktree status and registry | `moai-wt status` |
2080
+ | `moai-wt sync [SPEC-ID]` | Synchronize Worktree | `moai-wt sync --all` |
2081
+ | `moai-wt clean` | Clean merged Worktrees | `moai-wt clean --merged-only` |
2082
+ | `moai-wt recover` | Recover registry from disk | `moai-wt recover` |
2083
+ | `moai-wt config` | Check Worktree settings | `moai-wt config root` |
2084
+
2085
+ ---
2086
+
2087
+ ## 13. Understanding CLAUDE.md
2088
+
2089
+ The `CLAUDE.md` file generated in your project root after MoAI-ADK installation is **Alfred's (AI Orchestrator) execution directive**. This file defines how Claude Code behaves in your project.
2090
+
2091
+ ### What is CLAUDE.md?
2092
+
2093
+ `CLAUDE.md` is a project configuration file that Claude Code automatically reads at session start. In MoAI-ADK, this file defines the behavioral rules for the **Alfred orchestrator**.
2094
+
2095
+ ```text
2096
+ 📁 Project Root
2097
+ ├── CLAUDE.md ← Alfred execution directive (don't modify)
2098
+ ├── CLAUDE.local.md ← Personal custom directives (optional)
2099
+ ├── .claude/
2100
+ │ ├── settings.json ← Claude Code settings
2101
+ │ ├── agents/ ← Sub-agent definitions
2102
+ │ ├── commands/ ← Slash commands
2103
+ │ └── skills/ ← Skill definitions
2104
+ └── .moai/
2105
+ └── config/ ← MoAI configuration
2106
+ ```
2107
+
2108
+ ### CLAUDE.md Core Structure
2109
+
2110
+ | Section | Description | Key Content |
2111
+ |---------|-------------|-------------|
2112
+ | **Core Identity** | Alfred's role definition | Strategic orchestrator, HARD rules |
2113
+ | **Request Processing Pipeline** | Request handling flow | Analyze → Route → Execute → Report |
2114
+ | **Command Reference** | Command classification | Type A (Workflow), Type B (Utility), Type C (Feedback) |
2115
+ | **Agent Catalog** | Sub-agent listing | 8 Managers, 8 Experts, 4 Builders |
2116
+ | **SPEC-Based Workflow** | SPEC-driven development | Plan → Run → Sync flow |
2117
+ | **Quality Gates** | Quality validation rules | HARD/SOFT rules checklist |
2118
+ | **Configuration Reference** | Settings reference | Language, output format rules |
2119
+
2120
+ ### Usage: Don't Modify It
2121
+
2122
+ > **Recommendation**: Use `CLAUDE.md` **as-is without modification**.
2123
+
2124
+ **Reasons**:
2125
+ - Automatically replaced with the latest version during MoAI-ADK updates
2126
+ - Modifications may cause update conflicts
2127
+ - Ensures consistent behavior across agents
2128
+
2129
+ ```bash
2130
+ # CLAUDE.md is automatically updated
2131
+ moai update
2132
+ ```
2133
+
2134
+ ### Customization: Use CLAUDE.local.md
2135
+
2136
+ If you need additional directives, create a **`CLAUDE.local.md`** file.
2137
+
2138
+ ```bash
2139
+ # Create CLAUDE.local.md in project root
2140
+ touch CLAUDE.local.md
2141
+ ```
2142
+
2143
+ **CLAUDE.local.md Example**:
2144
+
2145
+ ```markdown
2146
+ # Project Local Directives
2147
+
2148
+ ## Coding Style
2149
+ - Type hints required for all functions
2150
+ - Use Google-style docstrings
2151
+
2152
+ ## Project-Specific Rules
2153
+ - API responses always use snake_case
2154
+ - Test files must have test_ prefix
2155
+
2156
+ ## Prohibited
2157
+ - No console.log (use logger)
2158
+ - No any type usage
2159
+ ```
2160
+
2161
+ **Benefits**:
2162
+ - No conflicts with `CLAUDE.md` updates
2163
+ - Project-specific customization
2164
+ - Can add to `.gitignore` for personal settings
2165
+
2166
+ ### CLAUDE.md vs CLAUDE.local.md
2167
+
2168
+ | Aspect | CLAUDE.md | CLAUDE.local.md |
2169
+ |--------|-----------|-----------------|
2170
+ | **Purpose** | Alfred execution directives | Personal/project additional directives |
2171
+ | **Modification** | Not recommended | Freely modifiable |
2172
+ | **Updates** | Managed by MoAI | Managed by user |
2173
+ | **Git** | Committed | Optional (.gitignore possible) |
2174
+ | **Priority** | Base rules | Additional/override rules |
2175
+
2176
+ ### Core Rules (HARD Rules)
2177
+
2178
+ **HARD rules** defined in `CLAUDE.md` are always enforced:
2179
+
2180
+ 1. **Language-Aware Responses**: Respond in user's language
2181
+ 2. **Parallel Execution**: Execute independent tasks in parallel
2182
+ 3. **No XML in User Responses**: No XML tags in user-facing responses
2183
+
2184
+ These rules cannot be overridden even by `CLAUDE.local.md`.
2185
+
2186
+ ---
2187
+
2188
+ ## 14. MoAI Rank Introduction
2189
+
2190
+ **A new dimension of agentic coding**: Track your coding journey and compete with global developers!
2191
+
2192
+ ### Why MoAI Rank?
2193
+
2194
+ | Feature | Description |
2195
+ | ---------------------------- | ----------------------------------------- |
2196
+ | **📊 Token Tracking** | Automatic AI usage tracking per session |
2197
+ | **🏆 Global Leaderboard** | Daily/Weekly/Monthly/All-time rankings |
2198
+ | **🎭 Coding Style Analysis** | Discover your unique development patterns |
2199
+ | **📈 Dashboard** | Visualized statistics and insights |
2200
+
2201
+ ---
2202
+
2203
+ ### 🚀 CLI Commands
2204
+
2205
+ ```bash
2206
+ ❯ moai rank
2207
+ Usage: moai rank [OPTIONS] COMMAND [ARGS]...
2208
+
2209
+ MoAI Rank - Token usage leaderboard.
2210
+
2211
+ Track your Claude Code token usage and compete on the leaderboard.
2212
+ Visit https://rank.mo.ai.kr for the web dashboard.
2213
+
2214
+ Commands:
2215
+ register Register with MoAI Rank via GitHub OAuth.
2216
+ status Show your current rank and statistics.
2217
+ exclude Exclude a project from session tracking.
2218
+ include Re-include a previously excluded project.
2219
+ logout Remove stored MoAI Rank credentials.
2220
+ ```
2221
+
2222
+ ---
2223
+
2224
+ ### Step 1: GitHub OAuth Registration
2225
+
2226
+ ```bash
2227
+ ❯ moai rank register
2228
+
2229
+ ╭──────────────────────────── Registration ────────────────────────────╮
2230
+ │ MoAI Rank Registration │
2231
+ │ │
2232
+ │ This will open your browser to authorize with GitHub. │
2233
+ │ After authorization, your API key will be stored securely. │
2234
+ ╰──────────────────────────────────────────────────────────────────────╯
2235
+
2236
+ Opening browser for GitHub authorization...
2237
+ Waiting for authorization (timeout: 5 minutes)...
2238
+
2239
+ ╭───────────────────────── Registration Complete ──────────────────────╮
2240
+ │ Successfully registered as your-github-id │
2241
+ │ │
2242
+ │ API Key: moai_rank_a9011fac_c... │
2243
+ │ Stored in: ~/.moai/rank/credentials.json │
2244
+ ╰──────────────────────────────────────────────────────────────────────╯
2245
+
2246
+ ╭───────────────────────── Global Hook Installed ──────────────────────╮
2247
+ │ Session tracking hook installed globally. │
2248
+ │ │
2249
+ │ Your Claude Code sessions will be automatically tracked. │
2250
+ │ Hook location: ~/.claude/hooks/moai/session_end__rank_submit.py │
2251
+ │ │
2252
+ │ To exclude specific projects: │
2253
+ │ moai rank exclude /path/to/project │
2254
+ ╰──────────────────────────────────────────────────────────────────────╯
2255
+ ```
2256
+
2257
+ ---
2258
+
2259
+ ### Step 2: Sync Session Data
2260
+
2261
+ Sync your existing Claude Code session data to MoAI Rank.
2262
+
2263
+ ```bash
2264
+ ❯ moai rank sync
2265
+
2266
+ Syncing 2577 session(s) to MoAI Rank
2267
+ Phase 1: Parsing transcripts (parallel: 20 workers)
2268
+
2269
+ Parsing transcripts ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% (2577/2577)
2270
+
2271
+ Phase 2: Submitting 1873 session(s) (batch mode)
2272
+ Batch size: 100 | Batches: 19
2273
+
2274
+ Submitting batches ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% (19/19)
2275
+
2276
+ Sync Complete
2277
+ ✓ Submitted: 1169
2278
+ ○ Skipped: 704 (no usage or duplicate)
2279
+ ✗ Failed: 0
2280
+ ```
2281
+
2282
+ ---
2283
+
2284
+ ### Step 3: Check Your Rank
2285
+
2286
+ ```bash
2287
+ ❯ moai rank status
2288
+
2289
+ ╭────────────────────────────── MoAI Rank ─────────────────────────────╮
2290
+ │ your-github-id │
2291
+ │ │
2292
+ │ 🏆 Global Rank: #42 │
2293
+ ╰──────────────────────────────────────────────────────────────────────╯
2294
+ ╭───── Daily ──────╮ ╭───── Weekly ─────╮ ╭──── Monthly ─────╮ ╭──── All Time ────╮
2295
+ │ #12 │ │ #28 │ │ #42 │ │ #156 │
2296
+ ╰──────────────────╯ ╰──────────────────╯ ╰──────────────────╯ ╰──────────────────╯
2297
+ ╭─────────────────────────── Token Usage ──────────────────────────────╮
2298
+ │ 1,247,832 total tokens │
2299
+ │ │
2300
+ │ Input ██████████████░░░░░░ 847,291 (68%) │
2301
+ │ Output ██████░░░░░░░░░░░░░░ 400,541 (32%) │
2302
+ │ │
2303
+ │ Sessions: 47 │
2304
+ ╰──────────────────────────────────────────────────────────────────────╯
2305
+
2306
+ ● Hook: Installed | https://rank.mo.ai.kr
2307
+ ```
2308
+
2309
+ ---
2310
+
2311
+ ### Step 3: Web Dashboard
2312
+
2313
+ ![MoAI Rank Dashboard](./assets/images/readme/moai-rank-dashboard.png)
2314
+
2315
+ **[https://rank.mo.ai.kr](https://rank.mo.ai.kr)**
2316
+
2317
+ On the dashboard:
2318
+
2319
+ - Token usage trends
2320
+ - Tool usage statistics
2321
+ - Model-specific usage analysis
2322
+ - Weekly/monthly reports
2323
+
2324
+ 📖 **Details**: Refer to [modu-ai/moai-rank](https://github.com/modu-ai/moai-rank) repository.
2325
+
2326
+ ---
2327
+
2328
+ ### Step 4: Collected Metrics
2329
+
2330
+ | Metric | Description |
2331
+ | ---------------- | ----------------------------------- |
2332
+ | **Token Usage** | Input/output tokens, cache tokens |
2333
+ | **Tool Usage** | Read, Edit, Bash usage counts |
2334
+ | **Model Usage** | Opus, Sonnet, Haiku breakdown |
2335
+ | **Code Metrics** | Added/deleted lines, modified files |
2336
+ | **Session Info** | Duration, turn count, timestamps |
2337
+
2338
+ ### 🔒 Privacy Protection
2339
+
2340
+ ```bash
2341
+ # Exclude current project
2342
+ moai rank exclude
2343
+
2344
+ # Exclude specific path
2345
+ moai rank exclude /path/to/private
2346
+
2347
+ # Wildcard pattern
2348
+ moai rank exclude "*/confidential/*"
2349
+
2350
+ # List excluded
2351
+ moai rank list-excluded
2352
+ ```
2353
+
2354
+ **Guarantee**: Collected data is **numeric metrics only** (code content, file paths not transmitted)
2355
+
2356
+ ---
2357
+
2358
+ ## 15. FAQ 7 Questions
2359
+
2360
+ ### Q1: Is SPEC Always Required?
2361
+
2362
+ | Condition | SPEC Required |
2363
+ | -------------------- | ------------------- |
2364
+ | 1-2 files modified | Optional (can skip) |
2365
+ | 3-5 files modified | Recommended |
2366
+ | 10+ files modified | Required |
2367
+ | New feature addition | Recommended |
2368
+ | Bug fix | Optional |
2369
+
2370
+ ### Q2: What TAG Should I Use When Writing Code Without a SPEC?
2371
+
2372
+ TAG System v2.0 supports flexible development:
2373
+
2374
+ | Situation | Recommended TAG | SPEC Required? |
2375
+ | ---------------------- | -------------------- | -------------- |
2376
+ | Hotfix | `@SPEC SPEC-XXX related` | No |
2377
+ | Write tests first | `@TEST TEST-XXX` or `@SPEC SPEC-XXX verify` | No |
2378
+ | Implementation code | `@SPEC SPEC-XXX impl` | Yes (in enforce mode) |
2379
+ | Show dependency | `@SPEC SPEC-XXX depends` | No |
2380
+
2381
+ ### Q3: Is MCP Server Installation Required?
2382
+
2383
+ **Required (2)**:
2384
+
2385
+ - **Context7**: For latest library documentation and Skill reference generation
2386
+
2387
+ **Optional**:
2388
+
2389
+ - claude-in-chrome: Use Claude in browser and web automation testing
2390
+ - Playwright: Web automation testing
2391
+ - Figma: Design system
2392
+
2393
+ ### Q4: What's the Difference Between @TEST and @SPEC verify?
2394
+
2395
+ | Distinction | @TEST | @SPEC verify |
2396
+ | ----------- | ------------------------ | -------------------------- |
2397
+ | **Purpose** | Test identification | SPEC verification |
2398
+ | **SPEC link**| Optional | Required |
2399
+ | **Usage** | Independent tests | TDD (SPEC → impl → test) |
2400
+ | **Combined** | `@SPEC verify` + `@TEST` | Standalone |
2401
+
2402
+ ### Q5: Does MoAI Rank Cost Money?
2403
+
2404
+ It's free. Only automatically collects session data.
2405
+
2406
+ ### Q6: Is GLM Configuration Required?
2407
+
2408
+ No. You can use Claude only. However, it's recommended for cost savings.
2409
+
2410
+ ### Q7: Can It Be Applied to Existing Projects?
2411
+
2412
+ Yes. `moai init .` preserves existing files.
2413
+
2414
+ ---
2415
+
2416
+ ## 16. Community & Support
2417
+
2418
+ ### 🌐 Participate
2419
+
2420
+ - **Discord (Official)**: [https://discord.gg/umywNygN](https://discord.gg/umywNygN)
2421
+ - **GitHub**: [https://github.com/modu-ai/moai-adk](https://github.com/modu-ai/moai-adk)
2422
+ - **Developer Blog**: [https://goos.kim](https://goos.kim)
2423
+
2424
+ ### 🆘 Support
2425
+
2426
+ - Email: [support@mo.ai.kr](mailto:support@mo.ai.kr)
2427
+ - Documentation: [https://adk.mo.ai.kr](https://adk.mo.ai.kr)
2428
+
2429
+ ---
2430
+
2431
+ ## 📝 License
2432
+
2433
+ Copyleft License (COPYLEFT-3.0) - [LICENSE](./LICENSE)
2434
+
2435
+ ---
2436
+
2437
+ ## 🙏 Made with ❤️ by MoAI-ADK Team
2438
+
2439
+ **Last Updated:** 2026-01-13
2440
+ **Philosophy**: SPEC-First TDD + Agent Orchestration + Hybrid LLM
2441
+ **MoAI**: MoAI means "Modu-ui AI" (AI for Everyone).
2442
+
2443
+ > **"Infinite Possibilism - AI for All"**