moai-adk 0.9.0__py3-none-any.whl → 0.15.1__py3-none-any.whl

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

Potentially problematic release.


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

Files changed (186) hide show
  1. moai_adk/cli/commands/init.py +14 -2
  2. moai_adk/cli/commands/update.py +214 -56
  3. moai_adk/core/issue_creator.py +2 -2
  4. moai_adk/core/project/detector.py +201 -12
  5. moai_adk/core/project/initializer.py +62 -1
  6. moai_adk/core/project/phase_executor.py +48 -6
  7. moai_adk/core/tags/ci_validator.py +34 -4
  8. moai_adk/core/tags/pre_commit_validator.py +40 -2
  9. moai_adk/core/tags/reporter.py +2 -3
  10. moai_adk/core/tags/validator.py +1 -1
  11. moai_adk/core/template_engine.py +20 -5
  12. moai_adk/templates/.claude/agents/alfred/backend-expert.md +319 -0
  13. moai_adk/templates/.claude/agents/alfred/devops-expert.md +464 -0
  14. moai_adk/templates/.claude/agents/alfred/doc-syncer.md +1 -1
  15. moai_adk/templates/.claude/agents/alfred/frontend-expert.md +357 -0
  16. moai_adk/templates/.claude/agents/alfred/git-manager.md +2 -2
  17. moai_adk/templates/.claude/agents/alfred/implementation-planner.md +76 -3
  18. moai_adk/templates/.claude/agents/alfred/project-manager.md +49 -10
  19. moai_adk/templates/.claude/agents/alfred/quality-gate.md +3 -3
  20. moai_adk/templates/.claude/agents/alfred/spec-builder.md +180 -41
  21. moai_adk/templates/.claude/agents/alfred/tag-agent.md +74 -0
  22. moai_adk/templates/.claude/agents/alfred/tdd-implementer.md +107 -5
  23. moai_adk/templates/.claude/agents/alfred/trust-checker.md +2 -2
  24. moai_adk/templates/.claude/agents/alfred/ui-ux-expert.md +571 -0
  25. moai_adk/templates/.claude/commands/alfred/0-project.md +928 -263
  26. moai_adk/templates/.claude/commands/alfred/1-plan.md +220 -68
  27. moai_adk/templates/.claude/commands/alfred/2-run.md +299 -51
  28. moai_adk/templates/.claude/commands/alfred/3-sync.md +452 -51
  29. moai_adk/templates/.claude/commands/alfred/9-feedback.md +1 -1
  30. moai_adk/templates/.claude/hooks/alfred/core/project.py +25 -27
  31. moai_adk/templates/.claude/hooks/alfred/core/timeout.py +136 -0
  32. moai_adk/templates/.claude/hooks/alfred/core/ttl_cache.py +108 -0
  33. moai_adk/templates/.claude/hooks/alfred/core/version_cache.py +4 -4
  34. moai_adk/templates/.claude/hooks/alfred/handlers/__init__.py +29 -0
  35. moai_adk/templates/.claude/hooks/alfred/post_tool__log_changes.py +11 -19
  36. moai_adk/templates/.claude/hooks/alfred/pre_tool__auto_checkpoint.py +11 -19
  37. moai_adk/templates/.claude/hooks/alfred/session_end__cleanup.py +11 -19
  38. moai_adk/templates/.claude/hooks/alfred/session_start__show_project_info.py +10 -18
  39. moai_adk/templates/.claude/hooks/alfred/shared/core/__init__.py +2 -2
  40. moai_adk/templates/.claude/hooks/alfred/shared/core/checkpoint.py +3 -3
  41. moai_adk/templates/.claude/hooks/alfred/shared/core/context.py +5 -5
  42. moai_adk/templates/.claude/hooks/alfred/shared/core/project.py +40 -41
  43. moai_adk/templates/.claude/hooks/alfred/shared/core/tags.py +55 -23
  44. moai_adk/templates/.claude/hooks/alfred/shared/core/version_cache.py +4 -4
  45. moai_adk/templates/.claude/hooks/alfred/shared/handlers/notification.py +132 -3
  46. moai_adk/templates/.claude/hooks/alfred/shared/handlers/session.py +9 -10
  47. moai_adk/templates/.claude/hooks/alfred/shared/handlers/tool.py +3 -6
  48. moai_adk/templates/.claude/hooks/alfred/shared/handlers/user.py +19 -0
  49. moai_adk/templates/.claude/hooks/alfred/user_prompt__jit_load_docs.py +14 -22
  50. moai_adk/templates/.claude/hooks/alfred/utils/__init__.py +1 -0
  51. moai_adk/templates/.claude/hooks/alfred/utils/timeout.py +161 -0
  52. moai_adk/templates/.claude/settings.json +5 -5
  53. moai_adk/templates/.claude/skills/moai-alfred-agent-guide/SKILL.md +70 -0
  54. moai_adk/templates/.claude/skills/moai-alfred-agent-guide/examples.md +62 -0
  55. moai_adk/templates/{.moai/memory/CLAUDE-AGENTS-GUIDE.md → .claude/skills/moai-alfred-agent-guide/reference.md} +34 -0
  56. moai_adk/templates/.claude/skills/moai-alfred-config-schema/SKILL.md +56 -0
  57. moai_adk/templates/.claude/skills/moai-alfred-config-schema/examples.md +28 -0
  58. moai_adk/templates/.claude/skills/moai-alfred-config-schema/reference.md +444 -0
  59. moai_adk/templates/.claude/skills/moai-alfred-context-budget/SKILL.md +62 -0
  60. moai_adk/templates/.claude/skills/moai-alfred-context-budget/examples.md +28 -0
  61. moai_adk/templates/.claude/skills/moai-alfred-context-budget/reference.md +405 -0
  62. moai_adk/templates/.claude/skills/moai-alfred-dev-guide/SKILL.md +51 -0
  63. moai_adk/templates/.claude/skills/moai-alfred-dev-guide/examples.md +355 -0
  64. moai_adk/templates/.claude/skills/moai-alfred-dev-guide/reference.md +239 -0
  65. moai_adk/templates/.claude/skills/moai-alfred-expertise-detection/SKILL.md +323 -0
  66. moai_adk/templates/.claude/skills/moai-alfred-expertise-detection/examples.md +286 -0
  67. moai_adk/templates/.claude/skills/moai-alfred-expertise-detection/reference.md +126 -0
  68. moai_adk/templates/.claude/skills/moai-alfred-gitflow-policy/SKILL.md +74 -0
  69. moai_adk/templates/.claude/skills/moai-alfred-gitflow-policy/examples.md +4 -0
  70. moai_adk/templates/.claude/skills/moai-alfred-gitflow-policy/reference.md +269 -0
  71. moai_adk/templates/.claude/skills/moai-alfred-issue-labels/SKILL.md +19 -0
  72. moai_adk/templates/.claude/skills/moai-alfred-issue-labels/examples.md +4 -0
  73. moai_adk/templates/.claude/skills/moai-alfred-persona-roles/SKILL.md +198 -0
  74. moai_adk/templates/.claude/skills/moai-alfred-persona-roles/examples.md +431 -0
  75. moai_adk/templates/.claude/skills/moai-alfred-persona-roles/reference.md +141 -0
  76. moai_adk/templates/.claude/skills/moai-alfred-practices/SKILL.md +89 -0
  77. moai_adk/templates/.claude/skills/moai-alfred-practices/examples.md +122 -0
  78. moai_adk/templates/.claude/skills/moai-alfred-proactive-suggestions/SKILL.md +508 -0
  79. moai_adk/templates/.claude/skills/moai-alfred-proactive-suggestions/examples.md +481 -0
  80. moai_adk/templates/.claude/skills/moai-alfred-proactive-suggestions/reference.md +100 -0
  81. moai_adk/templates/.claude/skills/moai-alfred-reporting/SKILL.md +273 -0
  82. moai_adk/templates/.claude/skills/moai-alfred-rules/SKILL.md +77 -0
  83. moai_adk/templates/.claude/skills/moai-alfred-rules/examples.md +265 -0
  84. moai_adk/templates/.claude/skills/moai-alfred-session-state/SKILL.md +19 -0
  85. moai_adk/templates/.claude/skills/moai-alfred-session-state/examples.md +4 -0
  86. moai_adk/templates/.claude/skills/moai-alfred-session-state/reference.md +84 -0
  87. moai_adk/templates/.claude/skills/{moai-spec-authoring → moai-alfred-spec-authoring}/SKILL.md +5 -5
  88. moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-extended/SKILL.md +115 -0
  89. moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-extended/examples.md +4 -0
  90. moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-extended/reference.md +348 -0
  91. moai_adk/templates/.claude/skills/moai-alfred-todowrite-pattern/SKILL.md +19 -0
  92. moai_adk/templates/.claude/skills/moai-alfred-todowrite-pattern/examples.md +4 -0
  93. moai_adk/templates/.claude/skills/moai-alfred-todowrite-pattern/reference.md +211 -0
  94. moai_adk/templates/.claude/skills/moai-alfred-workflow/SKILL.md +288 -0
  95. moai_adk/templates/.claude/skills/moai-cc-skill-descriptions/SKILL.md +19 -0
  96. moai_adk/templates/.claude/skills/moai-cc-skill-descriptions/examples.md +4 -0
  97. moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/SKILL.md +3 -3
  98. moai_adk/templates/.claude/skills/moai-design-systems/SKILL.md +802 -0
  99. moai_adk/templates/.claude/skills/moai-design-systems/examples.md +1238 -0
  100. moai_adk/templates/.claude/skills/moai-design-systems/reference.md +673 -0
  101. moai_adk/templates/.claude/skills/moai-domain-frontend/SKILL.md +17 -13
  102. moai_adk/templates/.claude/skills/moai-lang-go/SKILL.md +15 -12
  103. moai_adk/templates/.claude/skills/moai-lang-java/SKILL.md +14 -12
  104. moai_adk/templates/.claude/skills/moai-lang-php/SKILL.md +14 -11
  105. moai_adk/templates/.claude/skills/moai-lang-python/SKILL.md +10 -8
  106. moai_adk/templates/.claude/skills/moai-lang-rust/SKILL.md +15 -12
  107. moai_adk/templates/.claude/skills/moai-lang-scala/SKILL.md +13 -11
  108. moai_adk/templates/.claude/skills/moai-lang-typescript/SKILL.md +16 -10
  109. moai_adk/templates/.claude/skills/moai-project-documentation.md +622 -0
  110. moai_adk/templates/.git-hooks/pre-push +143 -0
  111. moai_adk/templates/.github/workflows/c-tag-validation.yml +11 -0
  112. moai_adk/templates/.github/workflows/cpp-tag-validation.yml +11 -0
  113. moai_adk/templates/.github/workflows/csharp-tag-validation.yml +11 -0
  114. moai_adk/templates/.github/workflows/dart-tag-validation.yml +11 -0
  115. moai_adk/templates/.github/workflows/go-tag-validation.yml +130 -0
  116. moai_adk/templates/.github/workflows/java-tag-validation.yml +11 -0
  117. moai_adk/templates/.github/workflows/javascript-tag-validation.yml +135 -0
  118. moai_adk/templates/.github/workflows/kotlin-tag-validation.yml +11 -0
  119. moai_adk/templates/.github/workflows/moai-gitflow.yml +182 -25
  120. moai_adk/templates/.github/workflows/moai-release-pipeline.yml +35 -29
  121. moai_adk/templates/.github/workflows/php-tag-validation.yml +11 -0
  122. moai_adk/templates/.github/workflows/python-tag-validation.yml +118 -0
  123. moai_adk/templates/.github/workflows/release.yml +76 -7
  124. moai_adk/templates/.github/workflows/ruby-tag-validation.yml +11 -0
  125. moai_adk/templates/.github/workflows/rust-tag-validation.yml +11 -0
  126. moai_adk/templates/.github/workflows/shell-tag-validation.yml +11 -0
  127. moai_adk/templates/.github/workflows/spec-issue-sync.yml +208 -41
  128. moai_adk/templates/.github/workflows/swift-tag-validation.yml +11 -0
  129. moai_adk/templates/.github/workflows/tag-report.yml +269 -0
  130. moai_adk/templates/.github/workflows/tag-validation.yml +186 -0
  131. moai_adk/templates/.github/workflows/typescript-tag-validation.yml +154 -0
  132. moai_adk/templates/.moai/config.json +3 -1
  133. moai_adk/templates/CLAUDE.md +940 -45
  134. moai_adk/templates/workflows/go-tag-validation.yml +30 -0
  135. moai_adk/templates/workflows/javascript-tag-validation.yml +41 -0
  136. moai_adk/templates/workflows/python-tag-validation.yml +42 -0
  137. moai_adk/templates/workflows/typescript-tag-validation.yml +31 -0
  138. moai_adk/utils/banner.py +5 -5
  139. {moai_adk-0.9.0.dist-info → moai_adk-0.15.1.dist-info}/METADATA +1253 -527
  140. {moai_adk-0.9.0.dist-info → moai_adk-0.15.1.dist-info}/RECORD +169 -109
  141. moai_adk/templates/.claude/hooks/alfred/alfred_hooks.py +0 -209
  142. moai_adk/templates/.claude/hooks/alfred/notification__handle_events.py +0 -102
  143. moai_adk/templates/.claude/hooks/alfred/stop__handle_interrupt.py +0 -102
  144. moai_adk/templates/.claude/hooks/alfred/subagent_stop__handle_subagent_end.py +0 -102
  145. moai_adk/templates/.claude/output-styles/alfred/agentic-coding.md +0 -640
  146. moai_adk/templates/.claude/output-styles/alfred/moai-adk-learning.md +0 -696
  147. moai_adk/templates/.claude/output-styles/alfred/study-with-alfred.md +0 -474
  148. moai_adk/templates/.github/ISSUE_TEMPLATE/spec.yml +0 -176
  149. moai_adk/templates/.github/PULL_REQUEST_TEMPLATE.md +0 -69
  150. moai_adk/templates/.moai/memory/DEVELOPMENT-GUIDE.md +0 -344
  151. moai_adk/templates/.moai/memory/SPEC-METADATA.md +0 -356
  152. moai_adk/templates/.moai/memory/gitflow-protection-policy.md +0 -330
  153. moai_adk/templates/.moai/project/product.md +0 -161
  154. moai_adk/templates/.moai/project/structure.md +0 -156
  155. moai_adk/templates/.moai/project/tech.md +0 -227
  156. moai_adk/templates/README.md +0 -256
  157. moai_adk/templates/__init__.py +0 -2
  158. /moai_adk/templates/{.moai/memory/ISSUE-LABEL-MAPPING.md → .claude/skills/moai-alfred-issue-labels/reference.md} +0 -0
  159. /moai_adk/templates/{.moai/memory/CLAUDE-PRACTICES.md → .claude/skills/moai-alfred-practices/reference.md} +0 -0
  160. /moai_adk/templates/{.moai/memory/CLAUDE-RULES.md → .claude/skills/moai-alfred-rules/reference.md} +0 -0
  161. /moai_adk/templates/.claude/skills/{moai-spec-authoring → moai-alfred-spec-authoring}/README.md +0 -0
  162. /moai_adk/templates/.claude/skills/{moai-spec-authoring → moai-alfred-spec-authoring}/examples/validate-spec.sh +0 -0
  163. /moai_adk/templates/.claude/skills/{moai-spec-authoring → moai-alfred-spec-authoring}/examples.md +0 -0
  164. /moai_adk/templates/.claude/skills/{moai-spec-authoring → moai-alfred-spec-authoring}/reference.md +0 -0
  165. /moai_adk/templates/{.moai/memory/SKILLS-DESCRIPTION-POLICY.md → .claude/skills/moai-cc-skill-descriptions/reference.md} +0 -0
  166. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/CHECKLIST.md +0 -0
  167. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/EXAMPLES.md +0 -0
  168. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/INTERACTIVE-DISCOVERY.md +0 -0
  169. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/METADATA.md +0 -0
  170. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/PARALLEL-ANALYSIS-REPORT.md +0 -0
  171. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/PYTHON-VERSION-MATRIX.md +0 -0
  172. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/SKILL-FACTORY-WORKFLOW.md +0 -0
  173. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/SKILL-UPDATE-ADVISOR.md +0 -0
  174. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/STEP-BY-STEP-GUIDE.md +0 -0
  175. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/STRUCTURE.md +0 -0
  176. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/WEB-RESEARCH.md +0 -0
  177. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/reference.md +0 -0
  178. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/scripts/generate-structure.sh +0 -0
  179. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/scripts/validate-skill.sh +0 -0
  180. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/templates/SKILL_TEMPLATE.md +0 -0
  181. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/templates/examples-template.md +0 -0
  182. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/templates/reference-template.md +0 -0
  183. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/templates/scripts-template.sh +0 -0
  184. {moai_adk-0.9.0.dist-info → moai_adk-0.15.1.dist-info}/WHEEL +0 -0
  185. {moai_adk-0.9.0.dist-info → moai_adk-0.15.1.dist-info}/entry_points.txt +0 -0
  186. {moai_adk-0.9.0.dist-info → moai_adk-0.15.1.dist-info}/licenses/LICENSE +0 -0
@@ -1,10 +1,6 @@
1
1
  ---
2
2
  name: alfred:3-sync
3
- description: "Document synchronization + PR Ready conversion"
4
- # Translations:
5
- # - ko: "문서 동기화 + PR Ready 전환"
6
- # - ja: "ドキュメント同期 + PR Ready変換"
7
- # - zh: "文档同步 + PR Ready转换"
3
+ description: "Synchronize documentation and finalize PR"
8
4
  argument-hint: 'Mode target path - Mode: auto (default)|force|status|project, target
9
5
  path: Synchronization target path'
10
6
  allowed-tools:
@@ -23,6 +19,12 @@ allowed-tools:
23
19
 
24
20
  # 📚 MoAI-ADK Step 3: Document Synchronization (+Optional PR Ready)
25
21
  > **Note**: Interactive prompts use `AskUserQuestion tool (documented in moai-alfred-interactive-questions skill)` for TUI selection menus. The skill is loaded on-demand when user interaction is required.
22
+ >
23
+ > **Batched Design**: All AskUserQuestion calls follow batched design principles (1-4 questions per call) to minimize user interaction turns. See CLAUDE.md section "Alfred Command Completion Pattern" for details.
24
+
25
+ <!-- @CODE:ALF-WORKFLOW-003:CMD-SYNC -->
26
+
27
+ **4-Step Workflow Integration**: This command implements Step 4 of Alfred's workflow (Report & Commit with conditional report generation). See CLAUDE.md for full workflow details.
26
28
 
27
29
  ## 🚀 START HERE
28
30
 
@@ -161,13 +163,13 @@ STEP 1 consists of **two independent phases** to provide flexible workflow based
161
163
  Invoking the Task tool (Explore agent):
162
164
  - subagent_type: "Explore"
163
165
  - description: "Scan entire TAG system"
164
- - prompt: "Please scan @TAG system throughout the project:
165
- - @SPEC TAG location (.moai/specs/)
166
- - @TEST TAG location (tests/)
167
- - @CODE TAG location (src/)
168
- - @DOC TAG location (docs/)
169
- - Detect orphan TAGs and broken references
170
- thoroughness level: very thorough"
166
+ - prompt: "프로젝트 전체에서 @TAG 시스템을 스캔해주세요:
167
+ - @SPEC TAG 위치 (.moai/specs/)
168
+ - @TEST TAG 위치 (tests/)
169
+ - @CODE TAG 위치 (src/)
170
+ - @DOC TAG 위치 (docs/)
171
+ - 고아 TAG 끊긴 참조 감지
172
+ 상세도 수준: very thorough"
171
173
  ```
172
174
 
173
175
  **Note**: For simple changes, skip Phase A and proceed directly to Phase B.
@@ -186,54 +188,54 @@ This phase is **always required** and runs **two agents sequentially**:
186
188
  1. Tag-agent call (TAG verification - FULL PROJECT SCOPE):
187
189
  - subagent_type: "tag-agent"
188
190
  - description: "Verify TAG system across entire project"
189
- - prompt: "Please perform a COMPREHENSIVE TAG system verification across the ENTIRE PROJECT.
191
+ - prompt: "전체 프로젝트에서 포괄적인 @TAG 시스템 검증을 수행해주세요.
190
192
 
191
- **Required scope**: Scan all source files, not just changed files.
193
+ **필수 범위**: 변경된 파일만이 아니라 모든 소스 파일을 스캔합니다.
192
194
 
193
- **Verification items**:
194
- 1. @SPEC TAGs in .moai/specs/ directory
195
- 2. @TEST TAGs in tests/ directory
196
- 3. @CODE TAGs in src/ directory
197
- 4. @DOC TAGs in docs/ directory
195
+ **검증 항목**:
196
+ 1. .moai/specs/ 디렉토리의 @SPEC TAG
197
+ 2. tests/ 디렉토리의 @TEST TAG
198
+ 3. src/ 디렉토리의 @CODE TAG
199
+ 4. docs/ 디렉토리의 @DOC TAG
198
200
 
199
- **Orphan detection** (MANDATORY):
200
- - Detect @CODE TAGs without matching @SPEC
201
- - Detect @SPEC TAGs without matching @CODE
202
- - Detect @TEST TAGs without matching @SPEC
203
- - Detect @DOC TAGs without matching @SPEC/@CODE
201
+ **고아 감지** (필수):
202
+ - 매칭되는 @SPEC이 없는 @CODE TAG 감지
203
+ - 매칭되는 @CODE가 없는 @SPEC TAG 감지
204
+ - 매칭되는 @SPEC이 없는 @TEST TAG 감지
205
+ - 매칭되는 @SPEC/@CODE가 없는 @DOC TAG 감지
204
206
 
205
- **Output format**: Provide complete list of orphan TAGs with locations.
207
+ **출력 형식**: 고아 TAG의 전체 목록을 위치와 함께 제공합니다.
206
208
 
207
- (Optional) Explore results: $EXPLORE_RESULTS"
209
+ (선택사항) 탐색 결과: $EXPLORE_RESULTS"
208
210
 
209
211
  2. doc-syncer call (synchronization plan):
210
212
  - subagent_type: "doc-syncer"
211
213
  - description: "Establish a document synchronization plan"
212
- - prompt: """You are doc-syncer agent.
214
+ - prompt: """당신은 doc-syncer 에이전트입니다.
213
215
 
214
- LANGUAGE CONFIGURATION:
215
- - conversation_language: {{CONVERSATION_LANGUAGE}}
216
- - language_name: {{CONVERSATION_LANGUAGE_NAME}}
216
+ 언어 설정:
217
+ - 대화_언어: {{CONVERSATION_LANGUAGE}}
218
+ - 언어명: {{CONVERSATION_LANGUAGE_NAME}}
217
219
 
218
- CRITICAL INSTRUCTION:
219
- Documentation updates MUST respect conversation_language:
220
- - User-facing documentation (README, guides): {{CONVERSATION_LANGUAGE}}
221
- - SPEC documents (spec.md, plan.md, acceptance.md): {{CONVERSATION_LANGUAGE}}
222
- - Code comments: {{CONVERSATION_LANGUAGE}} (when not technical keywords)
223
- - Technical documentation and YAML frontmatter: English
220
+ 중요 지시사항:
221
+ 문서 업데이트는 대화_언어를 반드시 존중해야 합니다:
222
+ - 사용자 대면 문서 (README, 가이드): {{CONVERSATION_LANGUAGE}}
223
+ - SPEC 문서 (spec.md, plan.md, acceptance.md): {{CONVERSATION_LANGUAGE}}
224
+ - 코드 주석: {{CONVERSATION_LANGUAGE}} (기술 키워드 제외)
225
+ - 기술 문서 YAML 프론트매터: 영어
224
226
 
225
- SKILL INVOCATION:
226
- Use explicit Skill() calls when needed:
227
- - Skill("moai-foundation-tags") for TAG chain validation
228
- - Skill("moai-foundation-trust") for quality gate checks
229
- - Skill("moai-alfred-tag-scanning") for TAG inventory updates
227
+ 스킬 호출:
228
+ 필요 명시적 Skill() 호출 사용:
229
+ - Skill("moai-foundation-tags") - TAG 체인 검증
230
+ - Skill("moai-foundation-trust") - 품질 게이트 검사
231
+ - Skill("moai-alfred-tag-scanning") - TAG 인벤토리 업데이트
230
232
 
231
- TASK:
232
- Please analyze Git changes and establish a document synchronization plan.
233
- Ensure all documentation updates align with the conversation_language setting.
233
+ 작업:
234
+ Git 변경사항을 분석하고 문서 동기화 계획을 수립해주세요.
235
+ 모든 문서 업데이트가 대화_언어 설정과 일치하는지 확인합니다.
234
236
 
235
237
  $ARGUMENTS
236
- (Optional) TAG validation results: $TAG_VALIDATION_RESULTS"""
238
+ (선택사항) TAG 검증 결과: $TAG_VALIDATION_RESULTS"""
237
239
  ```
238
240
 
239
241
  **Note**:
@@ -301,12 +303,45 @@ To skip pre-verification, use the `/alfred:3-sync --skip-pre-check` option.
301
303
 
302
304
  ---
303
305
 
304
- ### User verification steps
306
+ ### 🎯 Synchronization Plan Approval (DECISION POINT 1)
307
+
308
+ After completing synchronization analysis and establishing a plan, Alfred invokes AskUserQuestion to gather user approval:
309
+
310
+ ```python
311
+ AskUserQuestion(
312
+ questions=[
313
+ {
314
+ "question": "Synchronization plan is ready. How would you like to proceed?",
315
+ "header": "Plan Approval",
316
+ "multiSelect": false,
317
+ "options": [
318
+ {
319
+ "label": "✅ Proceed with Sync",
320
+ "description": "Execute document synchronization as planned"
321
+ },
322
+ {
323
+ "label": "🔄 Request Modifications",
324
+ "description": "Specify changes to the synchronization strategy"
325
+ },
326
+ {
327
+ "label": "🔍 Review Details",
328
+ "description": "Re-examine TAG validation results and changes"
329
+ },
330
+ {
331
+ "label": "❌ Abort",
332
+ "description": "Cancel synchronization, keep current state"
333
+ }
334
+ ]
335
+ }
336
+ ]
337
+ )
338
+ ```
305
339
 
306
- After reviewing your sync plan, `AskUserQuestion tool (documented in moai-alfred-interactive-questions skill)` presents the following options for user decision:
307
- - **"Proceed"** or **"Start"**: Start synchronization as planned
308
- - **"Modify [Contents]"**: Request modifications to your sync plan
309
- - **"Abort"**: Abort the sync operation
340
+ **Response Processing**:
341
+ - **✅ Proceed with Sync** (`answers["0"] === "Proceed"`) Execute Phase 2 (document synchronization)
342
+ - **🔄 Request Modifications** (`answers["0"] === "Modifications"`) Collect feedback and re-analyze
343
+ - **🔍 Review Details** (`answers["0"] === "Review"`) Display TAG validation results, then re-present decision
344
+ - **❌ Abort** (`answers["0"] === "Abort"`) → Stop synchronization, maintain current branches
310
345
 
311
346
  ---
312
347
 
@@ -314,6 +349,170 @@ After reviewing your sync plan, `AskUserQuestion tool (documented in moai-alfred
314
349
 
315
350
  After user approval (collected via `AskUserQuestion tool (documented in moai-alfred-interactive-questions skill)`), the doc-syncer agent performs **Living Document synchronization and @TAG updates**, and optionally executes PR Ready transitions only in team mode.
316
351
 
352
+ ---
353
+
354
+ ### 2.0.5 Domain-Based Sync Routing (Automatic - During Sync)
355
+
356
+ **Purpose**: Route documentation sync to domain-specific experts based on changed files
357
+
358
+ **When to run**: During doc-syncer execution, after analyzing git changes
359
+
360
+ **Detection Logic**:
361
+
362
+ Alfred analyzes changed files to determine which domains were modified:
363
+
364
+ ```bash
365
+ # Get list of changed files
366
+ git diff --name-only HEAD~1 HEAD
367
+
368
+ # Domain detection by file patterns
369
+ ```
370
+
371
+ **File Pattern → Domain Mapping**:
372
+
373
+ | File Patterns | Domain | Sync Focus |
374
+ |---------------|--------|-----------|
375
+ | `src/components/*`, `src/pages/*`, `*.tsx`, `*.jsx`, `*.vue` | Frontend | Component documentation, Storybook, UI architecture |
376
+ | `src/api/*`, `src/models/*`, `src/routes/*`, `src/services/*` | Backend | API documentation (OpenAPI), schema docs, error handling |
377
+ | `Dockerfile`, `docker-compose.yml`, `.github/workflows/*`, `terraform/*`, `k8s/*` | DevOps | Deployment docs, CI/CD status, infrastructure diagrams |
378
+ | `src/database/*`, `migrations/*`, `*.sql`, `schema/*` | Database | Schema documentation, migration logs, query optimization |
379
+ | `notebooks/*`, `src/pipelines/*`, `*.ipynb`, `src/models/ml/*` | Data Science | Pipeline documentation, model cards, data validation |
380
+ | `src/mobile/*`, `ios/*`, `android/*`, `*.swift`, `*.kt` | Mobile | Platform-specific docs, app lifecycle, native modules |
381
+
382
+ **Automatic Invocation Pattern**:
383
+
384
+ ```python
385
+ # Pseudo-code for domain detection from git changes
386
+ changed_files = git_diff("HEAD~1", "HEAD")
387
+
388
+ detected_domains = []
389
+ if any(".tsx" in f or ".jsx" in f or "src/components/" in f for f in changed_files):
390
+ detected_domains.append("frontend")
391
+ if any("src/api/" in f or "src/models/" in f or "src/routes/" in f for f in changed_files):
392
+ detected_domains.append("backend")
393
+ if any("Dockerfile" in f or ".github/workflows/" in f or "docker-compose" in f for f in changed_files):
394
+ detected_domains.append("devops")
395
+ # ... repeat for all domains
396
+
397
+ # Invoke domain-specific sync for each detected domain
398
+ for domain in detected_domains:
399
+ Task(
400
+ subagent_type="Explore",
401
+ prompt=f"Generate domain-specific sync report for {domain} changes"
402
+ )
403
+ ```
404
+
405
+ **Example Invocation** (Frontend + Backend detected):
406
+
407
+ ```python
408
+ # Frontend sync
409
+ Task(
410
+ subagent_type="Explore",
411
+ prompt="""You are frontend-expert providing sync documentation.
412
+
413
+ Changed Files: [src/components/Dashboard.tsx, src/pages/Home.vue]
414
+
415
+ Provide frontend-specific documentation:
416
+ 1. Component documentation updates
417
+ 2. Storybook story generation
418
+ 3. UI architecture diagram updates
419
+ 4. Accessibility compliance notes
420
+
421
+ Output format: Markdown document for .moai/reports/sync-frontend.md"""
422
+ )
423
+
424
+ # Backend sync
425
+ Task(
426
+ subagent_type="Explore",
427
+ prompt="""You are backend-expert providing sync documentation.
428
+
429
+ Changed Files: [src/api/auth.py, src/models/user.py, src/routes/users.py]
430
+
431
+ Provide backend-specific documentation:
432
+ 1. OpenAPI spec generation
433
+ 2. Schema documentation updates
434
+ 3. Error handling documentation
435
+ 4. API endpoint examples
436
+
437
+ Output format: Markdown document for .moai/reports/sync-backend.md"""
438
+ )
439
+ ```
440
+
441
+ **Output Storage Structure**:
442
+
443
+ ```
444
+ .moai/reports/
445
+ ├── sync-report-2025-10-23.md # Combined sync report
446
+ ├── sync-frontend-2025-10-23.md # Frontend-specific sync
447
+ ├── sync-backend-2025-10-23.md # Backend-specific sync
448
+ └── sync-devops-2025-10-23.md # DevOps-specific sync
449
+ ```
450
+
451
+ **Combined Sync Report Format**:
452
+
453
+ ```markdown
454
+ ## 📚 Documentation Sync Report - 2025-10-23
455
+
456
+ ### Changed Files Summary
457
+ - Frontend: 3 files (components, pages)
458
+ - Backend: 5 files (api, models, routes)
459
+ - DevOps: 1 file (Dockerfile)
460
+
461
+ ### Domain-Specific Sync Results
462
+
463
+ #### 🎨 Frontend Sync
464
+ - ✅ Component documentation: Dashboard.tsx documented
465
+ - ✅ Storybook stories: 2 stories generated
466
+ - ✅ UI architecture: Component hierarchy diagram updated
467
+ - 📄 Details: [sync-frontend-2025-10-23.md](./sync-frontend-2025-10-23.md)
468
+
469
+ #### ⚙️ Backend Sync
470
+ - ✅ OpenAPI spec: /api/auth endpoints documented
471
+ - ✅ Schema documentation: User model fields updated
472
+ - ✅ Error handling: 401/403 response examples added
473
+ - 📄 Details: [sync-backend-2025-10-23.md](./sync-backend-2025-10-23.md)
474
+
475
+ #### 🚀 DevOps Sync
476
+ - ✅ Dockerfile: Multi-stage build documented
477
+ - ✅ Deployment: Railway configuration updated
478
+ - 📄 Details: [sync-devops-2025-10-23.md](./sync-devops-2025-10-23.md)
479
+
480
+ ### @TAG Verification
481
+ - ✅ All changed files have @TAG references
482
+ - ✅ SPEC → CODE → TEST → DOC chain intact
483
+
484
+ ### Next Steps
485
+ - Review domain-specific sync reports
486
+ - Update README.md with new features
487
+ - Create PR for documentation changes
488
+ ```
489
+
490
+ **Integration with doc-syncer**:
491
+
492
+ ```python
493
+ # doc-syncer orchestrates domain-specific sync
494
+ Task(
495
+ subagent_type="doc-syncer",
496
+ prompt="""You are doc-syncer agent.
497
+
498
+ DOMAIN SYNC RESULTS:
499
+ {domain_sync_results}
500
+
501
+ Consolidate all domain-specific sync reports into master sync report.
502
+ Ensure @TAG chain integrity across all domains.
503
+ Update .moai/reports/sync-report-{date}.md
504
+
505
+ $ARGUMENTS"""
506
+ )
507
+ ```
508
+
509
+ **Graceful Degradation**:
510
+ - If no domain detected → Standard sync (no domain-specific reports)
511
+ - If domain expert unavailable → Use generic sync templates
512
+ - Multi-domain changes → Generate separate reports, combine into master
513
+
514
+ ---
515
+
317
516
  ### Phase 2 Details: SPEC Completion Processing (Automatic)
318
517
 
319
518
  The doc-syncer agent automatically determines whether TDD implementation is complete and updates SPEC metadata.
@@ -330,9 +529,132 @@ The doc-syncer agent automatically determines whether TDD implementation is comp
330
529
 
331
530
  **If conditions are not met**: Phase 2 detailed work is automatically skipped
332
531
 
532
+ ---
533
+
534
+ ### Phase 2-1: SPEC Document Synchronization (CRITICAL)
535
+
536
+ **IMPORTANT**: Any code or file changes MUST be reflected in SPEC documents to maintain specification alignment.
537
+
538
+ #### When to synchronize SPEC documents:
539
+
540
+ 1. **After code modifications**:
541
+ - Functional changes to implemented features
542
+ - Bug fixes that alter expected behavior
543
+ - Performance optimizations with observable changes
544
+ - API/function signature changes
545
+ - New dependencies or external integrations
546
+
547
+ 2. **After requirement clarifications**:
548
+ - Acceptance criteria refinements
549
+ - Edge case discoveries during implementation
550
+ - User feedback incorporation
551
+ - Security/compliance adjustments
552
+
553
+ 3. **After structural changes**:
554
+ - File organization or module restructuring
555
+ - New configuration options
556
+ - Breaking API changes
557
+ - Database schema modifications
558
+
559
+ #### SPEC documents requiring update:
560
+
561
+ All files in `.moai/specs/SPEC-{ID}/` must be synchronized:
562
+
563
+ - **spec.md**: Update EARS requirements if implementation differs from specification
564
+ - **plan.md**: Revise implementation strategy if approach changed
565
+ - **acceptance.md**: Update acceptance criteria if new test cases or edge cases discovered
566
+
567
+ #### Synchronization rules:
568
+
569
+ **Code ↔ SPEC Comparison**:
570
+ ```
571
+ 1. Review Git diff for changed files
572
+ 2. Identify functional impacts:
573
+ ├─ Signature changes (parameters, return values)
574
+ ├─ Behavior changes (logic flow, edge cases)
575
+ ├─ Performance characteristics (latency, throughput changes)
576
+ └─ External dependencies (new APIs, services)
577
+ 3. Map changes to SPEC requirements:
578
+ ├─ Verify each changed function matches EARS statement
579
+ ├─ Check if acceptance criteria still valid
580
+ └─ Identify any spec-to-code divergence
581
+ 4. Update SPEC documents:
582
+ ├─ Correct EARS statements to match actual implementation
583
+ ├─ Add discovered edge cases to acceptance criteria
584
+ ├─ Update plan.md with implementation changes
585
+ └─ Maintain TAG references (@SPEC, @CODE, @TEST consistency)
586
+ ```
587
+
588
+ #### Example: When synchronization is needed
589
+
590
+ **Scenario 1: Bug Fix Changes Behavior**
591
+ ```
592
+ Git change: Fixed database connection retry logic
593
+ - Was: Max 3 retries with 1-second delay
594
+ - Now: Max 5 retries with exponential backoff
595
+
596
+ SPEC update required:
597
+ - spec.md: Update EARS statement for retry behavior
598
+ - acceptance.md: Add test case for exponential backoff
599
+ - Update @CODE TAG location if function moved
600
+ ```
601
+
602
+ **Scenario 2: API Signature Changes**
603
+ ```
604
+ Git change: Refactored authentication function signature
605
+ - Was: validate_token(token: str) -> bool
606
+ - Now: validate_token(token: str, ttl: int = 3600) -> dict
607
+
608
+ SPEC update required:
609
+ - spec.md: Update function requirements for new TTL parameter
610
+ - acceptance.md: Add test cases for TTL validation
611
+ - plan.md: Document reason for signature change
612
+ ```
613
+
614
+ **Scenario 3: New Edge Cases Discovered**
615
+ ```
616
+ Git change: Added null-check validation during testing
617
+ - Discovered: Special handling needed for empty strings
618
+
619
+ SPEC update required:
620
+ - spec.md: Add EARS statement for empty string edge case
621
+ - acceptance.md: Add test case for empty string handling
622
+ - Link with @TEST TAG from test file
623
+ ```
624
+
625
+ #### SPEC-Code Divergence Detection:
626
+
627
+ **Anti-pattern: Code without matching SPEC**
628
+ ```
629
+ ❌ WRONG: Code changes exist but SPEC documents unchanged
630
+ - Function behavior diverges from specification
631
+ - Acceptance criteria becomes inaccurate
632
+ - @TAG chain breaks (CODE exists without matching SPEC reference)
633
+
634
+ ✅ CORRECT: Code changes synchronized to SPEC
635
+ - SPEC documents updated to match implementation
636
+ - All EARS statements verified against actual code
637
+ - @TAG chain maintained: SPEC ↔ CODE ↔ TEST ↔ DOC
638
+ ```
639
+
640
+ #### SPEC Synchronization Checklist (doc-syncer responsibility):
641
+
642
+ Before marking sync as complete:
643
+ - [ ] All changed code files reviewed against SPEC
644
+ - [ ] EARS statements match implementation behavior
645
+ - [ ] Acceptance criteria valid for current code
646
+ - [ ] Edge cases discovered during implementation added to SPEC
647
+ - [ ] @CODE/@TEST TAGs point to correct locations
648
+ - [ ] @SPEC TAG references updated if files reorganized
649
+ - [ ] HISTORY section updated if version changed
650
+ - [ ] No spec-code divergence remains
651
+
652
+ ---
653
+
333
654
  ## function
334
655
 
335
656
  - **Automatic Document Synchronization**: The doc-syncer agent performs Living Document synchronization and @TAG updates. Optionally implements the PR Ready transition only in team mode.
657
+ - **SPEC-Code Alignment**: doc-syncer verifies that SPEC documents match implemented code and updates them when changes are detected.
336
658
 
337
659
  ## Synchronization output
338
660
 
@@ -590,6 +912,85 @@ Report synchronization results in a structured format:
590
912
  3. Orphan TAG cleanup
591
913
  ```
592
914
 
915
+ ## 🎯 PR Merge Strategy Selection (DECISION POINT 2)
916
+
917
+ After document synchronization completes successfully, Alfred checks team mode and invokes AskUserQuestion for PR merge strategy:
918
+
919
+ ```python
920
+ AskUserQuestion(
921
+ questions=[
922
+ {
923
+ "question": "Document synchronization complete. How would you like to handle the PR?",
924
+ "header": "PR Merge Strategy",
925
+ "multiSelect": false,
926
+ "options": [
927
+ {
928
+ "label": "🤖 Auto-Merge (Recommended)",
929
+ "description": "Automatically merge PR and clean up branch (team mode)"
930
+ },
931
+ {
932
+ "label": "📋 Manual Review",
933
+ "description": "Keep PR in Ready state for manual review and merge"
934
+ },
935
+ {
936
+ "label": "✏️ Keep as Draft",
937
+ "description": "Maintain PR in draft state for further refinement"
938
+ },
939
+ {
940
+ "label": "🔄 New Cycle",
941
+ "description": "Save changes and start new feature (skip PR for now)"
942
+ }
943
+ ]
944
+ }
945
+ ]
946
+ )
947
+ ```
948
+
949
+ **Response Processing**:
950
+ - **🤖 Auto-Merge** (`answers["0"] === "Auto-Merge"`) → Execute PR auto-merge with CI checks, update develop branch
951
+ - **📋 Manual Review** (`answers["0"] === "Manual"`) → Transition PR to Ready state, notify reviewers
952
+ - **✏️ Keep as Draft** (`answers["0"] === "Draft"`) → Leave PR in draft, ready for refinement
953
+ - **🔄 New Cycle** (`answers["0"] === "New"`) → Skip PR handling, proceed to next feature planning
954
+
955
+ ---
956
+
957
+ ## Final Step
958
+
959
+ After PR strategy is confirmed, Alfred invokes AskUserQuestion to ask the user what to do next:
960
+
961
+ ```python
962
+ AskUserQuestion(
963
+ questions=[
964
+ {
965
+ "question": "Documentation synchronization complete. What would you like to do next?",
966
+ "header": "Next Steps",
967
+ "multiSelect": false,
968
+ "options": [
969
+ {
970
+ "label": "📋 Create Next SPEC",
971
+ "description": "Start new feature planning with /alfred:1-plan"
972
+ },
973
+ {
974
+ "label": "📤 Merge PR",
975
+ "description": "Review and merge PR to develop branch"
976
+ },
977
+ {
978
+ "label": "🔄 Start New Session",
979
+ "description": "Execute /clear for fresh session (recommended for performance)"
980
+ }
981
+ ]
982
+ }
983
+ ]
984
+ )
985
+ ```
986
+
987
+ **User Responses**:
988
+ - **📋 Create Next SPEC**: Proceed to `/alfred:1-plan` for creating next SPEC
989
+ - **📤 Merge PR**: Manual PR review and merge on GitHub
990
+ - **🔄 Start New Session**: Execute `/clear` to start fresh session (recommended for performance)
991
+
992
+ ---
993
+
593
994
  ## Next steps guidance
594
995
 
595
996
  ### Development cycle complete
@@ -670,7 +1071,7 @@ Report synchronization results in a structured format:
670
1071
 
671
1072
  ## 🧠 Context Management
672
1073
 
673
- > For more information: `.moai/memory/development-guide.md` - see section "Context Engineering"
1074
+ > For more information: Skill("moai-alfred-dev-guide") - see section "Context Engineering"
674
1075
 
675
1076
  ### Core strategy of this command
676
1077
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: alfred:9-feedback
3
- description: "Interactive GitHub Issue creation - Step-by-step dialog to create issues without command arguments"
3
+ description: "Create GitHub issues interactively"
4
4
  allowed-tools:
5
5
  - Bash(gh:*)
6
6
  - Task