moai-adk 0.4.5__py3-none-any.whl → 0.20.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 (433) hide show
  1. moai_adk/__init__.py +1 -1
  2. moai_adk/__main__.py +74 -1
  3. moai_adk/cli/commands/__init__.py +1 -1
  4. moai_adk/cli/commands/analyze.py +119 -0
  5. moai_adk/cli/commands/backup.py +25 -1
  6. moai_adk/cli/commands/doctor.py +31 -5
  7. moai_adk/cli/commands/improve_user_experience.py +307 -0
  8. moai_adk/cli/commands/init.py +111 -10
  9. moai_adk/cli/commands/status.py +33 -3
  10. moai_adk/cli/commands/update.py +921 -130
  11. moai_adk/cli/commands/validate_links.py +120 -0
  12. moai_adk/cli/prompts/init_prompts.py +22 -87
  13. moai_adk/core/analysis/__init__.py +9 -0
  14. moai_adk/core/analysis/session_analyzer.py +388 -0
  15. moai_adk/core/analysis/tag_chain_analyzer.py +344 -0
  16. moai_adk/core/analysis/tag_chain_repair.py +879 -0
  17. moai_adk/core/config/__init__.py +19 -0
  18. moai_adk/core/config/migration.py +235 -0
  19. moai_adk/core/git/__init__.py +1 -1
  20. moai_adk/core/git/branch.py +1 -1
  21. moai_adk/core/git/commit.py +1 -1
  22. moai_adk/core/git/manager.py +1 -1
  23. moai_adk/core/issue_creator.py +313 -0
  24. moai_adk/core/mcp/setup.py +56 -0
  25. moai_adk/core/mcp/setup_old.py +296 -0
  26. moai_adk/core/project/backup_utils.py +1 -1
  27. moai_adk/core/project/checker.py +2 -2
  28. moai_adk/core/project/detector.py +211 -12
  29. moai_adk/core/project/initializer.py +85 -15
  30. moai_adk/core/project/phase_executor.py +76 -13
  31. moai_adk/core/project/validator.py +13 -13
  32. moai_adk/core/quality/__init__.py +1 -1
  33. moai_adk/core/quality/trust_checker.py +1 -1
  34. moai_adk/core/quality/validators/__init__.py +1 -1
  35. moai_adk/core/quality/validators/base_validator.py +1 -1
  36. moai_adk/core/tags/__init__.py +86 -0
  37. moai_adk/core/tags/auto_corrector.py +693 -0
  38. moai_adk/core/tags/ci_validator.py +463 -0
  39. moai_adk/core/tags/cli.py +283 -0
  40. moai_adk/core/tags/generator.py +109 -0
  41. moai_adk/core/tags/inserter.py +99 -0
  42. moai_adk/core/tags/mapper.py +126 -0
  43. moai_adk/core/tags/parser.py +76 -0
  44. moai_adk/core/tags/policy_validator.py +580 -0
  45. moai_adk/core/tags/pre_commit_validator.py +421 -0
  46. moai_adk/core/tags/reporter.py +956 -0
  47. moai_adk/core/tags/rollback_manager.py +525 -0
  48. moai_adk/core/tags/tags.py +149 -0
  49. moai_adk/core/tags/validator.py +897 -0
  50. moai_adk/core/template/__init__.py +1 -1
  51. moai_adk/core/template/backup.py +1 -1
  52. moai_adk/core/template/merger.py +50 -1
  53. moai_adk/core/template/processor.py +119 -13
  54. moai_adk/core/template_engine.py +268 -0
  55. moai_adk/templates/.claude/agents/alfred/backend-expert.md +348 -0
  56. moai_adk/templates/.claude/agents/alfred/cc-manager.md +209 -944
  57. moai_adk/templates/.claude/agents/alfred/database-expert.md +352 -0
  58. moai_adk/templates/.claude/agents/alfred/debug-helper.md +34 -5
  59. moai_adk/templates/.claude/agents/alfred/devops-expert.md +464 -0
  60. moai_adk/templates/.claude/agents/alfred/doc-syncer.md +38 -8
  61. moai_adk/templates/.claude/agents/alfred/format-expert.md +469 -0
  62. moai_adk/templates/.claude/agents/alfred/frontend-expert.md +357 -0
  63. moai_adk/templates/.claude/agents/alfred/git-manager.md +128 -9
  64. moai_adk/templates/.claude/agents/alfred/implementation-planner.md +104 -6
  65. moai_adk/templates/.claude/agents/alfred/project-manager.md +88 -16
  66. moai_adk/templates/.claude/agents/alfred/quality-gate.md +36 -9
  67. moai_adk/templates/.claude/agents/alfred/security-expert.md +270 -0
  68. moai_adk/templates/.claude/agents/alfred/skill-factory.md +865 -0
  69. moai_adk/templates/.claude/agents/alfred/spec-builder.md +214 -43
  70. moai_adk/templates/.claude/agents/alfred/tag-agent.md +111 -9
  71. moai_adk/templates/.claude/agents/alfred/tdd-implementer.md +309 -160
  72. moai_adk/templates/.claude/agents/alfred/trust-checker.md +36 -7
  73. moai_adk/templates/.claude/agents/alfred/ui-ux-expert.md +605 -0
  74. moai_adk/templates/.claude/commands/alfred/0-project.md +393 -966
  75. moai_adk/templates/.claude/commands/alfred/1-plan.md +651 -367
  76. moai_adk/templates/.claude/commands/alfred/2-run.md +388 -241
  77. moai_adk/templates/.claude/commands/alfred/3-sync.md +1921 -410
  78. moai_adk/templates/.claude/commands/alfred/9-feedback.md +153 -0
  79. moai_adk/templates/.claude/commands/alfred/release-new.md +3604 -0
  80. moai_adk/templates/.claude/hooks/alfred/core/project.py +484 -20
  81. moai_adk/templates/.claude/hooks/alfred/core/timeout.py +136 -0
  82. moai_adk/templates/.claude/hooks/alfred/core/ttl_cache.py +108 -0
  83. moai_adk/templates/.claude/hooks/alfred/core/version_cache.py +198 -0
  84. moai_adk/templates/.claude/hooks/alfred/handlers/__init__.py +14 -6
  85. moai_adk/templates/.claude/hooks/alfred/post_tool__enable_streaming_ui.py +50 -0
  86. moai_adk/templates/.claude/hooks/alfred/post_tool__log_changes.py +93 -0
  87. moai_adk/templates/.claude/hooks/alfred/post_tool__tag_auto_corrector.py +407 -0
  88. moai_adk/templates/.claude/hooks/alfred/pre_tool__auto_checkpoint.py +99 -0
  89. moai_adk/templates/.claude/hooks/alfred/pre_tool__realtime_tag_monitor.py +335 -0
  90. moai_adk/templates/.claude/hooks/alfred/pre_tool__tag_policy_validator.py +325 -0
  91. moai_adk/templates/.claude/hooks/alfred/session_end__cleanup.py +93 -0
  92. moai_adk/templates/.claude/hooks/alfred/session_start__auto_cleanup.py +580 -0
  93. moai_adk/templates/.claude/hooks/alfred/session_start__show_project_info.py +298 -0
  94. moai_adk/templates/.claude/hooks/alfred/shared/core/__init__.py +170 -0
  95. moai_adk/templates/.claude/hooks/alfred/{core → shared/core}/checkpoint.py +3 -3
  96. moai_adk/templates/.claude/hooks/alfred/{core → shared/core}/context.py +5 -5
  97. moai_adk/templates/.claude/hooks/alfred/shared/core/project.py +749 -0
  98. moai_adk/templates/.claude/hooks/alfred/shared/core/tags.py +230 -0
  99. moai_adk/templates/.claude/hooks/alfred/shared/core/version_cache.py +198 -0
  100. moai_adk/templates/.claude/hooks/alfred/shared/handlers/__init__.py +21 -0
  101. moai_adk/templates/.claude/hooks/alfred/shared/handlers/daily_analysis.py +351 -0
  102. moai_adk/templates/.claude/hooks/alfred/shared/handlers/notification.py +154 -0
  103. moai_adk/templates/.claude/hooks/alfred/shared/handlers/session.py +174 -0
  104. moai_adk/templates/.claude/hooks/alfred/shared/handlers/tool.py +87 -0
  105. moai_adk/templates/.claude/hooks/alfred/shared/handlers/user.py +61 -0
  106. moai_adk/templates/.claude/hooks/alfred/user_prompt__jit_load_docs.py +111 -0
  107. moai_adk/templates/.claude/hooks/alfred/utils/__init__.py +1 -0
  108. moai_adk/templates/.claude/hooks/alfred/utils/hook_config.py +94 -0
  109. moai_adk/templates/.claude/hooks/alfred/utils/timeout.py +161 -0
  110. moai_adk/templates/.claude/output-styles/alfred/alfred-moai-adk-beginner.md +267 -0
  111. moai_adk/templates/.claude/output-styles/alfred/keating-personal-tutor.md +440 -0
  112. moai_adk/templates/.claude/output-styles/alfred/r2d2-agentic-coding.md +583 -0
  113. moai_adk/templates/.claude/settings.json +96 -14
  114. moai_adk/templates/.claude/skills/moai-alfred-agent-guide/SKILL.md +70 -0
  115. moai_adk/templates/.claude/skills/moai-alfred-agent-guide/examples.md +62 -0
  116. moai_adk/templates/.claude/skills/moai-alfred-agent-guide/reference.md +242 -0
  117. moai_adk/templates/.claude/skills/moai-alfred-ask-user-questions/SKILL.md +237 -0
  118. moai_adk/templates/.claude/skills/moai-alfred-ask-user-questions/examples.md +871 -0
  119. moai_adk/templates/.claude/skills/moai-alfred-ask-user-questions/reference.md +653 -0
  120. moai_adk/templates/.claude/skills/moai-alfred-clone-pattern/README.md +162 -0
  121. moai_adk/templates/.claude/skills/moai-alfred-clone-pattern/SKILL.md +227 -0
  122. moai_adk/templates/.claude/skills/moai-alfred-clone-pattern/examples.md +354 -0
  123. moai_adk/templates/.claude/skills/moai-alfred-clone-pattern/reference.md +158 -0
  124. moai_adk/templates/.claude/skills/moai-alfred-code-reviewer/SKILL.md +179 -79
  125. moai_adk/templates/.claude/skills/moai-alfred-code-reviewer/examples.md +117 -0
  126. moai_adk/templates/.claude/skills/moai-alfred-code-reviewer/scripts/pre-review-check.sh +62 -0
  127. moai_adk/templates/.claude/skills/moai-alfred-config-schema/SKILL.md +132 -0
  128. moai_adk/templates/.claude/skills/moai-alfred-config-schema/examples.md +28 -0
  129. moai_adk/templates/.claude/skills/moai-alfred-config-schema/reference.md +444 -0
  130. moai_adk/templates/.claude/skills/moai-alfred-context-budget/SKILL.md +62 -0
  131. moai_adk/templates/.claude/skills/moai-alfred-context-budget/examples.md +28 -0
  132. moai_adk/templates/.claude/skills/moai-alfred-context-budget/reference.md +405 -0
  133. moai_adk/templates/.claude/skills/moai-alfred-dev-guide/SKILL.md +51 -0
  134. moai_adk/templates/.claude/skills/moai-alfred-dev-guide/examples.md +355 -0
  135. moai_adk/templates/.claude/skills/moai-alfred-dev-guide/reference.md +239 -0
  136. moai_adk/templates/.claude/skills/moai-alfred-expertise-detection/SKILL.md +323 -0
  137. moai_adk/templates/.claude/skills/moai-alfred-expertise-detection/examples.md +286 -0
  138. moai_adk/templates/.claude/skills/moai-alfred-expertise-detection/reference.md +126 -0
  139. moai_adk/templates/.claude/skills/moai-alfred-issue-labels/SKILL.md +229 -0
  140. moai_adk/templates/.claude/skills/moai-alfred-issue-labels/examples.md +4 -0
  141. moai_adk/templates/.claude/skills/moai-alfred-issue-labels/reference.md +150 -0
  142. moai_adk/templates/.claude/skills/moai-alfred-language-detection/SKILL.md +87 -73
  143. moai_adk/templates/.claude/skills/moai-alfred-language-detection/examples.md +29 -0
  144. moai_adk/templates/.claude/skills/moai-alfred-language-detection/reference.md +28 -0
  145. moai_adk/templates/.claude/skills/moai-alfred-personas/README.md +42 -0
  146. moai_adk/templates/.claude/skills/moai-alfred-personas/SKILL.md +429 -0
  147. moai_adk/templates/.claude/skills/moai-alfred-personas/examples.md +520 -0
  148. moai_adk/templates/.claude/skills/moai-alfred-personas/reference.md +405 -0
  149. moai_adk/templates/.claude/skills/moai-alfred-practices/SKILL.md +89 -0
  150. moai_adk/templates/.claude/skills/moai-alfred-practices/examples.md +122 -0
  151. moai_adk/templates/.claude/skills/moai-alfred-practices/reference.md +369 -0
  152. moai_adk/templates/.claude/skills/moai-alfred-proactive-suggestions/SKILL.md +508 -0
  153. moai_adk/templates/.claude/skills/moai-alfred-proactive-suggestions/examples.md +481 -0
  154. moai_adk/templates/.claude/skills/moai-alfred-proactive-suggestions/reference.md +100 -0
  155. moai_adk/templates/.claude/skills/moai-alfred-rules/SKILL.md +77 -0
  156. moai_adk/templates/.claude/skills/moai-alfred-rules/examples.md +265 -0
  157. moai_adk/templates/.claude/skills/moai-alfred-rules/reference.md +539 -0
  158. moai_adk/templates/.claude/skills/moai-alfred-session-state/SKILL.md +320 -0
  159. moai_adk/templates/.claude/skills/moai-alfred-session-state/examples.md +4 -0
  160. moai_adk/templates/.claude/skills/moai-alfred-session-state/reference.md +84 -0
  161. moai_adk/templates/.claude/skills/moai-alfred-spec-authoring/README.md +137 -0
  162. moai_adk/templates/.claude/skills/moai-alfred-spec-authoring/SKILL.md +219 -0
  163. moai_adk/templates/.claude/skills/moai-alfred-spec-authoring/examples/validate-spec.sh +161 -0
  164. moai_adk/templates/.claude/skills/moai-alfred-spec-authoring/examples.md +541 -0
  165. moai_adk/templates/.claude/skills/moai-alfred-spec-authoring/reference.md +622 -0
  166. moai_adk/templates/.claude/skills/moai-alfred-todowrite-pattern/SKILL.md +19 -0
  167. moai_adk/templates/.claude/skills/moai-alfred-todowrite-pattern/examples.md +4 -0
  168. moai_adk/templates/.claude/skills/moai-alfred-todowrite-pattern/reference.md +211 -0
  169. moai_adk/templates/.claude/skills/moai-alfred-workflow/SKILL.md +288 -0
  170. moai_adk/templates/.claude/skills/moai-cc-agents/SKILL.md +269 -0
  171. moai_adk/templates/.claude/skills/moai-cc-agents/templates/agent-template.md +32 -0
  172. moai_adk/templates/.claude/skills/moai-cc-claude-md/SKILL.md +298 -0
  173. moai_adk/templates/.claude/skills/moai-cc-claude-md/templates/CLAUDE-template.md +26 -0
  174. moai_adk/templates/.claude/skills/moai-cc-commands/SKILL.md +307 -0
  175. moai_adk/templates/.claude/skills/moai-cc-commands/templates/command-template.md +21 -0
  176. moai_adk/templates/.claude/skills/moai-cc-hooks/SKILL.md +252 -0
  177. moai_adk/templates/.claude/skills/moai-cc-hooks/scripts/pre-bash-check.sh +19 -0
  178. moai_adk/templates/.claude/skills/moai-cc-hooks/scripts/preserve-permissions.sh +19 -0
  179. moai_adk/templates/.claude/skills/moai-cc-hooks/scripts/validate-bash-command.py +24 -0
  180. moai_adk/templates/.claude/skills/moai-cc-mcp-plugins/SKILL.md +199 -0
  181. moai_adk/templates/.claude/skills/moai-cc-mcp-plugins/templates/settings-mcp-template.json +39 -0
  182. moai_adk/templates/.claude/skills/moai-cc-memory/SKILL.md +316 -0
  183. moai_adk/templates/.claude/skills/moai-cc-memory/templates/session-summary-template.md +18 -0
  184. moai_adk/templates/.claude/skills/moai-cc-settings/SKILL.md +263 -0
  185. moai_adk/templates/.claude/skills/moai-cc-settings/templates/settings-complete-template.json +30 -0
  186. moai_adk/templates/.claude/skills/moai-cc-skill-factory/CHECKLIST.md +482 -0
  187. moai_adk/templates/.claude/skills/moai-cc-skill-factory/EXAMPLES.md +303 -0
  188. moai_adk/templates/.claude/skills/moai-cc-skill-factory/INTERACTIVE-DISCOVERY.md +524 -0
  189. moai_adk/templates/.claude/skills/moai-cc-skill-factory/METADATA.md +477 -0
  190. moai_adk/templates/.claude/skills/moai-cc-skill-factory/PARALLEL-ANALYSIS-REPORT.md +429 -0
  191. moai_adk/templates/.claude/skills/moai-cc-skill-factory/PYTHON-VERSION-MATRIX.md +391 -0
  192. moai_adk/templates/.claude/skills/moai-cc-skill-factory/SKILL-FACTORY-WORKFLOW.md +431 -0
  193. moai_adk/templates/.claude/skills/moai-cc-skill-factory/SKILL-UPDATE-ADVISOR.md +577 -0
  194. moai_adk/templates/.claude/skills/moai-cc-skill-factory/SKILL.md +273 -0
  195. moai_adk/templates/.claude/skills/moai-cc-skill-factory/STEP-BY-STEP-GUIDE.md +466 -0
  196. moai_adk/templates/.claude/skills/moai-cc-skill-factory/STRUCTURE.md +583 -0
  197. moai_adk/templates/.claude/skills/moai-cc-skill-factory/WEB-RESEARCH.md +526 -0
  198. moai_adk/templates/.claude/skills/moai-cc-skill-factory/reference.md +608 -0
  199. moai_adk/templates/.claude/skills/moai-cc-skill-factory/scripts/generate-structure.sh +328 -0
  200. moai_adk/templates/.claude/skills/moai-cc-skill-factory/scripts/validate-skill.sh +312 -0
  201. moai_adk/templates/.claude/skills/moai-cc-skill-factory/templates/SKILL_TEMPLATE.md +245 -0
  202. moai_adk/templates/.claude/skills/moai-cc-skill-factory/templates/examples-template.md +285 -0
  203. moai_adk/templates/.claude/skills/moai-cc-skill-factory/templates/reference-template.md +278 -0
  204. moai_adk/templates/.claude/skills/moai-cc-skill-factory/templates/scripts-template.sh +303 -0
  205. moai_adk/templates/.claude/skills/moai-cc-skills/SKILL.md +291 -0
  206. moai_adk/templates/.claude/skills/moai-cc-skills/templates/SKILL-template.md +15 -0
  207. moai_adk/templates/.claude/skills/moai-change-logger/SKILL.md +563 -0
  208. moai_adk/templates/.claude/skills/moai-design-systems/SKILL.md +802 -0
  209. moai_adk/templates/.claude/skills/moai-design-systems/examples.md +1238 -0
  210. moai_adk/templates/.claude/skills/moai-design-systems/reference.md +673 -0
  211. moai_adk/templates/.claude/skills/moai-domain-backend/SKILL.md +234 -43
  212. moai_adk/templates/.claude/skills/moai-domain-backend/examples.md +1633 -0
  213. moai_adk/templates/.claude/skills/moai-domain-backend/reference.md +660 -0
  214. moai_adk/templates/.claude/skills/moai-domain-cli-tool/SKILL.md +97 -69
  215. moai_adk/templates/.claude/skills/moai-domain-cli-tool/examples.md +29 -0
  216. moai_adk/templates/.claude/skills/moai-domain-cli-tool/reference.md +30 -0
  217. moai_adk/templates/.claude/skills/moai-domain-data-science/SKILL.md +97 -72
  218. moai_adk/templates/.claude/skills/moai-domain-data-science/examples.md +29 -0
  219. moai_adk/templates/.claude/skills/moai-domain-data-science/reference.md +30 -0
  220. moai_adk/templates/.claude/skills/moai-domain-database/SKILL.md +97 -74
  221. moai_adk/templates/.claude/skills/moai-domain-database/examples.md +29 -0
  222. moai_adk/templates/.claude/skills/moai-domain-database/reference.md +30 -0
  223. moai_adk/templates/.claude/skills/moai-domain-devops/SKILL.md +98 -74
  224. moai_adk/templates/.claude/skills/moai-domain-devops/examples.md +29 -0
  225. moai_adk/templates/.claude/skills/moai-domain-devops/reference.md +31 -0
  226. moai_adk/templates/.claude/skills/moai-domain-frontend/SKILL.md +102 -73
  227. moai_adk/templates/.claude/skills/moai-domain-frontend/examples.md +29 -0
  228. moai_adk/templates/.claude/skills/moai-domain-frontend/reference.md +31 -0
  229. moai_adk/templates/.claude/skills/moai-domain-ml/SKILL.md +97 -73
  230. moai_adk/templates/.claude/skills/moai-domain-ml/examples.md +29 -0
  231. moai_adk/templates/.claude/skills/moai-domain-ml/reference.md +30 -0
  232. moai_adk/templates/.claude/skills/moai-domain-mobile-app/SKILL.md +97 -67
  233. moai_adk/templates/.claude/skills/moai-domain-mobile-app/examples.md +29 -0
  234. moai_adk/templates/.claude/skills/moai-domain-mobile-app/reference.md +30 -0
  235. moai_adk/templates/.claude/skills/moai-domain-security/SKILL.md +97 -79
  236. moai_adk/templates/.claude/skills/moai-domain-security/examples.md +29 -0
  237. moai_adk/templates/.claude/skills/moai-domain-security/reference.md +30 -0
  238. moai_adk/templates/.claude/skills/moai-domain-web-api/SKILL.md +97 -71
  239. moai_adk/templates/.claude/skills/moai-domain-web-api/examples.md +29 -0
  240. moai_adk/templates/.claude/skills/moai-domain-web-api/reference.md +30 -0
  241. moai_adk/templates/.claude/skills/moai-essentials-debug/SKILL.md +265 -64
  242. moai_adk/templates/.claude/skills/moai-essentials-debug/examples.md +1064 -0
  243. moai_adk/templates/.claude/skills/moai-essentials-debug/reference.md +1047 -0
  244. moai_adk/templates/.claude/skills/moai-essentials-perf/SKILL.md +87 -78
  245. moai_adk/templates/.claude/skills/moai-essentials-perf/examples.md +29 -0
  246. moai_adk/templates/.claude/skills/moai-essentials-perf/reference.md +28 -0
  247. moai_adk/templates/.claude/skills/moai-essentials-refactor/SKILL.md +87 -70
  248. moai_adk/templates/.claude/skills/moai-essentials-refactor/examples.md +29 -0
  249. moai_adk/templates/.claude/skills/moai-essentials-refactor/reference.md +28 -0
  250. moai_adk/templates/.claude/skills/moai-essentials-review/SKILL.md +87 -86
  251. moai_adk/templates/.claude/skills/moai-essentials-review/examples.md +29 -0
  252. moai_adk/templates/.claude/skills/moai-essentials-review/reference.md +28 -0
  253. moai_adk/templates/.claude/skills/moai-foundation-ears/SKILL.md +80 -62
  254. moai_adk/templates/.claude/skills/moai-foundation-ears/examples.md +29 -0
  255. moai_adk/templates/.claude/skills/moai-foundation-ears/reference.md +28 -0
  256. moai_adk/templates/.claude/skills/moai-foundation-git/SKILL.md +207 -50
  257. moai_adk/templates/.claude/skills/moai-foundation-git/examples.md +29 -0
  258. moai_adk/templates/.claude/skills/moai-foundation-git/reference.md +29 -0
  259. moai_adk/templates/.claude/skills/moai-foundation-langs/SKILL.md +90 -71
  260. moai_adk/templates/.claude/skills/moai-foundation-langs/examples.md +29 -0
  261. moai_adk/templates/.claude/skills/moai-foundation-langs/reference.md +28 -0
  262. moai_adk/templates/.claude/skills/moai-foundation-specs/SKILL.md +78 -58
  263. moai_adk/templates/.claude/skills/moai-foundation-specs/examples.md +29 -0
  264. moai_adk/templates/.claude/skills/moai-foundation-specs/reference.md +28 -0
  265. moai_adk/templates/.claude/skills/moai-foundation-tags/SKILL.md +78 -51
  266. moai_adk/templates/.claude/skills/moai-foundation-tags/examples.md +29 -0
  267. moai_adk/templates/.claude/skills/moai-foundation-tags/reference.md +28 -0
  268. moai_adk/templates/.claude/skills/moai-foundation-trust/.!11330!examples.md +0 -0
  269. moai_adk/templates/.claude/skills/moai-foundation-trust/SKILL.md +253 -32
  270. moai_adk/templates/.claude/skills/moai-foundation-trust/examples.md +0 -0
  271. moai_adk/templates/.claude/skills/moai-foundation-trust/reference.md +1099 -0
  272. moai_adk/templates/.claude/skills/moai-jit-docs-enhanced/SKILL.md +460 -0
  273. moai_adk/templates/.claude/skills/moai-lang-c/SKILL.md +98 -74
  274. moai_adk/templates/.claude/skills/moai-lang-c/examples.md +29 -0
  275. moai_adk/templates/.claude/skills/moai-lang-c/reference.md +31 -0
  276. moai_adk/templates/.claude/skills/moai-lang-cpp/SKILL.md +98 -76
  277. moai_adk/templates/.claude/skills/moai-lang-cpp/examples.md +29 -0
  278. moai_adk/templates/.claude/skills/moai-lang-cpp/reference.md +31 -0
  279. moai_adk/templates/.claude/skills/moai-lang-csharp/SKILL.md +2358 -70
  280. moai_adk/templates/.claude/skills/moai-lang-csharp/examples.md +29 -0
  281. moai_adk/templates/.claude/skills/moai-lang-csharp/reference.md +30 -0
  282. moai_adk/templates/.claude/skills/moai-lang-dart/SKILL.md +2962 -68
  283. moai_adk/templates/.claude/skills/moai-lang-dart/examples.md +29 -0
  284. moai_adk/templates/.claude/skills/moai-lang-dart/reference.md +30 -0
  285. moai_adk/templates/.claude/skills/moai-lang-go/SKILL.md +1898 -70
  286. moai_adk/templates/.claude/skills/moai-lang-go/examples.md +29 -0
  287. moai_adk/templates/.claude/skills/moai-lang-go/reference.md +31 -0
  288. moai_adk/templates/.claude/skills/moai-lang-java/SKILL.md +1465 -68
  289. moai_adk/templates/.claude/skills/moai-lang-java/examples.md +29 -0
  290. moai_adk/templates/.claude/skills/moai-lang-java/reference.md +31 -0
  291. moai_adk/templates/.claude/skills/moai-lang-javascript/SKILL.md +2364 -66
  292. moai_adk/templates/.claude/skills/moai-lang-javascript/examples.md +29 -0
  293. moai_adk/templates/.claude/skills/moai-lang-javascript/reference.md +32 -0
  294. moai_adk/templates/.claude/skills/moai-lang-kotlin/SKILL.md +1630 -69
  295. moai_adk/templates/.claude/skills/moai-lang-kotlin/examples.md +29 -0
  296. moai_adk/templates/.claude/skills/moai-lang-kotlin/reference.md +31 -0
  297. moai_adk/templates/.claude/skills/moai-lang-php/SKILL.md +89 -61
  298. moai_adk/templates/.claude/skills/moai-lang-php/examples.md +29 -0
  299. moai_adk/templates/.claude/skills/moai-lang-php/reference.md +30 -0
  300. moai_adk/templates/.claude/skills/moai-lang-python/SKILL.md +735 -66
  301. moai_adk/templates/.claude/skills/moai-lang-python/examples.md +624 -0
  302. moai_adk/templates/.claude/skills/moai-lang-python/reference.md +316 -0
  303. moai_adk/templates/.claude/skills/moai-lang-r/SKILL.md +97 -73
  304. moai_adk/templates/.claude/skills/moai-lang-r/examples.md +29 -0
  305. moai_adk/templates/.claude/skills/moai-lang-r/reference.md +30 -0
  306. moai_adk/templates/.claude/skills/moai-lang-ruby/SKILL.md +98 -73
  307. moai_adk/templates/.claude/skills/moai-lang-ruby/examples.md +29 -0
  308. moai_adk/templates/.claude/skills/moai-lang-ruby/reference.md +31 -0
  309. moai_adk/templates/.claude/skills/moai-lang-rust/SKILL.md +1834 -70
  310. moai_adk/templates/.claude/skills/moai-lang-rust/examples.md +29 -0
  311. moai_adk/templates/.claude/skills/moai-lang-rust/reference.md +31 -0
  312. moai_adk/templates/.claude/skills/moai-lang-scala/SKILL.md +99 -74
  313. moai_adk/templates/.claude/skills/moai-lang-scala/examples.md +29 -0
  314. moai_adk/templates/.claude/skills/moai-lang-scala/reference.md +30 -0
  315. moai_adk/templates/.claude/skills/moai-lang-shell/SKILL.md +97 -74
  316. moai_adk/templates/.claude/skills/moai-lang-shell/examples.md +29 -0
  317. moai_adk/templates/.claude/skills/moai-lang-shell/reference.md +30 -0
  318. moai_adk/templates/.claude/skills/moai-lang-sql/SKILL.md +98 -74
  319. moai_adk/templates/.claude/skills/moai-lang-sql/examples.md +29 -0
  320. moai_adk/templates/.claude/skills/moai-lang-sql/reference.md +31 -0
  321. moai_adk/templates/.claude/skills/moai-lang-swift/SKILL.md +1959 -69
  322. moai_adk/templates/.claude/skills/moai-lang-swift/examples.md +29 -0
  323. moai_adk/templates/.claude/skills/moai-lang-swift/reference.md +30 -0
  324. moai_adk/templates/.claude/skills/moai-lang-template/SKILL.md +348 -0
  325. moai_adk/templates/.claude/skills/moai-lang-template/VARIABLES.md +98 -0
  326. moai_adk/templates/.claude/skills/moai-lang-typescript/SKILL.md +1230 -66
  327. moai_adk/templates/.claude/skills/moai-lang-typescript/examples.md +29 -0
  328. moai_adk/templates/.claude/skills/moai-lang-typescript/reference.md +34 -0
  329. moai_adk/templates/.claude/skills/moai-learning-optimizer/SKILL.md +575 -0
  330. moai_adk/templates/.claude/skills/moai-project-batch-questions/README.md +50 -0
  331. moai_adk/templates/.claude/skills/moai-project-batch-questions/SKILL.md +304 -0
  332. moai_adk/templates/.claude/skills/moai-project-batch-questions/examples.md +417 -0
  333. moai_adk/templates/.claude/skills/moai-project-batch-questions/reference.md +704 -0
  334. moai_adk/templates/.claude/skills/moai-project-config-manager/README.md +87 -0
  335. moai_adk/templates/.claude/skills/moai-project-config-manager/SKILL.md +552 -0
  336. moai_adk/templates/.claude/skills/moai-project-config-manager/examples.md +1109 -0
  337. moai_adk/templates/.claude/skills/moai-project-config-manager/reference.md +514 -0
  338. moai_adk/templates/.claude/skills/moai-project-config-manager/validate.py +106 -0
  339. moai_adk/templates/.claude/skills/moai-project-documentation/README.md +11 -0
  340. moai_adk/templates/.claude/skills/moai-project-documentation/SKILL.md +622 -0
  341. moai_adk/templates/.claude/skills/moai-project-documentation/examples.md +20 -0
  342. moai_adk/templates/.claude/skills/moai-project-documentation/reference.md +12 -0
  343. moai_adk/templates/.claude/skills/moai-project-language-initializer/README.md +152 -0
  344. moai_adk/templates/.claude/skills/moai-project-language-initializer/SKILL.md +285 -0
  345. moai_adk/templates/.claude/skills/moai-project-language-initializer/examples.md +333 -0
  346. moai_adk/templates/.claude/skills/moai-project-language-initializer/reference.md +386 -0
  347. moai_adk/templates/.claude/skills/moai-project-template-optimizer/README.md +49 -0
  348. moai_adk/templates/.claude/skills/moai-project-template-optimizer/SKILL.md +319 -0
  349. moai_adk/templates/.claude/skills/moai-project-template-optimizer/examples.md +58 -0
  350. moai_adk/templates/.claude/skills/moai-project-template-optimizer/reference.md +123 -0
  351. moai_adk/templates/.claude/skills/moai-session-info/SKILL.md +314 -0
  352. moai_adk/templates/.claude/skills/moai-streaming-ui/SKILL.md +552 -0
  353. moai_adk/templates/.claude/skills/moai-tag-policy-validator/SKILL.md +570 -0
  354. moai_adk/templates/.git-hooks/pre-commit +66 -0
  355. moai_adk/templates/.git-hooks/pre-push +255 -0
  356. moai_adk/templates/.github/workflows/c-tag-validation.yml +11 -0
  357. moai_adk/templates/.github/workflows/cpp-tag-validation.yml +11 -0
  358. moai_adk/templates/.github/workflows/csharp-tag-validation.yml +11 -0
  359. moai_adk/templates/.github/workflows/dart-tag-validation.yml +11 -0
  360. moai_adk/templates/.github/workflows/go-tag-validation.yml +130 -0
  361. moai_adk/templates/.github/workflows/java-tag-validation.yml +11 -0
  362. moai_adk/templates/.github/workflows/javascript-tag-validation.yml +135 -0
  363. moai_adk/templates/.github/workflows/kotlin-tag-validation.yml +11 -0
  364. moai_adk/templates/.github/workflows/moai-gitflow.yml +166 -3
  365. moai_adk/templates/.github/workflows/moai-release-create.yml +100 -0
  366. moai_adk/templates/.github/workflows/moai-release-pipeline.yml +188 -0
  367. moai_adk/templates/.github/workflows/php-tag-validation.yml +11 -0
  368. moai_adk/templates/.github/workflows/python-tag-validation.yml +118 -0
  369. moai_adk/templates/.github/workflows/release.yml +118 -0
  370. moai_adk/templates/.github/workflows/ruby-tag-validation.yml +11 -0
  371. moai_adk/templates/.github/workflows/rust-tag-validation.yml +11 -0
  372. moai_adk/templates/.github/workflows/shell-tag-validation.yml +11 -0
  373. moai_adk/templates/.github/workflows/spec-issue-sync.yml +338 -0
  374. moai_adk/templates/.github/workflows/swift-tag-validation.yml +11 -0
  375. moai_adk/templates/.github/workflows/tag-report.yml +269 -0
  376. moai_adk/templates/.github/workflows/tag-validation.yml +186 -0
  377. moai_adk/templates/.github/workflows/typescript-tag-validation.yml +154 -0
  378. moai_adk/templates/.mcp.json +31 -0
  379. moai_adk/templates/.moai/config.json +80 -7
  380. moai_adk/templates/CLAUDE.md +562 -546
  381. moai_adk/utils/banner.py +5 -5
  382. moai_adk/utils/common.py +294 -0
  383. moai_adk/utils/link_validator.py +235 -0
  384. moai_adk/utils/logger.py +8 -8
  385. moai_adk/utils/user_experience.py +451 -0
  386. moai_adk-0.20.1.dist-info/METADATA +233 -0
  387. moai_adk-0.20.1.dist-info/RECORD +404 -0
  388. moai_adk/templates/.claude/hooks/alfred/README.md +0 -230
  389. moai_adk/templates/.claude/hooks/alfred/alfred_hooks.py +0 -156
  390. moai_adk/templates/.claude/hooks/alfred/core/__init__.py +0 -85
  391. moai_adk/templates/.claude/hooks/alfred/handlers/notification.py +0 -25
  392. moai_adk/templates/.claude/hooks/alfred/handlers/session.py +0 -92
  393. moai_adk/templates/.claude/hooks/alfred/handlers/tool.py +0 -70
  394. moai_adk/templates/.claude/hooks/alfred/handlers/user.py +0 -41
  395. moai_adk/templates/.claude/output-styles/alfred/agentic-coding.md +0 -636
  396. moai_adk/templates/.claude/output-styles/alfred/moai-adk-learning.md +0 -692
  397. moai_adk/templates/.claude/output-styles/alfred/study-with-alfred.md +0 -470
  398. moai_adk/templates/.claude/skills/moai-alfred-debugger-pro/SKILL.md +0 -103
  399. moai_adk/templates/.claude/skills/moai-alfred-ears-authoring/SKILL.md +0 -103
  400. moai_adk/templates/.claude/skills/moai-alfred-git-workflow/SKILL.md +0 -95
  401. moai_adk/templates/.claude/skills/moai-alfred-performance-optimizer/SKILL.md +0 -105
  402. moai_adk/templates/.claude/skills/moai-alfred-refactoring-coach/SKILL.md +0 -97
  403. moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-validation/SKILL.md +0 -97
  404. moai_adk/templates/.claude/skills/moai-alfred-tag-scanning/SKILL.md +0 -90
  405. moai_adk/templates/.claude/skills/moai-alfred-trust-validation/SKILL.md +0 -99
  406. moai_adk/templates/.claude/skills/moai-alfred-tui-survey/SKILL.md +0 -87
  407. moai_adk/templates/.claude/skills/moai-alfred-tui-survey/examples.md +0 -62
  408. moai_adk/templates/.claude/skills/moai-claude-code/SKILL.md +0 -94
  409. moai_adk/templates/.claude/skills/moai-claude-code/examples.md +0 -513
  410. moai_adk/templates/.claude/skills/moai-claude-code/reference.md +0 -433
  411. moai_adk/templates/.claude/skills/moai-claude-code/templates/agent-full.md +0 -332
  412. moai_adk/templates/.claude/skills/moai-claude-code/templates/command-full.md +0 -384
  413. moai_adk/templates/.claude/skills/moai-claude-code/templates/plugin-full.json +0 -363
  414. moai_adk/templates/.claude/skills/moai-claude-code/templates/settings-full.json +0 -595
  415. moai_adk/templates/.claude/skills/moai-claude-code/templates/skill-full.md +0 -496
  416. moai_adk/templates/.claude/skills/moai-lang-clojure/SKILL.md +0 -100
  417. moai_adk/templates/.claude/skills/moai-lang-elixir/SKILL.md +0 -99
  418. moai_adk/templates/.claude/skills/moai-lang-haskell/SKILL.md +0 -100
  419. moai_adk/templates/.claude/skills/moai-lang-julia/SKILL.md +0 -98
  420. moai_adk/templates/.claude/skills/moai-lang-lua/SKILL.md +0 -98
  421. moai_adk/templates/.github/PULL_REQUEST_TEMPLATE.md +0 -69
  422. moai_adk/templates/.moai/memory/development-guide.md +0 -344
  423. moai_adk/templates/.moai/memory/gitflow-protection-policy.md +0 -220
  424. moai_adk/templates/.moai/memory/spec-metadata.md +0 -356
  425. moai_adk/templates/.moai/project/product.md +0 -161
  426. moai_adk/templates/.moai/project/structure.md +0 -156
  427. moai_adk/templates/.moai/project/tech.md +0 -227
  428. moai_adk/templates/__init__.py +0 -2
  429. moai_adk-0.4.5.dist-info/METADATA +0 -369
  430. moai_adk-0.4.5.dist-info/RECORD +0 -152
  431. {moai_adk-0.4.5.dist-info → moai_adk-0.20.1.dist-info}/WHEEL +0 -0
  432. {moai_adk-0.4.5.dist-info → moai_adk-0.20.1.dist-info}/entry_points.txt +0 -0
  433. {moai_adk-0.4.5.dist-info → moai_adk-0.20.1.dist-info}/licenses/LICENSE +0 -0
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: alfred:2-run
3
- description: "Implement all SPECs with SPEC ID to implement (e.g. SPEC-001) or all - Execute planned work (TDD implementation, prototyping, documentation, etc.)"
4
- argument-hint: "SPEC-ID - All with SPEC ID to implement (e.g. SPEC-001) or all SPEC Implementation
3
+ description: "Execute TDD implementation cycle"
4
+ argument-hint: "SPEC-ID - All with SPEC ID to implement (e.g. SPEC-001) or all \"SPEC Implementation\""
5
5
  allowed-tools:
6
6
  - Read
7
7
  - Write
@@ -20,17 +20,24 @@ allowed-tools:
20
20
  ---
21
21
 
22
22
  # ⚒️ MoAI-ADK Phase 2: Run the plan - Flexible implementation strategy
23
- > Interactive prompts rely on `Skill("moai-alfred-tui-survey")` so AskUserQuestion renders TUI selection menus for user surveys and approvals.
23
+
24
+ > **Critical Note**: ALWAYS invoke `Skill("moai-alfred-ask-user-questions")` before using `AskUserQuestion` tool. This skill provides up-to-date best practices, field specifications, and validation rules for interactive prompts.
25
+ >
26
+ > **Batched Design**: All AskUserQuestion calls follow batched design principles (1-4 questions per call) to minimize user interaction turns. See CLAUDE.md section "Alfred Command Completion Pattern" for details.
27
+
28
+ <!-- @CODE:ALF-WORKFLOW-002:CMD-RUN -->
29
+
30
+ **4-Step Workflow Integration**: This command implements Step 3 of Alfred's workflow (Task Execution with TodoWrite tracking). See CLAUDE.md for full workflow details.
24
31
 
25
32
  ## 🎯 Command Purpose
26
33
 
27
- Analyze SPEC documents to execute planned tasks. It supports not only TDD implementation but also various execution scenarios such as prototyping and documentation work.
34
+ Execute planned tasks based on SPEC document analysis. Supports TDD implementation, prototyping, and documentation work.
28
35
 
29
36
  **Run on**: $ARGUMENTS
30
37
 
31
- ## 💡 Execution philosophy: Plan → Run → Sync
38
+ ## 💡 Execution philosophy: "Plan → Run → Sync"
32
39
 
33
- `/alfred:2-run` is a general-purpose command that does not simply "build" code, but **performs** a planned task.
40
+ `/alfred:2-run` performs planned tasks through various execution strategies.
34
41
 
35
42
  ### 3 main scenarios
36
43
 
@@ -55,259 +62,358 @@ Analyze SPEC documents to execute planned tasks. It supports not only TDD implem
55
62
  → API documentation, tutorials, guides, etc.
56
63
  ```
57
64
 
58
- > **Standard two-step workflow** (see `CLAUDE.md` - "Alfred Command Execution Pattern" for details)
59
-
60
65
  ## 📋 Execution flow
61
66
 
62
67
  1. **SPEC Analysis**: Requirements extraction and complexity assessment
63
- 2. **Establishment of implementation strategy**: Determine the optimized approach for each language (TDD, prototype, documentation, etc.)
68
+ 2. **Implementation Strategy**: Determine optimized approach (TDD, prototype, documentation)
64
69
  3. **User Confirmation**: Review and approve action plan
65
- 4. **Execute work**: Perform work according to the approved plan
66
- 5. **Git Operations**: Creating step-by-step commits with git-manager
70
+ 4. **Execute Task**: Perform work according to approved plan
71
+ 5. **Git Operations**: Create step-by-step commits with git-manager
67
72
 
68
73
  ## 🧠 Associated Skills & Agents
69
74
 
70
- | Agent | Core Skill | Purpose |
71
- | ----- | -------- | ------- |
75
+ | Agent | Core Skill | Purpose |
76
+ | ---------------------- | -------------------------------- | --------------------------------------- |
72
77
  | implementation-planner | `moai-alfred-language-detection` | Detect language and design architecture |
73
- | tdd-implementer | `moai-essentials-debug` | Implement TDD (RED → GREEN → REFACTOR) |
74
- | quality-gate | `moai-alfred-trust-validation` | Verify TRUST 5 principles |
75
- | git-manager | `moai-alfred-git-workflow` | Commit and manage Git workflows |
78
+ | tdd-implementer | `moai-essentials-debug` | Implement TDD (RED → GREEN → REFACTOR) |
79
+ | quality-gate | `moai-alfred-trust-validation` | Verify TRUST 5 principles |
80
+ | git-manager | `moai-alfred-git-workflow` | Commit and manage Git workflows |
76
81
 
77
82
  **Note**: TUI Survey Skill is used for user confirmations during the run phase and is shared across all interactive prompts.
78
83
 
79
84
  ## 🔗 Associated Agent
80
85
 
81
- - **Phase 1**: implementation-planner (📋 technical architect) - SPEC analysis and establishment of execution strategy
82
- - **Phase 2**: tdd-implementer (🔬 senior developer) - Dedicated to execution work
83
- - **Phase 2.5**: quality-gate (🛡️ Quality Assurance Engineer) - TRUST principle verification (automatically)
84
- - **Phase 3**: git-manager (🚀 Release Engineer) - Dedicated to Git commits
86
+ - **Phase 1**: implementation-planner (📋 technical architect) - SPEC analysis and execution strategy
87
+ - **Phase 2**: tdd-implementer (🔬 senior developer) - Task execution
88
+ - **Phase 2.5**: quality-gate (🛡️ Quality Assurance Engineer) - TRUST principle verification (automatic)
89
+ - **Phase 3**: git-manager (🚀 Release Engineer) - Git commits
85
90
 
86
- ## 💡 Example of use
91
+ ## 💡 Example Usage
87
92
 
88
93
  Users can run commands as follows:
89
94
  - `/alfred:2-run SPEC-001` - Run a specific SPEC
90
95
  - `/alfred:2-run all` - Run all SPECs in batches
91
96
  - `/alfred:2-run SPEC-003 --test` - Run only tests
92
97
 
93
- ## 🔍 STEP 1: SPEC analysis and execution plan establishment
94
-
95
- First, the specified SPEC is analyzed to establish an action plan and receive user confirmation.
96
-
97
- **The implementation-planner agent automatically loads and analyzes the required documents.**
98
-
99
- ### 🔍 Browse the code base (recommended)
100
-
101
- **If you need to understand existing code structure or find similar patterns** Use the Explore agent first:
102
-
103
- ```
104
- Invoking the Task tool (Explore agent):
105
- - subagent_type: "Explore"
106
- - description: "Explore existing code structures and patterns"
107
- - prompt: "Please explore existing code related to SPEC-$ARGUMENTS:
108
- - Similar function implementation code (src/)
109
- - Test patterns for reference (tests/)
110
- - Architectural patterns and design patterns
111
- - Use Current libraries and versions (package.json, requirements.txt)
112
- thoroughness level: medium"
113
- ```
114
-
115
- **When to use the Explore Agent**:
116
- - ✅ When you need to understand the existing code structure/pattern
117
- - ✅ When you need to refer to how a similar function is implemented
118
- - ✅ When you need to understand the architectural rules of the project
119
- - ✅ Check the library and version being used
120
-
121
- ### ⚙️ How to call an agent
122
-
123
- **In STEP 1, we call the implementation-planner agent using the Task tool**:
124
-
125
- ```
126
- Task tool call example:
127
- - subagent_type: "implementation-planner"
128
- - description: "SPEC analysis and establishment of execution strategy"
129
- - prompt: "Please analyze the SPEC of $ARGUMENTS and establish an execution plan.
130
- It must include the following:
131
- 1. SPEC requirements extraction and complexity assessment
132
- 2. Library and tool selection (using WebFetch)
133
- 3. TAG chain design
134
- 4. Step-by-step execution plan
135
- 5. Risks and response plans
136
- 6. Create action plan and use `Skill("moai-alfred-tui-survey")` to confirm the next action with the user
137
- (Optional) Explore results: $EXPLORE_RESULTS"
138
- ```
139
-
140
- ### SPEC analysis in progress
141
-
142
- 1. **SPEC document analysis**
143
- - Requirements extraction and complexity assessment
144
- - Check technical constraints
145
- - Dependency and impact scope analysis
146
- - (Optional) Identify existing code structure based on Explore results
147
-
148
- 2. **Establish execution strategy**
149
- - Detect project language and optimize execution strategy
150
- - Determine approach (TDD, prototyping, documentation, etc.)
151
- - Estimate expected work scope and time
152
-
153
- 3. **Check and specify library versions (required)**
154
- - **Web search**: Check the latest stable versions of all libraries to be used through `WebSearch`
155
- - **Specify versions**: Specify the exact version for each library in the implementation plan report (e.g. `fastapi>=0.118.3`)
156
- - **Stability priority**: Exclude beta/alpha versions, select only production stable versions
157
- - **Check compatibility**: Verify version compatibility between libraries
158
- - **Search keyword examples**:
159
- - `"FastAPI latest stable version 2025"`
160
- - `"SQLAlchemy 2.0 latest stable version 2025"`
161
- - `"React 18 latest stable version 2025"`
162
-
163
- 4. **Report action plan**
164
- - Present step-by-step action plan
165
- - Identify potential risk factors
166
- - Set quality gate checkpoints
167
- - **Specify library version (required)**
168
-
169
- ### User verification steps
170
-
171
- After reviewing the action plan, select one of the following:
172
- - **"Proceed"** or **"Start"**: Start executing the task as planned
173
- - **"Modify [Content]"**: Request a plan modification
174
- - **"Abort"**: Stop the task
175
-
176
98
  ---
177
99
 
178
- ## 🚀 STEP 2: Execute task (after user approval)
179
-
180
- After user approval (gathered through `Skill("moai-alfred-tui-survey")`), **call the tdd-implementer agent using the Task tool**.
181
-
182
- ### ⚙️ How to call an agent
100
+ ## 🔍 YOUR TASK: STEP 1 - SPEC Analysis and Execution Planning
101
+
102
+ Your task is to analyze SPEC requirements and create an execution plan. Follow these steps:
103
+
104
+ ### STEP 1.1: Determine if Codebase Exploration is Needed
105
+
106
+ Read the SPEC document at `.moai/specs/SPEC-$ARGUMENTS/spec.md`.
107
+
108
+ IF the SPEC requires understanding existing code patterns (architecture, similar implementations, test patterns), THEN:
109
+ - Invoke the Explore agent using the Task tool
110
+ - Set subagent_type to "Explore"
111
+ - Set description to "Explore existing code structures and patterns"
112
+ - Pass prompt: "SPEC-$ARGUMENTS와 관련된 기존 코드를 탐색해주세요: 유사한 기능 구현 코드 (src/), 참고할 테스트 패턴 (tests/), 아키텍처 패턴 및 디자인 패턴, 현재 라이브러리 및 버전 (package.json, requirements.txt). 상세도 수준: medium"
113
+ - Store exploration results in memory for next step
114
+
115
+ IF the SPEC does not require codebase exploration (greenfield implementation, simple feature), THEN:
116
+ - Skip exploration phase
117
+ - Proceed directly to STEP 1.2
118
+
119
+ ### STEP 1.2: Create Implementation Plan
120
+
121
+ Invoke the implementation-planner agent using the Task tool:
122
+ - Set subagent_type to "implementation-planner"
123
+ - Set description to "SPEC analysis and establishment of execution strategy"
124
+ - Pass prompt including:
125
+ - SPEC ID ($ARGUMENTS)
126
+ - Requirements extraction and complexity assessment
127
+ - Library and tool selection (use WebFetch for latest stable versions)
128
+ - TAG chain design
129
+ - Step-by-step execution plan
130
+ - Risk factors and mitigation strategies
131
+ - (Optional) Exploration results from STEP 1.1 if available
132
+ - Request that the agent creates an action plan report
133
+
134
+ The implementation-planner agent will:
135
+ 1. Analyze SPEC requirements and assess complexity
136
+ 2. Check technical constraints and dependencies
137
+ 3. Detect project language and optimize execution strategy
138
+ 4. Search for latest stable library versions using WebFetch
139
+ 5. Design TAG chain and execution sequence
140
+ 6. Create step-by-step action plan with risk assessment
141
+ 7. Generate execution plan report
142
+
143
+ ### STEP 1.3: Present Plan to User for Approval
144
+
145
+ After the implementation-planner completes the execution plan, invoke `Skill("moai-alfred-ask-user-questions")` first.
146
+
147
+ Then use the AskUserQuestion tool to obtain explicit user approval:
148
+ - Present the implementation plan in plain text format
149
+ - Ask "Implementation plan is ready. How would you like to proceed?"
150
+ - Provide these options:
151
+ - "Proceed with TDD" - Start RED → GREEN → REFACTOR cycle
152
+ - "Research First" - Invoke Explore agent to study existing code patterns
153
+ - "Modify Strategy" - Request changes to implementation approach
154
+ - "Postpone" - Save plan and return later
155
+ - Wait for user response
156
+
157
+ **Response handling:**
158
+
159
+ IF user selects "Proceed with TDD", THEN:
160
+ - Display "Starting RED phase..."
161
+ - Proceed to STEP 2 (TDD Implementation)
162
+
163
+ IF user selects "Research First", THEN:
164
+ - Display "Codebase exploration complete. Plan updated."
165
+ - Invoke Explore agent to analyze existing codebase
166
+ - Pass exploration results back to implementation-planner
167
+ - Re-generate updated plan with research insights
168
+ - Present updated plan for approval again (recursive - return to STEP 1.3)
169
+
170
+ IF user selects "Modify Strategy", THEN:
171
+ - Display "Plan modified. Please review updated strategy."
172
+ - Collect strategy modification requests from user
173
+ - Update implementation plan with requested changes
174
+ - Present updated plan for approval again (recursive - return to STEP 1.3)
175
+
176
+ IF user selects "Postpone", THEN:
177
+ - Display "Plan saved. Resume with `/alfred:2-run SPEC-{ID}`"
178
+ - Save plan to `.moai/specs/SPEC-{ID}/plan.md`
179
+ - Create git commit with message "plan(spec): Save implementation plan for SPEC-{ID}"
180
+ - Stop execution
181
+ - User can resume later by running `/alfred:2-run SPEC-{ID}`
183
182
 
184
- **STEP 2 calls tdd-implementer using the Task tool**:
185
-
186
- ```
187
- Task tool call example:
188
- - subagent_type: "tdd-implementer"
189
- - description: "Execute task"
190
- - prompt: "Please execute the task according to the plan approved in STEP 1.
191
- For TDD scenario:
192
- - Perform RED → GREEN → REFACTOR cycle,
193
- Perform the following for each TAG:
194
- 1. RED Phase: Write a test that fails with the @TEST:ID tag
195
- 2. GREEN Phase: Minimal implementation with the @CODE:ID tag
196
- 3. REFACTOR Phase: Improve code quality
197
- 4. Verify TAG completion conditions and proceed to the next TAG
198
-
199
- Execute on: $ARGUMENTS"
200
- ```
201
-
202
- ## 🔗 TDD optimization for each language
203
-
204
- ### Project language detection and optimal routing
205
-
206
- `tdd-implementer` automatically detects the language of your project and selects the optimal TDD tools and workflow:
207
-
208
- - **Language detection**: Analyze project files (package.json, pyproject.toml, go.mod, etc.)
209
- - **Tool selection**: Automatically select the optimal test framework for each language
210
- - **TAG application**: Write @TAG annotations directly in code files
211
- - **Run cycle**: RED → GREEN → REFACTOR sequential process
212
-
213
- ### TDD tool mapping
214
-
215
- #### Backend/System
216
-
217
- | SPEC Type | Implementation language | Test Framework | Performance Goals | Coverage Goals |
218
- |-----------|-----------|-------------------|-----------|---------------|
219
- | **CLI/System** | TypeScript | jest + ts-node | < 18ms | 95%+ |
220
- | **API/Backend** | TypeScript | Jest + SuperTest | < 50ms | 90%+ |
221
- | **Frontend** | TypeScript | Jest + Testing Library | < 100ms | 85%+ |
222
- | **Data Processing** | TypeScript | Jest + Mock | < 200ms | 85%+ |
223
- | **Python Project** | Python | pytest + mypy | Custom | 85%+ |
224
-
225
- #### Mobile Framework
226
-
227
- | SPEC Type | Implementation language | Test Framework | Performance Goals | Coverage Goals |
228
- |-----------|-----------|-------------------|-----------|---------------|
229
- | **Flutter App** | Dart | flutter test + widget test | < 100ms | 85%+ |
230
- | **React Native** | TypeScript | Jest + RN Testing Library | < 100ms | 85%+ |
231
- | **iOS App** | Swift | XCTest + XCUITest | < 150ms | 80%+ |
232
- | **Android App** | Kotlin | JUnit + Espresso | < 150ms | 80%+ |
233
-
234
- ## 🚀 Optimized agent collaboration structure
235
-
236
- - **Phase 1**: `implementation-planner` agent analyzes SPEC and establishes execution strategy
237
- - **Phase 2**: `tdd-implementer` agent executes tasks (TDD cycle, prototyping, documentation, etc.)
238
- - **Phase 2.5**: `quality-gate` agent verifies TRUST principle and quality verification (automatically)
239
- - **Phase 3**: `git-manager` agent processes all commits at once after task completion
240
- - **Single responsibility principle**: Each agent is responsible only for its own area of expertise
241
- - **Inter-agent call prohibited**: Each agent runs independently, sequential calls are made only at the command level
242
-
243
- ## 🔄 Step 2 Workflow Execution Order
244
-
245
- ### Phase 1: Analysis and planning phase
246
-
247
- The `implementation-planner` agent does the following:
248
-
249
- 1. **SPEC document analysis**: Requirements extraction and complexity assessment of specified SPEC ID
250
- 2. **Library selection**: Check the latest stable version and verify compatibility through WebFetch
251
- 3. **TAG chain design**: Determine TAG order and dependency
252
- 4. **Establishment of implementation strategy**: Step-by-step implementation plan and risk identification
253
- 5. **Create action plan**: Create a structured plan and, via `Skill("moai-alfred-tui-survey")`, collect user approval before proceeding
183
+ ---
254
184
 
255
- ### Phase 2: Task execution phase (after approval)
185
+ ## 🚀 YOUR TASK: STEP 2 - Execute Task (After User Approval)
186
+
187
+ Your task is to execute the approved implementation plan. Follow these steps:
188
+
189
+ ### STEP 2.1: Check Domain Readiness (Optional - Before Implementation)
190
+
191
+ Read the SPEC metadata to identify required domains.
192
+
193
+ IF SPEC frontmatter contains `domains:` field OR `.moai/config.json` has `stack.selected_domains`, THEN:
194
+ - For each domain in the list:
195
+ - IF domain is "frontend", THEN invoke Task with subagent_type "Explore" and prompt: "You are consulting as frontend-expert for TDD implementation. SPEC: [SPEC-{ID}]. Provide implementation readiness check: Component structure recommendations, State management approach, Testing strategy, Accessibility requirements, Performance optimization tips. Output: Brief advisory for tdd-implementer (3-4 key points)"
196
+ - IF domain is "backend", THEN invoke Task with subagent_type "Explore" and prompt: "You are consulting as backend-expert for TDD implementation. SPEC: [SPEC-{ID}]. Provide implementation readiness check: API contract validation, Database schema requirements, Authentication/authorization patterns, Error handling strategy, Async processing considerations. Output: Brief advisory for tdd-implementer (3-4 key points)"
197
+ - IF domain is "devops", THEN invoke Task with subagent_type "Explore" and domain-specific readiness check
198
+ - IF domain is "database", THEN invoke Task with subagent_type "Explore" and database-specific readiness check
199
+ - IF domain is "data-science", THEN invoke Task with subagent_type "Explore" and data-science-specific readiness check
200
+ - IF domain is "mobile", THEN invoke Task with subagent_type "Explore" and mobile-specific readiness check
201
+ - Store all domain expert feedback in memory
202
+ - Save advisory to `.moai/specs/SPEC-{ID}/plan.md` under "## Domain Expert Advisory (Implementation Phase)" section
203
+
204
+ IF no domains specified OR domain expert unavailable, THEN:
205
+ - Skip advisory phase
206
+ - Continue to STEP 2.2 (implementation proceeds regardless)
207
+
208
+ ### STEP 2.2: Invoke TDD Implementer Agent
209
+
210
+ Invoke the tdd-implementer agent using the Task tool:
211
+ - Set subagent_type to "tdd-implementer"
212
+ - Set description to "Execute task with TDD implementation"
213
+ - Pass prompt including:
214
+ - SPEC ID ($ARGUMENTS)
215
+ - Language settings (conversation_language, conversation_language_name)
216
+ - Code and technical output must be in English
217
+ - Code comments language rules (local project vs package code)
218
+ - Test descriptions and documentation language
219
+ - Skill invocation instructions (moai-alfred-language-detection, language-specific skills, debug, refactor)
220
+ - Approved plan from STEP 1
221
+ - Domain expert advisory from STEP 2.1 (if available)
222
+ - TDD cycle instructions: RED → GREEN → REFACTOR
223
+ - For each TAG: Write failing test (@TEST:ID) → Minimal implementation (@CODE:ID) → Code quality improvement
224
+ - TAG completion verification and progression
225
+
226
+ The tdd-implementer agent will:
227
+ 1. Detect project language and select optimal TDD tools
228
+ 2. Execute RED phase: Write failing tests with @TEST:ID tags, verify test failure
229
+ 3. Execute GREEN phase: Write minimal implementation with @CODE:ID tags, verify test pass
230
+ 4. Execute REFACTOR phase: Improve code quality (remove duplication, explicit naming, structured logging/exception handling)
231
+ 5. Verify TAG completion conditions and proceed to next TAG
232
+ 6. Repeat cycle for all TAGs in the plan
233
+
234
+ ### STEP 2.3: Monitor TDD Cycle Progress
235
+
236
+ During tdd-implementer execution:
237
+ - Initialize TodoWrite with all tasks from the implementation plan
238
+ - Set initial status to "pending" for all tasks
239
+ - For each task:
240
+ - Update TodoWrite status from "pending" to "in_progress" (exactly ONE task at a time)
241
+ - Monitor tdd-implementer progress
242
+ - Update TodoWrite status from "in_progress" to "completed" when task finishes
243
+ - Track RED → GREEN → REFACTOR cycle completion for each TAG
244
+
245
+ IF tdd-implementer encounters errors or test failures, THEN:
246
+ - Keep task in "in_progress" status
247
+ - Invoke Skill("moai-essentials-debug") for troubleshooting
248
+ - Log error details
249
+ - Attempt fix and retry
250
+ - IF error persists after retry, THEN escalate to user for manual intervention
251
+
252
+ ### STEP 2.4: Quality Gate Verification (Automatic)
253
+
254
+ After tdd-implementer completes all tasks, automatically invoke the quality-gate agent:
255
+ - Set subagent_type to "quality-gate"
256
+ - Set description to "TRUST principle verification and quality validation"
257
+ - Pass prompt to verify:
258
+ - TRUST principles (Test coverage ≥ 85%, Readable code, Unified architecture, Secured, Traceable @TAG chain)
259
+ - Code style (run linter: ESLint/Pylint)
260
+ - Test coverage (run language-specific coverage tools)
261
+ - TAG chain integrity (check orphan TAGs, missing TAGs)
262
+ - Dependency security (check vulnerabilities)
263
+
264
+ The quality-gate agent will generate a verification report.
265
+
266
+ **Handle verification results:**
267
+
268
+ IF verification result is PASS (0 Critical, ≤5 Warnings), THEN:
269
+ - Display "Quality gate passed."
270
+ - Create quality report
271
+ - Proceed to STEP 3 (Git operations)
272
+
273
+ IF verification result is WARNING (0 Critical, ≥6 Warnings), THEN:
274
+ - Display warning message with details
275
+ - Use AskUserQuestion to ask: "Quality gate has warnings. How would you like to proceed?"
276
+ - Option 1: "Continue to Git commit" - Accept warnings and proceed to STEP 3
277
+ - Option 2: "Fix warnings first" - Return to tdd-implementer to address warnings
278
+ - Wait for user response
279
+ - IF user selects "Continue", THEN proceed to STEP 3
280
+ - IF user selects "Fix warnings first", THEN return to STEP 2.2 with warning details
281
+
282
+ IF verification result is CRITICAL (≥1 Critical), THEN:
283
+ - Display "Quality gate blocked. Critical issues found."
284
+ - Block Git commits
285
+ - Generate detailed report with file:line information
286
+ - Display report to user
287
+ - Recommend re-invoking tdd-implementer to fix critical issues
288
+ - Stop execution
289
+ - Wait for user to fix issues and re-run command
290
+
291
+ IF user passed `--skip-quality-check` flag, THEN:
292
+ - Skip quality gate verification
293
+ - Display "Quality gate skipped (user requested)."
294
+ - Proceed directly to STEP 3
256
295
 
257
- The `tdd-implementer` agent performs **TAG-by-TAG** after user approval (based on TDD scenario):
296
+ ---
258
297
 
259
- 1. **RED Phase**: Write a failing test (add @TEST:ID tag) and check for failure
260
- 2. **GREEN Phase**: Write minimal code that passes the test (add @CODE:ID tag)
261
- 3. **REFACTOR Phase**: Improve code quality (without changing functionality)
262
- 4. **TAG completion confirmation**: Verify the completion conditions of each TAG and proceed to the next TAG
298
+ ## 🚀 YOUR TASK: STEP 3 - Git Operations (After Quality Gate)
299
+
300
+ Your task is to create Git commits for all completed work. Follow these steps:
301
+
302
+ ### STEP 3.1: Invoke Git Manager Agent
303
+
304
+ Invoke the git-manager agent using the Task tool:
305
+ - Set subagent_type to "git-manager"
306
+ - Set description to "Create Git commits for completed implementation"
307
+ - Pass prompt including:
308
+ - SPEC ID ($ARGUMENTS)
309
+ - List of all completed tasks from TodoWrite
310
+ - TDD cycle phases (RED → GREEN → REFACTOR)
311
+ - Quality gate results
312
+ - Git strategy from `.moai/config.json` (team mode: GitFlow with develop branch)
313
+ - Request structured commits with proper tagging
314
+
315
+ The git-manager agent will:
316
+ 1. Create checkpoint backup before starting Git operations
317
+ 2. Create structured commits for each TDD phase:
318
+ - RED commit: "test(SPEC-{ID}): Add failing tests for {feature}"
319
+ - GREEN commit: "feat(SPEC-{ID}): Implement {feature}"
320
+ - REFACTOR commit: "refactor(SPEC-{ID}): Improve {aspect}"
321
+ 3. Apply Git strategy based on mode (team: feature branch → develop, solo: direct to main)
322
+ 4. Verify commits created successfully
323
+ 5. Display commit summary to user
324
+
325
+ ### STEP 3.2: Handle Git Strategy (Team Mode)
326
+
327
+ Read Git configuration from `.moai/config.json`:
328
+ - Read `git_strategy.team.use_gitflow` field
329
+ - Read `git_strategy.team.develop_branch` field (default: "develop")
330
+
331
+ IF use_gitflow is true, THEN:
332
+ - Verify current branch is feature branch (feature/SPEC-*)
333
+ - Verify develop branch exists
334
+ - Do NOT create PR to main (forbidden)
335
+ - Wait for user to manually merge develop → main when ready
336
+ - Display: "Commits created on feature branch. Run `/alfred:3-sync` to create PR targeting develop."
337
+
338
+ IF use_gitflow is false (solo mode), THEN:
339
+ - Commit directly to current branch
340
+ - Push to remote if configured
341
+ - Display: "Commits created and pushed."
342
+
343
+ ### STEP 3.3: Verify Commit Success
344
+
345
+ After git-manager completes:
346
+ - Run `git log --oneline -5` to verify commits were created
347
+ - Check commit messages follow the format:
348
+ ```
349
+ {type}(SPEC-{ID}): {description}
350
+
351
+ {detailed explanation if needed}
352
+
353
+ 🤖 Generated with Claude Code
354
+
355
+ Co-Authored-By: 🎩 Alfred@MoAI
356
+ ```
357
+ - Verify commit author and timestamp
358
+ - Display commit summary to user
359
+
360
+ IF commits were not created successfully, THEN:
361
+ - Display error message
362
+ - Show git status output
363
+ - Recommend manual Git operations
364
+ - Stop execution
263
365
 
264
- ### Phase 2.5: Quality verification gate (automatic execution)
366
+ ---
265
367
 
266
- After the job execution is complete, the `quality-gate` agent **automatically** performs quality verification.
368
+ ## 🎯 YOUR TASK: STEP 4 - Next Steps (Final)
267
369
 
268
- **Automatic execution conditions**:
269
- - Automatically invoked upon completion of task execution
270
- - Manually invoked upon user request
370
+ Your task is to guide the user on what to do next. Follow these steps:
271
371
 
272
- **Verification items**:
273
- - **TRUST principle verification**: Trust-checker script execution and result parsing
274
- - T (Testable): Test coverage ≥ 85%
275
- - R (Readable): Code readability (file≤300 LOC, function≤50 LOC, Complexity≤10)
276
- - U (Unified): Architectural integrity
277
- - S (Secured): No security vulnerabilities
278
- - T (Traceable): @TAG chain integrity
279
- - **Code style**: Run and verify linter (ESLint/Pylint)
280
- - **Test Coverage**: Run language-specific coverage tools and verify goal achievement
281
- - **TAG chain verification**: Check orphan TAGs, missing TAGs
282
- - **Dependency verification**: Check security vulnerabilities
372
+ ### STEP 4.1: Present Next Steps Options
283
373
 
284
- **How ​​it works**: When Alfred completes job execution, it automatically calls the quality-gate agent to perform quality verification.
374
+ After STEP 3 completes successfully, invoke `Skill("moai-alfred-ask-user-questions")` first.
285
375
 
286
- **Handling verification results**:
376
+ Then use the AskUserQuestion tool to ask the user:
377
+ - Ask "Implementation is complete. What would you like to do next?"
378
+ - Provide these options:
379
+ - "Synchronize Documentation" - Proceed to /alfred:3-sync for documentation synchronization
380
+ - "Implement More Features" - Continue with /alfred:2-run SPEC-XXX for next feature
381
+ - "New Session" - Execute /clear for better context management (recommended after large implementations)
382
+ - "Complete" - Finish current session
383
+ - Wait for user response
287
384
 
288
- **PASS (0 Critical, 5 or less Warnings)**:
289
- - Proceed to Phase 3 (Git work)
290
- - Create a quality report
385
+ **Response handling:**
291
386
 
292
- ⚠️ **WARNING (0 Critical, 6 or more Warnings)**:
293
- - Display warning
294
- - User choice: "Continue" or "Re-verify after modification"
387
+ IF user selects "Synchronize Documentation", THEN:
388
+ - Display "Starting documentation synchronization..."
389
+ - Inform user to run: `/alfred:3-sync auto`
390
+ - Explain that this will verify TAGs, update docs, and prepare for PR merge
295
391
 
296
- **CRITICAL (1 or more Critical)**:
297
- - Block Git commits
298
- - Detailed report on items requiring improvement (including file: line information)
299
- - Recommended tdd-implementer re-invocation
392
+ IF user selects "Implement More Features", THEN:
393
+ - Display "Ready for next feature implementation..."
394
+ - Inform user to run: `/alfred:2-run SPEC-YYY` for another feature
395
+ - Note that current session context will be maintained
300
396
 
301
- **Skip verification option**: To skip quality verification, use the `--skip-quality-check` option.
397
+ IF user selects "New Session", THEN:
398
+ - Display "Clearing session for better context management..."
399
+ - Explain that this is recommended after large implementations
400
+ - Inform user they can run any command in the next session
302
401
 
303
- ### Phase 3: Git operations (git-manager)
402
+ IF user selects "Complete", THEN:
403
+ - Display "Implementation workflow complete!"
404
+ - Recommend running `/alfred:3-sync` manually when ready
405
+ - Suggest reviewing work or planning next features
304
406
 
305
- After the `git-manager` agent completes the task **at once**:
407
+ ### STEP 4.2: Display Summary
306
408
 
307
- 1. **Create checkpoint**: Backup point before starting work
308
- 2. **Structured Commit**: Step-by-step commit creation (RED→GREEN→REFACTOR for TDD)
309
- 3. **Final synchronization**: Apply Git strategy for each mode and remote synchronization
409
+ After user responds, display a plain text summary:
410
+ - SPEC ID implemented
411
+ - Number of TAGs completed
412
+ - Number of commits created
413
+ - Quality gate result (PASS/WARNING/CRITICAL)
414
+ - Next recommended action based on user selection
310
415
 
416
+ ---
311
417
 
312
418
  ## 📋 STEP 1 Execution Guide: SPEC Analysis and Planning
313
419
 
@@ -326,13 +432,13 @@ Alfred calls the implementation-planner agent to check the SPEC document and cre
326
432
 
327
433
  #### TypeScript execution criteria
328
434
 
329
- | SPEC characteristics | execution language | Reason |
330
- |-----------|-----------|------|
331
- | CLI/System Tools | TypeScript | High performance (18ms), type safety, SQLite3 integration |
332
- | API/Backend | TypeScript | Node.js ecosystem, Express/Fastify compatibility |
333
- | Frontend | TypeScript | React/Vue native support |
334
- | data processing | TypeScript | High-performance asynchronous processing, type safety |
335
- | User Python Project | Python tool support | MoAI-ADK provides Python project development tools |
435
+ | SPEC characteristics | execution language | Reason |
436
+ | -------------------- | ------------------- | --------------------------------------------------------- |
437
+ | CLI/System Tools | TypeScript | High performance (18ms), type safety, SQLite3 integration |
438
+ | API/Backend | TypeScript | Node.js ecosystem, Express/Fastify compatibility |
439
+ | Frontend | TypeScript | React/Vue native support |
440
+ | data processing | TypeScript | High-performance asynchronous processing, type safety |
441
+ | User Python Project | Python tool support | MoAI-ADK provides Python project development tools |
336
442
 
337
443
  #### Approach
338
444
 
@@ -359,16 +465,16 @@ Present your plan in the following format:
359
465
 
360
466
  ### 📦 Library version (required - based on web search)
361
467
  **Backend dependencies** (example):
362
- | package | Latest stable version | installation command |
363
- |--------|--------------|----------|
364
- | FastAPI | 0.118.3 | fastapi>=0.118.3 |
365
- | SQLAlchemy | 2.0.43 | sqlalchemy>=2.0.43 |
468
+ | package | Latest stable version | installation command |
469
+ | ---------- | --------------------- | -------------------- |
470
+ | FastAPI | 0.118.3 | fastapi>=0.118.3 |
471
+ | SQLAlchemy | 2.0.43 | sqlalchemy>=2.0.43 |
366
472
 
367
473
  **Frontend dependency** (example):
368
474
  | package | Latest stable version | installation command |
369
- |--------|--------------|----------|
370
- | React | 18.3.1 | react@^18.3.1 |
371
- | Vite | 7.1.9 | vite@^7.1.9 |
475
+ | ------- | --------------------- | -------------------- |
476
+ | React | 18.3.1 | react@^18.3.1 |
477
+ | Vite | 7.1.9 | vite@^7.1.9 |
372
478
 
373
479
  **Important Compatibility Information**:
374
480
  - [Specific Version Requirements]
@@ -386,7 +492,7 @@ Present your plan in the following format:
386
492
 
387
493
  ---
388
494
  **Approval Request**: Do you want to proceed with the above plan?
389
- (Choose between Proceed,” Modify [Content],” or Abort)
495
+ (Choose between "Proceed," "Modify [Content]," or "Abort")
390
496
  ```
391
497
 
392
498
  ---
@@ -397,7 +503,7 @@ Only if the user selects **"Proceed"** or **"Start"** will Alfred call the tdd-i
397
503
 
398
504
  ### TDD step-by-step guide
399
505
 
400
- 1. **RED**: Writing failure tests with Given/When/Then structure. Follow test file rules for each language and simply record failure logs.
506
+ 1. **RED**: Writing failure tests with Given/When/Then structure. Follow test file rules for each language and simply record failure logs.
401
507
  2. **GREEN**: Add only the minimal implementation that makes the tests pass. Optimization is postponed to the REFACTOR stage.
402
508
  3. **REFACTOR**: Removal of duplication, explicit naming, structured logging/exception handling enhancements. Split into additional commits if necessary.
403
509
 
@@ -408,6 +514,47 @@ Only if the user selects **"Proceed"** or **"Start"** will Alfred call the tdd-i
408
514
 
409
515
  > TRUST 5 principles provide only basic recommendations, so if you need a structure that exceeds `simplicity_threshold`, proceed with the basis in SPEC or ADR.
410
516
 
517
+ ## 🔗 TDD optimization for each language
518
+
519
+ ### Project language detection and optimal routing
520
+
521
+ `tdd-implementer` automatically detects the language of your project and selects the optimal TDD tools and workflow:
522
+
523
+ - **Language detection**: Analyze project files (package.json, pyproject.toml, go.mod, etc.)
524
+ - **Tool selection**: Automatically select the optimal test framework for each language
525
+ - **TAG application**: Write @TAG annotations directly in code files
526
+ - **Run cycle**: RED → GREEN → REFACTOR sequential process
527
+
528
+ ### TDD tool mapping
529
+
530
+ #### Backend/System
531
+
532
+ | SPEC Type | Implementation language | Test Framework | Performance Goals | Coverage Goals |
533
+ | ------------------- | ----------------------- | ---------------------- | ----------------- | -------------- |
534
+ | **CLI/System** | TypeScript | jest + ts-node | < 18ms | 95%+ |
535
+ | **API/Backend** | TypeScript | Jest + SuperTest | < 50ms | 90%+ |
536
+ | **Frontend** | TypeScript | Jest + Testing Library | < 100ms | 85%+ |
537
+ | **Data Processing** | TypeScript | Jest + Mock | < 200ms | 85%+ |
538
+ | **Python Project** | Python | pytest + mypy | Custom | 85%+ |
539
+
540
+ #### Mobile Framework
541
+
542
+ | SPEC Type | Implementation language | Test Framework | Performance Goals | Coverage Goals |
543
+ | ---------------- | ----------------------- | -------------------------- | ----------------- | -------------- |
544
+ | **Flutter App** | Dart | flutter test + widget test | < 100ms | 85%+ |
545
+ | **React Native** | TypeScript | Jest + RN Testing Library | < 100ms | 85%+ |
546
+ | **iOS App** | Swift | XCTest + XCUITest | < 150ms | 80%+ |
547
+ | **Android App** | Kotlin | JUnit + Espresso | < 150ms | 80%+ |
548
+
549
+ ## 🚀 Optimized agent collaboration structure
550
+
551
+ - **Phase 1**: `implementation-planner` agent analyzes SPEC and establishes execution strategy
552
+ - **Phase 2**: `tdd-implementer` agent executes tasks (TDD cycle, prototyping, documentation, etc.)
553
+ - **Phase 2.5**: `quality-gate` agent verifies TRUST principle and quality verification (automatically)
554
+ - **Phase 3**: `git-manager` agent processes all commits at once after task completion
555
+ - **Single responsibility principle**: Each agent is responsible only for its own area of expertise
556
+ - **Inter-agent call prohibited**: Each agent runs independently, sequential calls are made only at the command level
557
+
411
558
  ## Agent role separation
412
559
 
413
560
  ### implementation-planner dedicated area
@@ -420,11 +567,11 @@ Only if the user selects **"Proceed"** or **"Start"** will Alfred call the tdd-i
420
567
 
421
568
  ### tdd-implementer dedicated area
422
569
 
423
- - Execute tasks (TDD, prototyping, documentation, etc.)
424
- - Write and run tests (TDD scenarios)
425
- - Add and manage TAG comments
426
- - Improve code quality (refactoring)
427
- - Run language-specific linters/formatters
570
+ - Execute tasks (TDD, prototyping, documentation, etc.)
571
+ - Write and run tests (TDD scenarios)
572
+ - Add and manage TAG comments
573
+ - Improve code quality (refactoring)
574
+ - Run language-specific linters/formatters
428
575
 
429
576
  ### Quality-gate dedicated area
430
577
 
@@ -453,7 +600,7 @@ Only if the user selects **"Proceed"** or **"Start"** will Alfred call the tdd-i
453
600
 
454
601
  ## 🧠 Context Management
455
602
 
456
- > For more information: `.moai/memory/development-guide.md` - see section "Context Engineering"
603
+ > For more information: Skill("moai-alfred-dev-guide") - see section "Context Engineering"
457
604
 
458
605
  ### Core strategy of this command
459
606