moai-adk 0.8.0__py3-none-any.whl → 0.15.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of moai-adk might be problematic. Click here for more details.
- moai_adk/cli/commands/init.py +14 -2
- moai_adk/cli/commands/update.py +229 -60
- moai_adk/core/config/migration.py +1 -1
- moai_adk/core/issue_creator.py +313 -0
- moai_adk/core/project/detector.py +201 -12
- moai_adk/core/project/initializer.py +62 -1
- moai_adk/core/project/phase_executor.py +48 -6
- moai_adk/core/tags/__init__.py +86 -0
- moai_adk/core/tags/ci_validator.py +463 -0
- moai_adk/core/tags/cli.py +283 -0
- moai_adk/core/tags/generator.py +109 -0
- moai_adk/core/tags/inserter.py +99 -0
- moai_adk/core/tags/mapper.py +126 -0
- moai_adk/core/tags/parser.py +76 -0
- moai_adk/core/tags/pre_commit_validator.py +393 -0
- moai_adk/core/tags/reporter.py +956 -0
- moai_adk/core/tags/tags.py +149 -0
- moai_adk/core/tags/validator.py +897 -0
- moai_adk/core/template_engine.py +268 -0
- moai_adk/templates/.claude/agents/alfred/backend-expert.md +319 -0
- moai_adk/templates/.claude/agents/alfred/cc-manager.md +25 -2
- moai_adk/templates/.claude/agents/alfred/debug-helper.md +24 -12
- moai_adk/templates/.claude/agents/alfred/devops-expert.md +464 -0
- moai_adk/templates/.claude/agents/alfred/doc-syncer.md +20 -13
- moai_adk/templates/.claude/agents/alfred/frontend-expert.md +357 -0
- moai_adk/templates/.claude/agents/alfred/git-manager.md +47 -16
- moai_adk/templates/.claude/agents/alfred/implementation-planner.md +95 -15
- moai_adk/templates/.claude/agents/alfred/project-manager.md +78 -12
- moai_adk/templates/.claude/agents/alfred/quality-gate.md +28 -5
- moai_adk/templates/.claude/agents/alfred/skill-factory.md +30 -2
- moai_adk/templates/.claude/agents/alfred/spec-builder.md +133 -13
- moai_adk/templates/.claude/agents/alfred/tag-agent.md +104 -8
- moai_adk/templates/.claude/agents/alfred/tdd-implementer.md +133 -16
- moai_adk/templates/.claude/agents/alfred/trust-checker.md +27 -4
- moai_adk/templates/.claude/agents/alfred/ui-ux-expert.md +571 -0
- moai_adk/templates/.claude/commands/alfred/0-project.md +466 -125
- moai_adk/templates/.claude/commands/alfred/1-plan.md +208 -71
- moai_adk/templates/.claude/commands/alfred/2-run.md +276 -55
- moai_adk/templates/.claude/commands/alfred/3-sync.md +439 -53
- moai_adk/templates/.claude/commands/alfred/9-feedback.md +149 -0
- moai_adk/templates/.claude/hooks/alfred/core/project.py +361 -29
- moai_adk/templates/.claude/hooks/alfred/core/timeout.py +136 -0
- moai_adk/templates/.claude/hooks/alfred/core/ttl_cache.py +108 -0
- moai_adk/templates/.claude/hooks/alfred/core/version_cache.py +198 -0
- moai_adk/templates/.claude/hooks/alfred/handlers/__init__.py +14 -6
- moai_adk/templates/.claude/hooks/alfred/post_tool__log_changes.py +94 -0
- moai_adk/templates/.claude/hooks/alfred/pre_tool__auto_checkpoint.py +100 -0
- moai_adk/templates/.claude/hooks/alfred/session_end__cleanup.py +94 -0
- moai_adk/templates/.claude/hooks/alfred/session_start__show_project_info.py +94 -0
- moai_adk/templates/.claude/hooks/alfred/{core → shared/core}/__init__.py +2 -2
- moai_adk/templates/.claude/hooks/alfred/{core → shared/core}/checkpoint.py +3 -3
- moai_adk/templates/.claude/hooks/alfred/{core → shared/core}/context.py +5 -5
- moai_adk/templates/.claude/hooks/alfred/shared/core/project.py +749 -0
- moai_adk/templates/.claude/hooks/alfred/{core → shared/core}/tags.py +55 -23
- moai_adk/templates/.claude/hooks/alfred/shared/core/version_cache.py +198 -0
- moai_adk/templates/.claude/hooks/alfred/shared/handlers/__init__.py +21 -0
- moai_adk/templates/.claude/hooks/alfred/shared/handlers/notification.py +154 -0
- moai_adk/templates/.claude/hooks/alfred/{handlers → shared/handlers}/session.py +28 -15
- moai_adk/templates/.claude/hooks/alfred/{handlers → shared/handlers}/tool.py +3 -6
- moai_adk/templates/.claude/hooks/alfred/{handlers → shared/handlers}/user.py +19 -0
- moai_adk/templates/.claude/hooks/alfred/user_prompt__jit_load_docs.py +112 -0
- moai_adk/templates/.claude/hooks/alfred/utils/__init__.py +1 -0
- moai_adk/templates/.claude/hooks/alfred/utils/timeout.py +161 -0
- moai_adk/templates/.claude/settings.json +5 -5
- moai_adk/templates/.claude/skills/moai-alfred-agent-guide/SKILL.md +70 -0
- moai_adk/templates/.claude/skills/moai-alfred-agent-guide/examples.md +62 -0
- moai_adk/templates/{.moai/memory/CLAUDE-AGENTS-GUIDE.md → .claude/skills/moai-alfred-agent-guide/reference.md} +34 -0
- moai_adk/templates/.claude/skills/moai-alfred-config-schema/SKILL.md +56 -0
- moai_adk/templates/.claude/skills/moai-alfred-config-schema/examples.md +28 -0
- moai_adk/templates/.claude/skills/moai-alfred-context-budget/SKILL.md +62 -0
- moai_adk/templates/.claude/skills/moai-alfred-context-budget/examples.md +28 -0
- moai_adk/templates/.claude/skills/moai-alfred-context-budget/reference.md +405 -0
- moai_adk/templates/.claude/skills/moai-alfred-dev-guide/SKILL.md +51 -0
- moai_adk/templates/.claude/skills/moai-alfred-dev-guide/examples.md +355 -0
- moai_adk/templates/.claude/skills/moai-alfred-dev-guide/reference.md +239 -0
- moai_adk/templates/.claude/skills/moai-alfred-expertise-detection/SKILL.md +323 -0
- moai_adk/templates/.claude/skills/moai-alfred-expertise-detection/examples.md +286 -0
- moai_adk/templates/.claude/skills/moai-alfred-expertise-detection/reference.md +126 -0
- moai_adk/templates/.claude/skills/moai-alfred-gitflow-policy/SKILL.md +74 -0
- moai_adk/templates/.claude/skills/moai-alfred-gitflow-policy/examples.md +4 -0
- moai_adk/templates/.claude/skills/moai-alfred-gitflow-policy/reference.md +269 -0
- moai_adk/templates/.claude/skills/moai-alfred-issue-labels/SKILL.md +19 -0
- moai_adk/templates/.claude/skills/moai-alfred-issue-labels/examples.md +4 -0
- moai_adk/templates/.claude/skills/moai-alfred-issue-labels/reference.md +150 -0
- moai_adk/templates/.claude/skills/moai-alfred-persona-roles/SKILL.md +198 -0
- moai_adk/templates/.claude/skills/moai-alfred-persona-roles/examples.md +431 -0
- moai_adk/templates/.claude/skills/moai-alfred-persona-roles/reference.md +141 -0
- moai_adk/templates/.claude/skills/moai-alfred-practices/SKILL.md +89 -0
- moai_adk/templates/.claude/skills/moai-alfred-practices/examples.md +122 -0
- moai_adk/templates/.claude/skills/moai-alfred-proactive-suggestions/SKILL.md +508 -0
- moai_adk/templates/.claude/skills/moai-alfred-proactive-suggestions/examples.md +481 -0
- moai_adk/templates/.claude/skills/moai-alfred-proactive-suggestions/reference.md +100 -0
- moai_adk/templates/.claude/skills/moai-alfred-reporting/SKILL.md +273 -0
- moai_adk/templates/.claude/skills/moai-alfred-rules/SKILL.md +77 -0
- moai_adk/templates/.claude/skills/moai-alfred-rules/examples.md +265 -0
- moai_adk/templates/.claude/skills/moai-alfred-session-state/SKILL.md +19 -0
- moai_adk/templates/.claude/skills/moai-alfred-session-state/examples.md +4 -0
- moai_adk/templates/.claude/skills/moai-alfred-session-state/reference.md +84 -0
- moai_adk/templates/.claude/skills/moai-alfred-spec-authoring/README.md +137 -0
- moai_adk/templates/.claude/skills/moai-alfred-spec-authoring/SKILL.md +219 -0
- moai_adk/templates/.claude/skills/{moai-spec-authoring → moai-alfred-spec-authoring}/examples/validate-spec.sh +3 -3
- moai_adk/templates/.claude/skills/moai-alfred-spec-authoring/examples.md +541 -0
- moai_adk/templates/.claude/skills/moai-alfred-spec-authoring/reference.md +622 -0
- moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-extended/SKILL.md +115 -0
- moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-extended/examples.md +4 -0
- moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-extended/reference.md +348 -0
- moai_adk/templates/.claude/skills/moai-alfred-todowrite-pattern/SKILL.md +19 -0
- moai_adk/templates/.claude/skills/moai-alfred-todowrite-pattern/examples.md +4 -0
- moai_adk/templates/.claude/skills/moai-alfred-todowrite-pattern/reference.md +211 -0
- moai_adk/templates/.claude/skills/moai-alfred-workflow/SKILL.md +288 -0
- moai_adk/templates/.claude/skills/moai-cc-skill-descriptions/SKILL.md +19 -0
- moai_adk/templates/.claude/skills/moai-cc-skill-descriptions/examples.md +4 -0
- moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/SKILL.md +3 -3
- moai_adk/templates/.claude/skills/moai-design-systems/SKILL.md +802 -0
- moai_adk/templates/.claude/skills/moai-design-systems/examples.md +1238 -0
- moai_adk/templates/.claude/skills/moai-design-systems/reference.md +673 -0
- moai_adk/templates/.claude/skills/moai-domain-frontend/SKILL.md +17 -13
- moai_adk/templates/.claude/skills/moai-foundation-ears/SKILL.md +9 -6
- moai_adk/templates/.claude/skills/moai-lang-go/SKILL.md +15 -12
- moai_adk/templates/.claude/skills/moai-lang-java/SKILL.md +14 -12
- moai_adk/templates/.claude/skills/moai-lang-php/SKILL.md +14 -11
- moai_adk/templates/.claude/skills/moai-lang-python/SKILL.md +10 -8
- moai_adk/templates/.claude/skills/moai-lang-rust/SKILL.md +15 -12
- moai_adk/templates/.claude/skills/moai-lang-scala/SKILL.md +13 -11
- moai_adk/templates/.claude/skills/moai-lang-typescript/SKILL.md +16 -10
- moai_adk/templates/.claude/skills/moai-project-documentation.md +622 -0
- moai_adk/templates/.git-hooks/pre-push +143 -0
- moai_adk/templates/.github/workflows/c-tag-validation.yml +11 -0
- moai_adk/templates/.github/workflows/cpp-tag-validation.yml +11 -0
- moai_adk/templates/.github/workflows/csharp-tag-validation.yml +11 -0
- moai_adk/templates/.github/workflows/dart-tag-validation.yml +11 -0
- moai_adk/templates/.github/workflows/go-tag-validation.yml +130 -0
- moai_adk/templates/.github/workflows/java-tag-validation.yml +11 -0
- moai_adk/templates/.github/workflows/javascript-tag-validation.yml +135 -0
- moai_adk/templates/.github/workflows/kotlin-tag-validation.yml +11 -0
- moai_adk/templates/.github/workflows/moai-gitflow.yml +166 -3
- moai_adk/templates/.github/workflows/moai-release-create.yml +100 -0
- moai_adk/templates/.github/workflows/moai-release-pipeline.yml +188 -0
- moai_adk/templates/.github/workflows/php-tag-validation.yml +11 -0
- moai_adk/templates/.github/workflows/python-tag-validation.yml +118 -0
- moai_adk/templates/.github/workflows/release.yml +118 -0
- moai_adk/templates/.github/workflows/ruby-tag-validation.yml +11 -0
- moai_adk/templates/.github/workflows/rust-tag-validation.yml +11 -0
- moai_adk/templates/.github/workflows/shell-tag-validation.yml +11 -0
- moai_adk/templates/.github/workflows/spec-issue-sync.yml +206 -35
- moai_adk/templates/.github/workflows/swift-tag-validation.yml +11 -0
- moai_adk/templates/.github/workflows/tag-report.yml +269 -0
- moai_adk/templates/.github/workflows/tag-validation.yml +186 -0
- moai_adk/templates/.github/workflows/typescript-tag-validation.yml +154 -0
- moai_adk/templates/.moai/config.json +21 -2
- moai_adk/templates/CLAUDE.md +972 -78
- moai_adk/templates/workflows/go-tag-validation.yml +30 -0
- moai_adk/templates/workflows/javascript-tag-validation.yml +41 -0
- moai_adk/templates/workflows/python-tag-validation.yml +42 -0
- moai_adk/templates/workflows/typescript-tag-validation.yml +31 -0
- moai_adk/utils/banner.py +5 -5
- {moai_adk-0.8.0.dist-info → moai_adk-0.15.0.dist-info}/METADATA +1518 -161
- {moai_adk-0.8.0.dist-info → moai_adk-0.15.0.dist-info}/RECORD +183 -100
- moai_adk/templates/.claude/hooks/alfred/HOOK_SCHEMA_VALIDATION.md +0 -313
- moai_adk/templates/.claude/hooks/alfred/README.md +0 -230
- moai_adk/templates/.claude/hooks/alfred/alfred_hooks.py +0 -174
- moai_adk/templates/.claude/hooks/alfred/handlers/notification.py +0 -25
- moai_adk/templates/.claude/hooks/alfred/test_hook_output.py +0 -175
- moai_adk/templates/.claude/output-styles/alfred/agentic-coding.md +0 -640
- moai_adk/templates/.claude/output-styles/alfred/moai-adk-learning.md +0 -696
- moai_adk/templates/.claude/output-styles/alfred/study-with-alfred.md +0 -474
- moai_adk/templates/.claude/skills/moai-spec-authoring/README.md +0 -137
- moai_adk/templates/.claude/skills/moai-spec-authoring/SKILL.md +0 -218
- moai_adk/templates/.claude/skills/moai-spec-authoring/examples.md +0 -541
- moai_adk/templates/.claude/skills/moai-spec-authoring/reference.md +0 -622
- moai_adk/templates/.github/ISSUE_TEMPLATE/spec.yml +0 -176
- moai_adk/templates/.github/PULL_REQUEST_TEMPLATE.md +0 -69
- moai_adk/templates/.moai/memory/DEVELOPMENT-GUIDE.md +0 -344
- moai_adk/templates/.moai/memory/GITFLOW-PROTECTION-POLICY.md +0 -220
- moai_adk/templates/.moai/memory/SPEC-METADATA.md +0 -356
- moai_adk/templates/.moai/memory/config-schema.md +0 -444
- moai_adk/templates/.moai/memory/gitflow-protection-policy.md +0 -220
- moai_adk/templates/.moai/memory/spec-metadata.md +0 -356
- moai_adk/templates/.moai/project/product.md +0 -161
- moai_adk/templates/.moai/project/structure.md +0 -156
- moai_adk/templates/.moai/project/tech.md +0 -227
- moai_adk/templates/__init__.py +0 -2
- /moai_adk/templates/{.moai/memory/CONFIG-SCHEMA.md → .claude/skills/moai-alfred-config-schema/reference.md} +0 -0
- /moai_adk/templates/{.moai/memory/CLAUDE-PRACTICES.md → .claude/skills/moai-alfred-practices/reference.md} +0 -0
- /moai_adk/templates/{.moai/memory/CLAUDE-RULES.md → .claude/skills/moai-alfred-rules/reference.md} +0 -0
- /moai_adk/templates/{.moai/memory/SKILLS-DESCRIPTION-POLICY.md → .claude/skills/moai-cc-skill-descriptions/reference.md} +0 -0
- /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/CHECKLIST.md +0 -0
- /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/EXAMPLES.md +0 -0
- /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/INTERACTIVE-DISCOVERY.md +0 -0
- /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/METADATA.md +0 -0
- /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/PARALLEL-ANALYSIS-REPORT.md +0 -0
- /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/PYTHON-VERSION-MATRIX.md +0 -0
- /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/SKILL-FACTORY-WORKFLOW.md +0 -0
- /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/SKILL-UPDATE-ADVISOR.md +0 -0
- /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/STEP-BY-STEP-GUIDE.md +0 -0
- /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/STRUCTURE.md +0 -0
- /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/WEB-RESEARCH.md +0 -0
- /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/reference.md +0 -0
- /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/scripts/generate-structure.sh +0 -0
- /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/scripts/validate-skill.sh +0 -0
- /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/templates/SKILL_TEMPLATE.md +0 -0
- /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/templates/examples-template.md +0 -0
- /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/templates/reference-template.md +0 -0
- /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/templates/scripts-template.sh +0 -0
- {moai_adk-0.8.0.dist-info → moai_adk-0.15.0.dist-info}/WHEEL +0 -0
- {moai_adk-0.8.0.dist-info → moai_adk-0.15.0.dist-info}/entry_points.txt +0 -0
- {moai_adk-0.8.0.dist-info → moai_adk-0.15.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: moai-adk
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.15.0
|
|
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.
|
|
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)
|
|
47
|
+
[한국어](README.ko.md) | [English](README.md)
|
|
44
48
|
|
|
45
49
|
[](https://pypi.org/project/moai-adk/)
|
|
46
50
|
[](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
|
-
##
|
|
165
|
+
## 🖥️ Platform Support
|
|
162
166
|
|
|
163
|
-
|
|
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
|
-
###
|
|
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
|
-
|
|
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
|
-
**
|
|
208
|
+
**Platform Selection Guide**:
|
|
209
|
+
|
|
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 |
|
|
182
217
|
|
|
183
|
-
|
|
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
|
+
```
|
|
184
235
|
|
|
185
|
-
Install MoAI-ADK
|
|
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
|
-
#
|
|
241
|
+
# Result: ✅ Installed moai-adk v0.14.0
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
**Verification**:
|
|
245
|
+
```bash
|
|
192
246
|
moai-adk --version
|
|
193
|
-
# Output: MoAI-ADK
|
|
247
|
+
# Output: MoAI-ADK v0.14.0
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
---
|
|
251
|
+
|
|
252
|
+
### Step 2: Create Your First Project (about 1 minute)
|
|
253
|
+
|
|
254
|
+
#### Command
|
|
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
|
+
}
|
|
194
429
|
```
|
|
195
430
|
|
|
196
|
-
|
|
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
|
|
197
457
|
|
|
198
|
-
|
|
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
|
|
199
462
|
|
|
200
|
-
|
|
463
|
+
### How to Change Language
|
|
201
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
|
-
**
|
|
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
|
-
|
|
215
|
-
|
|
522
|
+
Complete directory structure created:
|
|
216
523
|
```
|
|
217
524
|
my-project/
|
|
218
525
|
├── .moai/ # MoAI-ADK project configuration
|
|
@@ -255,7 +562,7 @@ my-project/
|
|
|
255
562
|
│ │ ├── 1-plan.md # SPEC authoring
|
|
256
563
|
│ │ ├── 2-run.md # TDD implementation
|
|
257
564
|
│ │ └── 3-sync.md # Documentation sync
|
|
258
|
-
│ ├── skills/ #
|
|
565
|
+
│ ├── skills/ # 55+ Claude Skills
|
|
259
566
|
│ │ ├── moai-foundation-* # 6 Foundation tier
|
|
260
567
|
│ │ ├── moai-essentials-* # 4 Essentials tier
|
|
261
568
|
│ │ ├── moai-alfred-* # 7 Alfred tier
|
|
@@ -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,107 +582,300 @@ my-project/
|
|
|
280
582
|
└── README.md
|
|
281
583
|
```
|
|
282
584
|
|
|
283
|
-
|
|
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
|
|
284
614
|
|
|
285
|
-
|
|
615
|
+
**Goal**: Experience the complete MoAI-ADK workflow in 10 minutes
|
|
616
|
+
**Learn**: SPEC writing, TDD implementation, documentation automation, @TAG system
|
|
286
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
|
+
---
|
|
626
|
+
|
|
627
|
+
### Step 1: Write SPEC (2 minutes)
|
|
628
|
+
|
|
629
|
+
#### Command
|
|
287
630
|
```bash
|
|
288
|
-
|
|
289
|
-
claude
|
|
631
|
+
/alfred:1-plan "GET /hello endpoint - receive query parameter 'name' and return greeting"
|
|
290
632
|
```
|
|
291
633
|
|
|
292
|
-
|
|
634
|
+
#### Alfred Automatically Creates
|
|
635
|
+
```
|
|
636
|
+
✅ SPEC ID: HELLO-001
|
|
637
|
+
✅ File: .moai/specs/SPEC-HELLO-001/spec.md
|
|
638
|
+
✅ Branch: feature/SPEC-HELLO-001
|
|
639
|
+
```
|
|
293
640
|
|
|
641
|
+
#### Check Generated SPEC
|
|
642
|
+
```bash
|
|
643
|
+
cat .moai/specs/SPEC-HELLO-001/spec.md
|
|
294
644
|
```
|
|
295
|
-
|
|
645
|
+
|
|
646
|
+
**Example Content**:
|
|
647
|
+
```yaml
|
|
648
|
+
---
|
|
649
|
+
id: HELLO-001
|
|
650
|
+
version: 0.0.1
|
|
651
|
+
status: draft
|
|
652
|
+
priority: high
|
|
653
|
+
---
|
|
654
|
+
|
|
655
|
+
# `@SPEC:EX-HELLO-001: Hello World API
|
|
656
|
+
|
|
657
|
+
## Ubiquitous Requirements
|
|
658
|
+
- System SHALL provide HTTP GET /hello endpoint
|
|
659
|
+
|
|
660
|
+
## Event-driven Requirements
|
|
661
|
+
- WHEN query parameter 'name' is provided, THEN return "Hello, {name}!"
|
|
662
|
+
- WHEN name is absent, THEN return "Hello, World!"
|
|
663
|
+
|
|
664
|
+
## Constraints
|
|
665
|
+
- name limited to 50 characters max
|
|
666
|
+
- Response format: JSON
|
|
296
667
|
```
|
|
297
668
|
|
|
298
|
-
|
|
669
|
+
✅ **Verify**: `ls .moai/specs/SPEC-HELLO-001/`
|
|
670
|
+
|
|
671
|
+
---
|
|
299
672
|
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
673
|
+
### Step 2: TDD Implementation (5 minutes)
|
|
674
|
+
|
|
675
|
+
#### Command
|
|
676
|
+
```bash
|
|
677
|
+
/alfred:2-run HELLO-001
|
|
678
|
+
```
|
|
304
679
|
|
|
305
|
-
|
|
680
|
+
#### 🔴 RED Phase: Write Failing Test
|
|
306
681
|
|
|
307
|
-
|
|
682
|
+
**File Created**: `tests/test_hello.py`
|
|
308
683
|
|
|
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
|
|
690
|
+
|
|
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!"}
|
|
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!"}
|
|
309
704
|
```
|
|
310
|
-
|
|
705
|
+
|
|
706
|
+
**Run**:
|
|
707
|
+
```bash
|
|
708
|
+
pytest tests/test_hello.py -v
|
|
311
709
|
```
|
|
312
710
|
|
|
313
|
-
|
|
711
|
+
**Result**: ❌ FAILED (app doesn't exist yet - expected!)
|
|
314
712
|
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
713
|
+
**Commit**:
|
|
714
|
+
```bash
|
|
715
|
+
git add tests/test_hello.py
|
|
716
|
+
git commit -m "🔴 test(HELLO-001): add failing hello API tests"
|
|
717
|
+
```
|
|
318
718
|
|
|
319
|
-
|
|
719
|
+
---
|
|
320
720
|
|
|
321
|
-
|
|
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
|
|
727
|
+
|
|
728
|
+
from fastapi import FastAPI
|
|
729
|
+
|
|
730
|
+
app = FastAPI()
|
|
322
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}!"}
|
|
323
736
|
```
|
|
324
|
-
|
|
737
|
+
|
|
738
|
+
**Run**:
|
|
739
|
+
```bash
|
|
740
|
+
pytest tests/test_hello.py -v
|
|
741
|
+
```
|
|
742
|
+
|
|
743
|
+
**Result**: ✅ PASSED (all tests pass!)
|
|
744
|
+
|
|
745
|
+
**Commit**:
|
|
746
|
+
```bash
|
|
747
|
+
git add src/hello/api.py
|
|
748
|
+
git commit -m "🟢 feat(HELLO-001): implement hello API"
|
|
325
749
|
```
|
|
326
750
|
|
|
327
|
-
|
|
751
|
+
---
|
|
752
|
+
|
|
753
|
+
#### ♻️ REFACTOR Phase: Add Validation
|
|
328
754
|
|
|
329
|
-
|
|
330
|
-
- 🟢 **GREEN**: Minimal implementation to pass test (`@CODE:USER-001`)
|
|
331
|
-
- ♻️ **REFACTOR**: Improve code quality
|
|
755
|
+
**Enhanced Code**:
|
|
332
756
|
|
|
333
|
-
|
|
757
|
+
```python
|
|
758
|
+
from fastapi import FastAPI, HTTPException
|
|
334
759
|
|
|
335
|
-
|
|
760
|
+
app = FastAPI()
|
|
336
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}!"}
|
|
337
768
|
```
|
|
338
|
-
|
|
769
|
+
|
|
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
|
|
339
777
|
```
|
|
340
778
|
|
|
341
|
-
|
|
779
|
+
**Run**:
|
|
780
|
+
```bash
|
|
781
|
+
pytest tests/test_hello.py -v
|
|
782
|
+
```
|
|
783
|
+
|
|
784
|
+
**Result**: ✅ PASSED (all tests pass!)
|
|
785
|
+
|
|
786
|
+
**Commit**:
|
|
787
|
+
```bash
|
|
788
|
+
git add tests/test_hello.py src/hello/api.py
|
|
789
|
+
git commit -m "♻️ refactor(HELLO-001): add name length validation"
|
|
790
|
+
```
|
|
791
|
+
|
|
792
|
+
---
|
|
793
|
+
|
|
794
|
+
### Step 3: Documentation Sync (2 minutes)
|
|
795
|
+
|
|
796
|
+
#### Command
|
|
797
|
+
```bash
|
|
798
|
+
/alfred:3-sync
|
|
799
|
+
```
|
|
342
800
|
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
-
|
|
346
|
-
-
|
|
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
|
+
```
|
|
347
808
|
|
|
348
|
-
|
|
809
|
+
#### Check Generated API Documentation
|
|
810
|
+
```bash
|
|
811
|
+
cat docs/api/hello.md
|
|
812
|
+
```
|
|
349
813
|
|
|
350
|
-
|
|
814
|
+
**Example Content**:
|
|
815
|
+
```markdown
|
|
816
|
+
# Hello API Documentation
|
|
351
817
|
|
|
352
|
-
|
|
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)
|
|
818
|
+
## GET /hello
|
|
358
819
|
|
|
359
|
-
|
|
820
|
+
### Description
|
|
821
|
+
Returns a personalized greeting based on provided name.
|
|
360
822
|
|
|
361
|
-
###
|
|
823
|
+
### Parameters
|
|
824
|
+
- `name` (query, optional): Person's name (default: "World", max 50 chars)
|
|
362
825
|
|
|
363
|
-
|
|
826
|
+
### Responses
|
|
827
|
+
- **200**: Success
|
|
828
|
+
```json
|
|
829
|
+
{ "message": "Hello, Alice!" }
|
|
830
|
+
```
|
|
831
|
+
- **400**: Name too long
|
|
364
832
|
|
|
833
|
+
### Examples
|
|
365
834
|
```bash
|
|
366
|
-
|
|
367
|
-
|
|
835
|
+
curl "http://localhost:8000/hello?name=Alice"
|
|
836
|
+
# → {"message": "Hello, Alice!"}
|
|
368
837
|
|
|
369
|
-
|
|
370
|
-
|
|
838
|
+
curl "http://localhost:8000/hello"
|
|
839
|
+
# → {"message": "Hello, World!"}
|
|
840
|
+
```
|
|
371
841
|
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
842
|
+
### Traceability
|
|
843
|
+
- `@SPEC:EX-HELLO-001` - Requirements
|
|
844
|
+
- `@TEST:EX-HELLO-001` - Tests
|
|
845
|
+
- `@CODE:EX-HELLO-001:API` - Implementation
|
|
375
846
|
```
|
|
376
847
|
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
848
|
+
---
|
|
849
|
+
|
|
850
|
+
### Step 4: Verify TAG Chain (1 minute)
|
|
851
|
+
|
|
852
|
+
#### Command
|
|
853
|
+
```bash
|
|
854
|
+
rg '@(SPEC|TEST|CODE|DOC):HELLO-001' -n
|
|
855
|
+
```
|
|
856
|
+
|
|
857
|
+
#### Output (Complete Traceability)
|
|
858
|
+
```
|
|
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`
|
|
863
|
+
```
|
|
864
|
+
|
|
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 (🔴 🟢 ♻️)
|
|
384
879
|
|
|
385
880
|
---
|
|
386
881
|
|
|
@@ -432,6 +927,39 @@ When you run MoAI-ADK, Alfred loads configuration from **4 coordinated documents
|
|
|
432
927
|
|
|
433
928
|
> ⚠️ **Important**: These are internal configuration files for Alfred, not user guides. Keep them concise and decision-focused. Most teams don't modify them.
|
|
434
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
|
+
|
|
435
963
|
---
|
|
436
964
|
|
|
437
965
|
## Alfred's Memory Files (.moai/memory/)
|
|
@@ -597,52 +1125,421 @@ Previously, all updates would sync templates even if nothing changed. Now, confi
|
|
|
597
1125
|
```
|
|
598
1126
|
This field allows MoAI-ADK to accurately determine if templates need synchronization without re-syncing everything.
|
|
599
1127
|
|
|
600
|
-
#### Method 2: Upgrade with uv tool command
|
|
1128
|
+
#### Method 2: Upgrade with uv tool command
|
|
1129
|
+
|
|
1130
|
+
**Upgrade specific tool (recommended)**
|
|
1131
|
+
|
|
1132
|
+
```bash
|
|
1133
|
+
# Upgrade only moai-adk to latest version
|
|
1134
|
+
uv tool upgrade moai-adk
|
|
1135
|
+
```
|
|
1136
|
+
|
|
1137
|
+
**Upgrade all installed tools**
|
|
1138
|
+
|
|
1139
|
+
```bash
|
|
1140
|
+
# Upgrade all uv tool installations to latest versions
|
|
1141
|
+
uv tool update
|
|
1142
|
+
```
|
|
1143
|
+
|
|
1144
|
+
**Install specific version**
|
|
1145
|
+
|
|
1146
|
+
```bash
|
|
1147
|
+
# Reinstall specific version (e.g., 0.4.2)
|
|
1148
|
+
uv tool install moai-adk
|
|
1149
|
+
```
|
|
1150
|
+
|
|
1151
|
+
### Verify After Update
|
|
1152
|
+
|
|
1153
|
+
```bash
|
|
1154
|
+
# 1. Check installed version
|
|
1155
|
+
moai-adk --version
|
|
1156
|
+
|
|
1157
|
+
# 2. Verify project works correctly
|
|
1158
|
+
moai-adk doctor
|
|
1159
|
+
|
|
1160
|
+
# 3. Check updated features in Alfred
|
|
1161
|
+
cd your-project
|
|
1162
|
+
claude
|
|
1163
|
+
/alfred:0-project # Verify new features like language selection
|
|
1164
|
+
```
|
|
1165
|
+
|
|
1166
|
+
> 💡 **New 2-Stage Update Workflow**:
|
|
1167
|
+
>
|
|
1168
|
+
> - **Stage 1**: `moai-adk update` detects installer (uv tool, pipx, or pip) and upgrades package
|
|
1169
|
+
> - **Stage 2**: `moai-adk update` again to sync templates, config, and agent/Skills
|
|
1170
|
+
> - **Smart detection**: Auto-detects whether package upgrade is needed based on version comparison
|
|
1171
|
+
> - **CI/CD ready**: Use `moai-adk update --yes` for fully automated updates in pipelines
|
|
1172
|
+
> - **Manual upgrade path**: Use `moai-adk update --templates-only` after manually upgrading the package
|
|
1173
|
+
> - **Rollback safe**: Automatic backups in `.moai-backups/` before template sync
|
|
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
|
+
|
|
1285
|
+
---
|
|
1286
|
+
|
|
1287
|
+
## Development Setup for Contributors
|
|
1288
|
+
|
|
1289
|
+
If you're developing **MoAI-ADK itself**, follow these steps to set up your development environment.
|
|
1290
|
+
|
|
1291
|
+
### Prerequisites
|
|
1292
|
+
|
|
1293
|
+
- Python 3.13+
|
|
1294
|
+
- `uv` package manager
|
|
1295
|
+
- Git
|
|
1296
|
+
|
|
1297
|
+
### Setup Steps
|
|
1298
|
+
|
|
1299
|
+
#### Step 1: Clone and Install in Editable Mode
|
|
1300
|
+
|
|
1301
|
+
```bash
|
|
1302
|
+
# Clone the repository
|
|
1303
|
+
git clone https://github.com/modu-ai/moai-adk.git
|
|
1304
|
+
cd moai-adk
|
|
1305
|
+
|
|
1306
|
+
# Install in editable mode (creates symlink, not a copy)
|
|
1307
|
+
uv pip install -e .
|
|
1308
|
+
|
|
1309
|
+
# Or with pip (also works)
|
|
1310
|
+
pip install -e .
|
|
1311
|
+
```
|
|
1312
|
+
|
|
1313
|
+
The editable install allows your local changes to be immediately reflected when using `moai-adk` command.
|
|
1314
|
+
|
|
1315
|
+
#### Step 2: Initialize Development Configuration
|
|
1316
|
+
|
|
1317
|
+
After the editable install, initialize the development repository's configuration:
|
|
1318
|
+
|
|
1319
|
+
```bash
|
|
1320
|
+
# Run the initialization script
|
|
1321
|
+
bash .moai/scripts/init-dev-config.sh
|
|
1322
|
+
```
|
|
1323
|
+
|
|
1324
|
+
**What this script does:**
|
|
1325
|
+
- Extracts the actual version from `pyproject.toml`
|
|
1326
|
+
- Replaces template placeholders (`{{MOAI_VERSION}}`) with actual version values in `.moai/config.json`
|
|
1327
|
+
- Sets up `project.template_version` field
|
|
1328
|
+
- Ensures the `moai-adk update` command works correctly on first run
|
|
1329
|
+
|
|
1330
|
+
**Why is this necessary?**
|
|
1331
|
+
|
|
1332
|
+
When you install MoAI-ADK in editable mode, the `.moai/config.json` file contains unsubstituted template placeholders. This causes the first `moai-adk update` command to fail with version comparison errors. The init script resolves these placeholders so everything works seamlessly.
|
|
1333
|
+
|
|
1334
|
+
#### Step 3: Verify Setup
|
|
1335
|
+
|
|
1336
|
+
```bash
|
|
1337
|
+
# Check that moai-adk works
|
|
1338
|
+
moai-adk --version
|
|
1339
|
+
|
|
1340
|
+
# Run the health check
|
|
1341
|
+
moai-adk doctor
|
|
1342
|
+
|
|
1343
|
+
# Expected output:
|
|
1344
|
+
# ✅ Python version: 3.13+
|
|
1345
|
+
# ✅ UV installed
|
|
1346
|
+
# ✅ Project structure: Valid
|
|
1347
|
+
# ✅ Configuration: Ready
|
|
1348
|
+
```
|
|
1349
|
+
|
|
1350
|
+
#### Step 4: Run Tests
|
|
1351
|
+
|
|
1352
|
+
```bash
|
|
1353
|
+
# Run all tests with coverage
|
|
1354
|
+
pytest tests/
|
|
1355
|
+
|
|
1356
|
+
# Run specific test module
|
|
1357
|
+
pytest tests/unit/test_update.py -v
|
|
1358
|
+
|
|
1359
|
+
# Run with coverage report
|
|
1360
|
+
pytest tests/ --cov=src/moai_adk --cov-report=html
|
|
1361
|
+
|
|
1362
|
+
# Check coverage thresholds
|
|
1363
|
+
pytest tests/ --cov=src/moai_adk --cov-report=term-missing
|
|
1364
|
+
```
|
|
1365
|
+
|
|
1366
|
+
### Common Development Workflow
|
|
1367
|
+
|
|
1368
|
+
#### After Making Code Changes
|
|
1369
|
+
|
|
1370
|
+
```bash
|
|
1371
|
+
# 1. Run tests to ensure nothing broke
|
|
1372
|
+
pytest tests/ -v
|
|
1373
|
+
|
|
1374
|
+
# 2. Check code style
|
|
1375
|
+
ruff check src/
|
|
1376
|
+
ruff format src/
|
|
1377
|
+
|
|
1378
|
+
# 3. Type checking
|
|
1379
|
+
mypy src/
|
|
1380
|
+
|
|
1381
|
+
# 4. If you modified update.py, test the update command
|
|
1382
|
+
moai-adk update --check
|
|
1383
|
+
```
|
|
1384
|
+
|
|
1385
|
+
#### Testing the Update Command
|
|
1386
|
+
|
|
1387
|
+
The update command has been fixed to handle invalid version strings gracefully. To test it in development:
|
|
1388
|
+
|
|
1389
|
+
```bash
|
|
1390
|
+
# Test update without applying it
|
|
1391
|
+
moai-adk update --check
|
|
1392
|
+
|
|
1393
|
+
# Test with force mode (skips backup)
|
|
1394
|
+
moai-adk update --force
|
|
1395
|
+
|
|
1396
|
+
# Test with specific version
|
|
1397
|
+
moai-adk update --templates-only
|
|
1398
|
+
```
|
|
1399
|
+
|
|
1400
|
+
### Understanding the Init Script
|
|
1401
|
+
|
|
1402
|
+
The `.moai/scripts/init-dev-config.sh` script performs these operations:
|
|
1403
|
+
|
|
1404
|
+
1. **Extracts Version**: Reads `pyproject.toml` to get the current version
|
|
1405
|
+
2. **Updates Config**: Modifies `.moai/config.json` to set:
|
|
1406
|
+
- `moai.version` → actual version value
|
|
1407
|
+
- `project.template_version` → actual version value
|
|
1408
|
+
3. **Validates**: Ensures the JSON structure is preserved correctly
|
|
1409
|
+
4. **Provides Feedback**: Shows what was updated and verifies the changes
|
|
1410
|
+
|
|
1411
|
+
### Troubleshooting Development Setup
|
|
1412
|
+
|
|
1413
|
+
#### Problem: `moai-adk` command not found
|
|
1414
|
+
|
|
1415
|
+
```bash
|
|
1416
|
+
# Solution 1: Reinstall in editable mode
|
|
1417
|
+
uv pip install -e .
|
|
1418
|
+
|
|
1419
|
+
# Solution 2: Verify uv environment
|
|
1420
|
+
uv pip list | grep moai-adk
|
|
1421
|
+
|
|
1422
|
+
# Solution 3: Use full path
|
|
1423
|
+
python -m moai_adk --version
|
|
1424
|
+
```
|
|
1425
|
+
|
|
1426
|
+
#### Problem: `.moai/config.json` still has placeholders after running init script
|
|
1427
|
+
|
|
1428
|
+
```bash
|
|
1429
|
+
# Manually check the config
|
|
1430
|
+
cat .moai/config.json | grep -i moai_version
|
|
1431
|
+
|
|
1432
|
+
# If still showing {{MOAI_VERSION}}, rerun the script:
|
|
1433
|
+
bash .moai/scripts/init-dev-config.sh
|
|
1434
|
+
|
|
1435
|
+
# Or manually update using Python:
|
|
1436
|
+
python3 << 'EOF'
|
|
1437
|
+
import json
|
|
1438
|
+
from pathlib import Path
|
|
1439
|
+
|
|
1440
|
+
config_path = Path(".moai/config.json")
|
|
1441
|
+
config = json.loads(config_path.read_text())
|
|
1442
|
+
|
|
1443
|
+
# Update manually
|
|
1444
|
+
config['moai']['version'] = "0.8.1"
|
|
1445
|
+
config['project']['template_version'] = "0.8.1"
|
|
1446
|
+
|
|
1447
|
+
config_path.write_text(json.dumps(config, indent=2) + '\n')
|
|
1448
|
+
print("✅ Config updated manually")
|
|
1449
|
+
EOF
|
|
1450
|
+
```
|
|
1451
|
+
|
|
1452
|
+
#### Problem: `moai-adk update` requires running twice
|
|
1453
|
+
|
|
1454
|
+
This issue has been **fixed** in v0.8.1+. If you're experiencing this:
|
|
1455
|
+
|
|
1456
|
+
1. Ensure you've run the init script: `bash .moai/scripts/init-dev-config.sh`
|
|
1457
|
+
2. Update to the latest version: `pip install -e --upgrade .`
|
|
1458
|
+
3. Verify the config has actual versions: `cat .moai/config.json | grep version`
|
|
1459
|
+
|
|
1460
|
+
**What was the issue?**
|
|
1461
|
+
- Development installations had unsubstituted `{{MOAI_VERSION}}` placeholders in config
|
|
1462
|
+
- First `moai-adk update` would fail comparing "0.8.1" vs "{{MOAI_VERSION}}"
|
|
1463
|
+
- Second run might partially work after partial sync
|
|
1464
|
+
|
|
1465
|
+
**How it's fixed:**
|
|
1466
|
+
- `init-dev-config.sh` replaces placeholders with actual versions
|
|
1467
|
+
- Code now gracefully handles InvalidVersion exceptions
|
|
1468
|
+
- Added comprehensive unit tests for placeholder detection
|
|
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
|
|
601
1473
|
|
|
602
|
-
**
|
|
1474
|
+
**Symptoms:**
|
|
1475
|
+
- `moai-adk update` shows "Nothing to upgrade"
|
|
1476
|
+
- PyPI has a newer version available
|
|
1477
|
+
- Caused by stale UV cache metadata
|
|
603
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):**
|
|
604
1488
|
```bash
|
|
605
|
-
#
|
|
606
|
-
uv
|
|
1489
|
+
# Clear UV cache and retry
|
|
1490
|
+
uv cache clean moai-adk && moai-adk update
|
|
607
1491
|
```
|
|
608
1492
|
|
|
609
|
-
**
|
|
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
|
|
610
1498
|
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
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
|
|
615
1503
|
|
|
616
|
-
|
|
1504
|
+
### Contributing Tests
|
|
1505
|
+
|
|
1506
|
+
When adding new features, always include tests:
|
|
617
1507
|
|
|
618
1508
|
```bash
|
|
619
|
-
#
|
|
620
|
-
|
|
1509
|
+
# Add tests to tests/unit/ or tests/integration/
|
|
1510
|
+
# Follow existing test patterns in test_update.py
|
|
1511
|
+
|
|
1512
|
+
# Run your new tests
|
|
1513
|
+
pytest tests/unit/test_*.py -v
|
|
1514
|
+
|
|
1515
|
+
# Ensure coverage remains ≥ 85%
|
|
1516
|
+
pytest tests/ --cov=src/moai_adk --cov-report=term-missing
|
|
621
1517
|
```
|
|
622
1518
|
|
|
623
|
-
###
|
|
1519
|
+
### Making a Pull Request
|
|
1520
|
+
|
|
1521
|
+
Before opening a PR, ensure:
|
|
624
1522
|
|
|
625
1523
|
```bash
|
|
626
|
-
# 1.
|
|
627
|
-
|
|
1524
|
+
# 1. All tests pass
|
|
1525
|
+
pytest tests/ -v
|
|
628
1526
|
|
|
629
|
-
# 2.
|
|
630
|
-
|
|
1527
|
+
# 2. Coverage is adequate
|
|
1528
|
+
pytest tests/ --cov=src/moai_adk --cov-report=term-missing
|
|
631
1529
|
|
|
632
|
-
# 3.
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
/alfred:0-project # Verify new features like language selection
|
|
636
|
-
```
|
|
1530
|
+
# 3. Code is formatted
|
|
1531
|
+
ruff format src/
|
|
1532
|
+
ruff check src/
|
|
637
1533
|
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
1534
|
+
# 4. Types are valid
|
|
1535
|
+
mypy src/
|
|
1536
|
+
|
|
1537
|
+
# 5. Init script works
|
|
1538
|
+
bash .moai/scripts/init-dev-config.sh
|
|
1539
|
+
|
|
1540
|
+
# 6. Update command works
|
|
1541
|
+
moai-adk update --check
|
|
1542
|
+
```
|
|
646
1543
|
|
|
647
1544
|
---
|
|
648
1545
|
|
|
@@ -696,8 +1593,11 @@ graph TD
|
|
|
696
1593
|
| `/alfred:1-plan <description>` | Analyze requirements, draft SPEC, write Plan Board | `.moai/specs/SPEC-*/spec.md`, plan/acceptance docs, feature branch |
|
|
697
1594
|
| `/alfred:2-run <SPEC-ID>` | Execute TDD, test/implement/refactor, verify quality | `tests/`, `src/` implementation, quality report, TAG connection |
|
|
698
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 |
|
|
699
1597
|
|
|
700
1598
|
> ❗ All commands maintain **Phase 0 (optional) → Phase 1 → Phase 2 → Phase 3** cycle structure. Alfred automatically reports execution status and next-step suggestions.
|
|
1599
|
+
>
|
|
1600
|
+
> 💡 **New in v0.7.0+**: `/alfred:9-feedback` enables instant GitHub Issue creation during development, keeping your workflow uninterrupted while keeping issues tracked and visible to the team.
|
|
701
1601
|
|
|
702
1602
|
---
|
|
703
1603
|
|
|
@@ -814,6 +1714,125 @@ When working in your **local development environment**, CodeRabbit provides auto
|
|
|
814
1714
|
|
|
815
1715
|
---
|
|
816
1716
|
|
|
1717
|
+
## Quick Issue Creation with `/alfred:9-feedback`
|
|
1718
|
+
|
|
1719
|
+
MoAI-ADK v0.7.0+ includes the **Quick Issue Creation** feature, allowing developers to instantly create GitHub Issues without interrupting their development workflow.
|
|
1720
|
+
|
|
1721
|
+
### Why Quick Issue Creation?
|
|
1722
|
+
|
|
1723
|
+
During development, you frequently encounter:
|
|
1724
|
+
- 🐛 Bugs that need immediate reporting
|
|
1725
|
+
- ✨ Feature ideas that come to mind
|
|
1726
|
+
- ⚡ Performance improvements to suggest
|
|
1727
|
+
- ❓ Architecture questions that need team discussion
|
|
1728
|
+
|
|
1729
|
+
**The old way**: Stop coding, go to GitHub, manually fill issue form, remember what you were working on.
|
|
1730
|
+
**The new way**: Type one command, GitHub Issue is created instantly, continue coding.
|
|
1731
|
+
|
|
1732
|
+
### Interactive Dialog Flow
|
|
1733
|
+
|
|
1734
|
+
When you run `/alfred:9-help`, Alfred guides you through an interactive multi-step dialog:
|
|
1735
|
+
|
|
1736
|
+
**Step 1: Select Issue Type**
|
|
1737
|
+
```
|
|
1738
|
+
Alfred: What type of issue do you want to create?
|
|
1739
|
+
[ ] 🐛 Bug Report - Something isn't working
|
|
1740
|
+
[ ] ✨ Feature Request - Suggest new functionality
|
|
1741
|
+
[ ] ⚡ Improvement - Enhance existing features
|
|
1742
|
+
[ ] ❓ Question/Discussion - Ask the team
|
|
1743
|
+
```
|
|
1744
|
+
|
|
1745
|
+
**Step 2: Enter Issue Title**
|
|
1746
|
+
```
|
|
1747
|
+
Alfred: What's the issue title?
|
|
1748
|
+
Your input: "Login button not responding to clicks"
|
|
1749
|
+
```
|
|
1750
|
+
|
|
1751
|
+
**Step 3: Enter Description (Optional)**
|
|
1752
|
+
```
|
|
1753
|
+
Alfred: Provide a detailed description (optional—press Enter to skip)
|
|
1754
|
+
Your input: "When I click the login button on iPhone 15, it freezes for 5 seconds then crashes"
|
|
1755
|
+
```
|
|
1756
|
+
|
|
1757
|
+
**Step 4: Select Priority Level**
|
|
1758
|
+
```
|
|
1759
|
+
Alfred: What's the priority level?
|
|
1760
|
+
[ ] 🔴 Critical - System down, data loss, security breach
|
|
1761
|
+
[ ] 🟠 High - Major feature broken, significant impact
|
|
1762
|
+
[✓] 🟡 Medium - Normal priority (default)
|
|
1763
|
+
[ ] 🟢 Low - Minor issues, nice-to-have
|
|
1764
|
+
```
|
|
1765
|
+
|
|
1766
|
+
**Step 5: Automatic Issue Creation**
|
|
1767
|
+
```
|
|
1768
|
+
Alfred automatically:
|
|
1769
|
+
1. Determines appropriate labels based on issue type and priority
|
|
1770
|
+
2. Formats title with emoji: "🐛 [BUG] Login button not responding..."
|
|
1771
|
+
3. Creates GitHub Issue with all information
|
|
1772
|
+
4. Returns the issue number and URL
|
|
1773
|
+
```
|
|
1774
|
+
|
|
1775
|
+
### Key Features
|
|
1776
|
+
|
|
1777
|
+
1. **⚡ Instant Creation**: Create GitHub Issues in seconds
|
|
1778
|
+
2. **🏷️ Automatic Labels**: Issue type + priority automatically labeled
|
|
1779
|
+
3. **🎯 Priority Selection**: Choose from Critical/High/Medium/Low
|
|
1780
|
+
4. **🔗 Team Visibility**: Issues immediately visible and discussable
|
|
1781
|
+
5. **📋 Standardized Format**: All issues follow consistent structure
|
|
1782
|
+
|
|
1783
|
+
### Complete Example: Bug Report During Code Review
|
|
1784
|
+
|
|
1785
|
+
```bash
|
|
1786
|
+
# During code review, you notice a critical issue and want to report it instantly
|
|
1787
|
+
$ /alfred:9-feedback
|
|
1788
|
+
|
|
1789
|
+
Alfred: What type of issue do you want to create?
|
|
1790
|
+
> 🐛 Bug Report
|
|
1791
|
+
|
|
1792
|
+
Alfred: What's the issue title?
|
|
1793
|
+
> Login button crash on mobile devices
|
|
1794
|
+
|
|
1795
|
+
Alfred: Provide a detailed description (optional—press Enter to skip)
|
|
1796
|
+
> Tapping the login button on iPhone 15 causes app to freeze for 5 seconds then crash.
|
|
1797
|
+
> Tested on iOS 17.2, Chrome 120 on macOS 14.2.
|
|
1798
|
+
> Expected: Login modal should appear
|
|
1799
|
+
> Actual: No response then crash
|
|
1800
|
+
|
|
1801
|
+
Alfred: What's the priority level?
|
|
1802
|
+
> 🟠 High
|
|
1803
|
+
|
|
1804
|
+
✅ GitHub Issue #234 created successfully!
|
|
1805
|
+
|
|
1806
|
+
📋 Title: 🐛 [BUG] Login button crash on mobile devices
|
|
1807
|
+
🟠 Priority: High
|
|
1808
|
+
🏷️ Labels: bug, reported, priority-high
|
|
1809
|
+
🔗 URL: https://github.com/owner/repo/issues/234
|
|
1810
|
+
|
|
1811
|
+
💡 Next: Continue with your work—the issue is now tracked!
|
|
1812
|
+
```
|
|
1813
|
+
|
|
1814
|
+
### Integration with MoAI-ADK Workflow
|
|
1815
|
+
|
|
1816
|
+
1. **During Development**: Use `/alfred:9-help` to report bugs/ideas instantly
|
|
1817
|
+
2. **In Code Review**: Convert improvement suggestions to tracked issues
|
|
1818
|
+
3. **When Planning**: Reference created issues in SPEC documents
|
|
1819
|
+
4. **During Sync**: Link issues to SPEC requirements with `/alfred:3-sync`
|
|
1820
|
+
|
|
1821
|
+
### Prerequisites
|
|
1822
|
+
|
|
1823
|
+
- GitHub CLI (`gh`) installed and authenticated
|
|
1824
|
+
- Repository initialized with Git
|
|
1825
|
+
|
|
1826
|
+
### Learn More
|
|
1827
|
+
|
|
1828
|
+
See `.moai/docs/quick-issue-creation-guide.md` for comprehensive documentation including:
|
|
1829
|
+
- Detailed usage examples
|
|
1830
|
+
- Best practices and tips
|
|
1831
|
+
- Troubleshooting guide
|
|
1832
|
+
- Integration with SPEC documents
|
|
1833
|
+
|
|
1834
|
+
---
|
|
1835
|
+
|
|
817
1836
|
## 5 Key Concepts
|
|
818
1837
|
|
|
819
1838
|
MoAI-ADK consists of 5 key concepts. Each concept connects to the others, and together they create a powerful development system.
|
|
@@ -887,13 +1906,13 @@ MoAI-ADK consists of 5 key concepts. Each concept connects to the others, and to
|
|
|
887
1906
|
**TAG Chain**:
|
|
888
1907
|
|
|
889
1908
|
```
|
|
890
|
-
@SPEC:AUTH-001 (requirements)
|
|
1909
|
+
@SPEC:EX-AUTH-001 (requirements)
|
|
891
1910
|
↓
|
|
892
|
-
@TEST:AUTH-001 (test)
|
|
1911
|
+
@TEST:EX-AUTH-001 (test)
|
|
893
1912
|
↓
|
|
894
|
-
@CODE:AUTH-001 (implementation)
|
|
1913
|
+
@CODE:EX-AUTH-001 (implementation)
|
|
895
1914
|
↓
|
|
896
|
-
@DOC:AUTH-001 (documentation)
|
|
1915
|
+
@DOC:EX-AUTH-001 (documentation)
|
|
897
1916
|
```
|
|
898
1917
|
|
|
899
1918
|
**TAG ID Rules**: `<Domain>-<3 digits>`
|
|
@@ -1029,7 +2048,7 @@ author: @user
|
|
|
1029
2048
|
priority: high
|
|
1030
2049
|
---
|
|
1031
2050
|
|
|
1032
|
-
# @SPEC:TODO-001: Todo Management API
|
|
2051
|
+
# @SPEC:EX-TODO-001: Todo Management API
|
|
1033
2052
|
|
|
1034
2053
|
## Ubiquitous Requirements
|
|
1035
2054
|
- The system SHALL be able to add todos
|
|
@@ -1065,7 +2084,7 @@ The **implementation-planner** Sub-agent decides:
|
|
|
1065
2084
|
|
|
1066
2085
|
- 📚 Libraries: FastAPI + SQLAlchemy
|
|
1067
2086
|
- 📁 Folder structure: `src/todo/`, `tests/todo/`
|
|
1068
|
-
- 🏷️ TAG design: `@CODE:TODO-001:API`, `@CODE:TODO-001:MODEL`, `@CODE:TODO-001:REPO`
|
|
2087
|
+
- 🏷️ TAG design: `@CODE:EX-TODO-001:API`, `@CODE:EX-TODO-001:MODEL`, `@CODE:EX-TODO-001:REPO`
|
|
1069
2088
|
|
|
1070
2089
|
**Phase 2: RED → GREEN → REFACTOR**
|
|
1071
2090
|
|
|
@@ -1073,7 +2092,7 @@ The **implementation-planner** Sub-agent decides:
|
|
|
1073
2092
|
|
|
1074
2093
|
```python
|
|
1075
2094
|
# tests/test_todo_api.py
|
|
1076
|
-
# @TEST:TODO
|
|
2095
|
+
# @TEST:README-EXAMPLE-TODO | SPEC: SPEC-TODO-001.md
|
|
1077
2096
|
|
|
1078
2097
|
import pytest
|
|
1079
2098
|
from src.todo.api import create_todo, get_todos
|
|
@@ -1115,7 +2134,7 @@ git commit -m "🔴 test(TODO-001): add failing API tests"
|
|
|
1115
2134
|
|
|
1116
2135
|
```python
|
|
1117
2136
|
# src/todo/api.py
|
|
1118
|
-
# @CODE:TODO-001:API | SPEC: SPEC-TODO-001.md | TEST: tests/test_todo_api.py
|
|
2137
|
+
# @CODE:EX-TODO-001:API | SPEC: SPEC-TODO-001.md | TEST: tests/test_todo_api.py
|
|
1119
2138
|
|
|
1120
2139
|
from fastapi import FastAPI, HTTPException
|
|
1121
2140
|
from pydantic import BaseModel
|
|
@@ -1129,19 +2148,19 @@ class TodoRequest(BaseModel):
|
|
|
1129
2148
|
|
|
1130
2149
|
@app.post("/todos", status_code=201)
|
|
1131
2150
|
def create_todo(todo: TodoRequest):
|
|
1132
|
-
"""@CODE:TODO-001:API - POST endpoint"""
|
|
2151
|
+
"""@CODE:EX-TODO-001:API - POST endpoint"""
|
|
1133
2152
|
todo_id = str(uuid.uuid4())
|
|
1134
2153
|
todos_db[todo_id] = {"id": todo_id, "title": todo.title}
|
|
1135
2154
|
return todos_db[todo_id]
|
|
1136
2155
|
|
|
1137
2156
|
@app.get("/todos")
|
|
1138
2157
|
def get_todos():
|
|
1139
|
-
"""@CODE:TODO-001:API - GET all endpoint"""
|
|
2158
|
+
"""@CODE:EX-TODO-001:API - GET all endpoint"""
|
|
1140
2159
|
return list(todos_db.values())
|
|
1141
2160
|
|
|
1142
2161
|
@app.get("/todos/{todo_id}")
|
|
1143
2162
|
def get_todo(todo_id: str):
|
|
1144
|
-
"""@CODE:TODO-001:API - GET by ID endpoint"""
|
|
2163
|
+
"""@CODE:EX-TODO-001:API - GET by ID endpoint"""
|
|
1145
2164
|
if todo_id not in todos_db:
|
|
1146
2165
|
raise HTTPException(status_code=404, detail="Todo not found")
|
|
1147
2166
|
return todos_db[todo_id]
|
|
@@ -1160,7 +2179,7 @@ git commit -m "🟢 feat(TODO-001): implement minimal Todo API"
|
|
|
1160
2179
|
|
|
1161
2180
|
```python
|
|
1162
2181
|
# src/todo/models.py
|
|
1163
|
-
# @CODE:TODO-001:MODEL | SPEC: SPEC-TODO-001.md
|
|
2182
|
+
# @CODE:EX-TODO-001:MODEL | SPEC: SPEC-TODO-001.md
|
|
1164
2183
|
|
|
1165
2184
|
from datetime import datetime
|
|
1166
2185
|
from sqlalchemy import Column, String, DateTime
|
|
@@ -1169,7 +2188,7 @@ from sqlalchemy.ext.declarative import declarative_base
|
|
|
1169
2188
|
Base = declarative_base()
|
|
1170
2189
|
|
|
1171
2190
|
class Todo(Base):
|
|
1172
|
-
"""@CODE:TODO-001:MODEL - Todo data model"""
|
|
2191
|
+
"""@CODE:EX-TODO-001:MODEL - Todo data model"""
|
|
1173
2192
|
__tablename__ = "todos"
|
|
1174
2193
|
|
|
1175
2194
|
id = Column(String, primary_key=True)
|
|
@@ -1177,7 +2196,7 @@ class Todo(Base):
|
|
|
1177
2196
|
created_at = Column(DateTime, default=datetime.utcnow) # Auto creation time
|
|
1178
2197
|
|
|
1179
2198
|
def validate(self):
|
|
1180
|
-
"""@CODE:TODO-001:MODEL - Validation"""
|
|
2199
|
+
"""@CODE:EX-TODO-001:MODEL - Validation"""
|
|
1181
2200
|
if not self.title or len(self.title) > 200:
|
|
1182
2201
|
raise ValueError("Title must be 1-200 characters")
|
|
1183
2202
|
```
|
|
@@ -1213,10 +2232,10 @@ git commit -m "♻️ refactor(TODO-001): add database models and validation"
|
|
|
1213
2232
|
1. **TAG Chain Validation**
|
|
1214
2233
|
|
|
1215
2234
|
```bash
|
|
1216
|
-
✅ @SPEC:TODO-001 → .moai/specs/SPEC-TODO-001/spec.md
|
|
1217
|
-
✅ @TEST:TODO
|
|
1218
|
-
✅ @CODE:TODO-001 → src/todo/ (3 files)
|
|
1219
|
-
✅ @DOC:TODO-001 → docs/api/todo.md (auto-generated)
|
|
2235
|
+
✅ @SPEC:EX-TODO-001 → .moai/specs/SPEC-TODO-001/spec.md
|
|
2236
|
+
✅ @TEST:README-EXAMPLE-TODO → tests/test_todo_api.py
|
|
2237
|
+
✅ @CODE:EX-TODO-001 → src/todo/ (3 files)
|
|
2238
|
+
✅ @DOC:EX-TODO-001 → docs/api/todo.md (auto-generated)
|
|
1220
2239
|
|
|
1221
2240
|
TAG Chain Integrity: 100%
|
|
1222
2241
|
Orphan TAGs: None
|
|
@@ -1225,7 +2244,7 @@ git commit -m "♻️ refactor(TODO-001): add database models and validation"
|
|
|
1225
2244
|
2. **Living Document Generation**
|
|
1226
2245
|
|
|
1227
2246
|
```markdown
|
|
1228
|
-
# @DOC:TODO-001: Todo Management API
|
|
2247
|
+
# @DOC:EX-TODO-001: Todo Management API
|
|
1229
2248
|
|
|
1230
2249
|
## Overview
|
|
1231
2250
|
|
|
@@ -1239,8 +2258,8 @@ git commit -m "♻️ refactor(TODO-001): add database models and validation"
|
|
|
1239
2258
|
- URL: /todos
|
|
1240
2259
|
- Request: {"title": "string (1-200 chars)"}
|
|
1241
2260
|
- Response: 201 Created with todo object
|
|
1242
|
-
- Implemented in: @CODE:TODO-001:API
|
|
1243
|
-
- Tested in: @TEST:TODO
|
|
2261
|
+
- Implemented in: @CODE:EX-TODO-001:API
|
|
2262
|
+
- Tested in: @TEST:README-EXAMPLE-TODO
|
|
1244
2263
|
|
|
1245
2264
|
### Get All Todos
|
|
1246
2265
|
|
|
@@ -1268,7 +2287,7 @@ git commit -m "♻️ refactor(TODO-001): add database models and validation"
|
|
|
1268
2287
|
|
|
1269
2288
|
### Added
|
|
1270
2289
|
|
|
1271
|
-
- Todo Management API with CRUD operations (@SPEC:TODO-001)
|
|
2290
|
+
- Todo Management API with CRUD operations (@SPEC:EX-TODO-001)
|
|
1272
2291
|
- Create new todos
|
|
1273
2292
|
- List all todos
|
|
1274
2293
|
- Update existing todos
|
|
@@ -1290,11 +2309,11 @@ Let's verify everything generated is properly connected:
|
|
|
1290
2309
|
rg '@(SPEC|TEST|CODE|DOC):TODO-001' -n
|
|
1291
2310
|
|
|
1292
2311
|
# Output:
|
|
1293
|
-
# .moai/specs/SPEC-TODO-001/spec.md:1: # @SPEC:TODO-001: Todo Management API
|
|
1294
|
-
# tests/test_todo_api.py:2: # @TEST:TODO
|
|
1295
|
-
# src/todo/api.py:5: # @CODE:TODO-001:API | SPEC: SPEC-TODO-001.md
|
|
1296
|
-
# src/todo/models.py:5: # @CODE:TODO-001:MODEL | SPEC: SPEC-TODO-001.md
|
|
1297
|
-
# docs/api/todo.md:1: # @DOC:TODO-001: Todo Management API
|
|
2312
|
+
# .moai/specs/SPEC-TODO-001/spec.md:1: # @SPEC:EX-TODO-001: Todo Management API
|
|
2313
|
+
# tests/test_todo_api.py:2: # @TEST:README-EXAMPLE-TODO | SPEC: SPEC-TODO-001.md
|
|
2314
|
+
# src/todo/api.py:5: # @CODE:EX-TODO-001:API | SPEC: SPEC-TODO-001.md
|
|
2315
|
+
# src/todo/models.py:5: # @CODE:EX-TODO-001:MODEL | SPEC: SPEC-TODO-001.md
|
|
2316
|
+
# docs/api/todo.md:1: # @DOC:EX-TODO-001: Todo Management API
|
|
1298
2317
|
|
|
1299
2318
|
|
|
1300
2319
|
# 2️⃣ Run tests
|
|
@@ -1324,21 +2343,21 @@ git log --oneline | head -5
|
|
|
1324
2343
|
|
|
1325
2344
|
```
|
|
1326
2345
|
✅ SPEC written (3 minutes)
|
|
1327
|
-
└─ @SPEC:TODO-001 TAG assigned
|
|
2346
|
+
└─ @SPEC:EX-TODO-001 TAG assigned
|
|
1328
2347
|
└─ Clear requirements in EARS format
|
|
1329
2348
|
|
|
1330
2349
|
✅ TDD implementation (5 minutes)
|
|
1331
2350
|
└─ 🔴 RED: Tests written first
|
|
1332
2351
|
└─ 🟢 GREEN: Minimal implementation
|
|
1333
2352
|
└─ ♻️ REFACTOR: Quality improvement
|
|
1334
|
-
└─ @TEST:TODO
|
|
2353
|
+
└─ @TEST:README-EXAMPLE-TODO, @CODE:EX-TODO-001 TAGs assigned
|
|
1335
2354
|
└─ 87% coverage, TRUST 5 principles verified
|
|
1336
2355
|
|
|
1337
2356
|
✅ Documentation sync (1 minute)
|
|
1338
2357
|
└─ Living Document auto-generated
|
|
1339
2358
|
└─ README, CHANGELOG updated
|
|
1340
2359
|
└─ TAG chain validation complete
|
|
1341
|
-
└─ @DOC:TODO-001 TAG assigned
|
|
2360
|
+
└─ @DOC:EX-TODO-001 TAG assigned
|
|
1342
2361
|
└─ PR status: Draft → Ready for Review
|
|
1343
2362
|
|
|
1344
2363
|
Result:
|
|
@@ -1364,16 +2383,33 @@ Alfred works by combining multiple specialized agents with Claude Skills.
|
|
|
1364
2383
|
| Sub-agent | Model | Role |
|
|
1365
2384
|
| ------------------ | ------ | ----------------------------------------------------------------------- |
|
|
1366
2385
|
| project-manager 📋 | Sonnet | Project initialization, metadata interviews |
|
|
1367
|
-
| spec-builder 🏗️ | Sonnet | Plan board, EARS SPEC authoring
|
|
2386
|
+
| spec-builder 🏗️ | Sonnet | Plan board, EARS SPEC authoring, expert consultation recommendations |
|
|
1368
2387
|
| code-builder 💎 | Sonnet | Performs complete TDD with `implementation-planner` + `tdd-implementer` |
|
|
1369
2388
|
| doc-syncer 📖 | Haiku | Living Doc, README, CHANGELOG sync |
|
|
1370
|
-
| tag-agent 🏷️ | Haiku | TAG inventory, orphan detection
|
|
2389
|
+
| tag-agent 🏷️ | Haiku | TAG inventory, orphan detection, @EXPERT TAG validation |
|
|
1371
2390
|
| git-manager 🚀 | Haiku | GitFlow, Draft/Ready, Auto Merge |
|
|
1372
2391
|
| debug-helper 🔍 | Sonnet | Failure analysis, fix-forward strategy |
|
|
1373
2392
|
| trust-checker ✅ | Haiku | TRUST 5 quality gate |
|
|
1374
2393
|
| quality-gate 🛡️ | Haiku | Coverage change and release blocker review |
|
|
1375
2394
|
| cc-manager 🛠️ | Sonnet | Claude Code session optimization, Skill deployment |
|
|
1376
2395
|
|
|
2396
|
+
### Expert Agents (Proactively Triggered by SPEC Keywords)
|
|
2397
|
+
|
|
2398
|
+
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.
|
|
2399
|
+
|
|
2400
|
+
| Expert Agent | Model | Specialty | Auto-Trigger Keywords |
|
|
2401
|
+
| ----------------- | ------ | --------------------------------------------------- | ------------------------------------------------------------------------ |
|
|
2402
|
+
| backend-expert 🔧 | Sonnet | Backend architecture, API design, database, auth | 'backend', 'api', 'server', 'database', 'deployment', 'authentication' |
|
|
2403
|
+
| frontend-expert 💻| Sonnet | Frontend architecture, components, state mgmt | 'frontend', 'ui', 'page', 'component', 'client-side', 'web interface' |
|
|
2404
|
+
| devops-expert 🚀 | Sonnet | DevOps, CI/CD, deployment, containerization | 'deployment', 'docker', 'kubernetes', 'ci/cd', 'pipeline', 'aws' |
|
|
2405
|
+
| ui-ux-expert 🎨 | Sonnet | UI/UX design, accessibility (WCAG), design systems | 'design', 'ux', 'accessibility', 'a11y', 'figma', 'design system' |
|
|
2406
|
+
|
|
2407
|
+
**How It Works**:
|
|
2408
|
+
- When `/alfred:2-run` starts, `implementation-planner` scans the SPEC content
|
|
2409
|
+
- Matching keywords trigger automatic expert agent invocation
|
|
2410
|
+
- Experts provide domain-specific architecture guidance
|
|
2411
|
+
- All expert consultations are tagged with `@EXPERT:DOMAIN` for traceability
|
|
2412
|
+
|
|
1377
2413
|
### Skills (Progressive Disclosure - v0.4 New!)
|
|
1378
2414
|
|
|
1379
2415
|
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.
|
|
@@ -1426,6 +2462,7 @@ Specialized domain expertise
|
|
|
1426
2462
|
| `moai-domain-cli-tool` | CLI tool development, argument parsing, POSIX compliance, user-friendly help messages |
|
|
1427
2463
|
| `moai-domain-data-science` | Data analysis, visualization, statistical modeling, reproducible research workflows |
|
|
1428
2464
|
| `moai-domain-database` | Database design, schema optimization, indexing strategies, migration management |
|
|
2465
|
+
| `moai-domain-design-systems` | Design system architecture, W3C DTCG tokens, WCAG 2.2 accessibility, design-to-code, Figma MCP |
|
|
1429
2466
|
| `moai-domain-devops` | CI/CD pipelines, Docker containerization, Kubernetes orchestration, IaC |
|
|
1430
2467
|
| `moai-domain-frontend` | React/Vue/Angular development, state management, performance optimization, accessibility |
|
|
1431
2468
|
| `moai-domain-ml` | Machine learning model training, evaluation, deployment, MLOps workflows |
|
|
@@ -1521,7 +2558,7 @@ Hooks are **event-driven** scripts that trigger automatically at specific points
|
|
|
1521
2558
|
- Editing critical files (`CLAUDE.md`, `config.json`)
|
|
1522
2559
|
- Mass edits (10+ files at once via MultiEdit)
|
|
1523
2560
|
|
|
1524
|
-
**TAG Guard
|
|
2561
|
+
**TAG Guard**:
|
|
1525
2562
|
Automatically detects missing @TAG annotations in changed files:
|
|
1526
2563
|
|
|
1527
2564
|
- Scans staged, modified, and untracked files
|
|
@@ -1652,15 +2689,335 @@ If you need to temporarily disable hooks, edit `.claude/settings.json`:
|
|
|
1652
2689
|
|
|
1653
2690
|
| Version | Key Features | Date |
|
|
1654
2691
|
| ----------- | ------------------------------------------------------------------------------------------------ | ---------- |
|
|
2692
|
+
| **v0.8.2** | 📖 EARS terminology update: "Constraints" → "Unwanted Behaviors" for clarity | 2025-10-29 |
|
|
2693
|
+
| **v0.8.1** | 🔄 Command rename: `/alfred:9-help` → `/alfred:9-feedback` + User feedback workflow improvements | 2025-10-28 |
|
|
2694
|
+
| **v0.8.0** | 🏷️ @DOC TAG auto-generation system + SessionStart version check enhancement | 2025-10-27 |
|
|
2695
|
+
| **v0.7.0** | 🌍 Complete language localization system (English, Korean, Japanese, Chinese, Spanish) | 2025-10-26 |
|
|
2696
|
+
| **v0.6.3** | ⚡ 3-Stage update workflow: 70-80% performance improvement via parallel operations | 2025-10-25 |
|
|
2697
|
+
| **v0.6.0** | 🏗️ Major architecture refactor + Enhanced SPEC metadata structure (7 required + 9 optional) | 2025-10-24 |
|
|
1655
2698
|
| **v0.5.7** | 🎯 SPEC → GitHub Issue automation + CodeRabbit integration + Auto PR comments | 2025-10-27 |
|
|
1656
2699
|
| **v0.4.11** | ✨ TAG Guard system + CLAUDE.md formatting improvements + Code cleanup | 2025-10-23 |
|
|
1657
|
-
| **v0.4.10** | 🔧 Hook robustness improvements + Bilingual documentation + Template language config | 2025-10-23 |
|
|
1658
|
-
| **v0.4.9** | 🎯 Hook JSON schema validation fixes + Comprehensive tests (468/468 passing) | 2025-10-23 |
|
|
1659
|
-
| **v0.4.8** | 🚀 Release automation + PyPI deployment + Skills refinement | 2025-10-23 |
|
|
1660
|
-
| **v0.4.7** | 📖 Korean language optimization + SPEC-First principle documentation | 2025-10-22 |
|
|
1661
|
-
| **v0.4.6** | 🎉 Complete Skills v2.0 (100% Production-Ready) + 85,000 lines official docs + 300+ TDD examples | 2025-10-22 |
|
|
1662
2700
|
|
|
1663
|
-
> 📦 **Install Now**: `uv tool install moai-adk
|
|
2701
|
+
> 📦 **Install Now**: `uv tool install moai-adk` or `pip install moai-adk`
|
|
2702
|
+
|
|
2703
|
+
---
|
|
2704
|
+
|
|
2705
|
+
## 🔧 Beginner's Troubleshooting Guide
|
|
2706
|
+
|
|
2707
|
+
Common errors and solutions for getting started with MoAI-ADK.
|
|
2708
|
+
|
|
2709
|
+
### 1. uv is Not Installed
|
|
2710
|
+
|
|
2711
|
+
**Symptom**:
|
|
2712
|
+
```bash
|
|
2713
|
+
$ uv --version
|
|
2714
|
+
bash: uv: command not found
|
|
2715
|
+
```
|
|
2716
|
+
|
|
2717
|
+
**Cause**: uv not installed or not in PATH
|
|
2718
|
+
|
|
2719
|
+
**Solution**:
|
|
2720
|
+
|
|
2721
|
+
**macOS/Linux**:
|
|
2722
|
+
```bash
|
|
2723
|
+
# Install
|
|
2724
|
+
curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
2725
|
+
|
|
2726
|
+
# Restart shell
|
|
2727
|
+
source ~/.bashrc # or ~/.zshrc
|
|
2728
|
+
|
|
2729
|
+
# Verify
|
|
2730
|
+
uv --version
|
|
2731
|
+
```
|
|
2732
|
+
|
|
2733
|
+
**Windows (PowerShell)**:
|
|
2734
|
+
```powershell
|
|
2735
|
+
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
|
|
2736
|
+
|
|
2737
|
+
# Verify
|
|
2738
|
+
uv --version
|
|
2739
|
+
```
|
|
2740
|
+
|
|
2741
|
+
**If still not working**:
|
|
2742
|
+
```bash
|
|
2743
|
+
# Manually add PATH (macOS/Linux)
|
|
2744
|
+
export PATH="$HOME/.cargo/bin:$PATH"
|
|
2745
|
+
|
|
2746
|
+
# Verify
|
|
2747
|
+
uv --version
|
|
2748
|
+
```
|
|
2749
|
+
|
|
2750
|
+
---
|
|
2751
|
+
|
|
2752
|
+
### 2. Python Version Mismatch
|
|
2753
|
+
|
|
2754
|
+
**Symptom**:
|
|
2755
|
+
```
|
|
2756
|
+
Python 3.8 found, but 3.13+ required
|
|
2757
|
+
```
|
|
2758
|
+
|
|
2759
|
+
**Cause**: Python version is less than 3.13
|
|
2760
|
+
|
|
2761
|
+
**Solution**:
|
|
2762
|
+
|
|
2763
|
+
**Option A: Using pyenv (Recommended)**:
|
|
2764
|
+
```bash
|
|
2765
|
+
# Install pyenv
|
|
2766
|
+
curl https://pyenv.run | bash
|
|
2767
|
+
|
|
2768
|
+
# Install Python 3.13
|
|
2769
|
+
pyenv install 3.13
|
|
2770
|
+
pyenv global 3.13
|
|
2771
|
+
|
|
2772
|
+
# Verify
|
|
2773
|
+
python --version # Python 3.13.x
|
|
2774
|
+
```
|
|
2775
|
+
|
|
2776
|
+
**Option B: Let uv manage Python**:
|
|
2777
|
+
```bash
|
|
2778
|
+
# uv automatically downloads Python 3.13
|
|
2779
|
+
uv python install 3.13
|
|
2780
|
+
uv python pin 3.13
|
|
2781
|
+
|
|
2782
|
+
# Verify
|
|
2783
|
+
python --version
|
|
2784
|
+
```
|
|
2785
|
+
|
|
2786
|
+
---
|
|
2787
|
+
|
|
2788
|
+
### 3. Git Not Found
|
|
2789
|
+
|
|
2790
|
+
**Symptom**:
|
|
2791
|
+
```
|
|
2792
|
+
✗ Git (runtime): not found
|
|
2793
|
+
```
|
|
2794
|
+
|
|
2795
|
+
**Cause**: Git not installed on system
|
|
2796
|
+
|
|
2797
|
+
**Solution**:
|
|
2798
|
+
|
|
2799
|
+
**macOS**:
|
|
2800
|
+
```bash
|
|
2801
|
+
# Using Homebrew
|
|
2802
|
+
brew install git
|
|
2803
|
+
|
|
2804
|
+
# Or install Xcode Command Line Tools
|
|
2805
|
+
xcode-select --install
|
|
2806
|
+
```
|
|
2807
|
+
|
|
2808
|
+
**Ubuntu/Debian**:
|
|
2809
|
+
```bash
|
|
2810
|
+
sudo apt update
|
|
2811
|
+
sudo apt install git -y
|
|
2812
|
+
```
|
|
2813
|
+
|
|
2814
|
+
**Windows**:
|
|
2815
|
+
```powershell
|
|
2816
|
+
# Using winget
|
|
2817
|
+
winget install Git.Git
|
|
2818
|
+
|
|
2819
|
+
# Or download from https://git-scm.com/download/win
|
|
2820
|
+
```
|
|
2821
|
+
|
|
2822
|
+
**Verify**:
|
|
2823
|
+
```bash
|
|
2824
|
+
git --version # git version 2.x.x
|
|
2825
|
+
```
|
|
2826
|
+
|
|
2827
|
+
---
|
|
2828
|
+
|
|
2829
|
+
### 4. Claude Code Doesn't Recognize .moai/ Folder
|
|
2830
|
+
|
|
2831
|
+
**Symptom**:
|
|
2832
|
+
```
|
|
2833
|
+
"Project not initialized"
|
|
2834
|
+
/alfred:0-project command doesn't work
|
|
2835
|
+
```
|
|
2836
|
+
|
|
2837
|
+
**Cause**: `.moai/` or `.claude/` folders missing or corrupted
|
|
2838
|
+
|
|
2839
|
+
**Solution**:
|
|
2840
|
+
|
|
2841
|
+
```bash
|
|
2842
|
+
# 1. Verify current directory
|
|
2843
|
+
pwd # /path/to/your-project
|
|
2844
|
+
|
|
2845
|
+
# 2. Check if .moai/ exists
|
|
2846
|
+
ls -la .moai/config.json
|
|
2847
|
+
|
|
2848
|
+
# 3. If missing, reinitialize
|
|
2849
|
+
moai-adk init .
|
|
2850
|
+
|
|
2851
|
+
# 4. Restart Claude Code
|
|
2852
|
+
exit # Exit Claude Code
|
|
2853
|
+
claude # Restart
|
|
2854
|
+
```
|
|
2855
|
+
|
|
2856
|
+
**Verify**:
|
|
2857
|
+
```bash
|
|
2858
|
+
moai-adk doctor
|
|
2859
|
+
# All items should show ✅
|
|
2860
|
+
```
|
|
2861
|
+
|
|
2862
|
+
---
|
|
2863
|
+
|
|
2864
|
+
### 5. Module Not Found When Running Tests
|
|
2865
|
+
|
|
2866
|
+
**Symptom**:
|
|
2867
|
+
```
|
|
2868
|
+
FAILED tests/test_hello.py - ModuleNotFoundError: No module named 'fastapi'
|
|
2869
|
+
```
|
|
2870
|
+
|
|
2871
|
+
**Cause**: Required package not installed
|
|
2872
|
+
|
|
2873
|
+
**Solution**:
|
|
2874
|
+
|
|
2875
|
+
```bash
|
|
2876
|
+
# Install dependencies from project root
|
|
2877
|
+
uv sync
|
|
2878
|
+
|
|
2879
|
+
# Or install specific packages
|
|
2880
|
+
uv add fastapi pytest
|
|
2881
|
+
|
|
2882
|
+
# Activate virtual environment
|
|
2883
|
+
source .venv/bin/activate # macOS/Linux
|
|
2884
|
+
.venv\Scripts\activate # Windows
|
|
2885
|
+
|
|
2886
|
+
# Run tests
|
|
2887
|
+
pytest tests/ -v
|
|
2888
|
+
```
|
|
2889
|
+
|
|
2890
|
+
---
|
|
2891
|
+
|
|
2892
|
+
### 6. `/alfred` Commands Not Working
|
|
2893
|
+
|
|
2894
|
+
**Symptom**:
|
|
2895
|
+
```
|
|
2896
|
+
Unknown command: /alfred:1-plan
|
|
2897
|
+
```
|
|
2898
|
+
|
|
2899
|
+
**Cause**: Claude Code version issue or `.claude/` folder corrupted
|
|
2900
|
+
|
|
2901
|
+
**Solution**:
|
|
2902
|
+
|
|
2903
|
+
```bash
|
|
2904
|
+
# 1. Check Claude Code version (need v1.5.0+)
|
|
2905
|
+
claude --version
|
|
2906
|
+
|
|
2907
|
+
# 2. Verify .claude/ folder
|
|
2908
|
+
ls -la .claude/commands/
|
|
2909
|
+
|
|
2910
|
+
# 3. Reinitialize if needed
|
|
2911
|
+
moai-adk init .
|
|
2912
|
+
|
|
2913
|
+
# 4. Restart Claude Code
|
|
2914
|
+
exit
|
|
2915
|
+
claude
|
|
2916
|
+
```
|
|
2917
|
+
|
|
2918
|
+
---
|
|
2919
|
+
|
|
2920
|
+
### 7. TAG Chain Broken
|
|
2921
|
+
|
|
2922
|
+
**Symptom**:
|
|
2923
|
+
```
|
|
2924
|
+
⚠ Orphan TAG detected: @TEST:EX-HELLO-001 (no matching @SPEC)
|
|
2925
|
+
```
|
|
2926
|
+
|
|
2927
|
+
**Cause**: SPEC deleted or TAGs don't match
|
|
2928
|
+
|
|
2929
|
+
**Solution**:
|
|
2930
|
+
|
|
2931
|
+
```bash
|
|
2932
|
+
# 1. Validate TAG chain
|
|
2933
|
+
rg '@(SPEC|TEST|CODE):HELLO-001' -n
|
|
2934
|
+
|
|
2935
|
+
# 2. Check if SPEC exists
|
|
2936
|
+
rg '@SPEC:EX-HELLO-001' -n .moai/specs/
|
|
2937
|
+
|
|
2938
|
+
# 3. If SPEC missing, regenerate
|
|
2939
|
+
/alfred:1-plan "feature description"
|
|
2940
|
+
|
|
2941
|
+
# Or fix TAG in test file
|
|
2942
|
+
# Edit tests/test_hello.py: @TEST:EX-HELLO-001 → @TEST:README-EXAMPLE-HELLO
|
|
2943
|
+
|
|
2944
|
+
# 4. Sync
|
|
2945
|
+
/alfred:3-sync
|
|
2946
|
+
```
|
|
2947
|
+
|
|
2948
|
+
---
|
|
2949
|
+
|
|
2950
|
+
### 8. General Debugging Commands
|
|
2951
|
+
|
|
2952
|
+
**Check System Status**:
|
|
2953
|
+
```bash
|
|
2954
|
+
moai-adk doctor
|
|
2955
|
+
```
|
|
2956
|
+
Shows all dependency checks + recommendations
|
|
2957
|
+
|
|
2958
|
+
**Check Project Structure**:
|
|
2959
|
+
```bash
|
|
2960
|
+
tree -L 2 .moai/
|
|
2961
|
+
```
|
|
2962
|
+
|
|
2963
|
+
**Validate TAG Chain Integrity**:
|
|
2964
|
+
```bash
|
|
2965
|
+
rg '@(SPEC|TEST|CODE|DOC):' -n | wc -l
|
|
2966
|
+
```
|
|
2967
|
+
Shows total TAG count
|
|
2968
|
+
|
|
2969
|
+
**Check Git Status**:
|
|
2970
|
+
```bash
|
|
2971
|
+
git status
|
|
2972
|
+
git log --oneline -5
|
|
2973
|
+
```
|
|
2974
|
+
|
|
2975
|
+
---
|
|
2976
|
+
|
|
2977
|
+
### Debugging Checklist
|
|
2978
|
+
|
|
2979
|
+
When something goes wrong:
|
|
2980
|
+
|
|
2981
|
+
1. **Read**: Copy the complete error message
|
|
2982
|
+
2. **Search**: Check GitHub Issues for similar errors
|
|
2983
|
+
3. **Diagnose**: Run `moai-adk doctor`
|
|
2984
|
+
4. **Restart**: Quit and restart Claude Code
|
|
2985
|
+
5. **Ask**: Post in GitHub Discussions
|
|
2986
|
+
|
|
2987
|
+
Quick diagnosis with details:
|
|
2988
|
+
```bash
|
|
2989
|
+
moai-adk doctor --verbose
|
|
2990
|
+
```
|
|
2991
|
+
|
|
2992
|
+
---
|
|
2993
|
+
|
|
2994
|
+
### Need More Help?
|
|
2995
|
+
|
|
2996
|
+
- **GitHub Issues**: Search for similar problems
|
|
2997
|
+
- **GitHub Discussions**: Ask questions
|
|
2998
|
+
- **Discord Community**: Real-time chat support
|
|
2999
|
+
|
|
3000
|
+
**When reporting issues, include**:
|
|
3001
|
+
1. Output from `moai-adk doctor --verbose`
|
|
3002
|
+
2. Complete error message (screenshot or text)
|
|
3003
|
+
3. Steps to reproduce
|
|
3004
|
+
4. Your OS and version
|
|
3005
|
+
|
|
3006
|
+
---
|
|
3007
|
+
|
|
3008
|
+
### Frequently Asked Questions
|
|
3009
|
+
|
|
3010
|
+
**Q. Can I install on an existing project?**
|
|
3011
|
+
A. Yes! Run `moai-adk init .` - it only adds `.moai/` structure without touching existing code.
|
|
3012
|
+
|
|
3013
|
+
**Q. How do I run tests?**
|
|
3014
|
+
A. `/alfred:2-run` runs tests first. You can also run `pytest`, `pnpm test` separately.
|
|
3015
|
+
|
|
3016
|
+
**Q. How do I verify documentation is current?**
|
|
3017
|
+
A. Run `/alfred:3-sync` which generates a Sync Report. Check the PR to see the report.
|
|
3018
|
+
|
|
3019
|
+
**Q. Can I do this manually without Alfred?**
|
|
3020
|
+
A. Possible, but remember: SPEC → TEST → CODE → DOC order and keep @TAGs updated.
|
|
1664
3021
|
|
|
1665
3022
|
---
|
|
1666
3023
|
|
|
@@ -1668,8 +3025,8 @@ If you need to temporarily disable hooks, edit `.claude/settings.json`:
|
|
|
1668
3025
|
|
|
1669
3026
|
| Purpose | Resource |
|
|
1670
3027
|
| ------------------------- | --------------------------------------------------------------- |
|
|
1671
|
-
| Skills detailed structure | `.claude/skills/` directory (
|
|
1672
|
-
| Sub-agent details | `.claude/agents/alfred/` directory (
|
|
3028
|
+
| Skills detailed structure | `.claude/skills/` directory (74 Skills) |
|
|
3029
|
+
| Sub-agent details | `.claude/agents/alfred/` directory (16 agents + 4 commands) |
|
|
1673
3030
|
| Workflow guide | `.claude/commands/alfred/` (4 commands: 0-project ~ 3-sync) |
|
|
1674
3031
|
| Documentation | Coming soon (see `.moai/`, `.claude/`, `docs/` in your project) |
|
|
1675
3032
|
| Release notes | GitHub Releases: https://github.com/modu-ai/moai-adk/releases |
|
|
@@ -1682,8 +3039,8 @@ If you need to temporarily disable hooks, edit `.claude/settings.json`:
|
|
|
1682
3039
|
| ------------------------ | -------------------------------------------------------- |
|
|
1683
3040
|
| **GitHub Repository** | https://github.com/modu-ai/moai-adk |
|
|
1684
3041
|
| **Issues & Discussions** | https://github.com/modu-ai/moai-adk/issues |
|
|
1685
|
-
| **PyPI Package** | https://pypi.org/project/moai-adk/
|
|
1686
|
-
| **Latest Release** | https://github.com/modu-ai/moai-adk/releases
|
|
3042
|
+
| **PyPI Package** | https://pypi.org/project/moai-adk/ |
|
|
3043
|
+
| **Latest Release** | https://github.com/modu-ai/moai-adk/releases |
|
|
1687
3044
|
| **Documentation** | See `.moai/`, `.claude/`, `docs/` within project |
|
|
1688
3045
|
|
|
1689
3046
|
---
|
|
@@ -1692,7 +3049,7 @@ If you need to temporarily disable hooks, edit `.claude/settings.json`:
|
|
|
1692
3049
|
|
|
1693
3050
|
> **"No CODE without SPEC"**
|
|
1694
3051
|
|
|
1695
|
-
MoAI-ADK is not simply a code generation tool. Alfred SuperAgent with its 19-member team and
|
|
3052
|
+
MoAI-ADK is not simply a code generation tool. Alfred SuperAgent with its 19-member team and 55+ Claude Skills together guarantee:
|
|
1696
3053
|
|
|
1697
3054
|
- ✅ **SPEC → TEST (TDD) → CODE → DOCS consistency**
|
|
1698
3055
|
- ✅ **Complete history tracking with @TAG system**
|