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
@@ -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**:
@@ -314,6 +316,170 @@ After reviewing your sync plan, `AskUserQuestion tool (documented in moai-alfred
314
316
 
315
317
  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
318
 
319
+ ---
320
+
321
+ ### 2.0.5 Domain-Based Sync Routing (Automatic - During Sync)
322
+
323
+ **Purpose**: Route documentation sync to domain-specific experts based on changed files
324
+
325
+ **When to run**: During doc-syncer execution, after analyzing git changes
326
+
327
+ **Detection Logic**:
328
+
329
+ Alfred analyzes changed files to determine which domains were modified:
330
+
331
+ ```bash
332
+ # Get list of changed files
333
+ git diff --name-only HEAD~1 HEAD
334
+
335
+ # Domain detection by file patterns
336
+ ```
337
+
338
+ **File Pattern → Domain Mapping**:
339
+
340
+ | File Patterns | Domain | Sync Focus |
341
+ |---------------|--------|-----------|
342
+ | `src/components/*`, `src/pages/*`, `*.tsx`, `*.jsx`, `*.vue` | Frontend | Component documentation, Storybook, UI architecture |
343
+ | `src/api/*`, `src/models/*`, `src/routes/*`, `src/services/*` | Backend | API documentation (OpenAPI), schema docs, error handling |
344
+ | `Dockerfile`, `docker-compose.yml`, `.github/workflows/*`, `terraform/*`, `k8s/*` | DevOps | Deployment docs, CI/CD status, infrastructure diagrams |
345
+ | `src/database/*`, `migrations/*`, `*.sql`, `schema/*` | Database | Schema documentation, migration logs, query optimization |
346
+ | `notebooks/*`, `src/pipelines/*`, `*.ipynb`, `src/models/ml/*` | Data Science | Pipeline documentation, model cards, data validation |
347
+ | `src/mobile/*`, `ios/*`, `android/*`, `*.swift`, `*.kt` | Mobile | Platform-specific docs, app lifecycle, native modules |
348
+
349
+ **Automatic Invocation Pattern**:
350
+
351
+ ```python
352
+ # Pseudo-code for domain detection from git changes
353
+ changed_files = git_diff("HEAD~1", "HEAD")
354
+
355
+ detected_domains = []
356
+ if any(".tsx" in f or ".jsx" in f or "src/components/" in f for f in changed_files):
357
+ detected_domains.append("frontend")
358
+ if any("src/api/" in f or "src/models/" in f or "src/routes/" in f for f in changed_files):
359
+ detected_domains.append("backend")
360
+ if any("Dockerfile" in f or ".github/workflows/" in f or "docker-compose" in f for f in changed_files):
361
+ detected_domains.append("devops")
362
+ # ... repeat for all domains
363
+
364
+ # Invoke domain-specific sync for each detected domain
365
+ for domain in detected_domains:
366
+ Task(
367
+ subagent_type="Explore",
368
+ prompt=f"Generate domain-specific sync report for {domain} changes"
369
+ )
370
+ ```
371
+
372
+ **Example Invocation** (Frontend + Backend detected):
373
+
374
+ ```python
375
+ # Frontend sync
376
+ Task(
377
+ subagent_type="Explore",
378
+ prompt="""You are frontend-expert providing sync documentation.
379
+
380
+ Changed Files: [src/components/Dashboard.tsx, src/pages/Home.vue]
381
+
382
+ Provide frontend-specific documentation:
383
+ 1. Component documentation updates
384
+ 2. Storybook story generation
385
+ 3. UI architecture diagram updates
386
+ 4. Accessibility compliance notes
387
+
388
+ Output format: Markdown document for .moai/reports/sync-frontend.md"""
389
+ )
390
+
391
+ # Backend sync
392
+ Task(
393
+ subagent_type="Explore",
394
+ prompt="""You are backend-expert providing sync documentation.
395
+
396
+ Changed Files: [src/api/auth.py, src/models/user.py, src/routes/users.py]
397
+
398
+ Provide backend-specific documentation:
399
+ 1. OpenAPI spec generation
400
+ 2. Schema documentation updates
401
+ 3. Error handling documentation
402
+ 4. API endpoint examples
403
+
404
+ Output format: Markdown document for .moai/reports/sync-backend.md"""
405
+ )
406
+ ```
407
+
408
+ **Output Storage Structure**:
409
+
410
+ ```
411
+ .moai/reports/
412
+ ├── sync-report-2025-10-23.md # Combined sync report
413
+ ├── sync-frontend-2025-10-23.md # Frontend-specific sync
414
+ ├── sync-backend-2025-10-23.md # Backend-specific sync
415
+ └── sync-devops-2025-10-23.md # DevOps-specific sync
416
+ ```
417
+
418
+ **Combined Sync Report Format**:
419
+
420
+ ```markdown
421
+ ## 📚 Documentation Sync Report - 2025-10-23
422
+
423
+ ### Changed Files Summary
424
+ - Frontend: 3 files (components, pages)
425
+ - Backend: 5 files (api, models, routes)
426
+ - DevOps: 1 file (Dockerfile)
427
+
428
+ ### Domain-Specific Sync Results
429
+
430
+ #### 🎨 Frontend Sync
431
+ - ✅ Component documentation: Dashboard.tsx documented
432
+ - ✅ Storybook stories: 2 stories generated
433
+ - ✅ UI architecture: Component hierarchy diagram updated
434
+ - 📄 Details: [sync-frontend-2025-10-23.md](./sync-frontend-2025-10-23.md)
435
+
436
+ #### ⚙️ Backend Sync
437
+ - ✅ OpenAPI spec: /api/auth endpoints documented
438
+ - ✅ Schema documentation: User model fields updated
439
+ - ✅ Error handling: 401/403 response examples added
440
+ - 📄 Details: [sync-backend-2025-10-23.md](./sync-backend-2025-10-23.md)
441
+
442
+ #### 🚀 DevOps Sync
443
+ - ✅ Dockerfile: Multi-stage build documented
444
+ - ✅ Deployment: Railway configuration updated
445
+ - 📄 Details: [sync-devops-2025-10-23.md](./sync-devops-2025-10-23.md)
446
+
447
+ ### @TAG Verification
448
+ - ✅ All changed files have @TAG references
449
+ - ✅ SPEC → CODE → TEST → DOC chain intact
450
+
451
+ ### Next Steps
452
+ - Review domain-specific sync reports
453
+ - Update README.md with new features
454
+ - Create PR for documentation changes
455
+ ```
456
+
457
+ **Integration with doc-syncer**:
458
+
459
+ ```python
460
+ # doc-syncer orchestrates domain-specific sync
461
+ Task(
462
+ subagent_type="doc-syncer",
463
+ prompt="""You are doc-syncer agent.
464
+
465
+ DOMAIN SYNC RESULTS:
466
+ {domain_sync_results}
467
+
468
+ Consolidate all domain-specific sync reports into master sync report.
469
+ Ensure @TAG chain integrity across all domains.
470
+ Update .moai/reports/sync-report-{date}.md
471
+
472
+ $ARGUMENTS"""
473
+ )
474
+ ```
475
+
476
+ **Graceful Degradation**:
477
+ - If no domain detected → Standard sync (no domain-specific reports)
478
+ - If domain expert unavailable → Use generic sync templates
479
+ - Multi-domain changes → Generate separate reports, combine into master
480
+
481
+ ---
482
+
317
483
  ### Phase 2 Details: SPEC Completion Processing (Automatic)
318
484
 
319
485
  The doc-syncer agent automatically determines whether TDD implementation is complete and updates SPEC metadata.
@@ -330,9 +496,132 @@ The doc-syncer agent automatically determines whether TDD implementation is comp
330
496
 
331
497
  **If conditions are not met**: Phase 2 detailed work is automatically skipped
332
498
 
499
+ ---
500
+
501
+ ### Phase 2-1: SPEC Document Synchronization (CRITICAL)
502
+
503
+ **IMPORTANT**: Any code or file changes MUST be reflected in SPEC documents to maintain specification alignment.
504
+
505
+ #### When to synchronize SPEC documents:
506
+
507
+ 1. **After code modifications**:
508
+ - Functional changes to implemented features
509
+ - Bug fixes that alter expected behavior
510
+ - Performance optimizations with observable changes
511
+ - API/function signature changes
512
+ - New dependencies or external integrations
513
+
514
+ 2. **After requirement clarifications**:
515
+ - Acceptance criteria refinements
516
+ - Edge case discoveries during implementation
517
+ - User feedback incorporation
518
+ - Security/compliance adjustments
519
+
520
+ 3. **After structural changes**:
521
+ - File organization or module restructuring
522
+ - New configuration options
523
+ - Breaking API changes
524
+ - Database schema modifications
525
+
526
+ #### SPEC documents requiring update:
527
+
528
+ All files in `.moai/specs/SPEC-{ID}/` must be synchronized:
529
+
530
+ - **spec.md**: Update EARS requirements if implementation differs from specification
531
+ - **plan.md**: Revise implementation strategy if approach changed
532
+ - **acceptance.md**: Update acceptance criteria if new test cases or edge cases discovered
533
+
534
+ #### Synchronization rules:
535
+
536
+ **Code ↔ SPEC Comparison**:
537
+ ```
538
+ 1. Review Git diff for changed files
539
+ 2. Identify functional impacts:
540
+ ├─ Signature changes (parameters, return values)
541
+ ├─ Behavior changes (logic flow, edge cases)
542
+ ├─ Performance characteristics (latency, throughput changes)
543
+ └─ External dependencies (new APIs, services)
544
+ 3. Map changes to SPEC requirements:
545
+ ├─ Verify each changed function matches EARS statement
546
+ ├─ Check if acceptance criteria still valid
547
+ └─ Identify any spec-to-code divergence
548
+ 4. Update SPEC documents:
549
+ ├─ Correct EARS statements to match actual implementation
550
+ ├─ Add discovered edge cases to acceptance criteria
551
+ ├─ Update plan.md with implementation changes
552
+ └─ Maintain TAG references (@SPEC, @CODE, @TEST consistency)
553
+ ```
554
+
555
+ #### Example: When synchronization is needed
556
+
557
+ **Scenario 1: Bug Fix Changes Behavior**
558
+ ```
559
+ Git change: Fixed database connection retry logic
560
+ - Was: Max 3 retries with 1-second delay
561
+ - Now: Max 5 retries with exponential backoff
562
+
563
+ SPEC update required:
564
+ - spec.md: Update EARS statement for retry behavior
565
+ - acceptance.md: Add test case for exponential backoff
566
+ - Update @CODE TAG location if function moved
567
+ ```
568
+
569
+ **Scenario 2: API Signature Changes**
570
+ ```
571
+ Git change: Refactored authentication function signature
572
+ - Was: validate_token(token: str) -> bool
573
+ - Now: validate_token(token: str, ttl: int = 3600) -> dict
574
+
575
+ SPEC update required:
576
+ - spec.md: Update function requirements for new TTL parameter
577
+ - acceptance.md: Add test cases for TTL validation
578
+ - plan.md: Document reason for signature change
579
+ ```
580
+
581
+ **Scenario 3: New Edge Cases Discovered**
582
+ ```
583
+ Git change: Added null-check validation during testing
584
+ - Discovered: Special handling needed for empty strings
585
+
586
+ SPEC update required:
587
+ - spec.md: Add EARS statement for empty string edge case
588
+ - acceptance.md: Add test case for empty string handling
589
+ - Link with @TEST TAG from test file
590
+ ```
591
+
592
+ #### SPEC-Code Divergence Detection:
593
+
594
+ **Anti-pattern: Code without matching SPEC**
595
+ ```
596
+ ❌ WRONG: Code changes exist but SPEC documents unchanged
597
+ - Function behavior diverges from specification
598
+ - Acceptance criteria becomes inaccurate
599
+ - @TAG chain breaks (CODE exists without matching SPEC reference)
600
+
601
+ ✅ CORRECT: Code changes synchronized to SPEC
602
+ - SPEC documents updated to match implementation
603
+ - All EARS statements verified against actual code
604
+ - @TAG chain maintained: SPEC ↔ CODE ↔ TEST ↔ DOC
605
+ ```
606
+
607
+ #### SPEC Synchronization Checklist (doc-syncer responsibility):
608
+
609
+ Before marking sync as complete:
610
+ - [ ] All changed code files reviewed against SPEC
611
+ - [ ] EARS statements match implementation behavior
612
+ - [ ] Acceptance criteria valid for current code
613
+ - [ ] Edge cases discovered during implementation added to SPEC
614
+ - [ ] @CODE/@TEST TAGs point to correct locations
615
+ - [ ] @SPEC TAG references updated if files reorganized
616
+ - [ ] HISTORY section updated if version changed
617
+ - [ ] No spec-code divergence remains
618
+
619
+ ---
620
+
333
621
  ## function
334
622
 
335
623
  - **Automatic Document Synchronization**: The doc-syncer agent performs Living Document synchronization and @TAG updates. Optionally implements the PR Ready transition only in team mode.
624
+ - **SPEC-Code Alignment**: doc-syncer verifies that SPEC documents match implemented code and updates them when changes are detected.
336
625
 
337
626
  ## Synchronization output
338
627
 
@@ -590,6 +879,43 @@ Report synchronization results in a structured format:
590
879
  3. Orphan TAG cleanup
591
880
  ```
592
881
 
882
+ ## Final Step
883
+
884
+ After document synchronization completes, Alfred automatically invokes AskUserQuestion to ask the user what to do next:
885
+
886
+ ```python
887
+ AskUserQuestion(
888
+ questions=[
889
+ {
890
+ "question": "문서 동기화가 완료되었습니다. 다음으로 뭘 하시겠습니까?",
891
+ "header": "다음 단계",
892
+ "multiSelect": false,
893
+ "options": [
894
+ {
895
+ "label": "📋 다음 스펙 작성",
896
+ "description": "/alfred:1-plan으로 새로운 기능 SPEC 작성"
897
+ },
898
+ {
899
+ "label": "📤 PR 병합",
900
+ "description": "GitHub에서 PR 검토 및 병합 진행"
901
+ },
902
+ {
903
+ "label": "🔄 새 세션 시작",
904
+ "description": "성능 최적화를 위해 /clear 실행"
905
+ }
906
+ ]
907
+ }
908
+ ]
909
+ )
910
+ ```
911
+
912
+ **User Responses**:
913
+ - **📋 다음 스펙 작성**: Proceed to `/alfred:1-plan` for creating next SPEC
914
+ - **📤 PR 병합**: Manual PR review and merge on GitHub
915
+ - **🔄 새 세션 시작**: Execute `/clear` to start fresh session (recommended for performance)
916
+
917
+ ---
918
+
593
919
  ## Next steps guidance
594
920
 
595
921
  ### Development cycle complete
@@ -670,7 +996,7 @@ Report synchronization results in a structured format:
670
996
 
671
997
  ## 🧠 Context Management
672
998
 
673
- > For more information: `.moai/memory/development-guide.md` - see section "Context Engineering"
999
+ > For more information: Skill("moai-alfred-dev-guide") - see section "Context Engineering"
674
1000
 
675
1001
  ### Core strategy of this command
676
1002
 
@@ -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
@@ -1,7 +1,12 @@
1
1
  #!/usr/bin/env python3
2
+ # @CODE:OFFLINE-001 | SPEC: SPEC-OFFLINE-SUPPORT-001 | TEST: tests/unit/test_network_detection.py
2
3
  """Project metadata utilities
3
4
 
4
5
  Project information inquiry (language, Git, SPEC progress, etc.)
6
+
7
+ Network detection and caching support:
8
+ - is_network_available(): Check network connectivity with timeout
9
+ - get_package_version_info(): Get package version with offline cache support
5
10
  """
6
11
 
7
12
  import json
@@ -70,6 +75,7 @@ def find_project_root(start_path: str | Path = ".") -> Path:
70
75
 
71
76
  class TimeoutError(Exception):
72
77
  """Signal-based timeout exception"""
78
+
73
79
  pass
74
80
 
75
81
 
@@ -86,6 +92,7 @@ def timeout_handler(seconds: int):
86
92
  Raises:
87
93
  TimeoutError: If operation exceeds timeout
88
94
  """
95
+
89
96
  def _handle_timeout(signum, frame):
90
97
  raise TimeoutError(f"Operation timed out after {seconds} seconds")
91
98
 
@@ -427,19 +434,10 @@ def get_version_check_config(cwd: str) -> dict[str, Any]:
427
434
  - REFACTOR: Add validation and error handling
428
435
  """
429
436
  # TTL mapping by frequency
430
- TTL_BY_FREQUENCY = {
431
- "always": 0,
432
- "daily": 24,
433
- "weekly": 168,
434
- "never": float('inf')
435
- }
437
+ ttl_by_frequency = {"always": 0, "daily": 24, "weekly": 168, "never": float("inf")}
436
438
 
437
439
  # Default configuration
438
- defaults = {
439
- "enabled": True,
440
- "frequency": "daily",
441
- "cache_ttl_hours": 24
442
- }
440
+ defaults = {"enabled": True, "frequency": "daily", "cache_ttl_hours": 24}
443
441
 
444
442
  # Find project root to ensure we read config from correct location
445
443
  project_root = find_project_root(cwd)
@@ -461,21 +459,17 @@ def get_version_check_config(cwd: str) -> dict[str, Any]:
461
459
  frequency = moai_config.get("update_check_frequency", defaults["frequency"])
462
460
 
463
461
  # Validate frequency
464
- if frequency not in TTL_BY_FREQUENCY:
462
+ if frequency not in ttl_by_frequency:
465
463
  frequency = defaults["frequency"]
466
464
 
467
465
  # Calculate TTL from frequency
468
- cache_ttl_hours = TTL_BY_FREQUENCY[frequency]
466
+ cache_ttl_hours = ttl_by_frequency[frequency]
469
467
 
470
468
  # Allow explicit cache_ttl_hours override
471
469
  if "cache_ttl_hours" in version_check_config:
472
470
  cache_ttl_hours = version_check_config["cache_ttl_hours"]
473
471
 
474
- return {
475
- "enabled": enabled,
476
- "frequency": frequency,
477
- "cache_ttl_hours": cache_ttl_hours
478
- }
472
+ return {"enabled": enabled, "frequency": frequency, "cache_ttl_hours": cache_ttl_hours}
479
473
 
480
474
  except (OSError, json.JSONDecodeError, KeyError):
481
475
  # Config read or parse error - return defaults
@@ -613,13 +607,13 @@ def get_package_version_info(cwd: str = ".") -> dict[str, Any]:
613
607
  if spec and spec.loader:
614
608
  version_cache_module = importlib.util.module_from_spec(spec)
615
609
  spec.loader.exec_module(version_cache_module)
616
- VersionCache = version_cache_module.VersionCache
610
+ version_cache_class = version_cache_module.VersionCache
617
611
  else:
618
612
  # Skip caching if module can't be loaded
619
- VersionCache = None
620
- except (ImportError, OSError) as e:
613
+ version_cache_class = None
614
+ except (ImportError, OSError):
621
615
  # Graceful degradation: skip caching on import errors
622
- VersionCache = None
616
+ version_cache_class = None
623
617
 
624
618
  # 1. Find project root (ensure cache is always in correct location)
625
619
  # This prevents creating .moai/cache in wrong locations when hooks run
@@ -628,7 +622,7 @@ def get_package_version_info(cwd: str = ".") -> dict[str, Any]:
628
622
 
629
623
  # 2. Initialize cache (skip if VersionCache couldn't be imported)
630
624
  cache_dir = project_root / CACHE_DIR_NAME
631
- version_cache = VersionCache(cache_dir) if VersionCache else None
625
+ version_cache = version_cache_class(cache_dir) if version_cache_class else None
632
626
 
633
627
  # 2. Get current installed version first (needed for cache validation)
634
628
  current_version = "unknown"
@@ -641,7 +635,7 @@ def get_package_version_info(cwd: str = ".") -> dict[str, Any]:
641
635
  "current": "dev",
642
636
  "latest": "unknown",
643
637
  "update_available": False,
644
- "upgrade_command": ""
638
+ "upgrade_command": "",
645
639
  }
646
640
 
647
641
  # 3. Try to load from cache (fast path with version validation)
@@ -664,7 +658,7 @@ def get_package_version_info(cwd: str = ".") -> dict[str, Any]:
664
658
  "current": current_version,
665
659
  "latest": "unknown",
666
660
  "update_available": False,
667
- "upgrade_command": ""
661
+ "upgrade_command": "",
668
662
  }
669
663
 
670
664
  # 5. Check if version check is enabled in config
@@ -695,7 +689,9 @@ def get_package_version_info(cwd: str = ".") -> dict[str, Any]:
695
689
  release_url = project_urls.get("Changelog", "")
696
690
  if not release_url:
697
691
  # Fallback to GitHub releases URL pattern
698
- release_url = f"https://github.com/modu-ai/moai-adk/releases/tag/v{result['latest']}"
692
+ release_url = (
693
+ f"https://github.com/modu-ai/moai-adk/releases/tag/v{result['latest']}"
694
+ )
699
695
  result["release_notes_url"] = release_url
700
696
  except (KeyError, AttributeError, TypeError):
701
697
  result["release_notes_url"] = None
@@ -722,7 +718,9 @@ def get_package_version_info(cwd: str = ".") -> dict[str, Any]:
722
718
  result["upgrade_command"] = f"uv pip install --upgrade moai-adk>={result['latest']}"
723
719
 
724
720
  # Detect major version change
725
- result["is_major_update"] = is_major_version_change(result["current"], result["latest"])
721
+ result["is_major_update"] = is_major_version_change(
722
+ result["current"], result["latest"]
723
+ )
726
724
  else:
727
725
  result["is_major_update"] = False
728
726
  except (ValueError, AttributeError):