moai-adk 0.8.0__py3-none-any.whl → 0.15.0__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 (207) hide show
  1. moai_adk/cli/commands/init.py +14 -2
  2. moai_adk/cli/commands/update.py +229 -60
  3. moai_adk/core/config/migration.py +1 -1
  4. moai_adk/core/issue_creator.py +313 -0
  5. moai_adk/core/project/detector.py +201 -12
  6. moai_adk/core/project/initializer.py +62 -1
  7. moai_adk/core/project/phase_executor.py +48 -6
  8. moai_adk/core/tags/__init__.py +86 -0
  9. moai_adk/core/tags/ci_validator.py +463 -0
  10. moai_adk/core/tags/cli.py +283 -0
  11. moai_adk/core/tags/generator.py +109 -0
  12. moai_adk/core/tags/inserter.py +99 -0
  13. moai_adk/core/tags/mapper.py +126 -0
  14. moai_adk/core/tags/parser.py +76 -0
  15. moai_adk/core/tags/pre_commit_validator.py +393 -0
  16. moai_adk/core/tags/reporter.py +956 -0
  17. moai_adk/core/tags/tags.py +149 -0
  18. moai_adk/core/tags/validator.py +897 -0
  19. moai_adk/core/template_engine.py +268 -0
  20. moai_adk/templates/.claude/agents/alfred/backend-expert.md +319 -0
  21. moai_adk/templates/.claude/agents/alfred/cc-manager.md +25 -2
  22. moai_adk/templates/.claude/agents/alfred/debug-helper.md +24 -12
  23. moai_adk/templates/.claude/agents/alfred/devops-expert.md +464 -0
  24. moai_adk/templates/.claude/agents/alfred/doc-syncer.md +20 -13
  25. moai_adk/templates/.claude/agents/alfred/frontend-expert.md +357 -0
  26. moai_adk/templates/.claude/agents/alfred/git-manager.md +47 -16
  27. moai_adk/templates/.claude/agents/alfred/implementation-planner.md +95 -15
  28. moai_adk/templates/.claude/agents/alfred/project-manager.md +78 -12
  29. moai_adk/templates/.claude/agents/alfred/quality-gate.md +28 -5
  30. moai_adk/templates/.claude/agents/alfred/skill-factory.md +30 -2
  31. moai_adk/templates/.claude/agents/alfred/spec-builder.md +133 -13
  32. moai_adk/templates/.claude/agents/alfred/tag-agent.md +104 -8
  33. moai_adk/templates/.claude/agents/alfred/tdd-implementer.md +133 -16
  34. moai_adk/templates/.claude/agents/alfred/trust-checker.md +27 -4
  35. moai_adk/templates/.claude/agents/alfred/ui-ux-expert.md +571 -0
  36. moai_adk/templates/.claude/commands/alfred/0-project.md +466 -125
  37. moai_adk/templates/.claude/commands/alfred/1-plan.md +208 -71
  38. moai_adk/templates/.claude/commands/alfred/2-run.md +276 -55
  39. moai_adk/templates/.claude/commands/alfred/3-sync.md +439 -53
  40. moai_adk/templates/.claude/commands/alfred/9-feedback.md +149 -0
  41. moai_adk/templates/.claude/hooks/alfred/core/project.py +361 -29
  42. moai_adk/templates/.claude/hooks/alfred/core/timeout.py +136 -0
  43. moai_adk/templates/.claude/hooks/alfred/core/ttl_cache.py +108 -0
  44. moai_adk/templates/.claude/hooks/alfred/core/version_cache.py +198 -0
  45. moai_adk/templates/.claude/hooks/alfred/handlers/__init__.py +14 -6
  46. moai_adk/templates/.claude/hooks/alfred/post_tool__log_changes.py +94 -0
  47. moai_adk/templates/.claude/hooks/alfred/pre_tool__auto_checkpoint.py +100 -0
  48. moai_adk/templates/.claude/hooks/alfred/session_end__cleanup.py +94 -0
  49. moai_adk/templates/.claude/hooks/alfred/session_start__show_project_info.py +94 -0
  50. moai_adk/templates/.claude/hooks/alfred/{core → shared/core}/__init__.py +2 -2
  51. moai_adk/templates/.claude/hooks/alfred/{core → shared/core}/checkpoint.py +3 -3
  52. moai_adk/templates/.claude/hooks/alfred/{core → shared/core}/context.py +5 -5
  53. moai_adk/templates/.claude/hooks/alfred/shared/core/project.py +749 -0
  54. moai_adk/templates/.claude/hooks/alfred/{core → shared/core}/tags.py +55 -23
  55. moai_adk/templates/.claude/hooks/alfred/shared/core/version_cache.py +198 -0
  56. moai_adk/templates/.claude/hooks/alfred/shared/handlers/__init__.py +21 -0
  57. moai_adk/templates/.claude/hooks/alfred/shared/handlers/notification.py +154 -0
  58. moai_adk/templates/.claude/hooks/alfred/{handlers → shared/handlers}/session.py +28 -15
  59. moai_adk/templates/.claude/hooks/alfred/{handlers → shared/handlers}/tool.py +3 -6
  60. moai_adk/templates/.claude/hooks/alfred/{handlers → shared/handlers}/user.py +19 -0
  61. moai_adk/templates/.claude/hooks/alfred/user_prompt__jit_load_docs.py +112 -0
  62. moai_adk/templates/.claude/hooks/alfred/utils/__init__.py +1 -0
  63. moai_adk/templates/.claude/hooks/alfred/utils/timeout.py +161 -0
  64. moai_adk/templates/.claude/settings.json +5 -5
  65. moai_adk/templates/.claude/skills/moai-alfred-agent-guide/SKILL.md +70 -0
  66. moai_adk/templates/.claude/skills/moai-alfred-agent-guide/examples.md +62 -0
  67. moai_adk/templates/{.moai/memory/CLAUDE-AGENTS-GUIDE.md → .claude/skills/moai-alfred-agent-guide/reference.md} +34 -0
  68. moai_adk/templates/.claude/skills/moai-alfred-config-schema/SKILL.md +56 -0
  69. moai_adk/templates/.claude/skills/moai-alfred-config-schema/examples.md +28 -0
  70. moai_adk/templates/.claude/skills/moai-alfred-context-budget/SKILL.md +62 -0
  71. moai_adk/templates/.claude/skills/moai-alfred-context-budget/examples.md +28 -0
  72. moai_adk/templates/.claude/skills/moai-alfred-context-budget/reference.md +405 -0
  73. moai_adk/templates/.claude/skills/moai-alfred-dev-guide/SKILL.md +51 -0
  74. moai_adk/templates/.claude/skills/moai-alfred-dev-guide/examples.md +355 -0
  75. moai_adk/templates/.claude/skills/moai-alfred-dev-guide/reference.md +239 -0
  76. moai_adk/templates/.claude/skills/moai-alfred-expertise-detection/SKILL.md +323 -0
  77. moai_adk/templates/.claude/skills/moai-alfred-expertise-detection/examples.md +286 -0
  78. moai_adk/templates/.claude/skills/moai-alfred-expertise-detection/reference.md +126 -0
  79. moai_adk/templates/.claude/skills/moai-alfred-gitflow-policy/SKILL.md +74 -0
  80. moai_adk/templates/.claude/skills/moai-alfred-gitflow-policy/examples.md +4 -0
  81. moai_adk/templates/.claude/skills/moai-alfred-gitflow-policy/reference.md +269 -0
  82. moai_adk/templates/.claude/skills/moai-alfred-issue-labels/SKILL.md +19 -0
  83. moai_adk/templates/.claude/skills/moai-alfred-issue-labels/examples.md +4 -0
  84. moai_adk/templates/.claude/skills/moai-alfred-issue-labels/reference.md +150 -0
  85. moai_adk/templates/.claude/skills/moai-alfred-persona-roles/SKILL.md +198 -0
  86. moai_adk/templates/.claude/skills/moai-alfred-persona-roles/examples.md +431 -0
  87. moai_adk/templates/.claude/skills/moai-alfred-persona-roles/reference.md +141 -0
  88. moai_adk/templates/.claude/skills/moai-alfred-practices/SKILL.md +89 -0
  89. moai_adk/templates/.claude/skills/moai-alfred-practices/examples.md +122 -0
  90. moai_adk/templates/.claude/skills/moai-alfred-proactive-suggestions/SKILL.md +508 -0
  91. moai_adk/templates/.claude/skills/moai-alfred-proactive-suggestions/examples.md +481 -0
  92. moai_adk/templates/.claude/skills/moai-alfred-proactive-suggestions/reference.md +100 -0
  93. moai_adk/templates/.claude/skills/moai-alfred-reporting/SKILL.md +273 -0
  94. moai_adk/templates/.claude/skills/moai-alfred-rules/SKILL.md +77 -0
  95. moai_adk/templates/.claude/skills/moai-alfred-rules/examples.md +265 -0
  96. moai_adk/templates/.claude/skills/moai-alfred-session-state/SKILL.md +19 -0
  97. moai_adk/templates/.claude/skills/moai-alfred-session-state/examples.md +4 -0
  98. moai_adk/templates/.claude/skills/moai-alfred-session-state/reference.md +84 -0
  99. moai_adk/templates/.claude/skills/moai-alfred-spec-authoring/README.md +137 -0
  100. moai_adk/templates/.claude/skills/moai-alfred-spec-authoring/SKILL.md +219 -0
  101. moai_adk/templates/.claude/skills/{moai-spec-authoring → moai-alfred-spec-authoring}/examples/validate-spec.sh +3 -3
  102. moai_adk/templates/.claude/skills/moai-alfred-spec-authoring/examples.md +541 -0
  103. moai_adk/templates/.claude/skills/moai-alfred-spec-authoring/reference.md +622 -0
  104. moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-extended/SKILL.md +115 -0
  105. moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-extended/examples.md +4 -0
  106. moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-extended/reference.md +348 -0
  107. moai_adk/templates/.claude/skills/moai-alfred-todowrite-pattern/SKILL.md +19 -0
  108. moai_adk/templates/.claude/skills/moai-alfred-todowrite-pattern/examples.md +4 -0
  109. moai_adk/templates/.claude/skills/moai-alfred-todowrite-pattern/reference.md +211 -0
  110. moai_adk/templates/.claude/skills/moai-alfred-workflow/SKILL.md +288 -0
  111. moai_adk/templates/.claude/skills/moai-cc-skill-descriptions/SKILL.md +19 -0
  112. moai_adk/templates/.claude/skills/moai-cc-skill-descriptions/examples.md +4 -0
  113. moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/SKILL.md +3 -3
  114. moai_adk/templates/.claude/skills/moai-design-systems/SKILL.md +802 -0
  115. moai_adk/templates/.claude/skills/moai-design-systems/examples.md +1238 -0
  116. moai_adk/templates/.claude/skills/moai-design-systems/reference.md +673 -0
  117. moai_adk/templates/.claude/skills/moai-domain-frontend/SKILL.md +17 -13
  118. moai_adk/templates/.claude/skills/moai-foundation-ears/SKILL.md +9 -6
  119. moai_adk/templates/.claude/skills/moai-lang-go/SKILL.md +15 -12
  120. moai_adk/templates/.claude/skills/moai-lang-java/SKILL.md +14 -12
  121. moai_adk/templates/.claude/skills/moai-lang-php/SKILL.md +14 -11
  122. moai_adk/templates/.claude/skills/moai-lang-python/SKILL.md +10 -8
  123. moai_adk/templates/.claude/skills/moai-lang-rust/SKILL.md +15 -12
  124. moai_adk/templates/.claude/skills/moai-lang-scala/SKILL.md +13 -11
  125. moai_adk/templates/.claude/skills/moai-lang-typescript/SKILL.md +16 -10
  126. moai_adk/templates/.claude/skills/moai-project-documentation.md +622 -0
  127. moai_adk/templates/.git-hooks/pre-push +143 -0
  128. moai_adk/templates/.github/workflows/c-tag-validation.yml +11 -0
  129. moai_adk/templates/.github/workflows/cpp-tag-validation.yml +11 -0
  130. moai_adk/templates/.github/workflows/csharp-tag-validation.yml +11 -0
  131. moai_adk/templates/.github/workflows/dart-tag-validation.yml +11 -0
  132. moai_adk/templates/.github/workflows/go-tag-validation.yml +130 -0
  133. moai_adk/templates/.github/workflows/java-tag-validation.yml +11 -0
  134. moai_adk/templates/.github/workflows/javascript-tag-validation.yml +135 -0
  135. moai_adk/templates/.github/workflows/kotlin-tag-validation.yml +11 -0
  136. moai_adk/templates/.github/workflows/moai-gitflow.yml +166 -3
  137. moai_adk/templates/.github/workflows/moai-release-create.yml +100 -0
  138. moai_adk/templates/.github/workflows/moai-release-pipeline.yml +188 -0
  139. moai_adk/templates/.github/workflows/php-tag-validation.yml +11 -0
  140. moai_adk/templates/.github/workflows/python-tag-validation.yml +118 -0
  141. moai_adk/templates/.github/workflows/release.yml +118 -0
  142. moai_adk/templates/.github/workflows/ruby-tag-validation.yml +11 -0
  143. moai_adk/templates/.github/workflows/rust-tag-validation.yml +11 -0
  144. moai_adk/templates/.github/workflows/shell-tag-validation.yml +11 -0
  145. moai_adk/templates/.github/workflows/spec-issue-sync.yml +206 -35
  146. moai_adk/templates/.github/workflows/swift-tag-validation.yml +11 -0
  147. moai_adk/templates/.github/workflows/tag-report.yml +269 -0
  148. moai_adk/templates/.github/workflows/tag-validation.yml +186 -0
  149. moai_adk/templates/.github/workflows/typescript-tag-validation.yml +154 -0
  150. moai_adk/templates/.moai/config.json +21 -2
  151. moai_adk/templates/CLAUDE.md +972 -78
  152. moai_adk/templates/workflows/go-tag-validation.yml +30 -0
  153. moai_adk/templates/workflows/javascript-tag-validation.yml +41 -0
  154. moai_adk/templates/workflows/python-tag-validation.yml +42 -0
  155. moai_adk/templates/workflows/typescript-tag-validation.yml +31 -0
  156. moai_adk/utils/banner.py +5 -5
  157. {moai_adk-0.8.0.dist-info → moai_adk-0.15.0.dist-info}/METADATA +1518 -161
  158. {moai_adk-0.8.0.dist-info → moai_adk-0.15.0.dist-info}/RECORD +183 -100
  159. moai_adk/templates/.claude/hooks/alfred/HOOK_SCHEMA_VALIDATION.md +0 -313
  160. moai_adk/templates/.claude/hooks/alfred/README.md +0 -230
  161. moai_adk/templates/.claude/hooks/alfred/alfred_hooks.py +0 -174
  162. moai_adk/templates/.claude/hooks/alfred/handlers/notification.py +0 -25
  163. moai_adk/templates/.claude/hooks/alfred/test_hook_output.py +0 -175
  164. moai_adk/templates/.claude/output-styles/alfred/agentic-coding.md +0 -640
  165. moai_adk/templates/.claude/output-styles/alfred/moai-adk-learning.md +0 -696
  166. moai_adk/templates/.claude/output-styles/alfred/study-with-alfred.md +0 -474
  167. moai_adk/templates/.claude/skills/moai-spec-authoring/README.md +0 -137
  168. moai_adk/templates/.claude/skills/moai-spec-authoring/SKILL.md +0 -218
  169. moai_adk/templates/.claude/skills/moai-spec-authoring/examples.md +0 -541
  170. moai_adk/templates/.claude/skills/moai-spec-authoring/reference.md +0 -622
  171. moai_adk/templates/.github/ISSUE_TEMPLATE/spec.yml +0 -176
  172. moai_adk/templates/.github/PULL_REQUEST_TEMPLATE.md +0 -69
  173. moai_adk/templates/.moai/memory/DEVELOPMENT-GUIDE.md +0 -344
  174. moai_adk/templates/.moai/memory/GITFLOW-PROTECTION-POLICY.md +0 -220
  175. moai_adk/templates/.moai/memory/SPEC-METADATA.md +0 -356
  176. moai_adk/templates/.moai/memory/config-schema.md +0 -444
  177. moai_adk/templates/.moai/memory/gitflow-protection-policy.md +0 -220
  178. moai_adk/templates/.moai/memory/spec-metadata.md +0 -356
  179. moai_adk/templates/.moai/project/product.md +0 -161
  180. moai_adk/templates/.moai/project/structure.md +0 -156
  181. moai_adk/templates/.moai/project/tech.md +0 -227
  182. moai_adk/templates/__init__.py +0 -2
  183. /moai_adk/templates/{.moai/memory/CONFIG-SCHEMA.md → .claude/skills/moai-alfred-config-schema/reference.md} +0 -0
  184. /moai_adk/templates/{.moai/memory/CLAUDE-PRACTICES.md → .claude/skills/moai-alfred-practices/reference.md} +0 -0
  185. /moai_adk/templates/{.moai/memory/CLAUDE-RULES.md → .claude/skills/moai-alfred-rules/reference.md} +0 -0
  186. /moai_adk/templates/{.moai/memory/SKILLS-DESCRIPTION-POLICY.md → .claude/skills/moai-cc-skill-descriptions/reference.md} +0 -0
  187. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/CHECKLIST.md +0 -0
  188. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/EXAMPLES.md +0 -0
  189. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/INTERACTIVE-DISCOVERY.md +0 -0
  190. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/METADATA.md +0 -0
  191. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/PARALLEL-ANALYSIS-REPORT.md +0 -0
  192. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/PYTHON-VERSION-MATRIX.md +0 -0
  193. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/SKILL-FACTORY-WORKFLOW.md +0 -0
  194. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/SKILL-UPDATE-ADVISOR.md +0 -0
  195. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/STEP-BY-STEP-GUIDE.md +0 -0
  196. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/STRUCTURE.md +0 -0
  197. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/WEB-RESEARCH.md +0 -0
  198. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/reference.md +0 -0
  199. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/scripts/generate-structure.sh +0 -0
  200. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/scripts/validate-skill.sh +0 -0
  201. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/templates/SKILL_TEMPLATE.md +0 -0
  202. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/templates/examples-template.md +0 -0
  203. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/templates/reference-template.md +0 -0
  204. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/templates/scripts-template.sh +0 -0
  205. {moai_adk-0.8.0.dist-info → moai_adk-0.15.0.dist-info}/WHEEL +0 -0
  206. {moai_adk-0.8.0.dist-info → moai_adk-0.15.0.dist-info}/entry_points.txt +0 -0
  207. {moai_adk-0.8.0.dist-info → moai_adk-0.15.0.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
 
@@ -109,63 +111,132 @@ Users can run commands like this:
109
111
 
110
112
  ## 🔍 STEP 1: Project analysis and planning
111
113
 
112
- Analyze project documents to propose SPEC candidates, establish implementation strategies, and receive user confirmation.
114
+ STEP 1 consists of **two independent phases** to provide flexible workflow based on user request clarity:
115
+
116
+ ### 📋 STEP 1 Workflow Overview
117
+
118
+ ```
119
+ ┌─────────────────────────────────────────────────────────────┐
120
+ │ STEP 1: Project Analysis & Planning │
121
+ ├─────────────────────────────────────────────────────────────┤
122
+ │ │
123
+ │ Phase A (OPTIONAL) │
124
+ │ ┌─────────────────────────────────────────┐ │
125
+ │ │ 🔍 Explore Agent │ │
126
+ │ │ • Find relevant files by keywords │ │
127
+ │ │ • Locate existing SPEC documents │ │
128
+ │ │ • Identify implementation patterns │ │
129
+ │ └─────────────────────────────────────────┘ │
130
+ │ ↓ │
131
+ │ (exploration results) │
132
+ │ ↓ │
133
+ │ Phase B (REQUIRED) │
134
+ │ ┌─────────────────────────────────────────┐ │
135
+ │ │ ⚙️ spec-builder Agent │ │
136
+ │ │ • Analyze project documents │ │
137
+ │ │ • Propose SPEC candidates │ │
138
+ │ │ • Design EARS structure │ │
139
+ │ │ • Request user approval │ │
140
+ │ └─────────────────────────────────────────┘ │
141
+ │ ↓ │
142
+ │ (user approval via AskUserQuestion) │
143
+ │ ↓ │
144
+ │ PROCEED TO STEP 2 │
145
+ └─────────────────────────────────────────────────────────────┘
146
+ ```
147
+
148
+ **Key Points**:
149
+ - **Phase A is optional** - Skip if user provides clear SPEC title
150
+ - **Phase B is required** - Always runs to analyze project and create SPEC
151
+ - **Results flow forward** - Exploration results (if any) are passed to spec-builder
152
+
153
+ ---
154
+
155
+ ### 🔍 Phase A: Codebase Exploration (OPTIONAL)
156
+
157
+ **Use the Explore agent when user request is unclear or needs context.**
113
158
 
114
- **The spec-builder agent automatically loads and analyzes the required documents.**
159
+ #### When to use Phase A:
115
160
 
116
- ### 🔍 Explore the codebase (optional)
161
+ - User uses vague keywords ("where is...", "find me...", "related to...")
162
+ - ✅ Need to understand existing code structure before planning
163
+ - ✅ Feature spans multiple files or modules
164
+ - ❌ User provides clear SPEC title (skip to Phase B)
117
165
 
118
- **If the user request is unclear or requires understanding of existing code** Use the Explore agent first:
166
+ #### How to invoke Explore agent:
119
167
 
120
168
  ```
121
169
  Invoking the Task tool (Explore agent):
122
170
  - subagent_type: "Explore"
123
171
  - description: "Explore related files in the codebase"
124
- - prompt: "Please find all files related to the following keywords: $ARGUMENTS
125
- - File location (src/, tests/, docs/)
126
- - Relevant SPEC document (.moai/specs/)
127
- - Existing implementation code
128
- thoroughness level: medium"
172
+ - prompt: "다음 키워드와 관련된 모든 파일을 찾아주세요: $ARGUMENTS
173
+ - 파일 위치 (src/, tests/, docs/)
174
+ - 관련 SPEC 문서 (.moai/specs/)
175
+ - 기존 구현 코드
176
+ 상세도 수준: medium"
129
177
  ```
130
178
 
131
- **Criteria for using the Explore Agent**:
132
- - ✅ Users use keywords like “where am”, “find me”, etc.
133
- - ✅ Need to understand existing code structure
134
- - ✅ Investigate features across multiple files
135
- - ❌ Given a clear SPEC title (straight into spec-builder)
179
+ **Note**: If user provides clear SPEC title, skip Phase A and proceed directly to Phase B.
136
180
 
137
- ### ⚙️ How to call an agent
181
+ ---
182
+
183
+ ### ⚙️ Phase B: SPEC Planning (REQUIRED)
184
+
185
+ **Call the spec-builder agent to analyze project and create SPEC documents.**
138
186
 
139
- **STEP 1 calls the spec-builder agent using the Task tool**:
187
+ This phase is **always required** regardless of whether Phase A was executed.
188
+
189
+ #### How to invoke spec-builder:
140
190
 
141
191
  ```
142
192
  Call the Task tool:
143
193
  - subagent_type: "spec-builder"
144
194
  - description: "Analyze the plan and establish a plan"
145
- - prompt: """You are spec-builder agent.
146
-
147
- LANGUAGE CONFIGURATION:
148
- - conversation_language: {{CONVERSATION_LANGUAGE}}
149
- - language_name: {{CONVERSATION_LANGUAGE_NAME}}
150
-
151
- CRITICAL INSTRUCTION:
152
- All SPEC documents and analysis must be generated in conversation_language.
153
- - If conversation_language is 'ko' (Korean): Generate ALL analysis, plans, and SPEC documents in Korean
154
- - If conversation_language is 'ja' (Japanese): Generate ALL analysis, plans, and SPEC documents in Japanese
155
- - If conversation_language is other language: Follow the specified language
156
-
157
- TASK:
158
- Please analyze the project document and suggest SPEC candidates.
159
- Run in analysis mode, and must include the following:
160
- 1. In-depth analysis of product/structure/tech.md
161
- 2. Identify SPEC candidates and Determine priorities
162
- 3. Design EARS structure
163
- 4. Wait for user approval
164
-
165
- User input: $ARGUMENTS
166
- (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"""
167
236
  ```
168
237
 
238
+ **Note**: If Phase A was executed, pass the exploration results via `$EXPLORE_RESULTS` variable.
239
+
169
240
  ### Plan analysis progress
170
241
 
171
242
  1. **Project document analysis**
@@ -203,29 +274,58 @@ After user approval (collected via `AskUserQuestion tool (documented in moai-alf
203
274
  1. Call spec-builder (create plan):
204
275
  - subagent_type: "spec-builder"
205
276
  - description: "Create SPEC document"
206
- - prompt: """You are spec-builder agent.
277
+ - prompt: """당신은 spec-builder 에이전트입니다.
278
+
279
+ 언어 설정:
280
+ - 대화_언어: {{CONVERSATION_LANGUAGE}}
281
+ - 언어명: {{CONVERSATION_LANGUAGE_NAME}}
207
282
 
208
- LANGUAGE CONFIGURATION:
209
- - conversation_language: {{CONVERSATION_LANGUAGE}}
210
- - language_name: {{CONVERSATION_LANGUAGE_NAME}}
283
+ 중요 지시사항:
284
+ 모든 SPEC 문서는 대화_언어로 작성되어야 합니다:
285
+ - spec.md: 전체 문서를 대화_언어로 작성
286
+ - plan.md: 전체 문서를 대화_언어로 작성
287
+ - acceptance.md: 전체 문서를 대화_언어로 작성
211
288
 
212
- CRITICAL INSTRUCTION:
213
- ALL SPEC documents MUST be generated in conversation_language:
214
- - spec.md: Full document in conversation_language
215
- - plan.md: Full document in conversation_language
216
- - acceptance.md: Full document in conversation_language
289
+ YAML 프론트매터와 @TAG 식별자는 반드시 영어로 유지합니다.
290
+ 코드 예제와 기술 키워드는 혼합 가능 (코드는 영어, 설명은 사용자 언어).
217
291
 
218
- YAML frontmatter and @TAG identifiers MUST remain in English.
219
- Code examples and technical keywords can be mixed (code in English, narrative in user language).
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 체인 참조
220
298
 
221
- TASK:
222
- Please fill out the SPEC document according to the plan approved in STEP 1.
223
- Create a specification for the EARS structure."""
299
+ 작업:
300
+ STEP 1에서 승인된 계획에 따라 SPEC 문서를 작성해주세요.
301
+ EARS 구조에 대한 명세를 작성합니다."""
224
302
 
225
303
  2. Invoke git-manager (Git task):
226
304
  - subagent_type: "git-manager"
227
- - description: "Create Git branch/PR"
228
- - 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}}"""
229
329
  ```
230
330
 
231
331
  ## function
@@ -372,7 +472,7 @@ Only if the user selects **"Proceed"** or **"Start"** will Alfred call the spec-
372
472
  ### State-driven Requirements
373
473
  - When the WHILE token is in an unexpired state, the system must allow access to the protected resource.
374
474
 
375
- ### Constraints
475
+ ### Unwanted Behaviors
376
476
  - If the IF token has expired, the system must return a 401 Unauthorized response.
377
477
  ```
378
478
 
@@ -380,7 +480,7 @@ Only if the user selects **"Proceed"** or **"Start"** will Alfred call the spec-
380
480
 
381
481
  #### YAML Front Matter Schema
382
482
 
383
- > **📋 SPEC Metadata Standard (SSOT)**: `.moai/memory/spec-metadata.md`
483
+ > **📋 SPEC Metadata Standard (SSOT)**: Skill("moai-alfred-spec-metadata-extended")
384
484
 
385
485
  **Metadata that must be included** at the top of the spec.md file:
386
486
  - **7 required fields**: id, version, status, created, updated, author, priority
@@ -407,14 +507,14 @@ priority: high
407
507
  - **author**: GitHub @ prefix is required before ID (e.g. `@Goos`)
408
508
  - **priority**: critical | high | medium | low
409
509
 
410
- **Full field description and validation methods**: see `.moai/memory/spec-metadata.md`
510
+ **Full field description and validation methods**: see Skill("moai-alfred-spec-metadata-extended")
411
511
 
412
512
  #### HISTORY section (required)
413
513
 
414
514
  You must include a HISTORY section **right after the YAML Front Matter**:
415
515
 
416
516
  ```markdown
417
- # @SPEC:AUTH-001: JWT-based authentication system
517
+ # @SPEC:DOMAIN-NNN: JWT-based authentication system
418
518
 
419
519
  ## HISTORY
420
520
 
@@ -441,10 +541,10 @@ You must include a HISTORY section **right after the YAML Front Matter**:
441
541
 
442
542
  **HISTORY writing rules**:
443
543
  - **Version system**: v0.0.1 (INITIAL) → v0.1.0 (implementation complete) → v1.0.0 (stabilization)
444
- - Detailed version system: See `.moai/memory/spec-metadata.md#version-system`
544
+ - Detailed version system: See Skill("moai-alfred-spec-metadata-extended") for version-system guide
445
545
  - **Version order**: Latest version on top (reverse order)
446
546
  - **Change type tag**: INITIAL, ADDED, CHANGED, IMPLEMENTATION COMPLETED, BREAKING, DEPRECATED, REMOVED, FIXED
447
- - Detailed description: See `.moai/memory/spec-metadata.md#history-writing-guide`
547
+ - Detailed description: See Skill("moai-alfred-spec-metadata-extended") for history-writing-guide
448
548
  - **Required items**: Version, date, AUTHOR, changes
449
549
  - **Optional items**: REVIEW, SCOPE, CONTEXT, MIGRATION
450
550
 
@@ -460,7 +560,7 @@ updated: 2025-09-15
460
560
  author: @username
461
561
  ---
462
562
 
463
- # @SPEC:AUTH-001: [SPEC title]
563
+ # @SPEC:DOMAIN-NNN: [SPEC title]
464
564
 
465
565
  ## HISTORY
466
566
  [Change history by version – see example above]
@@ -484,11 +584,11 @@ author: @username
484
584
  ### Optional (Optional function)
485
585
  - If WHERE [condition], the system can [operate]
486
586
 
487
- ### Constraints
488
- - IF [condition], the system must be [constrained]
587
+ ### Unwanted Behaviors
588
+ - IF [condition], the system must [respond appropriately with error handling or quality gates]
489
589
 
490
590
  ## Traceability (@TAG)
491
- - **SPEC**: @SPEC:AUTH-001
591
+ - **SPEC**: @SPEC:DOMAIN-NNN
492
592
  - **TEST**: tests/auth/test_service.py
493
593
  - **CODE**: src/auth/service.py
494
594
  - **DOC**: docs/api/authentication.md
@@ -630,7 +730,7 @@ done
630
730
  **CodeRabbit review includes:**
631
731
  - ✅ YAML frontmatter validation (7 required fields)
632
732
  - ✅ HISTORY section structure and completeness
633
- - ✅ EARS requirements clarity (Ubiquitous/Event/State/Optional/Constraints)
733
+ - ✅ EARS requirements clarity (Ubiquitous/Event-driven/State-driven/Optional/Unwanted Behaviors)
634
734
  - ✅ Acceptance criteria quality (Given-When-Then scenarios)
635
735
  - ✅ @TAG system compliance (SPEC/TEST/CODE/DOC traceability)
636
736
  - ✅ Documentation and formatting
@@ -647,7 +747,7 @@ See `.coderabbit.yaml` for detailed SPEC review checklist.
647
747
 
648
748
  ## 🧠 Context Management
649
749
 
650
- > For more information: `.moai/memory/development-guide.md` - see section "Context Engineering"
750
+ > For more information: Skill("moai-alfred-dev-guide") - see section "Context Engineering"
651
751
 
652
752
  ### Core strategy of this command
653
753
 
@@ -657,6 +757,43 @@ See `.coderabbit.yaml` for detailed SPEC review checklist.
657
757
 
658
758
  ---
659
759
 
760
+ ## Final Step
761
+
762
+ After plan creation completes, Alfred automatically invokes AskUserQuestion to ask the user what to do next:
763
+
764
+ ```python
765
+ AskUserQuestion(
766
+ questions=[
767
+ {
768
+ "question": "스펙 작성이 완료되었습니다. 다음으로 뭘 하시겠습니까?",
769
+ "header": "다음 단계",
770
+ "multiSelect": false,
771
+ "options": [
772
+ {
773
+ "label": "🔨 구현 시작",
774
+ "description": "/alfred:2-run SPEC-XXX로 TDD 구현 진행"
775
+ },
776
+ {
777
+ "label": "📝 스펙 수정",
778
+ "description": "SPEC 문서 검토 후 수정"
779
+ },
780
+ {
781
+ "label": "🔄 새 세션 시작",
782
+ "description": "성능 최적화를 위해 /clear 실행"
783
+ }
784
+ ]
785
+ }
786
+ ]
787
+ )
788
+ ```
789
+
790
+ **User Responses**:
791
+ - **🔨 구현 시작**: Proceed to `/alfred:2-run SPEC-XXX` for TDD implementation
792
+ - **📝 스펙 수정**: Review and modify SPEC documents before implementation
793
+ - **🔄 새 세션 시작**: Execute `/clear` to start fresh session (recommended for performance)
794
+
795
+ ---
796
+
660
797
  ## Next steps
661
798
 
662
799
  **Recommendation**: For better performance and context management, start a new chat session with the `/clear` or `/new` command before proceeding to the next step.