moai-adk 0.9.0__py3-none-any.whl → 0.15.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 (186) hide show
  1. moai_adk/cli/commands/init.py +14 -2
  2. moai_adk/cli/commands/update.py +214 -56
  3. moai_adk/core/issue_creator.py +2 -2
  4. moai_adk/core/project/detector.py +201 -12
  5. moai_adk/core/project/initializer.py +62 -1
  6. moai_adk/core/project/phase_executor.py +48 -6
  7. moai_adk/core/tags/ci_validator.py +34 -4
  8. moai_adk/core/tags/pre_commit_validator.py +40 -2
  9. moai_adk/core/tags/reporter.py +2 -3
  10. moai_adk/core/tags/validator.py +1 -1
  11. moai_adk/core/template_engine.py +20 -5
  12. moai_adk/templates/.claude/agents/alfred/backend-expert.md +319 -0
  13. moai_adk/templates/.claude/agents/alfred/devops-expert.md +464 -0
  14. moai_adk/templates/.claude/agents/alfred/doc-syncer.md +1 -1
  15. moai_adk/templates/.claude/agents/alfred/frontend-expert.md +357 -0
  16. moai_adk/templates/.claude/agents/alfred/git-manager.md +2 -2
  17. moai_adk/templates/.claude/agents/alfred/implementation-planner.md +76 -3
  18. moai_adk/templates/.claude/agents/alfred/project-manager.md +49 -10
  19. moai_adk/templates/.claude/agents/alfred/quality-gate.md +3 -3
  20. moai_adk/templates/.claude/agents/alfred/spec-builder.md +180 -41
  21. moai_adk/templates/.claude/agents/alfred/tag-agent.md +74 -0
  22. moai_adk/templates/.claude/agents/alfred/tdd-implementer.md +107 -5
  23. moai_adk/templates/.claude/agents/alfred/trust-checker.md +2 -2
  24. moai_adk/templates/.claude/agents/alfred/ui-ux-expert.md +571 -0
  25. moai_adk/templates/.claude/commands/alfred/0-project.md +928 -263
  26. moai_adk/templates/.claude/commands/alfred/1-plan.md +220 -68
  27. moai_adk/templates/.claude/commands/alfred/2-run.md +299 -51
  28. moai_adk/templates/.claude/commands/alfred/3-sync.md +452 -51
  29. moai_adk/templates/.claude/commands/alfred/9-feedback.md +1 -1
  30. moai_adk/templates/.claude/hooks/alfred/core/project.py +25 -27
  31. moai_adk/templates/.claude/hooks/alfred/core/timeout.py +136 -0
  32. moai_adk/templates/.claude/hooks/alfred/core/ttl_cache.py +108 -0
  33. moai_adk/templates/.claude/hooks/alfred/core/version_cache.py +4 -4
  34. moai_adk/templates/.claude/hooks/alfred/handlers/__init__.py +29 -0
  35. moai_adk/templates/.claude/hooks/alfred/post_tool__log_changes.py +11 -19
  36. moai_adk/templates/.claude/hooks/alfred/pre_tool__auto_checkpoint.py +11 -19
  37. moai_adk/templates/.claude/hooks/alfred/session_end__cleanup.py +11 -19
  38. moai_adk/templates/.claude/hooks/alfred/session_start__show_project_info.py +10 -18
  39. moai_adk/templates/.claude/hooks/alfred/shared/core/__init__.py +2 -2
  40. moai_adk/templates/.claude/hooks/alfred/shared/core/checkpoint.py +3 -3
  41. moai_adk/templates/.claude/hooks/alfred/shared/core/context.py +5 -5
  42. moai_adk/templates/.claude/hooks/alfred/shared/core/project.py +40 -41
  43. moai_adk/templates/.claude/hooks/alfred/shared/core/tags.py +55 -23
  44. moai_adk/templates/.claude/hooks/alfred/shared/core/version_cache.py +4 -4
  45. moai_adk/templates/.claude/hooks/alfred/shared/handlers/notification.py +132 -3
  46. moai_adk/templates/.claude/hooks/alfred/shared/handlers/session.py +9 -10
  47. moai_adk/templates/.claude/hooks/alfred/shared/handlers/tool.py +3 -6
  48. moai_adk/templates/.claude/hooks/alfred/shared/handlers/user.py +19 -0
  49. moai_adk/templates/.claude/hooks/alfred/user_prompt__jit_load_docs.py +14 -22
  50. moai_adk/templates/.claude/hooks/alfred/utils/__init__.py +1 -0
  51. moai_adk/templates/.claude/hooks/alfred/utils/timeout.py +161 -0
  52. moai_adk/templates/.claude/settings.json +5 -5
  53. moai_adk/templates/.claude/skills/moai-alfred-agent-guide/SKILL.md +70 -0
  54. moai_adk/templates/.claude/skills/moai-alfred-agent-guide/examples.md +62 -0
  55. moai_adk/templates/{.moai/memory/CLAUDE-AGENTS-GUIDE.md → .claude/skills/moai-alfred-agent-guide/reference.md} +34 -0
  56. moai_adk/templates/.claude/skills/moai-alfred-config-schema/SKILL.md +56 -0
  57. moai_adk/templates/.claude/skills/moai-alfred-config-schema/examples.md +28 -0
  58. moai_adk/templates/.claude/skills/moai-alfred-config-schema/reference.md +444 -0
  59. moai_adk/templates/.claude/skills/moai-alfred-context-budget/SKILL.md +62 -0
  60. moai_adk/templates/.claude/skills/moai-alfred-context-budget/examples.md +28 -0
  61. moai_adk/templates/.claude/skills/moai-alfred-context-budget/reference.md +405 -0
  62. moai_adk/templates/.claude/skills/moai-alfred-dev-guide/SKILL.md +51 -0
  63. moai_adk/templates/.claude/skills/moai-alfred-dev-guide/examples.md +355 -0
  64. moai_adk/templates/.claude/skills/moai-alfred-dev-guide/reference.md +239 -0
  65. moai_adk/templates/.claude/skills/moai-alfred-expertise-detection/SKILL.md +323 -0
  66. moai_adk/templates/.claude/skills/moai-alfred-expertise-detection/examples.md +286 -0
  67. moai_adk/templates/.claude/skills/moai-alfred-expertise-detection/reference.md +126 -0
  68. moai_adk/templates/.claude/skills/moai-alfred-gitflow-policy/SKILL.md +74 -0
  69. moai_adk/templates/.claude/skills/moai-alfred-gitflow-policy/examples.md +4 -0
  70. moai_adk/templates/.claude/skills/moai-alfred-gitflow-policy/reference.md +269 -0
  71. moai_adk/templates/.claude/skills/moai-alfred-issue-labels/SKILL.md +19 -0
  72. moai_adk/templates/.claude/skills/moai-alfred-issue-labels/examples.md +4 -0
  73. moai_adk/templates/.claude/skills/moai-alfred-persona-roles/SKILL.md +198 -0
  74. moai_adk/templates/.claude/skills/moai-alfred-persona-roles/examples.md +431 -0
  75. moai_adk/templates/.claude/skills/moai-alfred-persona-roles/reference.md +141 -0
  76. moai_adk/templates/.claude/skills/moai-alfred-practices/SKILL.md +89 -0
  77. moai_adk/templates/.claude/skills/moai-alfred-practices/examples.md +122 -0
  78. moai_adk/templates/.claude/skills/moai-alfred-proactive-suggestions/SKILL.md +508 -0
  79. moai_adk/templates/.claude/skills/moai-alfred-proactive-suggestions/examples.md +481 -0
  80. moai_adk/templates/.claude/skills/moai-alfred-proactive-suggestions/reference.md +100 -0
  81. moai_adk/templates/.claude/skills/moai-alfred-reporting/SKILL.md +273 -0
  82. moai_adk/templates/.claude/skills/moai-alfred-rules/SKILL.md +77 -0
  83. moai_adk/templates/.claude/skills/moai-alfred-rules/examples.md +265 -0
  84. moai_adk/templates/.claude/skills/moai-alfred-session-state/SKILL.md +19 -0
  85. moai_adk/templates/.claude/skills/moai-alfred-session-state/examples.md +4 -0
  86. moai_adk/templates/.claude/skills/moai-alfred-session-state/reference.md +84 -0
  87. moai_adk/templates/.claude/skills/{moai-spec-authoring → moai-alfred-spec-authoring}/SKILL.md +5 -5
  88. moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-extended/SKILL.md +115 -0
  89. moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-extended/examples.md +4 -0
  90. moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-extended/reference.md +348 -0
  91. moai_adk/templates/.claude/skills/moai-alfred-todowrite-pattern/SKILL.md +19 -0
  92. moai_adk/templates/.claude/skills/moai-alfred-todowrite-pattern/examples.md +4 -0
  93. moai_adk/templates/.claude/skills/moai-alfred-todowrite-pattern/reference.md +211 -0
  94. moai_adk/templates/.claude/skills/moai-alfred-workflow/SKILL.md +288 -0
  95. moai_adk/templates/.claude/skills/moai-cc-skill-descriptions/SKILL.md +19 -0
  96. moai_adk/templates/.claude/skills/moai-cc-skill-descriptions/examples.md +4 -0
  97. moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/SKILL.md +3 -3
  98. moai_adk/templates/.claude/skills/moai-design-systems/SKILL.md +802 -0
  99. moai_adk/templates/.claude/skills/moai-design-systems/examples.md +1238 -0
  100. moai_adk/templates/.claude/skills/moai-design-systems/reference.md +673 -0
  101. moai_adk/templates/.claude/skills/moai-domain-frontend/SKILL.md +17 -13
  102. moai_adk/templates/.claude/skills/moai-lang-go/SKILL.md +15 -12
  103. moai_adk/templates/.claude/skills/moai-lang-java/SKILL.md +14 -12
  104. moai_adk/templates/.claude/skills/moai-lang-php/SKILL.md +14 -11
  105. moai_adk/templates/.claude/skills/moai-lang-python/SKILL.md +10 -8
  106. moai_adk/templates/.claude/skills/moai-lang-rust/SKILL.md +15 -12
  107. moai_adk/templates/.claude/skills/moai-lang-scala/SKILL.md +13 -11
  108. moai_adk/templates/.claude/skills/moai-lang-typescript/SKILL.md +16 -10
  109. moai_adk/templates/.claude/skills/moai-project-documentation.md +622 -0
  110. moai_adk/templates/.git-hooks/pre-push +143 -0
  111. moai_adk/templates/.github/workflows/c-tag-validation.yml +11 -0
  112. moai_adk/templates/.github/workflows/cpp-tag-validation.yml +11 -0
  113. moai_adk/templates/.github/workflows/csharp-tag-validation.yml +11 -0
  114. moai_adk/templates/.github/workflows/dart-tag-validation.yml +11 -0
  115. moai_adk/templates/.github/workflows/go-tag-validation.yml +130 -0
  116. moai_adk/templates/.github/workflows/java-tag-validation.yml +11 -0
  117. moai_adk/templates/.github/workflows/javascript-tag-validation.yml +135 -0
  118. moai_adk/templates/.github/workflows/kotlin-tag-validation.yml +11 -0
  119. moai_adk/templates/.github/workflows/moai-gitflow.yml +182 -25
  120. moai_adk/templates/.github/workflows/moai-release-pipeline.yml +35 -29
  121. moai_adk/templates/.github/workflows/php-tag-validation.yml +11 -0
  122. moai_adk/templates/.github/workflows/python-tag-validation.yml +118 -0
  123. moai_adk/templates/.github/workflows/release.yml +76 -7
  124. moai_adk/templates/.github/workflows/ruby-tag-validation.yml +11 -0
  125. moai_adk/templates/.github/workflows/rust-tag-validation.yml +11 -0
  126. moai_adk/templates/.github/workflows/shell-tag-validation.yml +11 -0
  127. moai_adk/templates/.github/workflows/spec-issue-sync.yml +208 -41
  128. moai_adk/templates/.github/workflows/swift-tag-validation.yml +11 -0
  129. moai_adk/templates/.github/workflows/tag-report.yml +269 -0
  130. moai_adk/templates/.github/workflows/tag-validation.yml +186 -0
  131. moai_adk/templates/.github/workflows/typescript-tag-validation.yml +154 -0
  132. moai_adk/templates/.moai/config.json +3 -1
  133. moai_adk/templates/CLAUDE.md +940 -45
  134. moai_adk/templates/workflows/go-tag-validation.yml +30 -0
  135. moai_adk/templates/workflows/javascript-tag-validation.yml +41 -0
  136. moai_adk/templates/workflows/python-tag-validation.yml +42 -0
  137. moai_adk/templates/workflows/typescript-tag-validation.yml +31 -0
  138. moai_adk/utils/banner.py +5 -5
  139. {moai_adk-0.9.0.dist-info → moai_adk-0.15.1.dist-info}/METADATA +1253 -527
  140. {moai_adk-0.9.0.dist-info → moai_adk-0.15.1.dist-info}/RECORD +169 -109
  141. moai_adk/templates/.claude/hooks/alfred/alfred_hooks.py +0 -209
  142. moai_adk/templates/.claude/hooks/alfred/notification__handle_events.py +0 -102
  143. moai_adk/templates/.claude/hooks/alfred/stop__handle_interrupt.py +0 -102
  144. moai_adk/templates/.claude/hooks/alfred/subagent_stop__handle_subagent_end.py +0 -102
  145. moai_adk/templates/.claude/output-styles/alfred/agentic-coding.md +0 -640
  146. moai_adk/templates/.claude/output-styles/alfred/moai-adk-learning.md +0 -696
  147. moai_adk/templates/.claude/output-styles/alfred/study-with-alfred.md +0 -474
  148. moai_adk/templates/.github/ISSUE_TEMPLATE/spec.yml +0 -176
  149. moai_adk/templates/.github/PULL_REQUEST_TEMPLATE.md +0 -69
  150. moai_adk/templates/.moai/memory/DEVELOPMENT-GUIDE.md +0 -344
  151. moai_adk/templates/.moai/memory/SPEC-METADATA.md +0 -356
  152. moai_adk/templates/.moai/memory/gitflow-protection-policy.md +0 -330
  153. moai_adk/templates/.moai/project/product.md +0 -161
  154. moai_adk/templates/.moai/project/structure.md +0 -156
  155. moai_adk/templates/.moai/project/tech.md +0 -227
  156. moai_adk/templates/README.md +0 -256
  157. moai_adk/templates/__init__.py +0 -2
  158. /moai_adk/templates/{.moai/memory/ISSUE-LABEL-MAPPING.md → .claude/skills/moai-alfred-issue-labels/reference.md} +0 -0
  159. /moai_adk/templates/{.moai/memory/CLAUDE-PRACTICES.md → .claude/skills/moai-alfred-practices/reference.md} +0 -0
  160. /moai_adk/templates/{.moai/memory/CLAUDE-RULES.md → .claude/skills/moai-alfred-rules/reference.md} +0 -0
  161. /moai_adk/templates/.claude/skills/{moai-spec-authoring → moai-alfred-spec-authoring}/README.md +0 -0
  162. /moai_adk/templates/.claude/skills/{moai-spec-authoring → moai-alfred-spec-authoring}/examples/validate-spec.sh +0 -0
  163. /moai_adk/templates/.claude/skills/{moai-spec-authoring → moai-alfred-spec-authoring}/examples.md +0 -0
  164. /moai_adk/templates/.claude/skills/{moai-spec-authoring → moai-alfred-spec-authoring}/reference.md +0 -0
  165. /moai_adk/templates/{.moai/memory/SKILLS-DESCRIPTION-POLICY.md → .claude/skills/moai-cc-skill-descriptions/reference.md} +0 -0
  166. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/CHECKLIST.md +0 -0
  167. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/EXAMPLES.md +0 -0
  168. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/INTERACTIVE-DISCOVERY.md +0 -0
  169. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/METADATA.md +0 -0
  170. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/PARALLEL-ANALYSIS-REPORT.md +0 -0
  171. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/PYTHON-VERSION-MATRIX.md +0 -0
  172. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/SKILL-FACTORY-WORKFLOW.md +0 -0
  173. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/SKILL-UPDATE-ADVISOR.md +0 -0
  174. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/STEP-BY-STEP-GUIDE.md +0 -0
  175. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/STRUCTURE.md +0 -0
  176. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/WEB-RESEARCH.md +0 -0
  177. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/reference.md +0 -0
  178. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/scripts/generate-structure.sh +0 -0
  179. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/scripts/validate-skill.sh +0 -0
  180. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/templates/SKILL_TEMPLATE.md +0 -0
  181. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/templates/examples-template.md +0 -0
  182. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/templates/reference-template.md +0 -0
  183. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/templates/scripts-template.sh +0 -0
  184. {moai_adk-0.9.0.dist-info → moai_adk-0.15.1.dist-info}/WHEEL +0 -0
  185. {moai_adk-0.9.0.dist-info → moai_adk-0.15.1.dist-info}/entry_points.txt +0 -0
  186. {moai_adk-0.9.0.dist-info → moai_adk-0.15.1.dist-info}/licenses/LICENSE +0 -0
@@ -1,10 +1,6 @@
1
1
  ---
2
2
  name: alfred:1-plan
3
- description: "Planning (brainstorming, plan writing, design discussion) + Branch/PR creation"
4
- # Translations:
5
- # - ko: "계획 수립 (브레인스토밍, 설계 논의) + 브랜치/PR 생성"
6
- # - ja: "計画策定(ブレインストーミング、設計議論)+ ブランチ/PR作成"
7
- # - zh: "规划(头脑风暴、设计讨论)+ 分支/PR创建"
3
+ description: "Define specifications and create development branch"
8
4
  argument-hint: Title 1 Title 2 ... | SPEC-ID modifications
9
5
  allowed-tools:
10
6
  - Read
@@ -22,6 +18,12 @@ allowed-tools:
22
18
 
23
19
  # 🏗️ MoAI-ADK Step 1: Establish a plan (Plan) - Always make a plan first and then proceed.
24
20
  > **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.
21
+ >
22
+ > **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.
23
+
24
+ <!-- @CODE:ALF-WORKFLOW-001:CMD-PLAN -->
25
+
26
+ **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.
25
27
 
26
28
  ## 🎯 Command Purpose
27
29
 
@@ -167,11 +169,11 @@ STEP 1 consists of **two independent phases** to provide flexible workflow based
167
169
  Invoking the Task tool (Explore agent):
168
170
  - subagent_type: "Explore"
169
171
  - description: "Explore related files in the codebase"
170
- - prompt: "Please find all files related to the following keywords: $ARGUMENTS
171
- - File location (src/, tests/, docs/)
172
- - Relevant SPEC document (.moai/specs/)
173
- - Existing implementation code
174
- thoroughness level: medium"
172
+ - prompt: "다음 키워드와 관련된 모든 파일을 찾아주세요: $ARGUMENTS
173
+ - 파일 위치 (src/, tests/, docs/)
174
+ - 관련 SPEC 문서 (.moai/specs/)
175
+ - 기존 구현 코드
176
+ 상세도 수준: medium"
175
177
  ```
176
178
 
177
179
  **Note**: If user provides clear SPEC title, skip Phase A and proceed directly to Phase B.
@@ -190,34 +192,47 @@ This phase is **always required** regardless of whether Phase A was executed.
190
192
  Call the Task tool:
191
193
  - subagent_type: "spec-builder"
192
194
  - description: "Analyze the plan and establish a plan"
193
- - prompt: """You are spec-builder agent.
194
-
195
- LANGUAGE CONFIGURATION:
196
- - conversation_language: {{CONVERSATION_LANGUAGE}}
197
- - language_name: {{CONVERSATION_LANGUAGE_NAME}}
198
-
199
- CRITICAL INSTRUCTION:
200
- All SPEC documents and analysis must be generated in conversation_language.
201
- - If conversation_language is 'ko' (Korean): Generate ALL analysis, plans, and SPEC documents in Korean
202
- - If conversation_language is 'ja' (Japanese): Generate ALL analysis, plans, and SPEC documents in Japanese
203
- - If conversation_language is other language: Follow the specified language
204
-
205
- SKILL INVOCATION:
206
- Use explicit Skill() calls when needed:
207
- - Skill("moai-foundation-specs") for SPEC structure guidance
208
- - Skill("moai-foundation-ears") for EARS syntax requirements
209
- - Skill("moai-alfred-spec-metadata-validation") for metadata validation
210
-
211
- TASK:
212
- Please analyze the project document and suggest SPEC candidates.
213
- Run in analysis mode, and must include the following:
214
- 1. In-depth analysis of product/structure/tech.md
215
- 2. Identify SPEC candidates and Determine priorities
216
- 3. Design EARS structure
217
- 4. Wait for user approval
218
-
219
- User input: $ARGUMENTS
220
- (Optional) Explore results: $EXPLORE_RESULTS"""
195
+ - prompt: """당신은 spec-builder 에이전트입니다.
196
+
197
+ 언어 설정:
198
+ - 대화_언어: {{CONVERSATION_LANGUAGE}}
199
+ - 언어명: {{CONVERSATION_LANGUAGE_NAME}}
200
+
201
+ 중요 지시사항:
202
+ SPEC 문서는 이중 언어 구조를 따라야 합니다 (사용자 언어 + 영어 요약):
203
+
204
+ conversation_language == 'ko' (한국어) 경우:
205
+ - YAML 메타데이터: 영어만 사용
206
+ - 제목 (@SPEC 태그): 한국어 주요, 영어 버전은 하단에 기재
207
+ - 주요 내용 (분석, 요구사항, EARS): 한국어
208
+ - SUMMARY 섹션: 영어 (국제 기여자를 위해 100-200단어)
209
+ - HISTORY: 한국어 (새로운 항목), 주요 버전에는 영어 요약
210
+
211
+ conversation_language == 'ja' (일본어) 경우:
212
+ - 한국어와 동일한 이중 언어 패턴 사용
213
+ - 주요 내용: 일본어
214
+ - SUMMARY: 영어
215
+
216
+ 다른 언어인 경우:
217
+ - 주요 내용: 사용자 지정 언어
218
+ - SUMMARY: 영어 (항상)
219
+
220
+ 스킬 호출:
221
+ 필요 명시적 Skill() 호출 사용:
222
+ - Skill("moai-foundation-specs") - SPEC 구조 가이드
223
+ - Skill("moai-foundation-ears") - EARS 문법 요구사항
224
+ - Skill("moai-alfred-spec-metadata-validation") - 메타데이터 검증
225
+
226
+ 작업:
227
+ 프로젝트 문서를 분석하여 SPEC 후보자를 제시해주세요.
228
+ 분석 모드로 실행하며, 다음을 포함해야 합니다:
229
+ 1. product/structure/tech.md의 심층 분석
230
+ 2. SPEC 후보자 식별 및 우선순위 결정
231
+ 3. EARS 구조 설계
232
+ 4. 사용자 승인 대기
233
+
234
+ 사용자 입력: $ARGUMENTS
235
+ (선택사항) 탐색 결과: $EXPLORE_RESULTS"""
221
236
  ```
222
237
 
223
238
  **Note**: If Phase A was executed, pass the exploration results via `$EXPLORE_RESULTS` variable.
@@ -259,36 +274,58 @@ After user approval (collected via `AskUserQuestion tool (documented in moai-alf
259
274
  1. Call spec-builder (create plan):
260
275
  - subagent_type: "spec-builder"
261
276
  - description: "Create SPEC document"
262
- - prompt: """You are spec-builder agent.
277
+ - prompt: """당신은 spec-builder 에이전트입니다.
263
278
 
264
- LANGUAGE CONFIGURATION:
265
- - conversation_language: {{CONVERSATION_LANGUAGE}}
266
- - language_name: {{CONVERSATION_LANGUAGE_NAME}}
279
+ 언어 설정:
280
+ - 대화_언어: {{CONVERSATION_LANGUAGE}}
281
+ - 언어명: {{CONVERSATION_LANGUAGE_NAME}}
267
282
 
268
- CRITICAL INSTRUCTION:
269
- ALL SPEC documents MUST be generated in conversation_language:
270
- - spec.md: Full document in conversation_language
271
- - plan.md: Full document in conversation_language
272
- - acceptance.md: Full document in conversation_language
283
+ 중요 지시사항:
284
+ 모든 SPEC 문서는 대화_언어로 작성되어야 합니다:
285
+ - spec.md: 전체 문서를 대화_언어로 작성
286
+ - plan.md: 전체 문서를 대화_언어로 작성
287
+ - acceptance.md: 전체 문서를 대화_언어로 작성
273
288
 
274
- YAML frontmatter and @TAG identifiers MUST remain in English.
275
- Code examples and technical keywords can be mixed (code in English, narrative in user language).
289
+ YAML 프론트매터와 @TAG 식별자는 반드시 영어로 유지합니다.
290
+ 코드 예제와 기술 키워드는 혼합 가능 (코드는 영어, 설명은 사용자 언어).
276
291
 
277
- SKILL INVOCATION:
278
- Use explicit Skill() calls when needed:
279
- - Skill("moai-foundation-specs") for SPEC structure guidance
280
- - Skill("moai-foundation-ears") for EARS syntax requirements
281
- - Skill("moai-alfred-spec-metadata-validation") for metadata validation
282
- - Skill("moai-alfred-tag-scanning") for TAG chain references
292
+ 스킬 호출:
293
+ 필요 명시적 Skill() 호출 사용:
294
+ - Skill("moai-foundation-specs") - SPEC 구조 가이드
295
+ - Skill("moai-foundation-ears") - EARS 문법 요구사항
296
+ - Skill("moai-alfred-spec-metadata-validation") - 메타데이터 검증
297
+ - Skill("moai-alfred-tag-scanning") - TAG 체인 참조
283
298
 
284
- TASK:
285
- Please fill out the SPEC document according to the plan approved in STEP 1.
286
- Create a specification for the EARS structure."""
299
+ 작업:
300
+ STEP 1에서 승인된 계획에 따라 SPEC 문서를 작성해주세요.
301
+ EARS 구조에 대한 명세를 작성합니다."""
287
302
 
288
303
  2. Invoke git-manager (Git task):
289
304
  - subagent_type: "git-manager"
290
- - description: "Create Git branch/PR"
291
- - prompt: "After completing the plan, please create a branch and Draft PR."
305
+ - description: "Create Git branch/PR with duplicate prevention"
306
+ - prompt: """당신은 git-manager 에이전트입니다.
307
+
308
+ 언어 설정:
309
+ - 대화_언어: {{CONVERSATION_LANGUAGE}}
310
+ - 언어명: {{CONVERSATION_LANGUAGE_NAME}}
311
+
312
+ 중요 지시사항 (팀 모드 중복 방지):
313
+ GitHub Issue 또는 PR을 만들기 전에:
314
+ 1. 항상 제목에 SPEC-ID가 있는 기존 Issue를 확인하세요
315
+ 2. 항상 feature/SPEC-{ID} 브랜치명의 기존 PR을 확인하세요
316
+ 3. Issue가 존재하면 → 업데이트, 중복 생성 금지
317
+ 4. PR이 존재하면 → 업데이트, 중복 생성 금지
318
+ 5. 둘 다 존재하면 → 최신 SPEC 버전으로 모두 업데이트
319
+ 6. 레이블 필터 실패 시 대체 검색 사용 (일부 Issue는 레이블 없을 수 있음)
320
+ 7. 항상 레이블 추가: "spec", "planning", + 우선순위 레이블
321
+
322
+ git-manager.md의 "SPEC 작성 시" 섹션에서 자세한 중복 방지 프로토콜과 코드 예제를 참고하세요.
323
+
324
+ 작업:
325
+ 완성된 SPEC 문서에 대해 기능 브랜치(feature/SPEC-{SPEC_ID})와 Draft PR(→ develop)을 생성합니다.
326
+ GitHub 엔티티를 생성하기 전에 중복 방지 프로토콜을 구현합니다.
327
+
328
+ 출력 언어: {{CONVERSATION_LANGUAGE}}"""
292
329
  ```
293
330
 
294
331
  ## function
@@ -407,15 +444,72 @@ Present your plan in the following format:
407
444
  - **Branches/PR**: [Git operations by mode]
408
445
 
409
446
  ---
410
- **Approval Request**: Would you like to proceed with creating a plan with the above plan?
411
- (Choose between “Proceed,” “Modify [Content],” or “Abort”)
447
+
448
+ ## Plan Approval Decision Point
449
+
450
+ After the planning phase is complete, Alfred uses `AskUserQuestion` tool (documented in moai-alfred-interactive-questions skill) to obtain explicit user approval before proceeding to SPEC creation.
451
+
452
+ **Example AskUserQuestion Call**:
453
+ ```python
454
+ AskUserQuestion(
455
+ questions=[
456
+ {
457
+ "question": "Plan development is complete. Would you like to proceed with SPEC creation based on this plan?",
458
+ "header": "Plan Approval",
459
+ "multiSelect": false,
460
+ "options": [
461
+ {
462
+ "label": "✅ Proceed with SPEC Creation",
463
+ "description": "Create SPEC files in .moai/specs/SPEC-{ID}/ based on approved plan"
464
+ },
465
+ {
466
+ "label": "🔄 Request Modifications",
467
+ "description": "Specify changes to the plan before SPEC creation"
468
+ },
469
+ {
470
+ "label": "⏸️ Save as Draft",
471
+ "description": "Save plan as draft without creating SPEC files yet"
472
+ },
473
+ {
474
+ "label": "❌ Cancel",
475
+ "description": "Discard plan and return to planning phase"
476
+ }
477
+ ]
478
+ }
479
+ ]
480
+ )
481
+ ```
482
+
483
+ **Response Processing**:
484
+ - **"✅ Proceed with SPEC Creation"** (`answers["0"] === "✅ Proceed with SPEC Creation"`) → Execute Phase 2
485
+ - Invoke spec-builder agent with approved plan
486
+ - Create spec.md, plan.md, acceptance.md files in `.moai/specs/SPEC-{ID}/`
487
+ - Initialize @SPEC TAG system
488
+ - Create feature branch via git-manager
489
+ - Create Draft PR for review
490
+
491
+ - **"🔄 Request Modifications"** (`answers["0"] === "🔄 Request Modifications"`) → Repeat planning phase
492
+ - Collect modification requests from user
493
+ - Update plan based on feedback
494
+ - Re-present plan for approval (recursive decision)
495
+
496
+ - **"⏸️ Save as Draft"** (`answers["0"] === "⏸️ Save as Draft"`) → Save without SPEC
497
+ - Save plan to `.moai/specs/SPEC-{ID}/plan.md` with status: draft
498
+ - Commit with message "draft(spec): WIP SPEC-{ID} - {title}"
499
+ - User can resume with `/alfred:1-plan resume SPEC-{ID}`
500
+
501
+ - **"❌ Cancel"** (`answers["0"] === "❌ Cancel"`) → End task
502
+ - Discard plan artifacts
503
+ - Return user to initial planning prompt
504
+ - No files created or modified
505
+
412
506
  ```
413
507
 
414
508
  ---
415
509
 
416
510
  ## 🚀 STEP 2 Implementation Guide: Create a Plan (After Approval)
417
511
 
418
- Only if the user selects **"Proceed"** or **"Start"** will Alfred call the spec-builder agent to begin building the SPEC document.
512
+ Only if the user selects **"Proceed with SPEC Creation"** will Alfred call the spec-builder agent to begin building the SPEC document.
419
513
 
420
514
  ### EARS specification writing guide
421
515
 
@@ -443,7 +537,7 @@ Only if the user selects **"Proceed"** or **"Start"** will Alfred call the spec-
443
537
 
444
538
  #### YAML Front Matter Schema
445
539
 
446
- > **📋 SPEC Metadata Standard (SSOT)**: `.moai/memory/spec-metadata.md`
540
+ > **📋 SPEC Metadata Standard (SSOT)**: Skill("moai-alfred-spec-metadata-extended")
447
541
 
448
542
  **Metadata that must be included** at the top of the spec.md file:
449
543
  - **7 required fields**: id, version, status, created, updated, author, priority
@@ -470,7 +564,7 @@ priority: high
470
564
  - **author**: GitHub @ prefix is required before ID (e.g. `@Goos`)
471
565
  - **priority**: critical | high | medium | low
472
566
 
473
- **Full field description and validation methods**: see `.moai/memory/spec-metadata.md`
567
+ **Full field description and validation methods**: see Skill("moai-alfred-spec-metadata-extended")
474
568
 
475
569
  #### HISTORY section (required)
476
570
 
@@ -504,10 +598,10 @@ You must include a HISTORY section **right after the YAML Front Matter**:
504
598
 
505
599
  **HISTORY writing rules**:
506
600
  - **Version system**: v0.0.1 (INITIAL) → v0.1.0 (implementation complete) → v1.0.0 (stabilization)
507
- - Detailed version system: See `.moai/memory/spec-metadata.md#version-system`
601
+ - Detailed version system: See Skill("moai-alfred-spec-metadata-extended") for version-system guide
508
602
  - **Version order**: Latest version on top (reverse order)
509
603
  - **Change type tag**: INITIAL, ADDED, CHANGED, IMPLEMENTATION COMPLETED, BREAKING, DEPRECATED, REMOVED, FIXED
510
- - Detailed description: See `.moai/memory/spec-metadata.md#history-writing-guide`
604
+ - Detailed description: See Skill("moai-alfred-spec-metadata-extended") for history-writing-guide
511
605
  - **Required items**: Version, date, AUTHOR, changes
512
606
  - **Optional items**: REVIEW, SCOPE, CONTEXT, MIGRATION
513
607
 
@@ -710,7 +804,7 @@ See `.coderabbit.yaml` for detailed SPEC review checklist.
710
804
 
711
805
  ## 🧠 Context Management
712
806
 
713
- > For more information: `.moai/memory/development-guide.md` - see section "Context Engineering"
807
+ > For more information: Skill("moai-alfred-dev-guide") - see section "Context Engineering"
714
808
 
715
809
  ### Core strategy of this command
716
810
 
@@ -720,6 +814,64 @@ See `.coderabbit.yaml` for detailed SPEC review checklist.
720
814
 
721
815
  ---
722
816
 
817
+ ## Final Step
818
+
819
+ After SPEC creation completes, Alfred automatically invokes AskUserQuestion to ask the user what to do next:
820
+
821
+ **Example AskUserQuestion Call**:
822
+ ```python
823
+ AskUserQuestion(
824
+ questions=[
825
+ {
826
+ "question": "SPEC creation is complete. What would you like to do next?",
827
+ "header": "Next Steps",
828
+ "multiSelect": false,
829
+ "options": [
830
+ {
831
+ "label": "🔨 Start Implementation",
832
+ "description": "Proceed to /alfred:2-run SPEC-XXX for TDD implementation"
833
+ },
834
+ {
835
+ "label": "📝 Review SPEC",
836
+ "description": "Review and modify SPEC documents before implementation"
837
+ },
838
+ {
839
+ "label": "🔄 New Session",
840
+ "description": "Execute /clear for better context management (recommended)"
841
+ },
842
+ {
843
+ "label": "❌ Cancel",
844
+ "description": "Return to planning phase"
845
+ }
846
+ ]
847
+ }
848
+ ]
849
+ )
850
+ ```
851
+
852
+ **Response Processing**:
853
+ - **"🔨 Start Implementation"** (`answers["0"] === "🔨 Start Implementation"`) → Proceed to `/alfred:2-run`
854
+ - Display: "Starting TDD implementation workflow..."
855
+ - User can execute: `/alfred:2-run SPEC-XXX`
856
+ - Continue to next phase without session break
857
+
858
+ - **"📝 Review SPEC"** (`answers["0"] === "📝 Review SPEC"`) → Review generated SPEC
859
+ - Display: "📁 SPEC files created in `.moai/specs/SPEC-XXX/`"
860
+ - Show files: spec.md, plan.md, acceptance.md
861
+ - User can modify and then run `/alfred:2-run SPEC-XXX`
862
+
863
+ - **"🔄 New Session"** (`answers["0"] === "🔄 New Session"`) → Clear and restart
864
+ - Display: "⏳ Clearing session for better context management..."
865
+ - Note: Improves performance for large projects
866
+ - Next session: User can run `/alfred:2-run SPEC-XXX`
867
+
868
+ - **"❌ Cancel"** (`answers["0"] === "❌ Cancel"`) → Return to planning
869
+ - Display: "Returning to planning phase..."
870
+ - SPEC files preserved for future use
871
+ - User can create more SPECs with `/alfred:1-plan`
872
+
873
+ ---
874
+
723
875
  ## Next steps
724
876
 
725
877
  **Recommendation**: For better performance and context management, start a new chat session with the `/clear` or `/new` command before proceeding to the next step.