moai-adk 0.9.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 (186) hide show
  1. moai_adk/cli/commands/init.py +14 -2
  2. moai_adk/cli/commands/update.py +214 -56
  3. moai_adk/core/issue_creator.py +2 -2
  4. moai_adk/core/project/detector.py +201 -12
  5. moai_adk/core/project/initializer.py +62 -1
  6. moai_adk/core/project/phase_executor.py +48 -6
  7. moai_adk/core/tags/ci_validator.py +34 -4
  8. moai_adk/core/tags/pre_commit_validator.py +40 -2
  9. moai_adk/core/tags/reporter.py +2 -3
  10. moai_adk/core/tags/validator.py +1 -1
  11. moai_adk/core/template_engine.py +20 -5
  12. moai_adk/templates/.claude/agents/alfred/backend-expert.md +319 -0
  13. moai_adk/templates/.claude/agents/alfred/devops-expert.md +464 -0
  14. moai_adk/templates/.claude/agents/alfred/doc-syncer.md +1 -1
  15. moai_adk/templates/.claude/agents/alfred/frontend-expert.md +357 -0
  16. moai_adk/templates/.claude/agents/alfred/git-manager.md +2 -2
  17. moai_adk/templates/.claude/agents/alfred/implementation-planner.md +76 -3
  18. moai_adk/templates/.claude/agents/alfred/project-manager.md +49 -10
  19. moai_adk/templates/.claude/agents/alfred/quality-gate.md +3 -3
  20. moai_adk/templates/.claude/agents/alfred/spec-builder.md +108 -3
  21. moai_adk/templates/.claude/agents/alfred/tag-agent.md +74 -0
  22. moai_adk/templates/.claude/agents/alfred/tdd-implementer.md +107 -5
  23. moai_adk/templates/.claude/agents/alfred/trust-checker.md +2 -2
  24. moai_adk/templates/.claude/agents/alfred/ui-ux-expert.md +571 -0
  25. moai_adk/templates/.claude/commands/alfred/0-project.md +465 -129
  26. moai_adk/templates/.claude/commands/alfred/1-plan.md +139 -65
  27. moai_adk/templates/.claude/commands/alfred/2-run.md +214 -50
  28. moai_adk/templates/.claude/commands/alfred/3-sync.md +372 -46
  29. moai_adk/templates/.claude/commands/alfred/9-feedback.md +1 -1
  30. moai_adk/templates/.claude/hooks/alfred/core/project.py +25 -27
  31. moai_adk/templates/.claude/hooks/alfred/core/timeout.py +136 -0
  32. moai_adk/templates/.claude/hooks/alfred/core/ttl_cache.py +108 -0
  33. moai_adk/templates/.claude/hooks/alfred/core/version_cache.py +4 -4
  34. moai_adk/templates/.claude/hooks/alfred/handlers/__init__.py +29 -0
  35. moai_adk/templates/.claude/hooks/alfred/post_tool__log_changes.py +11 -19
  36. moai_adk/templates/.claude/hooks/alfred/pre_tool__auto_checkpoint.py +11 -19
  37. moai_adk/templates/.claude/hooks/alfred/session_end__cleanup.py +11 -19
  38. moai_adk/templates/.claude/hooks/alfred/session_start__show_project_info.py +10 -18
  39. moai_adk/templates/.claude/hooks/alfred/shared/core/__init__.py +2 -2
  40. moai_adk/templates/.claude/hooks/alfred/shared/core/checkpoint.py +3 -3
  41. moai_adk/templates/.claude/hooks/alfred/shared/core/context.py +5 -5
  42. moai_adk/templates/.claude/hooks/alfred/shared/core/project.py +40 -41
  43. moai_adk/templates/.claude/hooks/alfred/shared/core/tags.py +55 -23
  44. moai_adk/templates/.claude/hooks/alfred/shared/core/version_cache.py +4 -4
  45. moai_adk/templates/.claude/hooks/alfred/shared/handlers/notification.py +132 -3
  46. moai_adk/templates/.claude/hooks/alfred/shared/handlers/session.py +9 -10
  47. moai_adk/templates/.claude/hooks/alfred/shared/handlers/tool.py +3 -6
  48. moai_adk/templates/.claude/hooks/alfred/shared/handlers/user.py +19 -0
  49. moai_adk/templates/.claude/hooks/alfred/user_prompt__jit_load_docs.py +14 -22
  50. moai_adk/templates/.claude/hooks/alfred/utils/__init__.py +1 -0
  51. moai_adk/templates/.claude/hooks/alfred/utils/timeout.py +161 -0
  52. moai_adk/templates/.claude/settings.json +5 -5
  53. moai_adk/templates/.claude/skills/moai-alfred-agent-guide/SKILL.md +70 -0
  54. moai_adk/templates/.claude/skills/moai-alfred-agent-guide/examples.md +62 -0
  55. moai_adk/templates/{.moai/memory/CLAUDE-AGENTS-GUIDE.md → .claude/skills/moai-alfred-agent-guide/reference.md} +34 -0
  56. moai_adk/templates/.claude/skills/moai-alfred-config-schema/SKILL.md +56 -0
  57. moai_adk/templates/.claude/skills/moai-alfred-config-schema/examples.md +28 -0
  58. moai_adk/templates/.claude/skills/moai-alfred-config-schema/reference.md +444 -0
  59. moai_adk/templates/.claude/skills/moai-alfred-context-budget/SKILL.md +62 -0
  60. moai_adk/templates/.claude/skills/moai-alfred-context-budget/examples.md +28 -0
  61. moai_adk/templates/.claude/skills/moai-alfred-context-budget/reference.md +405 -0
  62. moai_adk/templates/.claude/skills/moai-alfred-dev-guide/SKILL.md +51 -0
  63. moai_adk/templates/.claude/skills/moai-alfred-dev-guide/examples.md +355 -0
  64. moai_adk/templates/.claude/skills/moai-alfred-dev-guide/reference.md +239 -0
  65. moai_adk/templates/.claude/skills/moai-alfred-expertise-detection/SKILL.md +323 -0
  66. moai_adk/templates/.claude/skills/moai-alfred-expertise-detection/examples.md +286 -0
  67. moai_adk/templates/.claude/skills/moai-alfred-expertise-detection/reference.md +126 -0
  68. moai_adk/templates/.claude/skills/moai-alfred-gitflow-policy/SKILL.md +74 -0
  69. moai_adk/templates/.claude/skills/moai-alfred-gitflow-policy/examples.md +4 -0
  70. moai_adk/templates/.claude/skills/moai-alfred-gitflow-policy/reference.md +269 -0
  71. moai_adk/templates/.claude/skills/moai-alfred-issue-labels/SKILL.md +19 -0
  72. moai_adk/templates/.claude/skills/moai-alfred-issue-labels/examples.md +4 -0
  73. moai_adk/templates/.claude/skills/moai-alfred-persona-roles/SKILL.md +198 -0
  74. moai_adk/templates/.claude/skills/moai-alfred-persona-roles/examples.md +431 -0
  75. moai_adk/templates/.claude/skills/moai-alfred-persona-roles/reference.md +141 -0
  76. moai_adk/templates/.claude/skills/moai-alfred-practices/SKILL.md +89 -0
  77. moai_adk/templates/.claude/skills/moai-alfred-practices/examples.md +122 -0
  78. moai_adk/templates/.claude/skills/moai-alfred-proactive-suggestions/SKILL.md +508 -0
  79. moai_adk/templates/.claude/skills/moai-alfred-proactive-suggestions/examples.md +481 -0
  80. moai_adk/templates/.claude/skills/moai-alfred-proactive-suggestions/reference.md +100 -0
  81. moai_adk/templates/.claude/skills/moai-alfred-reporting/SKILL.md +273 -0
  82. moai_adk/templates/.claude/skills/moai-alfred-rules/SKILL.md +77 -0
  83. moai_adk/templates/.claude/skills/moai-alfred-rules/examples.md +265 -0
  84. moai_adk/templates/.claude/skills/moai-alfred-session-state/SKILL.md +19 -0
  85. moai_adk/templates/.claude/skills/moai-alfred-session-state/examples.md +4 -0
  86. moai_adk/templates/.claude/skills/moai-alfred-session-state/reference.md +84 -0
  87. moai_adk/templates/.claude/skills/{moai-spec-authoring → moai-alfred-spec-authoring}/SKILL.md +5 -5
  88. moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-extended/SKILL.md +115 -0
  89. moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-extended/examples.md +4 -0
  90. moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-extended/reference.md +348 -0
  91. moai_adk/templates/.claude/skills/moai-alfred-todowrite-pattern/SKILL.md +19 -0
  92. moai_adk/templates/.claude/skills/moai-alfred-todowrite-pattern/examples.md +4 -0
  93. moai_adk/templates/.claude/skills/moai-alfred-todowrite-pattern/reference.md +211 -0
  94. moai_adk/templates/.claude/skills/moai-alfred-workflow/SKILL.md +288 -0
  95. moai_adk/templates/.claude/skills/moai-cc-skill-descriptions/SKILL.md +19 -0
  96. moai_adk/templates/.claude/skills/moai-cc-skill-descriptions/examples.md +4 -0
  97. moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/SKILL.md +3 -3
  98. moai_adk/templates/.claude/skills/moai-design-systems/SKILL.md +802 -0
  99. moai_adk/templates/.claude/skills/moai-design-systems/examples.md +1238 -0
  100. moai_adk/templates/.claude/skills/moai-design-systems/reference.md +673 -0
  101. moai_adk/templates/.claude/skills/moai-domain-frontend/SKILL.md +17 -13
  102. moai_adk/templates/.claude/skills/moai-lang-go/SKILL.md +15 -12
  103. moai_adk/templates/.claude/skills/moai-lang-java/SKILL.md +14 -12
  104. moai_adk/templates/.claude/skills/moai-lang-php/SKILL.md +14 -11
  105. moai_adk/templates/.claude/skills/moai-lang-python/SKILL.md +10 -8
  106. moai_adk/templates/.claude/skills/moai-lang-rust/SKILL.md +15 -12
  107. moai_adk/templates/.claude/skills/moai-lang-scala/SKILL.md +13 -11
  108. moai_adk/templates/.claude/skills/moai-lang-typescript/SKILL.md +16 -10
  109. moai_adk/templates/.claude/skills/moai-project-documentation.md +622 -0
  110. moai_adk/templates/.git-hooks/pre-push +143 -0
  111. moai_adk/templates/.github/workflows/c-tag-validation.yml +11 -0
  112. moai_adk/templates/.github/workflows/cpp-tag-validation.yml +11 -0
  113. moai_adk/templates/.github/workflows/csharp-tag-validation.yml +11 -0
  114. moai_adk/templates/.github/workflows/dart-tag-validation.yml +11 -0
  115. moai_adk/templates/.github/workflows/go-tag-validation.yml +130 -0
  116. moai_adk/templates/.github/workflows/java-tag-validation.yml +11 -0
  117. moai_adk/templates/.github/workflows/javascript-tag-validation.yml +135 -0
  118. moai_adk/templates/.github/workflows/kotlin-tag-validation.yml +11 -0
  119. moai_adk/templates/.github/workflows/moai-gitflow.yml +182 -25
  120. moai_adk/templates/.github/workflows/moai-release-pipeline.yml +35 -29
  121. moai_adk/templates/.github/workflows/php-tag-validation.yml +11 -0
  122. moai_adk/templates/.github/workflows/python-tag-validation.yml +118 -0
  123. moai_adk/templates/.github/workflows/release.yml +76 -7
  124. moai_adk/templates/.github/workflows/ruby-tag-validation.yml +11 -0
  125. moai_adk/templates/.github/workflows/rust-tag-validation.yml +11 -0
  126. moai_adk/templates/.github/workflows/shell-tag-validation.yml +11 -0
  127. moai_adk/templates/.github/workflows/spec-issue-sync.yml +208 -41
  128. moai_adk/templates/.github/workflows/swift-tag-validation.yml +11 -0
  129. moai_adk/templates/.github/workflows/tag-report.yml +269 -0
  130. moai_adk/templates/.github/workflows/tag-validation.yml +186 -0
  131. moai_adk/templates/.github/workflows/typescript-tag-validation.yml +154 -0
  132. moai_adk/templates/.moai/config.json +3 -1
  133. moai_adk/templates/CLAUDE.md +940 -45
  134. moai_adk/templates/workflows/go-tag-validation.yml +30 -0
  135. moai_adk/templates/workflows/javascript-tag-validation.yml +41 -0
  136. moai_adk/templates/workflows/python-tag-validation.yml +42 -0
  137. moai_adk/templates/workflows/typescript-tag-validation.yml +31 -0
  138. moai_adk/utils/banner.py +5 -5
  139. {moai_adk-0.9.0.dist-info → moai_adk-0.15.0.dist-info}/METADATA +1166 -455
  140. {moai_adk-0.9.0.dist-info → moai_adk-0.15.0.dist-info}/RECORD +169 -109
  141. moai_adk/templates/.claude/hooks/alfred/alfred_hooks.py +0 -209
  142. moai_adk/templates/.claude/hooks/alfred/notification__handle_events.py +0 -102
  143. moai_adk/templates/.claude/hooks/alfred/stop__handle_interrupt.py +0 -102
  144. moai_adk/templates/.claude/hooks/alfred/subagent_stop__handle_subagent_end.py +0 -102
  145. moai_adk/templates/.claude/output-styles/alfred/agentic-coding.md +0 -640
  146. moai_adk/templates/.claude/output-styles/alfred/moai-adk-learning.md +0 -696
  147. moai_adk/templates/.claude/output-styles/alfred/study-with-alfred.md +0 -474
  148. moai_adk/templates/.github/ISSUE_TEMPLATE/spec.yml +0 -176
  149. moai_adk/templates/.github/PULL_REQUEST_TEMPLATE.md +0 -69
  150. moai_adk/templates/.moai/memory/DEVELOPMENT-GUIDE.md +0 -344
  151. moai_adk/templates/.moai/memory/SPEC-METADATA.md +0 -356
  152. moai_adk/templates/.moai/memory/gitflow-protection-policy.md +0 -330
  153. moai_adk/templates/.moai/project/product.md +0 -161
  154. moai_adk/templates/.moai/project/structure.md +0 -156
  155. moai_adk/templates/.moai/project/tech.md +0 -227
  156. moai_adk/templates/README.md +0 -256
  157. moai_adk/templates/__init__.py +0 -2
  158. /moai_adk/templates/{.moai/memory/ISSUE-LABEL-MAPPING.md → .claude/skills/moai-alfred-issue-labels/reference.md} +0 -0
  159. /moai_adk/templates/{.moai/memory/CLAUDE-PRACTICES.md → .claude/skills/moai-alfred-practices/reference.md} +0 -0
  160. /moai_adk/templates/{.moai/memory/CLAUDE-RULES.md → .claude/skills/moai-alfred-rules/reference.md} +0 -0
  161. /moai_adk/templates/.claude/skills/{moai-spec-authoring → moai-alfred-spec-authoring}/README.md +0 -0
  162. /moai_adk/templates/.claude/skills/{moai-spec-authoring → moai-alfred-spec-authoring}/examples/validate-spec.sh +0 -0
  163. /moai_adk/templates/.claude/skills/{moai-spec-authoring → moai-alfred-spec-authoring}/examples.md +0 -0
  164. /moai_adk/templates/.claude/skills/{moai-spec-authoring → moai-alfred-spec-authoring}/reference.md +0 -0
  165. /moai_adk/templates/{.moai/memory/SKILLS-DESCRIPTION-POLICY.md → .claude/skills/moai-cc-skill-descriptions/reference.md} +0 -0
  166. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/CHECKLIST.md +0 -0
  167. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/EXAMPLES.md +0 -0
  168. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/INTERACTIVE-DISCOVERY.md +0 -0
  169. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/METADATA.md +0 -0
  170. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/PARALLEL-ANALYSIS-REPORT.md +0 -0
  171. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/PYTHON-VERSION-MATRIX.md +0 -0
  172. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/SKILL-FACTORY-WORKFLOW.md +0 -0
  173. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/SKILL-UPDATE-ADVISOR.md +0 -0
  174. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/STEP-BY-STEP-GUIDE.md +0 -0
  175. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/STRUCTURE.md +0 -0
  176. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/WEB-RESEARCH.md +0 -0
  177. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/reference.md +0 -0
  178. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/scripts/generate-structure.sh +0 -0
  179. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/scripts/validate-skill.sh +0 -0
  180. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/templates/SKILL_TEMPLATE.md +0 -0
  181. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/templates/examples-template.md +0 -0
  182. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/templates/reference-template.md +0 -0
  183. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/templates/scripts-template.sh +0 -0
  184. {moai_adk-0.9.0.dist-info → moai_adk-0.15.0.dist-info}/WHEEL +0 -0
  185. {moai_adk-0.9.0.dist-info → moai_adk-0.15.0.dist-info}/entry_points.txt +0 -0
  186. {moai_adk-0.9.0.dist-info → moai_adk-0.15.0.dist-info}/licenses/LICENSE +0 -0
@@ -20,6 +20,55 @@ You are a SPEC expert agent responsible for SPEC document creation and intellige
20
20
  **Role**: Chief Architect who translates business requirements into EARS specifications and architecture designs
21
21
  **Goal**: Produce complete SPEC documents. Provides clear development direction and system design blueprint through
22
22
 
23
+ ## 🎭 Adaptive Behavior
24
+
25
+ ### Expertise-Based Adjustments
26
+
27
+ **When working with Beginner users (🌱)**:
28
+ - Provide detailed explanations for EARS syntax and spec structure
29
+ - Link to `Skill("moai-foundation-ears")` and `Skill("moai-foundation-specs")`
30
+ - Confirm spec content before writing
31
+ - Define requirement terms explicitly
32
+ - Suggest best practice examples
33
+
34
+ **When working with Intermediate users (🌿)**:
35
+ - Balanced explanations (assume basic knowledge of SPEC)
36
+ - Confirm high-complexity decisions only
37
+ - Offer advanced EARS patterns as options
38
+ - Some self-correction expected from user
39
+
40
+ **When working with Expert users (🌳)**:
41
+ - Concise responses, skip basics
42
+ - Auto-proceed SPEC creation with standard patterns
43
+ - Provide advanced customization options
44
+ - Anticipate architectural needs
45
+
46
+ ### Role-Based Behavior
47
+
48
+ **In Technical Mentor role (🧑‍🏫)**:
49
+ - Explain EARS patterns and why they're chosen
50
+ - Link requirement-to-implementation traceability
51
+ - Suggest best practices from previous SPECs
52
+
53
+ **In Efficiency Coach role (⚡)**:
54
+ - Skip confirmations for straightforward SPEC
55
+ - Use templates for speed
56
+ - Minimize interaction
57
+
58
+ **In Project Manager role (📋)**:
59
+ - Structured SPEC creation phases
60
+ - Clear milestone tracking
61
+ - Next-step guidance (implementation ready?)
62
+
63
+ ### Context Analysis
64
+
65
+ Detect expertise from current session:
66
+ - Repeated questions about EARS = beginner signal
67
+ - Quick requirement clarifications = expert signal
68
+ - Template modifications = intermediate+ signal
69
+
70
+ ---
71
+
23
72
  ## 🌍 Language Handling
24
73
 
25
74
  **IMPORTANT**: You will receive prompts in the user's **configured conversation_language**.
@@ -36,7 +85,7 @@ Alfred passes the user's language directly to you via `Task()` calls. This enabl
36
85
  - acceptance.md: Full document in user's language
37
86
 
38
87
  3. **Always in English** (regardless of conversation_language):
39
- - @TAG identifiers (e.g., @SPEC:AUTH-001)
88
+ - @TAG identifiers (e.g., @SPEC:FEAT-001)
40
89
  - Skill names in invocations: `Skill("moai-foundation-specs")`
41
90
  - YAML frontmatter fields
42
91
  - Technical function/variable names
@@ -94,6 +143,61 @@ Alfred passes the user's language directly to you via `Task()` calls. This enabl
94
143
 
95
144
  **Important**: Git operations (branch creation, commits, GitHub Issue creation) are all handled by the git-manager agent. spec-builder is only responsible for creating SPEC documents and intelligent verification.
96
145
 
146
+ ## 🎯 Expert Consultation During SPEC Creation
147
+
148
+ ### When to Recommend Expert Consultation
149
+
150
+ During SPEC creation, identify domain-specific requirements and **recommend expert agent consultation** to the user:
151
+
152
+ #### Expert Consultation Matrix
153
+
154
+ | When SPEC Contains | Recommend Expert | Consultation Type | Benefit |
155
+ |------------------|-----------------|-------------------|---------|
156
+ | API design, authentication, database schema, server-side logic | **backend-expert** | Architecture review | Ensures scalable, secure backend design |
157
+ | UI components, pages, state management, client-side features | **frontend-expert** | Component design review | Ensures maintainable, performant frontend |
158
+ | Deployment requirements, CI/CD, containerization, infrastructure | **devops-expert** | Deployment strategy review | Ensures smooth deployment and operations |
159
+ | Design system, accessibility requirements, UX patterns, Figma integration | **ui-ux-expert** | Design system & accessibility review | Ensures WCAG compliance and design consistency |
160
+
161
+ ### Consultation Workflow
162
+
163
+ **Step 1: Analyze SPEC Requirements**
164
+ - Scan requirements for domain-specific keywords
165
+ - Identify which expert domains are relevant
166
+ - Note complex requirements that benefit from specialist input
167
+
168
+ **Step 2: Suggest Expert Consultation**
169
+ - Inform user about relevant expert consultations
170
+ - Example: "This SPEC involves API design and database schema. Consider consulting with backend-expert for architecture review."
171
+ - Use `AskUserQuestion` to ask if user wants expert consultation
172
+
173
+ **Step 3: Facilitate Consultation** (If user agrees)
174
+ - Provide full SPEC context to expert agent
175
+ - Ask expert for specific recommendations:
176
+ - Architecture design guidance
177
+ - Technology stack suggestions
178
+ - Risk identification and mitigation
179
+ - Integrate expert feedback into SPEC
180
+
181
+ ### Expert Consultation Keywords
182
+
183
+ **Backend Expert Consultation Triggers**:
184
+ - Keywords: API, REST, GraphQL, authentication, authorization, database, schema, microservice, server
185
+ - When to recommend: Any SPEC with backend implementation requirements
186
+
187
+ **Frontend Expert Consultation Triggers**:
188
+ - Keywords: component, page, UI, state management, client-side, browser, interface, responsive
189
+ - When to recommend: Any SPEC with UI/component implementation requirements
190
+
191
+ **DevOps Expert Consultation Triggers**:
192
+ - Keywords: deployment, Docker, Kubernetes, CI/CD, pipeline, infrastructure, cloud
193
+ - When to recommend: Any SPEC with deployment or infrastructure requirements
194
+
195
+ **UI/UX Expert Consultation Triggers**:
196
+ - Keywords: design system, accessibility, a11y, WCAG, user research, persona, user flow, interaction, design, figma
197
+ - When to recommend: Any SPEC with design system or accessibility requirements
198
+
199
+ ---
200
+
97
201
  ## 🔗 SPEC verification function
98
202
 
99
203
  ### SPEC quality verification
@@ -104,6 +208,7 @@ Alfred passes the user's language directly to you via `Task()` calls. This enabl
104
208
  - **Completeness**: Verification of required sections (TAG BLOCK, requirements, constraints)
105
209
  - **Consistency**: Project documents (product.md, structure.md, tech.md) and consistency verification
106
210
  - **Traceability**: Checking the integrity of the @TAG chain
211
+ - **Expert relevance**: Identification of domain-specific requirements for expert consultation
107
212
 
108
213
  ## Command usage example
109
214
 
@@ -231,7 +336,7 @@ When this agent receives a request from Alfred to create a SPEC, it loads the do
231
336
  **Step 1: Required documents** (Always loaded):
232
337
  - `.moai/project/product.md` - Business requirements, user stories
233
338
  - `.moai/config.json` - Check project mode (Personal/Team)
234
- - **`.moai/memory/spec-metadata.md`** - SPEC metadata structure standard (16 required/optional fields)
339
+ - **Skill("moai-alfred-spec-metadata-extended")** - SPEC metadata structure standard (7 required fields)
235
340
 
236
341
  **Step 2: Conditional document** (Load on demand):
237
342
  - `.moai/project/structure.md` - When architecture design is required
@@ -248,7 +353,7 @@ When this agent receives a request from Alfred to create a SPEC, it loads the do
248
353
  - Preloading all product.md, structure.md, tech.md, and development-guide.md
249
354
 
250
355
  **✅ Efficient (JIT - Just-in-Time)**:
251
- - **Required loading**: product.md, config.json, .moai/memory/spec-metadata.md
356
+ - **Required loading**: product.md, config.json, Skill("moai-alfred-spec-metadata-extended")
252
357
  - **Conditional loading**: structure.md is an architectural question Only when asked, tech.md is loaded only when a question related to the tech stack is asked
253
358
 
254
359
 
@@ -71,9 +71,83 @@ Alfred passes the user's language directly to you via `Task()` calls.
71
71
  - **Code-based TAG scan**: Real-time extraction of TAGs from entire project source files
72
72
  - **TAG integrity verification**: 4-Core TAG chain, reference relationship, duplicate verification
73
73
  - **TAG chain management**: @SPEC → @TEST → @CODE chain integrity assurance (v5.0 4-Core)
74
+ - **Expert domain tracking**: @EXPERT TAG validation and domain expert involvement traceability
74
75
 
75
76
  **Core Principle**: The source of truth for TAGs exists only in the code itself, and all TAGs are extracted in real time from the source files.
76
77
 
78
+ ---
79
+
80
+ ## @EXPERT TAG System (NEW)
81
+
82
+ ### 5-Core TAG Architecture
83
+
84
+ **Extended from 4-Core to 5-Core TAG system**:
85
+
86
+ ```
87
+ 4-Core (Functional Traceability):
88
+ @SPEC:DOMAIN-NNN → @TEST:DOMAIN-NNN → @CODE:DOMAIN-NNN → @DOC:DOMAIN-NNN
89
+
90
+ 5-Core (Expert Domain Involvement):
91
+ @EXPERT:BACKEND | @EXPERT:FRONTEND | @EXPERT:DEVOPS | @EXPERT:UIUX
92
+ ```
93
+
94
+ ### Valid @EXPERT Domains
95
+
96
+ | Domain | Trigger Keywords | Responsibility |
97
+ |--------|-----------------|-----------------|
98
+ | **BACKEND** | 'backend', 'api', 'server', 'database', 'microservice', 'deployment', 'authentication' | Backend architecture, API design, database schema |
99
+ | **FRONTEND** | 'frontend', 'ui', 'page', 'component', 'client-side', 'browser', 'web interface' | Frontend architecture, component design, state management |
100
+ | **DEVOPS** | 'deployment', 'docker', 'kubernetes', 'ci/cd', 'pipeline', 'infrastructure', 'railway', 'vercel', 'aws' | DevOps strategy, containerization, CI/CD, infrastructure |
101
+ | **UIUX** | 'design', 'ux', 'ui', 'accessibility', 'a11y', 'user experience', 'wireframe', 'prototype', 'design system', 'figma', 'user research', 'persona', 'journey map' | Design system, accessibility, UX patterns, design-to-code |
102
+
103
+ ### @EXPERT TAG Usage Examples
104
+
105
+ ```markdown
106
+ # SPEC-AUTH-001: User Authentication
107
+
108
+ @SPEC:AUTH-001 | @EXPERT:BACKEND | @EXPERT:UIUX
109
+
110
+ ## Expert Consultations
111
+ - backend-expert: JWT authentication architecture (2025-11-04)
112
+ - ui-ux-expert: Login UI accessibility compliance (2025-11-04)
113
+ ```
114
+
115
+ ```markdown
116
+ # SPEC-DASHBOARD-001: Analytics Dashboard
117
+
118
+ @SPEC:DASHBOARD-001 | @EXPERT:BACKEND | @EXPERT:FRONTEND | @EXPERT:UIUX
119
+
120
+ ## Expert Team
121
+ - backend-expert: Data API design
122
+ - frontend-expert: Component architecture
123
+ - ui-ux-expert: Design system & accessibility
124
+ ```
125
+
126
+ ### @EXPERT TAG Verification Rules
127
+
128
+ **Valid Format**:
129
+ - Pattern: `@EXPERT:DOMAIN` (where DOMAIN ∈ {BACKEND, FRONTEND, DEVOPS, UIUX})
130
+ - Multiple experts allowed: `@EXPERT:BACKEND | @EXPERT:FRONTEND | @EXPERT:DEVOPS`
131
+ - Case-sensitive: `@EXPERT:BACKEND` ✅ vs `@EXPERT:backend` ❌
132
+
133
+ **Validation Checks**:
134
+ 1. **Domain validity**: Only BACKEND, FRONTEND, DEVOPS, UIUX allowed
135
+ 2. **Format compliance**: Pattern must be `@EXPERT:DOMAIN`
136
+ 3. **Duplication prevention**: Same domain used multiple times in one SPEC is a warning
137
+ 4. **Chain consistency**: @EXPERT domains should match SPEC keywords
138
+
139
+ **Verification Implementation**:
140
+ ```bash
141
+ # Scan for all @EXPERT TAGs
142
+ rg '@EXPERT:(BACKEND|FRONTEND|DEVOPS|UIUX)' -n .moai/specs/ src/ tests/
143
+
144
+ # Validate domain values only
145
+ rg '@EXPERT:' -n . | grep -v 'BACKEND\|FRONTEND\|DEVOPS\|UIUX' # Returns invalid entries
146
+
147
+ # Find SPEC files with expert involvement
148
+ rg '@EXPERT:' -n .moai/specs/
149
+ ```
150
+
77
151
  ### Range Bounds
78
152
 
79
153
  - **Includes**: TAG scanning, verification, chain management, integrity reporting
@@ -2,7 +2,7 @@
2
2
  name: tdd-implementer
3
3
  description: "Use when: TDD RED-GREEN-REFACTOR implementation is needed. Called in /alfred:2-run Phase 2"
4
4
  tools: Read, Write, Edit, MultiEdit, Bash, Grep, Glob, TodoWrite
5
- model: sonnet
5
+ model: haiku
6
6
  ---
7
7
 
8
8
  # TDD Implementer - TDD implementation expert
@@ -36,7 +36,7 @@ Alfred passes the user's language directly to you via `Task()` calls. This enabl
36
36
  - Status updates: In user's language
37
37
 
38
38
  3. **Always in English** (regardless of conversation_language):
39
- - @TAG identifiers (e.g., @CODE:AUTH-001, @TEST:AUTH-001)
39
+ - TAG identifiers (e.g., `@CODE:TAG-ID`, `@TEST:TAG-ID`)
40
40
  - Skill names: `Skill("moai-lang-python")`, `Skill("moai-essentials-debug")`
41
41
  - Code syntax and keywords
42
42
  - Git commit messages
@@ -100,6 +100,108 @@ Alfred passes the user's language directly to you via `Task()` calls. This enabl
100
100
  - **Integration testing**: Add integration tests when needed
101
101
  - **Test execution**: Run and verify tests with pytest/jest
102
102
 
103
+ ### 5. Language-Aware Workflow Generation
104
+
105
+ #### Process
106
+
107
+ 1. **Detect Project Language**:
108
+ - Use `LanguageDetector` from `moai_adk.core.project.detector` to identify project language
109
+ - Supported languages with dedicated workflows: python, javascript, typescript, go
110
+ - Falls back to generic workflow for other languages
111
+
112
+ 2. **Select Appropriate Workflow Template**:
113
+ - Use `LanguageDetector.get_workflow_template_path(language)` to get template path
114
+ - Available templates in `src/moai_adk/templates/workflows/`:
115
+ * `python-tag-validation.yml` - Python projects (pytest, mypy, ruff)
116
+ * `javascript-tag-validation.yml` - JavaScript projects (npm/yarn/pnpm/bun auto-detect)
117
+ * `typescript-tag-validation.yml` - TypeScript projects (biome, tsc)
118
+ * `go-tag-validation.yml` - Go projects (golangci-lint, gofmt)
119
+
120
+ 3. **Generate Project-Specific Workflow**:
121
+ - Copy the selected template to `.github/workflows/tag-validation.yml`
122
+ - Apply project-specific customization if needed
123
+ - Validate workflow syntax using PyYAML
124
+
125
+ #### Error Handling
126
+
127
+ - **Unsupported Language**: If detected language not in supported list, raise ValueError with clear message
128
+ - **Missing Template**: Ensure template file exists before copying
129
+ - **Syntax Error**: Validate YAML before copying to .github/workflows/
130
+
131
+ #### Detection Priority
132
+
133
+ When multiple language indicators are present:
134
+ - TypeScript has priority over JavaScript (when both package.json and tsconfig.json exist)
135
+ - Framework-specific files prioritized (e.g., Rails routes.rb over generic .rb files)
136
+
137
+ #### Example Usage
138
+
139
+ ```python
140
+ from moai_adk.core.project.detector import LanguageDetector
141
+
142
+ # Initialize detector
143
+ detector = LanguageDetector()
144
+
145
+ # Detect project language
146
+ language = detector.detect("/path/to/project")
147
+
148
+ # Get workflow template path
149
+ if language in ["python", "javascript", "typescript", "go"]:
150
+ template_path = detector.get_workflow_template_path(language)
151
+ # Copy template to .github/workflows/tag-validation.yml
152
+ else:
153
+ # Use generic workflow or notify user
154
+ pass
155
+ ```
156
+
157
+ #### Workflow Features by Language
158
+
159
+ **Python (`python-tag-validation.yml`)**:
160
+ - Test framework: pytest with 85% coverage target
161
+ - Type checking: mypy
162
+ - Linting: ruff
163
+ - Python versions: 3.11, 3.12, 3.13
164
+
165
+ **JavaScript (`javascript-tag-validation.yml`)**:
166
+ - Package manager: Auto-detect (npm, yarn, pnpm, bun)
167
+ - Test: npm test (or yarn test, pnpm test, bun test)
168
+ - Linting: eslint or biome
169
+ - Coverage target: 80%
170
+ - Node versions: 20, 22 LTS
171
+
172
+ **TypeScript (`typescript-tag-validation.yml`)**:
173
+ - Type checking: tsc --noEmit
174
+ - Test: npm test (vitest/jest)
175
+ - Linting: biome or eslint
176
+ - Coverage target: 85%
177
+ - Node versions: 20, 22 LTS
178
+
179
+ **Go (`go-tag-validation.yml`)**:
180
+ - Test: go test -v -cover
181
+ - Linting: golangci-lint
182
+ - Format check: gofmt
183
+ - Coverage target: 75%
184
+
185
+ #### Troubleshooting
186
+
187
+ **Problem: Language detection returns None**
188
+ - **Cause**: No language indicator files found in project directory
189
+ - **Solution**: Ensure at least one language indicator file exists (e.g., pyproject.toml for Python, package.json for JavaScript)
190
+
191
+ **Problem: ValueError when getting workflow template**
192
+ - **Cause**: Detected language doesn't have a dedicated workflow template
193
+ - **Solution**: Check supported languages with `detector.get_supported_languages_for_workflows()`. For unsupported languages, use generic workflow or create custom template.
194
+
195
+ **Problem: TypeScript project incorrectly detected as JavaScript**
196
+ - **Cause**: tsconfig.json missing from project root
197
+ - **Solution**: Add tsconfig.json to project root. TypeScript detection requires both package.json and tsconfig.json.
198
+
199
+ **Problem: Wrong package manager detected**
200
+ - **Cause**: Multiple lock files present (e.g., both yarn.lock and package-lock.json)
201
+ - **Solution**: Remove outdated lock files. Keep only one package manager's lock file. Priority order: bun.lockb > pnpm-lock.yaml > yarn.lock > package-lock.json
202
+
203
+ **Performance Note**: Language detection scans project files recursively. For large projects with many files, consider caching the detection result.
204
+
103
205
  ## 📋 Workflow Steps
104
206
 
105
207
  ### Step 1: Confirm implementation plan
@@ -320,7 +422,7 @@ Alfred passes the user's language directly to you via `Task()` calls. This enabl
320
422
  ## 📚 References
321
423
 
322
424
  - **Implementation plan**: implementation-planner output
323
- - **Development guide**: `.moai/memory/development-guide.md`
425
+ - **Development guide**: Skill("moai-alfred-dev-guide")
324
426
  - **TRUST principles**: TRUST section
325
- - **TAG guide** in `.moai/memory/development-guide.md`: TAG chain section
326
- - **TDD guide** in `.moai/memory/development-guide.md`: TDD section in `.moai/memory/development-guide.md`
427
+ - **TAG guide** in Skill("moai-alfred-dev-guide"): TAG chain section
428
+ - **TDD guide** in Skill("moai-alfred-dev-guide"): TDD section in Skill("moai-alfred-dev-guide")
@@ -63,7 +63,7 @@ Alfred passes the user's language directly to you via `Task()` calls.
63
63
  ### Expert Traits
64
64
 
65
65
  - **Thinking style**: Fast and accurate quality verification through Level 1→2→3 differential scanning, maximizing efficiency with early termination
66
- - **Decision-making criteria**: Compliance with TRUST 5 principles (@.moai/memory/development-guide.md), security level, testing Coverage, code quality
66
+ - **Decision-making criteria**: Compliance with TRUST 5 principles (Skill("moai-alfred-dev-guide")), security level, testing Coverage, code quality
67
67
  - **Communication style**: Standardized verification report, score by principle, improvement suggestions by priority, delegation of dedicated agent
68
68
  - **Area of expertise**: Comprehensive verification of TRUST principles, performance analysis, security check, code standard compliance, dependency verification
69
69
 
@@ -142,7 +142,7 @@ trust-checker comprehensively verifies the entire TRUST principle:
142
142
 
143
143
  ## 📊 TRUST 5 principles verification system
144
144
 
145
- ### Apply @.moai/memory/development-guide.md standards
145
+ ### Apply Skill("moai-alfred-dev-guide") standards
146
146
 
147
147
  #### T - Test First
148
148