moai-adk 0.8.0__py3-none-any.whl → 0.15.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of moai-adk might be problematic. Click here for more details.

Files changed (207) hide show
  1. moai_adk/cli/commands/init.py +14 -2
  2. moai_adk/cli/commands/update.py +229 -60
  3. moai_adk/core/config/migration.py +1 -1
  4. moai_adk/core/issue_creator.py +313 -0
  5. moai_adk/core/project/detector.py +201 -12
  6. moai_adk/core/project/initializer.py +62 -1
  7. moai_adk/core/project/phase_executor.py +48 -6
  8. moai_adk/core/tags/__init__.py +86 -0
  9. moai_adk/core/tags/ci_validator.py +463 -0
  10. moai_adk/core/tags/cli.py +283 -0
  11. moai_adk/core/tags/generator.py +109 -0
  12. moai_adk/core/tags/inserter.py +99 -0
  13. moai_adk/core/tags/mapper.py +126 -0
  14. moai_adk/core/tags/parser.py +76 -0
  15. moai_adk/core/tags/pre_commit_validator.py +393 -0
  16. moai_adk/core/tags/reporter.py +956 -0
  17. moai_adk/core/tags/tags.py +149 -0
  18. moai_adk/core/tags/validator.py +897 -0
  19. moai_adk/core/template_engine.py +268 -0
  20. moai_adk/templates/.claude/agents/alfred/backend-expert.md +319 -0
  21. moai_adk/templates/.claude/agents/alfred/cc-manager.md +25 -2
  22. moai_adk/templates/.claude/agents/alfred/debug-helper.md +24 -12
  23. moai_adk/templates/.claude/agents/alfred/devops-expert.md +464 -0
  24. moai_adk/templates/.claude/agents/alfred/doc-syncer.md +20 -13
  25. moai_adk/templates/.claude/agents/alfred/frontend-expert.md +357 -0
  26. moai_adk/templates/.claude/agents/alfred/git-manager.md +47 -16
  27. moai_adk/templates/.claude/agents/alfred/implementation-planner.md +95 -15
  28. moai_adk/templates/.claude/agents/alfred/project-manager.md +78 -12
  29. moai_adk/templates/.claude/agents/alfred/quality-gate.md +28 -5
  30. moai_adk/templates/.claude/agents/alfred/skill-factory.md +30 -2
  31. moai_adk/templates/.claude/agents/alfred/spec-builder.md +133 -13
  32. moai_adk/templates/.claude/agents/alfred/tag-agent.md +104 -8
  33. moai_adk/templates/.claude/agents/alfred/tdd-implementer.md +133 -16
  34. moai_adk/templates/.claude/agents/alfred/trust-checker.md +27 -4
  35. moai_adk/templates/.claude/agents/alfred/ui-ux-expert.md +571 -0
  36. moai_adk/templates/.claude/commands/alfred/0-project.md +466 -125
  37. moai_adk/templates/.claude/commands/alfred/1-plan.md +208 -71
  38. moai_adk/templates/.claude/commands/alfred/2-run.md +276 -55
  39. moai_adk/templates/.claude/commands/alfred/3-sync.md +439 -53
  40. moai_adk/templates/.claude/commands/alfred/9-feedback.md +149 -0
  41. moai_adk/templates/.claude/hooks/alfred/core/project.py +361 -29
  42. moai_adk/templates/.claude/hooks/alfred/core/timeout.py +136 -0
  43. moai_adk/templates/.claude/hooks/alfred/core/ttl_cache.py +108 -0
  44. moai_adk/templates/.claude/hooks/alfred/core/version_cache.py +198 -0
  45. moai_adk/templates/.claude/hooks/alfred/handlers/__init__.py +14 -6
  46. moai_adk/templates/.claude/hooks/alfred/post_tool__log_changes.py +94 -0
  47. moai_adk/templates/.claude/hooks/alfred/pre_tool__auto_checkpoint.py +100 -0
  48. moai_adk/templates/.claude/hooks/alfred/session_end__cleanup.py +94 -0
  49. moai_adk/templates/.claude/hooks/alfred/session_start__show_project_info.py +94 -0
  50. moai_adk/templates/.claude/hooks/alfred/{core → shared/core}/__init__.py +2 -2
  51. moai_adk/templates/.claude/hooks/alfred/{core → shared/core}/checkpoint.py +3 -3
  52. moai_adk/templates/.claude/hooks/alfred/{core → shared/core}/context.py +5 -5
  53. moai_adk/templates/.claude/hooks/alfred/shared/core/project.py +749 -0
  54. moai_adk/templates/.claude/hooks/alfred/{core → shared/core}/tags.py +55 -23
  55. moai_adk/templates/.claude/hooks/alfred/shared/core/version_cache.py +198 -0
  56. moai_adk/templates/.claude/hooks/alfred/shared/handlers/__init__.py +21 -0
  57. moai_adk/templates/.claude/hooks/alfred/shared/handlers/notification.py +154 -0
  58. moai_adk/templates/.claude/hooks/alfred/{handlers → shared/handlers}/session.py +28 -15
  59. moai_adk/templates/.claude/hooks/alfred/{handlers → shared/handlers}/tool.py +3 -6
  60. moai_adk/templates/.claude/hooks/alfred/{handlers → shared/handlers}/user.py +19 -0
  61. moai_adk/templates/.claude/hooks/alfred/user_prompt__jit_load_docs.py +112 -0
  62. moai_adk/templates/.claude/hooks/alfred/utils/__init__.py +1 -0
  63. moai_adk/templates/.claude/hooks/alfred/utils/timeout.py +161 -0
  64. moai_adk/templates/.claude/settings.json +5 -5
  65. moai_adk/templates/.claude/skills/moai-alfred-agent-guide/SKILL.md +70 -0
  66. moai_adk/templates/.claude/skills/moai-alfred-agent-guide/examples.md +62 -0
  67. moai_adk/templates/{.moai/memory/CLAUDE-AGENTS-GUIDE.md → .claude/skills/moai-alfred-agent-guide/reference.md} +34 -0
  68. moai_adk/templates/.claude/skills/moai-alfred-config-schema/SKILL.md +56 -0
  69. moai_adk/templates/.claude/skills/moai-alfred-config-schema/examples.md +28 -0
  70. moai_adk/templates/.claude/skills/moai-alfred-context-budget/SKILL.md +62 -0
  71. moai_adk/templates/.claude/skills/moai-alfred-context-budget/examples.md +28 -0
  72. moai_adk/templates/.claude/skills/moai-alfred-context-budget/reference.md +405 -0
  73. moai_adk/templates/.claude/skills/moai-alfred-dev-guide/SKILL.md +51 -0
  74. moai_adk/templates/.claude/skills/moai-alfred-dev-guide/examples.md +355 -0
  75. moai_adk/templates/.claude/skills/moai-alfred-dev-guide/reference.md +239 -0
  76. moai_adk/templates/.claude/skills/moai-alfred-expertise-detection/SKILL.md +323 -0
  77. moai_adk/templates/.claude/skills/moai-alfred-expertise-detection/examples.md +286 -0
  78. moai_adk/templates/.claude/skills/moai-alfred-expertise-detection/reference.md +126 -0
  79. moai_adk/templates/.claude/skills/moai-alfred-gitflow-policy/SKILL.md +74 -0
  80. moai_adk/templates/.claude/skills/moai-alfred-gitflow-policy/examples.md +4 -0
  81. moai_adk/templates/.claude/skills/moai-alfred-gitflow-policy/reference.md +269 -0
  82. moai_adk/templates/.claude/skills/moai-alfred-issue-labels/SKILL.md +19 -0
  83. moai_adk/templates/.claude/skills/moai-alfred-issue-labels/examples.md +4 -0
  84. moai_adk/templates/.claude/skills/moai-alfred-issue-labels/reference.md +150 -0
  85. moai_adk/templates/.claude/skills/moai-alfred-persona-roles/SKILL.md +198 -0
  86. moai_adk/templates/.claude/skills/moai-alfred-persona-roles/examples.md +431 -0
  87. moai_adk/templates/.claude/skills/moai-alfred-persona-roles/reference.md +141 -0
  88. moai_adk/templates/.claude/skills/moai-alfred-practices/SKILL.md +89 -0
  89. moai_adk/templates/.claude/skills/moai-alfred-practices/examples.md +122 -0
  90. moai_adk/templates/.claude/skills/moai-alfred-proactive-suggestions/SKILL.md +508 -0
  91. moai_adk/templates/.claude/skills/moai-alfred-proactive-suggestions/examples.md +481 -0
  92. moai_adk/templates/.claude/skills/moai-alfred-proactive-suggestions/reference.md +100 -0
  93. moai_adk/templates/.claude/skills/moai-alfred-reporting/SKILL.md +273 -0
  94. moai_adk/templates/.claude/skills/moai-alfred-rules/SKILL.md +77 -0
  95. moai_adk/templates/.claude/skills/moai-alfred-rules/examples.md +265 -0
  96. moai_adk/templates/.claude/skills/moai-alfred-session-state/SKILL.md +19 -0
  97. moai_adk/templates/.claude/skills/moai-alfred-session-state/examples.md +4 -0
  98. moai_adk/templates/.claude/skills/moai-alfred-session-state/reference.md +84 -0
  99. moai_adk/templates/.claude/skills/moai-alfred-spec-authoring/README.md +137 -0
  100. moai_adk/templates/.claude/skills/moai-alfred-spec-authoring/SKILL.md +219 -0
  101. moai_adk/templates/.claude/skills/{moai-spec-authoring → moai-alfred-spec-authoring}/examples/validate-spec.sh +3 -3
  102. moai_adk/templates/.claude/skills/moai-alfred-spec-authoring/examples.md +541 -0
  103. moai_adk/templates/.claude/skills/moai-alfred-spec-authoring/reference.md +622 -0
  104. moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-extended/SKILL.md +115 -0
  105. moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-extended/examples.md +4 -0
  106. moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-extended/reference.md +348 -0
  107. moai_adk/templates/.claude/skills/moai-alfred-todowrite-pattern/SKILL.md +19 -0
  108. moai_adk/templates/.claude/skills/moai-alfred-todowrite-pattern/examples.md +4 -0
  109. moai_adk/templates/.claude/skills/moai-alfred-todowrite-pattern/reference.md +211 -0
  110. moai_adk/templates/.claude/skills/moai-alfred-workflow/SKILL.md +288 -0
  111. moai_adk/templates/.claude/skills/moai-cc-skill-descriptions/SKILL.md +19 -0
  112. moai_adk/templates/.claude/skills/moai-cc-skill-descriptions/examples.md +4 -0
  113. moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/SKILL.md +3 -3
  114. moai_adk/templates/.claude/skills/moai-design-systems/SKILL.md +802 -0
  115. moai_adk/templates/.claude/skills/moai-design-systems/examples.md +1238 -0
  116. moai_adk/templates/.claude/skills/moai-design-systems/reference.md +673 -0
  117. moai_adk/templates/.claude/skills/moai-domain-frontend/SKILL.md +17 -13
  118. moai_adk/templates/.claude/skills/moai-foundation-ears/SKILL.md +9 -6
  119. moai_adk/templates/.claude/skills/moai-lang-go/SKILL.md +15 -12
  120. moai_adk/templates/.claude/skills/moai-lang-java/SKILL.md +14 -12
  121. moai_adk/templates/.claude/skills/moai-lang-php/SKILL.md +14 -11
  122. moai_adk/templates/.claude/skills/moai-lang-python/SKILL.md +10 -8
  123. moai_adk/templates/.claude/skills/moai-lang-rust/SKILL.md +15 -12
  124. moai_adk/templates/.claude/skills/moai-lang-scala/SKILL.md +13 -11
  125. moai_adk/templates/.claude/skills/moai-lang-typescript/SKILL.md +16 -10
  126. moai_adk/templates/.claude/skills/moai-project-documentation.md +622 -0
  127. moai_adk/templates/.git-hooks/pre-push +143 -0
  128. moai_adk/templates/.github/workflows/c-tag-validation.yml +11 -0
  129. moai_adk/templates/.github/workflows/cpp-tag-validation.yml +11 -0
  130. moai_adk/templates/.github/workflows/csharp-tag-validation.yml +11 -0
  131. moai_adk/templates/.github/workflows/dart-tag-validation.yml +11 -0
  132. moai_adk/templates/.github/workflows/go-tag-validation.yml +130 -0
  133. moai_adk/templates/.github/workflows/java-tag-validation.yml +11 -0
  134. moai_adk/templates/.github/workflows/javascript-tag-validation.yml +135 -0
  135. moai_adk/templates/.github/workflows/kotlin-tag-validation.yml +11 -0
  136. moai_adk/templates/.github/workflows/moai-gitflow.yml +166 -3
  137. moai_adk/templates/.github/workflows/moai-release-create.yml +100 -0
  138. moai_adk/templates/.github/workflows/moai-release-pipeline.yml +188 -0
  139. moai_adk/templates/.github/workflows/php-tag-validation.yml +11 -0
  140. moai_adk/templates/.github/workflows/python-tag-validation.yml +118 -0
  141. moai_adk/templates/.github/workflows/release.yml +118 -0
  142. moai_adk/templates/.github/workflows/ruby-tag-validation.yml +11 -0
  143. moai_adk/templates/.github/workflows/rust-tag-validation.yml +11 -0
  144. moai_adk/templates/.github/workflows/shell-tag-validation.yml +11 -0
  145. moai_adk/templates/.github/workflows/spec-issue-sync.yml +206 -35
  146. moai_adk/templates/.github/workflows/swift-tag-validation.yml +11 -0
  147. moai_adk/templates/.github/workflows/tag-report.yml +269 -0
  148. moai_adk/templates/.github/workflows/tag-validation.yml +186 -0
  149. moai_adk/templates/.github/workflows/typescript-tag-validation.yml +154 -0
  150. moai_adk/templates/.moai/config.json +21 -2
  151. moai_adk/templates/CLAUDE.md +972 -78
  152. moai_adk/templates/workflows/go-tag-validation.yml +30 -0
  153. moai_adk/templates/workflows/javascript-tag-validation.yml +41 -0
  154. moai_adk/templates/workflows/python-tag-validation.yml +42 -0
  155. moai_adk/templates/workflows/typescript-tag-validation.yml +31 -0
  156. moai_adk/utils/banner.py +5 -5
  157. {moai_adk-0.8.0.dist-info → moai_adk-0.15.0.dist-info}/METADATA +1518 -161
  158. {moai_adk-0.8.0.dist-info → moai_adk-0.15.0.dist-info}/RECORD +183 -100
  159. moai_adk/templates/.claude/hooks/alfred/HOOK_SCHEMA_VALIDATION.md +0 -313
  160. moai_adk/templates/.claude/hooks/alfred/README.md +0 -230
  161. moai_adk/templates/.claude/hooks/alfred/alfred_hooks.py +0 -174
  162. moai_adk/templates/.claude/hooks/alfred/handlers/notification.py +0 -25
  163. moai_adk/templates/.claude/hooks/alfred/test_hook_output.py +0 -175
  164. moai_adk/templates/.claude/output-styles/alfred/agentic-coding.md +0 -640
  165. moai_adk/templates/.claude/output-styles/alfred/moai-adk-learning.md +0 -696
  166. moai_adk/templates/.claude/output-styles/alfred/study-with-alfred.md +0 -474
  167. moai_adk/templates/.claude/skills/moai-spec-authoring/README.md +0 -137
  168. moai_adk/templates/.claude/skills/moai-spec-authoring/SKILL.md +0 -218
  169. moai_adk/templates/.claude/skills/moai-spec-authoring/examples.md +0 -541
  170. moai_adk/templates/.claude/skills/moai-spec-authoring/reference.md +0 -622
  171. moai_adk/templates/.github/ISSUE_TEMPLATE/spec.yml +0 -176
  172. moai_adk/templates/.github/PULL_REQUEST_TEMPLATE.md +0 -69
  173. moai_adk/templates/.moai/memory/DEVELOPMENT-GUIDE.md +0 -344
  174. moai_adk/templates/.moai/memory/GITFLOW-PROTECTION-POLICY.md +0 -220
  175. moai_adk/templates/.moai/memory/SPEC-METADATA.md +0 -356
  176. moai_adk/templates/.moai/memory/config-schema.md +0 -444
  177. moai_adk/templates/.moai/memory/gitflow-protection-policy.md +0 -220
  178. moai_adk/templates/.moai/memory/spec-metadata.md +0 -356
  179. moai_adk/templates/.moai/project/product.md +0 -161
  180. moai_adk/templates/.moai/project/structure.md +0 -156
  181. moai_adk/templates/.moai/project/tech.md +0 -227
  182. moai_adk/templates/__init__.py +0 -2
  183. /moai_adk/templates/{.moai/memory/CONFIG-SCHEMA.md → .claude/skills/moai-alfred-config-schema/reference.md} +0 -0
  184. /moai_adk/templates/{.moai/memory/CLAUDE-PRACTICES.md → .claude/skills/moai-alfred-practices/reference.md} +0 -0
  185. /moai_adk/templates/{.moai/memory/CLAUDE-RULES.md → .claude/skills/moai-alfred-rules/reference.md} +0 -0
  186. /moai_adk/templates/{.moai/memory/SKILLS-DESCRIPTION-POLICY.md → .claude/skills/moai-cc-skill-descriptions/reference.md} +0 -0
  187. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/CHECKLIST.md +0 -0
  188. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/EXAMPLES.md +0 -0
  189. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/INTERACTIVE-DISCOVERY.md +0 -0
  190. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/METADATA.md +0 -0
  191. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/PARALLEL-ANALYSIS-REPORT.md +0 -0
  192. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/PYTHON-VERSION-MATRIX.md +0 -0
  193. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/SKILL-FACTORY-WORKFLOW.md +0 -0
  194. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/SKILL-UPDATE-ADVISOR.md +0 -0
  195. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/STEP-BY-STEP-GUIDE.md +0 -0
  196. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/STRUCTURE.md +0 -0
  197. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/WEB-RESEARCH.md +0 -0
  198. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/reference.md +0 -0
  199. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/scripts/generate-structure.sh +0 -0
  200. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/scripts/validate-skill.sh +0 -0
  201. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/templates/SKILL_TEMPLATE.md +0 -0
  202. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/templates/examples-template.md +0 -0
  203. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/templates/reference-template.md +0 -0
  204. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/templates/scripts-template.sh +0 -0
  205. {moai_adk-0.8.0.dist-info → moai_adk-0.15.0.dist-info}/WHEEL +0 -0
  206. {moai_adk-0.8.0.dist-info → moai_adk-0.15.0.dist-info}/entry_points.txt +0 -0
  207. {moai_adk-0.8.0.dist-info → moai_adk-0.15.0.dist-info}/licenses/LICENSE +0 -0
@@ -1,474 +0,0 @@
1
- ---
2
- name: Study with Alfred
3
- description: "Learning mode to easily learn new skills with Alfred"
4
- # Translations:
5
- # - ko: "Alfred와 함께 새로운 기술을 쉽게 학습하는 학습 모드"
6
- # - ja: "Alfredと一緒に新しいスキルを簡単に学習する学習モード"
7
- # - zh: "与Alfred一起轻松学习新技能的学习模式"
8
- ---
9
-
10
- # Study with Alfred
11
- > Interactive prompts rely on `AskUserQuestion tool (documented in moai-alfred-interactive-questions skill)` so AskUserQuestion renders TUI selection menus for user surveys and approvals.
12
-
13
- **Audience**: Developers looking to learn new technologies/languages/frameworks
14
-
15
- This is a learning mode where Alfred easily explains new skills and helps you practice, like a friend learning together.
16
-
17
- ## How to Learn with Alfred
18
-
19
- **Alfred's role**:
20
- - Explain complex concepts in an easy-to-understand manner
21
- - Improve understanding with real-life analogies
22
- - Practice together step by step
23
- - Answer frequently asked questions
24
-
25
- **Learning Flow**:
26
- ```
27
- 1. What (What is this?) → Understanding the basic concept
28
- 2. Why (Why do you need it?) → Reasons for use and advantages
29
- 3. How (How to use it?) → Practice-based learning
30
- 4. Practice → Integration with MoAI-ADK
31
- ```
32
-
33
- ---
34
-
35
- ## 4 stages of learning
36
-
37
- ### Step 1: What (What is this?)
38
-
39
- **Alfred**: "I'll summarize the new technology in one sentence."
40
-
41
- **Explanation method**:
42
- - One line summary
43
- - Real life analogy
44
- - 3 key concepts
45
-
46
- **Example**: FastAPI (Python web framework)
47
- ```
48
- Alfred: "FastAPI is a tool to quickly create APIs with Python."
49
-
50
- Real life analogy:
51
- A tool that quickly assembles API pieces like Lego blocks
52
-
53
- One-line summary:
54
- Python + automatic verification + fast speed = FastAPI
55
-
56
- Key concepts:
57
- 1. Automatic documentation (Swagger UI)
58
- 2. Type verification (Pydantic)
59
- 3. Asynchronous processing (async/await)
60
- ```
61
-
62
- ### Step 2: Why (Why do you need it?)
63
-
64
- **Alfred**: “Let’s think together about the problems this technology solves.”
65
-
66
- **How ​​to explain**:
67
- - Problem situation
68
- - Solution
69
- - Actual use case
70
-
71
- **Example**: Why use FastAPI?
72
- ```
73
- Let's think about it with Alfred:
74
-
75
- Problem:
76
- "Flask is slow, and Django is too heavy. Type validation also has to be done manually."
77
-
78
- Solution:
79
- FastAPI is fast, lightweight, and automatically verifies types.
80
-
81
- Real world usage:
82
- - Uber: Real-time location API
83
- - Netflix: Recommendation system API
84
- - Microsoft: Azure services API
85
-
86
- Alfred: “Used in places where high speed and stability are required!”
87
- ```
88
-
89
- ### Step 3: How (How do I use it?)
90
-
91
- **Alfred**: "Let's start with the simplest example"
92
-
93
- **Learning order**:
94
- 1. Minimal example (Hello World)
95
- 2. Practical example (CRUD API)
96
- 3. Frequently Asked Questions
97
-
98
- **Example**: How to use FastAPI
99
- ```
100
- Alfred: “Let’s start with the simplest example”
101
-
102
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
103
- [Minimum example]
104
-
105
- from fastapi import FastAPI # ← Import FastAPI
106
-
107
- app = FastAPI() # ← Create app
108
-
109
- @app.get("/hello") # ← Create /hello address
110
- def hello():
111
- return {"message": "Hello!"} # ← Send response
112
-
113
- Alfred: “An API is complete in just 5 lines!”
114
-
115
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
116
- [Practical example: User inquiry API]
117
-
118
- from fastapi import FastAPI, HTTPException
119
- from pydantic import BaseModel
120
-
121
- app = FastAPI()
122
-
123
- class User(BaseModel):
124
- id: int
125
- name: str
126
- email: str
127
-
128
- @app.get("/users/{user_id}")
129
- async def get_user(user_id: int) -> User:
130
- user = await db.find_user(user_id)
131
- if not user:
132
- raise HTTPException(status_code=404, detail="User not found")
133
- return user
134
-
135
- Alfred: "Automatic verification with Pydantic, error handling with HTTPException!"
136
-
137
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
138
- [Frequently Asked Questions]
139
-
140
- Q: Compared to Flask?
141
- Alfred: “FastAPI is 3 times faster and has automatic verification.”
142
-
143
- Q: What is async/await?
144
- Alfred: "It's a way to handle multiple tasks simultaneously. While waiting for one request, you can process another request."
145
-
146
- Q: When is it best to use it?
147
- Alfred: “It’s best for fast API, real-time processing, and microservices.”
148
- ```
149
-
150
- ### Step 4: Practice
151
-
152
- **Alfred**: “Now shall we try using it with MoAI-ADK?”
153
-
154
- **Practice method**:
155
- - Practice with SPEC → TEST → CODE flow
156
- - Application of @TAG system
157
- - Compliance with TRUST 5 principles
158
-
159
- **Example**: Creating a user API with FastAPI
160
- ```
161
- Alfred: “Let’s create it together with the MoAI-ADK workflow!”
162
-
163
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
164
- [Step 1: Write SPEC]
165
-
166
- /alfred:1-plan "User Lookup API"
167
-
168
- SPEC created by Alfred:
169
- ---
170
- id: USER-001
171
- version: 0.0.1
172
- status: draft
173
- ---
174
-
175
- # @SPEC:USER-001: User Lookup API
176
-
177
- ## Ubiquitous Requirements
178
- - The system must provide an API to search user information by user ID.
179
-
180
- ## Event-driven Requirements
181
- - WHEN If a user ID that exists is requested, the system SHOULD return user information
182
- - WHEN If a user ID that does not exist is requested, the system SHOULD return a 404 error.
183
-
184
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
185
- [Step 2: TDD implementation]
186
-
187
- /alfred:2-run USER-001
188
-
189
- Alfred: “I’ll write a test first”
190
-
191
- # @TEST:USER-001 | SPEC: SPEC-USER-001.md
192
- def test_get_user_returns_user():
193
- response = client.get("/users/1")
194
- assert response.status_code == 200
195
- assert response.json()["id"] == 1
196
-
197
- def test_get_user_not_found():
198
- response = client.get("/users/999")
199
- assert response.status_code == 404
200
-
201
- Alfred: “Now let me write the code”
202
-
203
- # @CODE:USER-001 | SPEC: SPEC-USER-001.md | TEST: tests/test_user.py
204
- @app.get("/users/{user_id}")
205
- async def get_user(user_id: int) -> User:
206
- """@CODE:USER-001: User Lookup API"""
207
- user = await db.users.find_by_id(user_id)
208
- if not user:
209
- raise HTTPException(status_code=404, detail="User not found")
210
- return user
211
-
212
- Alfred: “SPEC → TEST → CODE are all connected!”
213
-
214
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
215
- [Step 3: Document Synchronization]
216
-
217
- /alfred:3-sync
218
-
219
- Alfred: “I will verify the TAG chain”
220
-
221
- ✓ @SPEC:USER-001 → .moai/specs/SPEC-USER-001.md
222
- ✓ @TEST:USER-001 → tests/test_user.py
223
- ✓ @CODE:USER-001 → src/api/user.py
224
- ✓ @DOC:USER-001 → docs/api/user.md (automatically generated)
225
-
226
- Alfred: "Complete! FastAPI + MoAI-ADK work together!"
227
- ```
228
-
229
- ---
230
-
231
- ## Framework-specific study guide
232
-
233
- ### TypeScript + Express
234
-
235
- **Alfred**: "It's the most popular web framework in Node.js"
236
-
237
- #### What (What is this?)
238
- ```
239
- Alfred: "Express is a tool to easily create a web server with Node.js."
240
-
241
- Real life analogy:
242
- The role is like a waiter in a restaurant, taking requests and delivering responses.
243
-
244
- One-line summary:
245
- Node.js + middleware + routing = Express
246
-
247
- Key concepts:
248
- 1. Middleware chain
249
- 2. Routing
250
- 3. Request-response processing
251
- ```
252
-
253
- #### Why (Why do you need it?)
254
- ```
255
- Alfred: “More than 95% of Node.js APIs use Express”
256
-
257
- Problem: Node.js default http module is too complicated
258
- Solution: Express can be easily created with a simple API
259
-
260
- Practical Use:
261
- - Uber, Netflix, PayPal, etc.
262
- ```
263
-
264
- #### How (How do you use it?)
265
- ```
266
- Alfred: “It’s the simplest example.”
267
-
268
- import express from 'express';
269
-
270
- const app = express();
271
-
272
- app.get('/users/:id', async (req, res) => {
273
- const user = await db.users.findById(req.params.id);
274
- res.json(user);
275
- });
276
-
277
- app.listen(3000);
278
-
279
- Alfred: “All you need is this to complete your API server!”
280
- ```
281
-
282
- #### Practice (with MoAI-ADK)
283
- ```
284
- Alfred: “Now let’s make it TDD”
285
-
286
- // @TEST:USER-001 | SPEC: SPEC-USER-001.md
287
- test('GET /users/:id returns user', async () => {
288
- const res = await request(app).get('/users/1');
289
- expect(res.status).toBe(200);
290
- expect(res.body.id).toBe('1');
291
- });
292
-
293
- // @CODE:USER-001 | SPEC: SPEC-USER-001.md | TEST: tests/user.test.ts
294
- app.get('/users/:id', async (req, res) => {
295
- const user = await db.users.findById(req.params.id);
296
- if (!user) {
297
- return res.status(404).json({ error: 'Not found' });
298
- }
299
- res.json(user);
300
- });
301
-
302
- Alfred: “SPEC → TEST → CODE completed!”
303
- ```
304
-
305
- #### Frequently Asked Questions
306
- ```
307
- Q: What is middleware?
308
- Alfred: "It is a step that goes through before processing a request. It is used for logging, authentication, etc."
309
-
310
- Q: How to handle async errors?
311
- Alfred: "If you use the express-async-errors package, it will be handled automatically."
312
-
313
- Q: FastAPI vs Express?
314
- Alfred: “Express is flexible and has a large ecosystem, and FastAPI is fast and has strong automatic verification.”
315
- ```
316
-
317
- ---
318
-
319
- ### Python + FastAPI
320
-
321
- **Alfred**: "It's the standard for modern Python web frameworks."
322
-
323
- #### What (What is this?)
324
- ```
325
- Alfred: "FastAPI is a tool to create fast APIs with Python."
326
-
327
- Real life analogy:
328
- Automatically verify and document like robots in a car factory
329
-
330
- One-line summary:
331
- Python + Pydantic + Async = FastAPI
332
-
333
- Key concepts:
334
- 1. Automatic Verification (Pydantic)
335
- 2. Automatic documentation (Swagger)
336
- 3. Asynchronous processing (async/await)
337
- ```
338
-
339
- #### Why (Why do you need it?)
340
- ```
341
- Alfred: “3x faster than Flask and more concise than Django”
342
-
343
- Problem: Flask is slow, Django is heavy
344
- Solution: FastAPI is fast, lightweight, yet powerful
345
-
346
- Actual use:
347
- - Uber, Microsoft, Netflix
348
- ```
349
-
350
- #### How (How do you use it?)
351
- ```
352
- Alfred: “It’s a basic example.”
353
-
354
- from fastapi import FastAPI
355
- from pydantic import BaseModel
356
-
357
- app = FastAPI()
358
-
359
- class User(BaseModel):
360
- id: int
361
- name: str
362
-
363
- @app.get("/users/{user_id}")
364
- async def get_user(user_id: int) -> User:
365
- return await db.find_user(user_id)
366
-
367
- Alfred: “Pydantic verifies it automatically!”
368
- ```
369
-
370
- #### Practice (with MoAI-ADK)
371
- ```
372
- Alfred: “Let’s build it together with TDD”
373
-
374
- # @TEST:USER-001 | SPEC: SPEC-USER-001.md
375
- def test_get_user():
376
- response = client.get("/users/1")
377
- assert response.status_code == 200
378
-
379
- # @CODE:USER-001 | SPEC: SPEC-USER-001.md | TEST: tests/test_user.py
380
- @app.get("/users/{user_id}")
381
- async def get_user(user_id: int) -> User:
382
- """@CODE:USER-001: User query"""
383
- user = await db.find_user(user_id)
384
- if not user:
385
- raise HTTPException(status_code=404)
386
- return user
387
-
388
- Alfred: “Complete!”
389
- ```
390
-
391
- #### Frequently Asked Questions
392
- ```
393
- Q: What is Pydantic?
394
- Alfred: “It is a library that automatically verifies data.”
395
-
396
- Q: Is async/await really necessary?
397
- Alfred: "If you need fast performance, it's essential, otherwise the sync function is fine."
398
-
399
- Q: Django vs FastAPI?
400
- Alfred: "Django is full-stack, FastAPI is API-only."
401
- ```
402
-
403
- ---
404
-
405
- ## Study Tips
406
-
407
- ### Alfred's Study Advice
408
-
409
- **1. Start small**
410
- ```
411
- Alfred: "Let's start with Hello World"
412
-
413
- Examples that are too complex can be confusing.
414
- Start with the simplest example and expand gradually.
415
- ```
416
-
417
- **2. Practice-oriented**
418
- ```
419
- Alfred: "Try the code yourself"
420
-
421
- Just read it and forget it right away.
422
- Try it yourself, run it, and correct the errors.
423
- ```
424
-
425
- **3. Integration with MoAI-ADK**
426
- ```
427
- Alfred: “I learn MoAI-ADK while learning new technologies.”
428
-
429
- If you practice with the SPEC → TEST → CODE flow,
430
- You can kill two birds with one stone!
431
- ```
432
-
433
- **4. Use frequently asked questions**
434
- ```
435
- Alfred: “If you have any questions, feel free to ask”
436
-
437
- “Why do I have to do this?”
438
- “Is there another way?”
439
- “How do I use it in practice?”
440
- ```
441
-
442
- ### Recommended learning sequence
443
-
444
- ```
445
- Step 1: Familiarize yourself with MoAI-ADK
446
- → /output-style moai-adk-learning
447
-
448
- Step 2: Learning a new framework (now)
449
- → /output-style study-with-alfred
450
-
451
- Step 3: Apply practical projects
452
- → /output-style agentic-coding
453
- ```
454
-
455
- ---
456
-
457
- ## Style conversion guide
458
-
459
- ### When this style suits you
460
- - ✅ When learning a new language/framework
461
- - ✅ When you want to easily understand complex concepts
462
- - ✅ When you want to learn practice-oriented
463
- - ✅ When you want to learn by talking with Alfred
464
-
465
- ### Switch to a different style
466
-
467
- | Situation | Recommended Style | Conversion command |
468
- | ----------------------------- | ----------------- | --------------------------------- |
469
- | First time using MoAI-ADK | moai-adk-learning | `/output-style moai-adk-learning` |
470
- | Practical project development | agentic-coding | `/output-style agentic-coding` |
471
-
472
- ---
473
-
474
- **Study with Alfred**: This is a learning mode that allows you to easily learn new skills as if talking with Alfred and apply them directly to practice by integrating with MoAI-ADK.
@@ -1,137 +0,0 @@
1
- # moai-spec-authoring Skill
2
-
3
- **Version**: 1.1.0
4
- **Created**: 2025-10-23
5
- **Updated**: 2025-10-27
6
- **Status**: Active
7
- **Tier**: Foundation
8
-
9
- ## Overview
10
-
11
- MoAI-ADK SPEC 문서 작성을 위한 종합 가이드입니다. YAML 메타데이터, EARS 문법, 검증 전략을 제공합니다.
12
-
13
- ## Key Features
14
-
15
- - **7 Required + 9 Optional Metadata Fields**: 완전한 레퍼런스와 예제
16
- - **5 EARS Patterns**: Ubiquitous, Event-driven, State-driven, Optional, Constraints
17
- - **Version Lifecycle**: draft에서 production까지 시맨틱 버전 관리
18
- - **TAG Integration**: @SPEC, @TEST, @CODE, @DOC 체인 관리
19
- - **Validation Tools**: 제출 전 체크리스트와 자동화 스크립트
20
- - **Common Pitfalls**: 7가지 주요 이슈에 대한 예방 전략
21
-
22
- ## File Structure (Progressive Disclosure)
23
-
24
- ```
25
- .claude/skills/moai-spec-authoring/
26
- ├── SKILL.md # 핵심 개요 + Quick Start (~500 words)
27
- ├── reference.md # 메타데이터 레퍼런스 + EARS 문법 상세
28
- ├── examples.md # 실전 예제 + 패턴 + 트러블슈팅
29
- ├── examples/
30
- │ └── validate-spec.sh # SPEC 검증 스크립트
31
- └── README.md # 이 파일
32
- ```
33
-
34
- ## Quick Links
35
-
36
- - **Quick Start**: [SKILL.md](./SKILL.md#quick-start-5-step-spec-creation)
37
- - **Metadata Reference**: [reference.md](./reference.md#메타데이터-완전-레퍼런스)
38
- - **EARS Syntax**: [reference.md](./reference.md#ears-요구사항-문법)
39
- - **Examples**: [examples.md](./examples.md#실전-ears-예제)
40
- - **Troubleshooting**: [examples.md](./examples.md#트러블슈팅)
41
-
42
- ## Usage
43
-
44
- ### Automatic Activation
45
-
46
- 이 Skill은 다음 경우 자동으로 로드됩니다:
47
- - `/alfred:1-plan` 명령어 실행
48
- - SPEC 문서 생성 요청
49
- - 요구사항 명확화 논의
50
-
51
- ### Manual Reference
52
-
53
- 다음 경우 상세 섹션 참조:
54
- - SPEC 작성 모범 사례 학습
55
- - 기존 SPEC 문서 검증
56
- - 메타데이터 이슈 트러블슈팅
57
- - EARS 문법 패턴 이해
58
-
59
- ## Validation Command
60
-
61
- ```bash
62
- # SPEC 메타데이터 검증
63
- rg "^(id|version|status|created|updated|author|priority):" .moai/specs/SPEC-AUTH-001/spec.md
64
-
65
- # 중복 ID 확인
66
- rg "@SPEC:AUTH-001" -n .moai/specs/
67
-
68
- # 전체 TAG 체인 스캔
69
- rg '@(SPEC|TEST|CODE|DOC):AUTH-001' -n
70
-
71
- # 자동화 스크립트 사용
72
- ./examples/validate-spec.sh .moai/specs/SPEC-AUTH-001
73
- ```
74
-
75
- ## Example SPEC Structure
76
-
77
- ```markdown
78
- ---
79
- id: AUTH-001
80
- version: 0.0.1
81
- status: draft
82
- created: 2025-10-23
83
- updated: 2025-10-23
84
- author: @YourHandle
85
- priority: high
86
- ---
87
-
88
- # @SPEC:AUTH-001: JWT Authentication System
89
-
90
- ## HISTORY
91
- ### v0.0.1 (2025-10-23)
92
- - **INITIAL**: JWT 인증 SPEC 초안
93
-
94
- ## Environment
95
- **Runtime**: Node.js 20.x
96
-
97
- ## Assumptions
98
- 1. 사용자 저장소: PostgreSQL
99
- 2. 시크릿 관리: 환경변수
100
-
101
- ## Requirements
102
-
103
- ### Ubiquitous Requirements
104
- **UR-001**: 시스템은 JWT 기반 인증을 제공해야 한다.
105
-
106
- ### Event-driven Requirements
107
- **ER-001**: WHEN 사용자가 유효한 인증 정보를 제출하면, 시스템은 JWT 토큰을 발급해야 한다.
108
-
109
- ### State-driven Requirements
110
- **SR-001**: WHILE 사용자가 인증된 상태이면, 시스템은 보호된 리소스에 대한 접근을 허용해야 한다.
111
-
112
- ### Optional Features
113
- **OF-001**: WHERE 다중 인증이 활성화된 경우, 시스템은 OTP 검증을 요구할 수 있다.
114
-
115
- ### Constraints
116
- **C-001**: IF 토큰이 만료되었다면, 시스템은 접근을 거부해야 한다.
117
- ```
118
-
119
- ## Integration
120
-
121
- 다음과 원활하게 작동:
122
- - `spec-builder` agent - SPEC 생성
123
- - `moai-foundation-ears` - EARS 문법 패턴
124
- - `moai-foundation-specs` - 메타데이터 검증
125
- - `moai-foundation-tags` - TAG 시스템 통합
126
-
127
- ## Support
128
-
129
- 질문이나 이슈가 있을 경우:
130
- 1. 포괄적인 문서는 `SKILL.md`, `reference.md`, `examples.md` 참조
131
- 2. 가이드된 SPEC 생성을 위해 `/alfred:1-plan` 호출
132
- 3. 예제는 `.moai/specs/`의 기존 SPEC 참조
133
-
134
- ---
135
-
136
- **Maintained By**: MoAI-ADK Team
137
- **Last Updated**: 2025-10-27