moai-adk 0.15.0__py3-none-any.whl → 0.25.4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


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

Files changed (417) hide show
  1. moai_adk/__init__.py +1 -2
  2. moai_adk/__main__.py +85 -2
  3. moai_adk/cli/__init__.py +0 -1
  4. moai_adk/cli/commands/__init__.py +0 -1
  5. moai_adk/cli/commands/analyze.py +127 -0
  6. moai_adk/cli/commands/backup.py +5 -3
  7. moai_adk/cli/commands/doctor.py +35 -11
  8. moai_adk/cli/commands/improve_user_experience.py +348 -0
  9. moai_adk/cli/commands/init.py +150 -23
  10. moai_adk/cli/commands/language.py +269 -0
  11. moai_adk/cli/commands/migrate.py +158 -0
  12. moai_adk/cli/commands/status.py +13 -12
  13. moai_adk/cli/commands/update.py +364 -60
  14. moai_adk/cli/commands/validate_links.py +118 -0
  15. moai_adk/cli/main.py +3 -2
  16. moai_adk/cli/prompts/init_prompts.py +79 -82
  17. moai_adk/core/__init__.py +0 -1
  18. moai_adk/core/analysis/__init__.py +9 -0
  19. moai_adk/core/analysis/session_analyzer.py +439 -0
  20. moai_adk/core/claude_integration.py +421 -0
  21. moai_adk/core/command_helpers.py +270 -0
  22. moai_adk/core/config/__init__.py +6 -0
  23. moai_adk/core/config/auto_spec_config.py +346 -0
  24. moai_adk/core/config/migration.py +133 -12
  25. moai_adk/core/context_manager.py +279 -0
  26. moai_adk/core/diagnostics/slash_commands.py +0 -1
  27. moai_adk/core/error_recovery_system.py +1289 -0
  28. moai_adk/core/git/__init__.py +0 -1
  29. moai_adk/core/git/branch.py +0 -1
  30. moai_adk/core/git/branch_manager.py +4 -4
  31. moai_adk/core/git/checkpoint.py +1 -5
  32. moai_adk/core/git/commit.py +0 -1
  33. moai_adk/core/git/event_detector.py +3 -5
  34. moai_adk/core/git/manager.py +0 -1
  35. moai_adk/core/hooks/post_tool_auto_spec_completion.py +925 -0
  36. moai_adk/core/integration/__init__.py +22 -0
  37. moai_adk/core/integration/engine.py +169 -0
  38. moai_adk/core/integration/integration_tester.py +225 -0
  39. moai_adk/core/integration/models.py +88 -0
  40. moai_adk/core/integration/utils.py +211 -0
  41. moai_adk/core/issue_creator.py +28 -18
  42. moai_adk/core/language_config.py +202 -0
  43. moai_adk/core/language_validator.py +556 -0
  44. moai_adk/core/mcp/setup.py +113 -0
  45. moai_adk/core/migration/__init__.py +18 -0
  46. moai_adk/core/migration/backup_manager.py +208 -0
  47. moai_adk/core/migration/file_migrator.py +218 -0
  48. moai_adk/core/migration/version_detector.py +143 -0
  49. moai_adk/core/migration/version_migrator.py +228 -0
  50. moai_adk/core/performance/__init__.py +6 -0
  51. moai_adk/core/performance/cache_system.py +318 -0
  52. moai_adk/core/performance/parallel_processor.py +116 -0
  53. moai_adk/core/project/__init__.py +0 -1
  54. moai_adk/core/project/backup_utils.py +2 -7
  55. moai_adk/core/project/checker.py +3 -3
  56. moai_adk/core/project/detector.py +20 -40
  57. moai_adk/core/project/initializer.py +42 -17
  58. moai_adk/core/project/phase_executor.py +415 -58
  59. moai_adk/core/project/validator.py +6 -25
  60. moai_adk/core/quality/__init__.py +1 -1
  61. moai_adk/core/quality/trust_checker.py +64 -110
  62. moai_adk/core/quality/validators/__init__.py +1 -1
  63. moai_adk/core/quality/validators/base_validator.py +1 -1
  64. moai_adk/core/rollback_manager.py +993 -0
  65. moai_adk/core/session_manager.py +667 -0
  66. moai_adk/core/spec/confidence_scoring.py +749 -0
  67. moai_adk/core/spec/ears_template_engine.py +1182 -0
  68. moai_adk/core/spec/quality_validator.py +721 -0
  69. moai_adk/core/spec_status_manager.py +488 -0
  70. moai_adk/core/template/__init__.py +0 -1
  71. moai_adk/core/template/backup.py +41 -1
  72. moai_adk/core/template/config.py +11 -12
  73. moai_adk/core/template/languages.py +0 -1
  74. moai_adk/core/template/merger.py +79 -22
  75. moai_adk/core/template/processor.py +614 -40
  76. moai_adk/core/template_engine.py +36 -27
  77. moai_adk/foundation/git/commit_templates.py +565 -0
  78. moai_adk/foundation/trust/trust_principles.py +725 -0
  79. moai_adk/foundation/trust/validation_checklist.py +1678 -0
  80. moai_adk/statusline/__init__.py +38 -0
  81. moai_adk/statusline/alfred_detector.py +107 -0
  82. moai_adk/statusline/config.py +364 -0
  83. moai_adk/statusline/enhanced_output_style_detector.py +364 -0
  84. moai_adk/statusline/git_collector.py +190 -0
  85. moai_adk/statusline/main.py +228 -0
  86. moai_adk/statusline/metrics_tracker.py +78 -0
  87. moai_adk/statusline/renderer.py +327 -0
  88. moai_adk/statusline/update_checker.py +135 -0
  89. moai_adk/statusline/version_reader.py +647 -0
  90. moai_adk/templates/.git-hooks/pre-commit +66 -0
  91. moai_adk/templates/.git-hooks/pre-push +116 -4
  92. moai_adk/templates/.github/workflows/moai-gitflow.yml +1 -7
  93. moai_adk/templates/.github/workflows/spec-issue-sync.yml +0 -1
  94. moai_adk/templates/.gitignore +44 -0
  95. moai_adk/templates/.mcp.json +22 -0
  96. moai_adk/templates/CLAUDE.md +450 -1071
  97. moai_adk/utils/__init__.py +0 -1
  98. moai_adk/utils/banner.py +0 -1
  99. moai_adk/utils/common.py +308 -0
  100. moai_adk/utils/link_validator.py +249 -0
  101. moai_adk/utils/logger.py +4 -9
  102. moai_adk/utils/safe_file_reader.py +210 -0
  103. moai_adk/utils/user_experience.py +531 -0
  104. moai_adk-0.25.4.dist-info/METADATA +2279 -0
  105. moai_adk-0.25.4.dist-info/RECORD +112 -0
  106. moai_adk/core/tags/__init__.py +0 -86
  107. moai_adk/core/tags/ci_validator.py +0 -463
  108. moai_adk/core/tags/cli.py +0 -283
  109. moai_adk/core/tags/generator.py +0 -109
  110. moai_adk/core/tags/inserter.py +0 -99
  111. moai_adk/core/tags/mapper.py +0 -126
  112. moai_adk/core/tags/parser.py +0 -76
  113. moai_adk/core/tags/pre_commit_validator.py +0 -393
  114. moai_adk/core/tags/reporter.py +0 -956
  115. moai_adk/core/tags/tags.py +0 -149
  116. moai_adk/core/tags/validator.py +0 -897
  117. moai_adk/templates/.claude/agents/alfred/backend-expert.md +0 -319
  118. moai_adk/templates/.claude/agents/alfred/cc-manager.md +0 -316
  119. moai_adk/templates/.claude/agents/alfred/debug-helper.md +0 -208
  120. moai_adk/templates/.claude/agents/alfred/devops-expert.md +0 -464
  121. moai_adk/templates/.claude/agents/alfred/doc-syncer.md +0 -214
  122. moai_adk/templates/.claude/agents/alfred/frontend-expert.md +0 -357
  123. moai_adk/templates/.claude/agents/alfred/git-manager.md +0 -406
  124. moai_adk/templates/.claude/agents/alfred/implementation-planner.md +0 -423
  125. moai_adk/templates/.claude/agents/alfred/project-manager.md +0 -312
  126. moai_adk/templates/.claude/agents/alfred/quality-gate.md +0 -343
  127. moai_adk/templates/.claude/agents/alfred/skill-factory.md +0 -865
  128. moai_adk/templates/.claude/agents/alfred/spec-builder.md +0 -392
  129. moai_adk/templates/.claude/agents/alfred/tag-agent.md +0 -361
  130. moai_adk/templates/.claude/agents/alfred/tdd-implementer.md +0 -428
  131. moai_adk/templates/.claude/agents/alfred/trust-checker.md +0 -375
  132. moai_adk/templates/.claude/agents/alfred/ui-ux-expert.md +0 -571
  133. moai_adk/templates/.claude/commands/alfred/0-project.md +0 -1525
  134. moai_adk/templates/.claude/commands/alfred/1-plan.md +0 -802
  135. moai_adk/templates/.claude/commands/alfred/2-run.md +0 -709
  136. moai_adk/templates/.claude/commands/alfred/3-sync.md +0 -1009
  137. moai_adk/templates/.claude/commands/alfred/9-feedback.md +0 -149
  138. moai_adk/templates/.claude/hooks/alfred/core/project.py +0 -748
  139. moai_adk/templates/.claude/hooks/alfred/core/timeout.py +0 -136
  140. moai_adk/templates/.claude/hooks/alfred/core/ttl_cache.py +0 -108
  141. moai_adk/templates/.claude/hooks/alfred/core/version_cache.py +0 -198
  142. moai_adk/templates/.claude/hooks/alfred/handlers/__init__.py +0 -29
  143. moai_adk/templates/.claude/hooks/alfred/post_tool__log_changes.py +0 -94
  144. moai_adk/templates/.claude/hooks/alfred/pre_tool__auto_checkpoint.py +0 -100
  145. moai_adk/templates/.claude/hooks/alfred/session_end__cleanup.py +0 -94
  146. moai_adk/templates/.claude/hooks/alfred/session_start__show_project_info.py +0 -94
  147. moai_adk/templates/.claude/hooks/alfred/shared/core/__init__.py +0 -170
  148. moai_adk/templates/.claude/hooks/alfred/shared/core/checkpoint.py +0 -271
  149. moai_adk/templates/.claude/hooks/alfred/shared/core/context.py +0 -67
  150. moai_adk/templates/.claude/hooks/alfred/shared/core/project.py +0 -749
  151. moai_adk/templates/.claude/hooks/alfred/shared/core/tags.py +0 -230
  152. moai_adk/templates/.claude/hooks/alfred/shared/core/version_cache.py +0 -198
  153. moai_adk/templates/.claude/hooks/alfred/shared/handlers/__init__.py +0 -21
  154. moai_adk/templates/.claude/hooks/alfred/shared/handlers/notification.py +0 -154
  155. moai_adk/templates/.claude/hooks/alfred/shared/handlers/session.py +0 -174
  156. moai_adk/templates/.claude/hooks/alfred/shared/handlers/tool.py +0 -87
  157. moai_adk/templates/.claude/hooks/alfred/shared/handlers/user.py +0 -61
  158. moai_adk/templates/.claude/hooks/alfred/user_prompt__jit_load_docs.py +0 -112
  159. moai_adk/templates/.claude/hooks/alfred/utils/__init__.py +0 -1
  160. moai_adk/templates/.claude/hooks/alfred/utils/timeout.py +0 -161
  161. moai_adk/templates/.claude/settings.json +0 -144
  162. moai_adk/templates/.claude/skills/moai-alfred-agent-guide/SKILL.md +0 -70
  163. moai_adk/templates/.claude/skills/moai-alfred-agent-guide/examples.md +0 -62
  164. moai_adk/templates/.claude/skills/moai-alfred-agent-guide/reference.md +0 -242
  165. moai_adk/templates/.claude/skills/moai-alfred-config-schema/SKILL.md +0 -56
  166. moai_adk/templates/.claude/skills/moai-alfred-config-schema/examples.md +0 -28
  167. moai_adk/templates/.claude/skills/moai-alfred-config-schema/reference.md +0 -444
  168. moai_adk/templates/.claude/skills/moai-alfred-context-budget/SKILL.md +0 -62
  169. moai_adk/templates/.claude/skills/moai-alfred-context-budget/examples.md +0 -28
  170. moai_adk/templates/.claude/skills/moai-alfred-context-budget/reference.md +0 -405
  171. moai_adk/templates/.claude/skills/moai-alfred-dev-guide/SKILL.md +0 -51
  172. moai_adk/templates/.claude/skills/moai-alfred-dev-guide/examples.md +0 -355
  173. moai_adk/templates/.claude/skills/moai-alfred-dev-guide/reference.md +0 -239
  174. moai_adk/templates/.claude/skills/moai-alfred-ears-authoring/SKILL.md +0 -113
  175. moai_adk/templates/.claude/skills/moai-alfred-ears-authoring/examples.md +0 -29
  176. moai_adk/templates/.claude/skills/moai-alfred-ears-authoring/reference.md +0 -28
  177. moai_adk/templates/.claude/skills/moai-alfred-expertise-detection/SKILL.md +0 -323
  178. moai_adk/templates/.claude/skills/moai-alfred-expertise-detection/examples.md +0 -286
  179. moai_adk/templates/.claude/skills/moai-alfred-expertise-detection/reference.md +0 -126
  180. moai_adk/templates/.claude/skills/moai-alfred-git-workflow/SKILL.md +0 -122
  181. moai_adk/templates/.claude/skills/moai-alfred-git-workflow/examples.md +0 -29
  182. moai_adk/templates/.claude/skills/moai-alfred-git-workflow/reference.md +0 -29
  183. moai_adk/templates/.claude/skills/moai-alfred-gitflow-policy/SKILL.md +0 -74
  184. moai_adk/templates/.claude/skills/moai-alfred-gitflow-policy/examples.md +0 -4
  185. moai_adk/templates/.claude/skills/moai-alfred-gitflow-policy/reference.md +0 -269
  186. moai_adk/templates/.claude/skills/moai-alfred-interactive-questions/SKILL.md +0 -237
  187. moai_adk/templates/.claude/skills/moai-alfred-interactive-questions/examples.md +0 -615
  188. moai_adk/templates/.claude/skills/moai-alfred-interactive-questions/reference.md +0 -653
  189. moai_adk/templates/.claude/skills/moai-alfred-issue-labels/SKILL.md +0 -19
  190. moai_adk/templates/.claude/skills/moai-alfred-issue-labels/examples.md +0 -4
  191. moai_adk/templates/.claude/skills/moai-alfred-issue-labels/reference.md +0 -150
  192. moai_adk/templates/.claude/skills/moai-alfred-language-detection/SKILL.md +0 -113
  193. moai_adk/templates/.claude/skills/moai-alfred-language-detection/examples.md +0 -29
  194. moai_adk/templates/.claude/skills/moai-alfred-language-detection/reference.md +0 -28
  195. moai_adk/templates/.claude/skills/moai-alfred-persona-roles/SKILL.md +0 -198
  196. moai_adk/templates/.claude/skills/moai-alfred-persona-roles/examples.md +0 -431
  197. moai_adk/templates/.claude/skills/moai-alfred-persona-roles/reference.md +0 -141
  198. moai_adk/templates/.claude/skills/moai-alfred-practices/SKILL.md +0 -89
  199. moai_adk/templates/.claude/skills/moai-alfred-practices/examples.md +0 -122
  200. moai_adk/templates/.claude/skills/moai-alfred-practices/reference.md +0 -369
  201. moai_adk/templates/.claude/skills/moai-alfred-proactive-suggestions/SKILL.md +0 -508
  202. moai_adk/templates/.claude/skills/moai-alfred-proactive-suggestions/examples.md +0 -481
  203. moai_adk/templates/.claude/skills/moai-alfred-proactive-suggestions/reference.md +0 -100
  204. moai_adk/templates/.claude/skills/moai-alfred-reporting/SKILL.md +0 -273
  205. moai_adk/templates/.claude/skills/moai-alfred-rules/SKILL.md +0 -77
  206. moai_adk/templates/.claude/skills/moai-alfred-rules/examples.md +0 -265
  207. moai_adk/templates/.claude/skills/moai-alfred-rules/reference.md +0 -539
  208. moai_adk/templates/.claude/skills/moai-alfred-session-state/SKILL.md +0 -19
  209. moai_adk/templates/.claude/skills/moai-alfred-session-state/examples.md +0 -4
  210. moai_adk/templates/.claude/skills/moai-alfred-session-state/reference.md +0 -84
  211. moai_adk/templates/.claude/skills/moai-alfred-spec-authoring/README.md +0 -137
  212. moai_adk/templates/.claude/skills/moai-alfred-spec-authoring/SKILL.md +0 -219
  213. moai_adk/templates/.claude/skills/moai-alfred-spec-authoring/examples/validate-spec.sh +0 -161
  214. moai_adk/templates/.claude/skills/moai-alfred-spec-authoring/examples.md +0 -541
  215. moai_adk/templates/.claude/skills/moai-alfred-spec-authoring/reference.md +0 -622
  216. moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-extended/SKILL.md +0 -115
  217. moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-extended/examples.md +0 -4
  218. moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-extended/reference.md +0 -348
  219. moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-validation/SKILL.md +0 -113
  220. moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-validation/examples.md +0 -29
  221. moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-validation/reference.md +0 -28
  222. moai_adk/templates/.claude/skills/moai-alfred-tag-scanning/SKILL.md +0 -113
  223. moai_adk/templates/.claude/skills/moai-alfred-tag-scanning/examples.md +0 -29
  224. moai_adk/templates/.claude/skills/moai-alfred-tag-scanning/reference.md +0 -28
  225. moai_adk/templates/.claude/skills/moai-alfred-todowrite-pattern/SKILL.md +0 -19
  226. moai_adk/templates/.claude/skills/moai-alfred-todowrite-pattern/examples.md +0 -4
  227. moai_adk/templates/.claude/skills/moai-alfred-todowrite-pattern/reference.md +0 -211
  228. moai_adk/templates/.claude/skills/moai-alfred-trust-validation/SKILL.md +0 -113
  229. moai_adk/templates/.claude/skills/moai-alfred-trust-validation/examples.md +0 -29
  230. moai_adk/templates/.claude/skills/moai-alfred-trust-validation/reference.md +0 -28
  231. moai_adk/templates/.claude/skills/moai-alfred-workflow/SKILL.md +0 -288
  232. moai_adk/templates/.claude/skills/moai-cc-agents/SKILL.md +0 -269
  233. moai_adk/templates/.claude/skills/moai-cc-agents/templates/agent-template.md +0 -32
  234. moai_adk/templates/.claude/skills/moai-cc-claude-md/SKILL.md +0 -298
  235. moai_adk/templates/.claude/skills/moai-cc-claude-md/templates/CLAUDE-template.md +0 -26
  236. moai_adk/templates/.claude/skills/moai-cc-commands/SKILL.md +0 -307
  237. moai_adk/templates/.claude/skills/moai-cc-commands/templates/command-template.md +0 -21
  238. moai_adk/templates/.claude/skills/moai-cc-hooks/SKILL.md +0 -252
  239. moai_adk/templates/.claude/skills/moai-cc-hooks/scripts/pre-bash-check.sh +0 -19
  240. moai_adk/templates/.claude/skills/moai-cc-hooks/scripts/preserve-permissions.sh +0 -19
  241. moai_adk/templates/.claude/skills/moai-cc-hooks/scripts/validate-bash-command.py +0 -24
  242. moai_adk/templates/.claude/skills/moai-cc-mcp-plugins/SKILL.md +0 -199
  243. moai_adk/templates/.claude/skills/moai-cc-mcp-plugins/templates/settings-mcp-template.json +0 -39
  244. moai_adk/templates/.claude/skills/moai-cc-memory/SKILL.md +0 -316
  245. moai_adk/templates/.claude/skills/moai-cc-memory/templates/session-summary-template.md +0 -18
  246. moai_adk/templates/.claude/skills/moai-cc-settings/SKILL.md +0 -263
  247. moai_adk/templates/.claude/skills/moai-cc-settings/templates/settings-complete-template.json +0 -30
  248. moai_adk/templates/.claude/skills/moai-cc-skill-descriptions/SKILL.md +0 -19
  249. moai_adk/templates/.claude/skills/moai-cc-skill-descriptions/examples.md +0 -4
  250. moai_adk/templates/.claude/skills/moai-cc-skill-descriptions/reference.md +0 -218
  251. moai_adk/templates/.claude/skills/moai-cc-skill-factory/CHECKLIST.md +0 -482
  252. moai_adk/templates/.claude/skills/moai-cc-skill-factory/EXAMPLES.md +0 -278
  253. moai_adk/templates/.claude/skills/moai-cc-skill-factory/INTERACTIVE-DISCOVERY.md +0 -524
  254. moai_adk/templates/.claude/skills/moai-cc-skill-factory/METADATA.md +0 -477
  255. moai_adk/templates/.claude/skills/moai-cc-skill-factory/PARALLEL-ANALYSIS-REPORT.md +0 -429
  256. moai_adk/templates/.claude/skills/moai-cc-skill-factory/PYTHON-VERSION-MATRIX.md +0 -391
  257. moai_adk/templates/.claude/skills/moai-cc-skill-factory/SKILL-FACTORY-WORKFLOW.md +0 -431
  258. moai_adk/templates/.claude/skills/moai-cc-skill-factory/SKILL-UPDATE-ADVISOR.md +0 -577
  259. moai_adk/templates/.claude/skills/moai-cc-skill-factory/SKILL.md +0 -271
  260. moai_adk/templates/.claude/skills/moai-cc-skill-factory/STEP-BY-STEP-GUIDE.md +0 -466
  261. moai_adk/templates/.claude/skills/moai-cc-skill-factory/STRUCTURE.md +0 -583
  262. moai_adk/templates/.claude/skills/moai-cc-skill-factory/WEB-RESEARCH.md +0 -526
  263. moai_adk/templates/.claude/skills/moai-cc-skill-factory/reference.md +0 -465
  264. moai_adk/templates/.claude/skills/moai-cc-skill-factory/scripts/generate-structure.sh +0 -328
  265. moai_adk/templates/.claude/skills/moai-cc-skill-factory/scripts/validate-skill.sh +0 -312
  266. moai_adk/templates/.claude/skills/moai-cc-skill-factory/templates/SKILL_TEMPLATE.md +0 -245
  267. moai_adk/templates/.claude/skills/moai-cc-skill-factory/templates/examples-template.md +0 -285
  268. moai_adk/templates/.claude/skills/moai-cc-skill-factory/templates/reference-template.md +0 -278
  269. moai_adk/templates/.claude/skills/moai-cc-skill-factory/templates/scripts-template.sh +0 -303
  270. moai_adk/templates/.claude/skills/moai-cc-skills/SKILL.md +0 -291
  271. moai_adk/templates/.claude/skills/moai-cc-skills/templates/SKILL-template.md +0 -15
  272. moai_adk/templates/.claude/skills/moai-design-systems/SKILL.md +0 -802
  273. moai_adk/templates/.claude/skills/moai-design-systems/examples.md +0 -1238
  274. moai_adk/templates/.claude/skills/moai-design-systems/reference.md +0 -673
  275. moai_adk/templates/.claude/skills/moai-domain-backend/SKILL.md +0 -290
  276. moai_adk/templates/.claude/skills/moai-domain-backend/examples.md +0 -1633
  277. moai_adk/templates/.claude/skills/moai-domain-backend/reference.md +0 -660
  278. moai_adk/templates/.claude/skills/moai-domain-cli-tool/SKILL.md +0 -123
  279. moai_adk/templates/.claude/skills/moai-domain-cli-tool/examples.md +0 -29
  280. moai_adk/templates/.claude/skills/moai-domain-cli-tool/reference.md +0 -30
  281. moai_adk/templates/.claude/skills/moai-domain-data-science/SKILL.md +0 -123
  282. moai_adk/templates/.claude/skills/moai-domain-data-science/examples.md +0 -29
  283. moai_adk/templates/.claude/skills/moai-domain-data-science/reference.md +0 -30
  284. moai_adk/templates/.claude/skills/moai-domain-database/SKILL.md +0 -123
  285. moai_adk/templates/.claude/skills/moai-domain-database/examples.md +0 -29
  286. moai_adk/templates/.claude/skills/moai-domain-database/reference.md +0 -30
  287. moai_adk/templates/.claude/skills/moai-domain-devops/SKILL.md +0 -124
  288. moai_adk/templates/.claude/skills/moai-domain-devops/examples.md +0 -29
  289. moai_adk/templates/.claude/skills/moai-domain-devops/reference.md +0 -31
  290. moai_adk/templates/.claude/skills/moai-domain-frontend/SKILL.md +0 -128
  291. moai_adk/templates/.claude/skills/moai-domain-frontend/examples.md +0 -29
  292. moai_adk/templates/.claude/skills/moai-domain-frontend/reference.md +0 -31
  293. moai_adk/templates/.claude/skills/moai-domain-ml/SKILL.md +0 -123
  294. moai_adk/templates/.claude/skills/moai-domain-ml/examples.md +0 -29
  295. moai_adk/templates/.claude/skills/moai-domain-ml/reference.md +0 -30
  296. moai_adk/templates/.claude/skills/moai-domain-mobile-app/SKILL.md +0 -123
  297. moai_adk/templates/.claude/skills/moai-domain-mobile-app/examples.md +0 -29
  298. moai_adk/templates/.claude/skills/moai-domain-mobile-app/reference.md +0 -30
  299. moai_adk/templates/.claude/skills/moai-domain-security/SKILL.md +0 -123
  300. moai_adk/templates/.claude/skills/moai-domain-security/examples.md +0 -29
  301. moai_adk/templates/.claude/skills/moai-domain-security/reference.md +0 -30
  302. moai_adk/templates/.claude/skills/moai-domain-web-api/SKILL.md +0 -123
  303. moai_adk/templates/.claude/skills/moai-domain-web-api/examples.md +0 -29
  304. moai_adk/templates/.claude/skills/moai-domain-web-api/reference.md +0 -30
  305. moai_adk/templates/.claude/skills/moai-essentials-debug/SKILL.md +0 -303
  306. moai_adk/templates/.claude/skills/moai-essentials-debug/examples.md +0 -1064
  307. moai_adk/templates/.claude/skills/moai-essentials-debug/reference.md +0 -1047
  308. moai_adk/templates/.claude/skills/moai-essentials-perf/SKILL.md +0 -113
  309. moai_adk/templates/.claude/skills/moai-essentials-perf/examples.md +0 -29
  310. moai_adk/templates/.claude/skills/moai-essentials-perf/reference.md +0 -28
  311. moai_adk/templates/.claude/skills/moai-essentials-refactor/SKILL.md +0 -113
  312. moai_adk/templates/.claude/skills/moai-essentials-refactor/examples.md +0 -29
  313. moai_adk/templates/.claude/skills/moai-essentials-refactor/reference.md +0 -28
  314. moai_adk/templates/.claude/skills/moai-essentials-review/SKILL.md +0 -113
  315. moai_adk/templates/.claude/skills/moai-essentials-review/examples.md +0 -29
  316. moai_adk/templates/.claude/skills/moai-essentials-review/reference.md +0 -28
  317. moai_adk/templates/.claude/skills/moai-foundation-ears/SKILL.md +0 -116
  318. moai_adk/templates/.claude/skills/moai-foundation-ears/examples.md +0 -29
  319. moai_adk/templates/.claude/skills/moai-foundation-ears/reference.md +0 -28
  320. moai_adk/templates/.claude/skills/moai-foundation-git/SKILL.md +0 -122
  321. moai_adk/templates/.claude/skills/moai-foundation-git/examples.md +0 -29
  322. moai_adk/templates/.claude/skills/moai-foundation-git/reference.md +0 -29
  323. moai_adk/templates/.claude/skills/moai-foundation-langs/SKILL.md +0 -113
  324. moai_adk/templates/.claude/skills/moai-foundation-langs/examples.md +0 -29
  325. moai_adk/templates/.claude/skills/moai-foundation-langs/reference.md +0 -28
  326. moai_adk/templates/.claude/skills/moai-foundation-specs/SKILL.md +0 -113
  327. moai_adk/templates/.claude/skills/moai-foundation-specs/examples.md +0 -29
  328. moai_adk/templates/.claude/skills/moai-foundation-specs/reference.md +0 -28
  329. moai_adk/templates/.claude/skills/moai-foundation-tags/SKILL.md +0 -113
  330. moai_adk/templates/.claude/skills/moai-foundation-tags/examples.md +0 -29
  331. moai_adk/templates/.claude/skills/moai-foundation-tags/reference.md +0 -28
  332. moai_adk/templates/.claude/skills/moai-foundation-trust/SKILL.md +0 -307
  333. moai_adk/templates/.claude/skills/moai-foundation-trust/examples.md +0 -0
  334. moai_adk/templates/.claude/skills/moai-foundation-trust/reference.md +0 -1099
  335. moai_adk/templates/.claude/skills/moai-lang-c/SKILL.md +0 -124
  336. moai_adk/templates/.claude/skills/moai-lang-c/examples.md +0 -29
  337. moai_adk/templates/.claude/skills/moai-lang-c/reference.md +0 -31
  338. moai_adk/templates/.claude/skills/moai-lang-cpp/SKILL.md +0 -124
  339. moai_adk/templates/.claude/skills/moai-lang-cpp/examples.md +0 -29
  340. moai_adk/templates/.claude/skills/moai-lang-cpp/reference.md +0 -31
  341. moai_adk/templates/.claude/skills/moai-lang-csharp/SKILL.md +0 -123
  342. moai_adk/templates/.claude/skills/moai-lang-csharp/examples.md +0 -29
  343. moai_adk/templates/.claude/skills/moai-lang-csharp/reference.md +0 -30
  344. moai_adk/templates/.claude/skills/moai-lang-dart/SKILL.md +0 -123
  345. moai_adk/templates/.claude/skills/moai-lang-dart/examples.md +0 -29
  346. moai_adk/templates/.claude/skills/moai-lang-dart/reference.md +0 -30
  347. moai_adk/templates/.claude/skills/moai-lang-go/SKILL.md +0 -127
  348. moai_adk/templates/.claude/skills/moai-lang-go/examples.md +0 -29
  349. moai_adk/templates/.claude/skills/moai-lang-go/reference.md +0 -31
  350. moai_adk/templates/.claude/skills/moai-lang-java/SKILL.md +0 -126
  351. moai_adk/templates/.claude/skills/moai-lang-java/examples.md +0 -29
  352. moai_adk/templates/.claude/skills/moai-lang-java/reference.md +0 -31
  353. moai_adk/templates/.claude/skills/moai-lang-javascript/SKILL.md +0 -125
  354. moai_adk/templates/.claude/skills/moai-lang-javascript/examples.md +0 -29
  355. moai_adk/templates/.claude/skills/moai-lang-javascript/reference.md +0 -32
  356. moai_adk/templates/.claude/skills/moai-lang-kotlin/SKILL.md +0 -124
  357. moai_adk/templates/.claude/skills/moai-lang-kotlin/examples.md +0 -29
  358. moai_adk/templates/.claude/skills/moai-lang-kotlin/reference.md +0 -31
  359. moai_adk/templates/.claude/skills/moai-lang-php/SKILL.md +0 -126
  360. moai_adk/templates/.claude/skills/moai-lang-php/examples.md +0 -29
  361. moai_adk/templates/.claude/skills/moai-lang-php/reference.md +0 -30
  362. moai_adk/templates/.claude/skills/moai-lang-python/SKILL.md +0 -433
  363. moai_adk/templates/.claude/skills/moai-lang-python/examples.md +0 -624
  364. moai_adk/templates/.claude/skills/moai-lang-python/reference.md +0 -316
  365. moai_adk/templates/.claude/skills/moai-lang-r/SKILL.md +0 -123
  366. moai_adk/templates/.claude/skills/moai-lang-r/examples.md +0 -29
  367. moai_adk/templates/.claude/skills/moai-lang-r/reference.md +0 -30
  368. moai_adk/templates/.claude/skills/moai-lang-ruby/SKILL.md +0 -124
  369. moai_adk/templates/.claude/skills/moai-lang-ruby/examples.md +0 -29
  370. moai_adk/templates/.claude/skills/moai-lang-ruby/reference.md +0 -31
  371. moai_adk/templates/.claude/skills/moai-lang-rust/SKILL.md +0 -127
  372. moai_adk/templates/.claude/skills/moai-lang-rust/examples.md +0 -29
  373. moai_adk/templates/.claude/skills/moai-lang-rust/reference.md +0 -31
  374. moai_adk/templates/.claude/skills/moai-lang-scala/SKILL.md +0 -125
  375. moai_adk/templates/.claude/skills/moai-lang-scala/examples.md +0 -29
  376. moai_adk/templates/.claude/skills/moai-lang-scala/reference.md +0 -30
  377. moai_adk/templates/.claude/skills/moai-lang-shell/SKILL.md +0 -123
  378. moai_adk/templates/.claude/skills/moai-lang-shell/examples.md +0 -29
  379. moai_adk/templates/.claude/skills/moai-lang-shell/reference.md +0 -30
  380. moai_adk/templates/.claude/skills/moai-lang-sql/SKILL.md +0 -124
  381. moai_adk/templates/.claude/skills/moai-lang-sql/examples.md +0 -29
  382. moai_adk/templates/.claude/skills/moai-lang-sql/reference.md +0 -31
  383. moai_adk/templates/.claude/skills/moai-lang-swift/SKILL.md +0 -123
  384. moai_adk/templates/.claude/skills/moai-lang-swift/examples.md +0 -29
  385. moai_adk/templates/.claude/skills/moai-lang-swift/reference.md +0 -30
  386. moai_adk/templates/.claude/skills/moai-lang-typescript/SKILL.md +0 -133
  387. moai_adk/templates/.claude/skills/moai-lang-typescript/examples.md +0 -29
  388. moai_adk/templates/.claude/skills/moai-lang-typescript/reference.md +0 -34
  389. moai_adk/templates/.claude/skills/moai-project-documentation.md +0 -622
  390. moai_adk/templates/.github/workflows/c-tag-validation.yml +0 -11
  391. moai_adk/templates/.github/workflows/cpp-tag-validation.yml +0 -11
  392. moai_adk/templates/.github/workflows/csharp-tag-validation.yml +0 -11
  393. moai_adk/templates/.github/workflows/dart-tag-validation.yml +0 -11
  394. moai_adk/templates/.github/workflows/go-tag-validation.yml +0 -130
  395. moai_adk/templates/.github/workflows/java-tag-validation.yml +0 -11
  396. moai_adk/templates/.github/workflows/javascript-tag-validation.yml +0 -135
  397. moai_adk/templates/.github/workflows/kotlin-tag-validation.yml +0 -11
  398. moai_adk/templates/.github/workflows/php-tag-validation.yml +0 -11
  399. moai_adk/templates/.github/workflows/python-tag-validation.yml +0 -118
  400. moai_adk/templates/.github/workflows/release.yml +0 -118
  401. moai_adk/templates/.github/workflows/ruby-tag-validation.yml +0 -11
  402. moai_adk/templates/.github/workflows/rust-tag-validation.yml +0 -11
  403. moai_adk/templates/.github/workflows/shell-tag-validation.yml +0 -11
  404. moai_adk/templates/.github/workflows/swift-tag-validation.yml +0 -11
  405. moai_adk/templates/.github/workflows/tag-report.yml +0 -269
  406. moai_adk/templates/.github/workflows/tag-validation.yml +0 -186
  407. moai_adk/templates/.github/workflows/typescript-tag-validation.yml +0 -154
  408. moai_adk/templates/.moai/config.json +0 -115
  409. moai_adk/templates/workflows/go-tag-validation.yml +0 -30
  410. moai_adk/templates/workflows/javascript-tag-validation.yml +0 -41
  411. moai_adk/templates/workflows/python-tag-validation.yml +0 -42
  412. moai_adk/templates/workflows/typescript-tag-validation.yml +0 -31
  413. moai_adk-0.15.0.dist-info/METADATA +0 -3079
  414. moai_adk-0.15.0.dist-info/RECORD +0 -365
  415. {moai_adk-0.15.0.dist-info → moai_adk-0.25.4.dist-info}/WHEEL +0 -0
  416. {moai_adk-0.15.0.dist-info → moai_adk-0.25.4.dist-info}/entry_points.txt +0 -0
  417. {moai_adk-0.15.0.dist-info → moai_adk-0.25.4.dist-info}/licenses/LICENSE +0 -0
@@ -1,1525 +0,0 @@
1
- ---
2
- name: alfred:0-project
3
- description: "Initialize project metadata and documentation"
4
- allowed-tools:
5
- - Read
6
- - Write
7
- - Edit
8
- - MultiEdit
9
- - Grep
10
- - Glob
11
- - TodoWrite
12
- - Bash(ls:*)
13
- - Bash(find:*)
14
- - Bash(cat:*)
15
- - Task
16
- ---
17
-
18
- # 📋 MoAI-ADK Step 0: Initialize/Update Universal Language Support Project Documentation
19
- > **Note**: Interactive prompts use `AskUserQuestion tool (documented in moai-alfred-interactive-questions skill)` for TUI selection menus. The skill is loaded on-demand when user interaction is required.
20
-
21
- ## 🎯 Command Purpose
22
-
23
- Automatically analyzes the project environment to create/update product/structure/tech.md documents and configure language-specific optimization settings.
24
-
25
- ## 📋 Execution flow
26
-
27
- 0. **Conversation Language Selection**: User selects the language for all dialogs and documentation
28
- 1. **Environment Analysis**: Automatically detect project type (new/legacy) and codebase language
29
- 2. **Establishment of interview strategy**: Select question tree suited to project characteristics
30
- 3. **User Verification**: Review and approve interview plan
31
- 4. **Create project documentation**: Create product/structure/tech.md in the selected language
32
- 5. **Create configuration file**: config.json auto-configuration
33
-
34
- ## 🧠 Associated Skills & Agents
35
-
36
- | Agent | Core Skill | Purpose |
37
- | --------------- | -------------------------------- | --------------------------------------------- |
38
- | project-manager | `moai-alfred-language-detection` | Initialize project and interview requirements |
39
- | trust-checker | `moai-alfred-trust-validation` | Verify initial project structure (optional) |
40
-
41
- **Note**: TUI Survey Skill is used for user confirmations during project initialization and is shared across all interactive prompts.
42
-
43
- ## 🔗 Associated Agent
44
-
45
- - **Primary**: project-manager (📋 planner) - Dedicated to project initialization
46
- - **Quality Check**: trust-checker (✅ Quality assurance lead) - Initial structural verification (optional)
47
- - **Secondary**: None (standalone execution)
48
-
49
- ## 💡 Example of use
50
-
51
- The user executes the `/alfred:8-project` command to analyze the project and create/update documents.
52
-
53
- ## Command Overview
54
-
55
- It is a systematic initialization system that analyzes the project environment and creates/updates product/structure/tech.md documents.
56
-
57
- - **Automatically detect language**: Automatically recognize Python, TypeScript, Java, Go, Rust, etc.
58
- - **Project type classification**: Automatically determine new vs. existing projects
59
- - **High-performance initialization**: Achieve 0.18 second initialization with TypeScript-based CLI
60
- - **2-step workflow**: 1) Analysis and planning → 2) Execution after user approval
61
-
62
- ## How to use
63
-
64
- The user executes the `/alfred:8-project` command to start analyzing the project and creating/updating documents.
65
-
66
- **Automatic processing**:
67
- - Update mode if there is an existing `.moai/project/` document
68
- - New creation mode if there is no document
69
- - Automatic detection of language and project type
70
-
71
- ## ⚠️ Prohibitions
72
-
73
- **What you should never do**:
74
-
75
- - ❌ Create a file in the `.claude/memory/` directory
76
- - ❌ Create a file `.claude/commands/alfred/*.json`
77
- - ❌ Unnecessary overwriting of existing documents
78
- - ❌ Date and numerical prediction ("within 3 months", "50% reduction") etc.)
79
- - ❌ Hypothetical scenarios, expected market size, future technology trend predictions
80
-
81
- **Expressions to use**:
82
-
83
- - ✅ "High/medium/low priority"
84
- - ✅ "Immediately needed", "step-by-step improvements"
85
- - ✅ Current facts
86
- - ✅ Existing technology stack
87
- - ✅ Real problems
88
-
89
- ---
90
-
91
- ## 🚀 STEP 0: 초기 설정 - 언어 및 사용자 정보 선택
92
-
93
- **목적**: 프로젝트 초기화 시작 전에 대화 언어를 설정하고 사용자 닉네임을 등록합니다. 이 설정은 모든 Alfred 프롬프트, 인터뷰 질문 및 생성된 문서에 적용됩니다.
94
-
95
- **UX 개선**: 2개 질문을 **1회 배치 호출**로 통합 (50% 상호작용 감소: 2 turns → 1 turn)
96
-
97
- ### 0.0 Alfred 자기소개 및 환영 인사
98
-
99
- Alfred가 첫 상호작용으로 다음과 같이 인사합니다:
100
-
101
- ```
102
- 안녕하세요! 👋 저는 Alfred입니다.
103
- MoAI-ADK의 SuperAgent로서 당신의 프로젝트를 함께 만들어갈 준비가 되어 있습니다.
104
-
105
- 앞으로의 모든 대화에서 당신을 편하게 부르기 위해,
106
- 먼저 기본 설정을 진행하겠습니다.
107
- ```
108
-
109
- ### 0.1 배치 설계: 언어 선택 + 사용자 닉네임 + GitHub 설정 확인 (1-3회 호출)
110
-
111
- Alfred가 `AskUserQuestion tool (documented in moai-alfred-interactive-questions skill)` 를 사용하여 **배치 호출**로 필수 정보를 수집합니다:
112
-
113
- **기본 배치 (항상 실행)**:
114
- - 언어 선택
115
- - 사용자 닉네임
116
-
117
- **추가 배치 (팀 모드 감지 시)**:
118
- - GitHub "Automatically delete head branches" 설정 확인
119
-
120
- #### 0.1.1 팀 모드 감지
121
-
122
- ```bash
123
- # config.json에서 mode 확인
124
- grep "mode" .moai/config.json
125
-
126
- # 결과: "mode": "team" → 추가 질문 포함
127
- # "mode": "personal" → 기본 질문만 실행
128
- ```
129
-
130
- #### 0.1.2 기본 배치: 언어 선택 + 에이전트 프롬프트 언어 + 닉네임 (3개 질문, 1회 배치 호출)
131
-
132
- **배치 설계**: 3개 질문을 1회 호출로 통합 (UX 개선: 3 turns → 1 turn)
133
-
134
- **Example AskUserQuestion Call**:
135
- ```python
136
- AskUserQuestion(
137
- questions=[
138
- {
139
- "question": "Which language would you like to use for the project initialization and documentation?",
140
- "header": "Language",
141
- "multiSelect": false,
142
- "options": [
143
- {
144
- "label": "🌍 English",
145
- "description": "All dialogs and documentation in English"
146
- },
147
- {
148
- "label": "🇰🇷 한국어",
149
- "description": "All dialogs and documentation in Korean"
150
- },
151
- {
152
- "label": "🇯🇵 日本語",
153
- "description": "All dialogs and documentation in Japanese"
154
- },
155
- {
156
- "label": "🇨🇳 中文",
157
- "description": "All dialogs and documentation in Chinese"
158
- }
159
- ]
160
- },
161
- {
162
- "question": "In which language should Alfred's sub-agent prompts be written?",
163
- "header": "Agent Prompt Language",
164
- "multiSelect": false,
165
- "options": [
166
- {
167
- "label": "🌐 English (Global Standard)",
168
- "description": "All sub-agent prompts in English for global consistency and team collaboration. Recommended for Claude Pro $20 users: reduces token usage by ~15-20%, lowering API costs"
169
- },
170
- {
171
- "label": "🗣️ Selected Language (Localized)",
172
- "description": "All sub-agent prompts in the language you selected above for local team efficiency"
173
- }
174
- ]
175
- },
176
- {
177
- "question": "How would you like to be called in our conversations? (e.g., GOOS, Team Lead, Developer, or custom name - max 20 chars)",
178
- "header": "Nickname",
179
- "multiSelect": false,
180
- "options": [
181
- {
182
- "label": "Enter custom nickname",
183
- "description": "Type your preferred name using the 'Other' option below"
184
- }
185
- ]
186
- }
187
- ]
188
- )
189
- ```
190
-
191
- **응답 처리**:
192
-
193
- **Q1 (사용자 언어)**:
194
- - Selected option stored as: `conversation_language: "ko"` (or "en", "ja", "zh", etc.)
195
-
196
- **Q2 (에이전트 프롬프트 언어)** - **NEW**:
197
- - **"English (Global Standard)"** → `agent_prompt_language: "english"`
198
- - All sub-agent prompts written in English
199
- - Recommended for global teams, code consistency, and international collaboration
200
- - Project-manager, spec-builder, code-builder use English prompts internally
201
- - **"Selected Language (Localized)"** → `agent_prompt_language: "localized"`
202
- - All sub-agent prompts written in the user-selected language
203
- - Recommended for local teams, local documentation, and native language efficiency
204
- - Project-manager receives prompts in selected language (e.g., Korean, Japanese)
205
-
206
- **Q3 (사용자 닉네임)**:
207
- - Custom nickname stored as: `user.nickname: "GOOS"` (or custom input)
208
-
209
- #### 0.1.3 팀 모드 추가 배치: GitHub 설정 & Git 워크플로우 선택 (팀 모드만)
210
-
211
- **조건**: `config.json`에서 `"mode": "team"` 감지 시 실행
212
-
213
- **배치 구성**: 2개 질문 (1회 호출로 통합)
214
-
215
- **Example AskUserQuestion Call**:
216
- ```python
217
- AskUserQuestion(
218
- questions=[
219
- {
220
- "question": "[Team Mode] Is 'Automatically delete head branches' enabled in your GitHub repository settings?",
221
- "header": "GitHub Branch Settings",
222
- "multiSelect": false,
223
- "options": [
224
- {
225
- "label": "✅ Yes, already enabled",
226
- "description": "PR merge 후 자동으로 원격 브랜치 삭제됨"
227
- },
228
- {
229
- "label": "❌ No, not enabled (Recommended: Enable)",
230
- "description": "Settings → General → '자동 삭제' 체크박스 확인 필요"
231
- },
232
- {
233
- "label": "🤔 Not sure / Need to check",
234
- "description": "GitHub Settings → General 확인 후 다시 진행"
235
- }
236
- ]
237
- },
238
- {
239
- "question": "[Team Mode] Which Git workflow should we use when creating SPEC documents?",
240
- "header": "SPEC Git Workflow",
241
- "multiSelect": false,
242
- "options": [
243
- {
244
- "label": "📋 Feature Branch + PR",
245
- "description": "매 SPEC마다 feature 브랜치 생성 → PR 리뷰 → develop 병합. 팀 협업과 코드 리뷰에 최적"
246
- },
247
- {
248
- "label": "🔄 Direct Commit to Develop",
249
- "description": "브랜치 생성 없이 develop에 직접 커밋. 빠른 프로토타이핑과 단순 워크플로우에 최적"
250
- },
251
- {
252
- "label": "🤔 Decide per SPEC",
253
- "description": "SPEC 생성 시마다 매번 선택. 유연성이 높지만 매번 결정 필요"
254
- }
255
- ]
256
- }
257
- ]
258
- )
259
- ```
260
-
261
- **응답 처리**:
262
-
263
- **Q1 (GitHub 설정)**:
264
- - **"Yes, already enabled"** → `auto_delete_branches: true` 저장
265
- - **"No, not enabled"** → `auto_delete_branches: false` + 권장사항 저장
266
- - **"Not sure"** → `auto_delete_branches: null` + 경고 메시지
267
-
268
- **Q2 (Git 워크플로우)**:
269
- - **"Feature Branch + PR"** → `spec_git_workflow: "feature_branch"` 저장
270
- - `/alfred:1-plan` 실행 시 자동으로 feature 브랜치 생성
271
- - git-manager가 PR 기반 워크플로우 적용
272
- - **"Direct Commit to Develop"** → `spec_git_workflow: "develop_direct"` 저장
273
- - `/alfred:1-plan` 실행 시 develop 브랜치에 직접 커밋
274
- - 브랜치 생성 과정 생략
275
- - **"Decide per SPEC"** → `spec_git_workflow: "per_spec"` 저장
276
- - `/alfred:1-plan` 실행 시마다 git-manager가 사용자에게 선택 요청
277
-
278
- **User Response Example**:
279
- ```
280
- Selected Language: 🇰🇷 한국어
281
- Selected Nickname: GOOS (typed via "Other" option)
282
- ```
283
-
284
- ---
285
-
286
- ### 0.1.4 Domain Selection (Optional - All Modes)
287
-
288
- **Purpose**: Identify project domains to activate domain-expert agents for specialized guidance.
289
-
290
- **When to ask**: After language/nickname/GitHub settings complete
291
-
292
- **Batched Design**: Domain selection integrated into initial batch OR asked separately based on user preference
293
-
294
- **Example AskUserQuestion Call**:
295
- ```python
296
- AskUserQuestion(
297
- questions=[
298
- {
299
- "question": "Which domains does your project involve? (Select all that apply)",
300
- "header": "Project Domains",
301
- "multiSelect": true,
302
- "options": [
303
- {
304
- "label": "🎨 Frontend",
305
- "description": "React, Vue, Angular, Next.js, Nuxt, SvelteKit, Astro, Remix, SolidJS"
306
- },
307
- {
308
- "label": "⚙️ Backend",
309
- "description": "FastAPI, Flask, Django, Express, Fastify, NestJS, Spring Boot, Gin, Axum"
310
- },
311
- {
312
- "label": "🚀 DevOps",
313
- "description": "Railway, Vercel, Docker, Kubernetes, AWS, GCP, Azure, CI/CD"
314
- },
315
- {
316
- "label": "🗄️ Database",
317
- "description": "PostgreSQL, MySQL, MongoDB, Redis, database design and optimization"
318
- },
319
- {
320
- "label": "📊 Data Science",
321
- "description": "Data analysis, machine learning, data pipelines, notebooks"
322
- },
323
- {
324
- "label": "📱 Mobile",
325
- "description": "React Native, Flutter, iOS, Android app development"
326
- },
327
- {
328
- "label": "⚡ Skip",
329
- "description": "No domain selection (can add later via /alfred:1-plan)"
330
- }
331
- ]
332
- }
333
- ]
334
- )
335
- ```
336
-
337
- **Response Processing**:
338
- ```json
339
- {
340
- "stack": {
341
- "selected_domains": ["frontend", "backend"],
342
- "domain_selection_date": "2025-10-23T12:34:56Z"
343
- }
344
- }
345
- ```
346
-
347
- **Hint to User**: "You can always modify domains later during `/alfred:1-plan` when creating SPECs"
348
-
349
- **Domain Expert Activation**:
350
- - Selected domains stored in `.moai/config.json`
351
- - Domain-expert agents activated during `/alfred:1-plan` (automatic keyword detection)
352
- - Domain-expert agents available as advisors during `/alfred:2-run`
353
- - Domain-specific sync routing enabled in `/alfred:3-sync`
354
-
355
- ---
356
-
357
- ### 0.2 사용자 정보 저장
358
-
359
- Alfred가 선택된 언어, 닉네임, 그리고 팀 모드 설정을 다음과 같이 저장합니다:
360
-
361
- #### 0.2.1 기본 정보 저장 (항상) - 에이전트 프롬프트 언어 추가
362
-
363
- ```json
364
- {
365
- "language": {
366
- "conversation_language": "ko",
367
- "conversation_language_name": "한국어",
368
- "agent_prompt_language": "localized",
369
- "agent_prompt_language_description": "All sub-agent prompts written in the selected language (localized)"
370
- },
371
- "user": {
372
- "nickname": "GOOS",
373
- "selected_at": "2025-10-23T12:34:56Z"
374
- },
375
- "stack": {
376
- "selected_domains": ["frontend", "backend"],
377
- "domain_selection_date": "2025-10-23T12:34:56Z"
378
- }
379
- }
380
- ```
381
-
382
- **에이전트 프롬프트 언어 옵션**:
383
-
384
- - **`"english"`** (Global Standard) - **💰 Claude Pro $20 사용자 추천**:
385
- - All sub-agent prompts and internal communication in English
386
- - Best for: International teams, global collaboration, code consistency
387
- - Impact: Project-manager, spec-builder, code-builder all use English task prompts
388
- - **Cost Benefit**: Reduces token usage by ~15-20% compared to non-English prompts
389
- - English prompts are more efficient and use fewer tokens
390
- - Significant cost savings for continuous API usage
391
- - Example: 100,000 tokens in English ≈ 115,000-120,000 tokens in Korean/Japanese
392
-
393
- - **`"localized"`** (Localized - Default for non-English):
394
- - All sub-agent prompts and internal communication in selected language
395
- - Best for: Local teams, native language efficiency, culturally-specific guidance
396
- - Impact: Project-manager, spec-builder, code-builder all use localized task prompts
397
- - Note: Uses ~15-20% more tokens due to language characteristics
398
-
399
- #### 0.2.2 GitHub & Git 워크플로우 설정 저장 (팀 모드만)
400
-
401
- **팀 모드 감지 시 추가 저장 - Feature Branch + PR 선택 시**:
402
- ```json
403
- {
404
- "github": {
405
- "auto_delete_branches": true,
406
- "spec_git_workflow": "feature_branch",
407
- "checked_at": "2025-10-23T12:34:56Z",
408
- "workflow_recommendation": "Feature branch를 사용한 PR 기반 협업 워크플로우. 매 SPEC마다 feature/spec-* 브랜치 생성, PR 리뷰 후 develop 병합"
409
- }
410
- }
411
- ```
412
-
413
- **또는 - Direct Commit to Develop 선택 시**:
414
- ```json
415
- {
416
- "github": {
417
- "auto_delete_branches": false,
418
- "spec_git_workflow": "develop_direct",
419
- "checked_at": "2025-10-23T12:34:56Z",
420
- "workflow_recommendation": "develop 브랜치에 직접 커밋하는 단순 워크플로우. 브랜치 생성 과정 생략, 빠른 개발 속도"
421
- }
422
- }
423
- ```
424
-
425
- **또는 - Decide per SPEC 선택 시**:
426
- ```json
427
- {
428
- "github": {
429
- "auto_delete_branches": true,
430
- "spec_git_workflow": "per_spec",
431
- "checked_at": "2025-10-23T12:34:56Z",
432
- "workflow_recommendation": "SPEC 생성 시마다 워크플로우 선택. /alfred:1-plan 실행 시 git-manager가 선택 요청"
433
- }
434
- }
435
- ```
436
-
437
- #### 0.2.3 저장된 정보 활용
438
-
439
- 이 정보는:
440
- - 모든 sub-agents 에게 컨텍스트 파라미터로 전달됨
441
- - `.moai/config.json` 의 `language`, `user`, `github` 필드에 저장됨
442
- - CLAUDE.md의 `{{CONVERSATION_LANGUAGE}}` 및 `{{USER_NICKNAME}}` 변수로 치환됨
443
- - 모든 Alfred 대화에서 사용됨
444
- - **팀 모드**: git-manager가 다음 워크플로우를 자동으로 적용:
445
- - **`spec_git_workflow: "feature_branch"`**: `/alfred:1-plan` 실행 시 feature/spec-* 브랜치 생성, PR 기반 리뷰 프로세스 적용
446
- - **`spec_git_workflow: "develop_direct"`**: `/alfred:1-plan` 실행 시 develop 브랜치에 직접 커밋, 브랜치 생성 과정 생략
447
- - **`spec_git_workflow: "per_spec"`**: `/alfred:1-plan` 실행 시마다 사용자에게 워크플로우 선택 요청
448
-
449
- **설정 완료 출력 예시**:
450
- ```markdown
451
- ✅ 초기 설정 완료!
452
-
453
- 언어: 한국어 (ko)
454
- 닉네임: GOOS
455
-
456
- 이제 GOOS님의 프로젝트 환경 분석으로 진행하겠습니다...
457
- ```
458
-
459
- ### 0.3 STEP 1로 전환
460
-
461
- 언어 및 사용자 정보 설정 완료 후, 모든 후속 상호작용이 선택된 언어로 진행됩니다:
462
- - Alfred의 모든 프롬프트가 선택된 언어로 번역됨
463
- - project-manager sub-agent이 언어 및 사용자 정보 파라미터를 수신
464
- - 인터뷰 질문이 선택된 언어로 진행됨
465
- - 생성된 문서 (product.md, structure.md, tech.md)가 선택된 언어로 작성됨
466
- - CLAUDE.md가 선택된 언어와 사용자 닉네임을 표시함
467
-
468
- ---
469
-
470
- ## 🚀 STEP 1: Environmental analysis and interview plan development
471
-
472
- Analyze the project environment and develop a systematic interview plan.
473
-
474
- ### 1.0 Check backup directory (highest priority)
475
-
476
- **Processing backup files after moai-adk init reinitialization**
477
-
478
- Alfred first checks the `.moai-backups/` directory:
479
-
480
- ```bash
481
- # Check latest backup timestamp
482
- ls -t .moai-backups/ | head -1
483
-
484
- # Check the optimized flag in config.json
485
- grep "optimized" .moai/config.json
486
- ```
487
-
488
- **Backup existence conditions**:
489
- - `.moai-backups/` directory exists
490
- - `.moai/project/*.md` file exists in the latest backup folder
491
- - User's existing project files can be merged (regardless of optimized flag)
492
-
493
- **Select user if backup exists**
494
- Call `AskUserQuestion tool (documented in moai-alfred-interactive-questions skill)` to display a TUI with the following options:
495
- - **Merge**: Merge backup contents and latest template (recommended)
496
- - **New**: Ignore the backup and start a new interview
497
- - **Skip**: Keep current file (terminate task)
498
-
499
- **Response processing**:
500
- - **"Merge"** → Proceed to Phase 1.1 (backup merge workflow)
501
- - **"Create new"** → Proceed to Phase 1.2 (Project environment analysis) (existing process)
502
- - **"Skip"** → End task
503
-
504
- **No backup**:
505
- - Proceed directly to Phase 1.2 (project environment analysis)
506
-
507
- ---
508
-
509
- ### 1.1 Backup merge workflow (when user selects "Merge")
510
-
511
- **Purpose**: Restore only user customizations while maintaining the latest template structure.
512
-
513
- **STEP 1: Read backup file**
514
-
515
- Alfred reads files from the latest backup directory:
516
- ```bash
517
- # Latest backup directory path
518
- BACKUP_DIR=.moai-backups/$(ls -t .moai-backups/ | head -1)
519
-
520
- # Read backup file
521
- Read $BACKUP_DIR/.moai/project/product.md
522
- Read $BACKUP_DIR/.moai/project/structure.md
523
- Read $BACKUP_DIR/.moai/project/tech.md
524
- Read $BACKUP_DIR/CLAUDE.md
525
- ```
526
-
527
- **STEP 2: Detect template defaults**
528
-
529
- The following patterns are considered "template defaults" (not merged):
530
- - "Define your key user base"
531
- - "Describe the core problem you are trying to solve"
532
- - "List the strengths and differences of your project"
533
- - "MoAI-ADK", "MoAI-Agentic Development Kit", etc. Variable format
534
- - Guide phrases such as "Example:", "Sample:", "Example:", etc.
535
-
536
- **STEP 3: Extract user customization**
537
-
538
- Extract only **non-template default content** from the backup file:
539
- - `product.md`:
540
- - Define your actual user base in the USER section
541
- - Describe the actual problem in the PROBLEM section
542
- - Real differences in the STRATEGY section
543
- - Actual success metrics in the SUCCESS section
544
- - `structure.md`:
545
- - Actual design in the ARCHITECTURE section
546
- - Actual module structure in the MODULES section
547
- - Actual integration plan in the INTEGRATION section
548
- - `tech.md`:
549
- - The actual technology stack
550
- in the STACK section - The actual framework
551
- in the FRAMEWORK section - The actual quality policy
552
- in the QUALITY section - `HISTORY` section: **Full Preservation** (all files)
553
-
554
- **STEP 4: Merge Strategy**
555
-
556
- ```markdown
557
- Latest template structure (v0.4.0+)
558
-
559
- Insert user customization (extracted from backup file)
560
-
561
- HISTORY section updates
562
-
563
- Version update (v0.1.x → v0.1.x+1)
564
- ```
565
-
566
- **Merge Principle**:
567
- - ✅ Maintain the latest version of the template structure (section order, header, @TAG format)
568
- - ✅ Insert only user customization (actual content written)
569
- - ✅ Cumulative preservation of the HISTORY section (existing history + merge history)
570
- - ❌ Replace template default values ​​with the latest version
571
-
572
- **STEP 5: HISTORY Section Update**
573
-
574
- After the merge is complete, add history to the HISTORY section of each file:
575
- ```yaml
576
- ### v0.1.x+1 (2025-10-19)
577
- - **UPDATED**: Merge backup files (automatic optimization)
578
- - AUTHOR: @Alfred
579
- - BACKUP: .moai-backups/20251018-003638/
580
- - REASON: Restoring user customization after moai-adk init reinitialization
581
- ```
582
-
583
- **STEP 6: Update config.json**
584
-
585
- Set optimization flags after the merge is complete:
586
- ```json
587
- {
588
- "project": {
589
- "optimized": true,
590
- "last_merge": "2025-10-19T12:34:56+09:00",
591
- "backup_source": ".moai-backups/20251018-003638/"
592
- }
593
- }
594
- ```
595
-
596
- **STEP 7: Completion Report**
597
-
598
- ```markdown
599
- ✅ Backup merge completed!
600
-
601
- 📁 Merged files:
602
- - .moai/project/product.md (v0.1.4 → v0.1.5)
603
- - .moai/project/structure.md (v0.1.1 → v0.1.2)
604
- - .moai/project/tech.md (v0.1.1 → v0.1.2)
605
- - .moai/config.json (optimized: false → true)
606
-
607
- 🔍 Merge history:
608
- - USER section: Restore customized contents of backup file
609
- - PROBLEM section: Restore problem description of backup file
610
- - STRATEGY section: Restore differentials of backup file
611
- - HISTORY section: Add merge history (cumulative retention)
612
-
613
- 💾 Backup file location:
614
- - Original backup: .moai-backups/20251018-003638/
615
- - Retention period: Permanent (until manual deletion)
616
-
617
- 📋 Next steps:
618
- 1. Review the merged document
619
- 2. Additional modifications if necessary
620
- 3. Create your first SPEC with /alfred:1-plan
621
-
622
- ---
623
- **Task completed: /alfred:0-project terminated**
624
- ```
625
-
626
- **Finish work after merge**: Complete immediately without interview
627
-
628
- ---
629
-
630
- ### 1.2 Run project environment analysis (when user selects "New" or no backup)
631
-
632
- **Automatically analyzed items**:
633
-
634
- 1. **Project Type Detection**
635
- Alfred classifies new vs existing projects by analyzing the directory structure:
636
- - Empty directory → New project
637
- - Code/documentation present → Existing project
638
-
639
- 2. **Auto-detect language/framework**: Detects the main language of your project based on file patterns
640
- - pyproject.toml, requirements.txt → Python
641
- - package.json, tsconfig.json → TypeScript/Node.js
642
- - pom.xml, build.gradle → Java
643
- - go.mod → Go
644
- - Cargo.toml → Rust
645
- - backend/ + frontend/ → full stack
646
-
647
- 3. **Document status analysis**
648
- - Check the status of existing `.moai/project/*.md` files
649
- - Identify areas of insufficient information
650
- - Organize items that need supplementation
651
-
652
- 4. **Project structure evaluation**
653
- - Directory structure complexity
654
- - Monolingual vs. hybrid vs. microservice
655
- - Code base size estimation
656
-
657
- ### 1.3 Establish interview strategy (when user selects "New")
658
-
659
- **Select question tree by project type**:
660
-
661
- | Project Type | Question Category | Focus Areas |
662
- | ------------------------- | ------------------ | --------------------------------------------- |
663
- | **New Project** | Product Discovery | Mission, Users, Problems Solved |
664
- | **Existing Project** | Legacy Analysis | Code Base, Technical Debt, Integration Points |
665
- | **TypeScript conversion** | Migration Strategy | TypeScript conversion for existing projects |
666
-
667
- **Question Priority**:
668
- - **Essential Questions**: Core Business Value, Key User Bases (all projects)
669
- - **Technical Questions**: Language/Framework, Quality Policy, Deployment Strategy
670
- - **Governance**: Security Requirements, Traceability Strategy (Optional)
671
-
672
- ### 1.4 Generate Interview Plan Report (when user selects "Create New")
673
-
674
- **Format of plan to be presented to users**:
675
-
676
- ```markdown
677
- ## 📊 Project initialization plan: [PROJECT-NAME]
678
-
679
- ### Environmental Analysis Results
680
- - **Project Type**: [New/Existing/Hybrid]
681
- - **Languages ​​Detected**: [Language List]
682
- - **Current Document Status**: [Completeness Rating 0-100%]
683
- - **Structure Complexity**: [Simple/Medium/Complex]
684
-
685
- ### 🎯 Interview strategy
686
- - **Question category**: Product Discovery / Structure / Tech
687
- - **Expected number of questions**: [N (M required + K optional)]
688
- - **Estimated time required**: [Time estimation]
689
- - **Priority area**: [Focus on Areas to be covered]
690
-
691
- ### ⚠️ Notes
692
- - **Existing document**: [Overwrite vs supplementation strategy]
693
- - **Language settings**: [Automatic detection vs manual setting]
694
- - **Configuration conflicts**: [Compatibility with existing config.json]
695
-
696
- ### ✅ Expected deliverables
697
- - **product.md**: [Business requirements document]
698
- - **structure.md**: [System architecture document]
699
- - **tech.md**: [Technology stack and policy document]
700
- - **config.json**: [Project configuration file]
701
-
702
- ---
703
- **Approval Request**: Would you like to proceed with the interview using the above plan?
704
- (Choose "Proceed," "Modify [Content]," or "Abort")
705
- ```
706
-
707
- ### 1.5 Wait for user approval (moai-alfred-interactive-questions) (when user selects "New")
708
-
709
- After Alfred receives the project-manager's interview plan report, uses `AskUserQuestion` tool (documented in moai-alfred-interactive-questions skill) and asks whether Phase 2 is approved.
710
- - **Proceed**: Interview conducted according to approved plan
711
- - **Modify**: Re-establish the plan (re-execute Phase 1)
712
- - **Stop**: Stop initialization
713
-
714
- **Response processing**:
715
- - **"Progress"** (`answers["0"] === "Progress"`) → Execute Phase 2
716
- - **"Modify"** (`answers["0"] === "Modify"`) → Repeat Phase 1 (recall project-manager)
717
- - **"Abort"** (`answers["0"] === "Abort"`) → End task
718
-
719
- ---
720
-
721
- ## 🚀 STEP 2: Execute project initialization (after user approves "New")
722
-
723
- **Note**: This step will only be executed if the user selects **"New"**.
724
- - When selecting "Merge": End the task in Phase 1.1 (Merge Backups)
725
- - When selecting "Skip": End the task
726
- - When selecting "New": Proceed with the process below
727
-
728
- After user approval, the project-manager agent performs initialization.
729
-
730
- ### 2.1 Call project-manager agent (when user selects "New")
731
-
732
- Alfred starts project initialization by calling the project-manager agent with the following parameters:
733
-
734
- **Parameters passed to project-manager**:
735
- - **conversation_language** (from STEP 0): Language code selected by user (e.g., "ko", "en", "ja", "zh")
736
- - **language_name** (from STEP 0): Display name of selected language (e.g., "Korean", "English")
737
- - **agent_prompt_language** (from STEP 0.1.2) - **NEW**:
738
- - `"english"` = All sub-agent prompts in English (Global Standard)
739
- - `"localized"` = All sub-agent prompts in selected conversation_language (Localized)
740
- - Detected Languages: [Language List from codebase detection]
741
- - Project Type: [New/Existing]
742
- - Existing Document Status: [Existence/Absence]
743
- - Approved Interview Plan: [Plan Summary]
744
- - **Team Mode Git Workflow** (from STEP 0.1.3):
745
- - `spec_git_workflow: "feature_branch" | "develop_direct" | "per_spec"` (팀 모드만)
746
-
747
- **Execution**:
748
- ```
749
- Call the Task tool:
750
- - subagent_type: "project-manager"
751
- - description: "Initialize project with conversation language support"
752
- - prompt: """당신은 project-manager 에이전트입니다.
753
-
754
- 언어 설정:
755
- - 대화_언어: {{CONVERSATION_LANGUAGE}} (모든 대화, 문서에 사용)
756
- - 언어명: {{CONVERSATION_LANGUAGE_NAME}}
757
- - 에이전트_프롬프트_언어: {{AGENT_PROMPT_LANGUAGE}} (내부 sub-agent 통신 언어)
758
-
759
- 에이전트 프롬프트 언어에 따른 작업 방식:
760
-
761
- 1. **agent_prompt_language = "english"** (Global Standard):
762
- - 당신(project-manager)은 **영어**로 사고하고 작업합니다
763
- - 모든 내부 분석과 계획을 영어로 진행합니다
764
- - 생성된 product.md, structure.md, tech.md는 **{{CONVERSATION_LANGUAGE}}**로 작성합니다
765
- - Sub-agent들(spec-builder 등)에게 전달하는 프롬프트는 **영어**입니다
766
-
767
- 2. **agent_prompt_language = "localized"** (Localized):
768
- - 당신(project-manager)은 **{{CONVERSATION_LANGUAGE}}**로 사고하고 작업합니다
769
- - 모든 내부 분석과 계획을 {{CONVERSATION_LANGUAGE}}로 진행합니다
770
- - 생성된 product.md, structure.md, tech.md는 **{{CONVERSATION_LANGUAGE}}**로 작성합니다
771
- - Sub-agent들(spec-builder 등)에게 전달하는 프롬프트도 **{{CONVERSATION_LANGUAGE}}**입니다
772
-
773
- 중요: 대화_언어(conversation_language)와 에이전트_프롬프트_언어(agent_prompt_language)는 다를 수 있습니다!
774
- - 대화_언어는 **사용자와의 대화**, **생성 문서**에 사용
775
- - 에이전트_프롬프트_언어는 **sub-agents 통신**, **내부 prompt**에 사용
776
-
777
- GIT 워크플로우 설정 (팀 모드):
778
- - spec_git_workflow: [feature_branch | develop_direct | per_spec]
779
- - "feature_branch": feature/spec-* 브랜치 생성, PR 기반 리뷰, develop 병합
780
- - "develop_direct": develop에 직접 커밋, 브랜치 생성 안 함
781
- - "per_spec": SPEC별로 사용자에게 물어봄 (/alfred:1-plan 실행 중)
782
- - 참고: 이 값을 .moai/config.json github.spec_git_workflow에 저장하여 git-manager가 참조하도록
783
-
784
- 프로젝트_타입: [new|existing]
785
- 감지된_언어들: [감지된 코드베이스 언어들]
786
-
787
- 중요 지시사항:
788
- 모든 인터뷰와 생성된 문서는 대화_언어(conversation_language)로 작성되어야 합니다:
789
- - product.md: {{CONVERSATION_LANGUAGE}}로 생성
790
- - structure.md: {{CONVERSATION_LANGUAGE}}로 생성
791
- - tech.md: {{CONVERSATION_LANGUAGE}}로 생성
792
-
793
- conversation_language가 'ko'인 경우: 모든 설명 내용을 한국어로
794
- conversation_language가 'ja'인 경우: 모든 설명 내용을 일본어로
795
- 다른 언어인 경우: 지정된 언어를 따릅니다
796
-
797
- 프로젝트 초기화 후, 다음과 같이 .moai/config.json 업데이트:
798
- {
799
- "language": {
800
- "conversation_language": "{{CONVERSATION_LANGUAGE}}",
801
- "conversation_language_name": "{{CONVERSATION_LANGUAGE_NAME}}",
802
- "agent_prompt_language": "{{AGENT_PROMPT_LANGUAGE}}"
803
- },
804
- "github": {
805
- "spec_git_workflow": "[feature_branch|develop_direct|per_spec]"
806
- }
807
- }
808
-
809
- 스킬 호출:
810
- 필요 시 명시적 Skill() 호출 사용:
811
- - Skill("moai-alfred-language-detection") - 코드베이스 언어 감지
812
- - Skill("moai-foundation-langs") - 다국어 프로젝트 설정
813
-
814
- 작업: 프로젝트 인터뷰를 진행하고 product/structure/tech.md 문서를 생성/업데이트합니다.
815
- 에이전트_프롬프트_언어 설정에 따라 sub-agent들과의 통신 언어를 결정합니다."""
816
- ```
817
-
818
- **Outcome**: The project-manager agent conducts structured interviews entirely in the selected language and creates/updates product/structure/tech.md documents in that language.
819
-
820
- ### 2.2 Automatic activation of Alfred Skills (optional)
821
-
822
- After the project-manager has finished creating the document, **Alfred can optionally call Skills** (upon user request).
823
-
824
- **Automatic activation conditions** (optional):
825
-
826
- | Conditions | Automatic selection Skill | Purpose |
827
- | ------------------------------------ | ---------------------------- | -------------------------------------- |
828
- | User Requests "Quality Verification" | moai-alfred-trust-validation | Initial project structure verification |
829
-
830
- **Execution flow** (optional):
831
- ```
832
- 1. project-manager completion
833
-
834
- 2. User selection:
835
- - "Quality verification required" → moai-alfred-trust-validation (Level 1 quick scan)
836
- - "Skip" → Complete immediately
837
- ```
838
-
839
- **Note**: Quality verification is optional during the project initialization phase.
840
-
841
- ### 2.3 Sub-agent moai-alfred-interactive-questions (Nested)
842
-
843
- **The project-manager agent can internally call the TUI survey skill** to check the details of the task.
844
-
845
- **When to call**:
846
- - Before overwriting existing project documents
847
- - When selecting language/framework
848
- - When changing important settings
849
-
850
- **Example** (inside project-manager): Ask whether to "overwrite file" with `AskUserQuestion tool (documented in moai-alfred-interactive-questions skill)`,
851
- - Allows you to choose between **Overwrite** / **Merge** / **Skip**.
852
-
853
- **Nested pattern**:
854
- - **Command level** (Phase approval): Called by Alfred → "Shall we proceed with Phase 2?"
855
- - **Sub-agent level** (Detailed confirmation): Called by project-manager → "Shall we overwrite the file?"
856
-
857
- ### 2.4 Processing method by project type
858
-
859
- #### A. New project (Greenfield)
860
-
861
- **Interview Flow**:
862
-
863
- 1. **Product Discovery** (create product.md)
864
- - Define core mission (DOC:MISSION-001)
865
- - Identify key user base (SPEC:USER-001)
866
- - Identify key problems to solve (SPEC:PROBLEM-001)
867
- - Summary of differences and strengths (DOC:STRATEGY-001)
868
- - Setting success indicators (SPEC:SUCCESS-001)
869
-
870
- 2. **Structure Blueprint** (create structure.md)
871
- - Selection of architecture strategy (DOC:ARCHITECTURE-001)
872
- - Division of responsibilities by module (DOC:MODULES-001)
873
- - External system integration plan (DOC:INTEGRATION-001)
874
- - Define traceability strategy (DOC:TRACEABILITY-001)
875
-
876
- 3. **Tech Stack Mapping** (written by tech.md)
877
- - Select language & runtime (DOC:STACK-001)
878
- - Determine core framework (DOC:FRAMEWORK-001)
879
- - Set quality gate (DOC:QUALITY-001)
880
- - Define security policy (DOC:SECURITY-001)
881
- - Plan distribution channels (DOC:DEPLOY-001)
882
-
883
- **Automatically generate config.json**:
884
- ```json
885
- {
886
- "project_name": "detected-name",
887
- "project_type": "single|fullstack|microservice",
888
- "project_language": "python|typescript|java|go|rust",
889
- "test_framework": "pytest|vitest|junit|go test|cargo test",
890
- "linter": "ruff|biome|eslint|golint|clippy",
891
- "formatter": "black|biome|prettier|gofmt|rustfmt",
892
- "coverage_target": 85,
893
- "mode": "personal"
894
- }
895
- ```
896
-
897
- #### B. Existing project (legacy introduction)
898
-
899
- **Legacy Snapshot & Alignment**:
900
-
901
- **STEP 1: Identify the overall project structure**
902
-
903
- Alfred identifies the entire project structure:
904
- - Visualize the directory structure using the tree or find commands
905
- - Exclude build artifacts such as node_modules, .git, dist, build, __pycache__, etc.
906
- - Identify key source directories and configuration files.
907
-
908
- **Output**:
909
- - Visualize the entire folder/file hierarchy of the project
910
- - Identify major directories (src/, tests/, docs/, config/, etc.)
911
- - Check language/framework hint files (package.json, pyproject.toml, go.mod, etc.)
912
-
913
- **STEP 2: Establish parallel analysis strategy**
914
-
915
- Alfred identifies groups of files by the Glob pattern:
916
- 1. **Configuration files**: *.json, *.toml, *.yaml, *.yml, *.config.js
917
- 2. **Source code files**: src/**/*.{ts,js,py,go,rs,java}
918
- 3. **Test files**: tests/**/*.{ts,js,py,go,rs,java}, **/*.test.*, **/*.spec.*
919
- 4. **Documentation files**: *.md, docs/**/*.md, README*, CHANGELOG*
920
-
921
- **Parallel Read Strategy**:
922
- - Speed ​​up analysis by reading multiple files simultaneously with the Read tool
923
- - Batch processing for each file group
924
- - Priority: Configuration file → Core source → Test → Document
925
-
926
- **STEP 3: Analysis and reporting of characteristics for each file**
927
-
928
- As each file is read, the following information is collected:
929
-
930
- 1. **Configuration file analysis**
931
- - Project metadata (name, version, description)
932
- - Dependency list and versions
933
- - Build/test script
934
- - Confirm language/framework
935
-
936
- 2. **Source code analysis**
937
- - Identify major modules and classes
938
- - Architectural pattern inference (MVC, clean architecture, microservice, etc.)
939
- - Identify external API calls and integration points
940
- - Key areas of domain logic
941
-
942
- 3. **Test code analysis**
943
- - Check test framework
944
- - Identify coverage settings
945
- - Identify key test scenarios
946
- - Evaluate TDD compliance
947
-
948
- 4. **Document analysis**
949
- - Existing README contents
950
- - Existence of architecture document
951
- - API document status
952
- - Installation/deployment guide completeness
953
-
954
- **Report Format**:
955
- ```markdown
956
- ## Analysis results for each file
957
-
958
- ### Configuration file
959
- - package.json: Node.js 18+, TypeScript 5.x, Vitest test
960
- - tsconfig.json: strict mode, ESNext target
961
- - biome.json: Linter/formatter settings exist
962
-
963
- ### Source code (src/)
964
- - src/core/: Core business logic (3 modules)
965
- - src/api/: REST API endpoints (5 routers)
966
- - src/utils/: Utility functions (logging, verification, etc.)
967
- - Architecture: Hierarchical (controller) → service → repository)
968
-
969
- ### Tests (tests/)
970
- - Vitest + @testing-library used
971
- - Unit test coverage estimated at about 60%
972
- - E2E testing lacking
973
-
974
- ### Documentation
975
- - README.md: Only installation guide
976
- - Absence of API documentation
977
- - Absence of architecture document
978
- ```
979
-
980
- **STEP 4: Comprehensive analysis and product/structure/tech reflection**
981
-
982
- Based on the collected information, it is reflected in three major documents:
983
-
984
- 1. Contents reflected in **product.md**
985
- - Project mission extracted from existing README/document
986
- - Main user base and scenario inferred from code
987
- - Backtracking of core problem to be solved
988
- - Preservation of existing assets in "Legacy Context"
989
-
990
- 2. Contents reflected in **structure.md**
991
- - Identified actual directory structure
992
- - Responsibility analysis results for each module
993
- - External system integration points (API calls, DB connections, etc.)
994
- - Technical debt items (marked with @CODE tag)
995
-
996
- 3. **tech.md reflection content**
997
- - Languages/frameworks/libraries actually in use
998
- - Existing build/test pipeline
999
- - Status of quality gates (linter, formatter, test coverage)
1000
- - Identification of security/distribution policy
1001
- - Items requiring improvement (marked with TODO tags)
1002
-
1003
- **Preservation Policy**:
1004
- - Supplement only the missing parts without overwriting existing documents
1005
- - Preserve conflicting content in the "Legacy Context" section
1006
- - Mark items needing improvement with @CODE and TODO tags
1007
-
1008
- **Example Final Report**:
1009
- ```markdown
1010
- ## Complete analysis of existing project
1011
-
1012
- ### Environment Information
1013
- - **Language**: TypeScript 5.x (Node.js 18+)
1014
- - **Framework**: Express.js
1015
- - **Test**: Vitest (coverage ~60%)
1016
- - **Linter/Formatter**: Biome
1017
-
1018
- ### Main findings
1019
- 1. **Strengths**:
1020
- - High type safety (strict mode)
1021
- - Clear module structure (separation of core/api/utils)
1022
-
1023
- 2. **Needs improvement**:
1024
- - Test coverage below 85% (TODO:TEST-COVERAGE-001)
1025
- - Absence of API documentation (TODO:DOCS-API-001)
1026
- - Insufficient E2E testing (@CODE:TEST-E2E-001)
1027
-
1028
- ### Next step
1029
- 1. product/structure/tech.md creation completed
1030
- 2. @CODE/TODO item priority confirmation
1031
- 3. /alfred:Start writing an improvement SPEC with 1-spec
1032
- ```
1033
-
1034
- ### 2.3 Document creation and verification
1035
-
1036
- **Output**:
1037
- - `.moai/project/product.md` (Business Requirements)
1038
- - `.moai/project/structure.md` (System Architecture)
1039
- - `.moai/project/tech.md` (Technology Stack and policy)
1040
- - `.moai/config.json` (project settings)
1041
-
1042
- **Quality Verification**:
1043
- - [ ] Verify existence of all required @TAG sections
1044
- - [ ] Verify compliance with EARS syntax format
1045
- - [ ] Verify config.json syntax validity
1046
- - [ ] Verify cross-document consistency
1047
-
1048
- ### 2.4 Completion Report
1049
-
1050
- ```markdown
1051
- ✅ Project initialization complete!
1052
-
1053
- 📁 Documents generated:
1054
- - .moai/project/product.md (Business Definition)
1055
- - .moai/project/structure.md (Architecture Design)
1056
- - .moai/project/tech.md (Technology Stack)
1057
- - .moai/config.json (project settings)
1058
-
1059
- 🔍 Detected environments:
1060
- - Language: [List of languages]
1061
- - Frameworks: [List of frameworks]
1062
- - Test tools: [List of tools]
1063
-
1064
- 📋 Next steps:
1065
- 1. Review the generated document
1066
- 2. Create your first SPEC with /alfred:1-plan
1067
- 3. If necessary, readjust with /alfred:8-project update
1068
- ```
1069
-
1070
- ### 2.5: Initial structural verification (optional)
1071
-
1072
- After project initialization is complete, you can optionally run quality verification.
1073
-
1074
- **Execution Conditions**: Only when explicitly requested by the user.
1075
-
1076
- **Verification Purpose**:
1077
- - Basic verification of project documentation and configuration files
1078
- - Verification of compliance with the TRUST principles of the initial structure
1079
- - Validation of configuration files
1080
-
1081
- **How ​​it works**:
1082
- Alfred only calls the trust-checker agent to perform project initial structural verification if explicitly requested by the user.
1083
-
1084
- **Verification items**:
1085
- - **Document completeness**: Check existence of required sections in product/structure/tech.md
1086
- - **Settings validity**: Verify config.json JSON syntax and required fields
1087
- - **TAG scheme**: Check compliance with @TAG format in document
1088
- - **EARS syntax**: Validation of the EARS template to be used when writing SPECs
1089
-
1090
- **Run Verification**: Level 1 quick scan (3-5 seconds)
1091
-
1092
- **Handling verification results**:
1093
-
1094
- ✅ **Pass**: Can proceed to next step
1095
- - Documents and settings are all normal
1096
-
1097
- ⚠️ **Warning**: Proceed after warning
1098
- - Some optional sections are missing
1099
- - Recommendations not applied
1100
-
1101
- ❌ **Critical**: Needs fix
1102
- - Required section missing
1103
- - config.json syntax error
1104
- - User choice: "Revalidate after fix" or "Skip"
1105
-
1106
- **Skip verification**:
1107
- - Verification is not run by default
1108
- - Run only when explicitly requested by the user
1109
-
1110
- ### 2.6: Agent & Skill Tailoring (Project Optimization)
1111
-
1112
- Based on the results of the interviews and initial analysis, we recommend and activate sub-agents and skills that should be immediately utilized in the project.
1113
- Before actual application, user confirmation is received with `AskUserQuestion tool (documented in moai-alfred-interactive-questions skill)`, and selected items are recorded in `CLAUDE.md` and `.moai/config.json`.
1114
-
1115
- #### 2.6.0 Create cc-manager briefing
1116
-
1117
- Once the document creation is complete, **read all three documents (product/structure/tech.md)** and summarize the following information to create a text called `cc_manager_briefing`.
1118
-
1119
- - `product.md`: Organize the mission, key users, problems to be solved, success indicators, and backlog (TODO) with a quotation from the original text or a one-line summary.
1120
- - `structure.md`: Records architecture type, module boundaries and scope of responsibility, external integration, traceability strategy, and TODO contents.
1121
- - `tech.md`: Organizes language/framework version, build/test/deployment procedures, quality/security policy, operation/monitoring method, and TODO items.
1122
-
1123
- Be sure to include the source (e.g. `product.md@SPEC:SUCCESS-001`) for each item so that cc-manager can understand the basis.
1124
-
1125
- #### 2.6.1 cc-manager judgment guide
1126
-
1127
- cc-manager selects the required sub-agents and skills based on the briefing.The table below is a reference guide to help you make a decision, and when making an actual call, the supporting sentences from the relevant document are also delivered.
1128
-
1129
- | Project requirements (document basis) | Recommended sub-agent/skill | Purpose |
1130
- | ---------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- |
1131
- | High quality and coverage goals (product.md:SPEC:SUCCESS-001) | `tdd-implementer`, `moai-essentials-debug`, `moai-essentials-review` | Establishment of RED·GREEN·REFACTOR workflow |
1132
- | Traceability/TAG improvement request (structure.md:DOC:TRACEABILITY-001) | `doc-syncer`, `moai-alfred-tag-scanning`, `moai-alfred-trust-validation` | Enhanced TAG traceability and document/code synchronization |
1133
- | Deployment automation/branch strategy required (`structure.md` Architecture/TODO) | `git-manager`, `moai-alfred-git-workflow`, `moai-foundation-git` | Branch Strategy·Commit Policy·PR Automation |
1134
- | Refactoring legacy modules (`product.md` BACKLOG, `tech.md` TODO) | `implementation-planner`, `moai-essentials-refactor` | Technical Debt Diagnosis and Refactoring Roadmap |
1135
- | Strengthening regulatory/security compliance (tech.md:DOC:SECURITY-001) | `quality-gate`, `moai-alfred-trust-validation`, `moai-foundation-trust`, `moai-domain-security` | TRUST S (Secured) and Trackable Compliance, Security Consulting |
1136
- | CLI Automation/Tooling Requirements (`tech.md` BUILD/CLI section) | `implementation-planner`, `moai-domain-cli-tool`, detected language skills (e.g. `moai-lang-python`) | CLI command design, input/output standardization |
1137
- | Data analysis/reporting needs (`product.md` DATA, `tech.md` ANALYTICS) | `implementation-planner`, `moai-domain-data-science`, detected language skills | Data Pipeline·Notebook Job Definition |
1138
- | Improved database structure (`structure.md` DB, `tech.md` STORAGE) | `doc-syncer`, `moai-domain-database`, `moai-alfred-tag-scanning` | Strengthening schema documentation and TAG-DB mapping |
1139
- | DevOps/Infrastructure automation required (`tech.md` DEVOPS, `structure.md` CI/CD) | `implementation-planner`, `moai-domain-devops`, `moai-alfred-git-workflow` | Establishing a deployment pipeline and IaC strategy |
1140
- | Introduction of ML/AI functions (`product.md` AI, `tech.md` MODEL) | `implementation-planner`, `moai-domain-ml`, detected language skills | Model training/inference pipeline definition |
1141
- | Mobile app strategy (`product.md` MOBILE, `structure.md` CLIENT) | `implementation-planner`, `moai-domain-mobile-app`, detected language skills (e.g. `moai-lang-dart`, `moai-lang-swift`) | Mobile client structure design |
1142
- | Strengthening coding standards/review process (`tech.md` REVIEW) | `quality-gate`, `moai-essentials-review` | Strengthening review checklist and quality reporting |
1143
- | Requires onboarding/training mode (`tech.md` STACK description, etc.) | `moai-alfred-interactive-questions`, `moai-adk-learning`, `agentic-coding` Output style | Enhanced interview TUI and automatically provided onboarding materials |
1144
-
1145
- > **Language/Domain Skill Selection Rules**
1146
- > - Select and add one relevant language skill (`moai-lang-python`, `moai-lang-java`, …) based on the `moai-alfred-language-detection` results or the stack recorded in the Tech section of the briefing.
1147
- > - Skills listed in the domain row are automatically included by cc-manager in the `selected_skills` list when the conditions are met.
1148
- > - The skill directory is always copied in its entirety, and only actual activation is recorded in `skill_pack` and `CLAUDE.md`.
1149
-
1150
- If multiple conditions are met, the candidates are merged without duplicates and organized into sets of `candidate_agents`, `candidate_skills`, and `candidate_styles`.
1151
-
1152
- #### 2.6.2 User confirmation flow
1153
-
1154
- `AskUserQuestion tool (documented in moai-alfred-interactive-questions skill)` asks "whether to enable recommended items."
1155
- - Provides three options: **Install all** / **Install selectively** / **Do not install**.
1156
- Selecting "Selective Install" presents the list of candidates again as multiple choices, allowing the user to select only the items they need.
1157
-
1158
- #### 2.6.3 Activation and Recording Steps
1159
-
1160
- 1. **Preparing briefing**: Organize the results of user selection (install all/install selectively) and the full text of `cc_manager_briefing`.
1161
- 2. **Call the cc-manager agent**:
1162
- - Call `subagent_type: "cc-manager"` with the `Task` tool and include a briefing and user selections in the prompt.
1163
- - cc-manager determines the necessary sub-agents and skills based on the briefing, and copies and updates `CLAUDE.md`, `.claude/agents/alfred/*.md`, and `.claude/skills/*.md` as customized for the project.
1164
- 3. **Check for configuration updates**: Review the results reflected by cc-manager.
1165
- - Sub-Agents: Keep the `.claude/agents/alfred/` template active and list it in the `CLAUDE.md` "Agents" section.
1166
- - Skills: Check the `.claude/skills/` document and add it to the `CLAUDE.md` "Skills" section.
1167
- - Output style: Apply `.claude/output-styles/alfred/` and record the activation in `CLAUDE.md` "Output Styles".
1168
- 4. **Update config.json**
1169
- ```json
1170
- {
1171
- "project": {
1172
- "optimized": true,
1173
- "agent_pack": ["tdd-implementer", "doc-syncer"],
1174
- "skill_pack": ["moai-alfred-git-workflow", "moai-alfred-tag-scanning"],
1175
- "output_styles": ["moai-adk-learning"]
1176
- }
1177
- }
1178
- ```
1179
- Merge existing properties, if any.
1180
- 5. **Final Report**: Add a list of "Activated Sub-Agents/Skills/Style" and a `cc_manager_briefing` summary at the top of the Completion Report, and reflect the same contents in the `CLAUDE.md` table so that they are automatically searched in subsequent commands.
1181
-
1182
- ## Interview guide by project type
1183
-
1184
- ### New project interview area
1185
-
1186
- **Product Discovery** (product.md)
1187
- - Core mission and value proposition
1188
- - Key user bases and needs
1189
- - 3 key problems to solve
1190
- - Differentiation compared to competing solutions
1191
- - Measurable indicators of success
1192
-
1193
- **Structure Blueprint** (structure.md)
1194
- - System architecture strategy
1195
- - Separation of modules and division of responsibilities
1196
- - External system integration plan
1197
- - @TAG-based traceability strategy
1198
-
1199
- **Tech Stack Mapping** (tech.md)
1200
- - Language/runtime selection and version
1201
- - Framework and libraries
1202
- - Quality gate policy (coverage, linter)
1203
- - Security policy and distribution channel
1204
-
1205
- ### Existing project interview area
1206
-
1207
- **Legacy Analysis**
1208
- - Identify current code structure and modules
1209
- - Status of build/test pipeline
1210
- - Identify technical debt and constraints
1211
- - External integration and authentication methods
1212
- - MoAI-ADK transition priority plan
1213
-
1214
- **Retention Policy**: Preserve existing documents in the "Legacy Context" section and mark items needing improvement with @CODE/TODO tags
1215
-
1216
- ## 🏷️ TAG system application rules
1217
-
1218
- **Automatically create @TAGs per section**:
1219
-
1220
- - Mission/Vision → @DOC:MISSION-XXX, @DOC:STRATEGY-XXX
1221
- - Customization → @SPEC:USER-XXX, @SPEC:PERSONA-XXX
1222
- - Problem analysis → @SPEC:PROBLEM-XXX, @SPEC:SOLUTION-XXX
1223
- - Architecture → @DOC:ARCHITECTURE-XXX, @SPEC:PATTERN-XXX
1224
- - Technology Stack → @DOC:STACK-XXX, @DOC:FRAMEWORK-XXX
1225
-
1226
- **Legacy Project Tags**:
1227
-
1228
- - Technical debt → @CODE:REFACTOR-XXX, @CODE:TEST-XXX, @CODE:MIGRATION-XXX
1229
- - Resolution plan → @CODE:MIGRATION-XXX, TODO:SPEC-BACKLOG-XXX
1230
- - Quality improvement → TODO:TEST-COVERAGE-XXX, TODO:DOCS-SYNC-XXX
1231
-
1232
- ## Error handling
1233
-
1234
- ### Common errors and solutions
1235
-
1236
- **Error 1**: Project language detection failed
1237
- ```
1238
- Symptom: "Language not detected" message
1239
- Solution: Specify language manually or create language-specific settings file
1240
- ```
1241
-
1242
- **Error 2**: Conflict with existing document
1243
- ```
1244
- Symptom: product.md already exists and has different contents
1245
- Solution: Preserve existing contents and add new contents in "Legacy Context" section
1246
- ```
1247
-
1248
- **Error 3**: Failed to create config.json
1249
- ```
1250
- Symptom: JSON syntax error or permission denied
1251
- Solution: Check file permissions (chmod 644) or create config.json manually
1252
- ```
1253
-
1254
- ---
1255
-
1256
- ## /alfred:0-project update: Template optimization (subcommand)
1257
-
1258
- > **Purpose**: After running moai-adk update, compare the backup and new template to optimize the template while preserving user customization.
1259
-
1260
- ### Execution conditions
1261
-
1262
- This subcommand is executed under the following conditions:
1263
-
1264
- 1. **After executing moai-adk update**: `optimized=false` status in `config.json`
1265
- 2. **Template update required**: When there is a difference between the backup and the new template
1266
- 3. **User explicit request**: User directly executes `/alfred:0-project update`
1267
-
1268
- ### Execution flow
1269
-
1270
- #### Phase 1: Backup analysis and comparison
1271
-
1272
- 1. **Make sure you have the latest backup**:
1273
- ```bash
1274
- # Browse the latest backups in the .moai-backups/ directory
1275
- ls -lt .moai-backups/ | head -1
1276
- ```
1277
-
1278
- 2. **Change Analysis**:
1279
- - Compare `.claude/` directory from backup with current template
1280
- - Compare `.moai/project/` document from backup with current document
1281
- - Identify user customization items
1282
-
1283
- 3. **Create Comparison Report**:
1284
- ```markdown
1285
- ## 📊 Template optimization analysis
1286
-
1287
- ### Changed items
1288
- - CLAUDE.md: "## Project Information" section needs to be preserved
1289
- - settings.json: 3 env variables need to be preserved
1290
- - product.md: Has user-written content
1291
-
1292
- ### Recommended Action
1293
- - Run Smart Merge
1294
- - Preserve User Customizations
1295
- - Set optimized=true
1296
- ```
1297
-
1298
- 4. **Waiting for user approval**
1299
- `AskUserQuestion tool (documented in moai-alfred-interactive-questions skill)` asks "Do you want to proceed with template optimization?" and provides the following options.
1300
- - **Proceed** → Phase 2 execution
1301
- - **Preview** → Display change details and recheck
1302
- - **Skip** → keep optimized=false
1303
-
1304
- #### Phase 2: Run smart merge (after user approval)
1305
-
1306
- 1. **Execute smart merge logic**:
1307
- - Run `TemplateProcessor.copy_templates()`
1308
- - CLAUDE.md: Preserve "## Project Information" section
1309
- - settings.json: env variables and permissions.allow merge
1310
-
1311
- 2. Set **optimized=true**:
1312
- ```python
1313
- # update config.json
1314
- config_data["project"]["optimized"] = True
1315
- ```
1316
-
1317
- 3. **Optimization completion report**:
1318
- ```markdown
1319
- ✅ Template optimization completed!
1320
-
1321
- 📄 Merged files:
1322
- - CLAUDE.md (preserves project information)
1323
- - settings.json (preserves env variables)
1324
-
1325
- ⚙️ config.json: optimized=true Configuration complete
1326
- ```
1327
-
1328
- ### Alfred Automation Strategy
1329
-
1330
- **Alfred automatic decision**:
1331
- - Automatically call project-manager agent
1332
- - Check backup freshness (within 24 hours)
1333
- - Automatically analyze changes
1334
-
1335
- **Auto-activation of Skills**:
1336
- - moai-alfred-tag-scanning: TAG chain verification
1337
- - moai-alfred-trust-validation: Verification of compliance with TRUST principles
1338
-
1339
- ### Running example
1340
-
1341
- ```bash
1342
- # After running moai-adk update
1343
- moai-adk update
1344
-
1345
- # Output:
1346
- # ✓ Update complete!
1347
- # ℹ️ Next step: Run /alfred:0-project update to optimize template changes
1348
-
1349
- # Run Alfred
1350
- /alfred:0-project update
1351
-
1352
- # → Phase 1: Generate backup analysis and comparison report
1353
- # → Wait for user approval
1354
- # → Phase 2: Run smart merge, set optimized=true
1355
- ```
1356
-
1357
- ### caution
1358
-
1359
- - **Backup required**: Cannot run without backup in `.moai-backups/` directory
1360
- - **Manual review recommended**: Preview is required if there are important customizations
1361
- - **Conflict resolution**: Request user selection in case of merge conflict
1362
-
1363
- ---
1364
-
1365
- ## 🚀 STEP 3: Project Custom Optimization (Optional)
1366
-
1367
- **Execution conditions**:
1368
- - After completion of Phase 2 (project initialization)
1369
- - or after completion of Phase 1.1 (backup merge)
1370
- - Explicitly requested by the user or automatically determined by Alfred
1371
-
1372
- **Purpose**: Lightweight by selecting only Commands, Agents, and Skills that fit the project characteristics (37 skills → 3~5)
1373
-
1374
- ### 3.1 Automatic execution of Feature Selection
1375
-
1376
- **Alfred automatically calls the moai-alfred-feature-selector skill**:
1377
-
1378
- **Skill Entry**:
1379
- - `.moai/project/product.md` (project category hint)
1380
- - `.moai/project/tech.md` (main language, framework)
1381
- - `.moai/config.json` (project settings)
1382
-
1383
- **Skill Output**:
1384
- ```json
1385
- {
1386
- "category": "web-api",
1387
- "language": "python",
1388
- "framework": "fastapi",
1389
- "commands": ["1-spec", "2-build", "3-sync"],
1390
- "agents": ["spec-builder", "code-builder", "doc-syncer", "git-manager", "debug-helper"],
1391
- "skills": ["moai-lang-python", "moai-domain-web-api", "moai-domain-backend"],
1392
- "excluded_skills_count": 34,
1393
- "optimization_rate": "87%"
1394
- }
1395
- ```
1396
-
1397
- **How ​​to Run**:
1398
- ```
1399
- Alfred: Skill("moai-alfred-feature-selector")
1400
- ```
1401
-
1402
- ---
1403
-
1404
- ### 3.2 Automatic execution of Template Generation
1405
-
1406
- **Alfred automatically calls the moai-alfred-template-generator skill**:
1407
-
1408
- **Skill input**:
1409
- - `.moai/.feature-selection.json` (feature-selector output)
1410
- - `CLAUDE.md` template
1411
- - Entire commands/agents/skills file
1412
-
1413
- **Skill Output**:
1414
- - `CLAUDE.md` (custom agent table - selected agents only)
1415
- - `.claude/commands/` (selected commands only)
1416
- - `.claude/agents/` (selected agents only)
1417
- - `.claude/skills/` (selected skills only)
1418
- - `.moai/config.json` (updates `optimized: true`)
1419
-
1420
- **How ​​to Run**:
1421
- ```
1422
- Alfred: Skill("moai-alfred-template-generator")
1423
- ```
1424
-
1425
- ---
1426
-
1427
- ### 3.3 Optimization completion report
1428
-
1429
- **Report Format**:
1430
- ```markdown
1431
- ✅ Project customized optimization completed!
1432
-
1433
- 📊 Optimization results:
1434
- - **Project**: MoAI-ADK
1435
- - **Category**: web-api
1436
- - **Main language**: python
1437
- - **Framework**: fastapi
1438
-
1439
- 🎯 Selected capabilities:
1440
- - Commands: 4 items (0-project, 1-spec, 2-build, 3-sync)
1441
- - Agents: 5 items (spec-builder, code-builder, doc-syncer, git-manager, debug-helper)
1442
- - Skills: 3 items (moai-lang-python, moai-domain-web-api, moai-domain-backend)
1443
-
1444
- 💡 Lightweight effect:
1445
- - Skills excluded: 34
1446
- - Lightweight: 87%
1447
- - CLAUDE.md: Create custom agent table
1448
-
1449
- 📋 Next steps:
1450
- 1. Check the CLAUDE.md file (only 5 agents are displayed)
1451
- 2. Run /alfred:1-plan "first function"
1452
- 3. Start the MoAI-ADK workflow
1453
- ```
1454
-
1455
- ---
1456
-
1457
- ### 3.4 Skip Phase 3 (optional)
1458
-
1459
- **Users can skip Phase 3**:
1460
-
1461
- **Skip condition**:
1462
- - User explicitly selects "Skip"
1463
- - "Simple project" when Alfred automatically determines (only basic features required)
1464
-
1465
- **Skip effect**:
1466
- - Maintain all 37 skills (no lightweighting)
1467
- - Maintain default 9 agents in CLAUDE.md template
1468
- - Maintain `optimized: false` in config.json
1469
-
1470
- ---
1471
-
1472
- ## Next steps
1473
-
1474
- **Recommendation**: For better performance and context management, start a new chat session with the `/clear` or `/new` command before proceeding to the next step.
1475
-
1476
- After initialization is complete:
1477
-
1478
- - **New project**: Run `/alfred:1-plan` to create design-based SPEC backlog
1479
- - **Legacy project**: Review @CODE/@CODE/TODO items in product/structure/tech document and confirm priority
1480
- - **Set Change**: Run `/alfred:0-project` again to update document
1481
- - **Template optimization**: Run `/alfred:0-project update` after `moai-adk update`
1482
-
1483
- ## Final Step
1484
-
1485
- After project initialization completes, Alfred automatically invokes AskUserQuestion to ask the user what to do next:
1486
-
1487
- ```python
1488
- AskUserQuestion(
1489
- questions=[
1490
- {
1491
- "question": "프로젝트 초기화가 완료되었습니다. 다음으로 뭘 하시겠습니까?",
1492
- "header": "다음 단계",
1493
- "multiSelect": false,
1494
- "options": [
1495
- {
1496
- "label": "📋 스펙 작성 진행",
1497
- "description": "/alfred:1-plan 실행하여 첫 SPEC 작성"
1498
- },
1499
- {
1500
- "label": "🔍 프로젝트 구조 검토",
1501
- "description": "생성된 문서 검토 및 수정"
1502
- },
1503
- {
1504
- "label": "🔄 새 세션 시작",
1505
- "description": "성능 최적화를 위해 /clear 실행"
1506
- }
1507
- ]
1508
- }
1509
- ]
1510
- )
1511
- ```
1512
-
1513
- **User Responses**:
1514
- - **📋 스펙 작성 진행**: Proceed to `/alfred:1-plan` for creating first SPEC
1515
- - **🔍 프로젝트 구조 검토**: Review and modify generated project documents
1516
- - **🔄 새 세션 시작**: Execute `/clear` to start fresh session (recommended for performance)
1517
-
1518
- ---
1519
-
1520
- ## Related commands
1521
-
1522
- - `/alfred:1-plan` - Start writing SPEC
1523
- - `/alfred:9-update` - MoAI-ADK update
1524
- - `moai doctor` - System diagnosis
1525
- - `moai status` - Check project status