moai-adk 0.11.0__py3-none-any.whl → 0.12.1__py3-none-any.whl

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

Potentially problematic release.


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

Files changed (265) hide show
  1. moai_adk/core/issue_creator.py +2 -2
  2. moai_adk/core/project/detector.py +285 -12
  3. moai_adk/templates/.claude/agents/alfred/cc-manager.md +316 -0
  4. moai_adk/templates/.claude/agents/alfred/debug-helper.md +208 -0
  5. moai_adk/templates/.claude/agents/alfred/doc-syncer.md +214 -0
  6. moai_adk/templates/.claude/agents/alfred/git-manager.md +406 -0
  7. moai_adk/templates/.claude/agents/alfred/implementation-planner.md +350 -0
  8. moai_adk/templates/.claude/agents/alfred/project-manager.md +273 -0
  9. moai_adk/templates/.claude/agents/alfred/quality-gate.md +343 -0
  10. moai_adk/templates/.claude/agents/alfred/skill-factory.md +865 -0
  11. moai_adk/templates/.claude/agents/alfred/spec-builder.md +287 -0
  12. moai_adk/templates/.claude/agents/alfred/tag-agent.md +287 -0
  13. moai_adk/templates/.claude/agents/alfred/tdd-implementer.md +326 -0
  14. moai_adk/templates/.claude/agents/alfred/trust-checker.md +375 -0
  15. moai_adk/templates/.claude/commands/alfred/0-project.md +1187 -0
  16. moai_adk/templates/.claude/commands/alfred/1-plan.md +734 -0
  17. moai_adk/templates/.claude/commands/alfred/2-run.md +551 -0
  18. moai_adk/templates/.claude/commands/alfred/3-sync.md +689 -0
  19. moai_adk/templates/.claude/commands/alfred/9-feedback.md +149 -0
  20. moai_adk/templates/.claude/hooks/alfred/alfred_hooks.py +208 -0
  21. moai_adk/templates/.claude/hooks/alfred/core/project.py +744 -0
  22. moai_adk/templates/.claude/hooks/alfred/core/timeout.py +136 -0
  23. moai_adk/templates/.claude/hooks/alfred/core/ttl_cache.py +109 -0
  24. moai_adk/templates/.claude/hooks/alfred/core/version_cache.py +198 -0
  25. moai_adk/templates/.claude/hooks/alfred/notification__handle_events.py +94 -0
  26. moai_adk/templates/.claude/hooks/alfred/post_tool__log_changes.py +94 -0
  27. moai_adk/templates/.claude/hooks/alfred/pre_tool__auto_checkpoint.py +100 -0
  28. moai_adk/templates/.claude/hooks/alfred/session_end__cleanup.py +94 -0
  29. moai_adk/templates/.claude/hooks/alfred/session_start__show_project_info.py +94 -0
  30. moai_adk/templates/.claude/hooks/alfred/shared/core/__init__.py +170 -0
  31. moai_adk/templates/.claude/hooks/alfred/shared/core/checkpoint.py +271 -0
  32. moai_adk/templates/.claude/hooks/alfred/shared/core/context.py +67 -0
  33. moai_adk/templates/.claude/hooks/alfred/shared/core/project.py +749 -0
  34. moai_adk/templates/.claude/hooks/alfred/shared/core/tags.py +230 -0
  35. moai_adk/templates/.claude/hooks/alfred/shared/core/version_cache.py +198 -0
  36. moai_adk/templates/.claude/hooks/alfred/shared/handlers/__init__.py +21 -0
  37. moai_adk/templates/.claude/hooks/alfred/shared/handlers/notification.py +156 -0
  38. moai_adk/templates/.claude/hooks/alfred/shared/handlers/session.py +174 -0
  39. moai_adk/templates/.claude/hooks/alfred/shared/handlers/tool.py +87 -0
  40. moai_adk/templates/.claude/hooks/alfred/shared/handlers/user.py +61 -0
  41. moai_adk/templates/.claude/hooks/alfred/stop__handle_interrupt.py +94 -0
  42. moai_adk/templates/.claude/hooks/alfred/subagent_stop__handle_subagent_end.py +94 -0
  43. moai_adk/templates/.claude/hooks/alfred/user_prompt__jit_load_docs.py +111 -0
  44. moai_adk/templates/.claude/hooks/alfred/utils/__init__.py +1 -0
  45. moai_adk/templates/.claude/hooks/alfred/utils/timeout.py +136 -0
  46. moai_adk/templates/.claude/output-styles/alfred/agentic-coding.md +640 -0
  47. moai_adk/templates/.claude/output-styles/alfred/moai-adk-learning.md +696 -0
  48. moai_adk/templates/.claude/output-styles/alfred/study-with-alfred.md +474 -0
  49. moai_adk/templates/.claude/settings.json +144 -0
  50. moai_adk/templates/.claude/skills/moai-alfred-ears-authoring/SKILL.md +113 -0
  51. moai_adk/templates/.claude/skills/moai-alfred-ears-authoring/examples.md +29 -0
  52. moai_adk/templates/.claude/skills/moai-alfred-ears-authoring/reference.md +28 -0
  53. moai_adk/templates/.claude/skills/moai-alfred-git-workflow/SKILL.md +122 -0
  54. moai_adk/templates/.claude/skills/moai-alfred-git-workflow/examples.md +29 -0
  55. moai_adk/templates/.claude/skills/moai-alfred-git-workflow/reference.md +29 -0
  56. moai_adk/templates/.claude/skills/moai-alfred-interactive-questions/SKILL.md +237 -0
  57. moai_adk/templates/.claude/skills/moai-alfred-interactive-questions/examples.md +615 -0
  58. moai_adk/templates/.claude/skills/moai-alfred-interactive-questions/reference.md +653 -0
  59. moai_adk/templates/.claude/skills/moai-alfred-language-detection/SKILL.md +113 -0
  60. moai_adk/templates/.claude/skills/moai-alfred-language-detection/examples.md +29 -0
  61. moai_adk/templates/.claude/skills/moai-alfred-language-detection/reference.md +28 -0
  62. moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-validation/SKILL.md +113 -0
  63. moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-validation/examples.md +29 -0
  64. moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-validation/reference.md +28 -0
  65. moai_adk/templates/.claude/skills/moai-alfred-tag-scanning/SKILL.md +113 -0
  66. moai_adk/templates/.claude/skills/moai-alfred-tag-scanning/examples.md +29 -0
  67. moai_adk/templates/.claude/skills/moai-alfred-tag-scanning/reference.md +28 -0
  68. moai_adk/templates/.claude/skills/moai-alfred-trust-validation/SKILL.md +113 -0
  69. moai_adk/templates/.claude/skills/moai-alfred-trust-validation/examples.md +29 -0
  70. moai_adk/templates/.claude/skills/moai-alfred-trust-validation/reference.md +28 -0
  71. moai_adk/templates/.claude/skills/moai-cc-agents/SKILL.md +269 -0
  72. moai_adk/templates/.claude/skills/moai-cc-agents/templates/agent-template.md +32 -0
  73. moai_adk/templates/.claude/skills/moai-cc-claude-md/SKILL.md +298 -0
  74. moai_adk/templates/.claude/skills/moai-cc-claude-md/templates/CLAUDE-template.md +26 -0
  75. moai_adk/templates/.claude/skills/moai-cc-commands/SKILL.md +307 -0
  76. moai_adk/templates/.claude/skills/moai-cc-commands/templates/command-template.md +21 -0
  77. moai_adk/templates/.claude/skills/moai-cc-hooks/SKILL.md +252 -0
  78. moai_adk/templates/.claude/skills/moai-cc-hooks/scripts/pre-bash-check.sh +19 -0
  79. moai_adk/templates/.claude/skills/moai-cc-hooks/scripts/preserve-permissions.sh +19 -0
  80. moai_adk/templates/.claude/skills/moai-cc-hooks/scripts/validate-bash-command.py +24 -0
  81. moai_adk/templates/.claude/skills/moai-cc-mcp-plugins/SKILL.md +199 -0
  82. moai_adk/templates/.claude/skills/moai-cc-mcp-plugins/templates/settings-mcp-template.json +39 -0
  83. moai_adk/templates/.claude/skills/moai-cc-memory/SKILL.md +316 -0
  84. moai_adk/templates/.claude/skills/moai-cc-memory/templates/session-summary-template.md +18 -0
  85. moai_adk/templates/.claude/skills/moai-cc-settings/SKILL.md +263 -0
  86. moai_adk/templates/.claude/skills/moai-cc-settings/templates/settings-complete-template.json +30 -0
  87. moai_adk/templates/.claude/skills/moai-cc-skills/SKILL.md +291 -0
  88. moai_adk/templates/.claude/skills/moai-cc-skills/templates/SKILL-template.md +15 -0
  89. moai_adk/templates/.claude/skills/moai-domain-backend/SKILL.md +290 -0
  90. moai_adk/templates/.claude/skills/moai-domain-backend/examples.md +1633 -0
  91. moai_adk/templates/.claude/skills/moai-domain-backend/reference.md +660 -0
  92. moai_adk/templates/.claude/skills/moai-domain-cli-tool/SKILL.md +123 -0
  93. moai_adk/templates/.claude/skills/moai-domain-cli-tool/examples.md +29 -0
  94. moai_adk/templates/.claude/skills/moai-domain-cli-tool/reference.md +30 -0
  95. moai_adk/templates/.claude/skills/moai-domain-data-science/SKILL.md +123 -0
  96. moai_adk/templates/.claude/skills/moai-domain-data-science/examples.md +29 -0
  97. moai_adk/templates/.claude/skills/moai-domain-data-science/reference.md +30 -0
  98. moai_adk/templates/.claude/skills/moai-domain-database/SKILL.md +123 -0
  99. moai_adk/templates/.claude/skills/moai-domain-database/examples.md +29 -0
  100. moai_adk/templates/.claude/skills/moai-domain-database/reference.md +30 -0
  101. moai_adk/templates/.claude/skills/moai-domain-devops/SKILL.md +124 -0
  102. moai_adk/templates/.claude/skills/moai-domain-devops/examples.md +29 -0
  103. moai_adk/templates/.claude/skills/moai-domain-devops/reference.md +31 -0
  104. moai_adk/templates/.claude/skills/moai-domain-frontend/SKILL.md +124 -0
  105. moai_adk/templates/.claude/skills/moai-domain-frontend/examples.md +29 -0
  106. moai_adk/templates/.claude/skills/moai-domain-frontend/reference.md +31 -0
  107. moai_adk/templates/.claude/skills/moai-domain-ml/SKILL.md +123 -0
  108. moai_adk/templates/.claude/skills/moai-domain-ml/examples.md +29 -0
  109. moai_adk/templates/.claude/skills/moai-domain-ml/reference.md +30 -0
  110. moai_adk/templates/.claude/skills/moai-domain-mobile-app/SKILL.md +123 -0
  111. moai_adk/templates/.claude/skills/moai-domain-mobile-app/examples.md +29 -0
  112. moai_adk/templates/.claude/skills/moai-domain-mobile-app/reference.md +30 -0
  113. moai_adk/templates/.claude/skills/moai-domain-security/SKILL.md +123 -0
  114. moai_adk/templates/.claude/skills/moai-domain-security/examples.md +29 -0
  115. moai_adk/templates/.claude/skills/moai-domain-security/reference.md +30 -0
  116. moai_adk/templates/.claude/skills/moai-domain-web-api/SKILL.md +123 -0
  117. moai_adk/templates/.claude/skills/moai-domain-web-api/examples.md +29 -0
  118. moai_adk/templates/.claude/skills/moai-domain-web-api/reference.md +30 -0
  119. moai_adk/templates/.claude/skills/moai-essentials-debug/SKILL.md +303 -0
  120. moai_adk/templates/.claude/skills/moai-essentials-debug/examples.md +1064 -0
  121. moai_adk/templates/.claude/skills/moai-essentials-debug/reference.md +1047 -0
  122. moai_adk/templates/.claude/skills/moai-essentials-perf/SKILL.md +113 -0
  123. moai_adk/templates/.claude/skills/moai-essentials-perf/examples.md +29 -0
  124. moai_adk/templates/.claude/skills/moai-essentials-perf/reference.md +28 -0
  125. moai_adk/templates/.claude/skills/moai-essentials-refactor/SKILL.md +113 -0
  126. moai_adk/templates/.claude/skills/moai-essentials-refactor/examples.md +29 -0
  127. moai_adk/templates/.claude/skills/moai-essentials-refactor/reference.md +28 -0
  128. moai_adk/templates/.claude/skills/moai-essentials-review/SKILL.md +113 -0
  129. moai_adk/templates/.claude/skills/moai-essentials-review/examples.md +29 -0
  130. moai_adk/templates/.claude/skills/moai-essentials-review/reference.md +28 -0
  131. moai_adk/templates/.claude/skills/moai-foundation-ears/SKILL.md +116 -0
  132. moai_adk/templates/.claude/skills/moai-foundation-ears/examples.md +29 -0
  133. moai_adk/templates/.claude/skills/moai-foundation-ears/reference.md +28 -0
  134. moai_adk/templates/.claude/skills/moai-foundation-git/SKILL.md +122 -0
  135. moai_adk/templates/.claude/skills/moai-foundation-git/examples.md +29 -0
  136. moai_adk/templates/.claude/skills/moai-foundation-git/reference.md +29 -0
  137. moai_adk/templates/.claude/skills/moai-foundation-langs/SKILL.md +113 -0
  138. moai_adk/templates/.claude/skills/moai-foundation-langs/examples.md +29 -0
  139. moai_adk/templates/.claude/skills/moai-foundation-langs/reference.md +28 -0
  140. moai_adk/templates/.claude/skills/moai-foundation-specs/SKILL.md +113 -0
  141. moai_adk/templates/.claude/skills/moai-foundation-specs/examples.md +29 -0
  142. moai_adk/templates/.claude/skills/moai-foundation-specs/reference.md +28 -0
  143. moai_adk/templates/.claude/skills/moai-foundation-tags/SKILL.md +113 -0
  144. moai_adk/templates/.claude/skills/moai-foundation-tags/examples.md +29 -0
  145. moai_adk/templates/.claude/skills/moai-foundation-tags/reference.md +28 -0
  146. moai_adk/templates/.claude/skills/moai-foundation-trust/SKILL.md +307 -0
  147. moai_adk/templates/.claude/skills/moai-foundation-trust/examples.md +0 -0
  148. moai_adk/templates/.claude/skills/moai-foundation-trust/reference.md +1099 -0
  149. moai_adk/templates/.claude/skills/moai-lang-c/SKILL.md +124 -0
  150. moai_adk/templates/.claude/skills/moai-lang-c/examples.md +29 -0
  151. moai_adk/templates/.claude/skills/moai-lang-c/reference.md +31 -0
  152. moai_adk/templates/.claude/skills/moai-lang-cpp/SKILL.md +124 -0
  153. moai_adk/templates/.claude/skills/moai-lang-cpp/examples.md +29 -0
  154. moai_adk/templates/.claude/skills/moai-lang-cpp/reference.md +31 -0
  155. moai_adk/templates/.claude/skills/moai-lang-csharp/SKILL.md +123 -0
  156. moai_adk/templates/.claude/skills/moai-lang-csharp/examples.md +29 -0
  157. moai_adk/templates/.claude/skills/moai-lang-csharp/reference.md +30 -0
  158. moai_adk/templates/.claude/skills/moai-lang-dart/SKILL.md +123 -0
  159. moai_adk/templates/.claude/skills/moai-lang-dart/examples.md +29 -0
  160. moai_adk/templates/.claude/skills/moai-lang-dart/reference.md +30 -0
  161. moai_adk/templates/.claude/skills/moai-lang-go/SKILL.md +124 -0
  162. moai_adk/templates/.claude/skills/moai-lang-go/examples.md +29 -0
  163. moai_adk/templates/.claude/skills/moai-lang-go/reference.md +31 -0
  164. moai_adk/templates/.claude/skills/moai-lang-java/SKILL.md +124 -0
  165. moai_adk/templates/.claude/skills/moai-lang-java/examples.md +29 -0
  166. moai_adk/templates/.claude/skills/moai-lang-java/reference.md +31 -0
  167. moai_adk/templates/.claude/skills/moai-lang-javascript/SKILL.md +125 -0
  168. moai_adk/templates/.claude/skills/moai-lang-javascript/examples.md +29 -0
  169. moai_adk/templates/.claude/skills/moai-lang-javascript/reference.md +32 -0
  170. moai_adk/templates/.claude/skills/moai-lang-kotlin/SKILL.md +124 -0
  171. moai_adk/templates/.claude/skills/moai-lang-kotlin/examples.md +29 -0
  172. moai_adk/templates/.claude/skills/moai-lang-kotlin/reference.md +31 -0
  173. moai_adk/templates/.claude/skills/moai-lang-php/SKILL.md +123 -0
  174. moai_adk/templates/.claude/skills/moai-lang-php/examples.md +29 -0
  175. moai_adk/templates/.claude/skills/moai-lang-php/reference.md +30 -0
  176. moai_adk/templates/.claude/skills/moai-lang-python/SKILL.md +431 -0
  177. moai_adk/templates/.claude/skills/moai-lang-python/examples.md +624 -0
  178. moai_adk/templates/.claude/skills/moai-lang-python/reference.md +316 -0
  179. moai_adk/templates/.claude/skills/moai-lang-r/SKILL.md +123 -0
  180. moai_adk/templates/.claude/skills/moai-lang-r/examples.md +29 -0
  181. moai_adk/templates/.claude/skills/moai-lang-r/reference.md +30 -0
  182. moai_adk/templates/.claude/skills/moai-lang-ruby/SKILL.md +124 -0
  183. moai_adk/templates/.claude/skills/moai-lang-ruby/examples.md +29 -0
  184. moai_adk/templates/.claude/skills/moai-lang-ruby/reference.md +31 -0
  185. moai_adk/templates/.claude/skills/moai-lang-rust/SKILL.md +124 -0
  186. moai_adk/templates/.claude/skills/moai-lang-rust/examples.md +29 -0
  187. moai_adk/templates/.claude/skills/moai-lang-rust/reference.md +31 -0
  188. moai_adk/templates/.claude/skills/moai-lang-scala/SKILL.md +123 -0
  189. moai_adk/templates/.claude/skills/moai-lang-scala/examples.md +29 -0
  190. moai_adk/templates/.claude/skills/moai-lang-scala/reference.md +30 -0
  191. moai_adk/templates/.claude/skills/moai-lang-shell/SKILL.md +123 -0
  192. moai_adk/templates/.claude/skills/moai-lang-shell/examples.md +29 -0
  193. moai_adk/templates/.claude/skills/moai-lang-shell/reference.md +30 -0
  194. moai_adk/templates/.claude/skills/moai-lang-sql/SKILL.md +124 -0
  195. moai_adk/templates/.claude/skills/moai-lang-sql/examples.md +29 -0
  196. moai_adk/templates/.claude/skills/moai-lang-sql/reference.md +31 -0
  197. moai_adk/templates/.claude/skills/moai-lang-swift/SKILL.md +123 -0
  198. moai_adk/templates/.claude/skills/moai-lang-swift/examples.md +29 -0
  199. moai_adk/templates/.claude/skills/moai-lang-swift/reference.md +30 -0
  200. moai_adk/templates/.claude/skills/moai-lang-typescript/SKILL.md +127 -0
  201. moai_adk/templates/.claude/skills/moai-lang-typescript/examples.md +29 -0
  202. moai_adk/templates/.claude/skills/moai-lang-typescript/reference.md +34 -0
  203. moai_adk/templates/.claude/skills/moai-skill-factory/CHECKLIST.md +482 -0
  204. moai_adk/templates/.claude/skills/moai-skill-factory/EXAMPLES.md +278 -0
  205. moai_adk/templates/.claude/skills/moai-skill-factory/INTERACTIVE-DISCOVERY.md +524 -0
  206. moai_adk/templates/.claude/skills/moai-skill-factory/METADATA.md +477 -0
  207. moai_adk/templates/.claude/skills/moai-skill-factory/PARALLEL-ANALYSIS-REPORT.md +429 -0
  208. moai_adk/templates/.claude/skills/moai-skill-factory/PYTHON-VERSION-MATRIX.md +391 -0
  209. moai_adk/templates/.claude/skills/moai-skill-factory/SKILL-FACTORY-WORKFLOW.md +431 -0
  210. moai_adk/templates/.claude/skills/moai-skill-factory/SKILL-UPDATE-ADVISOR.md +577 -0
  211. moai_adk/templates/.claude/skills/moai-skill-factory/SKILL.md +271 -0
  212. moai_adk/templates/.claude/skills/moai-skill-factory/STEP-BY-STEP-GUIDE.md +466 -0
  213. moai_adk/templates/.claude/skills/moai-skill-factory/STRUCTURE.md +583 -0
  214. moai_adk/templates/.claude/skills/moai-skill-factory/WEB-RESEARCH.md +526 -0
  215. moai_adk/templates/.claude/skills/moai-skill-factory/reference.md +465 -0
  216. moai_adk/templates/.claude/skills/moai-skill-factory/scripts/generate-structure.sh +328 -0
  217. moai_adk/templates/.claude/skills/moai-skill-factory/scripts/validate-skill.sh +312 -0
  218. moai_adk/templates/.claude/skills/moai-skill-factory/templates/SKILL_TEMPLATE.md +245 -0
  219. moai_adk/templates/.claude/skills/moai-skill-factory/templates/examples-template.md +285 -0
  220. moai_adk/templates/.claude/skills/moai-skill-factory/templates/reference-template.md +278 -0
  221. moai_adk/templates/.claude/skills/moai-skill-factory/templates/scripts-template.sh +303 -0
  222. moai_adk/templates/.claude/skills/moai-spec-authoring/README.md +137 -0
  223. moai_adk/templates/.claude/skills/moai-spec-authoring/SKILL.md +219 -0
  224. moai_adk/templates/.claude/skills/moai-spec-authoring/examples/validate-spec.sh +161 -0
  225. moai_adk/templates/.claude/skills/moai-spec-authoring/examples.md +541 -0
  226. moai_adk/templates/.claude/skills/moai-spec-authoring/reference.md +622 -0
  227. moai_adk/templates/.github/workflows/c-tag-validation.yml +83 -0
  228. moai_adk/templates/.github/workflows/cpp-tag-validation.yml +79 -0
  229. moai_adk/templates/.github/workflows/csharp-tag-validation.yml +65 -0
  230. moai_adk/templates/.github/workflows/dart-tag-validation.yml +82 -0
  231. moai_adk/templates/.github/workflows/java-tag-validation.yml +75 -0
  232. moai_adk/templates/.github/workflows/kotlin-tag-validation.yml +67 -0
  233. moai_adk/templates/.github/workflows/php-tag-validation.yml +56 -0
  234. moai_adk/templates/.github/workflows/ruby-tag-validation.yml +68 -0
  235. moai_adk/templates/.github/workflows/rust-tag-validation.yml +73 -0
  236. moai_adk/templates/.github/workflows/shell-tag-validation.yml +65 -0
  237. moai_adk/templates/.github/workflows/swift-tag-validation.yml +79 -0
  238. moai_adk/templates/.moai/config.json +113 -0
  239. moai_adk/templates/.moai/memory/CLAUDE-AGENTS-GUIDE.md +208 -0
  240. moai_adk/templates/.moai/memory/CLAUDE-PRACTICES.md +369 -0
  241. moai_adk/templates/.moai/memory/CLAUDE-RULES.md +539 -0
  242. moai_adk/templates/.moai/memory/DEVELOPMENT-GUIDE.md +344 -0
  243. moai_adk/templates/.moai/memory/GITFLOW-PROTECTION-POLICY.md +330 -0
  244. moai_adk/templates/.moai/memory/ISSUE-LABEL-MAPPING.md +150 -0
  245. moai_adk/templates/.moai/memory/SKILLS-DESCRIPTION-POLICY.md +218 -0
  246. moai_adk/templates/.moai/memory/SPEC-METADATA.md +356 -0
  247. moai_adk/templates/.moai/memory/gitflow-protection-policy.md +330 -0
  248. moai_adk/templates/.moai/memory/spec-metadata.md +356 -0
  249. moai_adk/templates/.moai/project/product.md +161 -0
  250. moai_adk/templates/.moai/project/structure.md +156 -0
  251. moai_adk/templates/.moai/project/tech.md +227 -0
  252. moai_adk/templates/CLAUDE.md +90 -10
  253. moai_adk/templates/workflows/go-tag-validation.yml +130 -0
  254. moai_adk/templates/workflows/javascript-tag-validation.yml +135 -0
  255. moai_adk/templates/workflows/python-tag-validation.yml +118 -0
  256. moai_adk/templates/workflows/typescript-tag-validation.yml +154 -0
  257. {moai_adk-0.11.0.dist-info → moai_adk-0.12.1.dist-info}/METADATA +43 -1
  258. moai_adk-0.12.1.dist-info/RECORD +330 -0
  259. moai_adk-0.11.0.dist-info/RECORD +0 -77
  260. /moai_adk/templates/.github/workflows/{release.yml → moai-adk-release.yml} +0 -0
  261. /moai_adk/templates/.github/workflows/{spec-issue-sync.yml → moai-adk-spec-issue-sync.yml} +0 -0
  262. /moai_adk/templates/.github/workflows/{tag-validation.yml → moai-adk-tag-validation.yml} +0 -0
  263. {moai_adk-0.11.0.dist-info → moai_adk-0.12.1.dist-info}/WHEEL +0 -0
  264. {moai_adk-0.11.0.dist-info → moai_adk-0.12.1.dist-info}/entry_points.txt +0 -0
  265. {moai_adk-0.11.0.dist-info → moai_adk-0.12.1.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,1187 @@
1
+ ---
2
+ name: alfred:0-project
3
+ description: "Initialize project document - create product/structure/tech.md and set optimization for each language"
4
+ # Translations:
5
+ # - ko: "프로젝트 문서 초기화 - product/structure/tech.md 생성 및 언어별 최적화 설정"
6
+ # - ja: "プロジェクト文書の初期化 - product/structure/tech.mdの作成と言語別最適化設定"
7
+ # - zh: "初始化项目文档 - 创建product/structure/tech.md并设置语言优化"
8
+ allowed-tools:
9
+ - Read
10
+ - Write
11
+ - Edit
12
+ - MultiEdit
13
+ - Grep
14
+ - Glob
15
+ - TodoWrite
16
+ - Bash(ls:*)
17
+ - Bash(find:*)
18
+ - Bash(cat:*)
19
+ - Task
20
+ ---
21
+
22
+ # 📋 MoAI-ADK Step 0: Initialize/Update Universal Language Support Project Documentation
23
+ > **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.
24
+
25
+ ## 🎯 Command Purpose
26
+
27
+ Automatically analyzes the project environment to create/update product/structure/tech.md documents and configure language-specific optimization settings.
28
+
29
+ ## 📋 Execution flow
30
+
31
+ 0. **Conversation Language Selection**: User selects the language for all dialogs and documentation
32
+ 1. **Environment Analysis**: Automatically detect project type (new/legacy) and codebase language
33
+ 2. **Establishment of interview strategy**: Select question tree suited to project characteristics
34
+ 3. **User Verification**: Review and approve interview plan
35
+ 4. **Create project documentation**: Create product/structure/tech.md in the selected language
36
+ 5. **Create configuration file**: config.json auto-configuration
37
+
38
+ ## 🧠 Associated Skills & Agents
39
+
40
+ | Agent | Core Skill | Purpose |
41
+ | --------------- | -------------------------------- | --------------------------------------------- |
42
+ | project-manager | `moai-alfred-language-detection` | Initialize project and interview requirements |
43
+ | trust-checker | `moai-alfred-trust-validation` | Verify initial project structure (optional) |
44
+
45
+ **Note**: TUI Survey Skill is used for user confirmations during project initialization and is shared across all interactive prompts.
46
+
47
+ ## 🔗 Associated Agent
48
+
49
+ - **Primary**: project-manager (📋 planner) - Dedicated to project initialization
50
+ - **Quality Check**: trust-checker (✅ Quality assurance lead) - Initial structural verification (optional)
51
+ - **Secondary**: None (standalone execution)
52
+
53
+ ## 💡 Example of use
54
+
55
+ The user executes the `/alfred:8-project` command to analyze the project and create/update documents.
56
+
57
+ ## Command Overview
58
+
59
+ It is a systematic initialization system that analyzes the project environment and creates/updates product/structure/tech.md documents.
60
+
61
+ - **Automatically detect language**: Automatically recognize Python, TypeScript, Java, Go, Rust, etc.
62
+ - **Project type classification**: Automatically determine new vs. existing projects
63
+ - **High-performance initialization**: Achieve 0.18 second initialization with TypeScript-based CLI
64
+ - **2-step workflow**: 1) Analysis and planning → 2) Execution after user approval
65
+
66
+ ## How to use
67
+
68
+ The user executes the `/alfred:8-project` command to start analyzing the project and creating/updating documents.
69
+
70
+ **Automatic processing**:
71
+ - Update mode if there is an existing `.moai/project/` document
72
+ - New creation mode if there is no document
73
+ - Automatic detection of language and project type
74
+
75
+ ## ⚠️ Prohibitions
76
+
77
+ **What you should never do**:
78
+
79
+ - ❌ Create a file in the `.claude/memory/` directory
80
+ - ❌ Create a file `.claude/commands/alfred/*.json`
81
+ - ❌ Unnecessary overwriting of existing documents
82
+ - ❌ Date and numerical prediction (“within 3 months”, “50% reduction”) etc.)
83
+ - ❌ Hypothetical scenarios, expected market size, future technology trend predictions
84
+
85
+ **Expressions to use**:
86
+
87
+ - ✅ "High/medium/low priority"
88
+ - ✅ "Immediately needed", "step-by-step improvements"
89
+ - ✅ Current facts
90
+ - ✅ Existing technology stack
91
+ - ✅ Real problems
92
+
93
+ ---
94
+
95
+ ## 🚀 STEP 0: 초기 설정 - 언어 및 사용자 정보 선택
96
+
97
+ **목적**: 프로젝트 초기화 시작 전에 대화 언어를 설정하고 사용자 닉네임을 등록합니다. 이 설정은 모든 Alfred 프롬프트, 인터뷰 질문 및 생성된 문서에 적용됩니다.
98
+
99
+ **UX 개선**: 2개 질문을 **1회 배치 호출**로 통합 (50% 상호작용 감소: 2 turns → 1 turn)
100
+
101
+ ### 0.0 Alfred 자기소개 및 환영 인사
102
+
103
+ Alfred가 첫 상호작용으로 다음과 같이 인사합니다:
104
+
105
+ ```
106
+ 안녕하세요! 👋 저는 Alfred입니다.
107
+ MoAI-ADK의 SuperAgent로서 당신의 프로젝트를 함께 만들어갈 준비가 되어 있습니다.
108
+
109
+ 앞으로의 모든 대화에서 당신을 편하게 부르기 위해,
110
+ 먼저 기본 설정을 진행하겠습니다.
111
+ ```
112
+
113
+ ### 0.1 배치 설계: 언어 선택 + 사용자 닉네임 수집 (1회 호출)
114
+
115
+ Alfred가 `AskUserQuestion tool (documented in moai-alfred-interactive-questions skill)` 를 사용하여 **단일 배치 호출**로 언어와 닉네임을 동시에 수집합니다:
116
+
117
+ **Example AskUserQuestion Call**:
118
+ ```python
119
+ AskUserQuestion(
120
+ questions=[
121
+ {
122
+ "question": "Which language would you like to use for the project initialization and documentation?",
123
+ "header": "Language",
124
+ "multiSelect": false,
125
+ "options": [
126
+ {
127
+ "label": "🌍 English",
128
+ "description": "All dialogs and documentation in English"
129
+ },
130
+ {
131
+ "label": "🇰🇷 한국어",
132
+ "description": "All dialogs and documentation in Korean"
133
+ },
134
+ {
135
+ "label": "🇯🇵 日本語",
136
+ "description": "All dialogs and documentation in Japanese"
137
+ },
138
+ {
139
+ "label": "🇨🇳 中文",
140
+ "description": "All dialogs and documentation in Chinese"
141
+ }
142
+ ]
143
+ },
144
+ {
145
+ "question": "How would you like to be called in our conversations? (e.g., GOOS, Team Lead, Developer, or custom name - max 20 chars)",
146
+ "header": "Nickname",
147
+ "multiSelect": false,
148
+ "options": [
149
+ {
150
+ "label": "Enter custom nickname",
151
+ "description": "Type your preferred name using the 'Other' option below"
152
+ }
153
+ ]
154
+ }
155
+ ]
156
+ )
157
+ ```
158
+
159
+ **User Response Example**:
160
+ ```
161
+ Selected Language: 🇰🇷 한국어
162
+ Selected Nickname: GOOS (typed via "Other" option)
163
+ ```
164
+
165
+ ### 0.2 사용자 정보 저장
166
+
167
+ Alfred가 선택된 언어와 닉네임을 다음과 같이 저장합니다:
168
+
169
+ ```json
170
+ {
171
+ "conversation_language": "ko",
172
+ "conversation_language_name": "한국어",
173
+ "user_nickname": "GOOS",
174
+ "selected_at": "2025-10-23T12:34:56Z"
175
+ }
176
+ ```
177
+
178
+ 이 정보는:
179
+ - 모든 sub-agents 에게 컨텍스트 파라미터로 전달됨
180
+ - `.moai/config.json` 의 `language` 및 `user` 필드에 저장됨
181
+ - CLAUDE.md의 `{{CONVERSATION_LANGUAGE}}` 및 `{{USER_NICKNAME}}` 변수로 치환됨
182
+ - 모든 Alfred 대화에서 사용됨
183
+
184
+ **설정 완료 출력 예시**:
185
+ ```markdown
186
+ ✅ 초기 설정 완료!
187
+
188
+ 언어: 한국어 (ko)
189
+ 닉네임: GOOS
190
+
191
+ 이제 GOOS님의 프로젝트 환경 분석으로 진행하겠습니다...
192
+ ```
193
+
194
+ ### 0.3 STEP 1로 전환
195
+
196
+ 언어 및 사용자 정보 설정 완료 후, 모든 후속 상호작용이 선택된 언어로 진행됩니다:
197
+ - Alfred의 모든 프롬프트가 선택된 언어로 번역됨
198
+ - project-manager sub-agent이 언어 및 사용자 정보 파라미터를 수신
199
+ - 인터뷰 질문이 선택된 언어로 진행됨
200
+ - 생성된 문서 (product.md, structure.md, tech.md)가 선택된 언어로 작성됨
201
+ - CLAUDE.md가 선택된 언어와 사용자 닉네임을 표시함
202
+
203
+ ---
204
+
205
+ ## 🚀 STEP 1: Environmental analysis and interview plan development
206
+
207
+ Analyze the project environment and develop a systematic interview plan.
208
+
209
+ ### 1.0 Check backup directory (highest priority)
210
+
211
+ **Processing backup files after moai-adk init reinitialization**
212
+
213
+ Alfred first checks the `.moai-backups/` directory:
214
+
215
+ ```bash
216
+ # Check latest backup timestamp
217
+ ls -t .moai-backups/ | head -1
218
+
219
+ # Check the optimized flag in config.json
220
+ grep "optimized" .moai/config.json
221
+ ```
222
+
223
+ **Backup existence conditions**:
224
+ - `.moai-backups/` directory exists
225
+ - `.moai/project/*.md` file exists in the latest backup folder
226
+ - `optimized: false` in `config.json` (immediately after reinitialization)
227
+
228
+ **Select user if backup exists**
229
+ Call `AskUserQuestion tool (documented in moai-alfred-interactive-questions skill)` to display a TUI with the following options:
230
+ - **Merge**: Merge backup contents and latest template (recommended)
231
+ - **New**: Ignore the backup and start a new interview
232
+ - **Skip**: Keep current file (terminate task)
233
+
234
+ **Response processing**:
235
+ - **"Merge"** → Proceed to Phase 1.1 (backup merge workflow)
236
+ - **"Create new"** → Proceed to Phase 1.2 (Project environment analysis) (existing process)
237
+ - **"Skip"** → End task
238
+
239
+ **No backup or optimized: true**:
240
+ - Proceed directly to Phase 1.2 (project environment analysis)
241
+
242
+ ---
243
+
244
+ ### 1.1 Backup merge workflow (when user selects “Merge”)
245
+
246
+ **Purpose**: Restore only user customizations while maintaining the latest template structure.
247
+
248
+ **STEP 1: Read backup file**
249
+
250
+ Alfred reads files from the latest backup directory:
251
+ ```bash
252
+ # Latest backup directory path
253
+ BACKUP_DIR=.moai-backups/$(ls -t .moai-backups/ | head -1)
254
+
255
+ # Read backup file
256
+ Read $BACKUP_DIR/.moai/project/product.md
257
+ Read $BACKUP_DIR/.moai/project/structure.md
258
+ Read $BACKUP_DIR/.moai/project/tech.md
259
+ Read $BACKUP_DIR/CLAUDE.md
260
+ ```
261
+
262
+ **STEP 2: Detect template defaults**
263
+
264
+ The following patterns are considered "template defaults" (not merged):
265
+ - "Define your key user base"
266
+ - "Describe the core problem you are trying to solve"
267
+ - "List the strengths and differences of your project"
268
+ - "MoAI-ADK", "MoAI-Agentic Development Kit", etc. Variable format
269
+ - Guide phrases such as "Example:", "Sample:", "Example:", etc.
270
+
271
+ **STEP 3: Extract user customization**
272
+
273
+ Extract only **non-template default content** from the backup file:
274
+ - `product.md`:
275
+ - Define your actual user base in the USER section
276
+ - Describe the actual problem in the PROBLEM section
277
+ - Real differences in the STRATEGY section
278
+ - Actual success metrics in the SUCCESS section
279
+ - `structure.md`:
280
+ - Actual design in the ARCHITECTURE section
281
+ - Actual module structure in the MODULES section
282
+ - Actual integration plan in the INTEGRATION section
283
+ - `tech.md`:
284
+ - The actual technology stack
285
+ in the STACK section - The actual framework
286
+ in the FRAMEWORK section - The actual quality policy
287
+ in the QUALITY section - `HISTORY` section: **Full Preservation** (all files)
288
+
289
+ **STEP 4: Merge Strategy**
290
+
291
+ ```markdown
292
+ Latest template structure (v0.4.0+)
293
+
294
+ Insert user customization (extracted from backup file)
295
+
296
+ HISTORY section updates
297
+
298
+ Version update (v0.1.x → v0.1.x+1)
299
+ ```
300
+
301
+ **Merge Principle**:
302
+ - ✅ Maintain the latest version of the template structure (section order, header, @TAG format)
303
+ - ✅ Insert only user customization (actual content written)
304
+ - ✅ Cumulative preservation of the HISTORY section (existing history + merge history)
305
+ - ❌ Replace template default values ​​with the latest version
306
+
307
+ **STEP 5: HISTORY Section Update**
308
+
309
+ After the merge is complete, add history to the HISTORY section of each file:
310
+ ```yaml
311
+ ### v0.1.x+1 (2025-10-19)
312
+ - **UPDATED**: Merge backup files (automatic optimization)
313
+ - AUTHOR: @Alfred
314
+ - BACKUP: .moai-backups/20251018-003638/
315
+ - REASON: Restoring user customization after moai-adk init reinitialization
316
+ ```
317
+
318
+ **STEP 6: Update config.json**
319
+
320
+ Set optimization flags after the merge is complete:
321
+ ```json
322
+ {
323
+ "project": {
324
+ "optimized": true,
325
+ "last_merge": "2025-10-19T12:34:56+09:00",
326
+ "backup_source": ".moai-backups/20251018-003638/"
327
+ }
328
+ }
329
+ ```
330
+
331
+ **STEP 7: Completion Report**
332
+
333
+ ```markdown
334
+ ✅ Backup merge completed!
335
+
336
+ 📁 Merged files:
337
+ - .moai/project/product.md (v0.1.4 → v0.1.5)
338
+ - .moai/project/structure.md (v0.1.1 → v0.1.2)
339
+ - .moai/project/tech.md (v0.1.1 → v0.1.2)
340
+ - .moai/config.json (optimized: false → true)
341
+
342
+ 🔍 Merge history:
343
+ - USER section: Restore customized contents of backup file
344
+ - PROBLEM section: Restore problem description of backup file
345
+ - STRATEGY section: Restore differentials of backup file
346
+ - HISTORY section: Add merge history (cumulative retention)
347
+
348
+ 💾 Backup file location:
349
+ - Original backup: .moai-backups/20251018-003638/
350
+ - Retention period: Permanent (until manual deletion)
351
+
352
+ 📋 Next steps:
353
+ 1. Review the merged document
354
+ 2. Additional modifications if necessary
355
+ 3. Create your first SPEC with /alfred:1-plan
356
+
357
+ ---
358
+ **Task completed: /alfred:0-project terminated**
359
+ ```
360
+
361
+ **Finish work after merge**: Complete immediately without interview
362
+
363
+ ---
364
+
365
+ ### 1.2 Run project environment analysis (when user selects "New" or no backup)
366
+
367
+ **Automatically analyzed items**:
368
+
369
+ 1. **Project Type Detection**
370
+ Alfred classifies new vs existing projects by analyzing the directory structure:
371
+ - Empty directory → New project
372
+ - Code/documentation present → Existing project
373
+
374
+ 2. **Auto-detect language/framework**: Detects the main language of your project based on file patterns
375
+ - pyproject.toml, requirements.txt → Python
376
+ - package.json, tsconfig.json → TypeScript/Node.js
377
+ - pom.xml, build.gradle → Java
378
+ - go.mod → Go
379
+ - Cargo.toml → Rust
380
+ - backend/ + frontend/ → full stack
381
+
382
+ 3. **Document status analysis**
383
+ - Check the status of existing `.moai/project/*.md` files
384
+ - Identify areas of insufficient information
385
+ - Organize items that need supplementation
386
+
387
+ 4. **Project structure evaluation**
388
+ - Directory structure complexity
389
+ - Monolingual vs. hybrid vs. microservice
390
+ - Code base size estimation
391
+
392
+ ### 1.3 Establish interview strategy (when user selects “New”)
393
+
394
+ **Select question tree by project type**:
395
+
396
+ | Project Type | Question Category | Focus Areas |
397
+ | ------------------------- | ------------------ | --------------------------------------------- |
398
+ | **New Project** | Product Discovery | Mission, Users, Problems Solved |
399
+ | **Existing Project** | Legacy Analysis | Code Base, Technical Debt, Integration Points |
400
+ | **TypeScript conversion** | Migration Strategy | TypeScript conversion for existing projects |
401
+
402
+ **Question Priority**:
403
+ - **Essential Questions**: Core Business Value, Key User Bases (all projects)
404
+ - **Technical Questions**: Language/Framework, Quality Policy, Deployment Strategy
405
+ - **Governance**: Security Requirements, Traceability Strategy (Optional)
406
+
407
+ ### 1.4 Generate Interview Plan Report (when user selects “Create New”)
408
+
409
+ **Format of plan to be presented to users**:
410
+
411
+ ```markdown
412
+ ## 📊 Project initialization plan: [PROJECT-NAME]
413
+
414
+ ### Environmental Analysis Results
415
+ - **Project Type**: [New/Existing/Hybrid]
416
+ - **Languages ​​Detected**: [Language List]
417
+ - **Current Document Status**: [Completeness Rating 0-100%]
418
+ - **Structure Complexity**: [Simple/Medium/Complex]
419
+
420
+ ### 🎯 Interview strategy
421
+ - **Question category**: Product Discovery / Structure / Tech
422
+ - **Expected number of questions**: [N (M required + K optional)]
423
+ - **Estimated time required**: [Time estimation]
424
+ - **Priority area**: [Focus on Areas to be covered]
425
+
426
+ ### ⚠️ Notes
427
+ - **Existing document**: [Overwrite vs supplementation strategy]
428
+ - **Language settings**: [Automatic detection vs manual setting]
429
+ - **Configuration conflicts**: [Compatibility with existing config.json]
430
+
431
+ ### ✅ Expected deliverables
432
+ - **product.md**: [Business requirements document]
433
+ - **structure.md**: [System architecture document]
434
+ - **tech.md**: [Technology stack and policy document]
435
+ - **config.json**: [Project configuration file]
436
+
437
+ ---
438
+ **Approval Request**: Would you like to proceed with the interview using the above plan?
439
+ (Choose “Proceed,” “Modify [Content],” or “Abort”)
440
+ ```
441
+
442
+ ### 1.5 Wait for user approval (moai-alfred-interactive-questions) (when user selects "New")
443
+
444
+ 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.
445
+ - **Proceed**: Interview conducted according to approved plan
446
+ - **Modify**: Re-establish the plan (re-execute Phase 1)
447
+ - **Stop**: Stop initialization
448
+
449
+ **Response processing**:
450
+ - **"Progress"** (`answers["0"] === "Progress"`) → Execute Phase 2
451
+ - **"Modify"** (`answers["0"] === "Modify"`) → Repeat Phase 1 (recall project-manager)
452
+ - **"Abort"** (`answers["0"] === "Abort"`) → End task
453
+
454
+ ---
455
+
456
+ ## 🚀 STEP 2: Execute project initialization (after user approves “New”)
457
+
458
+ **Note**: This step will only be executed if the user selects **"New"**.
459
+ - When selecting "Merge": End the task in Phase 1.1 (Merge Backups)
460
+ - When selecting "Skip": End the task
461
+ - When selecting "New": Proceed with the process below
462
+
463
+ After user approval, the project-manager agent performs initialization.
464
+
465
+ ### 2.1 Call project-manager agent (when user selects "New")
466
+
467
+ Alfred starts project initialization by calling the project-manager agent with the following parameters:
468
+
469
+ **Parameters passed to project-manager**:
470
+ - **conversation_language** (from STEP 0): Language code selected by user (e.g., "ko", "en", "ja", "zh")
471
+ - **language_name** (from STEP 0): Display name of selected language (e.g., "Korean", "English")
472
+ - Detected Languages: [Language List from codebase detection]
473
+ - Project Type: [New/Existing]
474
+ - Existing Document Status: [Existence/Absence]
475
+ - Approved Interview Plan: [Plan Summary]
476
+
477
+ **Execution**:
478
+ ```
479
+ Call the Task tool:
480
+ - subagent_type: "project-manager"
481
+ - description: "Initialize project with conversation language support"
482
+ - prompt: """You are project-manager agent.
483
+
484
+ LANGUAGE CONFIGURATION:
485
+ - conversation_language: {{CONVERSATION_LANGUAGE}}
486
+ - language_name: {{CONVERSATION_LANGUAGE_NAME}}
487
+
488
+ PROJECT_TYPE: [new|existing]
489
+ DETECTED_LANGUAGES: [detected codebase languages]
490
+
491
+ CRITICAL INSTRUCTION:
492
+ All interviews and generated documentation MUST be in conversation_language:
493
+ - product.md: Generate in {{CONVERSATION_LANGUAGE}}
494
+ - structure.md: Generate in {{CONVERSATION_LANGUAGE}}
495
+ - tech.md: Generate in {{CONVERSATION_LANGUAGE}}
496
+
497
+ If conversation_language is 'ko': All narrative content in Korean
498
+ If conversation_language is 'ja': All narrative content in Japanese
499
+ If conversation_language is other: Follow the specified language
500
+
501
+ After project initialization, update .moai/config.json with nested language structure:
502
+ {
503
+ "language": {
504
+ "conversation_language": "{{CONVERSATION_LANGUAGE}}",
505
+ "conversation_language_name": "{{CONVERSATION_LANGUAGE_NAME}}"
506
+ }
507
+ }
508
+
509
+ SKILL INVOCATION:
510
+ Use explicit Skill() calls when needed:
511
+ - Skill("moai-alfred-language-detection") for codebase language detection
512
+ - Skill("moai-foundation-langs") for multi-language project setup
513
+
514
+ TASK: Conduct project interviews and create/update product/structure/tech.md documents."""
515
+ ```
516
+
517
+ **Outcome**: The project-manager agent conducts structured interviews entirely in the selected language and creates/updates product/structure/tech.md documents in that language.
518
+
519
+ ### 2.2 Automatic activation of Alfred Skills (optional)
520
+
521
+ After the project-manager has finished creating the document, **Alfred can optionally call Skills** (upon user request).
522
+
523
+ **Automatic activation conditions** (optional):
524
+
525
+ | Conditions | Automatic selection Skill | Purpose |
526
+ | ------------------------------------ | ---------------------------- | -------------------------------------- |
527
+ | User Requests “Quality Verification” | moai-alfred-trust-validation | Initial project structure verification |
528
+
529
+ **Execution flow** (optional):
530
+ ```
531
+ 1. project-manager completion
532
+
533
+ 2. User selection:
534
+ - "Quality verification required" → moai-alfred-trust-validation (Level 1 quick scan)
535
+ - "Skip" → Complete immediately
536
+ ```
537
+
538
+ **Note**: Quality verification is optional during the project initialization phase.
539
+
540
+ ### 2.3 Sub-agent moai-alfred-interactive-questions (Nested)
541
+
542
+ **The project-manager agent can internally call the TUI survey skill** to check the details of the task.
543
+
544
+ **When to call**:
545
+ - Before overwriting existing project documents
546
+ - When selecting language/framework
547
+ - When changing important settings
548
+
549
+ **Example** (inside project-manager): Ask whether to "overwrite file" with `AskUserQuestion tool (documented in moai-alfred-interactive-questions skill)`,
550
+ - Allows you to choose between **Overwrite** / **Merge** / **Skip**.
551
+
552
+ **Nested pattern**:
553
+ - **Command level** (Phase approval): Called by Alfred → "Shall we proceed with Phase 2?"
554
+ - **Sub-agent level** (Detailed confirmation): Called by project-manager → "Shall we overwrite the file?"
555
+
556
+ ### 2.4 Processing method by project type
557
+
558
+ #### A. New project (Greenfield)
559
+
560
+ **Interview Flow**:
561
+
562
+ 1. **Product Discovery** (create product.md)
563
+ - Define core mission (@DOC:MISSION-001)
564
+ - Identify key user base (@SPEC:USER-001)
565
+ - Identify key problems to solve (@SPEC:PROBLEM-001)
566
+ - Summary of differences and strengths (@DOC:STRATEGY-001)
567
+ - Setting success indicators (@SPEC:SUCCESS-001)
568
+
569
+ 2. **Structure Blueprint** (create structure.md)
570
+ - Selection of architecture strategy (@DOC:ARCHITECTURE-001)
571
+ - Division of responsibilities by module (@DOC:MODULES-001)
572
+ - External system integration plan (@DOC:INTEGRATION-001)
573
+ - Define traceability strategy (@DOC:TRACEABILITY-001)
574
+
575
+ 3. **Tech Stack Mapping** (written by tech.md)
576
+ - Select language & runtime (@DOC:STACK-001)
577
+ - Determine core framework (@DOC:FRAMEWORK-001)
578
+ - Set quality gate (@DOC:QUALITY-001)
579
+ - Define security policy (@DOC:SECURITY-001)
580
+ - Plan distribution channels (@DOC:DEPLOY-001)
581
+
582
+ **Automatically generate config.json**:
583
+ ```json
584
+ {
585
+ "project_name": "detected-name",
586
+ "project_type": "single|fullstack|microservice",
587
+ "project_language": "python|typescript|java|go|rust",
588
+ "test_framework": "pytest|vitest|junit|go test|cargo test",
589
+ "linter": "ruff|biome|eslint|golint|clippy",
590
+ "formatter": "black|biome|prettier|gofmt|rustfmt",
591
+ "coverage_target": 85,
592
+ "mode": "personal"
593
+ }
594
+ ```
595
+
596
+ #### B. Existing project (legacy introduction)
597
+
598
+ **Legacy Snapshot & Alignment**:
599
+
600
+ **STEP 1: Identify the overall project structure**
601
+
602
+ Alfred identifies the entire project structure:
603
+ - Visualize the directory structure using the tree or find commands
604
+ - Exclude build artifacts such as node_modules, .git, dist, build, __pycache__, etc.
605
+ - Identify key source directories and configuration files.
606
+
607
+ **Output**:
608
+ - Visualize the entire folder/file hierarchy of the project
609
+ - Identify major directories (src/, tests/, docs/, config/, etc.)
610
+ - Check language/framework hint files (package.json, pyproject.toml, go.mod, etc.)
611
+
612
+ **STEP 2: Establish parallel analysis strategy**
613
+
614
+ Alfred identifies groups of files by the Glob pattern:
615
+ 1. **Configuration files**: *.json, *.toml, *.yaml, *.yml, *.config.js
616
+ 2. **Source code files**: src/**/*.{ts,js,py,go,rs,java}
617
+ 3. **Test files**: tests/**/*.{ts,js,py,go,rs,java}, **/*.test.*, **/*.spec.*
618
+ 4. **Documentation files**: *.md, docs/**/*.md, README*, CHANGELOG*
619
+
620
+ **Parallel Read Strategy**:
621
+ - Speed ​​up analysis by reading multiple files simultaneously with the Read tool
622
+ - Batch processing for each file group
623
+ - Priority: Configuration file → Core source → Test → Document
624
+
625
+ **STEP 3: Analysis and reporting of characteristics for each file**
626
+
627
+ As each file is read, the following information is collected:
628
+
629
+ 1. **Configuration file analysis**
630
+ - Project metadata (name, version, description)
631
+ - Dependency list and versions
632
+ - Build/test script
633
+ - Confirm language/framework
634
+
635
+ 2. **Source code analysis**
636
+ - Identify major modules and classes
637
+ - Architectural pattern inference (MVC, clean architecture, microservice, etc.)
638
+ - Identify external API calls and integration points
639
+ - Key areas of domain logic
640
+
641
+ 3. **Test code analysis**
642
+ - Check test framework
643
+ - Identify coverage settings
644
+ - Identify key test scenarios
645
+ - Evaluate TDD compliance
646
+
647
+ 4. **Document analysis**
648
+ - Existing README contents
649
+ - Existence of architecture document
650
+ - API document status
651
+ - Installation/deployment guide completeness
652
+
653
+ **Report Format**:
654
+ ```markdown
655
+ ## Analysis results for each file
656
+
657
+ ### Configuration file
658
+ - package.json: Node.js 18+, TypeScript 5.x, Vitest test
659
+ - tsconfig.json: strict mode, ESNext target
660
+ - biome.json: Linter/formatter settings exist
661
+
662
+ ### Source code (src/)
663
+ - src/core/: Core business logic (3 modules)
664
+ - src/api/: REST API endpoints (5 routers)
665
+ - src/utils/: Utility functions (logging, verification, etc.)
666
+ - Architecture: Hierarchical (controller) → service → repository)
667
+
668
+ ### Tests (tests/)
669
+ - Vitest + @testing-library used
670
+ - Unit test coverage estimated at about 60%
671
+ - E2E testing lacking
672
+
673
+ ### Documentation
674
+ - README.md: Only installation guide
675
+ - Absence of API documentation
676
+ - Absence of architecture document
677
+ ```
678
+
679
+ **STEP 4: Comprehensive analysis and product/structure/tech reflection**
680
+
681
+ Based on the collected information, it is reflected in three major documents:
682
+
683
+ 1. Contents reflected in **product.md**
684
+ - Project mission extracted from existing README/document
685
+ - Main user base and scenario inferred from code
686
+ - Backtracking of core problem to be solved
687
+ - Preservation of existing assets in “Legacy Context”
688
+
689
+ 2. Contents reflected in **structure.md**
690
+ - Identified actual directory structure
691
+ - Responsibility analysis results for each module
692
+ - External system integration points (API calls, DB connections, etc.)
693
+ - Technical debt items (marked with @CODE tag)
694
+
695
+ 3. **tech.md reflection content**
696
+ - Languages/frameworks/libraries actually in use
697
+ - Existing build/test pipeline
698
+ - Status of quality gates (linter, formatter, test coverage)
699
+ - Identification of security/distribution policy
700
+ - Items requiring improvement (marked with TODO tags)
701
+
702
+ **Preservation Policy**:
703
+ - Supplement only the missing parts without overwriting existing documents
704
+ - Preserve conflicting content in the “Legacy Context” section
705
+ - Mark items needing improvement with @CODE and TODO tags
706
+
707
+ **Example Final Report**:
708
+ ```markdown
709
+ ## Complete analysis of existing project
710
+
711
+ ### Environment Information
712
+ - **Language**: TypeScript 5.x (Node.js 18+)
713
+ - **Framework**: Express.js
714
+ - **Test**: Vitest (coverage ~60%)
715
+ - **Linter/Formatter**: Biome
716
+
717
+ ### Main findings
718
+ 1. **Strengths**:
719
+ - High type safety (strict mode)
720
+ - Clear module structure (separation of core/api/utils)
721
+
722
+ 2. **Needs improvement**:
723
+ - Test coverage below 85% (TODO:TEST-COVERAGE-001)
724
+ - Absence of API documentation (TODO:DOCS-API-001)
725
+ - Insufficient E2E testing (@CODE:TEST-E2E-001)
726
+
727
+ ### Next step
728
+ 1. product/structure/tech.md creation completed
729
+ 2. @CODE/TODO item priority confirmation
730
+ 3. /alfred:Start writing an improvement SPEC with 1-spec
731
+ ```
732
+
733
+ ### 2.3 Document creation and verification
734
+
735
+ **Output**:
736
+ - `.moai/project/product.md` (Business Requirements)
737
+ - `.moai/project/structure.md` (System Architecture)
738
+ - `.moai/project/tech.md` (Technology Stack and policy)
739
+ - `.moai/config.json` (project settings)
740
+
741
+ **Quality Verification**:
742
+ - [ ] Verify existence of all required @TAG sections
743
+ - [ ] Verify compliance with EARS syntax format
744
+ - [ ] Verify config.json syntax validity
745
+ - [ ] Verify cross-document consistency
746
+
747
+ ### 2.4 Completion Report
748
+
749
+ ```markdown
750
+ ✅ Project initialization complete!
751
+
752
+ 📁 Documents generated:
753
+ - .moai/project/product.md (Business Definition)
754
+ - .moai/project/structure.md (Architecture Design)
755
+ - .moai/project/tech.md (Technology Stack)
756
+ - .moai/config.json (project settings)
757
+
758
+ 🔍 Detected environments:
759
+ - Language: [List of languages]
760
+ - Frameworks: [List of frameworks]
761
+ - Test tools: [List of tools]
762
+
763
+ 📋 Next steps:
764
+ 1. Review the generated document
765
+ 2. Create your first SPEC with /alfred:1-plan
766
+ 3. If necessary, readjust with /alfred:8-project update
767
+ ```
768
+
769
+ ### 2.5: Initial structural verification (optional)
770
+
771
+ After project initialization is complete, you can optionally run quality verification.
772
+
773
+ **Execution Conditions**: Only when explicitly requested by the user.
774
+
775
+ **Verification Purpose**:
776
+ - Basic verification of project documentation and configuration files
777
+ - Verification of compliance with the TRUST principles of the initial structure
778
+ - Validation of configuration files
779
+
780
+ **How ​​it works**:
781
+ Alfred only calls the trust-checker agent to perform project initial structural verification if explicitly requested by the user.
782
+
783
+ **Verification items**:
784
+ - **Document completeness**: Check existence of required sections in product/structure/tech.md
785
+ - **Settings validity**: Verify config.json JSON syntax and required fields
786
+ - **TAG scheme**: Check compliance with @TAG format in document
787
+ - **EARS syntax**: Validation of the EARS template to be used when writing SPECs
788
+
789
+ **Run Verification**: Level 1 quick scan (3-5 seconds)
790
+
791
+ **Handling verification results**:
792
+
793
+ ✅ **Pass**: Can proceed to next step
794
+ - Documents and settings are all normal
795
+
796
+ ⚠️ **Warning**: Proceed after warning
797
+ - Some optional sections are missing
798
+ - Recommendations not applied
799
+
800
+ ❌ **Critical**: Needs fix
801
+ - Required section missing
802
+ - config.json syntax error
803
+ - User choice: “Revalidate after fix” or “Skip”
804
+
805
+ **Skip verification**:
806
+ - Verification is not run by default
807
+ - Run only when explicitly requested by the user
808
+
809
+ ### 2.6: Agent & Skill Tailoring (Project Optimization)
810
+
811
+ 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.
812
+ 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`.
813
+
814
+ #### 2.6.0 Create cc-manager briefing
815
+
816
+ 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`.
817
+
818
+ - `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.
819
+ - `structure.md`: Records architecture type, module boundaries and scope of responsibility, external integration, traceability strategy, and TODO contents.
820
+ - `tech.md`: Organizes language/framework version, build/test/deployment procedures, quality/security policy, operation/monitoring method, and TODO items.
821
+
822
+ Be sure to include the source (e.g. `product.md@SPEC:SUCCESS-001`) for each item so that cc-manager can understand the basis.
823
+
824
+ #### 2.6.1 cc-manager judgment guide
825
+
826
+ 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.
827
+
828
+ | Project requirements (document basis) | Recommended sub-agent/skill | Purpose |
829
+ | ---------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- |
830
+ | High quality and coverage goals (`product.md@SPEC:SUCCESS-001`) | `tdd-implementer`, `moai-essentials-debug`, `moai-essentials-review` | Establishment of RED·GREEN·REFACTOR workflow |
831
+ | 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 |
832
+ | Deployment automation/branch strategy required (`structure.md` Architecture/TODO) | `git-manager`, `moai-alfred-git-workflow`, `moai-foundation-git` | Branch Strategy·Commit Policy·PR Automation |
833
+ | Refactoring legacy modules (`product.md` BACKLOG, `tech.md` TODO) | `implementation-planner`, `moai-essentials-refactor` | Technical Debt Diagnosis and Refactoring Roadmap |
834
+ | 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 |
835
+ | 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 |
836
+ | Data analysis/reporting needs (`product.md` DATA, `tech.md` ANALYTICS) | `implementation-planner`, `moai-domain-data-science`, detected language skills | Data Pipeline·Notebook Job Definition |
837
+ | 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 |
838
+ | 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 |
839
+ | Introduction of ML/AI functions (`product.md` AI, `tech.md` MODEL) | `implementation-planner`, `moai-domain-ml`, detected language skills | Model training/inference pipeline definition |
840
+ | 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 |
841
+ | Strengthening coding standards/review process (`tech.md` REVIEW) | `quality-gate`, `moai-essentials-review` | Strengthening review checklist and quality reporting |
842
+ | 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 |
843
+
844
+ > **Language/Domain Skill Selection Rules**
845
+ > - 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.
846
+ > - Skills listed in the domain row are automatically included by cc-manager in the `selected_skills` list when the conditions are met.
847
+ > - The skill directory is always copied in its entirety, and only actual activation is recorded in `skill_pack` and `CLAUDE.md`.
848
+
849
+ If multiple conditions are met, the candidates are merged without duplicates and organized into sets of `candidate_agents`, `candidate_skills`, and `candidate_styles`.
850
+
851
+ #### 2.6.2 User confirmation flow
852
+
853
+ `AskUserQuestion tool (documented in moai-alfred-interactive-questions skill)` asks “whether to enable recommended items.”
854
+ - Provides three options: **Install all** / **Install selectively** / **Do not install**.
855
+ Selecting “Selective Install” presents the list of candidates again as multiple choices, allowing the user to select only the items they need.
856
+
857
+ #### 2.6.3 Activation and Recording Steps
858
+
859
+ 1. **Preparing briefing**: Organize the results of user selection (install all/install selectively) and the full text of `cc_manager_briefing`.
860
+ 2. **Call the cc-manager agent**:
861
+ - Call `subagent_type: "cc-manager"` with the `Task` tool and include a briefing and user selections in the prompt.
862
+ - 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.
863
+ 3. **Check for configuration updates**: Review the results reflected by cc-manager.
864
+ - Sub-Agents: Keep the `.claude/agents/alfred/` template active and list it in the `CLAUDE.md` “Agents” section.
865
+ - Skills: Check the `.claude/skills/` document and add it to the `CLAUDE.md` “Skills” section.
866
+ - Output style: Apply `.claude/output-styles/alfred/` and record the activation in `CLAUDE.md` “Output Styles”.
867
+ 4. **Update config.json**
868
+ ```json
869
+ {
870
+ "project": {
871
+ "optimized": true,
872
+ "agent_pack": ["tdd-implementer", "doc-syncer"],
873
+ "skill_pack": ["moai-alfred-git-workflow", "moai-alfred-tag-scanning"],
874
+ "output_styles": ["moai-adk-learning"]
875
+ }
876
+ }
877
+ ```
878
+ Merge existing properties, if any.
879
+ 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.
880
+
881
+ ## Interview guide by project type
882
+
883
+ ### New project interview area
884
+
885
+ **Product Discovery** (product.md)
886
+ - Core mission and value proposition
887
+ - Key user bases and needs
888
+ - 3 key problems to solve
889
+ - Differentiation compared to competing solutions
890
+ - Measurable indicators of success
891
+
892
+ **Structure Blueprint** (structure.md)
893
+ - System architecture strategy
894
+ - Separation of modules and division of responsibilities
895
+ - External system integration plan
896
+ - @TAG-based traceability strategy
897
+
898
+ **Tech Stack Mapping** (tech.md)
899
+ - Language/runtime selection and version
900
+ - Framework and libraries
901
+ - Quality gate policy (coverage, linter)
902
+ - Security policy and distribution channel
903
+
904
+ ### Existing project interview area
905
+
906
+ **Legacy Analysis**
907
+ - Identify current code structure and modules
908
+ - Status of build/test pipeline
909
+ - Identify technical debt and constraints
910
+ - External integration and authentication methods
911
+ - MoAI-ADK transition priority plan
912
+
913
+ **Retention Policy**: Preserve existing documents in the "Legacy Context" section and mark items needing improvement with @CODE/TODO tags
914
+
915
+ ## 🏷️ TAG system application rules
916
+
917
+ **Automatically create @TAGs per section**:
918
+
919
+ - Mission/Vision → @DOC:MISSION-XXX, @DOC:STRATEGY-XXX
920
+ - Customization → @SPEC:USER-XXX, @SPEC:PERSONA-XXX
921
+ - Problem analysis → @SPEC:PROBLEM-XXX, @SPEC:SOLUTION-XXX
922
+ - Architecture → @DOC:ARCHITECTURE-XXX, @SPEC:PATTERN-XXX
923
+ - Technology Stack → @DOC:STACK-XXX, @DOC:FRAMEWORK-XXX
924
+
925
+ **Legacy Project Tags**:
926
+
927
+ - Technical debt → @CODE:REFACTOR-XXX, @CODE:TEST-XXX, @CODE:MIGRATION-XXX
928
+ - Resolution plan → @CODE:MIGRATION-XXX, TODO:SPEC-BACKLOG-XXX
929
+ - Quality improvement → TODO:TEST-COVERAGE-XXX, TODO:DOCS-SYNC-XXX
930
+
931
+ ## Error handling
932
+
933
+ ### Common errors and solutions
934
+
935
+ **Error 1**: Project language detection failed
936
+ ```
937
+ Symptom: “Language not detected” message
938
+ Solution: Specify language manually or create language-specific settings file
939
+ ```
940
+
941
+ **Error 2**: Conflict with existing document
942
+ ```
943
+ Symptom: product.md already exists and has different contents
944
+ Solution: Preserve existing contents and add new contents in “Legacy Context” section
945
+ ```
946
+
947
+ **Error 3**: Failed to create config.json
948
+ ```
949
+ Symptom: JSON syntax error or permission denied
950
+ Solution: Check file permissions (chmod 644) or create config.json manually
951
+ ```
952
+
953
+ ---
954
+
955
+ ## /alfred:0-project update: Template optimization (subcommand)
956
+
957
+ > **Purpose**: After running moai-adk update, compare the backup and new template to optimize the template while preserving user customization.
958
+
959
+ ### Execution conditions
960
+
961
+ This subcommand is executed under the following conditions:
962
+
963
+ 1. **After executing moai-adk update**: `optimized=false` status in `config.json`
964
+ 2. **Template update required**: When there is a difference between the backup and the new template
965
+ 3. **User explicit request**: User directly executes `/alfred:0-project update`
966
+
967
+ ### Execution flow
968
+
969
+ #### Phase 1: Backup analysis and comparison
970
+
971
+ 1. **Make sure you have the latest backup**:
972
+ ```bash
973
+ # Browse the latest backups in the .moai-backups/ directory
974
+ ls -lt .moai-backups/ | head -1
975
+ ```
976
+
977
+ 2. **Change Analysis**:
978
+ - Compare `.claude/` directory from backup with current template
979
+ - Compare `.moai/project/` document from backup with current document
980
+ - Identify user customization items
981
+
982
+ 3. **Create Comparison Report**:
983
+ ```markdown
984
+ ## 📊 Template optimization analysis
985
+
986
+ ### Changed items
987
+ - CLAUDE.md: "## Project Information" section needs to be preserved
988
+ - settings.json: 3 env variables need to be preserved
989
+ - product.md: Has user-written content
990
+
991
+ ### Recommended Action
992
+ - Run Smart Merge
993
+ - Preserve User Customizations
994
+ - Set optimized=true
995
+ ```
996
+
997
+ 4. **Waiting for user approval**
998
+ `AskUserQuestion tool (documented in moai-alfred-interactive-questions skill)` asks “Do you want to proceed with template optimization?” and provides the following options.
999
+ - **Proceed** → Phase 2 execution
1000
+ - **Preview** → Display change details and recheck
1001
+ - **Skip** → keep optimized=false
1002
+
1003
+ #### Phase 2: Run smart merge (after user approval)
1004
+
1005
+ 1. **Execute smart merge logic**:
1006
+ - Run `TemplateProcessor.copy_templates()`
1007
+ - CLAUDE.md: Preserve "## Project Information" section
1008
+ - settings.json: env variables and permissions.allow merge
1009
+
1010
+ 2. Set **optimized=true**:
1011
+ ```python
1012
+ # update config.json
1013
+ config_data["project"]["optimized"] = True
1014
+ ```
1015
+
1016
+ 3. **Optimization completion report**:
1017
+ ```markdown
1018
+ ✅ Template optimization completed!
1019
+
1020
+ 📄 Merged files:
1021
+ - CLAUDE.md (preserves project information)
1022
+ - settings.json (preserves env variables)
1023
+
1024
+ ⚙️ config.json: optimized=true Configuration complete
1025
+ ```
1026
+
1027
+ ### Alfred Automation Strategy
1028
+
1029
+ **Alfred automatic decision**:
1030
+ - Automatically call project-manager agent
1031
+ - Check backup freshness (within 24 hours)
1032
+ - Automatically analyze changes
1033
+
1034
+ **Auto-activation of Skills**:
1035
+ - moai-alfred-tag-scanning: TAG chain verification
1036
+ - moai-alfred-trust-validation: Verification of compliance with TRUST principles
1037
+
1038
+ ### Running example
1039
+
1040
+ ```bash
1041
+ # After running moai-adk update
1042
+ moai-adk update
1043
+
1044
+ # Output:
1045
+ # ✓ Update complete!
1046
+ # ℹ️ Next step: Run /alfred:0-project update to optimize template changes
1047
+
1048
+ # Run Alfred
1049
+ /alfred:0-project update
1050
+
1051
+ # → Phase 1: Generate backup analysis and comparison report
1052
+ # → Wait for user approval
1053
+ # → Phase 2: Run smart merge, set optimized=true
1054
+ ```
1055
+
1056
+ ### caution
1057
+
1058
+ - **Backup required**: Cannot run without backup in `.moai-backups/` directory
1059
+ - **Manual review recommended**: Preview is required if there are important customizations
1060
+ - **Conflict resolution**: Request user selection in case of merge conflict
1061
+
1062
+ ---
1063
+
1064
+ ## 🚀 STEP 3: Project Custom Optimization (Optional)
1065
+
1066
+ **Execution conditions**:
1067
+ - After completion of Phase 2 (project initialization)
1068
+ - or after completion of Phase 1.1 (backup merge)
1069
+ - Explicitly requested by the user or automatically determined by Alfred
1070
+
1071
+ **Purpose**: Lightweight by selecting only Commands, Agents, and Skills that fit the project characteristics (37 skills → 3~5)
1072
+
1073
+ ### 3.1 Automatic execution of Feature Selection
1074
+
1075
+ **Alfred automatically calls the moai-alfred-feature-selector skill**:
1076
+
1077
+ **Skill Entry**:
1078
+ - `.moai/project/product.md` (project category hint)
1079
+ - `.moai/project/tech.md` (main language, framework)
1080
+ - `.moai/config.json` (project settings)
1081
+
1082
+ **Skill Output**:
1083
+ ```json
1084
+ {
1085
+ "category": "web-api",
1086
+ "language": "python",
1087
+ "framework": "fastapi",
1088
+ "commands": ["1-spec", "2-build", "3-sync"],
1089
+ "agents": ["spec-builder", "code-builder", "doc-syncer", "git-manager", "debug-helper"],
1090
+ "skills": ["moai-lang-python", "moai-domain-web-api", "moai-domain-backend"],
1091
+ "excluded_skills_count": 34,
1092
+ "optimization_rate": "87%"
1093
+ }
1094
+ ```
1095
+
1096
+ **How ​​to Run**:
1097
+ ```
1098
+ Alfred: Skill("moai-alfred-feature-selector")
1099
+ ```
1100
+
1101
+ ---
1102
+
1103
+ ### 3.2 Automatic execution of Template Generation
1104
+
1105
+ **Alfred automatically calls the moai-alfred-template-generator skill**:
1106
+
1107
+ **Skill input**:
1108
+ - `.moai/.feature-selection.json` (feature-selector output)
1109
+ - `CLAUDE.md` template
1110
+ - Entire commands/agents/skills file
1111
+
1112
+ **Skill Output**:
1113
+ - `CLAUDE.md` (custom agent table - selected agents only)
1114
+ - `.claude/commands/` (selected commands only)
1115
+ - `.claude/agents/` (selected agents only)
1116
+ - `.claude/skills/` (selected skills only)
1117
+ - `.moai/config.json` (updates `optimized: true`)
1118
+
1119
+ **How ​​to Run**:
1120
+ ```
1121
+ Alfred: Skill("moai-alfred-template-generator")
1122
+ ```
1123
+
1124
+ ---
1125
+
1126
+ ### 3.3 Optimization completion report
1127
+
1128
+ **Report Format**:
1129
+ ```markdown
1130
+ ✅ Project customized optimization completed!
1131
+
1132
+ 📊 Optimization results:
1133
+ - **Project**: MoAI-ADK
1134
+ - **Category**: web-api
1135
+ - **Main language**: python
1136
+ - **Framework**: fastapi
1137
+
1138
+ 🎯 Selected capabilities:
1139
+ - Commands: 4 items (0-project, 1-spec, 2-build, 3-sync)
1140
+ - Agents: 5 items (spec-builder, code-builder, doc-syncer, git-manager, debug-helper)
1141
+ - Skills: 3 items (moai-lang-python, moai-domain-web-api, moai-domain-backend)
1142
+
1143
+ 💡 Lightweight effect:
1144
+ - Skills excluded: 34
1145
+ - Lightweight: 87%
1146
+ - CLAUDE.md: Create custom agent table
1147
+
1148
+ 📋 Next steps:
1149
+ 1. Check the CLAUDE.md file (only 5 agents are displayed)
1150
+ 2. Run /alfred:1-plan "first function"
1151
+ 3. Start the MoAI-ADK workflow
1152
+ ```
1153
+
1154
+ ---
1155
+
1156
+ ### 3.4 Skip Phase 3 (optional)
1157
+
1158
+ **Users can skip Phase 3**:
1159
+
1160
+ **Skip condition**:
1161
+ - User explicitly selects “Skip”
1162
+ - “Simple project” when Alfred automatically determines (only basic features required)
1163
+
1164
+ **Skip effect**:
1165
+ - Maintain all 37 skills (no lightweighting)
1166
+ - Maintain default 9 agents in CLAUDE.md template
1167
+ - Maintain `optimized: false` in config.json
1168
+
1169
+ ---
1170
+
1171
+ ## Next steps
1172
+
1173
+ **Recommendation**: For better performance and context management, start a new chat session with the `/clear` or `/new` command before proceeding to the next step.
1174
+
1175
+ After initialization is complete:
1176
+
1177
+ - **New project**: Run `/alfred:1-plan` to create design-based SPEC backlog
1178
+ - **Legacy project**: Review @CODE/@CODE/TODO items in product/structure/tech document and confirm priority
1179
+ - **Set Change**: Run `/alfred:0-project` again to update document
1180
+ - **Template optimization**: Run `/alfred:0-project update` after `moai-adk update`
1181
+
1182
+ ## Related commands
1183
+
1184
+ - `/alfred:1-plan` - Start writing SPEC
1185
+ - `/alfred:9-update` - MoAI-ADK update
1186
+ - `moai doctor` - System diagnosis
1187
+ - `moai status` - Check project status