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

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

Potentially problematic release.


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

Files changed (417) hide show
  1. moai_adk/__init__.py +1 -2
  2. moai_adk/__main__.py +85 -2
  3. moai_adk/cli/__init__.py +0 -1
  4. moai_adk/cli/commands/__init__.py +0 -1
  5. moai_adk/cli/commands/analyze.py +127 -0
  6. moai_adk/cli/commands/backup.py +5 -3
  7. moai_adk/cli/commands/doctor.py +35 -11
  8. moai_adk/cli/commands/improve_user_experience.py +348 -0
  9. moai_adk/cli/commands/init.py +150 -23
  10. moai_adk/cli/commands/language.py +269 -0
  11. moai_adk/cli/commands/migrate.py +158 -0
  12. moai_adk/cli/commands/status.py +13 -12
  13. moai_adk/cli/commands/update.py +364 -60
  14. moai_adk/cli/commands/validate_links.py +118 -0
  15. moai_adk/cli/main.py +3 -2
  16. moai_adk/cli/prompts/init_prompts.py +79 -82
  17. moai_adk/core/__init__.py +0 -1
  18. moai_adk/core/analysis/__init__.py +9 -0
  19. moai_adk/core/analysis/session_analyzer.py +439 -0
  20. moai_adk/core/claude_integration.py +421 -0
  21. moai_adk/core/command_helpers.py +270 -0
  22. moai_adk/core/config/__init__.py +6 -0
  23. moai_adk/core/config/auto_spec_config.py +346 -0
  24. moai_adk/core/config/migration.py +133 -12
  25. moai_adk/core/context_manager.py +279 -0
  26. moai_adk/core/diagnostics/slash_commands.py +0 -1
  27. moai_adk/core/error_recovery_system.py +1289 -0
  28. moai_adk/core/git/__init__.py +0 -1
  29. moai_adk/core/git/branch.py +0 -1
  30. moai_adk/core/git/branch_manager.py +4 -4
  31. moai_adk/core/git/checkpoint.py +1 -5
  32. moai_adk/core/git/commit.py +0 -1
  33. moai_adk/core/git/event_detector.py +3 -5
  34. moai_adk/core/git/manager.py +0 -1
  35. moai_adk/core/hooks/post_tool_auto_spec_completion.py +925 -0
  36. moai_adk/core/integration/__init__.py +22 -0
  37. moai_adk/core/integration/engine.py +169 -0
  38. moai_adk/core/integration/integration_tester.py +225 -0
  39. moai_adk/core/integration/models.py +88 -0
  40. moai_adk/core/integration/utils.py +211 -0
  41. moai_adk/core/issue_creator.py +28 -18
  42. moai_adk/core/language_config.py +202 -0
  43. moai_adk/core/language_validator.py +556 -0
  44. moai_adk/core/mcp/setup.py +113 -0
  45. moai_adk/core/migration/__init__.py +18 -0
  46. moai_adk/core/migration/backup_manager.py +208 -0
  47. moai_adk/core/migration/file_migrator.py +218 -0
  48. moai_adk/core/migration/version_detector.py +143 -0
  49. moai_adk/core/migration/version_migrator.py +228 -0
  50. moai_adk/core/performance/__init__.py +6 -0
  51. moai_adk/core/performance/cache_system.py +318 -0
  52. moai_adk/core/performance/parallel_processor.py +116 -0
  53. moai_adk/core/project/__init__.py +0 -1
  54. moai_adk/core/project/backup_utils.py +2 -7
  55. moai_adk/core/project/checker.py +3 -3
  56. moai_adk/core/project/detector.py +20 -40
  57. moai_adk/core/project/initializer.py +42 -17
  58. moai_adk/core/project/phase_executor.py +415 -58
  59. moai_adk/core/project/validator.py +6 -25
  60. moai_adk/core/quality/__init__.py +1 -1
  61. moai_adk/core/quality/trust_checker.py +64 -110
  62. moai_adk/core/quality/validators/__init__.py +1 -1
  63. moai_adk/core/quality/validators/base_validator.py +1 -1
  64. moai_adk/core/rollback_manager.py +993 -0
  65. moai_adk/core/session_manager.py +667 -0
  66. moai_adk/core/spec/confidence_scoring.py +749 -0
  67. moai_adk/core/spec/ears_template_engine.py +1182 -0
  68. moai_adk/core/spec/quality_validator.py +721 -0
  69. moai_adk/core/spec_status_manager.py +488 -0
  70. moai_adk/core/template/__init__.py +0 -1
  71. moai_adk/core/template/backup.py +41 -1
  72. moai_adk/core/template/config.py +11 -12
  73. moai_adk/core/template/languages.py +0 -1
  74. moai_adk/core/template/merger.py +79 -22
  75. moai_adk/core/template/processor.py +614 -40
  76. moai_adk/core/template_engine.py +36 -27
  77. moai_adk/foundation/git/commit_templates.py +565 -0
  78. moai_adk/foundation/trust/trust_principles.py +725 -0
  79. moai_adk/foundation/trust/validation_checklist.py +1678 -0
  80. moai_adk/statusline/__init__.py +38 -0
  81. moai_adk/statusline/alfred_detector.py +107 -0
  82. moai_adk/statusline/config.py +364 -0
  83. moai_adk/statusline/enhanced_output_style_detector.py +364 -0
  84. moai_adk/statusline/git_collector.py +190 -0
  85. moai_adk/statusline/main.py +228 -0
  86. moai_adk/statusline/metrics_tracker.py +78 -0
  87. moai_adk/statusline/renderer.py +327 -0
  88. moai_adk/statusline/update_checker.py +135 -0
  89. moai_adk/statusline/version_reader.py +647 -0
  90. moai_adk/templates/.git-hooks/pre-commit +66 -0
  91. moai_adk/templates/.git-hooks/pre-push +116 -4
  92. moai_adk/templates/.github/workflows/moai-gitflow.yml +1 -7
  93. moai_adk/templates/.github/workflows/spec-issue-sync.yml +0 -1
  94. moai_adk/templates/.gitignore +44 -0
  95. moai_adk/templates/.mcp.json +22 -0
  96. moai_adk/templates/CLAUDE.md +450 -1071
  97. moai_adk/utils/__init__.py +0 -1
  98. moai_adk/utils/banner.py +0 -1
  99. moai_adk/utils/common.py +308 -0
  100. moai_adk/utils/link_validator.py +249 -0
  101. moai_adk/utils/logger.py +4 -9
  102. moai_adk/utils/safe_file_reader.py +210 -0
  103. moai_adk/utils/user_experience.py +531 -0
  104. moai_adk-0.25.4.dist-info/METADATA +2279 -0
  105. moai_adk-0.25.4.dist-info/RECORD +112 -0
  106. moai_adk/core/tags/__init__.py +0 -86
  107. moai_adk/core/tags/ci_validator.py +0 -463
  108. moai_adk/core/tags/cli.py +0 -283
  109. moai_adk/core/tags/generator.py +0 -109
  110. moai_adk/core/tags/inserter.py +0 -99
  111. moai_adk/core/tags/mapper.py +0 -126
  112. moai_adk/core/tags/parser.py +0 -76
  113. moai_adk/core/tags/pre_commit_validator.py +0 -393
  114. moai_adk/core/tags/reporter.py +0 -956
  115. moai_adk/core/tags/tags.py +0 -149
  116. moai_adk/core/tags/validator.py +0 -897
  117. moai_adk/templates/.claude/agents/alfred/backend-expert.md +0 -319
  118. moai_adk/templates/.claude/agents/alfred/cc-manager.md +0 -316
  119. moai_adk/templates/.claude/agents/alfred/debug-helper.md +0 -208
  120. moai_adk/templates/.claude/agents/alfred/devops-expert.md +0 -464
  121. moai_adk/templates/.claude/agents/alfred/doc-syncer.md +0 -214
  122. moai_adk/templates/.claude/agents/alfred/frontend-expert.md +0 -357
  123. moai_adk/templates/.claude/agents/alfred/git-manager.md +0 -406
  124. moai_adk/templates/.claude/agents/alfred/implementation-planner.md +0 -423
  125. moai_adk/templates/.claude/agents/alfred/project-manager.md +0 -312
  126. moai_adk/templates/.claude/agents/alfred/quality-gate.md +0 -343
  127. moai_adk/templates/.claude/agents/alfred/skill-factory.md +0 -865
  128. moai_adk/templates/.claude/agents/alfred/spec-builder.md +0 -392
  129. moai_adk/templates/.claude/agents/alfred/tag-agent.md +0 -361
  130. moai_adk/templates/.claude/agents/alfred/tdd-implementer.md +0 -428
  131. moai_adk/templates/.claude/agents/alfred/trust-checker.md +0 -375
  132. moai_adk/templates/.claude/agents/alfred/ui-ux-expert.md +0 -571
  133. moai_adk/templates/.claude/commands/alfred/0-project.md +0 -1525
  134. moai_adk/templates/.claude/commands/alfred/1-plan.md +0 -802
  135. moai_adk/templates/.claude/commands/alfred/2-run.md +0 -709
  136. moai_adk/templates/.claude/commands/alfred/3-sync.md +0 -1009
  137. moai_adk/templates/.claude/commands/alfred/9-feedback.md +0 -149
  138. moai_adk/templates/.claude/hooks/alfred/core/project.py +0 -748
  139. moai_adk/templates/.claude/hooks/alfred/core/timeout.py +0 -136
  140. moai_adk/templates/.claude/hooks/alfred/core/ttl_cache.py +0 -108
  141. moai_adk/templates/.claude/hooks/alfred/core/version_cache.py +0 -198
  142. moai_adk/templates/.claude/hooks/alfred/handlers/__init__.py +0 -29
  143. moai_adk/templates/.claude/hooks/alfred/post_tool__log_changes.py +0 -94
  144. moai_adk/templates/.claude/hooks/alfred/pre_tool__auto_checkpoint.py +0 -100
  145. moai_adk/templates/.claude/hooks/alfred/session_end__cleanup.py +0 -94
  146. moai_adk/templates/.claude/hooks/alfred/session_start__show_project_info.py +0 -94
  147. moai_adk/templates/.claude/hooks/alfred/shared/core/__init__.py +0 -170
  148. moai_adk/templates/.claude/hooks/alfred/shared/core/checkpoint.py +0 -271
  149. moai_adk/templates/.claude/hooks/alfred/shared/core/context.py +0 -67
  150. moai_adk/templates/.claude/hooks/alfred/shared/core/project.py +0 -749
  151. moai_adk/templates/.claude/hooks/alfred/shared/core/tags.py +0 -230
  152. moai_adk/templates/.claude/hooks/alfred/shared/core/version_cache.py +0 -198
  153. moai_adk/templates/.claude/hooks/alfred/shared/handlers/__init__.py +0 -21
  154. moai_adk/templates/.claude/hooks/alfred/shared/handlers/notification.py +0 -154
  155. moai_adk/templates/.claude/hooks/alfred/shared/handlers/session.py +0 -174
  156. moai_adk/templates/.claude/hooks/alfred/shared/handlers/tool.py +0 -87
  157. moai_adk/templates/.claude/hooks/alfred/shared/handlers/user.py +0 -61
  158. moai_adk/templates/.claude/hooks/alfred/user_prompt__jit_load_docs.py +0 -112
  159. moai_adk/templates/.claude/hooks/alfred/utils/__init__.py +0 -1
  160. moai_adk/templates/.claude/hooks/alfred/utils/timeout.py +0 -161
  161. moai_adk/templates/.claude/settings.json +0 -144
  162. moai_adk/templates/.claude/skills/moai-alfred-agent-guide/SKILL.md +0 -70
  163. moai_adk/templates/.claude/skills/moai-alfred-agent-guide/examples.md +0 -62
  164. moai_adk/templates/.claude/skills/moai-alfred-agent-guide/reference.md +0 -242
  165. moai_adk/templates/.claude/skills/moai-alfred-config-schema/SKILL.md +0 -56
  166. moai_adk/templates/.claude/skills/moai-alfred-config-schema/examples.md +0 -28
  167. moai_adk/templates/.claude/skills/moai-alfred-config-schema/reference.md +0 -444
  168. moai_adk/templates/.claude/skills/moai-alfred-context-budget/SKILL.md +0 -62
  169. moai_adk/templates/.claude/skills/moai-alfred-context-budget/examples.md +0 -28
  170. moai_adk/templates/.claude/skills/moai-alfred-context-budget/reference.md +0 -405
  171. moai_adk/templates/.claude/skills/moai-alfred-dev-guide/SKILL.md +0 -51
  172. moai_adk/templates/.claude/skills/moai-alfred-dev-guide/examples.md +0 -355
  173. moai_adk/templates/.claude/skills/moai-alfred-dev-guide/reference.md +0 -239
  174. moai_adk/templates/.claude/skills/moai-alfred-ears-authoring/SKILL.md +0 -113
  175. moai_adk/templates/.claude/skills/moai-alfred-ears-authoring/examples.md +0 -29
  176. moai_adk/templates/.claude/skills/moai-alfred-ears-authoring/reference.md +0 -28
  177. moai_adk/templates/.claude/skills/moai-alfred-expertise-detection/SKILL.md +0 -323
  178. moai_adk/templates/.claude/skills/moai-alfred-expertise-detection/examples.md +0 -286
  179. moai_adk/templates/.claude/skills/moai-alfred-expertise-detection/reference.md +0 -126
  180. moai_adk/templates/.claude/skills/moai-alfred-git-workflow/SKILL.md +0 -122
  181. moai_adk/templates/.claude/skills/moai-alfred-git-workflow/examples.md +0 -29
  182. moai_adk/templates/.claude/skills/moai-alfred-git-workflow/reference.md +0 -29
  183. moai_adk/templates/.claude/skills/moai-alfred-gitflow-policy/SKILL.md +0 -74
  184. moai_adk/templates/.claude/skills/moai-alfred-gitflow-policy/examples.md +0 -4
  185. moai_adk/templates/.claude/skills/moai-alfred-gitflow-policy/reference.md +0 -269
  186. moai_adk/templates/.claude/skills/moai-alfred-interactive-questions/SKILL.md +0 -237
  187. moai_adk/templates/.claude/skills/moai-alfred-interactive-questions/examples.md +0 -615
  188. moai_adk/templates/.claude/skills/moai-alfred-interactive-questions/reference.md +0 -653
  189. moai_adk/templates/.claude/skills/moai-alfred-issue-labels/SKILL.md +0 -19
  190. moai_adk/templates/.claude/skills/moai-alfred-issue-labels/examples.md +0 -4
  191. moai_adk/templates/.claude/skills/moai-alfred-issue-labels/reference.md +0 -150
  192. moai_adk/templates/.claude/skills/moai-alfred-language-detection/SKILL.md +0 -113
  193. moai_adk/templates/.claude/skills/moai-alfred-language-detection/examples.md +0 -29
  194. moai_adk/templates/.claude/skills/moai-alfred-language-detection/reference.md +0 -28
  195. moai_adk/templates/.claude/skills/moai-alfred-persona-roles/SKILL.md +0 -198
  196. moai_adk/templates/.claude/skills/moai-alfred-persona-roles/examples.md +0 -431
  197. moai_adk/templates/.claude/skills/moai-alfred-persona-roles/reference.md +0 -141
  198. moai_adk/templates/.claude/skills/moai-alfred-practices/SKILL.md +0 -89
  199. moai_adk/templates/.claude/skills/moai-alfred-practices/examples.md +0 -122
  200. moai_adk/templates/.claude/skills/moai-alfred-practices/reference.md +0 -369
  201. moai_adk/templates/.claude/skills/moai-alfred-proactive-suggestions/SKILL.md +0 -508
  202. moai_adk/templates/.claude/skills/moai-alfred-proactive-suggestions/examples.md +0 -481
  203. moai_adk/templates/.claude/skills/moai-alfred-proactive-suggestions/reference.md +0 -100
  204. moai_adk/templates/.claude/skills/moai-alfred-reporting/SKILL.md +0 -273
  205. moai_adk/templates/.claude/skills/moai-alfred-rules/SKILL.md +0 -77
  206. moai_adk/templates/.claude/skills/moai-alfred-rules/examples.md +0 -265
  207. moai_adk/templates/.claude/skills/moai-alfred-rules/reference.md +0 -539
  208. moai_adk/templates/.claude/skills/moai-alfred-session-state/SKILL.md +0 -19
  209. moai_adk/templates/.claude/skills/moai-alfred-session-state/examples.md +0 -4
  210. moai_adk/templates/.claude/skills/moai-alfred-session-state/reference.md +0 -84
  211. moai_adk/templates/.claude/skills/moai-alfred-spec-authoring/README.md +0 -137
  212. moai_adk/templates/.claude/skills/moai-alfred-spec-authoring/SKILL.md +0 -219
  213. moai_adk/templates/.claude/skills/moai-alfred-spec-authoring/examples/validate-spec.sh +0 -161
  214. moai_adk/templates/.claude/skills/moai-alfred-spec-authoring/examples.md +0 -541
  215. moai_adk/templates/.claude/skills/moai-alfred-spec-authoring/reference.md +0 -622
  216. moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-extended/SKILL.md +0 -115
  217. moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-extended/examples.md +0 -4
  218. moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-extended/reference.md +0 -348
  219. moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-validation/SKILL.md +0 -113
  220. moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-validation/examples.md +0 -29
  221. moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-validation/reference.md +0 -28
  222. moai_adk/templates/.claude/skills/moai-alfred-tag-scanning/SKILL.md +0 -113
  223. moai_adk/templates/.claude/skills/moai-alfred-tag-scanning/examples.md +0 -29
  224. moai_adk/templates/.claude/skills/moai-alfred-tag-scanning/reference.md +0 -28
  225. moai_adk/templates/.claude/skills/moai-alfred-todowrite-pattern/SKILL.md +0 -19
  226. moai_adk/templates/.claude/skills/moai-alfred-todowrite-pattern/examples.md +0 -4
  227. moai_adk/templates/.claude/skills/moai-alfred-todowrite-pattern/reference.md +0 -211
  228. moai_adk/templates/.claude/skills/moai-alfred-trust-validation/SKILL.md +0 -113
  229. moai_adk/templates/.claude/skills/moai-alfred-trust-validation/examples.md +0 -29
  230. moai_adk/templates/.claude/skills/moai-alfred-trust-validation/reference.md +0 -28
  231. moai_adk/templates/.claude/skills/moai-alfred-workflow/SKILL.md +0 -288
  232. moai_adk/templates/.claude/skills/moai-cc-agents/SKILL.md +0 -269
  233. moai_adk/templates/.claude/skills/moai-cc-agents/templates/agent-template.md +0 -32
  234. moai_adk/templates/.claude/skills/moai-cc-claude-md/SKILL.md +0 -298
  235. moai_adk/templates/.claude/skills/moai-cc-claude-md/templates/CLAUDE-template.md +0 -26
  236. moai_adk/templates/.claude/skills/moai-cc-commands/SKILL.md +0 -307
  237. moai_adk/templates/.claude/skills/moai-cc-commands/templates/command-template.md +0 -21
  238. moai_adk/templates/.claude/skills/moai-cc-hooks/SKILL.md +0 -252
  239. moai_adk/templates/.claude/skills/moai-cc-hooks/scripts/pre-bash-check.sh +0 -19
  240. moai_adk/templates/.claude/skills/moai-cc-hooks/scripts/preserve-permissions.sh +0 -19
  241. moai_adk/templates/.claude/skills/moai-cc-hooks/scripts/validate-bash-command.py +0 -24
  242. moai_adk/templates/.claude/skills/moai-cc-mcp-plugins/SKILL.md +0 -199
  243. moai_adk/templates/.claude/skills/moai-cc-mcp-plugins/templates/settings-mcp-template.json +0 -39
  244. moai_adk/templates/.claude/skills/moai-cc-memory/SKILL.md +0 -316
  245. moai_adk/templates/.claude/skills/moai-cc-memory/templates/session-summary-template.md +0 -18
  246. moai_adk/templates/.claude/skills/moai-cc-settings/SKILL.md +0 -263
  247. moai_adk/templates/.claude/skills/moai-cc-settings/templates/settings-complete-template.json +0 -30
  248. moai_adk/templates/.claude/skills/moai-cc-skill-descriptions/SKILL.md +0 -19
  249. moai_adk/templates/.claude/skills/moai-cc-skill-descriptions/examples.md +0 -4
  250. moai_adk/templates/.claude/skills/moai-cc-skill-descriptions/reference.md +0 -218
  251. moai_adk/templates/.claude/skills/moai-cc-skill-factory/CHECKLIST.md +0 -482
  252. moai_adk/templates/.claude/skills/moai-cc-skill-factory/EXAMPLES.md +0 -278
  253. moai_adk/templates/.claude/skills/moai-cc-skill-factory/INTERACTIVE-DISCOVERY.md +0 -524
  254. moai_adk/templates/.claude/skills/moai-cc-skill-factory/METADATA.md +0 -477
  255. moai_adk/templates/.claude/skills/moai-cc-skill-factory/PARALLEL-ANALYSIS-REPORT.md +0 -429
  256. moai_adk/templates/.claude/skills/moai-cc-skill-factory/PYTHON-VERSION-MATRIX.md +0 -391
  257. moai_adk/templates/.claude/skills/moai-cc-skill-factory/SKILL-FACTORY-WORKFLOW.md +0 -431
  258. moai_adk/templates/.claude/skills/moai-cc-skill-factory/SKILL-UPDATE-ADVISOR.md +0 -577
  259. moai_adk/templates/.claude/skills/moai-cc-skill-factory/SKILL.md +0 -271
  260. moai_adk/templates/.claude/skills/moai-cc-skill-factory/STEP-BY-STEP-GUIDE.md +0 -466
  261. moai_adk/templates/.claude/skills/moai-cc-skill-factory/STRUCTURE.md +0 -583
  262. moai_adk/templates/.claude/skills/moai-cc-skill-factory/WEB-RESEARCH.md +0 -526
  263. moai_adk/templates/.claude/skills/moai-cc-skill-factory/reference.md +0 -465
  264. moai_adk/templates/.claude/skills/moai-cc-skill-factory/scripts/generate-structure.sh +0 -328
  265. moai_adk/templates/.claude/skills/moai-cc-skill-factory/scripts/validate-skill.sh +0 -312
  266. moai_adk/templates/.claude/skills/moai-cc-skill-factory/templates/SKILL_TEMPLATE.md +0 -245
  267. moai_adk/templates/.claude/skills/moai-cc-skill-factory/templates/examples-template.md +0 -285
  268. moai_adk/templates/.claude/skills/moai-cc-skill-factory/templates/reference-template.md +0 -278
  269. moai_adk/templates/.claude/skills/moai-cc-skill-factory/templates/scripts-template.sh +0 -303
  270. moai_adk/templates/.claude/skills/moai-cc-skills/SKILL.md +0 -291
  271. moai_adk/templates/.claude/skills/moai-cc-skills/templates/SKILL-template.md +0 -15
  272. moai_adk/templates/.claude/skills/moai-design-systems/SKILL.md +0 -802
  273. moai_adk/templates/.claude/skills/moai-design-systems/examples.md +0 -1238
  274. moai_adk/templates/.claude/skills/moai-design-systems/reference.md +0 -673
  275. moai_adk/templates/.claude/skills/moai-domain-backend/SKILL.md +0 -290
  276. moai_adk/templates/.claude/skills/moai-domain-backend/examples.md +0 -1633
  277. moai_adk/templates/.claude/skills/moai-domain-backend/reference.md +0 -660
  278. moai_adk/templates/.claude/skills/moai-domain-cli-tool/SKILL.md +0 -123
  279. moai_adk/templates/.claude/skills/moai-domain-cli-tool/examples.md +0 -29
  280. moai_adk/templates/.claude/skills/moai-domain-cli-tool/reference.md +0 -30
  281. moai_adk/templates/.claude/skills/moai-domain-data-science/SKILL.md +0 -123
  282. moai_adk/templates/.claude/skills/moai-domain-data-science/examples.md +0 -29
  283. moai_adk/templates/.claude/skills/moai-domain-data-science/reference.md +0 -30
  284. moai_adk/templates/.claude/skills/moai-domain-database/SKILL.md +0 -123
  285. moai_adk/templates/.claude/skills/moai-domain-database/examples.md +0 -29
  286. moai_adk/templates/.claude/skills/moai-domain-database/reference.md +0 -30
  287. moai_adk/templates/.claude/skills/moai-domain-devops/SKILL.md +0 -124
  288. moai_adk/templates/.claude/skills/moai-domain-devops/examples.md +0 -29
  289. moai_adk/templates/.claude/skills/moai-domain-devops/reference.md +0 -31
  290. moai_adk/templates/.claude/skills/moai-domain-frontend/SKILL.md +0 -128
  291. moai_adk/templates/.claude/skills/moai-domain-frontend/examples.md +0 -29
  292. moai_adk/templates/.claude/skills/moai-domain-frontend/reference.md +0 -31
  293. moai_adk/templates/.claude/skills/moai-domain-ml/SKILL.md +0 -123
  294. moai_adk/templates/.claude/skills/moai-domain-ml/examples.md +0 -29
  295. moai_adk/templates/.claude/skills/moai-domain-ml/reference.md +0 -30
  296. moai_adk/templates/.claude/skills/moai-domain-mobile-app/SKILL.md +0 -123
  297. moai_adk/templates/.claude/skills/moai-domain-mobile-app/examples.md +0 -29
  298. moai_adk/templates/.claude/skills/moai-domain-mobile-app/reference.md +0 -30
  299. moai_adk/templates/.claude/skills/moai-domain-security/SKILL.md +0 -123
  300. moai_adk/templates/.claude/skills/moai-domain-security/examples.md +0 -29
  301. moai_adk/templates/.claude/skills/moai-domain-security/reference.md +0 -30
  302. moai_adk/templates/.claude/skills/moai-domain-web-api/SKILL.md +0 -123
  303. moai_adk/templates/.claude/skills/moai-domain-web-api/examples.md +0 -29
  304. moai_adk/templates/.claude/skills/moai-domain-web-api/reference.md +0 -30
  305. moai_adk/templates/.claude/skills/moai-essentials-debug/SKILL.md +0 -303
  306. moai_adk/templates/.claude/skills/moai-essentials-debug/examples.md +0 -1064
  307. moai_adk/templates/.claude/skills/moai-essentials-debug/reference.md +0 -1047
  308. moai_adk/templates/.claude/skills/moai-essentials-perf/SKILL.md +0 -113
  309. moai_adk/templates/.claude/skills/moai-essentials-perf/examples.md +0 -29
  310. moai_adk/templates/.claude/skills/moai-essentials-perf/reference.md +0 -28
  311. moai_adk/templates/.claude/skills/moai-essentials-refactor/SKILL.md +0 -113
  312. moai_adk/templates/.claude/skills/moai-essentials-refactor/examples.md +0 -29
  313. moai_adk/templates/.claude/skills/moai-essentials-refactor/reference.md +0 -28
  314. moai_adk/templates/.claude/skills/moai-essentials-review/SKILL.md +0 -113
  315. moai_adk/templates/.claude/skills/moai-essentials-review/examples.md +0 -29
  316. moai_adk/templates/.claude/skills/moai-essentials-review/reference.md +0 -28
  317. moai_adk/templates/.claude/skills/moai-foundation-ears/SKILL.md +0 -116
  318. moai_adk/templates/.claude/skills/moai-foundation-ears/examples.md +0 -29
  319. moai_adk/templates/.claude/skills/moai-foundation-ears/reference.md +0 -28
  320. moai_adk/templates/.claude/skills/moai-foundation-git/SKILL.md +0 -122
  321. moai_adk/templates/.claude/skills/moai-foundation-git/examples.md +0 -29
  322. moai_adk/templates/.claude/skills/moai-foundation-git/reference.md +0 -29
  323. moai_adk/templates/.claude/skills/moai-foundation-langs/SKILL.md +0 -113
  324. moai_adk/templates/.claude/skills/moai-foundation-langs/examples.md +0 -29
  325. moai_adk/templates/.claude/skills/moai-foundation-langs/reference.md +0 -28
  326. moai_adk/templates/.claude/skills/moai-foundation-specs/SKILL.md +0 -113
  327. moai_adk/templates/.claude/skills/moai-foundation-specs/examples.md +0 -29
  328. moai_adk/templates/.claude/skills/moai-foundation-specs/reference.md +0 -28
  329. moai_adk/templates/.claude/skills/moai-foundation-tags/SKILL.md +0 -113
  330. moai_adk/templates/.claude/skills/moai-foundation-tags/examples.md +0 -29
  331. moai_adk/templates/.claude/skills/moai-foundation-tags/reference.md +0 -28
  332. moai_adk/templates/.claude/skills/moai-foundation-trust/SKILL.md +0 -307
  333. moai_adk/templates/.claude/skills/moai-foundation-trust/examples.md +0 -0
  334. moai_adk/templates/.claude/skills/moai-foundation-trust/reference.md +0 -1099
  335. moai_adk/templates/.claude/skills/moai-lang-c/SKILL.md +0 -124
  336. moai_adk/templates/.claude/skills/moai-lang-c/examples.md +0 -29
  337. moai_adk/templates/.claude/skills/moai-lang-c/reference.md +0 -31
  338. moai_adk/templates/.claude/skills/moai-lang-cpp/SKILL.md +0 -124
  339. moai_adk/templates/.claude/skills/moai-lang-cpp/examples.md +0 -29
  340. moai_adk/templates/.claude/skills/moai-lang-cpp/reference.md +0 -31
  341. moai_adk/templates/.claude/skills/moai-lang-csharp/SKILL.md +0 -123
  342. moai_adk/templates/.claude/skills/moai-lang-csharp/examples.md +0 -29
  343. moai_adk/templates/.claude/skills/moai-lang-csharp/reference.md +0 -30
  344. moai_adk/templates/.claude/skills/moai-lang-dart/SKILL.md +0 -123
  345. moai_adk/templates/.claude/skills/moai-lang-dart/examples.md +0 -29
  346. moai_adk/templates/.claude/skills/moai-lang-dart/reference.md +0 -30
  347. moai_adk/templates/.claude/skills/moai-lang-go/SKILL.md +0 -127
  348. moai_adk/templates/.claude/skills/moai-lang-go/examples.md +0 -29
  349. moai_adk/templates/.claude/skills/moai-lang-go/reference.md +0 -31
  350. moai_adk/templates/.claude/skills/moai-lang-java/SKILL.md +0 -126
  351. moai_adk/templates/.claude/skills/moai-lang-java/examples.md +0 -29
  352. moai_adk/templates/.claude/skills/moai-lang-java/reference.md +0 -31
  353. moai_adk/templates/.claude/skills/moai-lang-javascript/SKILL.md +0 -125
  354. moai_adk/templates/.claude/skills/moai-lang-javascript/examples.md +0 -29
  355. moai_adk/templates/.claude/skills/moai-lang-javascript/reference.md +0 -32
  356. moai_adk/templates/.claude/skills/moai-lang-kotlin/SKILL.md +0 -124
  357. moai_adk/templates/.claude/skills/moai-lang-kotlin/examples.md +0 -29
  358. moai_adk/templates/.claude/skills/moai-lang-kotlin/reference.md +0 -31
  359. moai_adk/templates/.claude/skills/moai-lang-php/SKILL.md +0 -126
  360. moai_adk/templates/.claude/skills/moai-lang-php/examples.md +0 -29
  361. moai_adk/templates/.claude/skills/moai-lang-php/reference.md +0 -30
  362. moai_adk/templates/.claude/skills/moai-lang-python/SKILL.md +0 -433
  363. moai_adk/templates/.claude/skills/moai-lang-python/examples.md +0 -624
  364. moai_adk/templates/.claude/skills/moai-lang-python/reference.md +0 -316
  365. moai_adk/templates/.claude/skills/moai-lang-r/SKILL.md +0 -123
  366. moai_adk/templates/.claude/skills/moai-lang-r/examples.md +0 -29
  367. moai_adk/templates/.claude/skills/moai-lang-r/reference.md +0 -30
  368. moai_adk/templates/.claude/skills/moai-lang-ruby/SKILL.md +0 -124
  369. moai_adk/templates/.claude/skills/moai-lang-ruby/examples.md +0 -29
  370. moai_adk/templates/.claude/skills/moai-lang-ruby/reference.md +0 -31
  371. moai_adk/templates/.claude/skills/moai-lang-rust/SKILL.md +0 -127
  372. moai_adk/templates/.claude/skills/moai-lang-rust/examples.md +0 -29
  373. moai_adk/templates/.claude/skills/moai-lang-rust/reference.md +0 -31
  374. moai_adk/templates/.claude/skills/moai-lang-scala/SKILL.md +0 -125
  375. moai_adk/templates/.claude/skills/moai-lang-scala/examples.md +0 -29
  376. moai_adk/templates/.claude/skills/moai-lang-scala/reference.md +0 -30
  377. moai_adk/templates/.claude/skills/moai-lang-shell/SKILL.md +0 -123
  378. moai_adk/templates/.claude/skills/moai-lang-shell/examples.md +0 -29
  379. moai_adk/templates/.claude/skills/moai-lang-shell/reference.md +0 -30
  380. moai_adk/templates/.claude/skills/moai-lang-sql/SKILL.md +0 -124
  381. moai_adk/templates/.claude/skills/moai-lang-sql/examples.md +0 -29
  382. moai_adk/templates/.claude/skills/moai-lang-sql/reference.md +0 -31
  383. moai_adk/templates/.claude/skills/moai-lang-swift/SKILL.md +0 -123
  384. moai_adk/templates/.claude/skills/moai-lang-swift/examples.md +0 -29
  385. moai_adk/templates/.claude/skills/moai-lang-swift/reference.md +0 -30
  386. moai_adk/templates/.claude/skills/moai-lang-typescript/SKILL.md +0 -133
  387. moai_adk/templates/.claude/skills/moai-lang-typescript/examples.md +0 -29
  388. moai_adk/templates/.claude/skills/moai-lang-typescript/reference.md +0 -34
  389. moai_adk/templates/.claude/skills/moai-project-documentation.md +0 -622
  390. moai_adk/templates/.github/workflows/c-tag-validation.yml +0 -11
  391. moai_adk/templates/.github/workflows/cpp-tag-validation.yml +0 -11
  392. moai_adk/templates/.github/workflows/csharp-tag-validation.yml +0 -11
  393. moai_adk/templates/.github/workflows/dart-tag-validation.yml +0 -11
  394. moai_adk/templates/.github/workflows/go-tag-validation.yml +0 -130
  395. moai_adk/templates/.github/workflows/java-tag-validation.yml +0 -11
  396. moai_adk/templates/.github/workflows/javascript-tag-validation.yml +0 -135
  397. moai_adk/templates/.github/workflows/kotlin-tag-validation.yml +0 -11
  398. moai_adk/templates/.github/workflows/php-tag-validation.yml +0 -11
  399. moai_adk/templates/.github/workflows/python-tag-validation.yml +0 -118
  400. moai_adk/templates/.github/workflows/release.yml +0 -118
  401. moai_adk/templates/.github/workflows/ruby-tag-validation.yml +0 -11
  402. moai_adk/templates/.github/workflows/rust-tag-validation.yml +0 -11
  403. moai_adk/templates/.github/workflows/shell-tag-validation.yml +0 -11
  404. moai_adk/templates/.github/workflows/swift-tag-validation.yml +0 -11
  405. moai_adk/templates/.github/workflows/tag-report.yml +0 -269
  406. moai_adk/templates/.github/workflows/tag-validation.yml +0 -186
  407. moai_adk/templates/.github/workflows/typescript-tag-validation.yml +0 -154
  408. moai_adk/templates/.moai/config.json +0 -115
  409. moai_adk/templates/workflows/go-tag-validation.yml +0 -30
  410. moai_adk/templates/workflows/javascript-tag-validation.yml +0 -41
  411. moai_adk/templates/workflows/python-tag-validation.yml +0 -42
  412. moai_adk/templates/workflows/typescript-tag-validation.yml +0 -31
  413. moai_adk-0.15.0.dist-info/METADATA +0 -3079
  414. moai_adk-0.15.0.dist-info/RECORD +0 -365
  415. {moai_adk-0.15.0.dist-info → moai_adk-0.25.4.dist-info}/WHEEL +0 -0
  416. {moai_adk-0.15.0.dist-info → moai_adk-0.25.4.dist-info}/entry_points.txt +0 -0
  417. {moai_adk-0.15.0.dist-info → moai_adk-0.25.4.dist-info}/licenses/LICENSE +0 -0
@@ -1,709 +0,0 @@
1
- ---
2
- name: alfred:2-run
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
- allowed-tools:
6
- - Read
7
- - Write
8
- - Edit
9
- - MultiEdit
10
- - Bash(python3:*)
11
- - Bash(pytest:*)
12
- - Bash(npm:*)
13
- - Bash(node:*)
14
- - Bash(git:*)
15
- - Task
16
- - WebFetch
17
- - Grep
18
- - Glob
19
- - TodoWrite
20
- ---
21
-
22
- # ⚒️ MoAI-ADK Phase 2: Run the plan - Flexible implementation strategy
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
- > **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.
26
-
27
- <!-- @CODE:ALF-WORKFLOW-002:CMD-RUN -->
28
-
29
- **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.
30
-
31
- ## 🎯 Command Purpose
32
-
33
- 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
-
35
- **Run on**: $ARGUMENTS
36
-
37
- ## 💡 Execution philosophy: “Plan → Run → Sync”
38
-
39
- `/alfred:2-run` is a general-purpose command that does not simply "build" code, but **performs** a planned task.
40
-
41
- ### 3 main scenarios
42
-
43
- #### Scenario 1: TDD implementation (main method) ⭐
44
- ```bash
45
- /alfred:2-run SPEC-AUTH-001
46
- → RED → GREEN → REFACTOR
47
- → Implement high-quality code through test-driven development
48
- ```
49
-
50
- #### Scenario 2: Prototyping
51
- ```bash
52
- /alfred:2-run SPEC-PROTO-001
53
- → Prototype implementation for quick verification
54
- → Quick feedback with minimal testing
55
- ```
56
-
57
- #### Scenario 3: Documentation tasks
58
- ```bash
59
- /alfred:2-run SPEC-DOCS-001
60
- → Writing documentation and generating sample code
61
- → API documentation, tutorials, guides, etc.
62
- ```
63
-
64
- > **Standard two-step workflow** (see `CLAUDE.md` - "Alfred Command Execution Pattern" for details)
65
-
66
- ## 📋 Execution flow
67
-
68
- 1. **SPEC Analysis**: Requirements extraction and complexity assessment
69
- 2. **Establishment of implementation strategy**: Determine the optimized approach for each language (TDD, prototype, documentation, etc.)
70
- 3. **User Confirmation**: Review and approve action plan
71
- 4. **Execute work**: Perform work according to the approved plan
72
- 5. **Git Operations**: Creating step-by-step commits with git-manager
73
-
74
- ## 🧠 Associated Skills & Agents
75
-
76
- | Agent | Core Skill | Purpose |
77
- | ---------------------- | -------------------------------- | --------------------------------------- |
78
- | implementation-planner | `moai-alfred-language-detection` | Detect language and design architecture |
79
- | tdd-implementer | `moai-essentials-debug` | Implement TDD (RED → GREEN → REFACTOR) |
80
- | quality-gate | `moai-alfred-trust-validation` | Verify TRUST 5 principles |
81
- | git-manager | `moai-alfred-git-workflow` | Commit and manage Git workflows |
82
-
83
- **Note**: TUI Survey Skill is used for user confirmations during the run phase and is shared across all interactive prompts.
84
-
85
- ## 🔗 Associated Agent
86
-
87
- - **Phase 1**: implementation-planner (📋 technical architect) - SPEC analysis and establishment of execution strategy
88
- - **Phase 2**: tdd-implementer (🔬 senior developer) - Dedicated to execution work
89
- - **Phase 2.5**: quality-gate (🛡️ Quality Assurance Engineer) - TRUST principle verification (automatically)
90
- - **Phase 3**: git-manager (🚀 Release Engineer) - Dedicated to Git commits
91
-
92
- ## 💡 Example of use
93
-
94
- Users can run commands as follows:
95
- - `/alfred:2-run SPEC-001` - Run a specific SPEC
96
- - `/alfred:2-run all` - Run all SPECs in batches
97
- - `/alfred:2-run SPEC-003 --test` - Run only tests
98
-
99
- ## 🔍 STEP 1: SPEC analysis and execution plan establishment
100
-
101
- STEP 1 consists of **two independent phases** to provide flexible workflow based on task complexity:
102
-
103
- ### 📋 STEP 1 Workflow Overview
104
-
105
- ```
106
- ┌─────────────────────────────────────────────────────────────┐
107
- │ STEP 1: SPEC Analysis & Planning │
108
- ├─────────────────────────────────────────────────────────────┤
109
- │ │
110
- │ Phase A (OPTIONAL) │
111
- │ ┌─────────────────────────────────────────┐ │
112
- │ │ 🔍 Explore Agent │ │
113
- │ │ • Browse existing codebase │ │
114
- │ │ • Find similar implementations │ │
115
- │ │ • Identify patterns & architecture │ │
116
- │ └─────────────────────────────────────────┘ │
117
- │ ↓ │
118
- │ (exploration results) │
119
- │ ↓ │
120
- │ Phase B (REQUIRED) │
121
- │ ┌─────────────────────────────────────────┐ │
122
- │ │ ⚙️ implementation-planner Agent │ │
123
- │ │ • Analyze SPEC requirements │ │
124
- │ │ • Design execution strategy │ │
125
- │ │ • Create implementation plan │ │
126
- │ │ • Request user approval │ │
127
- │ └─────────────────────────────────────────┘ │
128
- │ ↓ │
129
- │ (user approval via AskUserQuestion) │
130
- │ ↓ │
131
- │ PROCEED TO STEP 2 │
132
- └─────────────────────────────────────────────────────────────┘
133
- ```
134
-
135
- **Key Points**:
136
- - **Phase A is optional** - Skip if you don't need to explore existing code
137
- - **Phase B is required** - Always runs to analyze SPEC and create execution plan
138
- - **Results flow forward** - Exploration results (if any) are passed to implementation-planner
139
-
140
- ---
141
-
142
- ### 🔍 Phase A: Codebase Exploration (OPTIONAL)
143
-
144
- **Use the Explore agent when you need to understand existing code before planning.**
145
-
146
- #### When to use Phase A:
147
-
148
- - ✅ Need to understand existing code structure/patterns
149
- - ✅ Need to find similar function implementations for reference
150
- - ✅ Need to understand project architectural rules
151
- - ✅ Need to check libraries and versions being used
152
-
153
- #### How to invoke Explore agent:
154
-
155
- ```
156
- Invoking the Task tool (Explore agent):
157
- - subagent_type: "Explore"
158
- - description: "Explore existing code structures and patterns"
159
- - prompt: "SPEC-$ARGUMENTS와 관련된 기존 코드를 탐색해주세요:
160
- - 유사한 기능 구현 코드 (src/)
161
- - 참고할 테스트 패턴 (tests/)
162
- - 아키텍처 패턴 및 디자인 패턴
163
- - 현재 라이브러리 및 버전 (package.json, requirements.txt)
164
- 상세도 수준: medium"
165
- ```
166
-
167
- **Note**: If you skip Phase A, proceed directly to Phase B.
168
-
169
- ---
170
-
171
- ### ⚙️ Phase B: Execution Planning (REQUIRED)
172
-
173
- **Call the implementation-planner agent to analyze SPEC and establish execution strategy.**
174
-
175
- This phase is **always required** regardless of whether Phase A was executed.
176
-
177
- #### How to invoke implementation-planner:
178
-
179
- ```
180
- Task tool call:
181
- - subagent_type: "implementation-planner"
182
- - description: "SPEC analysis and establishment of execution strategy"
183
- - prompt: "$ARGUMENTS의 SPEC을 분석하고 실행 계획을 수립해주세요.
184
- 다음을 포함해야 합니다:
185
- 1. SPEC 요구사항 추출 및 복잡도 평가
186
- 2. 라이브러리 및 도구 선택 (WebFetch 사용)
187
- 3. TAG 체인 설계
188
- 4. 단계별 실행 계획
189
- 5. 위험 요소 및 대응 계획
190
- 6. 행동 계획을 작성하고 `AskUserQuestion 도구 (moai-alfred-interactive-questions 스킬 참고)`로 사용자와 다음 단계를 확인합니다
191
- (선택사항) 탐색 결과: $EXPLORE_RESULTS"
192
- ```
193
-
194
- **Note**: If Phase A was executed, pass the exploration results via `$EXPLORE_RESULTS` variable.
195
-
196
- ### SPEC analysis in progress
197
-
198
- 1. **SPEC document analysis**
199
- - Requirements extraction and complexity assessment
200
- - Check technical constraints
201
- - Dependency and impact scope analysis
202
- - (Optional) Identify existing code structure based on Explore results
203
-
204
- 2. **Establish execution strategy**
205
- - Detect project language and optimize execution strategy
206
- - Determine approach (TDD, prototyping, documentation, etc.)
207
- - Estimate expected work scope and time
208
-
209
- 3. **Check and specify library versions (required)**
210
- - **Web search**: Check the latest stable versions of all libraries to be used through `WebSearch`
211
- - **Specify versions**: Specify the exact version for each library in the implementation plan report (e.g. `fastapi>=0.118.3`)
212
- - **Stability priority**: Exclude beta/alpha versions, select only production stable versions
213
- - **Check compatibility**: Verify version compatibility between libraries
214
- - **Search keyword examples**:
215
- - `"FastAPI latest stable version 2025"`
216
- - `"SQLAlchemy 2.0 latest stable version 2025"`
217
- - `"React 18 latest stable version 2025"`
218
-
219
- 4. **Report action plan**
220
- - Present step-by-step action plan
221
- - Identify potential risk factors
222
- - Set quality gate checkpoints
223
- - **Specify library version (required)**
224
-
225
- ### User verification steps
226
-
227
- After reviewing the action plan, select one of the following:
228
- - **"Proceed"** or **"Start"**: Start executing the task as planned
229
- - **"Modify [Content]"**: Request a plan modification
230
- - **"Abort"**: Stop the task
231
-
232
- ---
233
-
234
- ## 🚀 STEP 2: Execute task (after user approval)
235
-
236
- After user approval (gathered through `AskUserQuestion tool (documented in moai-alfred-interactive-questions skill)`), **call the tdd-implementer agent using the Task tool**.
237
-
238
- ---
239
-
240
- ### 2.0.5 Domain Readiness Check (Automatic - Before Implementation)
241
-
242
- **Purpose**: Load domain-expert agents as "implementation advisors" based on SPEC.stack metadata
243
-
244
- **When to run**: After user approval, BEFORE invoking tdd-implementer
245
-
246
- **Detection Logic**:
247
-
248
- Alfred reads the SPEC metadata to identify required domains:
249
-
250
- ```bash
251
- # Read SPEC metadata
252
- spec_metadata=$(grep "^domains:" .moai/specs/SPEC-{ID}/spec.md)
253
-
254
- # Or read from config.json
255
- selected_domains=$(jq -r '.stack.selected_domains[]' .moai/config.json)
256
- ```
257
-
258
- **Domain Expert Advisory Pattern**:
259
-
260
- | Domain | Readiness Check | Advisory Focus |
261
- |--------|----------------|----------------|
262
- | **Frontend** | Component structure, testing strategy, state management | Component hierarchy, React/Vue best practices, UI testing patterns |
263
- | **Backend** | API contract, database schema, async patterns | RESTful design, database indexing, error handling, authentication |
264
- | **DevOps** | Docker readiness, environment variables, health checks | Containerization, CI/CD integration, deployment strategies |
265
- | **Database** | Schema design, migration strategy, indexing | Data modeling, query optimization, migration safety |
266
- | **Data Science** | Data pipeline design, notebook structure | ETL patterns, data validation, model versioning |
267
- | **Mobile** | Platform-specific requirements, app lifecycle | Native integration, state management, offline support |
268
-
269
- **Example Invocation** (Frontend + Backend detected):
270
-
271
- ```python
272
- # Read SPEC metadata
273
- spec_domains = ["frontend", "backend"] # from SPEC frontmatter
274
-
275
- # Invoke domain experts BEFORE tdd-implementer
276
- for domain in spec_domains:
277
- if domain == "frontend":
278
- Task(
279
- subagent_type="Explore",
280
- prompt="""You are consulting as frontend-expert for TDD implementation.
281
-
282
- SPEC: [SPEC-UI-001 - User Dashboard Component]
283
-
284
- Provide implementation readiness check:
285
- 1. Component structure recommendations
286
- 2. State management approach (Redux/Zustand/Context)
287
- 3. Testing strategy (Jest + Testing Library)
288
- 4. Accessibility requirements
289
- 5. Performance optimization tips
290
-
291
- Output: Brief advisory for tdd-implementer (3-4 key points)"""
292
- )
293
-
294
- if domain == "backend":
295
- Task(
296
- subagent_type="Explore",
297
- prompt="""You are consulting as backend-expert for TDD implementation.
298
-
299
- SPEC: [SPEC-API-001 - Authentication Endpoints]
300
-
301
- Provide implementation readiness check:
302
- 1. API contract validation
303
- 2. Database schema requirements
304
- 3. Authentication/authorization patterns
305
- 4. Error handling strategy
306
- 5. Async processing considerations
307
-
308
- Output: Brief advisory for tdd-implementer (3-4 key points)"""
309
- )
310
- ```
311
-
312
- **Output Format** (Stored in SPEC plan.md):
313
-
314
- ```markdown
315
- ## Domain Expert Advisory (Implementation Phase)
316
-
317
- ### Frontend Readiness
318
- - Component structure: Use compound component pattern for Dashboard
319
- - State management: Recommend Zustand for lightweight state
320
- - Testing: Prioritize user interaction tests over implementation details
321
- - Performance: Implement React.memo for expensive components
322
-
323
- ### Backend Readiness
324
- - API contract: OpenAPI 3.0 spec generated from FastAPI
325
- - Database schema: Add index on user_id and created_at columns
326
- - Authentication: Use JWT with refresh token rotation
327
- - Async: Use background tasks for email notifications
328
- ```
329
-
330
- **Integration with tdd-implementer**:
331
-
332
- ```python
333
- # Pass domain expert feedback to tdd-implementer
334
- Task(
335
- subagent_type="tdd-implementer",
336
- prompt="""You are tdd-implementer agent.
337
-
338
- SPEC: SPEC-{ID}
339
-
340
- DOMAIN EXPERT ADVISORY:
341
- {domain_expert_feedback}
342
-
343
- Execute TDD implementation considering domain expert guidance.
344
- Follow RED → GREEN → REFACTOR cycle with domain best practices.
345
-
346
- $ARGUMENTS"""
347
- )
348
- ```
349
-
350
- **Graceful Degradation**:
351
- - If SPEC.stack.domains missing → Skip advisory (greenfield implementation)
352
- - If domain expert unavailable → Continue with tdd-implementer only
353
- - Advisory is non-blocking (implementation proceeds regardless)
354
-
355
- ---
356
-
357
- ### ⚙️ How to call an agent
358
-
359
- **STEP 2 calls tdd-implementer using the Task tool**:
360
-
361
- ```
362
- Call the Task tool:
363
- - subagent_type: "tdd-implementer"
364
- - description: "Execute task with TDD implementation"
365
- - prompt: """당신은 tdd-implementer 에이전트입니다.
366
-
367
- 언어 설정:
368
- - 대화_언어: {{CONVERSATION_LANGUAGE}}
369
- - 언어명: {{CONVERSATION_LANGUAGE_NAME}}
370
-
371
- 중요 지시사항:
372
- **Code and technical output MUST be in English.** This ensures global compatibility and maintainability.
373
-
374
- 코드 문법 및 키워드: 영어 (고정).
375
- 코드 주석:
376
- - 로컬 프로젝트 코드: 반드시 {{CONVERSATION_LANGUAGE}}로 작성
377
- - 패키지 코드 (src/moai_adk/): 반드시 영어로 작성 (글로벌 배포용)
378
- 테스트 설명 및 문서: 반드시 {{CONVERSATION_LANGUAGE}}로 작성.
379
-
380
- 스킬 호출:
381
- 필요 시 명시적 Skill() 호출 사용:
382
- - Skill("moai-alfred-language-detection") - 프로젝트 언어 감지
383
- - Skill("moai-lang-python") 또는 언어별 스킬 - 베스트 프랙티스
384
- - Skill("moai-essentials-debug") - 테스트 실패 시
385
- - Skill("moai-essentials-refactor") - REFACTOR 단계에서
386
-
387
- 작업: STEP 1에서 승인된 계획에 따라 작업을 실행합니다.
388
-
389
- TDD 시나리오의 경우:
390
- - RED → GREEN → REFACTOR 사이클 수행
391
- - 각 TAG에 대해 다음을 수행:
392
- 1. RED 단계: @TEST:ID 태그로 실패하는 테스트 작성
393
- 2. GREEN 단계: @CODE:ID 태그로 최소한의 구현
394
- 3. REFACTOR 단계: 코드 품질 개선
395
- 4. TAG 완료 조건 확인 및 다음 TAG 진행
396
-
397
- 실행 대상: $ARGUMENTS"""
398
- ```
399
-
400
- ## 🔗 TDD optimization for each language
401
-
402
- ### Project language detection and optimal routing
403
-
404
- `tdd-implementer` automatically detects the language of your project and selects the optimal TDD tools and workflow:
405
-
406
- - **Language detection**: Analyze project files (package.json, pyproject.toml, go.mod, etc.)
407
- - **Tool selection**: Automatically select the optimal test framework for each language
408
- - **TAG application**: Write @TAG annotations directly in code files
409
- - **Run cycle**: RED → GREEN → REFACTOR sequential process
410
-
411
- ### TDD tool mapping
412
-
413
- #### Backend/System
414
-
415
- | SPEC Type | Implementation language | Test Framework | Performance Goals | Coverage Goals |
416
- | ------------------- | ----------------------- | ---------------------- | ----------------- | -------------- |
417
- | **CLI/System** | TypeScript | jest + ts-node | < 18ms | 95%+ |
418
- | **API/Backend** | TypeScript | Jest + SuperTest | < 50ms | 90%+ |
419
- | **Frontend** | TypeScript | Jest + Testing Library | < 100ms | 85%+ |
420
- | **Data Processing** | TypeScript | Jest + Mock | < 200ms | 85%+ |
421
- | **Python Project** | Python | pytest + mypy | Custom | 85%+ |
422
-
423
- #### Mobile Framework
424
-
425
- | SPEC Type | Implementation language | Test Framework | Performance Goals | Coverage Goals |
426
- | ---------------- | ----------------------- | -------------------------- | ----------------- | -------------- |
427
- | **Flutter App** | Dart | flutter test + widget test | < 100ms | 85%+ |
428
- | **React Native** | TypeScript | Jest + RN Testing Library | < 100ms | 85%+ |
429
- | **iOS App** | Swift | XCTest + XCUITest | < 150ms | 80%+ |
430
- | **Android App** | Kotlin | JUnit + Espresso | < 150ms | 80%+ |
431
-
432
- ## 🚀 Optimized agent collaboration structure
433
-
434
- - **Phase 1**: `implementation-planner` agent analyzes SPEC and establishes execution strategy
435
- - **Phase 2**: `tdd-implementer` agent executes tasks (TDD cycle, prototyping, documentation, etc.)
436
- - **Phase 2.5**: `quality-gate` agent verifies TRUST principle and quality verification (automatically)
437
- - **Phase 3**: `git-manager` agent processes all commits at once after task completion
438
- - **Single responsibility principle**: Each agent is responsible only for its own area of expertise
439
- - **Inter-agent call prohibited**: Each agent runs independently, sequential calls are made only at the command level
440
-
441
- ## 🔄 Step 2 Workflow Execution Order
442
-
443
- ### Phase 1: Analysis and planning phase
444
-
445
- The `implementation-planner` agent does the following:
446
-
447
- 1. **SPEC document analysis**: Requirements extraction and complexity assessment of specified SPEC ID
448
- 2. **Library selection**: Check the latest stable version and verify compatibility through WebFetch
449
- 3. **TAG chain design**: Determine TAG order and dependency
450
- 4. **Establishment of implementation strategy**: Step-by-step implementation plan and risk identification
451
- 5. **Create action plan**: Create a structured plan and, via `AskUserQuestion tool (documented in moai-alfred-interactive-questions skill)`, collect user approval before proceeding
452
-
453
- ### Phase 2: Task execution phase (after approval)
454
-
455
- The `tdd-implementer` agent performs **TAG-by-TAG** after user approval (based on TDD scenario):
456
-
457
- 1. **RED Phase**: Write a failing test (add @TEST:ID tag) and check for failure
458
- 2. **GREEN Phase**: Write minimal code that passes the test (add @CODE:ID tag)
459
- 3. **REFACTOR Phase**: Improve code quality (without changing functionality)
460
- 4. **TAG completion confirmation**: Verify the completion conditions of each TAG and proceed to the next TAG
461
-
462
- ### Phase 2.5: Quality verification gate (automatic execution)
463
-
464
- After the job execution is complete, the `quality-gate` agent **automatically** performs quality verification.
465
-
466
- **Automatic execution conditions**:
467
- - Automatically invoked upon completion of task execution
468
- - Manually invoked upon user request
469
-
470
- **Verification items**:
471
- - **TRUST principle verification**: Trust-checker script execution and result parsing
472
- - T (Testable): Test coverage ≥ 85%
473
- - R (Readable): Code readability (file≤300 LOC, function≤50 LOC, Complexity≤10)
474
- - U (Unified): Architectural integrity
475
- - S (Secured): No security vulnerabilities
476
- - T (Traceable): @TAG chain integrity
477
- - **Code style**: Run and verify linter (ESLint/Pylint)
478
- - **Test Coverage**: Run language-specific coverage tools and verify goal achievement
479
- - **TAG chain verification**: Check orphan TAGs, missing TAGs
480
- - **Dependency verification**: Check security vulnerabilities
481
-
482
- **How ​​it works**: When Alfred completes job execution, it automatically calls the quality-gate agent to perform quality verification.
483
-
484
- **Handling verification results**:
485
-
486
- ✅ **PASS (0 Critical, 5 or less Warnings)**:
487
- - Proceed to Phase 3 (Git work)
488
- - Create a quality report
489
-
490
- ⚠️ **WARNING (0 Critical, 6 or more Warnings)**:
491
- - Display warning
492
- - User choice: "Continue" or "Re-verify after modification"
493
-
494
- ❌ **CRITICAL (1 or more Critical)**:
495
- - Block Git commits
496
- - Detailed report on items requiring improvement (including file: line information)
497
- - Recommended tdd-implementer re-invocation
498
-
499
- **Skip verification option**: To skip quality verification, use the `--skip-quality-check` option.
500
-
501
- ### Phase 3: Git operations (git-manager)
502
-
503
- After the `git-manager` agent completes the task **at once**:
504
-
505
- 1. **Create checkpoint**: Backup point before starting work
506
- 2. **Structured Commit**: Step-by-step commit creation (RED→GREEN→REFACTOR for TDD)
507
- 3. **Final synchronization**: Apply Git strategy for each mode and remote synchronization
508
-
509
-
510
- ## 📋 STEP 1 Execution Guide: SPEC Analysis and Planning
511
-
512
- ### 1. SPEC document analysis
513
-
514
- Alfred calls the implementation-planner agent to check the SPEC document and create an execution plan.
515
-
516
- #### Analysis Checklist
517
-
518
- - [ ] **Requirements clarity**: Are the functional requirements in the SPEC specific?
519
- - [ ] **Technical constraints**: Check performance, compatibility, and security requirements
520
- - [ ] **Dependency analysis**: Connection points with existing code and scope of impact
521
- - [ ] **Complexity assessment**: Implementation difficulty and expected workload
522
-
523
- ### 2. Determine implementation strategy
524
-
525
- #### TypeScript execution criteria
526
-
527
- | SPEC characteristics | execution language | Reason |
528
- | -------------------- | ------------------- | --------------------------------------------------------- |
529
- | CLI/System Tools | TypeScript | High performance (18ms), type safety, SQLite3 integration |
530
- | API/Backend | TypeScript | Node.js ecosystem, Express/Fastify compatibility |
531
- | Frontend | TypeScript | React/Vue native support |
532
- | data processing | TypeScript | High-performance asynchronous processing, type safety |
533
- | User Python Project | Python tool support | MoAI-ADK provides Python project development tools |
534
-
535
- #### Approach
536
-
537
- - **Bottom-up**: Utility → Service → API
538
- - **Top-down**: API → Service → Utility
539
- - **Middle-out**: Core logic → Bidirectional expansion
540
-
541
- ### 3. Generate action plan report
542
-
543
- Present your plan in the following format:
544
-
545
- ```
546
- ## Execution Plan Report: [SPEC-ID]
547
-
548
- ### 📊 Analysis Results
549
- - **Complexity**: [Low/Medium/High]
550
- - **Estimated Work Time**: [Time Estimation]
551
- - **Key Technical Challenges**: [Technical Difficulties]
552
-
553
- ### 🎯 Execution Strategy
554
- - **Language of choice**: [Python/TypeScript + Reason]
555
- - **Approach**: [Bottom-up/Top-down/Middle-out or Prototype/Documentation]
556
- - **Core module**: [Major work target]
557
-
558
- ### 📦 Library version (required - based on web search)
559
- **Backend dependencies** (example):
560
- | package | Latest stable version | installation command |
561
- | ---------- | --------------------- | -------------------- |
562
- | FastAPI | 0.118.3 | fastapi>=0.118.3 |
563
- | SQLAlchemy | 2.0.43 | sqlalchemy>=2.0.43 |
564
-
565
- **Frontend dependency** (example):
566
- | package | Latest stable version | installation command |
567
- | ------- | --------------------- | -------------------- |
568
- | React | 18.3.1 | react@^18.3.1 |
569
- | Vite | 7.1.9 | vite@^7.1.9 |
570
-
571
- **Important Compatibility Information**:
572
- - [Specific Version Requirements]
573
- - [Known Compatibility Issues]
574
-
575
- ### ⚠️ Risk Factors
576
- - **Technical Risk**: [Expected Issues]
577
- - **Dependency Risk**: [External Dependency Issues]
578
- - **Schedule Risk**: [Possible Delay]
579
-
580
- ### ✅ Quality Gates
581
- - **Test Coverage**: [Goal %]
582
- - **Performance Goals**: [Specific Metrics]
583
- - **Security Checkpoints**: [Verification Items]
584
-
585
- ---
586
- **Approval Request**: Do you want to proceed with the above plan?
587
- (Choose between “Proceed,” “Modify [Content],” or “Abort”)
588
- ```
589
-
590
- ---
591
-
592
- ## 🚀 STEP 2 Execution Guide: Execute Task (After Approval)
593
-
594
- Only if the user selects **"Proceed"** or **"Start"** will Alfred call the tdd-implementer agent to start the task.
595
-
596
- ### TDD step-by-step guide
597
-
598
- 1. **RED**: Writing failure tests with Given/When/Then structure. Follow test file rules for each language and simply record failure logs.
599
- 2. **GREEN**: Add only the minimal implementation that makes the tests pass. Optimization is postponed to the REFACTOR stage.
600
- 3. **REFACTOR**: Removal of duplication, explicit naming, structured logging/exception handling enhancements. Split into additional commits if necessary.
601
-
602
- **TRUST 5 Principles Linkage** (Details: `development-guide.md` - "TRUST 5 Principles"):
603
- - **T (Test First)**: Writing SPEC-based tests in the RED stage
604
- - **R (Readable)**: Readability in the REFACTOR stage Improvement (file≤300 LOC, function≤50 LOC)
605
- - **T (Trackable)**: Maintain @TAG traceability at all stages.
606
-
607
- > 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.
608
-
609
- ## Agent role separation
610
-
611
- ### implementation-planner dedicated area
612
-
613
- - SPEC document analysis and requirements extraction
614
- - Library selection and version management
615
- - TAG chain design and sequence decision
616
- - Establishment of implementation strategy and identification of risks
617
- - Creation of execution plan
618
-
619
- ### tdd-implementer dedicated area
620
-
621
- - Execute tasks (TDD, prototyping, documentation, etc.)
622
- - Write and run tests (TDD scenarios)
623
- - Add and manage TAG comments
624
- - Improve code quality (refactoring)
625
- - Run language-specific linters/formatters
626
-
627
- ### Quality-gate dedicated area
628
-
629
- - TRUST principle verification
630
- - Code style verification
631
- - Test coverage verification
632
- - TAG chain integrity verification
633
- - Dependency security verification
634
-
635
- ### git-manager dedicated area
636
-
637
- - All Git commit operations (add, commit, push)
638
- - Checkpoint creation for each task stage
639
- - Apply commit strategy for each mode
640
- - Git branch/tag management
641
- - Remote synchronization processing
642
-
643
- ## Quality Gate Checklist
644
-
645
- - Test coverage ≥ `.moai/config.json.test_coverage_target` (default 85%)
646
- - Pass linter/formatter (`ruff`, `eslint --fix`, `gofmt`, etc.)
647
- - Check presence of structured logging or observation tool call
648
- - @TAG update needed changes note (used by doc-syncer in next step)
649
-
650
- ---
651
-
652
- ## 🧠 Context Management
653
-
654
- > For more information: Skill("moai-alfred-dev-guide") - see section "Context Engineering"
655
-
656
- ### Core strategy of this command
657
-
658
- **Load first**: `.moai/specs/SPEC-XXX/spec.md` (implementation target requirement)
659
-
660
- **Recommendation**: Job execution completed successfully. You can experience better performance and context management by starting a new chat session with the `/clear` or `/new` command before proceeding to the next step (`/alfred:3-sync`).
661
-
662
- ---
663
-
664
- ## Final Step
665
-
666
- ### After STEP 3 (git-manager) Completes
667
-
668
- Alfred calls AskUserQuestion to collect user's next action:
669
-
670
- ```python
671
- AskUserQuestion(
672
- questions=[
673
- {
674
- "question": "구현이 완료되었습니다. 다음으로 뭘 하시겠습니까?",
675
- "header": "다음 단계",
676
- "multiSelect": false,
677
- "options": [
678
- {
679
- "label": "📚 문서 동기화 진행",
680
- "description": "/alfred:3-sync 실행하여 문서 동기화"
681
- },
682
- {
683
- "label": "🔍 추가 구현",
684
- "description": "다른 SPEC 구현 진행"
685
- },
686
- {
687
- "label": "🔄 새 세션 시작",
688
- "description": "성능 최적화를 위해 /clear 실행"
689
- }
690
- ]
691
- }
692
- ]
693
- )
694
- ```
695
-
696
- **User Responses**:
697
- - **📚 문서 동기화**: Proceed to `/alfred:3-sync` for documentation synchronization
698
- - **🔍 추가 구현**: Repeat `/alfred:2-run SPEC-XXX` for next feature
699
- - **🔄 새 세션**: Execute `/clear` to start fresh session (recommended for performance)
700
-
701
- ---
702
-
703
- ## Next steps
704
-
705
- **Recommendation**: For better performance and context management, start a new chat session with the `/clear` or `/new` command before proceeding to the next step.
706
-
707
- - After task execution is complete, document synchronization proceeds with `/alfred:3-sync`
708
- - All Git operations are dedicated to the git-manager agent to ensure consistency
709
- - Only command-level orchestration is used without direct calls between agents