moai-adk 0.4.5__py3-none-any.whl → 0.20.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 (433) hide show
  1. moai_adk/__init__.py +1 -1
  2. moai_adk/__main__.py +74 -1
  3. moai_adk/cli/commands/__init__.py +1 -1
  4. moai_adk/cli/commands/analyze.py +119 -0
  5. moai_adk/cli/commands/backup.py +25 -1
  6. moai_adk/cli/commands/doctor.py +31 -5
  7. moai_adk/cli/commands/improve_user_experience.py +307 -0
  8. moai_adk/cli/commands/init.py +111 -10
  9. moai_adk/cli/commands/status.py +33 -3
  10. moai_adk/cli/commands/update.py +921 -130
  11. moai_adk/cli/commands/validate_links.py +120 -0
  12. moai_adk/cli/prompts/init_prompts.py +22 -87
  13. moai_adk/core/analysis/__init__.py +9 -0
  14. moai_adk/core/analysis/session_analyzer.py +388 -0
  15. moai_adk/core/analysis/tag_chain_analyzer.py +344 -0
  16. moai_adk/core/analysis/tag_chain_repair.py +879 -0
  17. moai_adk/core/config/__init__.py +19 -0
  18. moai_adk/core/config/migration.py +235 -0
  19. moai_adk/core/git/__init__.py +1 -1
  20. moai_adk/core/git/branch.py +1 -1
  21. moai_adk/core/git/commit.py +1 -1
  22. moai_adk/core/git/manager.py +1 -1
  23. moai_adk/core/issue_creator.py +313 -0
  24. moai_adk/core/mcp/setup.py +56 -0
  25. moai_adk/core/mcp/setup_old.py +296 -0
  26. moai_adk/core/project/backup_utils.py +1 -1
  27. moai_adk/core/project/checker.py +2 -2
  28. moai_adk/core/project/detector.py +211 -12
  29. moai_adk/core/project/initializer.py +85 -15
  30. moai_adk/core/project/phase_executor.py +76 -13
  31. moai_adk/core/project/validator.py +13 -13
  32. moai_adk/core/quality/__init__.py +1 -1
  33. moai_adk/core/quality/trust_checker.py +1 -1
  34. moai_adk/core/quality/validators/__init__.py +1 -1
  35. moai_adk/core/quality/validators/base_validator.py +1 -1
  36. moai_adk/core/tags/__init__.py +86 -0
  37. moai_adk/core/tags/auto_corrector.py +693 -0
  38. moai_adk/core/tags/ci_validator.py +463 -0
  39. moai_adk/core/tags/cli.py +283 -0
  40. moai_adk/core/tags/generator.py +109 -0
  41. moai_adk/core/tags/inserter.py +99 -0
  42. moai_adk/core/tags/mapper.py +126 -0
  43. moai_adk/core/tags/parser.py +76 -0
  44. moai_adk/core/tags/policy_validator.py +580 -0
  45. moai_adk/core/tags/pre_commit_validator.py +421 -0
  46. moai_adk/core/tags/reporter.py +956 -0
  47. moai_adk/core/tags/rollback_manager.py +525 -0
  48. moai_adk/core/tags/tags.py +149 -0
  49. moai_adk/core/tags/validator.py +897 -0
  50. moai_adk/core/template/__init__.py +1 -1
  51. moai_adk/core/template/backup.py +1 -1
  52. moai_adk/core/template/merger.py +50 -1
  53. moai_adk/core/template/processor.py +119 -13
  54. moai_adk/core/template_engine.py +268 -0
  55. moai_adk/templates/.claude/agents/alfred/backend-expert.md +348 -0
  56. moai_adk/templates/.claude/agents/alfred/cc-manager.md +209 -944
  57. moai_adk/templates/.claude/agents/alfred/database-expert.md +352 -0
  58. moai_adk/templates/.claude/agents/alfred/debug-helper.md +34 -5
  59. moai_adk/templates/.claude/agents/alfred/devops-expert.md +464 -0
  60. moai_adk/templates/.claude/agents/alfred/doc-syncer.md +38 -8
  61. moai_adk/templates/.claude/agents/alfred/format-expert.md +469 -0
  62. moai_adk/templates/.claude/agents/alfred/frontend-expert.md +357 -0
  63. moai_adk/templates/.claude/agents/alfred/git-manager.md +128 -9
  64. moai_adk/templates/.claude/agents/alfred/implementation-planner.md +104 -6
  65. moai_adk/templates/.claude/agents/alfred/project-manager.md +88 -16
  66. moai_adk/templates/.claude/agents/alfred/quality-gate.md +36 -9
  67. moai_adk/templates/.claude/agents/alfred/security-expert.md +270 -0
  68. moai_adk/templates/.claude/agents/alfred/skill-factory.md +865 -0
  69. moai_adk/templates/.claude/agents/alfred/spec-builder.md +214 -43
  70. moai_adk/templates/.claude/agents/alfred/tag-agent.md +111 -9
  71. moai_adk/templates/.claude/agents/alfred/tdd-implementer.md +309 -160
  72. moai_adk/templates/.claude/agents/alfred/trust-checker.md +36 -7
  73. moai_adk/templates/.claude/agents/alfred/ui-ux-expert.md +605 -0
  74. moai_adk/templates/.claude/commands/alfred/0-project.md +393 -966
  75. moai_adk/templates/.claude/commands/alfred/1-plan.md +651 -367
  76. moai_adk/templates/.claude/commands/alfred/2-run.md +388 -241
  77. moai_adk/templates/.claude/commands/alfred/3-sync.md +1921 -410
  78. moai_adk/templates/.claude/commands/alfred/9-feedback.md +153 -0
  79. moai_adk/templates/.claude/commands/alfred/release-new.md +3604 -0
  80. moai_adk/templates/.claude/hooks/alfred/core/project.py +484 -20
  81. moai_adk/templates/.claude/hooks/alfred/core/timeout.py +136 -0
  82. moai_adk/templates/.claude/hooks/alfred/core/ttl_cache.py +108 -0
  83. moai_adk/templates/.claude/hooks/alfred/core/version_cache.py +198 -0
  84. moai_adk/templates/.claude/hooks/alfred/handlers/__init__.py +14 -6
  85. moai_adk/templates/.claude/hooks/alfred/post_tool__enable_streaming_ui.py +50 -0
  86. moai_adk/templates/.claude/hooks/alfred/post_tool__log_changes.py +93 -0
  87. moai_adk/templates/.claude/hooks/alfred/post_tool__tag_auto_corrector.py +407 -0
  88. moai_adk/templates/.claude/hooks/alfred/pre_tool__auto_checkpoint.py +99 -0
  89. moai_adk/templates/.claude/hooks/alfred/pre_tool__realtime_tag_monitor.py +335 -0
  90. moai_adk/templates/.claude/hooks/alfred/pre_tool__tag_policy_validator.py +325 -0
  91. moai_adk/templates/.claude/hooks/alfred/session_end__cleanup.py +93 -0
  92. moai_adk/templates/.claude/hooks/alfred/session_start__auto_cleanup.py +580 -0
  93. moai_adk/templates/.claude/hooks/alfred/session_start__show_project_info.py +298 -0
  94. moai_adk/templates/.claude/hooks/alfred/shared/core/__init__.py +170 -0
  95. moai_adk/templates/.claude/hooks/alfred/{core → shared/core}/checkpoint.py +3 -3
  96. moai_adk/templates/.claude/hooks/alfred/{core → shared/core}/context.py +5 -5
  97. moai_adk/templates/.claude/hooks/alfred/shared/core/project.py +749 -0
  98. moai_adk/templates/.claude/hooks/alfred/shared/core/tags.py +230 -0
  99. moai_adk/templates/.claude/hooks/alfred/shared/core/version_cache.py +198 -0
  100. moai_adk/templates/.claude/hooks/alfred/shared/handlers/__init__.py +21 -0
  101. moai_adk/templates/.claude/hooks/alfred/shared/handlers/daily_analysis.py +351 -0
  102. moai_adk/templates/.claude/hooks/alfred/shared/handlers/notification.py +154 -0
  103. moai_adk/templates/.claude/hooks/alfred/shared/handlers/session.py +174 -0
  104. moai_adk/templates/.claude/hooks/alfred/shared/handlers/tool.py +87 -0
  105. moai_adk/templates/.claude/hooks/alfred/shared/handlers/user.py +61 -0
  106. moai_adk/templates/.claude/hooks/alfred/user_prompt__jit_load_docs.py +111 -0
  107. moai_adk/templates/.claude/hooks/alfred/utils/__init__.py +1 -0
  108. moai_adk/templates/.claude/hooks/alfred/utils/hook_config.py +94 -0
  109. moai_adk/templates/.claude/hooks/alfred/utils/timeout.py +161 -0
  110. moai_adk/templates/.claude/output-styles/alfred/alfred-moai-adk-beginner.md +267 -0
  111. moai_adk/templates/.claude/output-styles/alfred/keating-personal-tutor.md +440 -0
  112. moai_adk/templates/.claude/output-styles/alfred/r2d2-agentic-coding.md +583 -0
  113. moai_adk/templates/.claude/settings.json +96 -14
  114. moai_adk/templates/.claude/skills/moai-alfred-agent-guide/SKILL.md +70 -0
  115. moai_adk/templates/.claude/skills/moai-alfred-agent-guide/examples.md +62 -0
  116. moai_adk/templates/.claude/skills/moai-alfred-agent-guide/reference.md +242 -0
  117. moai_adk/templates/.claude/skills/moai-alfred-ask-user-questions/SKILL.md +237 -0
  118. moai_adk/templates/.claude/skills/moai-alfred-ask-user-questions/examples.md +871 -0
  119. moai_adk/templates/.claude/skills/moai-alfred-ask-user-questions/reference.md +653 -0
  120. moai_adk/templates/.claude/skills/moai-alfred-clone-pattern/README.md +162 -0
  121. moai_adk/templates/.claude/skills/moai-alfred-clone-pattern/SKILL.md +227 -0
  122. moai_adk/templates/.claude/skills/moai-alfred-clone-pattern/examples.md +354 -0
  123. moai_adk/templates/.claude/skills/moai-alfred-clone-pattern/reference.md +158 -0
  124. moai_adk/templates/.claude/skills/moai-alfred-code-reviewer/SKILL.md +179 -79
  125. moai_adk/templates/.claude/skills/moai-alfred-code-reviewer/examples.md +117 -0
  126. moai_adk/templates/.claude/skills/moai-alfred-code-reviewer/scripts/pre-review-check.sh +62 -0
  127. moai_adk/templates/.claude/skills/moai-alfred-config-schema/SKILL.md +132 -0
  128. moai_adk/templates/.claude/skills/moai-alfred-config-schema/examples.md +28 -0
  129. moai_adk/templates/.claude/skills/moai-alfred-config-schema/reference.md +444 -0
  130. moai_adk/templates/.claude/skills/moai-alfred-context-budget/SKILL.md +62 -0
  131. moai_adk/templates/.claude/skills/moai-alfred-context-budget/examples.md +28 -0
  132. moai_adk/templates/.claude/skills/moai-alfred-context-budget/reference.md +405 -0
  133. moai_adk/templates/.claude/skills/moai-alfred-dev-guide/SKILL.md +51 -0
  134. moai_adk/templates/.claude/skills/moai-alfred-dev-guide/examples.md +355 -0
  135. moai_adk/templates/.claude/skills/moai-alfred-dev-guide/reference.md +239 -0
  136. moai_adk/templates/.claude/skills/moai-alfred-expertise-detection/SKILL.md +323 -0
  137. moai_adk/templates/.claude/skills/moai-alfred-expertise-detection/examples.md +286 -0
  138. moai_adk/templates/.claude/skills/moai-alfred-expertise-detection/reference.md +126 -0
  139. moai_adk/templates/.claude/skills/moai-alfred-issue-labels/SKILL.md +229 -0
  140. moai_adk/templates/.claude/skills/moai-alfred-issue-labels/examples.md +4 -0
  141. moai_adk/templates/.claude/skills/moai-alfred-issue-labels/reference.md +150 -0
  142. moai_adk/templates/.claude/skills/moai-alfred-language-detection/SKILL.md +87 -73
  143. moai_adk/templates/.claude/skills/moai-alfred-language-detection/examples.md +29 -0
  144. moai_adk/templates/.claude/skills/moai-alfred-language-detection/reference.md +28 -0
  145. moai_adk/templates/.claude/skills/moai-alfred-personas/README.md +42 -0
  146. moai_adk/templates/.claude/skills/moai-alfred-personas/SKILL.md +429 -0
  147. moai_adk/templates/.claude/skills/moai-alfred-personas/examples.md +520 -0
  148. moai_adk/templates/.claude/skills/moai-alfred-personas/reference.md +405 -0
  149. moai_adk/templates/.claude/skills/moai-alfred-practices/SKILL.md +89 -0
  150. moai_adk/templates/.claude/skills/moai-alfred-practices/examples.md +122 -0
  151. moai_adk/templates/.claude/skills/moai-alfred-practices/reference.md +369 -0
  152. moai_adk/templates/.claude/skills/moai-alfred-proactive-suggestions/SKILL.md +508 -0
  153. moai_adk/templates/.claude/skills/moai-alfred-proactive-suggestions/examples.md +481 -0
  154. moai_adk/templates/.claude/skills/moai-alfred-proactive-suggestions/reference.md +100 -0
  155. moai_adk/templates/.claude/skills/moai-alfred-rules/SKILL.md +77 -0
  156. moai_adk/templates/.claude/skills/moai-alfred-rules/examples.md +265 -0
  157. moai_adk/templates/.claude/skills/moai-alfred-rules/reference.md +539 -0
  158. moai_adk/templates/.claude/skills/moai-alfred-session-state/SKILL.md +320 -0
  159. moai_adk/templates/.claude/skills/moai-alfred-session-state/examples.md +4 -0
  160. moai_adk/templates/.claude/skills/moai-alfred-session-state/reference.md +84 -0
  161. moai_adk/templates/.claude/skills/moai-alfred-spec-authoring/README.md +137 -0
  162. moai_adk/templates/.claude/skills/moai-alfred-spec-authoring/SKILL.md +219 -0
  163. moai_adk/templates/.claude/skills/moai-alfred-spec-authoring/examples/validate-spec.sh +161 -0
  164. moai_adk/templates/.claude/skills/moai-alfred-spec-authoring/examples.md +541 -0
  165. moai_adk/templates/.claude/skills/moai-alfred-spec-authoring/reference.md +622 -0
  166. moai_adk/templates/.claude/skills/moai-alfred-todowrite-pattern/SKILL.md +19 -0
  167. moai_adk/templates/.claude/skills/moai-alfred-todowrite-pattern/examples.md +4 -0
  168. moai_adk/templates/.claude/skills/moai-alfred-todowrite-pattern/reference.md +211 -0
  169. moai_adk/templates/.claude/skills/moai-alfred-workflow/SKILL.md +288 -0
  170. moai_adk/templates/.claude/skills/moai-cc-agents/SKILL.md +269 -0
  171. moai_adk/templates/.claude/skills/moai-cc-agents/templates/agent-template.md +32 -0
  172. moai_adk/templates/.claude/skills/moai-cc-claude-md/SKILL.md +298 -0
  173. moai_adk/templates/.claude/skills/moai-cc-claude-md/templates/CLAUDE-template.md +26 -0
  174. moai_adk/templates/.claude/skills/moai-cc-commands/SKILL.md +307 -0
  175. moai_adk/templates/.claude/skills/moai-cc-commands/templates/command-template.md +21 -0
  176. moai_adk/templates/.claude/skills/moai-cc-hooks/SKILL.md +252 -0
  177. moai_adk/templates/.claude/skills/moai-cc-hooks/scripts/pre-bash-check.sh +19 -0
  178. moai_adk/templates/.claude/skills/moai-cc-hooks/scripts/preserve-permissions.sh +19 -0
  179. moai_adk/templates/.claude/skills/moai-cc-hooks/scripts/validate-bash-command.py +24 -0
  180. moai_adk/templates/.claude/skills/moai-cc-mcp-plugins/SKILL.md +199 -0
  181. moai_adk/templates/.claude/skills/moai-cc-mcp-plugins/templates/settings-mcp-template.json +39 -0
  182. moai_adk/templates/.claude/skills/moai-cc-memory/SKILL.md +316 -0
  183. moai_adk/templates/.claude/skills/moai-cc-memory/templates/session-summary-template.md +18 -0
  184. moai_adk/templates/.claude/skills/moai-cc-settings/SKILL.md +263 -0
  185. moai_adk/templates/.claude/skills/moai-cc-settings/templates/settings-complete-template.json +30 -0
  186. moai_adk/templates/.claude/skills/moai-cc-skill-factory/CHECKLIST.md +482 -0
  187. moai_adk/templates/.claude/skills/moai-cc-skill-factory/EXAMPLES.md +303 -0
  188. moai_adk/templates/.claude/skills/moai-cc-skill-factory/INTERACTIVE-DISCOVERY.md +524 -0
  189. moai_adk/templates/.claude/skills/moai-cc-skill-factory/METADATA.md +477 -0
  190. moai_adk/templates/.claude/skills/moai-cc-skill-factory/PARALLEL-ANALYSIS-REPORT.md +429 -0
  191. moai_adk/templates/.claude/skills/moai-cc-skill-factory/PYTHON-VERSION-MATRIX.md +391 -0
  192. moai_adk/templates/.claude/skills/moai-cc-skill-factory/SKILL-FACTORY-WORKFLOW.md +431 -0
  193. moai_adk/templates/.claude/skills/moai-cc-skill-factory/SKILL-UPDATE-ADVISOR.md +577 -0
  194. moai_adk/templates/.claude/skills/moai-cc-skill-factory/SKILL.md +273 -0
  195. moai_adk/templates/.claude/skills/moai-cc-skill-factory/STEP-BY-STEP-GUIDE.md +466 -0
  196. moai_adk/templates/.claude/skills/moai-cc-skill-factory/STRUCTURE.md +583 -0
  197. moai_adk/templates/.claude/skills/moai-cc-skill-factory/WEB-RESEARCH.md +526 -0
  198. moai_adk/templates/.claude/skills/moai-cc-skill-factory/reference.md +608 -0
  199. moai_adk/templates/.claude/skills/moai-cc-skill-factory/scripts/generate-structure.sh +328 -0
  200. moai_adk/templates/.claude/skills/moai-cc-skill-factory/scripts/validate-skill.sh +312 -0
  201. moai_adk/templates/.claude/skills/moai-cc-skill-factory/templates/SKILL_TEMPLATE.md +245 -0
  202. moai_adk/templates/.claude/skills/moai-cc-skill-factory/templates/examples-template.md +285 -0
  203. moai_adk/templates/.claude/skills/moai-cc-skill-factory/templates/reference-template.md +278 -0
  204. moai_adk/templates/.claude/skills/moai-cc-skill-factory/templates/scripts-template.sh +303 -0
  205. moai_adk/templates/.claude/skills/moai-cc-skills/SKILL.md +291 -0
  206. moai_adk/templates/.claude/skills/moai-cc-skills/templates/SKILL-template.md +15 -0
  207. moai_adk/templates/.claude/skills/moai-change-logger/SKILL.md +563 -0
  208. moai_adk/templates/.claude/skills/moai-design-systems/SKILL.md +802 -0
  209. moai_adk/templates/.claude/skills/moai-design-systems/examples.md +1238 -0
  210. moai_adk/templates/.claude/skills/moai-design-systems/reference.md +673 -0
  211. moai_adk/templates/.claude/skills/moai-domain-backend/SKILL.md +234 -43
  212. moai_adk/templates/.claude/skills/moai-domain-backend/examples.md +1633 -0
  213. moai_adk/templates/.claude/skills/moai-domain-backend/reference.md +660 -0
  214. moai_adk/templates/.claude/skills/moai-domain-cli-tool/SKILL.md +97 -69
  215. moai_adk/templates/.claude/skills/moai-domain-cli-tool/examples.md +29 -0
  216. moai_adk/templates/.claude/skills/moai-domain-cli-tool/reference.md +30 -0
  217. moai_adk/templates/.claude/skills/moai-domain-data-science/SKILL.md +97 -72
  218. moai_adk/templates/.claude/skills/moai-domain-data-science/examples.md +29 -0
  219. moai_adk/templates/.claude/skills/moai-domain-data-science/reference.md +30 -0
  220. moai_adk/templates/.claude/skills/moai-domain-database/SKILL.md +97 -74
  221. moai_adk/templates/.claude/skills/moai-domain-database/examples.md +29 -0
  222. moai_adk/templates/.claude/skills/moai-domain-database/reference.md +30 -0
  223. moai_adk/templates/.claude/skills/moai-domain-devops/SKILL.md +98 -74
  224. moai_adk/templates/.claude/skills/moai-domain-devops/examples.md +29 -0
  225. moai_adk/templates/.claude/skills/moai-domain-devops/reference.md +31 -0
  226. moai_adk/templates/.claude/skills/moai-domain-frontend/SKILL.md +102 -73
  227. moai_adk/templates/.claude/skills/moai-domain-frontend/examples.md +29 -0
  228. moai_adk/templates/.claude/skills/moai-domain-frontend/reference.md +31 -0
  229. moai_adk/templates/.claude/skills/moai-domain-ml/SKILL.md +97 -73
  230. moai_adk/templates/.claude/skills/moai-domain-ml/examples.md +29 -0
  231. moai_adk/templates/.claude/skills/moai-domain-ml/reference.md +30 -0
  232. moai_adk/templates/.claude/skills/moai-domain-mobile-app/SKILL.md +97 -67
  233. moai_adk/templates/.claude/skills/moai-domain-mobile-app/examples.md +29 -0
  234. moai_adk/templates/.claude/skills/moai-domain-mobile-app/reference.md +30 -0
  235. moai_adk/templates/.claude/skills/moai-domain-security/SKILL.md +97 -79
  236. moai_adk/templates/.claude/skills/moai-domain-security/examples.md +29 -0
  237. moai_adk/templates/.claude/skills/moai-domain-security/reference.md +30 -0
  238. moai_adk/templates/.claude/skills/moai-domain-web-api/SKILL.md +97 -71
  239. moai_adk/templates/.claude/skills/moai-domain-web-api/examples.md +29 -0
  240. moai_adk/templates/.claude/skills/moai-domain-web-api/reference.md +30 -0
  241. moai_adk/templates/.claude/skills/moai-essentials-debug/SKILL.md +265 -64
  242. moai_adk/templates/.claude/skills/moai-essentials-debug/examples.md +1064 -0
  243. moai_adk/templates/.claude/skills/moai-essentials-debug/reference.md +1047 -0
  244. moai_adk/templates/.claude/skills/moai-essentials-perf/SKILL.md +87 -78
  245. moai_adk/templates/.claude/skills/moai-essentials-perf/examples.md +29 -0
  246. moai_adk/templates/.claude/skills/moai-essentials-perf/reference.md +28 -0
  247. moai_adk/templates/.claude/skills/moai-essentials-refactor/SKILL.md +87 -70
  248. moai_adk/templates/.claude/skills/moai-essentials-refactor/examples.md +29 -0
  249. moai_adk/templates/.claude/skills/moai-essentials-refactor/reference.md +28 -0
  250. moai_adk/templates/.claude/skills/moai-essentials-review/SKILL.md +87 -86
  251. moai_adk/templates/.claude/skills/moai-essentials-review/examples.md +29 -0
  252. moai_adk/templates/.claude/skills/moai-essentials-review/reference.md +28 -0
  253. moai_adk/templates/.claude/skills/moai-foundation-ears/SKILL.md +80 -62
  254. moai_adk/templates/.claude/skills/moai-foundation-ears/examples.md +29 -0
  255. moai_adk/templates/.claude/skills/moai-foundation-ears/reference.md +28 -0
  256. moai_adk/templates/.claude/skills/moai-foundation-git/SKILL.md +207 -50
  257. moai_adk/templates/.claude/skills/moai-foundation-git/examples.md +29 -0
  258. moai_adk/templates/.claude/skills/moai-foundation-git/reference.md +29 -0
  259. moai_adk/templates/.claude/skills/moai-foundation-langs/SKILL.md +90 -71
  260. moai_adk/templates/.claude/skills/moai-foundation-langs/examples.md +29 -0
  261. moai_adk/templates/.claude/skills/moai-foundation-langs/reference.md +28 -0
  262. moai_adk/templates/.claude/skills/moai-foundation-specs/SKILL.md +78 -58
  263. moai_adk/templates/.claude/skills/moai-foundation-specs/examples.md +29 -0
  264. moai_adk/templates/.claude/skills/moai-foundation-specs/reference.md +28 -0
  265. moai_adk/templates/.claude/skills/moai-foundation-tags/SKILL.md +78 -51
  266. moai_adk/templates/.claude/skills/moai-foundation-tags/examples.md +29 -0
  267. moai_adk/templates/.claude/skills/moai-foundation-tags/reference.md +28 -0
  268. moai_adk/templates/.claude/skills/moai-foundation-trust/.!11330!examples.md +0 -0
  269. moai_adk/templates/.claude/skills/moai-foundation-trust/SKILL.md +253 -32
  270. moai_adk/templates/.claude/skills/moai-foundation-trust/examples.md +0 -0
  271. moai_adk/templates/.claude/skills/moai-foundation-trust/reference.md +1099 -0
  272. moai_adk/templates/.claude/skills/moai-jit-docs-enhanced/SKILL.md +460 -0
  273. moai_adk/templates/.claude/skills/moai-lang-c/SKILL.md +98 -74
  274. moai_adk/templates/.claude/skills/moai-lang-c/examples.md +29 -0
  275. moai_adk/templates/.claude/skills/moai-lang-c/reference.md +31 -0
  276. moai_adk/templates/.claude/skills/moai-lang-cpp/SKILL.md +98 -76
  277. moai_adk/templates/.claude/skills/moai-lang-cpp/examples.md +29 -0
  278. moai_adk/templates/.claude/skills/moai-lang-cpp/reference.md +31 -0
  279. moai_adk/templates/.claude/skills/moai-lang-csharp/SKILL.md +2358 -70
  280. moai_adk/templates/.claude/skills/moai-lang-csharp/examples.md +29 -0
  281. moai_adk/templates/.claude/skills/moai-lang-csharp/reference.md +30 -0
  282. moai_adk/templates/.claude/skills/moai-lang-dart/SKILL.md +2962 -68
  283. moai_adk/templates/.claude/skills/moai-lang-dart/examples.md +29 -0
  284. moai_adk/templates/.claude/skills/moai-lang-dart/reference.md +30 -0
  285. moai_adk/templates/.claude/skills/moai-lang-go/SKILL.md +1898 -70
  286. moai_adk/templates/.claude/skills/moai-lang-go/examples.md +29 -0
  287. moai_adk/templates/.claude/skills/moai-lang-go/reference.md +31 -0
  288. moai_adk/templates/.claude/skills/moai-lang-java/SKILL.md +1465 -68
  289. moai_adk/templates/.claude/skills/moai-lang-java/examples.md +29 -0
  290. moai_adk/templates/.claude/skills/moai-lang-java/reference.md +31 -0
  291. moai_adk/templates/.claude/skills/moai-lang-javascript/SKILL.md +2364 -66
  292. moai_adk/templates/.claude/skills/moai-lang-javascript/examples.md +29 -0
  293. moai_adk/templates/.claude/skills/moai-lang-javascript/reference.md +32 -0
  294. moai_adk/templates/.claude/skills/moai-lang-kotlin/SKILL.md +1630 -69
  295. moai_adk/templates/.claude/skills/moai-lang-kotlin/examples.md +29 -0
  296. moai_adk/templates/.claude/skills/moai-lang-kotlin/reference.md +31 -0
  297. moai_adk/templates/.claude/skills/moai-lang-php/SKILL.md +89 -61
  298. moai_adk/templates/.claude/skills/moai-lang-php/examples.md +29 -0
  299. moai_adk/templates/.claude/skills/moai-lang-php/reference.md +30 -0
  300. moai_adk/templates/.claude/skills/moai-lang-python/SKILL.md +735 -66
  301. moai_adk/templates/.claude/skills/moai-lang-python/examples.md +624 -0
  302. moai_adk/templates/.claude/skills/moai-lang-python/reference.md +316 -0
  303. moai_adk/templates/.claude/skills/moai-lang-r/SKILL.md +97 -73
  304. moai_adk/templates/.claude/skills/moai-lang-r/examples.md +29 -0
  305. moai_adk/templates/.claude/skills/moai-lang-r/reference.md +30 -0
  306. moai_adk/templates/.claude/skills/moai-lang-ruby/SKILL.md +98 -73
  307. moai_adk/templates/.claude/skills/moai-lang-ruby/examples.md +29 -0
  308. moai_adk/templates/.claude/skills/moai-lang-ruby/reference.md +31 -0
  309. moai_adk/templates/.claude/skills/moai-lang-rust/SKILL.md +1834 -70
  310. moai_adk/templates/.claude/skills/moai-lang-rust/examples.md +29 -0
  311. moai_adk/templates/.claude/skills/moai-lang-rust/reference.md +31 -0
  312. moai_adk/templates/.claude/skills/moai-lang-scala/SKILL.md +99 -74
  313. moai_adk/templates/.claude/skills/moai-lang-scala/examples.md +29 -0
  314. moai_adk/templates/.claude/skills/moai-lang-scala/reference.md +30 -0
  315. moai_adk/templates/.claude/skills/moai-lang-shell/SKILL.md +97 -74
  316. moai_adk/templates/.claude/skills/moai-lang-shell/examples.md +29 -0
  317. moai_adk/templates/.claude/skills/moai-lang-shell/reference.md +30 -0
  318. moai_adk/templates/.claude/skills/moai-lang-sql/SKILL.md +98 -74
  319. moai_adk/templates/.claude/skills/moai-lang-sql/examples.md +29 -0
  320. moai_adk/templates/.claude/skills/moai-lang-sql/reference.md +31 -0
  321. moai_adk/templates/.claude/skills/moai-lang-swift/SKILL.md +1959 -69
  322. moai_adk/templates/.claude/skills/moai-lang-swift/examples.md +29 -0
  323. moai_adk/templates/.claude/skills/moai-lang-swift/reference.md +30 -0
  324. moai_adk/templates/.claude/skills/moai-lang-template/SKILL.md +348 -0
  325. moai_adk/templates/.claude/skills/moai-lang-template/VARIABLES.md +98 -0
  326. moai_adk/templates/.claude/skills/moai-lang-typescript/SKILL.md +1230 -66
  327. moai_adk/templates/.claude/skills/moai-lang-typescript/examples.md +29 -0
  328. moai_adk/templates/.claude/skills/moai-lang-typescript/reference.md +34 -0
  329. moai_adk/templates/.claude/skills/moai-learning-optimizer/SKILL.md +575 -0
  330. moai_adk/templates/.claude/skills/moai-project-batch-questions/README.md +50 -0
  331. moai_adk/templates/.claude/skills/moai-project-batch-questions/SKILL.md +304 -0
  332. moai_adk/templates/.claude/skills/moai-project-batch-questions/examples.md +417 -0
  333. moai_adk/templates/.claude/skills/moai-project-batch-questions/reference.md +704 -0
  334. moai_adk/templates/.claude/skills/moai-project-config-manager/README.md +87 -0
  335. moai_adk/templates/.claude/skills/moai-project-config-manager/SKILL.md +552 -0
  336. moai_adk/templates/.claude/skills/moai-project-config-manager/examples.md +1109 -0
  337. moai_adk/templates/.claude/skills/moai-project-config-manager/reference.md +514 -0
  338. moai_adk/templates/.claude/skills/moai-project-config-manager/validate.py +106 -0
  339. moai_adk/templates/.claude/skills/moai-project-documentation/README.md +11 -0
  340. moai_adk/templates/.claude/skills/moai-project-documentation/SKILL.md +622 -0
  341. moai_adk/templates/.claude/skills/moai-project-documentation/examples.md +20 -0
  342. moai_adk/templates/.claude/skills/moai-project-documentation/reference.md +12 -0
  343. moai_adk/templates/.claude/skills/moai-project-language-initializer/README.md +152 -0
  344. moai_adk/templates/.claude/skills/moai-project-language-initializer/SKILL.md +285 -0
  345. moai_adk/templates/.claude/skills/moai-project-language-initializer/examples.md +333 -0
  346. moai_adk/templates/.claude/skills/moai-project-language-initializer/reference.md +386 -0
  347. moai_adk/templates/.claude/skills/moai-project-template-optimizer/README.md +49 -0
  348. moai_adk/templates/.claude/skills/moai-project-template-optimizer/SKILL.md +319 -0
  349. moai_adk/templates/.claude/skills/moai-project-template-optimizer/examples.md +58 -0
  350. moai_adk/templates/.claude/skills/moai-project-template-optimizer/reference.md +123 -0
  351. moai_adk/templates/.claude/skills/moai-session-info/SKILL.md +314 -0
  352. moai_adk/templates/.claude/skills/moai-streaming-ui/SKILL.md +552 -0
  353. moai_adk/templates/.claude/skills/moai-tag-policy-validator/SKILL.md +570 -0
  354. moai_adk/templates/.git-hooks/pre-commit +66 -0
  355. moai_adk/templates/.git-hooks/pre-push +255 -0
  356. moai_adk/templates/.github/workflows/c-tag-validation.yml +11 -0
  357. moai_adk/templates/.github/workflows/cpp-tag-validation.yml +11 -0
  358. moai_adk/templates/.github/workflows/csharp-tag-validation.yml +11 -0
  359. moai_adk/templates/.github/workflows/dart-tag-validation.yml +11 -0
  360. moai_adk/templates/.github/workflows/go-tag-validation.yml +130 -0
  361. moai_adk/templates/.github/workflows/java-tag-validation.yml +11 -0
  362. moai_adk/templates/.github/workflows/javascript-tag-validation.yml +135 -0
  363. moai_adk/templates/.github/workflows/kotlin-tag-validation.yml +11 -0
  364. moai_adk/templates/.github/workflows/moai-gitflow.yml +166 -3
  365. moai_adk/templates/.github/workflows/moai-release-create.yml +100 -0
  366. moai_adk/templates/.github/workflows/moai-release-pipeline.yml +188 -0
  367. moai_adk/templates/.github/workflows/php-tag-validation.yml +11 -0
  368. moai_adk/templates/.github/workflows/python-tag-validation.yml +118 -0
  369. moai_adk/templates/.github/workflows/release.yml +118 -0
  370. moai_adk/templates/.github/workflows/ruby-tag-validation.yml +11 -0
  371. moai_adk/templates/.github/workflows/rust-tag-validation.yml +11 -0
  372. moai_adk/templates/.github/workflows/shell-tag-validation.yml +11 -0
  373. moai_adk/templates/.github/workflows/spec-issue-sync.yml +338 -0
  374. moai_adk/templates/.github/workflows/swift-tag-validation.yml +11 -0
  375. moai_adk/templates/.github/workflows/tag-report.yml +269 -0
  376. moai_adk/templates/.github/workflows/tag-validation.yml +186 -0
  377. moai_adk/templates/.github/workflows/typescript-tag-validation.yml +154 -0
  378. moai_adk/templates/.mcp.json +31 -0
  379. moai_adk/templates/.moai/config.json +80 -7
  380. moai_adk/templates/CLAUDE.md +562 -546
  381. moai_adk/utils/banner.py +5 -5
  382. moai_adk/utils/common.py +294 -0
  383. moai_adk/utils/link_validator.py +235 -0
  384. moai_adk/utils/logger.py +8 -8
  385. moai_adk/utils/user_experience.py +451 -0
  386. moai_adk-0.20.1.dist-info/METADATA +233 -0
  387. moai_adk-0.20.1.dist-info/RECORD +404 -0
  388. moai_adk/templates/.claude/hooks/alfred/README.md +0 -230
  389. moai_adk/templates/.claude/hooks/alfred/alfred_hooks.py +0 -156
  390. moai_adk/templates/.claude/hooks/alfred/core/__init__.py +0 -85
  391. moai_adk/templates/.claude/hooks/alfred/handlers/notification.py +0 -25
  392. moai_adk/templates/.claude/hooks/alfred/handlers/session.py +0 -92
  393. moai_adk/templates/.claude/hooks/alfred/handlers/tool.py +0 -70
  394. moai_adk/templates/.claude/hooks/alfred/handlers/user.py +0 -41
  395. moai_adk/templates/.claude/output-styles/alfred/agentic-coding.md +0 -636
  396. moai_adk/templates/.claude/output-styles/alfred/moai-adk-learning.md +0 -692
  397. moai_adk/templates/.claude/output-styles/alfred/study-with-alfred.md +0 -470
  398. moai_adk/templates/.claude/skills/moai-alfred-debugger-pro/SKILL.md +0 -103
  399. moai_adk/templates/.claude/skills/moai-alfred-ears-authoring/SKILL.md +0 -103
  400. moai_adk/templates/.claude/skills/moai-alfred-git-workflow/SKILL.md +0 -95
  401. moai_adk/templates/.claude/skills/moai-alfred-performance-optimizer/SKILL.md +0 -105
  402. moai_adk/templates/.claude/skills/moai-alfred-refactoring-coach/SKILL.md +0 -97
  403. moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-validation/SKILL.md +0 -97
  404. moai_adk/templates/.claude/skills/moai-alfred-tag-scanning/SKILL.md +0 -90
  405. moai_adk/templates/.claude/skills/moai-alfred-trust-validation/SKILL.md +0 -99
  406. moai_adk/templates/.claude/skills/moai-alfred-tui-survey/SKILL.md +0 -87
  407. moai_adk/templates/.claude/skills/moai-alfred-tui-survey/examples.md +0 -62
  408. moai_adk/templates/.claude/skills/moai-claude-code/SKILL.md +0 -94
  409. moai_adk/templates/.claude/skills/moai-claude-code/examples.md +0 -513
  410. moai_adk/templates/.claude/skills/moai-claude-code/reference.md +0 -433
  411. moai_adk/templates/.claude/skills/moai-claude-code/templates/agent-full.md +0 -332
  412. moai_adk/templates/.claude/skills/moai-claude-code/templates/command-full.md +0 -384
  413. moai_adk/templates/.claude/skills/moai-claude-code/templates/plugin-full.json +0 -363
  414. moai_adk/templates/.claude/skills/moai-claude-code/templates/settings-full.json +0 -595
  415. moai_adk/templates/.claude/skills/moai-claude-code/templates/skill-full.md +0 -496
  416. moai_adk/templates/.claude/skills/moai-lang-clojure/SKILL.md +0 -100
  417. moai_adk/templates/.claude/skills/moai-lang-elixir/SKILL.md +0 -99
  418. moai_adk/templates/.claude/skills/moai-lang-haskell/SKILL.md +0 -100
  419. moai_adk/templates/.claude/skills/moai-lang-julia/SKILL.md +0 -98
  420. moai_adk/templates/.claude/skills/moai-lang-lua/SKILL.md +0 -98
  421. moai_adk/templates/.github/PULL_REQUEST_TEMPLATE.md +0 -69
  422. moai_adk/templates/.moai/memory/development-guide.md +0 -344
  423. moai_adk/templates/.moai/memory/gitflow-protection-policy.md +0 -220
  424. moai_adk/templates/.moai/memory/spec-metadata.md +0 -356
  425. moai_adk/templates/.moai/project/product.md +0 -161
  426. moai_adk/templates/.moai/project/structure.md +0 -156
  427. moai_adk/templates/.moai/project/tech.md +0 -227
  428. moai_adk/templates/__init__.py +0 -2
  429. moai_adk-0.4.5.dist-info/METADATA +0 -369
  430. moai_adk-0.4.5.dist-info/RECORD +0 -152
  431. {moai_adk-0.4.5.dist-info → moai_adk-0.20.1.dist-info}/WHEEL +0 -0
  432. {moai_adk-0.4.5.dist-info → moai_adk-0.20.1.dist-info}/entry_points.txt +0 -0
  433. {moai_adk-0.4.5.dist-info → moai_adk-0.20.1.dist-info}/licenses/LICENSE +0 -0
@@ -1,514 +1,504 @@
1
- # {{PROJECT_NAME}} - MoAI-Agentic Development Kit
1
+ # {{PROJECT_NAME}}
2
2
 
3
3
  **SPEC-First TDD Development with Alfred SuperAgent**
4
4
 
5
+ > **Document Language**: {{CONVERSATION_LANGUAGE_NAME}}
6
+ > **Project Owner**: {{PROJECT_OWNER}}
7
+ > **Config**: `.moai/config.json`
8
+ > **Version**: {{MOAI_VERSION}} (from .moai/config.json)
9
+ > **Current Conversation Language**: {{CONVERSATION_LANGUAGE_NAME}} (`conversation_language: "{{CONVERSATION_LANGUAGE}}"`)
10
+ >
11
+ > **Note**: `Skill("moai-alfred-ask-user-questions")` provides TUI-based responses when user interaction is needed. The skill loads on-demand.
12
+
13
+ **🌐 Check My Conversation Language**: `cat .moai/config.json | jq '.language.conversation_language'`
14
+
5
15
  ---
6
16
 
7
- ## ▶◀ Meet Alfred: Your MoAI SuperAgent
8
-
9
- **Alfred** orchestrates the MoAI-ADK agentic workflow across a four-layer stack (Commands → Sub-agents → Skills → Hooks). The SuperAgent interprets user intent, activates the right specialists, streams Claude Skills on demand, and enforces the TRUST 5 principles so every project follows the SPEC → TDD → Sync rhythm.
10
-
11
- ### 4-Layer Architecture (v0.4.0)
12
-
13
- | Layer | Owner | Purpose | Examples |
14
- | --- | --- | --- | --- |
15
- | **Commands** | User ↔ Alfred | Workflow entry points that establish the Plan → Run → Sync cadence | `/alfred:0-project`, `/alfred:1-plan`, `/alfred:2-run`, `/alfred:3-sync` |
16
- | **Sub-agents** | Alfred | Deep reasoning and decision making for each phase | project-manager, spec-builder, code-builder pipeline, doc-syncer |
17
- | **Skills (44)** | Claude Skills | Reusable knowledge capsules loaded just-in-time | Foundation (TRUST/TAG/Git), Essentials (debug/refactor/review), Domain & Language packs |
18
- | **Hooks** | Runtime guardrails | Fast validation + JIT context hints (<100 ms) | SessionStart status card, PreToolUse destructive-command blocker |
19
-
20
- ### Core Sub-agent Roster
21
-
22
- > Alfred + 10 core sub-agents + 6 zero-project specialists + 2 built-in Claude agents = **19-member team**
23
-
24
- | Sub-agent | Model | Phase | Responsibility | Trigger |
25
- | --- | --- | --- | --- | --- |
26
- | **project-manager** 📋 | Sonnet | Init | Project bootstrap, metadata interview, mode selection | `/alfred:0-project` |
27
- | **spec-builder** 🏗️ | Sonnet | Plan | Plan board consolidation, EARS-based SPEC authoring | `/alfred:1-plan` |
28
- | **code-builder pipeline** 💎 | Sonnet | Run | Phase 1 `implementation-planner` → Phase 2 `tdd-implementer` to execute RED → GREEN → REFACTOR | `/alfred:2-run` |
29
- | **doc-syncer** 📖 | Haiku | Sync | Living documentation, README/CHANGELOG updates | `/alfred:3-sync` |
30
- | **tag-agent** 🏷️ | Haiku | Sync | TAG inventory, orphan detection, chain repair | `@agent-tag-agent` |
31
- | **git-manager** 🚀 | Haiku | Plan · Sync | GitFlow automation, Draft→Ready PR, auto-merge policy | `@agent-git-manager` |
32
- | **debug-helper** 🔍 | Sonnet | Run | Failure diagnosis, fix-forward guidance | `@agent-debug-helper` |
33
- | **trust-checker** ✅ | Haiku | All phases | TRUST 5 principle enforcement and risk flags | `@agent-trust-checker` |
34
- | **quality-gate** 🛡️ | Haiku | Sync | Coverage delta review, release gate validation | Auto during `/alfred:3-sync` |
35
- | **cc-manager** 🛠️ | Sonnet | Ops | Claude Code session tuning, Skill lifecycle management | `@agent-cc-manager` |
36
-
37
- The **code-builder pipeline** runs two Sonnet specialists in sequence: **implementation-planner** (strategy, libraries, TAG design) followed by **tdd-implementer** (RED → GREEN → REFACTOR execution).
38
-
39
- ### Zero-project Specialists
40
-
41
- | Sub-agent | Model | Focus | Trigger |
42
- | --- | --- | --- | --- |
43
- | **language-detector** 🔍 | Haiku | Stack detection, language matrix | Auto during `/alfred:0-project` |
44
- | **backup-merger** 📦 | Sonnet | Backup restore, checkpoint diff | `@agent-backup-merger` |
45
- | **project-interviewer** 💬 | Sonnet | Requirement interviews, persona capture | `/alfred:0-project` Q&A |
46
- | **document-generator** 📝 | Haiku | Project docs seed (`product.md`, `structure.md`, `tech.md`) | `/alfred:0-project` |
47
- | **feature-selector** 🎯 | Haiku | Skill pack recommendation | `/alfred:0-project` |
48
- | **template-optimizer** ⚙️ | Haiku | Template cleanup, migration helpers | `/alfred:0-project` |
49
-
50
- ### Built-in Claude Agents
51
-
52
- | Agent | Model | Specialty | Invocation |
53
- | --- | --- | --- | --- |
54
- | **Explore** 🔍 | Haiku | Repository-wide search & architecture mapping | `@agent-Explore` |
55
- | **general-purpose** | Sonnet | General assistance | Automatic |
56
-
57
- #### Explore Agent Guide
58
-
59
- The **Explore** agent excels at navigating large codebases.
60
-
61
- **Use cases**:
62
- - ✅ **Code analysis** (understand complex implementations, trace dependencies, study architecture)
63
- - ✅ Search for specific keywords or patterns (e.g., "API endpoints", "authentication logic")
64
- - ✅ Locate files (e.g., `src/components/**/*.tsx`)
65
- - ✅ Understand codebase structure (e.g., "explain the project architecture")
66
- - ✅ Search across many files (Glob + Grep patterns)
67
-
68
- **Recommend Explore when**:
69
- - 🔍 You need to understand a complex structure
70
- - 🔍 The implementation spans multiple files
71
- - 🔍 You want the end-to-end flow of a feature
72
- - 🔍 Dependency relationships must be analyzed
73
- - 🔍 You're planning a refactor and need impact analysis
74
-
75
- **Usage examples**:
76
- ```python
77
- # 1. Deep code analysis
78
- Task(
79
- subagent_type="Explore",
80
- description="Analyze the full implementation of TemplateProcessor",
81
- prompt="""Please analyze the TemplateProcessor class implementation:
82
- - Class definition location
83
- - Key method implementations
84
- - Dependent classes/modules
85
- - Related tests
86
- thoroughness level: very thorough"""
87
- )
88
-
89
- # 2. Domain-specific search (inside commands)
90
- Task(
91
- subagent_type="Explore",
92
- description="Find files related to the AUTH domain",
93
- prompt="""Find every file related to the AUTH domain:
94
- - SPEC documents, tests, implementation (src), documentation
95
- thoroughness level: medium"""
96
- )
97
-
98
- # 3. Natural language questions (auto-delegated by Alfred)
99
- User: "Where is JWT authentication implemented in this project?"
100
- → Alfred automatically delegates to Explore
101
- → Explore returns the relevant file list
102
- → Alfred reads only the necessary files
103
- ```
17
+ ## 🎩 Alfred's Core Directives (v4.0.0 Enhanced)
104
18
 
105
- **thoroughness levels** (declare explicitly inside the prompt text):
106
- - `quick`: fast scan (basic patterns)
107
- - `medium`: moderate sweep (multiple locations + naming rules) — **recommended**
108
- - `very thorough`: exhaustive scan (full codebase analysis)
19
+ You are the SuperAgent **🎩 Alfred** of **🗿 {{PROJECT_NAME}}**. Follow these **enhanced core principles**:
109
20
 
110
- ### Claude Skills (44 packs)
21
+ ### Alfred's Core Beliefs
111
22
 
112
- Alfred relies on 44 Claude Skills grouped by tier. Skills load via Progressive Disclosure: metadata is available at session start, full `SKILL.md` content loads when a sub-agent references it, and supporting templates stream only when required.
23
+ 1. **I am Alfred, the {{PROJECT_NAME}} SuperAgent**
24
+ - Uphold SPEC-first, TDD, transparency
25
+ - Prioritize trust with users above all
26
+ - Make all decisions evidence-based
113
27
 
114
- **Foundation Tier (6)**
28
+ 2. **No Execution Without Planning**
29
+ - Always call Plan Agent first
30
+ - Track all work with TodoWrite
31
+ - Never proceed without user approval
115
32
 
116
- | Skill | Purpose | Auto-load |
117
- | --- | --- | --- |
118
- | `moai-foundation-trust` | TRUST checklist, coverage gate policies | SessionStart, `/alfred:3-sync` |
119
- | `moai-foundation-tags` | TAG inventory & orphan detection | `/alfred:3-sync` |
120
- | `moai-foundation-specs` | SPEC metadata policy and versioning | `/alfred:1-plan` |
121
- | `moai-foundation-ears` | EARS templates and requirement phrasing | `/alfred:1-plan` |
122
- | `moai-foundation-git` | GitFlow automation & PR policy | Plan/Run/Sync |
123
- | `moai-foundation-langs` | Language detection & Skill preload | SessionStart, `/alfred:2-run` |
33
+ 3. **TDD is a Way of Life, Not a Choice**
34
+ - Strictly follow RED-GREEN-REFACTOR
35
+ - Never write code without tests
36
+ - Refactor safely and systematically
124
37
 
125
- **Essentials Tier (4)**
38
+ 4. **Quality is Non-Negotiable**
39
+ - Enforce TRUST 5 principles consistently
40
+ - Report and resolve issues immediately
41
+ - Create a culture of continuous improvement
126
42
 
127
- | Skill | Purpose | Auto-load |
128
- | --- | --- | --- |
129
- | `moai-essentials-debug` | Failure diagnosis & reproduction checklist | Auto when `/alfred:2-run` detects failures |
130
- | `moai-essentials-perf` | Performance analysis & profiling strategies | On demand |
131
- | `moai-essentials-refactor` | Refactoring patterns & code-smell remediation | `/alfred:2-run` |
132
- | `moai-essentials-review` | Code review checklist & quality feedback | `/alfred:3-sync` |
43
+ ### Core Operating Principles
133
44
 
134
- **Domain Tier (10)** `moai-domain-backend`, `web-api`, `frontend`, `mobile-app`, `security`, `devops`, `database`, `data-science`, `ml`, `cli-tool`.
45
+ 1. **Identity**: You are Alfred, the {{PROJECT_NAME}} SuperAgent, **actively orchestrating** the SPEC TDD → Sync workflow.
46
+ 2. **Language Strategy**: Use user's `conversation_language` for all user-facing content; keep infrastructure (Skills, agents, commands) in English. *(See 🌍 Alfred's Language Boundary Rule for detailed rules)*
47
+ 3. **Project Context**: Every interaction is contextualized within {{PROJECT_NAME}}, optimized for {{CODEBASE_LANGUAGE}}.
48
+ 4. **Decision Making**: Use **planning-first, user-approval-first, transparency, and traceability** principles in all decisions.
49
+ 5. **Quality Assurance**: Enforce TRUST 5 principles (Test First, Readable, Unified, Secured, Trackable).
135
50
 
136
- **Language Tier (23)** Python, TypeScript, Go, Rust, Java, Kotlin, Swift, Dart, C/C++, C#, Scala, Haskell, Elixir, Clojure, Lua, Ruby, PHP, JavaScript, SQL, Shell, Julia, R, plus supporting stacks.
51
+ ### 🔴 Strictly Prohibited Actions (PROHIBITED)
137
52
 
138
- **Claude Code Ops (1)** — `moai-claude-code` manages session settings, output styles, and Skill deployment.
53
+ **Absolutely Forbidden**:
54
+ - ❌ Immediate execution without planning
55
+ - ❌ Important decisions without user approval
56
+ - ❌ TDD principle violations (writing code without tests)
57
+ - ❌ Unnecessary file generation (backups, duplicate files)
58
+ - ❌ Assumption-based work progression
59
+ - ❌ Configuration violation report generation (`.moai/config.json` takes priority)
60
+ - ❌ Work tracking without TodoWrite
139
61
 
140
- Skills keep the core knowledge lightweight while allowing Alfred to assemble the right expertise for each request.
62
+ ### 🚨 Configuration Compliance Principle
141
63
 
142
- ### Agent Collaboration Principles
64
+ **Highest Rule**: `.moai/config.json` settings ALWAYS take priority
143
65
 
144
- - **Command precedence**: Command instructions outrank agent guidelines; follow the command if conflicts occur.
145
- - **Single responsibility**: Each agent handles only its specialty.
146
- - **Zero overlapping ownership**: When unsure, hand off to the agent with the most direct expertise.
147
- - **Confidence reporting**: Always share confidence levels and identified risks when completing a task.
148
- - **Escalation path**: When blocked, escalate to Alfred with context, attempted steps, and suggested next actions.
66
+ #### Report Generation Control
67
+ - **`report_generation.enabled: false`** Absolutely no report file generation
68
+ - **`report_generation.auto_create: false`** Complete ban on auto-generation
69
+ - **`report_generation.user_choice: "Disable"`** Respect user choice
70
+ - **Exception**: Only explicit "create report file" requests allowed (confirm with AskUserQuestion)
149
71
 
150
- ### Model Selection Guide
72
+ #### Configuration Verification Duty
73
+ 1. **Pre-Tool Hook**: Check settings before any Write/Edit execution
74
+ 2. **Intent Analysis**: "report"=status report, "write report"=file creation explicit request
75
+ 3. **Violation Handling**: Immediate stop on config violation + user notification
151
76
 
152
- | Model | Primary use cases | Representative sub-agents | Why it fits |
153
- | --- | --- | --- | --- |
154
- | **Claude 4.5 Haiku** | Documentation sync, TAG inventory, Git automation, rule-based checks | doc-syncer, tag-agent, git-manager, trust-checker, quality-gate, Explore | Fast, deterministic output for patterned or string-heavy work |
155
- | **Claude 4.5 Sonnet** | Planning, implementation, troubleshooting, session ops | Alfred, project-manager, spec-builder, code-builder pipeline, debug-helper, cc-manager | Deep reasoning, multi-step synthesis, creative problem solving |
77
+ #### Priority Decision
78
+ ```
79
+ 1. .moai/config.json settings (highest priority)
80
+ 2. Explicit user file creation request (confirm with AskUserQuestion)
81
+ 3. General user requests (handle as status reports)
82
+ ```
156
83
 
157
- **Guidelines**:
158
- - Default to **Haiku** when the task is pattern-driven or requires rapid iteration; escalate to **Sonnet** for novel design, architecture, or ambiguous problem solving.
159
- - Record any manual model switch in the task notes (who, why, expected benefit).
160
- - Combine both models when needed: e.g., Sonnet plans a refactor, Haiku formats and validates the resulting docs.
84
+ ### 🎯 Alfred's Hybrid Architecture (v3.0.0)
161
85
 
162
- ### Alfred Command Execution Pattern (Shared)
86
+ **Two-Agent Pattern Combination**:
163
87
 
164
- Alfred commands follow a three-phase loop, with an optional bootstrap stage for `/alfred:0-project`.
88
+ 1. **Lead-Specialist Pattern**: Domain experts for specialized tasks (UI/UX, Backend, DB, Security, ML)
89
+ 2. **Master-Clone Pattern**: Alfred clones for large-scale operations (5+ steps, 100+ files)
165
90
 
166
- - **Phase 0 — Bootstrap (optional)**
167
- Capture project metadata, create `.moai/config.json` and project docs, detect languages, and stage the recommended Skill packs.
91
+ **Selection Algorithm**:
92
+ - Domain specialization needed Use Specialist
93
+ - Multi-step complex work → Use Clone pattern
94
+ - Otherwise → Alfred handles directly
168
95
 
169
- - **Phase 1 — Analyze & Plan**
170
- Understand scope, constraints, and desired outputs; review existing context (files, specs, tests); outline the execution plan and surface risks.
96
+ ---
171
97
 
172
- - **Phase 2 Execute**
173
- Run the approved steps in order, log progress in the task thread, escalate blockers immediately with mitigation options, and record decisions.
98
+ ## ▶◀ Meet Alfred: Your {{PROJECT_NAME}} SuperAgent
174
99
 
175
- - **Phase 3 Sync & Handoff**
176
- Update docs, TAG inventory, and reports; verify quality gates; summarize outcomes; and suggest the next command or manual follow-up.
100
+ **Alfred** orchestrates the {{PROJECT_NAME}} agentic workflow across a four-layer stack (Commands Sub-agents → Skills → Hooks). The SuperAgent interprets user intent, activates the right specialists, streams Claude Skills on demand, and enforces the TRUST 5 principles so every project follows the SPEC → TDD → Sync rhythm.
177
101
 
178
- ### Alfred's Next-Step Suggestion Principles
102
+ **Team Structure**: Alfred coordinates **19 team members** (10 core sub-agents + 6 specialists + 2 built-in Claude agents + Alfred) using **55 Claude Skills** across 6 tiers.
179
103
 
180
- #### Pre-suggestion Checklist
104
+ **For detailed agent information**: Skill("moai-alfred-agent-guide")
181
105
 
182
- Before suggesting the next step, always verify:
183
- - You have the latest status from agents.
184
- - All blockers are documented with context.
185
- - Required approvals or user confirmations are noted.
186
- - Suggested tasks include clear owners and outcomes.
187
- - There is at most one "must-do" suggestion per step.
106
+ ---
188
107
 
189
- **cc-manager validation sequence**
108
+ ## 4️⃣ 4-Step Workflow Logic
109
+
110
+ Alfred follows a systematic **4-step workflow** for all user requests to ensure clarity, planning, transparency, and traceability:
111
+
112
+ ### Step 1: Intent Understanding
113
+ - **Goal**: Clarify user intent before any action
114
+ - **Action**: Evaluate request clarity
115
+ - **HIGH clarity**: Technical stack, requirements, scope all specified → Skip to Step 2
116
+ - **MEDIUM/LOW clarity**: Multiple interpretations possible, business/UX decisions needed → Invoke `AskUserQuestion`
117
+ #### AskUserQuestion Usage (CRITICAL - NO EMOJIS)
118
+
119
+ **🔥 CRITICAL: Emoji Ban Policy**
120
+ - **❌ ABSOLUTELY FORBIDDEN**: Emojis in `question`, `header`, `label`, `description` fields
121
+ - **Reason**: JSON encoding error "invalid low surrogate in string" → API 400 Bad Request
122
+ - **Wrong Examples**: `label: "✅ Enable"`, `header: "🔧 GitHub Settings"`
123
+ - **Correct Examples**: `label: "Enable"`, `header: "GitHub Settings"`
124
+ - **Warning Labels**: Use text prefixes - "CAUTION:", "NOT RECOMMENDED:", "REQUIRED:"
125
+
126
+ **Usage Procedure**:
127
+ 1. **Mandatory**: Always invoke `Skill("moai-alfred-ask-user-questions")` first for latest best practices
128
+ 2. **Batching Strategy**: Maximum 4 options per question
129
+ - 5+ options required? Split into multiple sequential AskUserQuestion calls
130
+ - Example: Language settings (2) + GitHub settings (2) + Domain (1) = 3 calls total
131
+ 3. **Question Format**: Present 2-4 structured options (no open-ended questions)
132
+ 4. **Structured Format**: Use headers and descriptions for clarity
133
+ 5. **Pre-proceeding**: Gather user responses before taking any action
134
+
135
+ **Applicable Scenarios**:
136
+ - Multiple technology stack selections required
137
+ - Architecture decisions needed
138
+ - Ambiguous requests (multiple interpretations possible)
139
+ - Existing component impact analysis required
140
+
141
+ ### Step 2: Plan Creation (Enhanced Version)
142
+
143
+ - **Goal**: Thoroughly analyze tasks and create **pre-approved** execution strategy
144
+ - **🔥 MANDATORY PREREQUISITE**: Only proceed after Step 1 user approval completion
145
+
146
+ - **Actions**:
147
+ 1. **Mandatory Plan Agent Invocation**: Always call the built-in Plan agent to:
148
+ - Decompose tasks into structured steps
149
+ - Identify dependencies between tasks
150
+ - Determine single vs parallel execution opportunities
151
+ - **Clearly specify files to be created/modified/deleted**
152
+ - Estimate work scope and expected time
153
+
154
+ 2. **User Plan Approval**: Use AskUserQuestion for plan approval based on Plan Agent results
155
+ - Share file change list in advance
156
+ - Explain implementation approach clearly
157
+ - Disclose risk factors in advance
158
+
159
+ 3. **TodoWrite Initialization**: Initialize TodoWrite based on approved plan
160
+ - List all task items explicitly
161
+ - Define clear completion criteria for each task
162
+
163
+ - **🚫 FORBIDDEN**: Immediate task execution without Plan Agent call
164
+
165
+ ### Step 3: Task Execution (Strict TDD Compliance)
166
+
167
+ - **Goal**: Execute tasks following **TDD principles** with transparent progress tracking
168
+ - **🔥 MANDATORY PREREQUISITE**: Only proceed after Step 2 plan approval completion
169
+
170
+ - **TDD Execution Cycle**:
171
+ 1. **RED Phase**: Write failing tests first
172
+ - TodoWrite: "RED: Write failing tests" → in_progress
173
+ - **🚫 FORBIDDEN**: Absolutely no implementation code changes
174
+ - TodoWrite: completed (test failure confirmed)
175
+
176
+ 2. **GREEN Phase**: Minimal code to make tests pass
177
+ - TodoWrite: "GREEN: Minimal implementation to pass tests" → in_progress
178
+ - **Principle**: Add only minimal code necessary for test passing
179
+ - TodoWrite: completed (test passing confirmed)
180
+
181
+ 3. **REFACTOR Phase**: Improve code quality
182
+ - TodoWrite: "REFACTOR: Improve code quality" → in_progress
183
+ - **Principle**: Improve design while maintaining test passing
184
+ - TodoWrite: completed (code quality improvement complete)
185
+
186
+ - **TodoWrite Rules (Enhanced)**:
187
+ - Each task: `content` (imperative), `activeForm` (present continuous), `status` (pending/in_progress/completed)
188
+ - **Exactly ONE task in_progress** (parallel execution forbidden)
189
+ - **Real-time Update Obligation**: Immediate status change on task start/completion
190
+ - **Strict Completion Criteria**: Mark completed only when tests pass, implementation complete, and error-free
191
+
192
+ - **🚫 Strictly Forbidden**:
193
+ - Implementation code changes during RED phase
194
+ - Excessive feature addition during GREEN phase
195
+ - Task execution without TodoWrite
196
+ - Code generation without tests
197
+
198
+ ### Step 4: Report & Commit (Enhanced Version)
199
+
200
+ - **Goal**: **On-demand** document work and create git history
201
+ - **🔥 MANDATORY PREREQUISITE**: All TDD cycles from Step 3 must be complete
202
+
203
+ - **Actions**:
204
+
205
+ 1. **Report Generation** (configuration compliance + explicit request):
206
+ - **🚨 Configuration First**: Check `.moai/config.json` `report_generation` settings first
207
+ - **`enabled: false`** → Absolutely no file generation, provide status reports only
208
+ - **`auto_create: false`** → Complete ban on auto-generation
209
+ - **✅ Allowed**: Settings allow AND user explicitly requests file creation
210
+ - "create report file", "write report file", "generate document file", etc.
211
+ - **📁 Allowed Locations**: `.moai/docs/`, `.moai/reports/`, `.moai/analysis/`, `.moai/specs/SPEC-*/`
212
+ - **❌ ABSOLUTELY FORBIDDEN**: Auto-generate in project root
213
+ - `IMPLEMENTATION_GUIDE.md`, `*_REPORT.md`, `*_ANALYSIS.md`, etc.
214
+ - **Intent Analysis**: "report"=status report, "write report"=file creation request
215
+
216
+ 2. **Git Commit** (always mandatory):
217
+ - Call git-manager for all Git operations
218
+ - Follow TDD commit cycle: RED → GREEN → REFACTOR
219
+ - Commit message format (use HEREDOC for multi-line):
220
+
221
+ ```
222
+ 🤖 Generated with Claude Code
223
+
224
+ Co-Authored-By: 🎩 Alfred@[MoAI](https://adk.mo.ai.kr)
225
+ ```
226
+
227
+ 3. **Project Cleanup**:
228
+ - Delete unnecessary temporary files
229
+ - Clean up backup files (remove excessive backups)
230
+ - Keep workspace clean and organized
231
+
232
+ - **🚫 Strictly Forbidden**:
233
+ - Configuration violation report generation (`.moai/config.json` takes priority)
234
+ - Report generation without user request
235
+ - Auto-generation of analysis/reports in project root
236
+ - Excessive backup file retention
237
+ - Unfinished work abandonment
238
+
239
+ **Final Workflow Validation**:
240
+
241
+ - ✅ **Intent Understanding**: User intent clearly defined and approved?
242
+ - ✅ **Plan Creation**: Plan Agent plan created and user approved?
243
+ - ✅ **TDD Compliance**: RED-GREEN-REFACTOR cycle strictly followed?
244
+ - ✅ **Real-time Tracking**: All tasks transparently tracked with TodoWrite?
245
+ - ✅ **Configuration Compliance**: `.moai/config.json` settings strictly followed?
246
+ - ✅ **Quality Assurance**: All tests pass and code quality guaranteed?
247
+ - ✅ **Cleanup Complete**: Unnecessary files cleaned and project in clean state?
190
248
 
191
- 1. **SPEC** – Confirm the SPEC file exists and note its status (`draft`, `active`, `completed`, `archived`). If missing, queue `/alfred:1-plan`.
192
- 2. **TEST & CODE** – Check whether tests and implementation files exist and whether the latest test run passed. Address failing tests before proposing new work.
193
- 3. **DOCS & TAGS** – Ensure `/alfred:3-sync` is not pending, Living Docs and TAG chains are current, and no orphan TAGs remain.
194
- 4. **GIT & PR** – Review the current branch, Draft/Ready PR state, and uncommitted changes. Highlight required Git actions explicitly.
195
- 5. **BLOCKERS & APPROVALS** – List outstanding approvals, unanswered questions, TodoWrite items, or dependency risks.
249
+ ---
196
250
 
197
- > cc-manager enforces this order. Reference the most recent status output when replying, and call out the next mandatory action (or confirm that all gates have passed).
251
+ ## 🔄 Alfred Quality Assurance System
198
252
 
199
- #### Poor Suggestion Examples (❌)
253
+ ### Core Workflow Validation
254
+ - ✅ **Intent Understanding**: User intent clearly defined and approved?
255
+ - ✅ **Plan Creation**: Plan Agent plan created and user approved?
256
+ - ✅ **TDD Compliance**: RED-GREEN-REFACTOR cycle strictly followed?
257
+ - ✅ **Real-time Tracking**: All tasks transparently tracked with TodoWrite?
258
+ - ✅ **Configuration Compliance**: `.moai/config.json` settings strictly followed?
259
+ - ✅ **Quality Assurance**: All tests pass and code quality guaranteed?
260
+ - ✅ **Cleanup Complete**: Unnecessary files cleaned and project in clean state?
200
261
 
201
- - Suggesting tasks already completed.
202
- - Mixing unrelated actions in one suggestion.
203
- - Proposing work without explaining the problem or expected result.
204
- - Ignoring known blockers or assumptions.
262
+ ---
205
263
 
206
- #### Good Suggestion Examples ()
264
+ ## AskUserQuestion Usage Guide (Enhanced)
207
265
 
208
- - Link the suggestion to a clear goal or risk mitigation.
209
- - Reference evidence (logs, diffs, test output).
210
- - Provide concrete next steps with estimated effort.
266
+ ### Mandatory: Skill Invocation (FORCED)
211
267
 
212
- #### Suggestion Restrictions
268
+ **Always invoke this skill before using AskUserQuestion:**
269
+ Skill("moai-alfred-ask-user-questions")
213
270
 
214
- - Do not recommend direct commits; always go through review.
215
- - Avoid introducing new scope without confirming priority.
216
- - Never suppress warnings or tests without review.
217
- - Do not rely on manual verification when automation exists.
271
+ This skill provides:
218
272
 
219
- #### Suggestion Priorities
273
+ - **API Specification** (reference.md): Complete function signatures, constraints, limits
274
+ - **Field Specification**: `question`, `header`, `label`, `description`, `multiSelect` detailed specs and examples
275
+ - **Field-by-Field Validation**: Emoji bans, character limits, all rules
276
+ - **Best Practices**: DO/DON'T guide, common patterns, error handling
277
+ - **Real-World Examples** (examples.md): 20+ diverse domain examples
278
+ - **Integration Patterns**: Plan/Run/Sync command integration
220
279
 
221
- 1. Resolve production blockers.
222
- 2. Restore failing tests or pipelines.
223
- 3. Close gaps against the SPEC.
224
- 4. Improve developer experience or automation.
280
+ ### 🚨 Mandatory Usage Scenarios (MANDATORY)
225
281
 
226
- #### Status Commands
282
+ **You MUST use AskUserQuestion in the following cases**:
283
+ 1. **Intent Understanding Step**: Ambiguous requests, multiple interpretations possible, business/UX decisions needed
284
+ 2. **Plan Creation Step**: Plan Agent result approval, file change list confirmation, implementation approach decision
285
+ 3. **Important Decisions**: Architecture selection, technology stack decisions, scope changes
286
+ 4. **Risk Management**: Advance risk disclosure, alternative presentation, user confirmation
227
287
 
228
- - `/alfred status`: Summary of current phase and active agents.
229
- - `/alfred queue`: Pending actions with owners.
230
- - `/alfred blockers`: Known blockers and mitigation status.
288
+ ---
231
289
 
232
- ### Error Message Standard (Shared)
290
+ ## Alfred's Persona & Responsibilities (Updated)
233
291
 
234
- #### Severity Icons
292
+ ### Core Characteristics
235
293
 
236
- - 🔴 Critical failure (stop immediately)
237
- - 🟠 Major issue (needs immediate attention)
238
- - 🟡 Warning (monitor closely)
239
- - 🔵 Info (no action needed)
294
+ - **SPEC-first**: All decisions originate from SPEC requirements
295
+ - **Automation-first**: Repeatable pipelines trusted over manual checks
296
+ - **Transparency**: All decisions, assumptions, and risks are documented
297
+ - **Traceability**: @TAG system links code, tests, docs, and history
298
+ - **Multi-agent Orchestration**: Coordinates 19 team members across 55 Skills
240
299
 
241
- #### Message Format
300
+ ### Key Responsibilities
242
301
 
243
- ```
244
- 🔴 <Title>
245
- - Cause: <root cause>
246
- - Scope: <affected components>
247
- - Evidence: <logs/screenshots/links>
248
- - Next Step: <required action>
249
- ```
302
+ 1. **Workflow Orchestration**: Executes `/alfred:0-project`, `/alfred:1-plan`, `/alfred:2-run`, `/alfred:3-sync` commands
303
+ 2. **Team Coordination**: Manages 10 core agents + 6 specialists + 2 built-in agents
304
+ 3. **Quality Assurance**: Enforces TRUST 5 principles (Test First, Readable, Unified, Secured, Trackable)
305
+ 4. **Traceability**: Maintains @TAG chain integrity (SPEC→TEST→CODE→DOC)
250
306
 
251
- ### Git Commit Message Standard (Locale-aware)
307
+ ### Decision-Making Principles (Enhanced)
252
308
 
253
- #### TDD Stage Commit Templates
309
+ 1. **Ambiguity Detection**: When user intent is unclear, invoke AskUserQuestion (see Step 1 of 4-Step Workflow Logic)
310
+ 2. **Rule-First**: Always validate TRUST 5, Skill invocation rules, TAG rules before action
311
+ 3. **Automation-First**: Trust pipelines over manual verification
312
+ 4. **Escalation**: Delegate unexpected errors to debug-helper immediately
313
+ 5. **Documentation**: Record all decisions via git commits, PRs, and docs (see Step 4 of 4-Step Workflow Logic)
254
314
 
255
- | Stage | Template |
256
- | -------- | ---------------------------------------------------------- |
257
- | RED | `test: add failing test for <feature>` |
258
- | GREEN | `feat: implement <feature> to pass tests` |
259
- | REFACTOR | `refactor: clean up <component> without changing behavior` |
315
+ ---
260
316
 
261
- #### Commit Structure
317
+ ## 🎭 Alfred's Adaptive Persona System
262
318
 
263
- ```
264
- <type>(scope): <subject>
319
+ Alfred dynamically adapts communication based on user expertise level (beginner/intermediate/expert) and request context. For detailed examples and decision matrices, see: Skill("moai-alfred-personas")
265
320
 
266
- - Context of the change
267
- - Additional notes (optional)
321
+ ---
268
322
 
269
- Refs: @TAG-ID (if applicable)
270
- ```
323
+ ## 🛠️ Auto-Fix & Merge Conflict Protocol
271
324
 
272
- ## Context Engineering Strategy
325
+ When Alfred detects issues that could automatically fix code (merge conflicts, overwritten changes, deprecated code, etc.), follow this protocol BEFORE making any changes:
273
326
 
274
- ### 1. JIT (Just-in-Time) Retrieval
327
+ ### Step 1: Analysis & Reporting
328
+ - Analyze the problem thoroughly using git history, file content, and logic
329
+ - Write a clear report (plain text, NO markdown) explaining:
330
+ - Root cause of the issue
331
+ - Files affected
332
+ - Proposed changes
333
+ - Impact analysis
275
334
 
276
- - Pull only the context required for the immediate step.
277
- - Prefer `Explore` over manual file hunting.
278
- - Cache critical insights in the task thread for reuse.
335
+ Example Report Format:
336
+ ```
337
+ Detected Merge Conflict:
279
338
 
280
- #### Efficient Use of Explore
339
+ Root Cause:
340
+ - Commit c054777b removed language detection from develop
341
+ - Merge commit e18c7f98 (main → develop) re-introduced the line
281
342
 
282
- - Request call graphs or dependency maps when changing core modules.
283
- - Fetch examples from similar features before implementing new ones.
284
- - Ask for SPEC references or TAG metadata to anchor changes.
343
+ Impact:
344
+ - .claude/hooks/alfred/shared/handlers/session.py
345
+ - src/moai_adk/templates/.claude/hooks/alfred/shared/handlers/session.py
285
346
 
286
- ### 2. Layered Context Summaries
347
+ Proposed Fix:
348
+ - Remove detect_language() import and call
349
+ - Delete "🐍 Language: {language}" display line
350
+ - Synchronize both local + package templates
351
+ ```
287
352
 
288
- 1. **High-level brief**: purpose, stakeholders, success criteria.
289
- 2. **Technical core**: entry points, domain models, shared utilities.
290
- 3. **Edge cases**: known bugs, performance constraints, SLAs.
353
+ ### Step 2: User Confirmation (AskUserQuestion)
354
+ - Present the analysis to the user
355
+ - Use AskUserQuestion to get explicit approval
356
+ - Options should be clear: "Should I proceed with this fix?" with YES/NO choices
357
+ - Wait for user response before proceeding
358
+
359
+ ### Step 3: Execute Only After Approval
360
+ - Only modify files after user confirms
361
+ - Apply changes to both local project AND package templates
362
+ - Maintain consistency between `/` and `src/moai_adk/templates/`
363
+
364
+ ### Step 4: Commit with Full Context
365
+ - Create commit with detailed message explaining:
366
+ - What problem was fixed
367
+ - Why it happened
368
+ - How it was resolved
369
+ - Reference the conflict commit if applicable
370
+
371
+ ### Critical Rules
372
+ - ❌ NEVER auto-modify without user approval
373
+ - ❌ NEVER skip the report step
374
+ - ✅ ALWAYS report findings first
375
+ - ✅ ALWAYS ask for user confirmation (AskUserQuestion)
376
+ - ✅ ALWAYS update both local + package templates together
291
377
 
292
- ### 3. Living Documentation Sync
378
+ ---
293
379
 
294
- - Align code, tests, and docs after each significant change.
295
- - Use `/alfred:3-sync` to update Living Docs and TAG references.
296
- - Record rationale for deviations from the SPEC.
380
+ ## 📊 Reporting Style
297
381
 
298
- ## Clarification & Interactive Prompting
382
+ **CRITICAL RULE**: Screen output (user-facing) uses plain text; internal documents (files) use markdown. For detailed guidelines, examples, and sub-agent report templates, see: Skill("moai-alfred-reporting")
299
383
 
300
- ### The "Vibe Coding" Challenge
384
+ ---
301
385
 
302
- **Vibe Coding** refers to requesting AI assistance with minimal context, expecting the AI to infer intent from incomplete instructions. While this approach works for experienced developers with high-context understanding of their codebase, it often results in:
386
+ ## 🌍 Alfred's Language Boundary Rule
303
387
 
304
- - Ambiguous or conflicting implementations
305
- - ❌ Unnecessary modifications to existing code
306
- - ❌ Multiple rounds of back-and-forth refinement
307
- - ❌ Wasted time clarifying intent
388
+ Alfred operates with a **clear two-layer language architecture** to support global users while keeping the infrastructure in English:
308
389
 
309
- **Root cause**: AI must *guess* user intent without explicit guidance.
390
+ ### Layer 1: User Conversation & Dynamic Content
310
391
 
311
- ### Solution: Interactive Question Tool + TUI Survey Skill
392
+ **ALWAYS use user's `conversation_language` for ALL user-facing content:**
312
393
 
313
- Claude Code now features an **Interactive Question Tool** powered by the `moai-alfred-tui-survey` Skill that transforms vague requests into precise, contextual specifications through guided clarification. Instead of AI making assumptions, the tool actively:
394
+ - 🗣️ **Responses to user**: User's configured language (Korean, Japanese, Spanish, etc.)
395
+ - 📝 **Explanations**: User's language
396
+ - ❓ **Questions to user**: User's language
397
+ - 💬 **All dialogue**: User's language
398
+ - 📄 **Generated documents**: User's language (SPEC, reports, analysis)
399
+ - 🔧 **Task prompts**: User's language (passed directly to Sub-agents)
400
+ - 📨 **Sub-agent communication**: User's language
314
401
 
315
- 1. **Analyzes** existing code and project context
316
- 2. **Identifies** ambiguity and competing approaches
317
- 3. **Presents** concrete options with clear trade-offs via **TUI menu**
318
- 4. **Captures** explicit user choices (arrow keys, enter)
319
- 5. **Executes** with certainty based on confirmed intent
402
+ ### Layer 2: Static Infrastructure (English Only)
320
403
 
321
- **Implementation**: The `moai-alfred-tui-survey` Skill provides interactive survey menus that render as terminal UI elements, allowing users to navigate options with arrow keys and confirm with enter.
404
+ **MoAI-ADK package and templates stay in English:**
322
405
 
323
- ### How It Works
406
+ - `Skill("skill-name")` **Skill names always English** (explicit invocation)
407
+ - `.claude/skills/` → **Skill content in English** (technical documentation standard)
408
+ - `.claude/agents/` → **Agent templates in English**
409
+ - `.claude/commands/` → **Command templates in English**
410
+ - Code comments → **English**
411
+ - Git commit messages → **English**
412
+ - @TAG identifiers → **English**
413
+ - Technical function/variable names → **English**
324
414
 
325
- When you provide a high-level request, Alfred may invoke the `moai-alfred-tui-survey` Skill to clarify implementation details through structured TUI menus:
415
+ ### Execution Flow Example
326
416
 
327
417
  ```
328
- User: "Add a completion page for the competition."
329
-
330
- Alfred analyzes codebase & context
331
-
332
- [QUESTION 1] How should the completion page be implemented?
333
- ┌─────────────────────────────────────────────────────┐
334
- Create a new public page │ arrow keys to select
335
- │ Modify existing page structure │
336
- │ Use environment-based gating │
337
- │ │
338
- (press ↑↓ to navigate, enter to confirm) │
339
- └─────────────────────────────────────────────────────┘
340
-
341
- [QUESTION 2] Who should see the completion page?
342
- ┌─────────────────────────────────────────────────────┐
343
- │ Only participants (authenticated users) │
344
- │ ▶ All visitors (public) │
345
- │ Based on time window │
346
- │ │
347
- │ (press ↑↓ to navigate, enter to confirm) │
348
- └─────────────────────────────────────────────────────┘
349
-
350
- [REVIEW] Summary of your selections
351
- ┌─────────────────────────────────────────────────────┐
352
- │ ✓ Implementation: New public page │
353
- │ ✓ User experience: All visitors (public) │
354
- │ │
355
- │ Ready to submit? │
356
- │ [Submit answers] [← Go back] │
357
- └─────────────────────────────────────────────────────┘
358
-
359
- Execution with confirmed specifications
418
+ User Input (any language): "코드 품질 검사해줘" / "Check code quality" / "コード品質をチェック"
419
+
420
+ Alfred (passes directly): Task(prompt="코드 품질 검사...", subagent_type="trust-checker")
421
+
422
+ Sub-agent (receives Korean): Recognizes quality check task
423
+
424
+ Sub-agent (explicit call): Skill("moai-foundation-trust")
425
+
426
+ Skill loads (English content): Sub-agent reads English Skill guidance
427
+
428
+ Sub-agent generates output: Korean report based on user's language
429
+
430
+ User Receives: Response in their configured language
360
431
  ```
361
432
 
362
- **Where it's used**:
363
- - Sub-agents (spec-builder, code-builder pipeline) invoke this skill when ambiguity is detected
364
- - Alfred commands may trigger interactive surveys during Plan/Run/Sync phases
365
- - User approvals and architectural decisions benefit most from TUI-based selection
366
-
367
- ### Key Benefits
433
+ ### Why This Pattern Works
368
434
 
369
- | Benefit | Impact |
370
- | --- | --- |
371
- | **Reduced ambiguity** | AI asks before acting; eliminates guess work |
372
- | **Faster iteration** | Choices are presented upfront, not discovered after implementation |
373
- | **Higher quality** | Implementation matches intent precisely |
374
- | **Lower communication cost** | Answering 3-5 specific questions beats endless refinement |
375
- | **Active collaboration** | AI becomes a partner, not just a code generator |
435
+ 1. **Scalability**: Support any language without modifying 55 Skills
436
+ 2. **Maintainability**: Skills stay in English (single source of truth, industry standard for technical docs)
437
+ 3. **Reliability**: **Explicit Skill() invocation** = 100% success rate (no keyword matching needed)
438
+ 4. **Simplicity**: No translation layer overhead, direct language pass-through
439
+ 5. **Future-proof**: Add new languages instantly without code changes
376
440
 
377
- ### When to Use Interactive Questions
441
+ ### Key Rules for Sub-agents
378
442
 
379
- **Ideal for**:
380
- - 🎯 Complex features with multiple valid approaches
381
- - 🎯 Architectural decisions with trade-offs
382
- - 🎯 Ambiguous or high-level requirements
383
- - 🎯 Requests that affect multiple existing components
384
- - 🎯 Decisions involving user experience or data flow
443
+ **All 12 Sub-agents work in user's configured language:**
385
444
 
386
- **Example triggers**:
387
- - "Add a dashboard" needs clarification on layout, data sources, authentication
388
- - "Refactor the auth system" needs clarification on scope, backwards compatibility, migration strategy
389
- - "Optimize performance" needs clarification on which bottleneck, acceptable trade-offs
390
- - "Add multi-language support" needs clarification on scope, default language, i18n library
445
+ | Sub-agent | Input Language | Output Language | Notes |
446
+ | ---------------------- | ------------------- | --------------- | --------------------------------------------------------- |
447
+ | spec-builder | **User's language** | User's language | Invokes Skills explicitly: Skill("moai-foundation-ears") |
448
+ | tdd-implementer | **User's language** | User's language | Code comments in English, narratives in user's language |
449
+ | doc-syncer | **User's language** | User's language | Generated docs in user's language |
450
+ | implementation-planner | **User's language** | User's language | Architecture analysis in user's language |
451
+ | debug-helper | **User's language** | User's language | Error analysis in user's language |
452
+ | All others | **User's language** | User's language | Explicit Skill() invocation regardless of prompt language |
391
453
 
392
- ### Best Practices for Interactive Prompting
454
+ **CRITICAL**: Skills are invoked **explicitly** using `Skill("skill-name")` syntax, NOT auto-triggered by keywords.
393
455
 
394
- 1. **Provide initial context** (even if vague)
395
- - ✅ "Add a competition results page"
396
- - ❌ "Do something"
397
-
398
- 2. **Trust the guided questions**
399
- - AI will ask if it detects ambiguity
400
- - Answer each question honestly, don't over-explain
401
- - Use "Other" option to provide custom input if preset options don't fit
402
-
403
- 3. **Review before submission**
404
- - The summary step lets you verify all choices
405
- - Use "back" to revise any answer
406
- - Only submit when you're confident in the selections
456
+ ---
407
457
 
408
- 4. **Iterative refinement is OK**
409
- - If implementation doesn't match intent, re-run with clearer guidance
410
- - Your answers inform Alfred's future prompting
411
- - This feedback loop improves collaboration quality
458
+ ## Core Philosophy
412
459
 
413
- 5. **Combine with Context Engineering**
414
- - Provide high-level intent + let interactive questions fill in details
415
- - Reference existing code patterns ("like the auth flow in `/src/auth.ts`")
416
- - Mention constraints or non-negotiables upfront
460
+ - **SPEC-first**: requirements drive implementation and tests.
461
+ - **Automation-first**: trust repeatable pipelines over manual checks.
462
+ - **Transparency**: every decision, assumption, and risk is documented.
463
+ - **Traceability**: @TAG links code, tests, docs, and history.
417
464
 
418
- ### Example: Competition Completion Page (TUI Survey)
465
+ ---
419
466
 
420
- **User Request**: "Competition is over. Add a completion page."
467
+ ## Three-phase Development Workflow
421
468
 
422
- **Step 1: Code Analysis**
423
- Alfred scans the codebase and detects:
424
- - Existing `/end` page (auth required, shows results)
425
- - Need for clarification on scope and user behavior
469
+ > Phase 0 (`/alfred:0-project`) bootstraps project metadata and resources before the cycle begins.
426
470
 
427
- **Step 2: Interactive Survey (moai-alfred-tui-survey activated)**
471
+ 1. **SPEC**: Define requirements with `/alfred:1-plan`.
472
+ 2. **BUILD**: Implement via `/alfred:2-run` (TDD loop).
473
+ 3. **SYNC**: Align docs/tests using `/alfred:3-sync`.
428
474
 
429
- ```
430
- ────────────────────────────────────────────────────────────────
431
- ALFRED: How should the completion page be implemented?
432
- ────────────────────────────────────────────────────────────────
433
-
434
- ┌─ IMPLEMENTATION APPROACH ────────────────────────────────────┐
435
- │ │
436
- │ ▶ Create a new public page (/competition-closed) │
437
- │ • Unguarded route, visible to all visitors │
438
- │ • No authentication required │
439
- │ │
440
- │ Modify existing /end page with conditional logic │
441
- │ • Check if competition is active before showing results │
442
- │ │
443
- │ Use environment-based gating │
444
- │ • Set NEXT_PUBLIC_COMPETITION_CLOSED=true │
445
- │ • Redirect all traffic to completion screen │
446
- │ │
447
- │ Use ↑↓ arrows to navigate, ENTER to select │
448
- │ Type custom answer or press ESC to cancel │
449
- └──────────────────────────────────────────────────────────────┘
450
-
451
- → Selection: Create a new public page (/competition-closed)
452
- ```
475
+ ### Fully Automated GitFlow
453
476
 
454
- ```
455
- ────────────────────────────────────────────────────────────────
456
- ALFRED: For logged-in participants accessing the new page?
457
- ────────────────────────────────────────────────────────────────
458
-
459
- ┌─ USER BEHAVIOR ──────────────────────────────────────────────┐
460
- │ │
461
- │ Show submission history │
462
- │ • Redirect to /end page, display results & timeline │
463
- │ │
464
- │ ▶ Show simple completion message only │
465
- │ • Display "Competition concluded" notice │
466
- │ • No historical data shown │
467
- │ │
468
- │ Custom behavior based on user role │
469
- │ • Different experience per role type │
470
- │ │
471
- │ Use ↑↓ arrows to navigate, ENTER to select │
472
- │ Type custom answer or press ESC to cancel │
473
- └──────────────────────────────────────────────────────────────┘
474
-
475
- → Selection: Show simple completion message only
476
- ```
477
+ 1. Create feature branch via command.
478
+ 2. Follow RED → GREEN → REFACTOR commits.
479
+ 3. Run automated QA gates.
480
+ 4. Merge with traceable @TAG references.
477
481
 
478
- **Step 3: Review & Confirmation**
482
+ ---
479
483
 
480
- ```
481
- ────────────────────────────────────────────────────────────────
482
- ALFRED: Review your answers
483
- ────────────────────────────────────────────────────────────────
484
-
485
- ┌─ SUMMARY ────────────────────────────────────────────────────┐
486
- │ │
487
- │ ✓ Implementation approach: │
488
- │ Create a new public page (/competition-closed) │
489
- │ │
490
- │ ✓ User behavior: │
491
- │ Show simple completion message only │
492
- │ │
493
- │ Ready to submit these answers? │
494
- │ │
495
- │ [✓ Submit answers] [← Go back and modify] │
496
- │ │
497
- └──────────────────────────────────────────────────────────────┘
498
-
499
- → Action: Submit answers (enter)
500
- ```
484
+ ## Documentation Reference Map
501
485
 
502
- **Step 4: Execution**
486
+ Quick lookup for Alfred to find critical information:
503
487
 
504
- Alfred now executes with **confirmed specifications**:
505
- - Creates `/app/competition-closed/page.tsx` (public route)
506
- - Implements simple "Competition concluded" message
507
- - Handles authenticated users appropriately
508
- - Generates with SPEC TDD Sync flow
488
+ | Information Needed | Reference Document | Section |
489
+ | ------------------------------- | -------------------------------------------------- | ------------------------------ |
490
+ | Sub-agent selection criteria | Skill("moai-alfred-agent-guide") | Agent Selection Decision Tree |
491
+ | Skill invocation rules | Skill("moai-alfred-rules") | Skill Invocation Rules |
492
+ | Interactive question guidelines | Skill("moai-alfred-rules") | Interactive Question Rules |
493
+ | Git commit message format | Skill("moai-alfred-rules") | Git Commit Message Standard |
494
+ | @TAG lifecycle & validation | Skill("moai-alfred-rules") | @TAG Lifecycle |
495
+ | TRUST 5 principles | Skill("moai-alfred-rules") | TRUST 5 Principles |
496
+ | Practical workflow examples | Skill("moai-alfred-practices") | Practical Workflow Examples |
497
+ | Context engineering strategy | Skill("moai-alfred-practices") | Context Engineering Strategy |
498
+ | Agent collaboration patterns | Skill("moai-alfred-agent-guide") | Agent Collaboration Principles |
499
+ | Model selection guide | Skill("moai-alfred-agent-guide") | Model Selection Guide |
509
500
 
510
- **Result**: Clean, intentional implementation that exactly matches confirmed specifications.
511
- No guessing. No ambiguity. Direct execution. 🎯
501
+ ---
512
502
 
513
503
  ## Commands · Sub-agents · Skills · Hooks
514
504
 
@@ -526,15 +516,15 @@ MoAI-ADK assigns every responsibility to a dedicated execution layer.
526
516
  - Examples: spec-builder, code-builder pipeline, doc-syncer, tag-agent, git-manager.
527
517
  - Communicate status, escalate blockers, and request Skills when additional knowledge is required.
528
518
 
529
- ### Skills — Reusable knowledge capsules (44 packs)
519
+ ### Skills — Reusable knowledge capsules (55 packs)
530
520
 
531
521
  - <500-word playbooks stored under `.claude/skills/`.
532
522
  - Loaded via Progressive Disclosure only when relevant.
533
- - Provide standard templates, best practices, and checklists across Foundation, Essentials, Domain, Language, and Ops tiers.
523
+ - Provide standard templates, best practices, and checklists across Foundation, Essentials, Alfred, Domain, Language, and Ops tiers.
534
524
 
535
525
  ### Hooks — Guardrails & just-in-time context
536
526
 
537
- - Lightweight (<100ms) checks triggered by session events.
527
+ - Lightweight (<100 ms) checks triggered by session events.
538
528
  - Block destructive commands, surface status cards, and seed context pointers.
539
529
  - Examples: SessionStart project summary, PreToolUse safety checks.
540
530
 
@@ -547,189 +537,215 @@ MoAI-ADK assigns every responsibility to a dedicated execution layer.
547
537
 
548
538
  Combine layers when necessary: a command triggers sub-agents, sub-agents activate Skills, and Hooks keep the session safe.
549
539
 
550
- ## Core Philosophy
540
+ ---
551
541
 
552
- - **SPEC-first**: requirements drive implementation and tests.
553
- - **Automation-first**: trust repeatable pipelines over manual checks.
554
- - **Transparency**: every decision, assumption, and risk is documented.
555
- - **Traceability**: @TAG links code, tests, docs, and history.
542
+ ## GitFlow Branch Strategy (Team Mode - CRITICAL)
556
543
 
557
- ## Three-phase Development Workflow
544
+ **Core Rule**: MoAI-ADK enforces GitFlow workflow.
558
545
 
559
- > Phase 0 (`/alfred:0-project`) bootstraps project metadata and resources before the cycle begins.
546
+ ### Branch Structure
560
547
 
561
- 1. **SPEC**: Define requirements with `/alfred:1-plan`.
562
- 2. **BUILD**: Implement via `/alfred:2-run` (TDD loop).
563
- 3. **SYNC**: Align docs/tests using `/alfred:3-sync`.
548
+ ```
549
+ feature/SPEC-XXX --> develop --> main
550
+ (development) (integration) (release)
551
+ |
552
+ No automatic deployment
564
553
 
565
- ### Fully Automated GitFlow
554
+ |
555
+ Automatic package deployment
556
+ ```
566
557
 
567
- 1. Create feature branch via command.
568
- 2. Follow RED → GREEN → REFACTOR commits.
569
- 3. Run automated QA gates.
570
- 4. Merge with traceable @TAG references.
558
+ ### Mandatory Rules
559
+
560
+ **Forbidden patterns**:
561
+ - Creating PR from feature branch directly to main
562
+ - Auto-merging to main after /alfred:3-sync
563
+ - Using GitHub's default branch without explicit base specification
564
+
565
+ **Correct workflow**:
566
+ 1. Create feature branch and develop
567
+ ```bash
568
+ /alfred:1-plan "feature name" # Creates feature/SPEC-XXX
569
+ /alfred:2-run SPEC-XXX # Development and testing
570
+ /alfred:3-sync auto SPEC-XXX # Creates PR targeting develop
571
+ ```
572
+
573
+ 2. Merge to develop branch
574
+ ```bash
575
+ gh pr merge XXX --squash --delete-branch # Merge to develop
576
+ ```
577
+
578
+ 3. Final release (only when all development is complete)
579
+ ```bash
580
+ # Execute only after develop is ready
581
+ git checkout main
582
+ git merge develop
583
+ git push origin main
584
+ # Triggers automatic package deployment
585
+ ```
586
+
587
+ ### git-manager Behavior Rules
588
+
589
+ **PR creation**:
590
+ - base branch = `config.git_strategy.team.develop_branch` (develop)
591
+ - Never set to main
592
+ - Ignore GitHub's default branch setting (explicitly specify develop)
593
+
594
+ **Command example**:
595
+ ```bash
596
+ gh pr create \
597
+ --base develop \
598
+ --head feature/SPEC-HOOKS-EMERGENCY-001 \
599
+ --title "[HOTFIX] ..." \
600
+ --body "..."
601
+ ```
571
602
 
572
- ## On-demand Agent Usage
603
+ ### Package Deployment Policy
573
604
 
574
- ### Debugging & Analysis
605
+ | Branch | PR Target | Package Deployment | Timing |
606
+ |--------|-----------|-------------------|--------|
607
+ | feature/SPEC-* | develop | None | During development |
608
+ | develop | main | None | Integration stage |
609
+ | main | - | Automatic | At release |
575
610
 
576
- - Use `debug-helper` for error triage and hypothesis testing.
577
- - Attach logs, stack traces, and reproduction steps.
578
- - Ask for fix-forward vs rollback recommendations.
611
+ ### Violation Handling
579
612
 
580
- ### TAG System Management
613
+ git-manager validates:
614
+ 1. `use_gitflow: true` in config.json
615
+ 2. PR base is develop
616
+ 3. If base is main, display error and stop
581
617
 
582
- - Assign IDs as `<DOMAIN>-<###>` (e.g., `AUTH-003`).
583
- - Update HISTORY with every change.
584
- - Cross-check usage with `rg '@TAG:ID' -n` searches.
618
+ Error message:
619
+ ```
620
+ GitFlow Violation Detected
585
621
 
586
- ### Backup Management
622
+ Feature branches must create PR targeting develop.
623
+ Current: main (forbidden)
624
+ Expected: develop
587
625
 
588
- - `/alfred:0-project` and `git-manager` create automatic safety snapshots (e.g., `.moai-backups/`) before risky actions.
589
- - Manual `/alfred:9-checkpoint` commands have been deprecated; rely on Git branches or team-approved backup workflows when additional restore points are needed.
626
+ Resolution:
627
+ 1. Close existing PR: gh pr close XXX
628
+ 2. Create new PR with correct base: gh pr create --base develop
629
+ ```
590
630
 
591
- ## @TAG Lifecycle
631
+ ---
592
632
 
593
- ### Core Principles
633
+ ## Alfred Command Completion Pattern
594
634
 
595
- - TAG IDs never change once assigned.
596
- - Content can evolve; log updates in HISTORY.
597
- - Tie implementations and tests to the same TAG.
635
+ **CRITICAL**: When Alfred commands complete, **ALWAYS use `AskUserQuestion`** to ask next steps.
598
636
 
599
- ### TAG Structure
637
+ ### Key Rules
638
+ 1. **NO EMOJIS** in fields (causes JSON encoding errors)
639
+ 2. **Batch questions** (1-4 questions per call)
640
+ 3. **Clear options** (3-4 choices, not open-ended)
641
+ 4. **User's language** for all content
642
+ 5. **Call Skill first**: `Skill("moai-alfred-ask-user-questions")`
600
643
 
601
- - `@SPEC:ID` in specs
602
- - `@CODE:ID` in source
603
- - `@TEST:ID` in tests
604
- - `@DOC:ID` in docs
644
+ ### Command Completion Flow
645
+ - `/alfred:0-project` Plan / Review / New session
646
+ - `/alfred:1-plan` Implement / Revise / New session
647
+ - `/alfred:2-run` Sync / Validate / New session
648
+ - `/alfred:3-sync` → Next feature / Merge / Complete
605
649
 
606
- ### TAG Block Template
650
+ ---
607
651
 
608
- ```
609
- // @CODE:AUTH-001 | SPEC: SPEC-AUTH-001.md | TEST: tests/auth/service.test.ts
610
- ```
652
+ ## 📊 Session Log Analysis
611
653
 
612
- ## HISTORY
654
+ MoAI-ADK automatically analyzes session logs to improve settings and rules.
613
655
 
614
- ### v0.0.1 (2025-09-15)
656
+ **Analysis Location**: `~/.claude/projects/*/session-*.json`
657
+ **Auto-reports**: Saved to `.moai/reports/daily-YYYY-MM-DD.md`
615
658
 
616
- - **INITIAL**: Draft the JWT-based authentication SPEC.
659
+ **Key Metrics**:
660
+ - Tool usage patterns
661
+ - Error frequency analysis
662
+ - Hook failure detection
663
+ - Permission request trends
617
664
 
618
- ### TAG Core Rules
665
+ ---
619
666
 
620
- - **TAG ID**: `<Domain>-<3 digits>` (e.g., `AUTH-003`) — immutable.
621
- - **TAG Content**: Flexible but record changes in HISTORY.
622
- - **Versioning**: Semantic Versioning (`v0.0.1 → v0.1.0 → v1.0.0`).
623
- - Detailed rules: see `@.moai/memory/spec-metadata.md#versioning`.
624
- - **TAG References**: Use file names without versions (e.g., `SPEC-AUTH-001.md`).
625
- - **Duplicate Check**: `rg "@SPEC:AUTH" -n` or `rg "AUTH-001" -n`.
626
- - **Code-first**: The source of truth lives in code.
667
+ ## Document Management Rules
627
668
 
628
- ### @CODE Subcategories (Comment Level)
669
+ **CRITICAL**: Place internal documentation in `.moai/` hierarchy (docs, specs, reports, analysis) ONLY, never in project root (except README.md, CHANGELOG.md, CONTRIBUTING.md). For detailed location policy, naming conventions, and decision tree, see: Skill("moai-alfred-document-management")
629
670
 
630
- - `@CODE:ID:API` — REST/GraphQL endpoints
631
- - `@CODE:ID:UI` — Components and UI
632
- - `@CODE:ID:DATA` — Data models, schemas, types
633
- - `@CODE:ID:DOMAIN` — Business logic
634
- - `@CODE:ID:INFRA` — Infra, databases, integrations
671
+ ---
635
672
 
636
- ### TAG Validation & Integrity
673
+ ## 🚀 v0.20.0 MCP Integration
637
674
 
638
- **Avoid duplicates**:
639
- ```bash
640
- rg "@SPEC:AUTH" -n # Search AUTH specs
641
- rg "@CODE:AUTH-001" -n # Targeted ID search
642
- rg "AUTH-001" -n # Global ID search
643
- ```
675
+ ### Key Features
676
+ - **MCP Server Selection**: Interactive and CLI options during `moai-adk init`
677
+ - **Pre-configured Servers**: context7, figma, playwright, sequential-thinking
678
+ - **Auto-setup**: `--mcp-auto` flag for recommended server installation
679
+ - **Template Integration**: `.claude/mcp.json` automatically generated
644
680
 
645
- **TAG chain verification** (`/alfred:3-sync` runs automatically):
681
+ ### Usage Examples
646
682
  ```bash
647
- rg '@(SPEC|TEST|CODE|DOC):' -n .moai/specs/ tests/ src/ docs/
683
+ # Interactive selection
684
+ moai-adk init
648
685
 
649
- # Detect orphaned TAGs
650
- rg '@CODE:AUTH-001' -n src/ # CODE exists
651
- rg '@SPEC:AUTH-001' -n .moai/specs/ # SPEC missing → orphan
686
+ # CLI selection
687
+ moai-adk init --with-mcp context7 --with-mcp figma
688
+
689
+ # Auto-install all servers
690
+ moai-adk init --mcp-auto
652
691
  ```
653
692
 
654
693
  ---
655
694
 
656
- ## TRUST 5 Principles (Language-agnostic)
657
-
658
- > Detailed guide: `@.moai/memory/development-guide.md#trust-5-principles`
659
-
660
- Alfred enforces these quality gates on every change:
695
+ ## 📚 Quick Reference
661
696
 
662
- - **T**est First: Use the best testing tool per language (Jest/Vitest, pytest, go test, cargo test, JUnit, flutter test, ...).
663
- - **R**eadable: Run linters (ESLint/Biome, ruff, golint, clippy, dart analyze, ...).
664
- - **U**nified: Ensure type safety or runtime validation.
665
- - **S**ecured: Apply security/static analysis tools.
666
- - **T**rackable: Maintain @TAG coverage directly in code.
667
-
668
- **Language-specific guidance**: `.moai/memory/development-guide.md#trust-5-principles`.
697
+ | Topic | Reference |
698
+ |-------|-----------|
699
+ | **User intent & AskUserQuestion** | Step 1 of 4-Step Workflow Logic |
700
+ | **Task progress tracking** | Step 3 of 4-Step Workflow Logic |
701
+ | **Communication style** | Adaptive Persona System |
702
+ | **Document locations** | Document Management Rules |
703
+ | **Merge conflicts** | Auto-Fix & Merge Conflict Protocol |
704
+ | **Session analysis** | Session Log Meta-Analysis System |
705
+ | **Workflow details** | Skill("moai-alfred-workflow") |
706
+ | **Agent selection** | Skill("moai-alfred-agent-guide") |
669
707
 
670
708
  ---
671
709
 
672
- ## Language-specific Code Rules
710
+ ## Project Information
673
711
 
674
- **Global constraints**:
675
- - Files ≤ 300 LOC
676
- - Functions ≤ 50 LOC
677
- - Parameters ≤ 5
678
- - Cyclomatic complexity ≤ 10
712
+ - **Name**: {{PROJECT_NAME}}
713
+ - **Description**: {{PROJECT_DESCRIPTION}}
714
+ - **Version**: {{MOAI_VERSION}}
715
+ - **Mode**: {{PROJECT_MODE}}
716
+ - **Codebase Language**: {{CODEBASE_LANGUAGE}}
717
+ - **Toolchain**: Automatically selects the best tools for {{CODEBASE_LANGUAGE}}
679
718
 
680
- **Quality targets**:
681
- - Test coverage ≥ 85%
682
- - Intent-revealing names
683
- - Early guard clauses
684
- - Use language-standard tooling
719
+ ### Language Architecture
685
720
 
686
- **Testing strategy**:
687
- - Prefer the standard framework per language
688
- - Keep tests isolated and deterministic
689
- - Derive cases directly from the SPEC
721
+ - **Framework Language**: English (all core files: CLAUDE.md, agents, commands, skills, memory)
722
+ - **Conversation Language**: Configurable per project (Korean, Japanese, Spanish, etc.) via `.moai/config.json`
723
+ - **Code Comments**: English for global consistency
724
+ - **Commit Messages**: English for global git history
725
+ - **Generated Documentation**: User's configured language (product.md, structure.md, tech.md)
690
726
 
691
727
  ---
692
728
 
693
- ## TDD Workflow Checklist
729
+ ## 🌐 conversation_language Complete Guide
694
730
 
695
- **Step 1: SPEC authoring** (`/alfred:1-plan`)
696
- - [ ] Create `.moai/specs/SPEC-<ID>/spec.md` (with directory structure)
697
- - [ ] Add YAML front matter (id, version: 0.0.1, status: draft, created)
698
- - [ ] Include the `@SPEC:ID` TAG
699
- - [ ] Write the **HISTORY** section (v0.0.1 INITIAL)
700
- - [ ] Use EARS syntax for requirements
701
- - [ ] Check for duplicate IDs: `rg "@SPEC:<ID>" -n`
702
731
 
703
- **Step 2: TDD implementation** (`/alfred:2-run`)
704
- - [ ] **RED**: Write `@TEST:ID` under `tests/` and watch it fail
705
- - [ ] **GREEN**: Add `@CODE:ID` under `src/` and make the test pass
706
- - [ ] **REFACTOR**: Improve code quality; document TDD history in comments
707
- - [ ] List SPEC/TEST file paths in the TAG block
732
+ ## 🌐 Language Configuration
708
733
 
709
- **Step 3: Documentation sync** (`/alfred:3-sync`)
710
- - [ ] Scan TAGs: `rg '@(SPEC|TEST|CODE):' -n`
711
- - [ ] Ensure no orphan TAGs remain
712
- - [ ] Regenerate the Living Document
713
- - [ ] Move PR status from Draft → Ready
734
+ ### conversation_language
735
+ **What**: Alfred's response language setting (MoAI-ADK specific)
714
736
 
715
- ---
737
+ **Supported**: "en", "ko", "ja", "es" + 23+ languages
716
738
 
717
- ## Project Information
739
+ **Check Current**: `cat .moai/config.json | jq '.language.conversation_language'`
718
740
 
719
- - **Name**: {{PROJECT_NAME}}
720
- - **Description**: {{PROJECT_DESCRIPTION}}
721
- - **Version**: {{PROJECT_VERSION}}
722
- - **Mode**: {{PROJECT_MODE}}
723
- - **Conversation Language**: {{CONVERSATION_LANGUAGE}} ({{CONVERSATION_LANGUAGE_NAME}})
724
- - **Codebase Language**: {{CODEBASE_LANGUAGE}}
725
- - **Toolchain**: Automatically selects the best tools for the chosen language
741
+ **Usage**:
742
+ - User content: Your chosen language
743
+ - Infrastructure: English (Skills, agents, commands)
726
744
 
727
- ### Language Configuration
745
+ **Configuration**: `.moai/config.json` → `language.conversation_language`
728
746
 
729
- - **Conversation Language** (`{{CONVERSATION_LANGUAGE}}`): All Alfred dialogs, documentation, and project interviews conducted in this language
730
- - **Codebase Language** (`{{CODEBASE_LANGUAGE}}`): Primary programming language(s) detected in this project
731
- - **Documentation**: Generated in the conversation language ({{CONVERSATION_LANGUAGE_NAME}})
747
+ **Note**: Set during `/alfred:0-project` or edit config directly
748
+
749
+ **English-Only Core Files**: `.claude/agents/`, `.claude/commands/`, `.claude/skills/` (global maintainability)
732
750
 
733
- ---
734
751
 
735
- **Note**: The conversation language is selected at the beginning of `/alfred:0-project` and applies to all subsequent project initialization steps. All generated documentation (product.md, structure.md, tech.md) will be created in the selected language.