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,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: moai-adk
3
- Version: 0.9.0
3
+ Version: 0.15.1
4
4
  Summary: MoAI Agentic Development Kit - SPEC-First TDD with Alfred SuperAgent & Complete Skills v2.0
5
5
  Project-URL: Homepage, https://github.com/modu-ai/moai-adk
6
6
  Project-URL: Repository, https://github.com/modu-ai/moai-adk
@@ -14,17 +14,21 @@ Classifier: Development Status :: 4 - Beta
14
14
  Classifier: Intended Audience :: Developers
15
15
  Classifier: License :: OSI Approved :: MIT License
16
16
  Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
17
19
  Classifier: Programming Language :: Python :: 3.13
18
20
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
19
21
  Classifier: Topic :: Software Development :: Quality Assurance
20
22
  Classifier: Topic :: Software Development :: Testing
21
- Requires-Python: >=3.13
23
+ Requires-Python: >=3.11
22
24
  Requires-Dist: click>=8.1.0
23
25
  Requires-Dist: gitpython>=3.1.45
26
+ Requires-Dist: jinja2>=3.0.0
24
27
  Requires-Dist: packaging>=21.0
25
28
  Requires-Dist: pyfiglet>=1.0.2
26
29
  Requires-Dist: pyyaml>=6.0
27
30
  Requires-Dist: questionary>=2.0.0
31
+ Requires-Dist: requests>=2.28.0
28
32
  Requires-Dist: rich>=13.0.0
29
33
  Provides-Extra: dev
30
34
  Requires-Dist: mypy>=1.7.0; extra == 'dev'
@@ -40,7 +44,7 @@ Description-Content-Type: text/markdown
40
44
 
41
45
  # MoAI-ADK (Agentic Development Kit)
42
46
 
43
- [한국어](README.ko.md) |[English](README.md) | [ไทย](README.th.md) | [日本語](README.ja.md) | [中文](README.zh.md) | [हिन्दी](README.hi.md)
47
+ [한국어](README.ko.md) | [English](README.md)
44
48
 
45
49
  [![PyPI version](https://img.shields.io/pypi/v/moai-adk)](https://pypi.org/project/moai-adk/)
46
50
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
@@ -111,7 +115,7 @@ Write SPECs first with the `/alfred:1-plan` command. A vague request like "login
111
115
  A single `/alfred:3-sync` command **synchronizes** all code, tests, and documentation. README, CHANGELOG, API docs, and Living Documents all update automatically. Six months later, code and docs still match.
112
116
 
113
117
  **4️⃣ Tracking with @TAG System**
114
- Every piece of code, test, and documentation gets a `@TAG:ID`. When requirements change later, one command—`rg "@SPEC:AUTH-001"`—**finds all related tests, implementations, and docs**. You gain confidence during refactoring.
118
+ Every piece of code, test, and documentation gets a `@TAG:ID`. When requirements change later, one command—`rg "@SPEC:EX-AUTH-001"`—**finds all related tests, implementations, and docs**. You gain confidence during refactoring.
115
119
 
116
120
  **5️⃣ Alfred Remembers Context**
117
121
  A team of AI agents collaborate to **remember** your project's structure, decision rationale, and work history. No need to repeat the same questions.
@@ -158,61 +162,364 @@ From the moment you adopt MoAI-ADK, you'll feel:
158
162
 
159
163
  ---
160
164
 
161
- ## 5-Minute Quick Start
165
+ ## 🖥️ Platform Support
162
166
 
163
- Now let's start your first project with MoAI-ADK. Follow these 5 steps and in just **5 minutes** you'll have a project with SPEC, TDD, and documentation all connected.
167
+ ### Supported Platforms
168
+ - ✅ **macOS** (11.0+)
169
+ - ✅ **Linux** (Ubuntu 20.04+, Debian 11+, etc.)
170
+ - ✅ **Windows** (10/11) - Full support as of v0.11.0
171
+ - Note: Hooks system requires Python 3.11+
172
+ - All hook features work seamlessly on Windows with cross-platform timeout handling
164
173
 
165
- ### Step 1: Install uv (about 30 seconds)
174
+ ### System Requirements
175
+ - **Python**: 3.11 or higher
176
+ - **Git**: 2.30+
177
+ - **GitHub CLI** (`gh`): Optional, required for PR automation in team mode
166
178
 
167
- First, install `uv`. `uv` is an ultra-fast Python package manager written in Rust. It's **10+ times faster** than traditional `pip` and works perfectly with MoAI-ADK.
179
+ ---
180
+
181
+ ## ⚡ 3-Minute Lightning Start
182
+
183
+ Get your first MoAI-ADK project running in **3 simple steps**. Beginners can finish in under 5 minutes.
184
+
185
+ ### Step 1: Install uv (about 1 minute)
186
+
187
+ #### Command
188
+
189
+ **Choose your platform**:
168
190
 
169
191
  ```bash
170
192
  # macOS/Linux
171
193
  curl -LsSf https://astral.sh/uv/install.sh | sh
172
194
 
173
- # Windows (PowerShell)
195
+ # Windows (PowerShell) - RECOMMENDED FOR WINDOWS USERS
174
196
  powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
175
197
 
198
+ # Windows (Git Bash) - Alternative
199
+ curl -LsSf https://astral.sh/uv/install.sh | bash
200
+
201
+ # WSL (Windows Subsystem for Linux)
202
+ curl -LsSf https://astral.sh/uv/install.sh | sh
203
+
176
204
  # Verify installation
177
205
  uv --version
178
- # Output: uv 0.x.x
179
206
  ```
180
207
 
181
- **Why uv?** MoAI-ADK is optimized to leverage uv's fast installation speed and stability. Perfect project isolation means no impact on other Python environments.
208
+ **Platform Selection Guide**:
182
209
 
183
- ### Step 2: Install MoAI-ADK (about 1 minute)
210
+ | Platform | Method | Notes |
211
+ |----------|--------|-------|
212
+ | **macOS** | bash | Native UNIX-based, use standard installation |
213
+ | **Linux** | bash | Native Linux support |
214
+ | **Windows (Native)** | ⭐ PowerShell | **RECOMMENDED** - Most stable, native Windows support |
215
+ | **Windows (Git Bash)** | bash | Alternative if PowerShell unavailable |
216
+ | **WSL** | bash | Use Linux installation within WSL2 |
184
217
 
185
- Install MoAI-ADK as a global tool. This won't affect your project dependencies.
218
+ **Important Notes on Windows**:
219
+ - 🟢 **PowerShell (Native)**: Most reliable and stable method. No WSL or Git Bash needed.
220
+ - 🟡 **Git Bash / WSL**: Works, but may encounter path issues. Try PowerShell first.
221
+ - ❌ **Do NOT use WSL if**: You're testing on Windows—PowerShell native is easier and faster.
222
+
223
+ **Why PowerShell for Windows?**
224
+ - Fewer environment setup issues
225
+ - Better Windows integration
226
+ - Faster execution
227
+ - No WSL overhead
228
+
229
+ #### Expected Output
230
+ ```
231
+ ✓ uv 0.5.1 is already installed
232
+ $ uv --version
233
+ uv 0.5.1
234
+ ```
235
+
236
+ #### Next: Install MoAI-ADK
186
237
 
187
238
  ```bash
188
- # Install in tool mode (recommended: runs in isolated environment)
189
239
  uv tool install moai-adk
190
240
 
191
- # Verify installation
241
+ # Result: ✅ Installed moai-adk v0.14.0
242
+ ```
243
+
244
+ **Verification**:
245
+ ```bash
192
246
  moai-adk --version
193
- # Output: MoAI-ADK v1.0.0
247
+ # Output: MoAI-ADK v0.14.0
194
248
  ```
195
249
 
196
- Once installed, you can use the `moai-adk` command anywhere.
250
+ ---
197
251
 
198
- ### Step 3: Create Project (about 1 minute)
252
+ ### Step 2: Create Your First Project (about 1 minute)
199
253
 
200
- **To start a new project:**
254
+ #### Command
201
255
 
256
+ ```bash
257
+ moai-adk init hello-world
258
+ cd hello-world
259
+ ```
260
+
261
+ #### What Gets Created
262
+
263
+ ```
264
+ hello-world/
265
+ ├── .moai/ ✅ Alfred configuration
266
+ ├── .claude/ ✅ Claude Code automation
267
+ ├── CLAUDE.md ✅ Project guide
268
+ └── README.md ✅ Project documentation
269
+ ```
270
+
271
+ #### Verification: Check Core Files
272
+
273
+ ```bash
274
+ # Verify core config file exists
275
+ ls -la .moai/config.json # ✅ Should exist
276
+ ls -la .claude/commands/ # ✅ Should have commands
277
+
278
+ # Or all at once
279
+ moai-adk doctor
280
+ ```
281
+
282
+ **Expected Output**:
283
+ ```
284
+ ✅ Python 3.13.0
285
+ ✅ uv 0.5.1
286
+ ✅ .moai/ directory initialized
287
+ ✅ .claude/ directory ready
288
+ ✅ 16 agents configured
289
+ ✅ 74 skills loaded
290
+ ```
291
+
292
+ ---
293
+
294
+ ### Step 3: Start Alfred (about 1 minute)
295
+
296
+ #### Run Claude Code
297
+
298
+ ```bash
299
+ claude
300
+ ```
301
+
302
+ #### Enter in Claude Code
303
+
304
+ ```
305
+ /alfred:0-project
306
+ ```
307
+
308
+ #### Alfred Will Ask
309
+
310
+ ```
311
+ Q1: Project name?
312
+ A: hello-world
313
+
314
+ Q2: Project goal?
315
+ A: Learning MoAI-ADK
316
+
317
+ Q3: Main development language?
318
+ A: python
319
+
320
+ Q4: Mode?
321
+ A: personal (for local development)
322
+ ```
323
+
324
+ #### Result: Project Ready! ✅
325
+
326
+ ```
327
+ ✅ Project initialized
328
+ ✅ Config saved to .moai/config.json
329
+ ✅ Documents created in .moai/project/
330
+ ✅ Alfred recommends skills
331
+
332
+ Next: Run /alfred:1-plan "your feature description"
333
+ ```
334
+
335
+ ---
336
+
337
+ ## Next: Complete Your First Feature in 10 Minutes
338
+
339
+ You're now ready to build your first complete feature with SPEC, TDD, and auto-generated docs!
340
+
341
+ > **→ Continue to: ["First 10-Minute Hands-On: Hello World API"](#-first-10-minute-hands-on-hello-world-api)**
342
+
343
+ In this section you'll experience:
344
+ - ✅ Define an API using SPEC
345
+ - ✅ Complete TDD cycle (RED → GREEN → REFACTOR)
346
+ - ✅ Auto-generate documentation
347
+ - ✅ Understand @TAG system
348
+
349
+ ---
350
+
351
+ ## Language Support
352
+
353
+ MoAI-ADK automatically detects and supports **15 programming languages** with dedicated CI/CD workflows:
354
+
355
+ ### Core Languages (v0.11.0+)
356
+ - **Python** (pytest, mypy, ruff, 85% coverage target)
357
+ - **JavaScript** (npm/yarn/pnpm/bun auto-detect, 80% coverage target)
358
+ - **TypeScript** (tsc type checking, biome/eslint, 85% coverage target)
359
+ - **Go** (golangci-lint, gofmt, 75% coverage target)
360
+
361
+ ### Extended Languages (v0.11.1+)
362
+ - **Ruby** (RSpec, Rubocop, bundle)
363
+ - **PHP** (PHPUnit, PHPCS, composer)
364
+ - **Java** (JUnit 5, Jacoco, Maven/Gradle auto-detection)
365
+ - **Rust** (cargo test, clippy, rustfmt)
366
+ - **Dart** (flutter test, dart analyze)
367
+ - **Swift** (XCTest, SwiftLint, SPM)
368
+ - **Kotlin** (JUnit 5, ktlint, Gradle)
369
+ - **C#** (xUnit, StyleCop, dotnet CLI)
370
+ - **C** (gcc/clang, cppcheck, CMake)
371
+ - **C++** (g++/clang++, Google Test, cpplint)
372
+ - **Shell** (shellcheck, bats-core)
373
+
374
+ ### How Language Detection Works
375
+
376
+ When you run `/alfred:2-run SPEC-XXX`, MoAI-ADK automatically:
377
+ 1. Scans your project for configuration files (package.json, pyproject.toml, go.mod, Cargo.toml, pom.xml, build.gradle, etc.)
378
+ 2. Detects your project's primary language using priority-based detection (Rust → Dart → Swift → ... → Shell)
379
+ 3. Auto-detects build tools (Maven/Gradle for Java, CMake for C/C++, SPM for Swift, etc.)
380
+ 4. Selects the appropriate CI/CD workflow template
381
+ 5. Generates language-specific testing and linting configuration
382
+
383
+ ### Supported Languages
384
+
385
+ For detailed language detection priority and build tool detection, see [Language Detection Guide](.moai/docs/language-detection-guide.md)
386
+
387
+ ### Customization
388
+
389
+ For advanced workflow customization, see [Workflow Templates Guide](.moai/docs/workflow-templates.md)
390
+
391
+ ---
392
+
393
+ ## Language Localization Architecture (v0.7.0+)
394
+
395
+ ### Hybrid Language Model
396
+
397
+ MoAI-ADK v0.7.0 introduced a **two-layer language architecture** that enables global teams to work in their preferred language while keeping the infrastructure in English for consistency and maintainability.
398
+
399
+ ### Layer 1: User Conversation & Dynamic Content
400
+
401
+ **All user-facing content uses your configured `conversation_language`** (set during `/alfred:0-project`):
402
+
403
+ - ✅ **Responses & Explanations**: Your language (Korean, Japanese, Spanish, English, Chinese, etc.)
404
+ - ✅ **Generated Documents**: SPEC, test files, implementation guides in your language
405
+ - ✅ **Code Comments**: Function docstrings and inline comments in your language
406
+ - ✅ **Git Commit Messages**: All commits in your language
407
+ - ✅ **Sub-agent Communication**: All task prompts in your language
408
+
409
+ ### Layer 2: Static Infrastructure (English Only)
410
+
411
+ **System infrastructure stays in English** for global consistency:
412
+
413
+ - 🔒 `.claude/agents/` — Agent templates (English)
414
+ - 🔒 `.claude/commands/` — Command templates (English)
415
+ - 🔒 `.claude/skills/` — Skill content (English, industry standard)
416
+ - 🔒 `.moai/memory/` — Internal guidelines (English)
417
+ - 🔒 @TAG identifiers — Technical markers (English)
418
+ - 🔒 Package code in `src/moai_adk/` — Source code comments (English for global distribution)
419
+
420
+ ### Configuration Example
421
+
422
+ ```json
423
+ {
424
+ "language": {
425
+ "conversation_language": "ko",
426
+ "conversation_language_name": "Korean"
427
+ }
428
+ }
429
+ ```
430
+
431
+ When configured, Alfred will:
432
+ - Respond in Korean (모든 대화)
433
+ - Generate SPECs in Korean
434
+ - Write code comments in Korean
435
+ - Create Git commits in Korean
436
+ - All while using English-only Skill() invocations internally
437
+
438
+ ### Supported Languages
439
+
440
+ - 🇬🇧 English
441
+ - 🇰🇷 Korean (한국어)
442
+ - 🇯🇵 Japanese (日本語)
443
+ - 🇨🇳 Chinese (中文)
444
+ - 🇪🇸 Spanish (Español)
445
+
446
+ ### Implementation Status (v0.7.0+)
447
+
448
+ | Component | Status | Details |
449
+ |-----------|--------|---------|
450
+ | **Config System** | ✅ Complete | Nested language structure in `.moai/config.json` |
451
+ | **Sub-agent Instructions** | ✅ Complete | All 16 agents support language parameter |
452
+ | **Code Generation** | ✅ Complete | Comments/docs in user language |
453
+ | **Git Integration** | ✅ Complete | Commit messages in user language |
454
+ | **Dynamic Content** | ✅ Complete | All reports/explanations in user language |
455
+
456
+ ### Why This Matters
457
+
458
+ 1. **Global Accessibility**: Support teams in any language without translating infrastructure
459
+ 2. **Developer Experience**: Write code comments in your native language
460
+ 3. **Maintainability**: Infrastructure stays in English (single source of truth)
461
+ 4. **Scalability**: Add new languages instantly without code changes
462
+
463
+ ### How to Change Language
464
+
465
+ **During Project Initialization**:
466
+ ```bash
467
+ /alfred:0-project
468
+ # Select your language when prompted
469
+ ```
470
+
471
+ **After Project Creation**:
472
+ Edit `.moai/config.json`:
473
+ ```json
474
+ {
475
+ "language": {
476
+ "conversation_language": "ja",
477
+ "conversation_language_name": "Japanese"
478
+ }
479
+ }
480
+ ```
481
+
482
+ Then restart Claude Code for changes to take effect.
483
+
484
+ ---
485
+
486
+ ## Earlier Detailed Guide (Optional Reading)
487
+
488
+ Need more explanations? See detailed guides below.
489
+
490
+ ### Detailed Installation Guide
491
+
492
+ **After installing uv, verify PATH is set**:
493
+ ```bash
494
+ # If uv command not found, set PATH manually (macOS/Linux)
495
+ export PATH="$HOME/.cargo/bin:$PATH"
496
+
497
+ # Verify again
498
+ uv --version
499
+ ```
500
+
501
+ **Available moai-adk commands**:
502
+ ```bash
503
+ moai-adk init # Initialize new project
504
+ moai-adk doctor # System diagnostics
505
+ moai-adk update # Update to latest version
506
+ ```
507
+
508
+ ### Detailed Project Creation
509
+
510
+ **Create a new project**:
202
511
  ```bash
203
512
  moai-adk init my-project
204
513
  cd my-project
205
514
  ```
206
515
 
207
- **To add to an existing project:**
208
-
516
+ **Add to existing project**:
209
517
  ```bash
210
518
  cd your-existing-project
211
519
  moai-adk init .
212
520
  ```
213
521
 
214
- This one command automatically generates:
215
-
522
+ Complete directory structure created:
216
523
  ```
217
524
  my-project/
218
525
  ├── .moai/ # MoAI-ADK project configuration
@@ -267,11 +574,6 @@ my-project/
267
574
  │ ├── hooks/ # Event-driven automation
268
575
  │ │ └── alfred/
269
576
  │ │ └── alfred_hooks.py # 5 hooks (Session, PreTool, etc.)
270
- │ ├── output-styles/ # Response styles
271
- │ │ └── alfred/
272
- │ │ ├── agentic-coding.md # Professional development mode
273
- │ │ ├── moai-adk-learning.md # Educational explanations mode
274
- │ │ └── study-with-alfred.md # Interactive learning mode
275
577
  │ └── settings.json # Claude Code settings
276
578
  ├── src/ # Implementation code
277
579
  ├── tests/ # Test code
@@ -280,178 +582,331 @@ my-project/
280
582
  └── README.md
281
583
  ```
282
584
 
283
- ### Step 4: Start Alfred in Claude Code (about 2 minutes)
585
+ ---
586
+
587
+ ## Core Concept: 3-Step Repeating Cycle
588
+
589
+ After initial setup, every feature follows this cycle:
590
+
591
+ | Step | Command | What It Does | Output |
592
+ |------|---------|-------------|--------|
593
+ | 🚀 **INIT** | `/alfred:0-project` | Collect project description, create config/docs, recommend Skills | `.moai/config.json`, `.moai/project/*`, initial report |
594
+ | 📋 **PLAN** | `/alfred:1-plan "feature description"` | Analyze requirements, draft SPEC, create Plan Board | `.moai/specs/SPEC-*/spec.md`, plan/acceptance docs, feature branch |
595
+ | 💻 **RUN** | `/alfred:2-run SPEC-ID` | Execute TDD, run tests/implementation/refactor, verify quality | `tests/`, `src/` implementation, quality report, TAG links |
596
+ | 📚 **SYNC** | `/alfred:3-sync` | Auto-sync docs/README/CHANGELOG, organize TAG/PR status | `docs/`, `.moai/reports/sync-report.md`, Ready PR |
597
+ | 💬 **FEEDBACK** | `/alfred:9-feedback` | Interactive GitHub Issue creation (type → title → description → priority) | GitHub Issue + auto labels + priority + URL |
598
+
599
+ > ✅ All commands follow the **Phase 0(optional) → Phase 1 → Phase 2 → Phase 3** cycle. Alfred automatically reports status and suggests next steps.
600
+ >
601
+ > 💡 **New in v0.7.0+**: Use `/alfred:9-feedback` to create GitHub Issues on-the-fly during development. Keep your team in sync without interrupting your workflow.
602
+
603
+ ---
604
+
605
+ ## Original Detailed Guide (Complete 7-Step Analysis)
606
+
607
+ For comprehensive explanation, see the previous version in [GitHub History](https://github.com/modu-ai/moai-adk/blob/main/README.md).
608
+
609
+ ---
610
+
611
+ ---
612
+
613
+ ## 🚀 First 10-Minute Hands-On: Hello World API
614
+
615
+ **Goal**: Experience the complete MoAI-ADK workflow in 10 minutes
616
+ **Learn**: SPEC writing, TDD implementation, documentation automation, @TAG system
617
+
618
+ > Already completed the 3-minute quick start? Start here!
619
+
620
+ ### Prerequisites
621
+ - ✅ MoAI-ADK installed
622
+ - ✅ Project created (`moai-adk init hello-world`)
623
+ - ✅ Claude Code running
624
+
625
+ ---
284
626
 
285
- Run Claude Code and invoke the Alfred SuperAgent:
627
+ ### Step 1: Write SPEC (2 minutes)
286
628
 
629
+ #### Command
287
630
  ```bash
288
- # Run Claude Code
289
- claude
631
+ /alfred:1-plan "GET /hello endpoint - receive query parameter 'name' and return greeting"
290
632
  ```
291
633
 
292
- Then enter this in Claude Code's command input:
293
-
634
+ #### Alfred Automatically Creates
294
635
  ```
295
- /alfred:0-project
636
+ ✅ SPEC ID: HELLO-001
637
+ ✅ File: .moai/specs/SPEC-HELLO-001/spec.md
638
+ ✅ Branch: feature/SPEC-HELLO-001
639
+ ```
640
+
641
+ #### Check Generated SPEC
642
+ ```bash
643
+ cat .moai/specs/SPEC-HELLO-001/spec.md
296
644
  ```
297
645
 
298
- This command performs:
646
+ **Example Content**:
647
+ ```yaml
648
+ ---
649
+ id: HELLO-001
650
+ version: 0.0.1
651
+ status: draft
652
+ priority: high
653
+ ---
299
654
 
300
- 1. **Collect Project Info**: "Project name?", "Goals?", "Main language?"
301
- 2. **Auto-detect Tech Stack**: Automatically recognizes Python/JavaScript/Go, etc.
302
- 3. **Deploy Skill Packs**: Prepares necessary Skills for your project
303
- 4. **Generate Initial Report**: Project structure, suggested next steps
655
+ # `@SPEC:EX-HELLO-001: Hello World API
304
656
 
305
- ### Step 5: Write First SPEC (about 1 minute)
657
+ ## Ubiquitous Requirements
658
+ - System SHALL provide HTTP GET /hello endpoint
306
659
 
307
- After project initialization completes, write your first feature as a SPEC:
660
+ ## Event-driven Requirements
661
+ - WHEN query parameter 'name' is provided, THEN return "Hello, {name}!"
662
+ - WHEN name is absent, THEN return "Hello, World!"
308
663
 
664
+ ## Constraints
665
+ - name limited to 50 characters max
666
+ - Response format: JSON
309
667
  ```
310
- /alfred:1-plan "User registration feature"
668
+
669
+ ✅ **Verify**: `ls .moai/specs/SPEC-HELLO-001/`
670
+
671
+ ---
672
+
673
+ ### Step 2: TDD Implementation (5 minutes)
674
+
675
+ #### Command
676
+ ```bash
677
+ /alfred:2-run HELLO-001
311
678
  ```
312
679
 
313
- Automatically generated:
680
+ #### 🔴 RED Phase: Write Failing Test
314
681
 
315
- - `@SPEC:USER-001` - Unique ID assigned
316
- - `.moai/specs/SPEC-USER-001/spec.md` - Professional SPEC in EARS format
317
- - `feature/spec-user-001` - Git branch auto-created
682
+ **File Created**: `tests/test_hello.py`
318
683
 
319
- ### Step 6: TDD Implementation (about 3 minutes)
684
+ ```python
685
+ # `@TEST:EX-HELLO-001 | SPEC: SPEC-HELLO-001.md
686
+
687
+ import pytest
688
+ from fastapi.testclient import TestClient
689
+ from src.hello.api import app
320
690
 
321
- Once SPEC is written, implement using TDD:
691
+ client = TestClient(app)
692
+
693
+ def test_hello_with_name_should_return_personalized_greeting():
694
+ """WHEN name provided, THEN return personalized greeting"""
695
+ response = client.get("/hello?name=Alice")
696
+ assert response.status_code == 200
697
+ assert response.json() == {"message": "Hello, Alice!"}
322
698
 
699
+ def test_hello_without_name_should_return_default_greeting():
700
+ """WHEN name absent, THEN return default greeting"""
701
+ response = client.get("/hello")
702
+ assert response.status_code == 200
703
+ assert response.json() == {"message": "Hello, World!"}
323
704
  ```
324
- /alfred:2-run USER-001
705
+
706
+ **Run**:
707
+ ```bash
708
+ pytest tests/test_hello.py -v
325
709
  ```
326
710
 
327
- This command handles:
711
+ **Result**: FAILED (app doesn't exist yet - expected!)
328
712
 
329
- - 🔴 **RED**: Automatically write failing test (`@TEST:USER-001`)
330
- - 🟢 **GREEN**: Minimal implementation to pass test (`@CODE:USER-001`)
331
- - ♻️ **REFACTOR**: Improve code quality
713
+ **Commit**:
714
+ ```bash
715
+ git add tests/test_hello.py
716
+ git commit -m "🔴 test(HELLO-001): add failing hello API tests"
717
+ ```
332
718
 
333
- ### Step 7: Documentation Sync (about 1 minute)
719
+ ---
720
+
721
+ #### 🟢 GREEN Phase: Minimal Implementation
722
+
723
+ **File Created**: `src/hello/api.py`
724
+
725
+ ```python
726
+ # `@CODE:EX-HELLO-001:API | SPEC: SPEC-HELLO-001.md | TEST: tests/test_hello.py
334
727
 
335
- Finally, auto-sync all documentation:
728
+ from fastapi import FastAPI
336
729
 
730
+ app = FastAPI()
731
+
732
+ @app.get("/hello")
733
+ def hello(name: str = "World"):
734
+ """@CODE:EX-HELLO-001:API - Hello endpoint"""
735
+ return {"message": f"Hello, {name}!"}
337
736
  ```
338
- /alfred:3-sync
737
+
738
+ **Run**:
739
+ ```bash
740
+ pytest tests/test_hello.py -v
339
741
  ```
340
742
 
341
- Automatically generated/updated:
743
+ **Result**: ✅ PASSED (all tests pass!)
342
744
 
343
- - Living Document (API documentation)
344
- - README updates
345
- - CHANGELOG generation
346
- - @TAG chain validation
745
+ **Commit**:
746
+ ```bash
747
+ git add src/hello/api.py
748
+ git commit -m "🟢 feat(HELLO-001): implement hello API"
749
+ ```
750
+
751
+ ---
752
+
753
+ #### ♻️ REFACTOR Phase: Add Validation
347
754
 
348
- ### Complete!
755
+ **Enhanced Code**:
349
756
 
350
- After these 7 steps, everything is ready:
757
+ ```python
758
+ from fastapi import FastAPI, HTTPException
351
759
 
352
- Requirements specification (SPEC)
353
- ✅ Test code (85%+ coverage)
354
- ✅ Implementation code (tracked with @TAG)
355
- API documentation (auto-generated)
356
- Change history (CHANGELOG)
357
- Git commit history (RED/GREEN/REFACTOR)
760
+ app = FastAPI()
761
+
762
+ @app.get("/hello")
763
+ def hello(name: str = "World"):
764
+ """@CODE:EX-HELLO-001:API - Hello endpoint with validation"""
765
+ if len(name) > 50:
766
+ raise HTTPException(status_code=400, detail="Name too long (max 50 chars)")
767
+ return {"message": f"Hello, {name}!"}
768
+ ```
358
769
 
359
- **Everything completes in 15 minutes!**
770
+ **Add Test**:
771
+ ```python
772
+ def test_hello_with_long_name_should_return_400():
773
+ """WHEN name exceeds 50 chars, THEN return 400 error"""
774
+ long_name = "a" * 51
775
+ response = client.get(f"/hello?name={long_name}")
776
+ assert response.status_code == 400
777
+ ```
360
778
 
361
- ### Verify Generated Results
779
+ **Run**:
780
+ ```bash
781
+ pytest tests/test_hello.py -v
782
+ ```
362
783
 
363
- Check if the generated results were properly created:
784
+ **Result**: PASSED (all tests pass!)
364
785
 
786
+ **Commit**:
365
787
  ```bash
366
- # 1. Check TAG chain (SPEC → TEST → CODE → DOC)
367
- rg '@(SPEC|TEST|CODE):USER-001' -n
788
+ git add tests/test_hello.py src/hello/api.py
789
+ git commit -m "♻️ refactor(HELLO-001): add name length validation"
790
+ ```
368
791
 
369
- # 2. Run tests
370
- pytest tests/ -v
792
+ ---
793
+
794
+ ### Step 3: Documentation Sync (2 minutes)
371
795
 
372
- # 3. Check generated documentation
373
- cat docs/api/user.md
374
- cat README.md
796
+ #### Command
797
+ ```bash
798
+ /alfred:3-sync
375
799
  ```
376
800
 
377
- > 🔍 **Verification Command**: `moai-adk doctor` — Checks if Python/uv versions, `.moai/` structure, and agent/Skills configuration are all ready.
378
- >
379
- > ```bash
380
- > moai-adk doctor
381
- > ```
382
- >
383
- > All green checkmarks mean perfect readiness!
801
+ #### Alfred Automatically
802
+ ```
803
+ docs/api/hello.md - API documentation generated
804
+ README.md - Usage examples added
805
+ CHANGELOG.md - Release notes added
806
+ ✅ TAG chain validated - All @TAG verified
807
+ ```
384
808
 
385
- ---
809
+ #### Check Generated API Documentation
810
+ ```bash
811
+ cat docs/api/hello.md
812
+ ```
386
813
 
387
- ## Understanding CLAUDE.md (Alfred's Configuration Documents)
814
+ **Example Content**:
815
+ ```markdown
816
+ # Hello API Documentation
388
817
 
389
- MoAI-ADK's AI coordination is powered by **Alfred**, the MoAI SuperAgent. Alfred's behavior and decision-making are guided by a set of **internal configuration documents** in the `.claude/` directory.
818
+ ## GET /hello
390
819
 
391
- ### 4-Document Structure (Progressive Disclosure Pattern)
820
+ ### Description
821
+ Returns a personalized greeting based on provided name.
392
822
 
393
- When you run MoAI-ADK, Alfred loads configuration from **4 coordinated documents** (stored in your `.claude/` directory). This layered approach follows **Progressive Disclosure** — each document adds context only when needed:
823
+ ### Parameters
824
+ - `name` (query, optional): Person's name (default: "World", max 50 chars)
394
825
 
395
- #### Layer 1: Bootstrap (Always Loaded)
826
+ ### Responses
827
+ - **200**: Success
828
+ ```json
829
+ { "message": "Hello, Alice!" }
830
+ ```
831
+ - **400**: Name too long
396
832
 
397
- | Document | Size | Purpose | Single Responsibility |
398
- |----------|------|---------|----------------------|
399
- | **CLAUDE.md** | ~7kb | Alfred's identity, directives, project metadata, language settings | **Project-specific guidance** (your team's working playbook) |
833
+ ### Examples
834
+ ```bash
835
+ curl "http://localhost:8000/hello?name=Alice"
836
+ # → {"message": "Hello, Alice!"}
400
837
 
401
- #### Layers 2-4: Just-In-Time (JIT) Loading
838
+ curl "http://localhost:8000/hello"
839
+ # → {"message": "Hello, World!"}
840
+ ```
402
841
 
403
- | Document | Size | Purpose | Triggered When |
404
- |----------|------|---------|----------------|
405
- | **CLAUDE-AGENTS-GUIDE.md** | ~14kb | Sub-agent roster (19 members), Skills map (55 packs), selection criteria | Deciding which agent to invoke (e.g., `/alfred:2-run` → need tdd-implementer) |
406
- | **CLAUDE-RULES.md** | ~17kb | Decision rules: Skill invocation, Interactive Questions, TAG validation, TRUST gates, commit templates | At decision points (e.g., "Should I ask user?", "Which Skill applies?") |
407
- | **CLAUDE-PRACTICES.md** | ~8kb | Real-world workflows, context engineering (JIT retrieval), agent collaboration patterns, code examples | During implementation phase (e.g., executing `/alfred:2-run` RED→GREEN→REFACTOR) |
842
+ ### Traceability
843
+ - `@SPEC:EX-HELLO-001` - Requirements
844
+ - `@TEST:EX-HELLO-001` - Tests
845
+ - `@CODE:EX-HELLO-001:API` - Implementation
846
+ ```
408
847
 
409
- ### How Progressive Disclosure Works
848
+ ---
410
849
 
411
- **Example: You run `/alfred:2-run AUTH-001`**
850
+ ### Step 4: Verify TAG Chain (1 minute)
851
+
852
+ #### Command
853
+ ```bash
854
+ rg '@(SPEC|TEST|CODE|DOC):HELLO-001' -n
855
+ ```
412
856
 
857
+ #### Output (Complete Traceability)
413
858
  ```
414
- Session Start
415
- Load CLAUDE.md (7kb)
416
- ├─ Alfred knows: project context, language settings, core directives
417
- ↓ User invokes /alfred:2-run
418
- ├─ Load CLAUDE-AGENTS-GUIDE.md (14kb)
419
- ├─ Alfred decides: "I need tdd-implementer agent"
420
- ├─ Load CLAUDE-RULES.md (17kb)
421
- ├─ Alfred checks: "TDD rules? TEST before CODE? TRUST gates?"
422
- ├─ Load CLAUDE-PRACTICES.md (8kb)
423
- ├─ Alfred references: "RED → GREEN → REFACTOR pattern"
424
- ↓ Implementation complete
425
- └─ Context cleaned up (only CLAUDE.md remains for next task)
859
+ .moai/specs/SPEC-HELLO-001/spec.md:7:# `@SPEC:EX-HELLO-001: Hello World API
860
+ tests/test_hello.py:3:# `@TEST:EX-HELLO-001 | SPEC: SPEC-HELLO-001.md
861
+ src/hello/api.py:3:# `@CODE:EX-HELLO-001:API | SPEC: SPEC-HELLO-001.md
862
+ docs/api/hello.md:24:- `@SPEC:EX-HELLO-001`
426
863
  ```
427
864
 
428
- **Result**:
429
- - ✅ Session boots fast (only 7kb initial load)
430
- - ✅ Context stays clean (7kb → 7kb+14kb → 7kb+14kb+17kb as needed)
431
- - ✅ Each document has single responsibility (easier to maintain)
432
- - Developers know exactly where to find/modify specific guidance
865
+ **Complete chain**: SPEC → TEST → CODE → DOC (fully traceable!)
866
+
867
+ ---
868
+
869
+ ### Summary: What You've Accomplished
870
+
871
+ In just 10 minutes:
872
+
873
+ ✅ **SPEC** - Clear requirements documented
874
+ ✅ **TDD** - Red → Green → Refactor cycle
875
+ ✅ **Implementation** - Simple, testable code with @CODE TAG
876
+ ✅ **Documentation** - Auto-generated from code
877
+ ✅ **Traceability** - Complete @TAG chain: SPEC → TEST → CODE → DOC
878
+ ✅ **Git History** - Clean, semantic commits (🔴 🟢 ♻️)
879
+
880
+ ---
881
+
882
+ ## Understanding CLAUDE.md (Alfred's Configuration Documents)
883
+
884
+ MoAI-ADK's AI coordination is powered by **Alfred**, the MoAI SuperAgent. Alfred's behavior and decision-making are guided by a set of **internal configuration documents** in the `.claude/` directory.
885
+
886
+ ### 4-Document Structure
887
+
888
+ When you run MoAI-ADK, Alfred loads configuration from **4 coordinated documents** (stored in your `.claude/` directory):
889
+
890
+ | Document | Size | Purpose | When Alfred Reads It |
891
+ | -------------------------- | ----- | ---------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------- |
892
+ | **CLAUDE.md** | ~7kb | Alfred's identity, core directives, project metadata | At session start (bootstrap) |
893
+ | **CLAUDE-AGENTS-GUIDE.md** | ~14kb | Sub-agent roster (19 members), Skills distribution (55 packs), team structure | When selecting which agent to invoke |
894
+ | **CLAUDE-RULES.md** | ~17kb | Decision-making rules (Skill invocation, Interactive Questions, TAG validation), commit templates, TRUST 5 gates | During each decision point (e.g., when to ask user questions) |
895
+ | **CLAUDE-PRACTICES.md** | ~8kb | Practical workflows, context engineering (JIT retrieval), on-demand agent patterns, real examples | During implementation phase |
433
896
 
434
897
  ### Why This Structure Matters
435
898
 
436
- **For Developers**:
437
- 1. **CLAUDE.md**: Your project's working guide (language, settings, directives)
438
- 2. **CLAUDE-AGENTS-GUIDE.md**: "Who does what?" (agent selection logic)
439
- 3. **CLAUDE-RULES.md**: "How do we decide?" (decision frameworks, gates)
440
- 4. **CLAUDE-PRACTICES.md**: "Real examples" (practical patterns to follow)
899
+ **For Developers**: These documents define how Alfred interprets your requirements and orchestrates development. Understanding them helps you:
441
900
 
442
- Understanding this helps you:
443
- - Write clearer SPEC requirements that Alfred understands
444
- - Know which agent/Skill executes your request
445
- - Predict where Alfred might ask questions or apply TRUST verification
901
+ - Write clearer specifications that Alfred understands better
902
+ - Know which agent/Skill will be invoked for your request
903
+ - Understand decision points where Alfred might ask you questions
446
904
 
447
- **For AI (Context Efficiency)**:
448
- - **Phase 1** (Session Start): Minimal context footprint (7kb)
449
- - **Phase 2** (Planning): Load agent selection guide (total ~21kb)
450
- - **Phase 3** (Implementation): Load decision rules (~38kb)
451
- - **Phase 4** (Execution): Load practical patterns (~46kb)
452
- - **Between Tasks**: Unload unnecessary layers, keep CLAUDE.md active
905
+ **For AI**: Progressive disclosure means:
453
906
 
454
- 📚 **Learn More**: `.claude/CLAUDE.md` | `.claude/CLAUDE-AGENTS-GUIDE.md` | `.claude/CLAUDE-RULES.md` | `.claude/CLAUDE-PRACTICES.md`
907
+ - **Session Start**: Load only CLAUDE.md (7kb) minimal overhead
908
+ - **On-Demand**: Load CLAUDE-AGENTS-GUIDE.md, CLAUDE-RULES.md, CLAUDE-PRACTICES.md only when needed
909
+ - **Result**: Faster session boot, cleaner context, clear decision logic
455
910
 
456
911
  ### Example: What Happens When You Run `/alfred:2-run`
457
912
 
@@ -472,6 +927,39 @@ Understanding this helps you:
472
927
 
473
928
  > ⚠️ **Important**: These are internal configuration files for Alfred, not user guides. Keep them concise and decision-focused. Most teams don't modify them.
474
929
 
930
+ ### Language Policy in CLAUDE.md (v0.7.0+)
931
+
932
+ **Key Language Rules**:
933
+
934
+ 1. **User Conversation**: Your configured language (Korean, Japanese, Spanish, etc.)
935
+ - All responses, explanations, and guidance use your `conversation_language`
936
+ - Alfred reads this from `.moai/config.json`
937
+
938
+ 2. **Code & Git History**: Your configured language
939
+ - Code comments: Your language
940
+ - Commit messages: Your language
941
+ - Documentation: Your language
942
+
943
+ 3. **Infrastructure Only**: English
944
+ - `.claude/agents/`, `.claude/commands/`, `.claude/skills/` stay in English
945
+ - `@TAG` identifiers and technical terms use English
946
+ - `.moai/memory/` files remain in English
947
+
948
+ **Example**:
949
+ ```
950
+ Your CLAUDE.md talks to you in Korean (한국어)
951
+ Your code comments are in Korean (한국어)
952
+ Your git commits are in Korean (한국어)
953
+ Your SPEC documents are in Korean (한국어)
954
+
955
+ But Alfred's internal commands use English:
956
+ ✅ Skill("moai-foundation-trust")
957
+ ✅ @CODE:EX-AUTH-001 (TAG format)
958
+ ✅ .claude/skills/ (infrastructure)
959
+ ```
960
+
961
+ **See Also**: [Language Localization Architecture](#language-localization-architecture-v070) for complete details on the hybrid language model.
962
+
475
963
  ---
476
964
 
477
965
  ## Alfred's Memory Files (.moai/memory/)
@@ -684,6 +1172,116 @@ claude
684
1172
  > - **Manual upgrade path**: Use `moai-adk update --templates-only` after manually upgrading the package
685
1173
  > - **Rollback safe**: Automatic backups in `.moai-backups/` before template sync
686
1174
 
1175
+ ### Optimize Project Templates with `/alfred:0-project update` (v0.9.0+)
1176
+
1177
+ After upgrading MoAI-ADK with `moai-adk update`, your project templates and configurations may need optimization to stay in sync with the latest package version. Use the **dedicated Alfred command** to automatically merge template updates while preserving your customizations.
1178
+
1179
+ #### When to Run `/alfred:0-project update`
1180
+
1181
+ **Automatic Trigger**: After running `moai-adk update`, your project's `optimized` flag is set based on template changes:
1182
+
1183
+ ```bash
1184
+ # 1. Upgrade MoAI-ADK package
1185
+ moai-adk update
1186
+ # Output: ✓ Package upgraded to v0.9.0!
1187
+ # ℹ️ Next: Run `/alfred:0-project update` in Claude Code to optimize templates
1188
+
1189
+ # 2. Open Claude Code
1190
+ claude
1191
+
1192
+ # 3. Run optimization command
1193
+ /alfred:0-project update
1194
+ ```
1195
+
1196
+ #### What `/alfred:0-project update` Does
1197
+
1198
+ **Phase 1: Smart Backup & Analysis**
1199
+ - ✅ Creates automatic backup in `.moai-backups/` (preserves all customizations)
1200
+ - ✅ Compares backup version with new template version
1201
+ - ✅ Generates comparison report showing changed sections
1202
+ - ✅ Presents user-friendly analysis with merge recommendations
1203
+
1204
+ **Phase 2: Smart Merge (User Approval)**
1205
+ After reviewing the analysis, you can choose:
1206
+ - **"Proceed"** → Execute smart merge (merge backup + latest template)
1207
+ - **"Preview"** → View detailed change summary before proceeding
1208
+ - **"Skip"** → Keep current files unchanged (safe to proceed later)
1209
+
1210
+ **Phase 3: Preserve Customizations**
1211
+ - ✅ Maintains latest template structure (sections, headers, @TAG format)
1212
+ - ✅ Inserts only your customizations (actual content you wrote)
1213
+ - ✅ Preserves HISTORY sections cumulatively
1214
+ - ✅ Updates version numbers automatically
1215
+
1216
+ #### Complete Example
1217
+
1218
+ ```bash
1219
+ # Terminal: Upgrade MoAI-ADK
1220
+ $ moai-adk update
1221
+ ✓ Package upgraded to v0.9.0!
1222
+
1223
+ # Claude Code
1224
+ /alfred:0-project update
1225
+
1226
+ # Alfred displays:
1227
+ # 📊 Project Update Analysis
1228
+ #
1229
+ # Current: CLAUDE.md v0.8.1 (248 lines, template + your customizations)
1230
+ # Latest: Template v0.9.0 (787 lines, expanded guidelines)
1231
+ #
1232
+ # Changes Detected:
1233
+ # ✅ Alfred Persona System (new)
1234
+ # ✅ Language Boundary Rules (enhanced)
1235
+ # ✅ Report Style Standards (new)
1236
+ # ✅ Your Customizations: Preserved (한국어, GOOS🪿엉아, etc.)
1237
+
1238
+ # User selects: 🔄 Smart Merge Proceed
1239
+
1240
+ # Result:
1241
+ # ✅ Merge Complete!
1242
+ # - CLAUDE.md updated (v0.8.1 → v0.9.0)
1243
+ # - User customizations preserved
1244
+ # - config.json updated with optimization metadata
1245
+ # - Backup saved to .moai-backups/20251102-221000/
1246
+ ```
1247
+
1248
+ #### Key Features
1249
+
1250
+ 1. **Automatic Backup**: Always creates backup before merge (safe rollback available)
1251
+ 2. **Smart Detection**: Identifies template defaults vs. your customizations
1252
+ 3. **Preservation Policy**: Never overwrites your custom content
1253
+ 4. **Version Tracking**: Automatically updates template_version in config.json
1254
+ 5. **HISTORY Section**: Cumulative merge history preserved
1255
+
1256
+ #### Command Reference
1257
+
1258
+ | Operation | Command |
1259
+ |-----------|---------|
1260
+ | **Optimize** | `/alfred:0-project update` |
1261
+ | **Review First** | Select "Preview" option when prompted |
1262
+ | **Keep Current** | Select "Skip" option (safe—run later anytime) |
1263
+ | **Check Status** | `cat .moai/config.json \| grep -A2 optimization` |
1264
+
1265
+ #### Rollback If Needed
1266
+
1267
+ If something goes wrong, restore from automatic backup:
1268
+
1269
+ ```bash
1270
+ # List available backups
1271
+ ls -lt .moai-backups/
1272
+
1273
+ # Restore from backup (example)
1274
+ cp -r .moai-backups/20251102-221000/CLAUDE.md ./CLAUDE.md
1275
+ cp -r .moai-backups/20251102-221000/.moai/config.json ./.moai/config.json
1276
+ ```
1277
+
1278
+ #### Why This Matters
1279
+
1280
+ - **Stay Current**: Get latest Alfred improvements, fixes, and features
1281
+ - **Keep Your Work**: All customizations preserved through merges
1282
+ - **No Manual Editing**: Smart merge handles complex version synchronization
1283
+ - **Trust the Process**: Automatic backups ensure safe rollback anytime
1284
+
687
1285
  ---
688
1286
 
689
1287
  ## Development Setup for Contributors
@@ -869,6 +1467,40 @@ This issue has been **fixed** in v0.8.1+. If you're experiencing this:
869
1467
  - Code now gracefully handles InvalidVersion exceptions
870
1468
  - Added comprehensive unit tests for placeholder detection
871
1469
 
1470
+ #### Problem: UV Tool Upgrade Shows "Nothing to upgrade" Despite New Version
1471
+
1472
+ **Status**: Automatically fixed in v0.9.1+ with cache refresh retry
1473
+
1474
+ **Symptoms:**
1475
+ - `moai-adk update` shows "Nothing to upgrade"
1476
+ - PyPI has a newer version available
1477
+ - Caused by stale UV cache metadata
1478
+
1479
+ **Automatic Fix (v0.9.1+):**
1480
+ The system now automatically detects stale cache and retries:
1481
+ 1. Detects "Nothing to upgrade" message
1482
+ 2. Compares installed version vs PyPI latest version
1483
+ 3. Clears UV cache: `uv cache clean moai-adk`
1484
+ 4. Automatically retries upgrade
1485
+ 5. Completes in a single command run
1486
+
1487
+ **Manual Workaround (if needed):**
1488
+ ```bash
1489
+ # Clear UV cache and retry
1490
+ uv cache clean moai-adk && moai-adk update
1491
+ ```
1492
+
1493
+ **Technical Details:**
1494
+ - Root cause: UV caches PyPI metadata that can become outdated
1495
+ - Detection: Compares version strings when "Nothing to upgrade" appears
1496
+ - Retry limit: Maximum 1 retry to prevent infinite loops
1497
+ - Timeout: 10 seconds for cache clear operation
1498
+
1499
+ **References:**
1500
+ - SPEC: @SPEC:EX-UPDATE-001
1501
+ - Implementation: @CODE:EX-UPDATE-001-001, @CODE:EX-UPDATE-001-002, @CODE:EX-UPDATE-001-003
1502
+ - Tests: @TEST:EX-UPDATE-001
1503
+
872
1504
  ### Contributing Tests
873
1505
 
874
1506
  When adding new features, always include tests:
@@ -911,110 +1543,20 @@ moai-adk update --check
911
1543
 
912
1544
  ---
913
1545
 
914
- ## Core Workflow (0 → 3)
915
-
916
- Alfred iteratively develops projects with four commands, guided by the **4-Step Workflow Logic** for every user request.
917
-
918
- ```mermaid
919
- %%{init: {'theme':'neutral'}}%%
920
- graph TD
921
- Start([User Request]) --> Intent[Step 1: Intent Understanding<br/>Clarify ambiguity if needed]
922
- Intent --> Plan[Step 2: Plan Creation<br/>Decompose tasks + identify order]
923
- Plan --> Execute[Step 3: Task Execution<br/>TodoWrite: pending → in_progress → completed]
924
- Execute --> Report[Step 4: Report & Commit<br/>Document decisions + create git commits]
925
- Report --> Init[0. Init<br/>/alfred:0-project]
926
- Init --> PlanPhase[1. Plan & SPEC<br/>/alfred:1-plan]
927
- PlanPhase --> Run[2. Run & TDD<br/>/alfred:2-run]
928
- Run --> Sync[3. Sync & Docs<br/>/alfred:3-sync]
929
- Sync --> PlanPhase
930
- Sync -.-> End([Release])
931
- ```
932
-
933
- ### Alfred's 4-Step Workflow Logic
934
-
935
- Every user request follows this systematic process:
936
-
937
- #### Step 1: Intent Understanding
938
- - **Goal**: Clarify user intent before any action
939
- - **Action**: Evaluate request clarity
940
- - **HIGH clarity**: Technical stack, requirements, scope all specified → Skip to Step 2
941
- - **MEDIUM/LOW clarity**: Multiple interpretations possible → Invoke `AskUserQuestion`
942
- - **Outcome**: Clear, unambiguous intent confirmed with user
943
-
944
- #### Step 2: Plan Creation
945
- - **Goal**: Analyze tasks and identify execution strategy
946
- - **Action**: Invoke Plan Agent to:
947
- - Decompose tasks into structured steps
948
- - Identify dependencies between tasks
949
- - Determine single vs parallel execution opportunities
950
- - Estimate work scope and files affected
951
- - **Outcome**: Structured task breakdown for TodoWrite initialization
952
-
953
- #### Step 3: Task Execution
954
- - **Goal**: Execute tasks with transparent progress tracking
955
- - **Action**:
956
- 1. Initialize TodoWrite with all pending tasks
957
- 2. For each task:
958
- - Update status: pending → **in_progress** (exactly ONE at a time)
959
- - Execute task (call appropriate sub-agent or tool)
960
- - Update status: in_progress → **completed** (immediately after)
961
- 3. Handle blockers: Keep task in_progress, create new blocking task
962
- - **Outcome**: All tasks completed with verified progress
963
-
964
- #### Step 4: Report & Commit
965
- - **Goal**: Document work and create git history
966
- - **Action**:
967
- - **Report Generation**: ONLY if user explicitly requested
968
- - ❌ Prohibited: Auto-generate reports without request
969
- - ✅ Allowed: `.moai/docs/`, `.moai/reports/`, `.moai/specs/`
970
- - **Git Commit**: ALWAYS create commits
971
- - Call git-manager for all Git operations
972
- - TDD commits: RED → GREEN → REFACTOR → DOCS
973
- - Include Alfred co-authorship
974
- - **Outcome**: Complete audit trail with documented decisions
975
-
976
- ### How 4-Step Workflow Maps to Phase 0-3 Commands
977
-
978
- The **4-Step Workflow Logic** is universal and applies to **every command execution**. Here's how it manifests in each Phase:
979
-
980
- #### Phase 0: Project Initialization (`/alfred:0-project`)
981
- ```
982
- Step 1: Intent → Clarify project needs (language, framework, team structure)
983
- Step 2: Plan → Design `.moai/` structure, detect tech stack
984
- Step 3: Run → Initialize config, deploy Skills, set up project template
985
- Step 4: Report → Create product/structure/tech.md documentation
986
- ```
987
-
988
- #### Phase 1: Planning (`/alfred:1-plan <description>`)
989
- ```
990
- Step 1: Intent → Parse requirements, clarify SPEC scope
991
- Step 2: Plan → Decompose into EARS statements, identify acceptance criteria
992
- Step 3: Run → Write SPEC document, create Plan Board, generate GitHub Issue
993
- Step 4: Report → Create feature branch, commit SPEC with TAG
994
- ```
995
-
996
- #### Phase 2: TDD Implementation (`/alfred:2-run <SPEC-ID>`)
997
- ```
998
- Step 1: Intent → Understand SPEC requirements and test strategy
999
- Step 2: Plan → Decompose SPEC into 3-step TDD cycle (RED/GREEN/REFACTOR)
1000
- Step 3: Run → Execute TDD: 🔴 RED test → 🟢 GREEN implementation → ♻️ REFACTOR quality
1001
- Step 4: Report → Verify TRUST 5 gates, commit code with @TEST/@CODE TAGs
1002
- ```
1003
-
1004
- #### Phase 3: Sync & Docs (`/alfred:3-sync`)
1005
- ```
1006
- Step 1: Intent → Understand what documentation needs synchronization
1007
- Step 2: Plan → Identify TAG chains, detect orphans, plan doc updates
1008
- Step 3: Run → Sync docs, validate TAGs, update README/CHANGELOG
1009
- Step 4: Report → Create sync report, auto-close SPEC Issues, ready PR for merge
1010
- ```
1546
+ ## Core Workflow (0 → 3)
1011
1547
 
1012
- **Key Insight**: Each command (0, 1, 2, 3) follows the same **4-Step Logic**. This ensures:
1013
- - ✅ Consistent decision-making across all phases
1014
- - ✅ Clear progression: understand → plan → execute → document
1015
- - ✅ Predictable workflow that teams can rely on
1548
+ Alfred iteratively develops projects with four commands.
1016
1549
 
1017
- ---
1550
+ ```mermaid
1551
+ %%{init: {'theme':'neutral'}}%%
1552
+ graph TD
1553
+ Start([User Request]) --> Init[0. Init<br/>/alfred:0-project]
1554
+ Init --> Plan[1. Plan & SPEC<br/>/alfred:1-plan]
1555
+ Plan --> Run[2. Run & TDD<br/>/alfred:2-run]
1556
+ Run --> Sync[3. Sync & Docs<br/>/alfred:3-sync]
1557
+ Sync --> Plan
1558
+ Sync -.-> End([Release])
1559
+ ```
1018
1560
 
1019
1561
  ### 0. INIT — Project Preparation
1020
1562
 
@@ -1040,19 +1582,18 @@ Step 4: Report → Create sync report, auto-close SPEC Issues, ready PR for merg
1040
1582
  - Sync Living Document, README, CHANGELOG, etc.
1041
1583
  - Validate TAG chain and recover orphan TAGs
1042
1584
  - Generate Sync Report, transition Draft → Ready for Review, support `--auto-merge` option
1043
- - **Auto-close related SPEC Issues** (Closes #XX reference in commit message)
1044
1585
 
1045
1586
  ---
1046
1587
 
1047
1588
  ## Command Cheat Sheet
1048
1589
 
1049
- | Command | What It Does | Key Outputs |
1050
- |---------|-------------|------------|
1051
- | `/alfred:0-project` | **Initialize project**: gather metadata, detect tech stack, deploy 55 Claude Skills, set up `.moai/` directory | `.moai/config.json`, `.moai/project/*`, `product/structure/tech.md` |
1052
- | `/alfred:1-plan <desc>` | **Write SPEC** in EARS format, create Plan Board, auto-generate acceptance criteria, create feature branch | `.moai/specs/SPEC-*/spec.md`, plan board, acceptance criteria, GitHub Issue |
1053
- | `/alfred:2-run <ID>` | **Execute TDD cycle**: 🔴 RED (failing test) 🟢 GREEN (minimal implementation) → ♻️ REFACTOR (cleanup) → quality gates | `tests/`, `src/` with `@TEST:ID` and `@CODE:ID` tags, test report |
1054
- | `/alfred:3-sync` | **Synchronize Living Docs**: sync README, docs, CHANGELOG; validate TAG chains; auto-close SPEC Issues on PR merge | `docs/`, `.moai/reports/`, `@DOC:ID` tags, Issue closed |
1055
- | `/alfred:9-feedback` | **Create GitHub Issues** interactively (workflow: issue type → title → description → priority/labels) | GitHub Issue with proper labels, priority, auto-assignable |
1590
+ | Command | What it does | Key Outputs |
1591
+ | ------------------------------ | ----------------------------------------------------------------- | ------------------------------------------------------------------ |
1592
+ | `/alfred:0-project` | Collect project description, create config/docs, recommend Skills | `.moai/config.json`, `.moai/project/*`, initial report |
1593
+ | `/alfred:1-plan <description>` | Analyze requirements, draft SPEC, write Plan Board | `.moai/specs/SPEC-*/spec.md`, plan/acceptance docs, feature branch |
1594
+ | `/alfred:2-run <SPEC-ID>` | Execute TDD, test/implement/refactor, verify quality | `tests/`, `src/` implementation, quality report, TAG connection |
1595
+ | `/alfred:3-sync` | Sync docs/README/CHANGELOG, organize TAG/PR status | `docs/`, `.moai/reports/sync-report.md`, Ready PR |
1596
+ | `/alfred:9-feedback` | Interactively create GitHub Issues (type → title → description → priority) | GitHub Issue with auto labels, priority, URL |
1056
1597
 
1057
1598
  > ❗ All commands maintain **Phase 0 (optional) → Phase 1 → Phase 2 → Phase 3** cycle structure. Alfred automatically reports execution status and next-step suggestions.
1058
1599
  >
@@ -1074,69 +1615,6 @@ When you create a SPEC document using `/alfred:1-plan` and push it to a feature
1074
1615
  4. **PR Comment** is added with a link to the created issue
1075
1616
  5. **Labels** are automatically applied based on priority (critical, high, medium, low)
1076
1617
 
1077
- ### Automatic Issue Closure & Lifecycle Synchronization
1078
-
1079
- When you complete implementation and run `/alfred:3-sync`, the system manages the complete SPEC-to-Issue lifecycle:
1080
-
1081
- #### Issue Lifecycle Stages
1082
-
1083
- | Stage | SPEC Status | GitHub Issue Status | Action |
1084
- |-------|------------|-------------------|--------|
1085
- | **1. Creation** | `draft` | `open` + `spec` label | SPEC created, Issue auto-created |
1086
- | **2. Review** | `in-review` | `open` + `planning` label | Awaiting SPEC approval |
1087
- | **3. Implementation** | `in-progress` | `open` + `in_progress` label | `/alfred:2-run` execution |
1088
- | **4. Completion** | `completed` | Closing... | `/alfred:3-sync` adds `Closes #XX` |
1089
- | **5. Release** | `stable` | `closed` ✅ | PR merges → Issue auto-closes |
1090
-
1091
- #### Auto-Close Workflow Detail
1092
-
1093
- When you run `/alfred:3-sync` to finalize implementation:
1094
-
1095
- 1. **SPEC Issue Detection**: System scans SPEC document for GitHub Issue number
1096
- 2. **Status Validation**: Confirms SPEC status is `completed` or `stable`
1097
- 3. **Closes Reference Generation**: Automatically generates `Closes #XX` in commit message
1098
- 4. **Smart Linking**: Issues PR to SPEC Issue with correlation
1099
- 5. **Auto-Close on Merge**: When PR merges to main branch:
1100
- - GitHub reads `Closes #XX` reference in commit message
1101
- - Automatically transitions Issue to `closed` status
1102
- - SPEC Issue and GitHub Issue statuses now match
1103
-
1104
- **Complete Example Workflow:**
1105
- ```
1106
- Day 1: Create SPEC
1107
- ├─ /alfred:1-plan "User Authentication"
1108
- ├─ SPEC-AUTH-001 created in .moai/specs/SPEC-AUTH-001/
1109
- └─ GitHub Issue #45 auto-created (status: open)
1110
-
1111
- Day 2: Implement Feature
1112
- ├─ /alfred:2-run AUTH-001
1113
- ├─ 🔴 RED: Add failing test @TEST:AUTH-001
1114
- ├─ 🟢 GREEN: Implement minimal solution @CODE:AUTH-001
1115
- ├─ ♻️ REFACTOR: Improve quality per TRUST 5
1116
- ├─ GitHub Issue #45 status: open, developer assignment active
1117
-
1118
- Day 3: Finalize & Sync
1119
- ├─ /alfred:3-sync
1120
- ├─ SPEC status: draft → completed → stable
1121
- ├─ Commit message: "🔖 RELEASE: v0.8.3 ... Closes #45"
1122
- ├─ PR created with automatic Issue linking
1123
- └─ PR merges to main → Issue #45 automatically closed ✅
1124
-
1125
- Result:
1126
- - ✅ SPEC-AUTH-001 fully implemented
1127
- - ✅ All tests passing (85%+ coverage)
1128
- - ✅ Documentation synchronized
1129
- - ✅ GitHub Issue #45 closed
1130
- - ✅ Complete audit trail via git history
1131
- ```
1132
-
1133
- #### Benefits of Automatic Closure
1134
-
1135
- - **Single Source of Truth**: SPEC document status always matches GitHub Issue status
1136
- - **No Manual Updates**: No need to manually close issues (GitHub does it automatically)
1137
- - **Traceable History**: Complete record in git commits shows SPEC→Issue→Close chain
1138
- - **Team Coordination**: Everyone sees status via GitHub, no separate tracking system needed
1139
-
1140
1618
  ### What Gets Synchronized
1141
1619
 
1142
1620
  **From SPEC to GitHub Issue:**
@@ -1236,122 +1714,137 @@ When working in your **local development environment**, CodeRabbit provides auto
1236
1714
 
1237
1715
  ---
1238
1716
 
1239
- ## Quick Issue Creation with `/alfred:9-feedback`
1717
+ ## 🚀 Quick Issue Creation with `/alfred:9-feedback`
1718
+
1719
+ Encountered a bug or want to suggest a feature while using MoAI-ADK? Create GitHub Issues instantly with a single command directly from Claude Code without interrupting your workflow.
1720
+
1721
+ ### Overview
1240
1722
 
1241
- MoAI-ADK v0.7.0+ includes the **Quick Issue Creation** feature, allowing developers to instantly create GitHub Issues without interrupting their development workflow.
1723
+ ```bash
1724
+ /alfred:9-feedback
1725
+ ```
1242
1726
 
1243
- ### Why Quick Issue Creation?
1727
+ When you run this command, Alfred guides you through an interactive dialog to automatically create an issue:
1728
+ - 🐛 **Bug Report** - Document problems you encounter
1729
+ - ✨ **Feature Request** - Suggest new capabilities
1730
+ - ⚡ **Improvement** - Propose enhancements to existing features
1731
+ - ❓ **Question/Discussion** - Ask questions for team discussion
1244
1732
 
1245
- During development, you frequently encounter:
1246
- - 🐛 Bugs that need immediate reporting
1247
- - ✨ Feature ideas that come to mind
1248
- - ⚡ Performance improvements to suggest
1249
- - ❓ Architecture questions that need team discussion
1733
+ ### Quick Example
1250
1734
 
1251
- **The old way**: Stop coding, go to GitHub, manually fill issue form, remember what you were working on.
1252
- **The new way**: Type one command, GitHub Issue is created instantly, continue coding.
1735
+ ```bash
1736
+ # Run in Claude Code
1737
+ /alfred:9-feedback
1738
+ ```
1253
1739
 
1254
- ### Interactive Dialog Flow
1740
+ ### Interactive Step-by-Step Flow
1255
1741
 
1256
- When you run `/alfred:9-help`, Alfred guides you through an interactive multi-step dialog:
1742
+ **1️⃣ Select Issue Type**
1257
1743
 
1258
- **Step 1: Select Issue Type**
1259
1744
  ```
1260
- Alfred: What type of issue do you want to create?
1745
+ What type of issue do you want to create?
1746
+
1261
1747
  [ ] 🐛 Bug Report - Something isn't working
1262
1748
  [ ] ✨ Feature Request - Suggest new functionality
1263
1749
  [ ] ⚡ Improvement - Enhance existing features
1264
1750
  [ ] ❓ Question/Discussion - Ask the team
1265
1751
  ```
1266
1752
 
1267
- **Step 2: Enter Issue Title**
1753
+ **2️⃣ Enter Issue Title**
1754
+
1268
1755
  ```
1269
- Alfred: What's the issue title?
1270
- Your input: "Login button not responding to clicks"
1756
+ What's the issue title? (be concise)
1757
+ Example: moai-adk update fails with template sync error
1271
1758
  ```
1272
1759
 
1273
- **Step 3: Enter Description (Optional)**
1760
+ **3️⃣ Enter Detailed Description (Optional)**
1761
+
1274
1762
  ```
1275
- Alfred: Provide a detailed description (optional—press Enter to skip)
1276
- Your input: "When I click the login button on iPhone 15, it freezes for 5 seconds then crashes"
1763
+ Provide a detailed description (optional—press Enter to skip):
1764
+
1765
+ Example:
1766
+ When running moai-adk update:
1767
+ - Symptom: .claude/ directory permission error
1768
+ - Environment: macOS 14.2, Python 3.13, moai-adk v0.15.0
1769
+ - Expected: Templates should synchronize successfully
1770
+ - Actual: Permission denied error and termination
1277
1771
  ```
1278
1772
 
1279
- **Step 4: Select Priority Level**
1773
+ **4️⃣ Select Priority Level**
1774
+
1280
1775
  ```
1281
- Alfred: What's the priority level?
1776
+ What's the priority level?
1777
+
1282
1778
  [ ] 🔴 Critical - System down, data loss, security breach
1283
1779
  [ ] 🟠 High - Major feature broken, significant impact
1284
1780
  [✓] 🟡 Medium - Normal priority (default)
1285
1781
  [ ] 🟢 Low - Minor issues, nice-to-have
1286
1782
  ```
1287
1783
 
1288
- **Step 5: Automatic Issue Creation**
1289
- ```
1290
- Alfred automatically:
1291
- 1. Determines appropriate labels based on issue type and priority
1292
- 2. Formats title with emoji: "🐛 [BUG] Login button not responding..."
1293
- 3. Creates GitHub Issue with all information
1294
- 4. Returns the issue number and URL
1295
- ```
1296
-
1297
- ### Key Features
1784
+ ### Automatic Issue Creation
1298
1785
 
1299
- 1. **⚡ Instant Creation**: Create GitHub Issues in seconds
1300
- 2. **🏷️ Automatic Labels**: Issue type + priority automatically labeled
1301
- 3. **🎯 Priority Selection**: Choose from Critical/High/Medium/Low
1302
- 4. **🔗 Team Visibility**: Issues immediately visible and discussable
1303
- 5. **📋 Standardized Format**: All issues follow consistent structure
1786
+ Alfred automatically:
1787
+ 1. Adds emoji to title: `🐛 [BUG] moai-adk update fails with template sync error`
1788
+ 2. Formats the issue in GitHub format
1789
+ 3. Auto-applies appropriate labels: `bug`, `reported`, `priority-high`
1790
+ 4. Creates the issue in your repository
1304
1791
 
1305
- ### Complete Example: Bug Report During Code Review
1792
+ ### Completion Output
1306
1793
 
1307
- ```bash
1308
- # During code review, you notice a critical issue and want to report it instantly
1309
- $ /alfred:9-feedback
1794
+ ```
1795
+ GitHub Issue #245 created successfully!
1310
1796
 
1311
- Alfred: What type of issue do you want to create?
1312
- > 🐛 Bug Report
1797
+ 📋 Title: 🐛 [BUG] moai-adk update fails with template sync error
1798
+ 🔴 Priority: High
1799
+ 🏷️ Labels: bug, reported, priority-high
1800
+ 🔗 URL: https://github.com/modu-ai/moai-adk/issues/245
1313
1801
 
1314
- Alfred: What's the issue title?
1315
- > Login button crash on mobile devices
1802
+ 💡 Tip: Reference this issue number in your commit messages
1803
+ ```
1316
1804
 
1317
- Alfred: Provide a detailed description (optional—press Enter to skip)
1318
- > Tapping the login button on iPhone 15 causes app to freeze for 5 seconds then crash.
1319
- > Tested on iOS 17.2, Chrome 120 on macOS 14.2.
1320
- > Expected: Login modal should appear
1321
- > Actual: No response then crash
1805
+ ### Key Features
1322
1806
 
1323
- Alfred: What's the priority level?
1324
- > 🟠 High
1807
+ | Feature | Description |
1808
+ |---------|-------------|
1809
+ | **Simple Command** | Just `/alfred:9-feedback`—no arguments needed |
1810
+ | **Interactive** | Step-by-step dialog for intuitive issue creation |
1811
+ | **Auto-labeled** | Issue type and priority automatically assigned as labels |
1812
+ | **Instant Creation** | Issue created in GitHub within ~30 seconds |
1813
+ | **Team Shared** | Issue immediately visible and trackable for your team |
1325
1814
 
1326
- GitHub Issue #234 created successfully!
1815
+ ### Use Cases
1327
1816
 
1328
- 📋 Title: 🐛 [BUG] Login button crash on mobile devices
1329
- 🟠 Priority: High
1330
- 🏷️ Labels: bug, reported, priority-high
1331
- 🔗 URL: https://github.com/owner/repo/issues/234
1817
+ **📌 Bug Report Example**
1332
1818
 
1333
- 💡 Next: Continue with your work—the issue is now tracked!
1819
+ ```
1820
+ /alfred:9-feedback
1821
+ → Select 🐛 Bug Report
1822
+ → Title: "moai-adk update fails with template sync error"
1823
+ → Describe the symptom and environment
1824
+ → Select 🟠 High priority
1825
+ → Issue #246 automatically created
1334
1826
  ```
1335
1827
 
1336
- ### Integration with MoAI-ADK Workflow
1337
-
1338
- 1. **During Development**: Use `/alfred:9-help` to report bugs/ideas instantly
1339
- 2. **In Code Review**: Convert improvement suggestions to tracked issues
1340
- 3. **When Planning**: Reference created issues in SPEC documents
1341
- 4. **During Sync**: Link issues to SPEC requirements with `/alfred:3-sync`
1828
+ **💡 Feature Request Example**
1342
1829
 
1343
- ### Prerequisites
1830
+ ```
1831
+ /alfred:9-feedback
1832
+ → Select ✨ Feature Request
1833
+ → Title: "Add --dry-run option to moai-adk update"
1834
+ → Describe the desired behavior
1835
+ → Select 🟡 Medium priority
1836
+ → Issue #247 automatically created
1837
+ ```
1344
1838
 
1345
- - GitHub CLI (`gh`) installed and authenticated
1346
- - Repository initialized with Git
1839
+ ### Best Practices
1347
1840
 
1348
- ### Learn More
1841
+ - Be clear and concise in your title
1842
+ - ✅ Include environment details for bug reports (OS, Python version, moai-adk version)
1843
+ - ✅ Description is optional—skip if title is self-explanatory
1844
+ - ❌ Avoid including personal information or sensitive data
1845
+ - ❌ Check existing issues to prevent duplicates before creating new ones
1349
1846
 
1350
- See `.moai/docs/quick-issue-creation-guide.md` for comprehensive documentation including:
1351
- - Detailed usage examples
1352
- - Best practices and tips
1353
- - Troubleshooting guide
1354
- - Integration with SPEC documents
1847
+ ---
1355
1848
 
1356
1849
  ---
1357
1850
 
@@ -1381,8 +1874,6 @@ MoAI-ADK consists of 5 key concepts. Each concept connects to the others, and to
1381
1874
  - ✅ SPEC-based test cases (what to test is already defined)
1382
1875
  - ✅ When requirements change, track all affected code with `@SPEC:ID` TAG
1383
1876
 
1384
- 📚 **Learn More**: `.moai/specs/` | [EARS Syntax Guide](./CLAUDE-RULES.md#ears-syntax) | [SPEC Examples](./CLAUDE-PRACTICES.md#spec-examples)
1385
-
1386
1877
  ---
1387
1878
 
1388
1879
  ### Key Concept 2: TDD (Test-Driven Development)
@@ -1419,8 +1910,6 @@ MoAI-ADK consists of 5 key concepts. Each concept connects to the others, and to
1419
1910
  - ✅ Refactoring confidence (always verifiable with tests)
1420
1911
  - ✅ Clear Git history (trace RED → GREEN → REFACTOR process)
1421
1912
 
1422
- 📚 **Learn More**: [TDD Workflow](./CLAUDE-PRACTICES.md#tdd-workflow) | [Test Examples](./CLAUDE-PRACTICES.md#test-examples) | [Quality Gates](./CLAUDE-RULES.md#trust-5-principles)
1423
-
1424
1913
  ---
1425
1914
 
1426
1915
  ### Key Concept 3: @TAG System
@@ -1432,13 +1921,13 @@ MoAI-ADK consists of 5 key concepts. Each concept connects to the others, and to
1432
1921
  **TAG Chain**:
1433
1922
 
1434
1923
  ```
1435
- @SPEC:AUTH-001 (requirements)
1924
+ @SPEC:EX-AUTH-001 (requirements)
1436
1925
 
1437
- @TEST:AUTH-001 (test)
1926
+ @TEST:EX-AUTH-001 (test)
1438
1927
 
1439
- @CODE:AUTH-001 (implementation)
1928
+ @CODE:EX-AUTH-001 (implementation)
1440
1929
 
1441
- @DOC:AUTH-001 (documentation)
1930
+ @DOC:EX-AUTH-001 (documentation)
1442
1931
  ```
1443
1932
 
1444
1933
  **TAG ID Rules**: `<Domain>-<3 digits>`
@@ -1447,36 +1936,6 @@ MoAI-ADK consists of 5 key concepts. Each concept connects to the others, and to
1447
1936
  - USER-001, USER-002...
1448
1937
  - Once assigned, **never change**
1449
1938
 
1450
- **Advanced TAG Usage: Multi-Component TAGs**
1451
-
1452
- For complex features with multiple components, use sub-tags:
1453
-
1454
- ```
1455
- @SPEC:AUTH-001 (complete requirements)
1456
-
1457
- @TEST:AUTH-001 (test suite)
1458
- ├─ @TEST:AUTH-001:login (login flow tests)
1459
- ├─ @TEST:AUTH-001:token (token refresh tests)
1460
- └─ @TEST:AUTH-001:session (session management tests)
1461
-
1462
- @CODE:AUTH-001 (implementation)
1463
- ├─ @CODE:AUTH-001:service (authentication service)
1464
- ├─ @CODE:AUTH-001:model (User/Token models)
1465
- ├─ @CODE:AUTH-001:middleware (auth middleware)
1466
- └─ @CODE:AUTH-001:repository (database access layer)
1467
-
1468
- @DOC:AUTH-001 (documentation)
1469
- ├─ @DOC:AUTH-001:api (API documentation)
1470
- └─ @DOC:AUTH-001:guide (integration guide)
1471
- ```
1472
-
1473
- **Component TAG Rules**:
1474
- - Format: `@TAG:ID` or `@TAG:ID:component`
1475
- - Component names are optional but **highly recommended** for clarity
1476
- - All components share the same ID (never change ID once assigned)
1477
- - When querying: `rg '@TAG:AUTH-001' -n` finds all components
1478
- - Helps organize large features without creating new IDs
1479
-
1480
1939
  **How to Use?** When requirements change:
1481
1940
 
1482
1941
  ```bash
@@ -1495,8 +1954,6 @@ rg '@TAG:AUTH-001' -n
1495
1954
  - ✅ Instantly identify all affected code during refactoring
1496
1955
  - ✅ Code remains understandable 3 months later (trace TAG → SPEC)
1497
1956
 
1498
- 📚 **Learn More**: [TAG System Guide](./CLAUDE-RULES.md#tag-system) | [TAG Validation](./CLAUDE-PRACTICES.md#tag-validation) | [Orphan Detection](./CLAUDE-RULES.md#orphan-tag-detection)
1499
-
1500
1957
  ---
1501
1958
 
1502
1959
  ### Key Concept 4: TRUST 5 Principles
@@ -1542,8 +1999,6 @@ rg '@TAG:AUTH-001' -n
1542
1999
  - ✅ Entire team develops with same standards
1543
2000
  - ✅ Fewer bugs, prevent security vulnerabilities in advance
1544
2001
 
1545
- 📚 **Learn More**: [TRUST 5 Validation](./CLAUDE-RULES.md#trust-5-principles) | [Quality Gates](./CLAUDE-RULES.md#quality-gates) | [Security Best Practices](./CLAUDE-RULES.md#security-guidelines)
1546
-
1547
2002
  ---
1548
2003
 
1549
2004
  ### Key Concept 5: Alfred SuperAgent
@@ -1554,40 +2009,10 @@ rg '@TAG:AUTH-001' -n
1554
2009
 
1555
2010
  **Agent Composition**:
1556
2011
 
1557
- #### 1. Alfred SuperAgent (1)
1558
- - **🎩 Alfred**: Overall orchestration, workflow management, team coordination
1559
-
1560
- #### 2. Core Sub-agents (10)
1561
- Specialized experts handling SPEC → TDD → SYNC pipeline:
1562
-
1563
- | Agent | Role | Responsibility |
1564
- |-------|------|-----------------|
1565
- | **📋 project-manager** | Project Initialization | Setup `.moai/` structure, tech stack detection, Skills deployment |
1566
- | **🏗️ spec-builder** | SPEC Authoring | Write EARS-format specifications, acceptance criteria |
1567
- | **💎 tdd-implementer** | TDD Implementation | RED → GREEN → REFACTOR cycle, test-first development |
1568
- | **📖 doc-syncer** | Documentation Sync | Living docs, README sync, changelog management |
1569
- | **🏷️ tag-agent** | TAG Validation | @TAG chain verification, orphan detection, traceability |
1570
- | **🚀 git-manager** | Git Workflow | Branch management, commits, PR automation, releases |
1571
- | **🔬 debug-helper** | Error Analysis | Stack trace parsing, error diagnosis, fix suggestions |
1572
- | **✅ trust-checker** | TRUST Verification | Test coverage (85%+), code quality, security checks |
1573
- | **🛠️ cc-manager** | Claude Code Config | Session settings, tool permissions, hook management |
1574
- | **📊 implementation-planner** | Strategy Planning | Task decomposition, dependency analysis, parallelization |
1575
-
1576
- #### 3. Specialist Sub-agents (6)
1577
- Domain-specific experts:
1578
-
1579
- - **Language Detection**: Auto-detect Python, TS, Go, Rust, Java from package config
1580
- - **Skills Factory**: Research and integrate new Claude Skills
1581
- - **Template Managers**: Project scaffolding, documentation templates
1582
- - **Quality Gate**: Code review, linting, type checking orchestration
1583
- - **Context Optimizer**: Memory management, JIT context loading
1584
- - **Interactive Questions**: TUI-based user input for AskUserQuestion
1585
-
1586
- #### 4. Built-in Claude Agents (2)
1587
- General-purpose capabilities:
1588
-
1589
- - **General Q&A**: Answer questions about coding, architecture, debugging
1590
- - **Codebase Exploration**: Fast grep/glob searches, code pattern analysis
2012
+ - **Alfred SuperAgent**: Overall orchestration (1)
2013
+ - **Core Sub-agents**: Specialized tasks like SPEC writing, TDD implementation, documentation sync (10)
2014
+ - **Zero-project Specialists**: Project initialization, language detection, etc. (6)
2015
+ - **Built-in Agents**: General questions, codebase exploration (2)
1591
2016
 
1592
2017
  **55 Claude Skills**:
1593
2018
 
@@ -1638,7 +2063,7 @@ author: @user
1638
2063
  priority: high
1639
2064
  ---
1640
2065
 
1641
- # @SPEC:TODO-001: Todo Management API
2066
+ # @SPEC:EX-TODO-001: Todo Management API
1642
2067
 
1643
2068
  ## Ubiquitous Requirements
1644
2069
  - The system SHALL be able to add todos
@@ -1674,7 +2099,7 @@ The **implementation-planner** Sub-agent decides:
1674
2099
 
1675
2100
  - 📚 Libraries: FastAPI + SQLAlchemy
1676
2101
  - 📁 Folder structure: `src/todo/`, `tests/todo/`
1677
- - 🏷️ TAG design: `@CODE:TODO-001:API`, `@CODE:TODO-001:MODEL`, `@CODE:TODO-001:REPO`
2102
+ - 🏷️ TAG design: `@CODE:EX-TODO-001:API`, `@CODE:EX-TODO-001:MODEL`, `@CODE:EX-TODO-001:REPO`
1678
2103
 
1679
2104
  **Phase 2: RED → GREEN → REFACTOR**
1680
2105
 
@@ -1682,7 +2107,7 @@ The **implementation-planner** Sub-agent decides:
1682
2107
 
1683
2108
  ```python
1684
2109
  # tests/test_todo_api.py
1685
- # @TEST:TODO-001 | SPEC: SPEC-TODO-001.md
2110
+ # @TEST:README-EXAMPLE-TODO | SPEC: SPEC-TODO-001.md
1686
2111
 
1687
2112
  import pytest
1688
2113
  from src.todo.api import create_todo, get_todos
@@ -1724,7 +2149,7 @@ git commit -m "🔴 test(TODO-001): add failing API tests"
1724
2149
 
1725
2150
  ```python
1726
2151
  # src/todo/api.py
1727
- # @CODE:TODO-001:API | SPEC: SPEC-TODO-001.md | TEST: tests/test_todo_api.py
2152
+ # @CODE:EX-TODO-001:API | SPEC: SPEC-TODO-001.md | TEST: tests/test_todo_api.py
1728
2153
 
1729
2154
  from fastapi import FastAPI, HTTPException
1730
2155
  from pydantic import BaseModel
@@ -1738,19 +2163,19 @@ class TodoRequest(BaseModel):
1738
2163
 
1739
2164
  @app.post("/todos", status_code=201)
1740
2165
  def create_todo(todo: TodoRequest):
1741
- """@CODE:TODO-001:API - POST endpoint"""
2166
+ """@CODE:EX-TODO-001:API - POST endpoint"""
1742
2167
  todo_id = str(uuid.uuid4())
1743
2168
  todos_db[todo_id] = {"id": todo_id, "title": todo.title}
1744
2169
  return todos_db[todo_id]
1745
2170
 
1746
2171
  @app.get("/todos")
1747
2172
  def get_todos():
1748
- """@CODE:TODO-001:API - GET all endpoint"""
2173
+ """@CODE:EX-TODO-001:API - GET all endpoint"""
1749
2174
  return list(todos_db.values())
1750
2175
 
1751
2176
  @app.get("/todos/{todo_id}")
1752
2177
  def get_todo(todo_id: str):
1753
- """@CODE:TODO-001:API - GET by ID endpoint"""
2178
+ """@CODE:EX-TODO-001:API - GET by ID endpoint"""
1754
2179
  if todo_id not in todos_db:
1755
2180
  raise HTTPException(status_code=404, detail="Todo not found")
1756
2181
  return todos_db[todo_id]
@@ -1769,7 +2194,7 @@ git commit -m "🟢 feat(TODO-001): implement minimal Todo API"
1769
2194
 
1770
2195
  ```python
1771
2196
  # src/todo/models.py
1772
- # @CODE:TODO-001:MODEL | SPEC: SPEC-TODO-001.md
2197
+ # @CODE:EX-TODO-001:MODEL | SPEC: SPEC-TODO-001.md
1773
2198
 
1774
2199
  from datetime import datetime
1775
2200
  from sqlalchemy import Column, String, DateTime
@@ -1778,7 +2203,7 @@ from sqlalchemy.ext.declarative import declarative_base
1778
2203
  Base = declarative_base()
1779
2204
 
1780
2205
  class Todo(Base):
1781
- """@CODE:TODO-001:MODEL - Todo data model"""
2206
+ """@CODE:EX-TODO-001:MODEL - Todo data model"""
1782
2207
  __tablename__ = "todos"
1783
2208
 
1784
2209
  id = Column(String, primary_key=True)
@@ -1786,7 +2211,7 @@ class Todo(Base):
1786
2211
  created_at = Column(DateTime, default=datetime.utcnow) # Auto creation time
1787
2212
 
1788
2213
  def validate(self):
1789
- """@CODE:TODO-001:MODEL - Validation"""
2214
+ """@CODE:EX-TODO-001:MODEL - Validation"""
1790
2215
  if not self.title or len(self.title) > 200:
1791
2216
  raise ValueError("Title must be 1-200 characters")
1792
2217
  ```
@@ -1822,10 +2247,10 @@ git commit -m "♻️ refactor(TODO-001): add database models and validation"
1822
2247
  1. **TAG Chain Validation**
1823
2248
 
1824
2249
  ```bash
1825
- ✅ @SPEC:TODO-001 → .moai/specs/SPEC-TODO-001/spec.md
1826
- ✅ @TEST:TODO-001 → tests/test_todo_api.py
1827
- ✅ @CODE:TODO-001 → src/todo/ (3 files)
1828
- ✅ @DOC:TODO-001 → docs/api/todo.md (auto-generated)
2250
+ ✅ @SPEC:EX-TODO-001 → .moai/specs/SPEC-TODO-001/spec.md
2251
+ ✅ @TEST:README-EXAMPLE-TODO → tests/test_todo_api.py
2252
+ ✅ @CODE:EX-TODO-001 → src/todo/ (3 files)
2253
+ ✅ @DOC:EX-TODO-001 → docs/api/todo.md (auto-generated)
1829
2254
 
1830
2255
  TAG Chain Integrity: 100%
1831
2256
  Orphan TAGs: None
@@ -1834,7 +2259,7 @@ git commit -m "♻️ refactor(TODO-001): add database models and validation"
1834
2259
  2. **Living Document Generation**
1835
2260
 
1836
2261
  ```markdown
1837
- # @DOC:TODO-001: Todo Management API
2262
+ # @DOC:EX-TODO-001: Todo Management API
1838
2263
 
1839
2264
  ## Overview
1840
2265
 
@@ -1848,8 +2273,8 @@ git commit -m "♻️ refactor(TODO-001): add database models and validation"
1848
2273
  - URL: /todos
1849
2274
  - Request: {"title": "string (1-200 chars)"}
1850
2275
  - Response: 201 Created with todo object
1851
- - Implemented in: @CODE:TODO-001:API
1852
- - Tested in: @TEST:TODO-001
2276
+ - Implemented in: @CODE:EX-TODO-001:API
2277
+ - Tested in: @TEST:README-EXAMPLE-TODO
1853
2278
 
1854
2279
  ### Get All Todos
1855
2280
 
@@ -1877,7 +2302,7 @@ git commit -m "♻️ refactor(TODO-001): add database models and validation"
1877
2302
 
1878
2303
  ### Added
1879
2304
 
1880
- - Todo Management API with CRUD operations (@SPEC:TODO-001)
2305
+ - Todo Management API with CRUD operations (@SPEC:EX-TODO-001)
1881
2306
  - Create new todos
1882
2307
  - List all todos
1883
2308
  - Update existing todos
@@ -1899,11 +2324,11 @@ Let's verify everything generated is properly connected:
1899
2324
  rg '@(SPEC|TEST|CODE|DOC):TODO-001' -n
1900
2325
 
1901
2326
  # Output:
1902
- # .moai/specs/SPEC-TODO-001/spec.md:1: # @SPEC:TODO-001: Todo Management API
1903
- # tests/test_todo_api.py:2: # @TEST:TODO-001 | SPEC: SPEC-TODO-001.md
1904
- # src/todo/api.py:5: # @CODE:TODO-001:API | SPEC: SPEC-TODO-001.md
1905
- # src/todo/models.py:5: # @CODE:TODO-001:MODEL | SPEC: SPEC-TODO-001.md
1906
- # docs/api/todo.md:1: # @DOC:TODO-001: Todo Management API
2327
+ # .moai/specs/SPEC-TODO-001/spec.md:1: # @SPEC:EX-TODO-001: Todo Management API
2328
+ # tests/test_todo_api.py:2: # @TEST:README-EXAMPLE-TODO | SPEC: SPEC-TODO-001.md
2329
+ # src/todo/api.py:5: # @CODE:EX-TODO-001:API | SPEC: SPEC-TODO-001.md
2330
+ # src/todo/models.py:5: # @CODE:EX-TODO-001:MODEL | SPEC: SPEC-TODO-001.md
2331
+ # docs/api/todo.md:1: # @DOC:EX-TODO-001: Todo Management API
1907
2332
 
1908
2333
 
1909
2334
  # 2️⃣ Run tests
@@ -1933,21 +2358,21 @@ git log --oneline | head -5
1933
2358
 
1934
2359
  ```
1935
2360
  ✅ SPEC written (3 minutes)
1936
- └─ @SPEC:TODO-001 TAG assigned
2361
+ └─ @SPEC:EX-TODO-001 TAG assigned
1937
2362
  └─ Clear requirements in EARS format
1938
2363
 
1939
2364
  ✅ TDD implementation (5 minutes)
1940
2365
  └─ 🔴 RED: Tests written first
1941
2366
  └─ 🟢 GREEN: Minimal implementation
1942
2367
  └─ ♻️ REFACTOR: Quality improvement
1943
- └─ @TEST:TODO-001, @CODE:TODO-001 TAGs assigned
2368
+ └─ @TEST:README-EXAMPLE-TODO, @CODE:EX-TODO-001 TAGs assigned
1944
2369
  └─ 87% coverage, TRUST 5 principles verified
1945
2370
 
1946
2371
  ✅ Documentation sync (1 minute)
1947
2372
  └─ Living Document auto-generated
1948
2373
  └─ README, CHANGELOG updated
1949
2374
  └─ TAG chain validation complete
1950
- └─ @DOC:TODO-001 TAG assigned
2375
+ └─ @DOC:EX-TODO-001 TAG assigned
1951
2376
  └─ PR status: Draft → Ready for Review
1952
2377
 
1953
2378
  Result:
@@ -1973,16 +2398,33 @@ Alfred works by combining multiple specialized agents with Claude Skills.
1973
2398
  | Sub-agent | Model | Role |
1974
2399
  | ------------------ | ------ | ----------------------------------------------------------------------- |
1975
2400
  | project-manager 📋 | Sonnet | Project initialization, metadata interviews |
1976
- | spec-builder 🏗️ | Sonnet | Plan board, EARS SPEC authoring |
2401
+ | spec-builder 🏗️ | Sonnet | Plan board, EARS SPEC authoring, expert consultation recommendations |
1977
2402
  | code-builder 💎 | Sonnet | Performs complete TDD with `implementation-planner` + `tdd-implementer` |
1978
2403
  | doc-syncer 📖 | Haiku | Living Doc, README, CHANGELOG sync |
1979
- | tag-agent 🏷️ | Haiku | TAG inventory, orphan detection |
2404
+ | tag-agent 🏷️ | Haiku | TAG inventory, orphan detection, @EXPERT TAG validation |
1980
2405
  | git-manager 🚀 | Haiku | GitFlow, Draft/Ready, Auto Merge |
1981
2406
  | debug-helper 🔍 | Sonnet | Failure analysis, fix-forward strategy |
1982
2407
  | trust-checker ✅ | Haiku | TRUST 5 quality gate |
1983
2408
  | quality-gate 🛡️ | Haiku | Coverage change and release blocker review |
1984
2409
  | cc-manager 🛠️ | Sonnet | Claude Code session optimization, Skill deployment |
1985
2410
 
2411
+ ### Expert Agents (Proactively Triggered by SPEC Keywords)
2412
+
2413
+ Expert agents activate automatically when `implementation-planner` detects domain-specific keywords in SPEC documents. They provide architecture guidance, technology recommendations, and risk analysis for their specialized domains.
2414
+
2415
+ | Expert Agent | Model | Specialty | Auto-Trigger Keywords |
2416
+ | ----------------- | ------ | --------------------------------------------------- | ------------------------------------------------------------------------ |
2417
+ | backend-expert 🔧 | Sonnet | Backend architecture, API design, database, auth | 'backend', 'api', 'server', 'database', 'deployment', 'authentication' |
2418
+ | frontend-expert 💻| Sonnet | Frontend architecture, components, state mgmt | 'frontend', 'ui', 'page', 'component', 'client-side', 'web interface' |
2419
+ | devops-expert 🚀 | Sonnet | DevOps, CI/CD, deployment, containerization | 'deployment', 'docker', 'kubernetes', 'ci/cd', 'pipeline', 'aws' |
2420
+ | ui-ux-expert 🎨 | Sonnet | UI/UX design, accessibility (WCAG), design systems | 'design', 'ux', 'accessibility', 'a11y', 'figma', 'design system' |
2421
+
2422
+ **How It Works**:
2423
+ - When `/alfred:2-run` starts, `implementation-planner` scans the SPEC content
2424
+ - Matching keywords trigger automatic expert agent invocation
2425
+ - Experts provide domain-specific architecture guidance
2426
+ - All expert consultations are tagged with `@EXPERT:DOMAIN` for traceability
2427
+
1986
2428
  ### Skills (Progressive Disclosure - v0.4 New!)
1987
2429
 
1988
2430
  Alfred organizes Claude Skills in a 4-tier architecture using **Progressive Disclosure** to load Just-In-Time only when needed. Each Skill is a production-grade guide stored in `.claude/skills/` directory.
@@ -2035,6 +2477,7 @@ Specialized domain expertise
2035
2477
  | `moai-domain-cli-tool` | CLI tool development, argument parsing, POSIX compliance, user-friendly help messages |
2036
2478
  | `moai-domain-data-science` | Data analysis, visualization, statistical modeling, reproducible research workflows |
2037
2479
  | `moai-domain-database` | Database design, schema optimization, indexing strategies, migration management |
2480
+ | `moai-domain-design-systems` | Design system architecture, W3C DTCG tokens, WCAG 2.2 accessibility, design-to-code, Figma MCP |
2038
2481
  | `moai-domain-devops` | CI/CD pipelines, Docker containerization, Kubernetes orchestration, IaC |
2039
2482
  | `moai-domain-frontend` | React/Vue/Angular development, state management, performance optimization, accessibility |
2040
2483
  | `moai-domain-ml` | Machine learning model training, evaluation, deployment, MLOps workflows |
@@ -2158,42 +2601,7 @@ Or when TAGs are missing:
2158
2601
 
2159
2602
  **Why It Matters**: Prevents data loss from mistakes and ensures @TAG traceability. You can always restore from the checkpoint if something goes wrong.
2160
2603
 
2161
- #### 3. PostToolUse (After Tool Execution)
2162
-
2163
- **Triggers**: After executing file edits, code changes, or MultiEdit operations
2164
- **Purpose**: Automatically run tests to verify changes didn't break anything
2165
-
2166
- **Auto-Test Execution**:
2167
-
2168
- Supported Languages (9 total):
2169
- - 🐍 **Python**: `pytest` with coverage report
2170
- - 📘 **TypeScript/JavaScript**: `Vitest` or `Jest`
2171
- - 🐹 **Go**: `go test` with `-v` flag
2172
- - 🦀 **Rust**: `cargo test` with `--all`
2173
- - ☕ **Java**: `JUnit` via Maven/Gradle
2174
- - 🎯 **Kotlin**: `JUnit` with Gradle
2175
- - 🍎 **Swift**: `XCTest` via Xcode
2176
- - 🎨 **Dart**: `flutter test`
2177
-
2178
- **What You See**:
2179
-
2180
- ```
2181
- ✅ Tests passed (47 passed in 2.3s)
2182
- Coverage: 87% (improved from 84%)
2183
- ```
2184
-
2185
- Or if tests fail:
2186
-
2187
- ```
2188
- ❌ Test failures detected
2189
- ├─ src/auth/service.test.ts:23
2190
- │ Expected token.length > 0
2191
- └─ Revert to previous version? (y/n)
2192
- ```
2193
-
2194
- **Why It Matters**: Instant feedback on code quality. Catches breaking changes immediately before you commit.
2195
-
2196
- #### 4. UserPromptSubmit (Prompt Input)
2604
+ #### 3. UserPromptSubmit (Prompt Input)
2197
2605
 
2198
2606
  **Triggers**: When you submit a prompt to Claude
2199
2607
  **Purpose**: JIT (Just-In-Time) context loading—automatically add relevant files
@@ -2207,7 +2615,7 @@ Or if tests fail:
2207
2615
 
2208
2616
  **Why It Matters**: Saves time and ensures Claude has all the relevant context for your request.
2209
2617
 
2210
- #### 5. SessionEnd (Session Cleanup)
2618
+ #### 4. SessionEnd (Session Cleanup)
2211
2619
 
2212
2620
  **Triggers**: When you close your Claude Code session
2213
2621
  **Purpose**: Cleanup tasks and state preservation
@@ -2296,7 +2704,6 @@ If you need to temporarily disable hooks, edit `.claude/settings.json`:
2296
2704
 
2297
2705
  | Version | Key Features | Date |
2298
2706
  | ----------- | ------------------------------------------------------------------------------------------------ | ---------- |
2299
- | **v0.8.3** | 🔄 4-Step Workflow Logic (Intent → Plan → Execute → Report) + AI decision framework | 2025-10-30 |
2300
2707
  | **v0.8.2** | 📖 EARS terminology update: "Constraints" → "Unwanted Behaviors" for clarity | 2025-10-29 |
2301
2708
  | **v0.8.1** | 🔄 Command rename: `/alfred:9-help` → `/alfred:9-feedback` + User feedback workflow improvements | 2025-10-28 |
2302
2709
  | **v0.8.0** | 🏷️ @DOC TAG auto-generation system + SessionStart version check enhancement | 2025-10-27 |
@@ -2310,12 +2717,331 @@ If you need to temporarily disable hooks, edit `.claude/settings.json`:
2310
2717
 
2311
2718
  ---
2312
2719
 
2720
+ ## 🔧 Beginner's Troubleshooting Guide
2721
+
2722
+ Common errors and solutions for getting started with MoAI-ADK.
2723
+
2724
+ ### 1. uv is Not Installed
2725
+
2726
+ **Symptom**:
2727
+ ```bash
2728
+ $ uv --version
2729
+ bash: uv: command not found
2730
+ ```
2731
+
2732
+ **Cause**: uv not installed or not in PATH
2733
+
2734
+ **Solution**:
2735
+
2736
+ **macOS/Linux**:
2737
+ ```bash
2738
+ # Install
2739
+ curl -LsSf https://astral.sh/uv/install.sh | sh
2740
+
2741
+ # Restart shell
2742
+ source ~/.bashrc # or ~/.zshrc
2743
+
2744
+ # Verify
2745
+ uv --version
2746
+ ```
2747
+
2748
+ **Windows (PowerShell)**:
2749
+ ```powershell
2750
+ powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
2751
+
2752
+ # Verify
2753
+ uv --version
2754
+ ```
2755
+
2756
+ **If still not working**:
2757
+ ```bash
2758
+ # Manually add PATH (macOS/Linux)
2759
+ export PATH="$HOME/.cargo/bin:$PATH"
2760
+
2761
+ # Verify
2762
+ uv --version
2763
+ ```
2764
+
2765
+ ---
2766
+
2767
+ ### 2. Python Version Mismatch
2768
+
2769
+ **Symptom**:
2770
+ ```
2771
+ Python 3.8 found, but 3.13+ required
2772
+ ```
2773
+
2774
+ **Cause**: Python version is less than 3.13
2775
+
2776
+ **Solution**:
2777
+
2778
+ **Option A: Using pyenv (Recommended)**:
2779
+ ```bash
2780
+ # Install pyenv
2781
+ curl https://pyenv.run | bash
2782
+
2783
+ # Install Python 3.13
2784
+ pyenv install 3.13
2785
+ pyenv global 3.13
2786
+
2787
+ # Verify
2788
+ python --version # Python 3.13.x
2789
+ ```
2790
+
2791
+ **Option B: Let uv manage Python**:
2792
+ ```bash
2793
+ # uv automatically downloads Python 3.13
2794
+ uv python install 3.13
2795
+ uv python pin 3.13
2796
+
2797
+ # Verify
2798
+ python --version
2799
+ ```
2800
+
2801
+ ---
2802
+
2803
+ ### 3. Git Not Found
2804
+
2805
+ **Symptom**:
2806
+ ```
2807
+ ✗ Git (runtime): not found
2808
+ ```
2809
+
2810
+ **Cause**: Git not installed on system
2811
+
2812
+ **Solution**:
2813
+
2814
+ **macOS**:
2815
+ ```bash
2816
+ # Using Homebrew
2817
+ brew install git
2818
+
2819
+ # Or install Xcode Command Line Tools
2820
+ xcode-select --install
2821
+ ```
2822
+
2823
+ **Ubuntu/Debian**:
2824
+ ```bash
2825
+ sudo apt update
2826
+ sudo apt install git -y
2827
+ ```
2828
+
2829
+ **Windows**:
2830
+ ```powershell
2831
+ # Using winget
2832
+ winget install Git.Git
2833
+
2834
+ # Or download from https://git-scm.com/download/win
2835
+ ```
2836
+
2837
+ **Verify**:
2838
+ ```bash
2839
+ git --version # git version 2.x.x
2840
+ ```
2841
+
2842
+ ---
2843
+
2844
+ ### 4. Claude Code Doesn't Recognize .moai/ Folder
2845
+
2846
+ **Symptom**:
2847
+ ```
2848
+ "Project not initialized"
2849
+ /alfred:0-project command doesn't work
2850
+ ```
2851
+
2852
+ **Cause**: `.moai/` or `.claude/` folders missing or corrupted
2853
+
2854
+ **Solution**:
2855
+
2856
+ ```bash
2857
+ # 1. Verify current directory
2858
+ pwd # /path/to/your-project
2859
+
2860
+ # 2. Check if .moai/ exists
2861
+ ls -la .moai/config.json
2862
+
2863
+ # 3. If missing, reinitialize
2864
+ moai-adk init .
2865
+
2866
+ # 4. Restart Claude Code
2867
+ exit # Exit Claude Code
2868
+ claude # Restart
2869
+ ```
2870
+
2871
+ **Verify**:
2872
+ ```bash
2873
+ moai-adk doctor
2874
+ # All items should show ✅
2875
+ ```
2876
+
2877
+ ---
2878
+
2879
+ ### 5. Module Not Found When Running Tests
2880
+
2881
+ **Symptom**:
2882
+ ```
2883
+ FAILED tests/test_hello.py - ModuleNotFoundError: No module named 'fastapi'
2884
+ ```
2885
+
2886
+ **Cause**: Required package not installed
2887
+
2888
+ **Solution**:
2889
+
2890
+ ```bash
2891
+ # Install dependencies from project root
2892
+ uv sync
2893
+
2894
+ # Or install specific packages
2895
+ uv add fastapi pytest
2896
+
2897
+ # Activate virtual environment
2898
+ source .venv/bin/activate # macOS/Linux
2899
+ .venv\Scripts\activate # Windows
2900
+
2901
+ # Run tests
2902
+ pytest tests/ -v
2903
+ ```
2904
+
2905
+ ---
2906
+
2907
+ ### 6. `/alfred` Commands Not Working
2908
+
2909
+ **Symptom**:
2910
+ ```
2911
+ Unknown command: /alfred:1-plan
2912
+ ```
2913
+
2914
+ **Cause**: Claude Code version issue or `.claude/` folder corrupted
2915
+
2916
+ **Solution**:
2917
+
2918
+ ```bash
2919
+ # 1. Check Claude Code version (need v1.5.0+)
2920
+ claude --version
2921
+
2922
+ # 2. Verify .claude/ folder
2923
+ ls -la .claude/commands/
2924
+
2925
+ # 3. Reinitialize if needed
2926
+ moai-adk init .
2927
+
2928
+ # 4. Restart Claude Code
2929
+ exit
2930
+ claude
2931
+ ```
2932
+
2933
+ ---
2934
+
2935
+ ### 7. TAG Chain Broken
2936
+
2937
+ **Symptom**:
2938
+ ```
2939
+ ⚠ Orphan TAG detected: @TEST:EX-HELLO-001 (no matching @SPEC)
2940
+ ```
2941
+
2942
+ **Cause**: SPEC deleted or TAGs don't match
2943
+
2944
+ **Solution**:
2945
+
2946
+ ```bash
2947
+ # 1. Validate TAG chain
2948
+ rg '@(SPEC|TEST|CODE):HELLO-001' -n
2949
+
2950
+ # 2. Check if SPEC exists
2951
+ rg '@SPEC:EX-HELLO-001' -n .moai/specs/
2952
+
2953
+ # 3. If SPEC missing, regenerate
2954
+ /alfred:1-plan "feature description"
2955
+
2956
+ # Or fix TAG in test file
2957
+ # Edit tests/test_hello.py: @TEST:EX-HELLO-001 → @TEST:README-EXAMPLE-HELLO
2958
+
2959
+ # 4. Sync
2960
+ /alfred:3-sync
2961
+ ```
2962
+
2963
+ ---
2964
+
2965
+ ### 8. General Debugging Commands
2966
+
2967
+ **Check System Status**:
2968
+ ```bash
2969
+ moai-adk doctor
2970
+ ```
2971
+ Shows all dependency checks + recommendations
2972
+
2973
+ **Check Project Structure**:
2974
+ ```bash
2975
+ tree -L 2 .moai/
2976
+ ```
2977
+
2978
+ **Validate TAG Chain Integrity**:
2979
+ ```bash
2980
+ rg '@(SPEC|TEST|CODE|DOC):' -n | wc -l
2981
+ ```
2982
+ Shows total TAG count
2983
+
2984
+ **Check Git Status**:
2985
+ ```bash
2986
+ git status
2987
+ git log --oneline -5
2988
+ ```
2989
+
2990
+ ---
2991
+
2992
+ ### Debugging Checklist
2993
+
2994
+ When something goes wrong:
2995
+
2996
+ 1. **Read**: Copy the complete error message
2997
+ 2. **Search**: Check GitHub Issues for similar errors
2998
+ 3. **Diagnose**: Run `moai-adk doctor`
2999
+ 4. **Restart**: Quit and restart Claude Code
3000
+ 5. **Ask**: Post in GitHub Discussions
3001
+
3002
+ Quick diagnosis with details:
3003
+ ```bash
3004
+ moai-adk doctor --verbose
3005
+ ```
3006
+
3007
+ ---
3008
+
3009
+ ### Need More Help?
3010
+
3011
+ - **GitHub Issues**: Search for similar problems
3012
+ - **GitHub Discussions**: Ask questions
3013
+ - **Discord Community**: Real-time chat support
3014
+
3015
+ **When reporting issues, include**:
3016
+ 1. Output from `moai-adk doctor --verbose`
3017
+ 2. Complete error message (screenshot or text)
3018
+ 3. Steps to reproduce
3019
+ 4. Your OS and version
3020
+
3021
+ ---
3022
+
3023
+ ### Frequently Asked Questions
3024
+
3025
+ **Q. Can I install on an existing project?**
3026
+ A. Yes! Run `moai-adk init .` - it only adds `.moai/` structure without touching existing code.
3027
+
3028
+ **Q. How do I run tests?**
3029
+ A. `/alfred:2-run` runs tests first. You can also run `pytest`, `pnpm test` separately.
3030
+
3031
+ **Q. How do I verify documentation is current?**
3032
+ A. Run `/alfred:3-sync` which generates a Sync Report. Check the PR to see the report.
3033
+
3034
+ **Q. Can I do this manually without Alfred?**
3035
+ A. Possible, but remember: SPEC → TEST → CODE → DOC order and keep @TAGs updated.
3036
+
3037
+ ---
3038
+
2313
3039
  ## Additional Resources
2314
3040
 
2315
3041
  | Purpose | Resource |
2316
3042
  | ------------------------- | --------------------------------------------------------------- |
2317
- | Skills detailed structure | `.claude/skills/` directory (55+ Skills) |
2318
- | Sub-agent details | `.claude/agents/alfred/` directory (12 agents) |
3043
+ | Skills detailed structure | `.claude/skills/` directory (74 Skills) |
3044
+ | Sub-agent details | `.claude/agents/alfred/` directory (16 agents + 4 commands) |
2319
3045
  | Workflow guide | `.claude/commands/alfred/` (4 commands: 0-project ~ 3-sync) |
2320
3046
  | Documentation | Coming soon (see `.moai/`, `.claude/`, `docs/` in your project) |
2321
3047
  | Release notes | GitHub Releases: https://github.com/modu-ai/moai-adk/releases |