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,23 +1,30 @@
1
1
  ---
2
2
  name: alfred:1-plan
3
- description: Planning (brainstorming, plan writing, design discussion) + Branch/PR creation
4
- argument-hint: "Title 1 Title 2 ... | SPEC-ID modifications"
3
+ description: "Define specifications and create development branch"
4
+ argument-hint: Title 1 Title 2 ... | SPEC-ID modifications
5
5
  allowed-tools:
6
- - Read
7
- - Write
8
- - Edit
9
- - MultiEdit
10
- - Grep
11
- - Glob
12
- - TodoWrite
13
- - Bash(git:*)
14
- - Bash(gh:*)
15
- - Bash(rg:*)
16
- - Bash(mkdir:*)
6
+ - Read
7
+ - Write
8
+ - Edit
9
+ - MultiEdit
10
+ - Grep
11
+ - Glob
12
+ - TodoWrite
13
+ - Bash(git:*)
14
+ - Bash(gh:*)
15
+ - Bash(rg:*)
16
+ - Bash(mkdir:*)
17
17
  ---
18
18
 
19
19
  # 🏗️ MoAI-ADK Step 1: Establish a plan (Plan) - Always make a plan first and then proceed.
20
- > Interactive prompts rely on `Skill("moai-alfred-tui-survey")` so AskUserQuestion renders TUI selection menus for user surveys and approvals.
20
+
21
+ > **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.
22
+ >
23
+ > **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.
24
+
25
+ <!-- @CODE:ALF-WORKFLOW-001:CMD-PLAN -->
26
+
27
+ **4-Step Workflow Integration**: This command implements Steps 1-2 of Alfred's workflow (Intent Understanding → Plan Creation). See CLAUDE.md for full workflow details.
21
28
 
22
29
  ## 🎯 Command Purpose
23
30
 
@@ -25,9 +32,25 @@ allowed-tools:
25
32
 
26
33
  **Plan for**: $ARGUMENTS
27
34
 
28
- ## 💡 Planning philosophy: “Always make a plan first and then proceed.”
35
+ ## 🤖 CodeRabbit AI Integration (Local Only)
36
+
37
+ This local environment includes CodeRabbit AI review integration for SPEC documents:
38
+
39
+ **Automatic workflows:**
40
+ - ✅ SPEC review: CodeRabbit analyzes SPEC metadata and EARS structure
41
+ - ✅ GitHub Issue sync: SPEC files automatically create/update GitHub Issues
42
+ - ✅ Auto-approval: Draft PRs are approved when quality meets standards (80%+)
43
+ - ✅ SPEC quality validation: Checklist for metadata, structure, and content
29
44
 
30
- `/alfred:1-plan` is a general-purpose command that **creates a plan**, rather than simply “creating” a SPEC document.
45
+ **Scope:**
46
+ - 🏠 **Local environment**: Full CodeRabbit integration with auto-approval
47
+ - 📦 **Published packages**: Users get GitHub Issue sync only (no CodeRabbit)
48
+
49
+ > See `.coderabbit.yaml` for detailed review rules and SPEC validation checklist
50
+
51
+ ## 💡 Planning philosophy: "Always make a plan first and then proceed."
52
+
53
+ `/alfred:1-plan` is a general-purpose command that **creates a plan**, rather than simply "creating" a SPEC document.
31
54
 
32
55
  ### 3 main scenarios
33
56
 
@@ -58,516 +81,777 @@ allowed-tools:
58
81
 
59
82
  > **Standard two-step workflow** (see `CLAUDE.md` - "Alfred Command Execution Pattern" for details)
60
83
 
61
- ## 📋 Execution flow
84
+ ## 📋 Your Task
85
+
86
+ You are executing the `/alfred:1-plan` command. Your job is to analyze the user's request and create a SPEC document following the EARS (Event-Action-Response-State) structure.
62
87
 
63
- 1. **Project Analysis**: In-depth analysis of product/structure/tech.md
64
- 2. **SPEC candidate discovery**: Prioritization based on business requirements
65
- 3. **User Verification**: Review and approve writing plan
66
- 4. **Plan creation**: Generate specifications of EARS structure (spec.md, plan.md, acceptance.md)
67
- 5. **Git operations**: Create branches/PRs via git-manager
88
+ The command has **THREE execution phases**:
89
+
90
+ 1. **PHASE 1**: Project Analysis & SPEC Planning (STEP 1)
91
+ 2. **PHASE 2**: SPEC Document Creation (STEP 2)
92
+ 3. **PHASE 3**: Git Branch & PR Setup (STEP 2 continuation)
93
+
94
+ Each phase contains explicit step-by-step instructions.
95
+
96
+ ---
97
+
98
+ ## 🔍 PHASE 1: Project Analysis & SPEC Planning (STEP 1)
99
+
100
+ PHASE 1 consists of **two independent sub-phases** to provide flexible workflow based on user request clarity:
101
+
102
+ ### 📋 PHASE 1 Workflow Overview
103
+
104
+ ```
105
+ ┌─────────────────────────────────────────────────────────────┐
106
+ │ PHASE 1: Project Analysis & SPEC Planning │
107
+ ├─────────────────────────────────────────────────────────────┤
108
+ │ │
109
+ │ Phase A (OPTIONAL) │
110
+ │ ┌─────────────────────────────────────────┐ │
111
+ │ │ 🔍 Explore Agent │ │
112
+ │ │ • Find relevant files by keywords │ │
113
+ │ │ • Locate existing SPEC documents │ │
114
+ │ │ • Identify implementation patterns │ │
115
+ │ └─────────────────────────────────────────┘ │
116
+ │ ↓ │
117
+ │ (exploration results) │
118
+ │ ↓ │
119
+ │ Phase B (REQUIRED) │
120
+ │ ┌─────────────────────────────────────────┐ │
121
+ │ │ ⚙️ spec-builder Agent │ │
122
+ │ │ • Analyze project documents │ │
123
+ │ │ • Propose SPEC candidates │ │
124
+ │ │ • Design EARS structure │ │
125
+ │ │ • Request user approval │ │
126
+ │ └─────────────────────────────────────────┘ │
127
+ │ ↓ │
128
+ │ (user approval via AskUserQuestion) │
129
+ │ ↓ │
130
+ │ PROCEED TO PHASE 2 │
131
+ └─────────────────────────────────────────────────────────────┘
132
+ ```
68
133
 
69
- ## 🧠 Associated Skills & Agents
134
+ **Key Points**:
135
+ - **Phase A is optional** - Skip if user provides clear SPEC title
136
+ - **Phase B is required** - Always runs to analyze project and create SPEC
137
+ - **Results flow forward** - Exploration results (if any) are passed to spec-builder
70
138
 
71
- | Agent | Core Skill | Purpose |
72
- | ----- | -------- | ------- |
73
- | spec-builder | `moai-foundation-ears` | Write SPEC with EARS syntax |
74
- | git-manager | `moai-alfred-git-workflow` | Create branch and PR |
139
+ ---
75
140
 
76
- **Note**: TUI Survey Skill is used for user confirmations during the plan phase and is shared across all interactive prompts.
141
+ ### 🔍 Phase A: Codebase Exploration (OPTIONAL)
77
142
 
78
- ## 🔗 Associated Agent
143
+ **When to execute Phase A:**
79
144
 
80
- - **Primary**: spec-builder (🏗️ System Architect) - Dedicated to writing SPEC documents
81
- - **Secondary**: git-manager (🚀 Release Engineer) - Dedicated to creating Git branches/PRs
145
+ You should execute Phase A ONLY IF the user's request meets one of these criteria:
82
146
 
83
- ## 💡 Example of use
147
+ - User uses vague keywords ("where is...", "find me...", "related to...")
148
+ - ✅ Need to understand existing code structure before planning
149
+ - ✅ Feature spans multiple files or modules
150
+ - ❌ User provides clear SPEC title (skip to Phase B immediately)
84
151
 
85
- Users can run commands like this:
86
- - `/alfred:1-plan` - Auto-suggestion based on project documents
87
- - `/alfred:1-plan "JWT authentication system"` - Manually create a single SPEC
88
- - `/alfred:1-plan SPEC-001 "Security hardening"` - Supplementation of existing SPEC
152
+ **Decision rule**: If user typed a clear SPEC title (e.g., "JWT authentication system"), skip Phase A and proceed directly to Phase B.
89
153
 
90
- ## 🔍 STEP 1: Project analysis and planning
154
+ #### How to execute Phase A:
91
155
 
92
- Analyze project documents to propose SPEC candidates, establish implementation strategies, and receive user confirmation.
156
+ **Step 1**: Determine IF you need exploration
93
157
 
94
- **The spec-builder agent automatically loads and analyzes the required documents.**
158
+ 1. Read the user's `$ARGUMENTS` input
159
+ 2. Check if the input contains vague keywords:
160
+ - "where is..."
161
+ - "find me..."
162
+ - "related to..."
163
+ - "somewhere..."
164
+ - "I think there's..."
165
+ 3. IF the input is vague → proceed to Step 2
166
+ 4. IF the input is clear → skip to Phase B
95
167
 
96
- ### 🔍 Explore the codebase (optional)
168
+ **Step 2**: Invoke the Explore agent
97
169
 
98
- **If the user request is unclear or requires understanding of existing code** Use the Explore agent first:
170
+ Use the Task tool to call the Explore agent:
99
171
 
100
172
  ```
101
- Invoking the Task tool (Explore agent):
173
+ Tool: Task
174
+ Parameters:
102
175
  - subagent_type: "Explore"
103
176
  - description: "Explore related files in the codebase"
104
- - prompt: "Please find all files related to the following keywords: $ARGUMENTS
105
- - File location (src/, tests/, docs/)
106
- - Relevant SPEC document (.moai/specs/)
107
- - Existing implementation code
108
- thoroughness level: medium"
177
+ - prompt: "다음 키워드와 관련된 모든 파일을 찾아주세요: $ARGUMENTS
178
+ - 파일 위치 (src/, tests/, docs/)
179
+ - 관련 SPEC 문서 (.moai/specs/)
180
+ - 기존 구현 코드
181
+ 상세도 수준: medium"
109
182
  ```
110
183
 
111
- **Criteria for using the Explore Agent**:
112
- - ✅ Users use keywords like “where am”, “find me”, etc.
113
- - Need to understand existing code structure
114
- - Investigate features across multiple files
115
- - Given a clear SPEC title (straight into spec-builder)
184
+ **Step 3**: Wait for exploration results
185
+
186
+ 1. The Explore agent will search the codebase
187
+ 2. It will return a list of relevant files and locations
188
+ 3. Store these results in a variable called `$EXPLORE_RESULTS`
189
+ 4. Proceed to Phase B with this variable
190
+
191
+ ---
116
192
 
117
- ### ⚙️ How to call an agent
193
+ ### ⚙️ Phase B: SPEC Planning (REQUIRED)
118
194
 
119
- **STEP 1 calls the spec-builder agent using the Task tool**:
195
+ **This phase ALWAYS runs** regardless of whether Phase A was executed.
196
+
197
+ Your task is to analyze the project documents and propose SPEC candidates to the user.
198
+
199
+ #### Step 1: Invoke the spec-builder agent
200
+
201
+ Use the Task tool to call the spec-builder agent:
120
202
 
121
203
  ```
122
- Call the Task tool:
204
+ Tool: Task
205
+ Parameters:
123
206
  - subagent_type: "spec-builder"
124
207
  - description: "Analyze the plan and establish a plan"
125
- - prompt: "Please analyze the project document and suggest SPEC candidates.
126
- Run in analysis mode, and must include the following:
127
- 1. In-depth analysis of product/structure/tech.md
128
- 2. Identify SPEC candidates and Determine priorities
129
- 3. Design EARS structure
130
- 4. Wait for user approval
131
- User input: $ARGUMENTS
132
- (Optional) Explore results: $EXPLORE_RESULTS"
208
+ - prompt: """당신은 spec-builder 에이전트입니다.
209
+
210
+ 언어 설정:
211
+ - 대화_언어: {{CONVERSATION_LANGUAGE}}
212
+ - 언어명: {{CONVERSATION_LANGUAGE_NAME}}
213
+
214
+ 중요 지시사항:
215
+ SPEC 문서는 이중 언어 구조를 따라야 합니다 (사용자 언어 + 영어 요약):
216
+
217
+ conversation_language == 'ko' (한국어)인 경우:
218
+ - YAML 메타데이터: 영어만 사용
219
+ - 제목 (@SPEC 태그): 한국어 주요, 영어 버전은 하단에 기재
220
+ - 주요 내용 (분석, 요구사항, EARS): 한국어
221
+ - SUMMARY 섹션: 영어 (국제 기여자를 위해 100-200단어)
222
+ - HISTORY: 한국어 (새로운 항목), 주요 버전에는 영어 요약
223
+
224
+ conversation_language == 'ja' (일본어)인 경우:
225
+ - 한국어와 동일한 이중 언어 패턴 사용
226
+ - 주요 내용: 일본어
227
+ - SUMMARY: 영어
228
+
229
+ 다른 언어인 경우:
230
+ - 주요 내용: 사용자 지정 언어
231
+ - SUMMARY: 영어 (항상)
232
+
233
+ 스킬 호출:
234
+ 필요 시 명시적 Skill() 호출 사용:
235
+ - Skill("moai-foundation-specs") - SPEC 구조 가이드
236
+ - Skill("moai-foundation-ears") - EARS 문법 요구사항
237
+ - Skill("moai-alfred-spec-metadata-validation") - 메타데이터 검증
238
+
239
+ 작업:
240
+ 프로젝트 문서를 분석하여 SPEC 후보자를 제시해주세요.
241
+ 분석 모드로 실행하며, 다음을 포함해야 합니다:
242
+ 1. product/structure/tech.md의 심층 분석
243
+ 2. SPEC 후보자 식별 및 우선순위 결정
244
+ 3. EARS 구조 설계
245
+ 4. 사용자 승인 대기
246
+
247
+ 사용자 입력: $ARGUMENTS
248
+ (선택사항) 탐색 결과: $EXPLORE_RESULTS"""
133
249
  ```
134
250
 
135
- ### Plan analysis progress
136
-
137
- 1. **Project document analysis**
138
- - In-depth analysis of product/structure/tech.md
139
- - Review existing SPEC list and priorities (.moai/specs/ scan)
140
- - Evaluate implementation feasibility and complexity
141
- - (Optional) Identify existing code structure by reflecting the Explore results
251
+ **Important**: IF Phase A was executed, include the `$EXPLORE_RESULTS` variable in the prompt. IF Phase A was skipped, omit the last line.
142
252
 
143
- 2. **Discovering SPEC candidates**
144
- - Extracting core business requirements
145
- - Reflecting technical constraints
146
- - Creating a list of SPEC candidates by priority
253
+ #### Step 2: Wait for spec-builder analysis
147
254
 
148
- 3. **Implementation plan report**
149
- - Present step-by-step plan creation plan
150
- - Estimated scope of work and dependency analysis
151
- - Design EARS structure and Acceptance Criteria
255
+ The spec-builder agent will:
152
256
 
153
- ### User verification steps
257
+ 1. **Read project documents**:
258
+ - `.moai/project/product.md` (business requirements)
259
+ - `.moai/project/structure.md` (architecture constraints)
260
+ - `.moai/project/tech.md` (technical stack and policies)
154
261
 
155
- After reviewing your implementation plan, Alfred invokes `Skill("moai-alfred-tui-survey")` to present the following options:
156
- - **"Go"** or **"Start"**: Start writing the plan as planned
157
- - **"Modify [Content]"**: Request modifications to the plan
158
- - **"Stop"**: Stop writing the plan
262
+ 2. **Scan existing SPECs**:
263
+ - List all directories in `.moai/specs/`
264
+ - Check for existing SPEC IDs to prevent duplicates
265
+ - Identify current priorities and gaps
159
266
 
160
- ---
267
+ 3. **Evaluate feasibility**:
268
+ - Implementation complexity
269
+ - Dependencies on other SPECs
270
+ - Technical constraints
271
+ - Resource requirements
161
272
 
162
- ## 🚀 STEP 2: Create plan document (after user approval)
273
+ 4. **Propose SPEC candidates**:
274
+ - Extract core business requirements
275
+ - Reflect technical constraints
276
+ - Create prioritized list of SPEC candidates
163
277
 
164
- After user approval (collected via `Skill("moai-alfred-tui-survey")`), call the spec-builder and git-manager agents using the **Task tool**.
278
+ 5. **Present implementation plan report**:
165
279
 
166
- ### ⚙️ How to call an agent
280
+ The spec-builder will generate a report in this format:
167
281
 
168
282
  ```
169
- 1. Call spec-builder (create plan):
170
- - subagent_type: "spec-builder"
171
- - description: "Create SPEC document"
172
- - prompt: "Please fill out the SPEC document according to the plan approved in STEP 1.
173
- Create a specification for the EARS structure."
283
+ ## Plan Creation Plan Report: [TARGET]
284
+
285
+ ### Analysis Results
286
+ - **Discovered SPEC Candidates**: [Number and Category]
287
+ - **High Priority**: [List of Core SPECs]
288
+ - **Estimated Work Time**: [Time Estimation]
289
+
290
+ ### Writing Strategy
291
+ - **Selected SPEC**: [SPEC ID and Title to Write]
292
+ - **EARS Structure**: [Event-Action-Response-State Design]
293
+ - **Acceptance Criteria**: [Given-When-Then Scenario]
294
+
295
+ ### Technology stack and library versions (optional)
296
+ **Included only if technology stack is determined during planning stage**:
297
+ - **Web search**: Use `WebSearch` to find the latest stable versions of key libraries to use
298
+ - **Specify versions**: Specify exact versions for each library, e.g. `fastapi>=0.118.3`)
299
+ - **Stability priority**: Exclude beta/alpha versions, select only production stable versions
300
+ - **Note**: Detailed version is finalized in `/alfred:2-run` stage
301
+
302
+ ### Precautions
303
+ - **Technical constraints**: [Restraints to consider]
304
+ - **Dependency**: [Relevance with other SPECs]
305
+ - **Branch strategy**: [Processing by Personal/Team mode]
174
306
 
175
- 2. Invoke git-manager (Git task):
176
- - subagent_type: "git-manager"
177
- - description: "Create Git branch/PR"
178
- - prompt: "After completing the plan, please create a branch and Draft PR."
307
+ ### Expected deliverables
308
+ - **spec.md**: [Core specifications of the EARS structure]
309
+ - **plan.md**: [Implementation plan]
310
+ - **acceptance.md**: [Acceptance criteria]
311
+ - **Branches/PR**: [Git operations by mode]
179
312
  ```
180
313
 
181
- ## function
314
+ #### Step 3: Request user approval
315
+
316
+ After the spec-builder presents the implementation plan report, you MUST ask the user for explicit approval before proceeding to PHASE 2.
317
+
318
+ **Ask the user this question**:
182
319
 
183
- - **Project document analysis**: Analyzes `.moai/project/{product,structure,tech}.md` to suggest implementation candidates and generates SPEC after user approval.
184
- - **Personal mode**: Create a `.moai/specs/SPEC-{ID}/` directory and a template document (**Directory name format required**: `SPEC-` prefix + TAG ID).
185
- - **Team mode**: Create a GitHub Issue (or Discussion) Associate it with a branch template.
320
+ "Plan development is complete. Would you like to proceed with SPEC creation based on this plan?"
186
321
 
187
- ## How to use
322
+ **Present these options**:
188
323
 
189
- The user executes the command in the form:
190
- - `/alfred:1-plan` - Auto-suggestion based on project documents (recommended)
191
- - `/alfred:1-plan "JWT Authentication System"` - Manually create a single SPEC
192
- - `/alfred:1-plan SPEC-001 "Security Reinforcement"` - Supplementation of existing SPEC
324
+ 1. **Proceed with SPEC Creation** - Create SPEC files in `.moai/specs/SPEC-{ID}/` based on approved plan
325
+ 2. **Request Modifications** - Specify changes to the plan before SPEC creation
326
+ 3. **Save as Draft** - Save plan as draft without creating SPEC files yet
327
+ 4. **Cancel** - Discard plan and return to planning phase
193
328
 
194
- If not entered, 3 to 5 priorities will be suggested based on the Q&A results, and only the approved items will be confirmed as actual SPECs.
329
+ **Wait for the user to answer**.
195
330
 
196
- ## Summary of processing by mode
331
+ #### Step 4: Process user's answer
197
332
 
198
- | mode | output | Branch Strategy | Additional Actions |
199
- | -------- | -------------------------------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- |
200
- | Personal | Templates `.moai/specs/SPEC-XXX/spec.md`, `plan.md`, `acceptance.md`, etc. | Branch from `main` or `develop` (based on settings) | git-manager agent automatically creates checkpoints |
201
- | Team | GitHub Issue (`[SPEC-XXX] Title`), Draft PR (optional) | **Always branch from `develop`** (GitFlow standard) | `gh` CLI stay logged in, Draft PR → develop created |
333
+ Based on the user's choice:
202
334
 
203
- ## Input options
335
+ **IF user selected "Proceed with SPEC Creation"**:
336
+ 1. Store approval confirmation
337
+ 2. Proceed to PHASE 2 (SPEC Document Creation)
204
338
 
205
- - **Automatic suggestion**: `/alfred:1-plan` Create a list of candidates based on the core bullet of the project document
206
- - **Manual creation**: Pass the title as an argument Create only 1 case, Acceptance template is supplemented after reply
207
- - **Supplementation mode**: `SPEC-ID Delivered in “memo” format → Update existing SPEC document/Issue
339
+ **IF user selected "Request Modifications"**:
340
+ 1. Ask the user: "What changes would you like to make to the plan?"
341
+ 2. Wait for user's feedback
342
+ 3. Pass feedback to spec-builder agent
343
+ 4. spec-builder updates the plan
344
+ 5. Return to Step 3 (request approval again with updated plan)
208
345
 
209
- ## 📋 STEP 1 Execution Guide: Project Analysis and Planning
346
+ **IF user selected "Save as Draft"**:
347
+ 1. Create directory: `.moai/specs/SPEC-{ID}/`
348
+ 2. Save plan to `.moai/specs/SPEC-{ID}/plan.md` with status: draft
349
+ 3. Create commit: `draft(spec): WIP SPEC-{ID} - {title}`
350
+ 4. Print to user: "Draft saved. Resume with: `/alfred:1-plan resume SPEC-{ID}`"
351
+ 5. End command execution (stop here)
210
352
 
211
- ### ⚠️ Essential rules: Directory naming convention
353
+ **IF user selected "Cancel"**:
354
+ 1. Print to user: "Plan discarded. No files created."
355
+ 2. End command execution (stop here)
212
356
 
213
- **Format that must be followed**: `.moai/specs/SPEC-{ID}/`
357
+ ---
358
+
359
+ ## 🚀 PHASE 2: SPEC Document Creation (STEP 2 - After Approval)
360
+
361
+ This phase ONLY executes IF the user selected "Proceed with SPEC Creation" in Phase B Step 4.
362
+
363
+ Your task is to create the SPEC document files in the correct directory structure.
364
+
365
+ ### ⚠️ Critical Rule: Directory Naming Convention
214
366
 
215
- **Correct Example**:
367
+ **Format that MUST be followed**: `.moai/specs/SPEC-{ID}/`
368
+
369
+ **Correct Examples**:
216
370
  - ✅ `SPEC-AUTH-001/`
217
371
  - ✅ `SPEC-REFACTOR-001/`
218
372
  - ✅ `SPEC-UPDATE-REFACTOR-001/`
219
373
 
220
- **Incorrect example**:
374
+ **Incorrect examples**:
221
375
  - ❌ `AUTH-001/` (missing SPEC- prefix)
222
376
  - ❌ `SPEC-001-auth/` (additional text after ID)
223
377
  - ❌ `SPEC-AUTH-001-jwt/` (additional text after ID)
224
378
 
225
- **Duplicate check required**: Before creating a new SPEC ID, be sure to search the existing TAG ID to prevent duplication.
379
+ **Duplicate check required**: Before creating a new SPEC ID, search existing TAG IDs to prevent duplication:
380
+
381
+ ```bash
382
+ rg "@SPEC:{ID}" -n .moai/specs/
383
+ ```
226
384
 
227
385
  **Composite Domain Rules**:
228
386
  - ✅ Allow: `UPDATE-REFACTOR-001` (2 domains)
229
387
  - ⚠️ Caution: `UPDATE-REFACTOR-FIX-001` (3+ domains, simplification recommended)
230
388
 
231
- ---
389
+ ### Step 1: Invoke spec-builder for SPEC creation
232
390
 
233
- ### 1. Analysis of project documents
391
+ Use the Task tool to call the spec-builder agent:
234
392
 
235
- Alfred calls the spec-builder agent to perform project document-based planning analysis and planning.
393
+ ```
394
+ Tool: Task
395
+ Parameters:
396
+ - subagent_type: "spec-builder"
397
+ - description: "Create SPEC document"
398
+ - prompt: """당신은 spec-builder 에이전트입니다.
399
+
400
+ 언어 설정:
401
+ - 대화_언어: {{CONVERSATION_LANGUAGE}}
402
+ - 언어명: {{CONVERSATION_LANGUAGE_NAME}}
403
+
404
+ 중요 지시사항:
405
+ 모든 SPEC 문서는 대화_언어로 작성되어야 합니다:
406
+ - spec.md: 전체 문서를 대화_언어로 작성
407
+ - plan.md: 전체 문서를 대화_언어로 작성
408
+ - acceptance.md: 전체 문서를 대화_언어로 작성
409
+
410
+ YAML 프론트매터와 @TAG 식별자는 반드시 영어로 유지합니다.
411
+ 코드 예제와 기술 키워드는 혼합 가능 (코드는 영어, 설명은 사용자 언어).
412
+
413
+ 스킬 호출:
414
+ 필요 시 명시적 Skill() 호출 사용:
415
+ - Skill("moai-foundation-specs") - SPEC 구조 가이드
416
+ - Skill("moai-foundation-ears") - EARS 문법 요구사항
417
+ - Skill("moai-alfred-spec-metadata-validation") - 메타데이터 검증
418
+ - Skill("moai-alfred-tag-scanning") - TAG 체인 참조
419
+
420
+ 작업:
421
+ STEP 1에서 승인된 계획에 따라 SPEC 문서를 작성해주세요.
422
+ EARS 구조에 대한 명세를 작성합니다."""
423
+ ```
236
424
 
237
- #### Analysis Checklist
425
+ ### Step 2: Wait for spec-builder to create files
426
+
427
+ The spec-builder agent will:
428
+
429
+ 1. **Create directory structure**:
430
+ ```bash
431
+ mkdir -p .moai/specs/SPEC-{ID}/
432
+ ```
433
+
434
+ 2. **Create spec.md** (main SPEC document):
435
+
436
+ **YAML Front Matter** (top of file):
437
+ ```yaml
438
+ ---
439
+ id: AUTH-001
440
+ version: 0.0.1
441
+ status: draft
442
+ created: 2025-09-15
443
+ updated: 2025-09-15
444
+ author: @Goos
445
+ priority: high
446
+ ---
447
+ ```
448
+
449
+ **Required fields**:
450
+ - `id`: Same as TAG ID (`<domain>-<3 digits>`) - Never change after creation
451
+ - `version`: v0.0.1 (INITIAL) → v0.1.0 (Implementation Completed) → v1.0.0 (Stable)
452
+ - `status`: draft | in_progress | completed | deprecated
453
+ - `created`: YYYY-MM-DD
454
+ - `updated`: YYYY-MM-DD
455
+ - `author`: GitHub @ prefix + ID (e.g. `@Goos`)
456
+ - `priority`: critical | high | medium | low
457
+
458
+ **Optional fields** (9 total):
459
+ - `category`: Feature type
460
+ - `labels`: Tags for grouping
461
+ - `depends_on`: List of SPEC IDs this depends on
462
+ - `blocks`: List of SPEC IDs blocked by this
463
+ - `related_specs`: List of related SPEC IDs
464
+ - `related_issue`: GitHub Issue number
465
+ - `scope`: Implementation scope estimate
466
+
467
+ **HISTORY section** (immediately after YAML):
468
+ ```markdown
469
+ # @SPEC:DOMAIN-NNN: [SPEC title]
470
+
471
+ ## HISTORY
472
+
473
+ ### v0.0.1 (2025-09-15)
474
+ - **INITIAL**: Initial creation of [feature name] specification
475
+ - **AUTHOR**: @Goos
476
+ - **SCOPE**: [Brief scope description]
477
+ - **CONTEXT**: [Why this SPEC was created]
478
+ ```
479
+
480
+ **EARS Requirements sections**:
481
+ ```markdown
482
+ ## Requirements
483
+
484
+ ### Ubiquitous
485
+ - The system must provide [feature]
486
+
487
+ ### Event-driven (event-driven)
488
+ - WHEN [condition], the system must [operate]
489
+
490
+ ### State-driven
491
+ - WHILE When in [state], the system must [operate]
492
+
493
+ ### Optional (Optional function)
494
+ - If WHERE [condition], the system can [operate]
495
+
496
+ ### Unwanted Behaviors
497
+ - IF [condition], the system must [respond appropriately with error handling or quality gates]
498
+ ```
499
+
500
+ **Traceability section**:
501
+ ```markdown
502
+ ## Traceability (@TAG)
503
+ - **SPEC**: @SPEC:DOMAIN-NNN
504
+ - **TEST**: tests/[domain]/test_[feature].py
505
+ - **CODE**: src/[domain]/[feature].py
506
+ - **DOC**: docs/[domain]/[feature].md
507
+ ```
508
+
509
+ 3. **Create plan.md** (implementation plan):
510
+ - Step-by-step implementation roadmap
511
+ - Technical approach
512
+ - Resource requirements
513
+ - Timeline estimates
514
+
515
+ 4. **Create acceptance.md** (acceptance criteria):
516
+ - Given-When-Then scenarios
517
+ - Test cases
518
+ - Success criteria
519
+
520
+ ### Step 3: Verify SPEC files were created
521
+
522
+ After spec-builder completes:
523
+
524
+ 1. Check that directory exists:
525
+ ```bash
526
+ ls -la .moai/specs/SPEC-{ID}/
527
+ ```
528
+
529
+ 2. Verify all 3 files exist:
530
+ - `spec.md`
531
+ - `plan.md`
532
+ - `acceptance.md`
533
+
534
+ 3. IF any file is missing:
535
+ - Print error: "SPEC file creation failed: missing {filename}"
536
+ - End command execution (stop here)
537
+
538
+ 4. IF all files exist:
539
+ - Proceed to PHASE 3
238
540
 
239
- - [ ] **Requirements extraction**: Identify key business requirements in product.md
240
- - [ ] **Architectural constraints**: Identify system design constraints in structure.md
241
- - [ ] **Technical constraints**: Technology stack and quality policy in tech.md
242
- - [ ] **Existing SPEC**: Review current SPEC list and priorities
541
+ ---
243
542
 
244
- ### 2. SPEC candidate discovery strategy
543
+ ## 🚀 PHASE 3: Git Setup based on spec_git_workflow (STEP 2 continuation)
245
544
 
246
- #### Prioritization criteria
545
+ This phase ONLY executes IF PHASE 2 completed successfully and all SPEC files were created.
247
546
 
248
- | Priority | standards | SPEC Candidate Type |
249
- | ---------- | --------------------------- | ------------------------------------------- |
250
- | **High** | Core Business Values ​​ | User core functions, API design |
251
- | **Medium** | System Stability | Authentication/Security, Data Management |
252
- | **Low** | Improvements and expansions | UI/UX improvement, performance optimization |
547
+ Your task is to handle Git operations based on the project's `spec_git_workflow` setting.
253
548
 
254
- #### Approach by SPEC type
549
+ ### Step 1: Check spec_git_workflow setting
255
550
 
256
- - **API/Backend**: Endpoint design, data model, authentication
257
- - **Frontend**: User interface, state management, routing
258
- - **Infrastructure**: Deployment, monitoring, security policy
259
- - **Quality**: Test strategy, performance criteria, documentation
551
+ First, read the current workflow configuration:
260
552
 
261
- ### 3. Create a plan Create a plan report
553
+ ```bash
554
+ # Check spec_git_workflow setting from .moai/config.json
555
+ spec_workflow=$(grep -o '"spec_git_workflow": "[^"]*"' .moai/config.json | cut -d'"' -f4)
556
+ echo "Current SPEC Git workflow: $spec_workflow"
557
+ ```
262
558
 
263
- Present your plan in the following format:
559
+ ### Step 2: Execute workflow-specific actions
264
560
 
265
- ```
266
- ## Plan Creation Plan Report: [TARGET]
561
+ **IF `spec_workflow` is "develop_direct":**
562
+ 1. Print: "✅ Direct commit mode: Staying on develop branch (feature branch creation skipped)"
563
+ 2. Skip feature branch creation
564
+ 3. Skip PR creation
565
+ 4. Proceed to completion message
267
566
 
268
- ### 📊 Analysis Results
269
- - **Discovered SPEC Candidates**: [Number and Category]
270
- - **High Priority**: [List of Core SPECs]
271
- - **Estimated Work Time**: [Time Estimation]
567
+ **IF `spec_workflow` is "feature_branch":**
568
+ 1. Proceed to Step 3: Create feature branch and PR
272
569
 
273
- ### 🎯 Writing Strategy
274
- - **Selected SPEC**: [SPEC ID and Title to Write]
275
- - **EARS Structure**: [Event-Action-Response-State Design]
276
- - **Acceptance Criteria**: [Given-When-Then Scenario]
570
+ **IF `spec_workflow` is "per_spec":**
571
+ 1. Ask user: "Which workflow do you want for this SPEC?"
572
+ - Options: ["Create feature branch + PR", "Direct commit to develop"]
573
+ 2. IF user chooses "Create feature branch + PR" → proceed to Step 3
574
+ 3. IF user chooses "Direct commit to develop" → skip branch creation
277
575
 
278
- ### 📦 Technology stack and library versions (optional)
279
- **Included only if technology stack is determined during planning stage**:
280
- - **Web search**: Use `WebSearch` to find the latest stable versions of key libraries to use
281
- - **Specify versions**: Specify exact versions for each library, e.g. `fastapi>=0.118.3`)
282
- - **Stability priority**: Exclude beta/alpha versions, select only production stable versions
283
- - **Note**: Detailed version is finalized in `/alfred:2-run` stage
576
+ ### Step 3: Create Git branch & PR (only for feature_branch workflow)
284
577
 
285
- ### ⚠️ Precautions
286
- - **Technical constraints**: [Restraints to consider]
287
- - **Dependency**: [Relevance with other SPECs]
288
- - **Branch strategy**: [Processing by Personal/Team mode]
578
+ **This step only executes if workflow requires feature branch creation**
289
579
 
290
- ### Expected deliverables
291
- - **spec.md**: [Core specifications of the EARS structure]
292
- - **plan.md**: [Implementation plan]
293
- - **acceptance.md**: [Acceptance criteria]
294
- - **Branches/PR**: [Git operations by mode]
580
+ Invoke git-manager agent:
581
+
582
+ Use the Task tool to call the git-manager agent:
295
583
 
296
- ---
297
- **Approval Request**: Would you like to proceed with creating a plan with the above plan?
298
- (Choose between “Proceed,” “Modify [Content],” or “Abort”)
584
+ ```
585
+ Tool: Task
586
+ Parameters:
587
+ - subagent_type: "git-manager"
588
+ - description: "Create Git branch/PR with duplicate prevention"
589
+ - prompt: """당신은 git-manager 에이전트입니다.
590
+
591
+ 언어 설정:
592
+ - 대화_언어: {{CONVERSATION_LANGUAGE}}
593
+ - 언어명: {{CONVERSATION_LANGUAGE_NAME}}
594
+
595
+ 중요 지시사항 (팀 모드 중복 방지):
596
+ GitHub Issue 또는 PR을 만들기 전에:
597
+ 1. 항상 제목에 SPEC-ID가 있는 기존 Issue를 확인하세요
598
+ 2. 항상 feature/SPEC-{ID} 브랜치명의 기존 PR을 확인하세요
599
+ 3. Issue가 존재하면 → 업데이트, 중복 생성 금지
600
+ 4. PR이 존재하면 → 업데이트, 중복 생성 금지
601
+ 5. 둘 다 존재하면 → 최신 SPEC 버전으로 모두 업데이트
602
+ 6. 레이블 필터 실패 시 대체 검색 사용 (일부 Issue는 레이블 없을 수 있음)
603
+ 7. 항상 레이블 추가: "spec", "planning", + 우선순위 레이블
604
+
605
+ git-manager.md의 "SPEC 작성 시" 섹션에서 자세한 중복 방지 프로토콜과 코드 예제를 참고하세요.
606
+
607
+ 작업:
608
+ 완성된 SPEC 문서에 대해 기능 브랜치(feature/SPEC-{SPEC_ID})와 Draft PR(→ develop)을 생성합니다.
609
+ GitHub 엔티티를 생성하기 전에 중복 방지 프로토콜을 구현합니다.
610
+
611
+ 출력 언어: {{CONVERSATION_LANGUAGE}}"""
299
612
  ```
300
613
 
301
- ---
614
+ ### Step 2: Wait for git-manager to complete
302
615
 
303
- ## 🚀 STEP 2 Implementation Guide: Create a Plan (After Approval)
616
+ The git-manager agent will:
304
617
 
305
- Only if the user selects **"Proceed"** or **"Start"** will Alfred call the spec-builder agent to begin building the SPEC document.
618
+ 1. **Check project mode** (Personal or Team):
619
+ - Read `.moai/config.json`
620
+ - Check `project.mode` field
621
+ - IF mode == "Personal" → create local branch only
622
+ - IF mode == "Team" → create branch + GitHub Issue + PR
306
623
 
307
- ### EARS specification writing guide
624
+ 2. **Create Git branch**:
308
625
 
309
- 1. **Event**: Define trigger events that occur in the system
310
- 2. **Action**: Specification of the system's action for an event
311
- 3. **Response**: Defining a response as a result of an action
312
- 4. **State**: Specifies system state changes and side effects
626
+ **Personal mode**:
627
+ - Branch from `main` or `develop` (based on `git_strategy.personal.branch_from` in config)
628
+ - Branch name: `feature/SPEC-{ID}`
629
+ - Example: `git checkout -b feature/SPEC-AUTH-001`
313
630
 
314
- **Example** (see `development-guide.md` for details):
315
- ```markdown
316
- ### Ubiquitous Requirements
317
- - The system must provide user authentication functionality
631
+ **Team mode** (CRITICAL - GitFlow enforcement):
632
+ - **ALWAYS branch from `develop`** (GitFlow standard)
633
+ - Branch name: `feature/SPEC-{ID}`
634
+ - Example: `git checkout -b feature/SPEC-AUTH-001 develop`
318
635
 
319
- ### Event-driven Requirements
320
- - WHEN the user logs in with valid credentials, the system must issue a JWT token
636
+ 3. **Create initial commit**:
637
+ ```bash
638
+ git add .moai/specs/SPEC-{ID}/
639
+ git commit -m "spec(SPEC-{ID}): Initial SPEC creation
321
640
 
322
- ### State-driven Requirements
323
- - When the WHILE token is in an unexpired state, the system must allow access to the protected resource.
641
+ 🤖 Generated with Claude Code
324
642
 
325
- ### Constraints
326
- - If the IF token has expired, the system must return a 401 Unauthorized response.
327
- ```
643
+ Co-Authored-By: 🎩 Alfred@MoAI"
644
+ ```
328
645
 
329
- ### 📄 SPEC Document Template
646
+ 4. **Push branch to remote** (Team mode only):
647
+ ```bash
648
+ git push -u origin feature/SPEC-{ID}
649
+ ```
330
650
 
331
- #### YAML Front Matter Schema
651
+ 5. **Create GitHub Issue** (Team mode only):
652
+ - Title: `[SPEC-{ID}] {SPEC title}`
653
+ - Body: Summary of SPEC content
654
+ - Labels: `spec`, `planning`, `{priority}`
655
+ - Check for duplicates BEFORE creating
656
+ - IF duplicate exists → update existing Issue
332
657
 
333
- > **📋 SPEC Metadata Standard (SSOT)**: `.moai/memory/spec-metadata.md`
658
+ 6. **Create Draft PR** (Team mode only):
659
+ - Source: `feature/SPEC-{ID}`
660
+ - Target: **ALWAYS `develop`** (GitFlow rule)
661
+ - Title: `[SPEC-{ID}] {SPEC title}`
662
+ - Body: Link to Issue + SPEC summary
663
+ - Status: Draft (not ready for review)
664
+ - Check for duplicates BEFORE creating
665
+ - IF duplicate exists → update existing PR
334
666
 
335
- **Metadata that must be included** at the top of the spec.md file:
336
- - **7 required fields**: id, version, status, created, updated, author, priority
337
- - **9 optional fields**: category, labels, depends_on, blocks, related_specs, related_issue, scope
667
+ ### Step 3: Verify Git operations completed
338
668
 
339
- **Simple reference example**:
340
- ```yaml
341
- ---
342
- id: AUTH-001
343
- version: 0.0.1
344
- status: draft
345
- created: 2025-09-15
346
- updated: 2025-09-15
347
- author: @Goos
348
- priority: high
349
- ---
350
- ```
669
+ After git-manager completes:
351
670
 
352
- **Core rules**:
353
- - **id**: Same as TAG ID (`<domain>-<3 digits>`) - Never change after creation
354
- - **Directory name**: `.moai/specs/SPEC-{ID}/` (e.g. `SPEC-AUTH-001/`)
355
- - **Duplicate Check**: `rg "@SPEC:{ID}" -n .moai/specs/` Required
356
- - **version**: v0.0.1 (INITIAL)v0.1.0 (Implementation Completed) → v1.0.0 (Stable)
357
- - **author**: GitHub @ prefix is required before ID (e.g. `@Goos`)
358
- - **priority**: critical | high | medium | low
671
+ 1. **Check branch was created**:
672
+ ```bash
673
+ git branch --list feature/SPEC-{ID}
674
+ ```
675
+ - IF branch existssuccess
676
+ - IF branch missing print error and stop
359
677
 
360
- **Full field description and validation methods**: see `.moai/memory/spec-metadata.md`
678
+ 2. **Personal mode verification**:
679
+ - Check local commit exists
680
+ - Print success message
361
681
 
362
- #### HISTORY section (required)
682
+ 3. **Team mode verification**:
683
+ - Check remote branch exists: `git ls-remote origin feature/SPEC-{ID}`
684
+ - Check GitHub Issue was created: `gh issue list --label spec`
685
+ - Check Draft PR was created: `gh pr list --state open --head feature/SPEC-{ID}`
686
+ - IF any verification fails → print error and stop
363
687
 
364
- You must include a HISTORY section **right after the YAML Front Matter**:
688
+ ### Step 4: CodeRabbit SPEC Review (Local Only - Automatic)
365
689
 
366
- ```markdown
367
- # @SPEC:AUTH-001: JWT-based authentication system
368
-
369
- ## HISTORY
370
-
371
- ### v0.0.1 (2025-09-15)
372
- - **INITIAL**: Initial creation of JWT-based authentication system specification
373
- - **AUTHOR**: @Goos
374
- - **SCOPE**: Token issuance, verification, and renewal logic
375
- - **CONTEXT**: Reflects requirements for strengthening user authentication
376
-
377
- ### v0.0.2 (2025-09-20)
378
- - **ADDED**: Added social login requirements (Draft modification)
379
- - **AUTHOR**: @Goos
380
- - **REVIEW**: @security-team (approved)
381
- - **CHANGES**:
382
- - OAuth2 integration requirements
383
- - Google/GitHub login support
384
-
385
- ### v0.1.0 (2025-10-01)
386
- - **IMPLEMENTATION COMPLETED**: TDD implementation completed (status: draft → completed)
387
- - **TDD CYCLE**: RED → GREEN → REFACTOR
388
- - **COMMITS**: [Implementation commit hash list]
389
- - **FILES**: [Created/modified file list]
390
- ```
690
+ **This step happens automatically in the background. You DO NOT need to execute anything.**
391
691
 
392
- **HISTORY writing rules**:
393
- - **Version system**: v0.0.1 (INITIAL) → v0.1.0 (implementation complete) → v1.0.0 (stabilization)
394
- - Detailed version system: See `.moai/memory/spec-metadata.md#version-system`
395
- - **Version order**: Latest version on top (reverse order)
396
- - **Change type tag**: INITIAL, ADDED, CHANGED, IMPLEMENTATION COMPLETED, BREAKING, DEPRECATED, REMOVED, FIXED
397
- - Detailed description: See `.moai/memory/spec-metadata.md#history-writing-guide`
398
- - **Required items**: Version, date, AUTHOR, changes
399
- - **Optional items**: REVIEW, SCOPE, CONTEXT, MIGRATION
692
+ After Draft PR is created, CodeRabbit automatically triggers SPEC review:
400
693
 
401
- #### SPEC document overall structure
694
+ **What CodeRabbit reviews**:
695
+ - ✅ YAML frontmatter validation (7 required fields)
696
+ - ✅ HISTORY section structure and completeness
697
+ - ✅ EARS requirements clarity (Ubiquitous/Event-driven/State-driven/Optional/Unwanted Behaviors)
698
+ - ✅ Acceptance criteria quality (Given-When-Then scenarios)
699
+ - ✅ @TAG system compliance (SPEC/TEST/CODE/DOC traceability)
700
+ - ✅ Documentation and formatting
701
+
702
+ **Expected timeline**: 1-2 minutes
703
+
704
+ **IF you are running in local environment**:
705
+ 1. Print to user: "🤖 CodeRabbit is reviewing SPEC PR (1-2 minutes)..."
706
+ 2. Print to user: "→ PR will be auto-approved if quality meets standards (80%+)"
707
+ 3. Print to user: "→ Check `.coderabbit.yaml` for detailed review checklist"
708
+
709
+ **IF you are running in published package**:
710
+ 1. Print to user: "✅ Draft PR created"
711
+ 2. Print to user: "→ Manual review required (CodeRabbit not available)"
402
712
 
403
- ```markdown
404
- ---
405
- id: AUTH-001
406
- version: 1.0.0
407
- status: draft
408
- created: 2025-09-15
409
- updated: 2025-09-15
410
- author: @username
411
713
  ---
412
714
 
413
- # @SPEC:AUTH-001: [SPEC title]
715
+ ## Command Completion & Next Steps
414
716
 
415
- ## HISTORY
416
- [Change history by version – see example above]
717
+ After PHASE 3 completes successfully, you MUST ask the user what to do next.
417
718
 
418
- ## Environment
419
- [System environment and prerequisites]
719
+ ### Ask the user this question:
420
720
 
421
- ## Assumptions
422
- [Design assumptions]
721
+ "SPEC creation is complete. What would you like to do next?"
423
722
 
424
- ## Requirements
425
- ### Ubiquitous
426
- - The system must provide [feature]
723
+ ### Present these options:
427
724
 
428
- ### Event-driven (event-driven)
429
- - WHEN [condition], the system must [operate]
725
+ 1. **Start Implementation** - Proceed to `/alfred:2-run SPEC-XXX` for TDD implementation
726
+ 2. **Review SPEC** - Review and modify SPEC documents before implementation
727
+ 3. **New Session** - Execute `/clear` for better context management (recommended)
728
+ 4. **Cancel** - Return to planning phase
430
729
 
431
- ### State-driven
432
- - WHILE When in [state], the system must [operate]
730
+ ### Wait for the user to answer
433
731
 
434
- ### Optional (Optional function)
435
- - If WHERE [condition], the system can [operate]
732
+ ### Process user's answer:
436
733
 
437
- ### Constraints
438
- - IF [condition], the system must be [constrained]
734
+ **IF user selected "Start Implementation"**:
735
+ 1. Print: "Starting TDD implementation workflow..."
736
+ 2. Print: "You can execute: `/alfred:2-run SPEC-XXX`"
737
+ 3. End command execution (user will manually run next command)
439
738
 
440
- ## Traceability (@TAG)
441
- - **SPEC**: @SPEC:AUTH-001
442
- - **TEST**: tests/auth/test_service.py
443
- - **CODE**: src/auth/service.py
444
- - **DOC**: docs/api/authentication.md
445
- ```
739
+ **IF user selected "Review SPEC"**:
740
+ 1. Print: "📁 SPEC files created in `.moai/specs/SPEC-XXX/`"
741
+ 2. Print: "Files: spec.md, plan.md, acceptance.md"
742
+ 3. Print: "After review, run: `/alfred:2-run SPEC-XXX`"
743
+ 4. End command execution
446
744
 
447
- ### Agent collaboration structure
745
+ **IF user selected "New Session"**:
746
+ 1. Print: "⏳ Clearing session for better context management..."
747
+ 2. Print: "Note: This improves performance for large projects"
748
+ 3. Print: "Next session: Run `/alfred:2-run SPEC-XXX`"
749
+ 4. End command execution (user will manually run /clear)
448
750
 
449
- - **Step 1**: The `spec-builder` agent is dedicated to analyzing project documents and creating SPEC documents.
450
- - **Step 2**: The `git-manager` agent is dedicated to branch creation and GitHub Issue/PR creation.
451
- - **Single Responsibility Principle**: spec-builder only writes plans, git-manager only performs Git/GitHub operations.
452
- - **Sequential execution**: Executes in the order spec-builder → git-manager to maintain clear dependencies.
453
- - **No inter-agent calls**: Each agent calls the other agents. It is not called directly, but is executed sequentially only at the command level.
751
+ **IF user selected "Cancel"**:
752
+ 1. Print: "Returning to planning phase..."
753
+ 2. Print: "SPEC files preserved for future use"
754
+ 3. Print: "Create more SPECs with: `/alfred:1-plan`"
755
+ 4. End command execution
454
756
 
455
- ## 🚀 Optimized workflow execution order
757
+ ---
456
758
 
457
- ### Phase 1: Parallel project analysis (performance optimization)
759
+ ## 📚 Reference Information
458
760
 
459
- **Perform simultaneously**:
761
+ The following sections provide reference information for understanding SPEC structure and requirements. **You do not need to memorize these - they are available when needed.**
460
762
 
461
- ```
462
- Task 1 (haiku): Scan project structure
463
- ├── Detect languages/frameworks
464
- ├── Collect list of existing SPECs
465
- └── Draft priority backlog
466
-
467
- Task 2 (sonnet): In-depth document analysis
468
- ├── product.md requirements extraction
469
- ├── structure.md architecture analysis
470
- └── tech.md technical constraints
471
- ```
763
+ ### EARS Specification Writing Guide
472
764
 
473
- **Performance improvements**: Parallelize basic scans and deep analysis to minimize latency
765
+ When creating SPEC requirements, follow the EARS (Event-Action-Response-State) structure:
766
+
767
+ 1. **Event**: Define trigger events that occur in the system
768
+ 2. **Action**: Specification of the system's action for an event
769
+ 3. **Response**: Defining a response as a result of an action
770
+ 4. **State**: Specifies system state changes and side effects
474
771
 
475
- ### Phase 2: Create SPEC document integration
772
+ **Example**:
773
+ ```markdown
774
+ ### Ubiquitous Requirements
775
+ - The system must provide user authentication functionality
476
776
 
477
- The `spec-builder` agent (sonnet) integrates the results of the parallel analysis:
777
+ ### Event-driven Requirements
778
+ - WHEN the user logs in with valid credentials, the system must issue a JWT token
478
779
 
479
- - Proposal of function candidates based on project document
480
- - Creation of SPEC document after user approval (using MultiEdit)
481
- - Simultaneous creation of 3 files (spec.md, plan.md, acceptance.md)
780
+ ### State-driven Requirements
781
+ - WHILE the token is in an unexpired state, the system must allow access to the protected resource
482
782
 
483
- ### Phase 3: Git task processing
783
+ ### Unwanted Behaviors
784
+ - IF the token has expired, the system must return a 401 Unauthorized response
785
+ ```
484
786
 
485
- Final processing by the `git-manager` agent (haiku):
787
+ For complete EARS syntax and examples, invoke: `Skill("moai-foundation-ears")`
486
788
 
487
- - **Branch creation**: Apply strategy for each mode
488
- - **Personal mode**: Branch from `main` or `develop` (based on project settings)
489
- - **Team mode**: **Always branch from `develop`** (GitFlow standard)
490
- - Branch name: `feature/SPEC-{ID}` format
491
- - **Create GitHub Issue**: Create SPEC Issue in Team mode
492
- - **Create Draft PR**: `feature/SPEC-{ID}` → `develop` in Team mode Create PR
493
- - **Initial Commit**: Commit SPEC document and create tags
789
+ ### SPEC Metadata Standard
494
790
 
495
- **Important**: Each agent runs independently, and direct calls between agents are prohibited.
791
+ For complete metadata field descriptions, validation rules, and version system guide, invoke: `Skill("moai-alfred-spec-metadata-validation")`
496
792
 
497
- ## Agent role separation
793
+ **Quick reference**:
794
+ - **7 required fields**: id, version, status, created, updated, author, priority
795
+ - **9 optional fields**: category, labels, depends_on, blocks, related_specs, related_issue, scope
498
796
 
499
- ### spec-builder dedicated area
797
+ ### Agent Role Separation
500
798
 
799
+ **spec-builder dedicated area**:
501
800
  - Analysis of project documents and discovery of SPEC candidates
502
801
  - Preparation of EARS structure specifications
503
802
  - Preparation of Acceptance Criteria (Given-When-Then)
504
803
  - Verification of SPEC document quality
505
804
  - Application of @TAG system
506
805
 
507
- ### git-manager dedicated area
508
-
806
+ **git-manager dedicated area**:
509
807
  - Create and manage all Git branches
510
- - **Apply branch strategy for each mode**
511
- - Personal: Branch from `main` or `develop`
512
- - Team: **Always branch from `develop`** (GitFlow)
513
- - Create GitHub Issue/PR
514
- - Team Mode: Create Draft PR (`feature/SPEC-{ID}` → `develop`)
808
+ - Apply branch strategy for each mode (Personal: branch from main/develop, Team: ALWAYS branch from develop)
809
+ - Create GitHub Issue/PR (Team Mode: Create Draft PR `feature/SPEC-{ID}` `develop`)
515
810
  - Create initial commit and tags
516
811
  - Handle remote synchronization
517
812
 
518
- ## Step 2 workflow execution sequence
519
-
520
- ### Phase 1: Analysis and planning phase
521
-
522
- **Plan Analyzer** does the following:
523
-
524
- 1. **Loading project document**: In-depth analysis of product/structure/tech.md
525
- 2. **SPEC candidate discovery**: Prioritization based on business requirements
526
- 3. **Establishment of implementation strategy**: EARS structure and acceptance design
527
- 4. **Creating a Writing Plan**: Presents a step-by-step approach to writing a plan
528
- 5. **Awaiting user approval**: Review plan and gather feedback
813
+ **Single Responsibility Principle**: spec-builder only writes plans, git-manager only performs Git/GitHub operations.
529
814
 
530
- ### Phase 2: Plan preparation phase (after approval)
815
+ **Sequential execution**: Executes in the order spec-builder → git-manager to maintain clear dependencies.
531
816
 
532
- The `spec-builder` agent **continuously** performs after user approval:
817
+ **No inter-agent calls**: Each agent does NOT call other agents directly. They are executed sequentially only at the command level.
533
818
 
534
- 1. **Writing EARS specification**: Event-Action-Response-State structuring
535
- 2. **Acceptance Criteria**: Given-When-Then Scenario Writing
536
- 3. **Document quality verification**: Apply TRUST principles and @TAG
537
- 4. **Template creation**: Simultaneous creation of spec.md, plan.md, acceptance.md
819
+ ### Context Management Strategy
538
820
 
539
- ### Phase 3: Git operations (git-manager)
821
+ **Load first**: `.moai/project/product.md` (business requirement)
540
822
 
541
- The `git-manager` agent does **all at once** after the SPEC is complete:
823
+ **Recommendation after completion**: The plan is complete. 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:2-run`).
542
824
 
543
- 1. **Create branch**: Apply branch strategy for each mode
544
- 2. **GitHub Issue**: Create SPEC Issue in Team mode
545
- 3. **Initial commit**: Commit SPEC document and create tags
546
- 4. **Remote Sync**: Apply synchronization strategy for each mode
825
+ For complete context engineering strategy, invoke: `Skill("moai-alfred-dev-guide")`
547
826
 
548
- ## Writing Tips
827
+ ### Writing Tips
549
828
 
550
- - Information that is not in the product/structure/tech document is supplemented by asking a new question.
551
- - Acceptance Criteria is encouraged to be written at least 2 times in 3 columns Given/When/Then.
552
- - The number of modules is reduced due to the relaxation of the Readable standard among the TRUST principles. If the recommended value (default 5) is exceeded, please include justification in the SPEC `context` section.
829
+ - Information that is not in the product/structure/tech document is supplemented by asking a new question
830
+ - Acceptance Criteria is encouraged to be written at least 2 times in 3 columns Given/When/Then
831
+ - The number of modules is reduced due to the relaxation of the Readable standard among the TRUST principles. If the recommended value (default 5) is exceeded, include justification in the SPEC `context` section
553
832
 
554
833
  ---
555
834
 
556
- ## 🧠 Context Management
835
+ ## 🎯 Summary: Your Execution Checklist
557
836
 
558
- > For more information: `.moai/memory/development-guide.md` - see section "Context Engineering"
837
+ Before you consider this command complete, verify:
559
838
 
560
- ### Core strategy of this command
839
+ - [ ] **PHASE 1 executed**: spec-builder analyzed project and proposed SPEC candidates
840
+ - [ ] **User approval obtained**: User explicitly approved SPEC creation (via AskUserQuestion)
841
+ - [ ] **PHASE 2 executed**: spec-builder created all 3 SPEC files (spec.md, plan.md, acceptance.md)
842
+ - [ ] **Directory naming correct**: `.moai/specs/SPEC-{ID}/` format followed
843
+ - [ ] **YAML frontmatter valid**: All 7 required fields present
844
+ - [ ] **HISTORY section present**: Immediately after YAML frontmatter
845
+ - [ ] **EARS structure complete**: All 5 requirement types included
846
+ - [ ] **PHASE 3 executed**: git-manager created branch and PR (if Team mode)
847
+ - [ ] **Branch naming correct**: `feature/SPEC-{ID}` format
848
+ - [ ] **GitFlow enforced**: PR targets `develop` branch (not `main`)
849
+ - [ ] **Next steps presented**: User asked what to do next (via AskUserQuestion)
561
850
 
562
- **Load first**: `.moai/project/product.md` (business requirement)
851
+ IF all checkboxes are checked → Command execution successful
563
852
 
564
- **Recommendation**: The plan is complete. 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:2-run`).
853
+ IF any checkbox is unchecked Identify missing step and complete it before ending
565
854
 
566
855
  ---
567
856
 
568
- ## Next steps
569
-
570
- **Recommendation**: For better performance and context management, start a new chat session with the `/clear` or `/new` command before proceeding to the next step.
571
-
572
- - Start implementing TDD with `/alfred:2-run SPEC-XXX`
573
- - Team mode: After creating an issue, the git-manager agent automatically creates a branch.
857
+ **End of command execution guide**