moai-adk 0.15.1__py3-none-any.whl → 0.25.4__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 (417) hide show
  1. moai_adk/__init__.py +1 -2
  2. moai_adk/__main__.py +85 -2
  3. moai_adk/cli/__init__.py +0 -1
  4. moai_adk/cli/commands/__init__.py +0 -1
  5. moai_adk/cli/commands/analyze.py +127 -0
  6. moai_adk/cli/commands/backup.py +5 -3
  7. moai_adk/cli/commands/doctor.py +35 -11
  8. moai_adk/cli/commands/improve_user_experience.py +348 -0
  9. moai_adk/cli/commands/init.py +150 -23
  10. moai_adk/cli/commands/language.py +269 -0
  11. moai_adk/cli/commands/migrate.py +158 -0
  12. moai_adk/cli/commands/status.py +13 -12
  13. moai_adk/cli/commands/update.py +364 -60
  14. moai_adk/cli/commands/validate_links.py +118 -0
  15. moai_adk/cli/main.py +3 -2
  16. moai_adk/cli/prompts/init_prompts.py +79 -82
  17. moai_adk/core/__init__.py +0 -1
  18. moai_adk/core/analysis/__init__.py +9 -0
  19. moai_adk/core/analysis/session_analyzer.py +439 -0
  20. moai_adk/core/claude_integration.py +421 -0
  21. moai_adk/core/command_helpers.py +270 -0
  22. moai_adk/core/config/__init__.py +6 -0
  23. moai_adk/core/config/auto_spec_config.py +346 -0
  24. moai_adk/core/config/migration.py +133 -12
  25. moai_adk/core/context_manager.py +279 -0
  26. moai_adk/core/diagnostics/slash_commands.py +0 -1
  27. moai_adk/core/error_recovery_system.py +1289 -0
  28. moai_adk/core/git/__init__.py +0 -1
  29. moai_adk/core/git/branch.py +0 -1
  30. moai_adk/core/git/branch_manager.py +4 -4
  31. moai_adk/core/git/checkpoint.py +1 -5
  32. moai_adk/core/git/commit.py +0 -1
  33. moai_adk/core/git/event_detector.py +3 -5
  34. moai_adk/core/git/manager.py +0 -1
  35. moai_adk/core/hooks/post_tool_auto_spec_completion.py +925 -0
  36. moai_adk/core/integration/__init__.py +22 -0
  37. moai_adk/core/integration/engine.py +169 -0
  38. moai_adk/core/integration/integration_tester.py +225 -0
  39. moai_adk/core/integration/models.py +88 -0
  40. moai_adk/core/integration/utils.py +211 -0
  41. moai_adk/core/issue_creator.py +28 -18
  42. moai_adk/core/language_config.py +202 -0
  43. moai_adk/core/language_validator.py +556 -0
  44. moai_adk/core/mcp/setup.py +113 -0
  45. moai_adk/core/migration/__init__.py +18 -0
  46. moai_adk/core/migration/backup_manager.py +208 -0
  47. moai_adk/core/migration/file_migrator.py +218 -0
  48. moai_adk/core/migration/version_detector.py +143 -0
  49. moai_adk/core/migration/version_migrator.py +228 -0
  50. moai_adk/core/performance/__init__.py +6 -0
  51. moai_adk/core/performance/cache_system.py +318 -0
  52. moai_adk/core/performance/parallel_processor.py +116 -0
  53. moai_adk/core/project/__init__.py +0 -1
  54. moai_adk/core/project/backup_utils.py +2 -7
  55. moai_adk/core/project/checker.py +3 -3
  56. moai_adk/core/project/detector.py +20 -40
  57. moai_adk/core/project/initializer.py +42 -17
  58. moai_adk/core/project/phase_executor.py +415 -58
  59. moai_adk/core/project/validator.py +6 -25
  60. moai_adk/core/quality/__init__.py +1 -1
  61. moai_adk/core/quality/trust_checker.py +64 -110
  62. moai_adk/core/quality/validators/__init__.py +1 -1
  63. moai_adk/core/quality/validators/base_validator.py +1 -1
  64. moai_adk/core/rollback_manager.py +993 -0
  65. moai_adk/core/session_manager.py +667 -0
  66. moai_adk/core/spec/confidence_scoring.py +749 -0
  67. moai_adk/core/spec/ears_template_engine.py +1182 -0
  68. moai_adk/core/spec/quality_validator.py +721 -0
  69. moai_adk/core/spec_status_manager.py +488 -0
  70. moai_adk/core/template/__init__.py +0 -1
  71. moai_adk/core/template/backup.py +41 -1
  72. moai_adk/core/template/config.py +11 -12
  73. moai_adk/core/template/languages.py +0 -1
  74. moai_adk/core/template/merger.py +79 -22
  75. moai_adk/core/template/processor.py +614 -40
  76. moai_adk/core/template_engine.py +36 -27
  77. moai_adk/foundation/git/commit_templates.py +565 -0
  78. moai_adk/foundation/trust/trust_principles.py +725 -0
  79. moai_adk/foundation/trust/validation_checklist.py +1678 -0
  80. moai_adk/statusline/__init__.py +38 -0
  81. moai_adk/statusline/alfred_detector.py +107 -0
  82. moai_adk/statusline/config.py +364 -0
  83. moai_adk/statusline/enhanced_output_style_detector.py +364 -0
  84. moai_adk/statusline/git_collector.py +190 -0
  85. moai_adk/statusline/main.py +228 -0
  86. moai_adk/statusline/metrics_tracker.py +78 -0
  87. moai_adk/statusline/renderer.py +327 -0
  88. moai_adk/statusline/update_checker.py +135 -0
  89. moai_adk/statusline/version_reader.py +647 -0
  90. moai_adk/templates/.git-hooks/pre-commit +66 -0
  91. moai_adk/templates/.git-hooks/pre-push +116 -4
  92. moai_adk/templates/.github/workflows/moai-gitflow.yml +1 -7
  93. moai_adk/templates/.github/workflows/spec-issue-sync.yml +0 -1
  94. moai_adk/templates/.gitignore +44 -0
  95. moai_adk/templates/.mcp.json +22 -0
  96. moai_adk/templates/CLAUDE.md +450 -1071
  97. moai_adk/utils/__init__.py +0 -1
  98. moai_adk/utils/banner.py +0 -1
  99. moai_adk/utils/common.py +308 -0
  100. moai_adk/utils/link_validator.py +249 -0
  101. moai_adk/utils/logger.py +4 -9
  102. moai_adk/utils/safe_file_reader.py +210 -0
  103. moai_adk/utils/user_experience.py +531 -0
  104. moai_adk-0.25.4.dist-info/METADATA +2279 -0
  105. moai_adk-0.25.4.dist-info/RECORD +112 -0
  106. moai_adk/core/tags/__init__.py +0 -86
  107. moai_adk/core/tags/ci_validator.py +0 -463
  108. moai_adk/core/tags/cli.py +0 -283
  109. moai_adk/core/tags/generator.py +0 -109
  110. moai_adk/core/tags/inserter.py +0 -99
  111. moai_adk/core/tags/mapper.py +0 -126
  112. moai_adk/core/tags/parser.py +0 -76
  113. moai_adk/core/tags/pre_commit_validator.py +0 -393
  114. moai_adk/core/tags/reporter.py +0 -956
  115. moai_adk/core/tags/tags.py +0 -149
  116. moai_adk/core/tags/validator.py +0 -897
  117. moai_adk/templates/.claude/agents/alfred/backend-expert.md +0 -319
  118. moai_adk/templates/.claude/agents/alfred/cc-manager.md +0 -316
  119. moai_adk/templates/.claude/agents/alfred/debug-helper.md +0 -208
  120. moai_adk/templates/.claude/agents/alfred/devops-expert.md +0 -464
  121. moai_adk/templates/.claude/agents/alfred/doc-syncer.md +0 -214
  122. moai_adk/templates/.claude/agents/alfred/frontend-expert.md +0 -357
  123. moai_adk/templates/.claude/agents/alfred/git-manager.md +0 -406
  124. moai_adk/templates/.claude/agents/alfred/implementation-planner.md +0 -423
  125. moai_adk/templates/.claude/agents/alfred/project-manager.md +0 -312
  126. moai_adk/templates/.claude/agents/alfred/quality-gate.md +0 -343
  127. moai_adk/templates/.claude/agents/alfred/skill-factory.md +0 -865
  128. moai_adk/templates/.claude/agents/alfred/spec-builder.md +0 -426
  129. moai_adk/templates/.claude/agents/alfred/tag-agent.md +0 -361
  130. moai_adk/templates/.claude/agents/alfred/tdd-implementer.md +0 -428
  131. moai_adk/templates/.claude/agents/alfred/trust-checker.md +0 -375
  132. moai_adk/templates/.claude/agents/alfred/ui-ux-expert.md +0 -571
  133. moai_adk/templates/.claude/commands/alfred/0-project.md +0 -1854
  134. moai_adk/templates/.claude/commands/alfred/1-plan.md +0 -880
  135. moai_adk/templates/.claude/commands/alfred/2-run.md +0 -793
  136. moai_adk/templates/.claude/commands/alfred/3-sync.md +0 -1084
  137. moai_adk/templates/.claude/commands/alfred/9-feedback.md +0 -149
  138. moai_adk/templates/.claude/hooks/alfred/core/project.py +0 -748
  139. moai_adk/templates/.claude/hooks/alfred/core/timeout.py +0 -136
  140. moai_adk/templates/.claude/hooks/alfred/core/ttl_cache.py +0 -108
  141. moai_adk/templates/.claude/hooks/alfred/core/version_cache.py +0 -198
  142. moai_adk/templates/.claude/hooks/alfred/handlers/__init__.py +0 -29
  143. moai_adk/templates/.claude/hooks/alfred/post_tool__log_changes.py +0 -94
  144. moai_adk/templates/.claude/hooks/alfred/pre_tool__auto_checkpoint.py +0 -100
  145. moai_adk/templates/.claude/hooks/alfred/session_end__cleanup.py +0 -94
  146. moai_adk/templates/.claude/hooks/alfred/session_start__show_project_info.py +0 -94
  147. moai_adk/templates/.claude/hooks/alfred/shared/core/__init__.py +0 -170
  148. moai_adk/templates/.claude/hooks/alfred/shared/core/checkpoint.py +0 -271
  149. moai_adk/templates/.claude/hooks/alfred/shared/core/context.py +0 -67
  150. moai_adk/templates/.claude/hooks/alfred/shared/core/project.py +0 -749
  151. moai_adk/templates/.claude/hooks/alfred/shared/core/tags.py +0 -230
  152. moai_adk/templates/.claude/hooks/alfred/shared/core/version_cache.py +0 -198
  153. moai_adk/templates/.claude/hooks/alfred/shared/handlers/__init__.py +0 -21
  154. moai_adk/templates/.claude/hooks/alfred/shared/handlers/notification.py +0 -154
  155. moai_adk/templates/.claude/hooks/alfred/shared/handlers/session.py +0 -174
  156. moai_adk/templates/.claude/hooks/alfred/shared/handlers/tool.py +0 -87
  157. moai_adk/templates/.claude/hooks/alfred/shared/handlers/user.py +0 -61
  158. moai_adk/templates/.claude/hooks/alfred/user_prompt__jit_load_docs.py +0 -112
  159. moai_adk/templates/.claude/hooks/alfred/utils/__init__.py +0 -1
  160. moai_adk/templates/.claude/hooks/alfred/utils/timeout.py +0 -161
  161. moai_adk/templates/.claude/settings.json +0 -144
  162. moai_adk/templates/.claude/skills/moai-alfred-agent-guide/SKILL.md +0 -70
  163. moai_adk/templates/.claude/skills/moai-alfred-agent-guide/examples.md +0 -62
  164. moai_adk/templates/.claude/skills/moai-alfred-agent-guide/reference.md +0 -242
  165. moai_adk/templates/.claude/skills/moai-alfred-config-schema/SKILL.md +0 -56
  166. moai_adk/templates/.claude/skills/moai-alfred-config-schema/examples.md +0 -28
  167. moai_adk/templates/.claude/skills/moai-alfred-config-schema/reference.md +0 -444
  168. moai_adk/templates/.claude/skills/moai-alfred-context-budget/SKILL.md +0 -62
  169. moai_adk/templates/.claude/skills/moai-alfred-context-budget/examples.md +0 -28
  170. moai_adk/templates/.claude/skills/moai-alfred-context-budget/reference.md +0 -405
  171. moai_adk/templates/.claude/skills/moai-alfred-dev-guide/SKILL.md +0 -51
  172. moai_adk/templates/.claude/skills/moai-alfred-dev-guide/examples.md +0 -355
  173. moai_adk/templates/.claude/skills/moai-alfred-dev-guide/reference.md +0 -239
  174. moai_adk/templates/.claude/skills/moai-alfred-ears-authoring/SKILL.md +0 -113
  175. moai_adk/templates/.claude/skills/moai-alfred-ears-authoring/examples.md +0 -29
  176. moai_adk/templates/.claude/skills/moai-alfred-ears-authoring/reference.md +0 -28
  177. moai_adk/templates/.claude/skills/moai-alfred-expertise-detection/SKILL.md +0 -323
  178. moai_adk/templates/.claude/skills/moai-alfred-expertise-detection/examples.md +0 -286
  179. moai_adk/templates/.claude/skills/moai-alfred-expertise-detection/reference.md +0 -126
  180. moai_adk/templates/.claude/skills/moai-alfred-git-workflow/SKILL.md +0 -122
  181. moai_adk/templates/.claude/skills/moai-alfred-git-workflow/examples.md +0 -29
  182. moai_adk/templates/.claude/skills/moai-alfred-git-workflow/reference.md +0 -29
  183. moai_adk/templates/.claude/skills/moai-alfred-gitflow-policy/SKILL.md +0 -74
  184. moai_adk/templates/.claude/skills/moai-alfred-gitflow-policy/examples.md +0 -4
  185. moai_adk/templates/.claude/skills/moai-alfred-gitflow-policy/reference.md +0 -269
  186. moai_adk/templates/.claude/skills/moai-alfred-interactive-questions/SKILL.md +0 -237
  187. moai_adk/templates/.claude/skills/moai-alfred-interactive-questions/examples.md +0 -615
  188. moai_adk/templates/.claude/skills/moai-alfred-interactive-questions/reference.md +0 -653
  189. moai_adk/templates/.claude/skills/moai-alfred-issue-labels/SKILL.md +0 -19
  190. moai_adk/templates/.claude/skills/moai-alfred-issue-labels/examples.md +0 -4
  191. moai_adk/templates/.claude/skills/moai-alfred-issue-labels/reference.md +0 -150
  192. moai_adk/templates/.claude/skills/moai-alfred-language-detection/SKILL.md +0 -113
  193. moai_adk/templates/.claude/skills/moai-alfred-language-detection/examples.md +0 -29
  194. moai_adk/templates/.claude/skills/moai-alfred-language-detection/reference.md +0 -28
  195. moai_adk/templates/.claude/skills/moai-alfred-persona-roles/SKILL.md +0 -198
  196. moai_adk/templates/.claude/skills/moai-alfred-persona-roles/examples.md +0 -431
  197. moai_adk/templates/.claude/skills/moai-alfred-persona-roles/reference.md +0 -141
  198. moai_adk/templates/.claude/skills/moai-alfred-practices/SKILL.md +0 -89
  199. moai_adk/templates/.claude/skills/moai-alfred-practices/examples.md +0 -122
  200. moai_adk/templates/.claude/skills/moai-alfred-practices/reference.md +0 -369
  201. moai_adk/templates/.claude/skills/moai-alfred-proactive-suggestions/SKILL.md +0 -508
  202. moai_adk/templates/.claude/skills/moai-alfred-proactive-suggestions/examples.md +0 -481
  203. moai_adk/templates/.claude/skills/moai-alfred-proactive-suggestions/reference.md +0 -100
  204. moai_adk/templates/.claude/skills/moai-alfred-reporting/SKILL.md +0 -273
  205. moai_adk/templates/.claude/skills/moai-alfred-rules/SKILL.md +0 -77
  206. moai_adk/templates/.claude/skills/moai-alfred-rules/examples.md +0 -265
  207. moai_adk/templates/.claude/skills/moai-alfred-rules/reference.md +0 -539
  208. moai_adk/templates/.claude/skills/moai-alfred-session-state/SKILL.md +0 -19
  209. moai_adk/templates/.claude/skills/moai-alfred-session-state/examples.md +0 -4
  210. moai_adk/templates/.claude/skills/moai-alfred-session-state/reference.md +0 -84
  211. moai_adk/templates/.claude/skills/moai-alfred-spec-authoring/README.md +0 -137
  212. moai_adk/templates/.claude/skills/moai-alfred-spec-authoring/SKILL.md +0 -219
  213. moai_adk/templates/.claude/skills/moai-alfred-spec-authoring/examples/validate-spec.sh +0 -161
  214. moai_adk/templates/.claude/skills/moai-alfred-spec-authoring/examples.md +0 -541
  215. moai_adk/templates/.claude/skills/moai-alfred-spec-authoring/reference.md +0 -622
  216. moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-extended/SKILL.md +0 -115
  217. moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-extended/examples.md +0 -4
  218. moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-extended/reference.md +0 -348
  219. moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-validation/SKILL.md +0 -113
  220. moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-validation/examples.md +0 -29
  221. moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-validation/reference.md +0 -28
  222. moai_adk/templates/.claude/skills/moai-alfred-tag-scanning/SKILL.md +0 -113
  223. moai_adk/templates/.claude/skills/moai-alfred-tag-scanning/examples.md +0 -29
  224. moai_adk/templates/.claude/skills/moai-alfred-tag-scanning/reference.md +0 -28
  225. moai_adk/templates/.claude/skills/moai-alfred-todowrite-pattern/SKILL.md +0 -19
  226. moai_adk/templates/.claude/skills/moai-alfred-todowrite-pattern/examples.md +0 -4
  227. moai_adk/templates/.claude/skills/moai-alfred-todowrite-pattern/reference.md +0 -211
  228. moai_adk/templates/.claude/skills/moai-alfred-trust-validation/SKILL.md +0 -113
  229. moai_adk/templates/.claude/skills/moai-alfred-trust-validation/examples.md +0 -29
  230. moai_adk/templates/.claude/skills/moai-alfred-trust-validation/reference.md +0 -28
  231. moai_adk/templates/.claude/skills/moai-alfred-workflow/SKILL.md +0 -288
  232. moai_adk/templates/.claude/skills/moai-cc-agents/SKILL.md +0 -269
  233. moai_adk/templates/.claude/skills/moai-cc-agents/templates/agent-template.md +0 -32
  234. moai_adk/templates/.claude/skills/moai-cc-claude-md/SKILL.md +0 -298
  235. moai_adk/templates/.claude/skills/moai-cc-claude-md/templates/CLAUDE-template.md +0 -26
  236. moai_adk/templates/.claude/skills/moai-cc-commands/SKILL.md +0 -307
  237. moai_adk/templates/.claude/skills/moai-cc-commands/templates/command-template.md +0 -21
  238. moai_adk/templates/.claude/skills/moai-cc-hooks/SKILL.md +0 -252
  239. moai_adk/templates/.claude/skills/moai-cc-hooks/scripts/pre-bash-check.sh +0 -19
  240. moai_adk/templates/.claude/skills/moai-cc-hooks/scripts/preserve-permissions.sh +0 -19
  241. moai_adk/templates/.claude/skills/moai-cc-hooks/scripts/validate-bash-command.py +0 -24
  242. moai_adk/templates/.claude/skills/moai-cc-mcp-plugins/SKILL.md +0 -199
  243. moai_adk/templates/.claude/skills/moai-cc-mcp-plugins/templates/settings-mcp-template.json +0 -39
  244. moai_adk/templates/.claude/skills/moai-cc-memory/SKILL.md +0 -316
  245. moai_adk/templates/.claude/skills/moai-cc-memory/templates/session-summary-template.md +0 -18
  246. moai_adk/templates/.claude/skills/moai-cc-settings/SKILL.md +0 -263
  247. moai_adk/templates/.claude/skills/moai-cc-settings/templates/settings-complete-template.json +0 -30
  248. moai_adk/templates/.claude/skills/moai-cc-skill-descriptions/SKILL.md +0 -19
  249. moai_adk/templates/.claude/skills/moai-cc-skill-descriptions/examples.md +0 -4
  250. moai_adk/templates/.claude/skills/moai-cc-skill-descriptions/reference.md +0 -218
  251. moai_adk/templates/.claude/skills/moai-cc-skill-factory/CHECKLIST.md +0 -482
  252. moai_adk/templates/.claude/skills/moai-cc-skill-factory/EXAMPLES.md +0 -278
  253. moai_adk/templates/.claude/skills/moai-cc-skill-factory/INTERACTIVE-DISCOVERY.md +0 -524
  254. moai_adk/templates/.claude/skills/moai-cc-skill-factory/METADATA.md +0 -477
  255. moai_adk/templates/.claude/skills/moai-cc-skill-factory/PARALLEL-ANALYSIS-REPORT.md +0 -429
  256. moai_adk/templates/.claude/skills/moai-cc-skill-factory/PYTHON-VERSION-MATRIX.md +0 -391
  257. moai_adk/templates/.claude/skills/moai-cc-skill-factory/SKILL-FACTORY-WORKFLOW.md +0 -431
  258. moai_adk/templates/.claude/skills/moai-cc-skill-factory/SKILL-UPDATE-ADVISOR.md +0 -577
  259. moai_adk/templates/.claude/skills/moai-cc-skill-factory/SKILL.md +0 -271
  260. moai_adk/templates/.claude/skills/moai-cc-skill-factory/STEP-BY-STEP-GUIDE.md +0 -466
  261. moai_adk/templates/.claude/skills/moai-cc-skill-factory/STRUCTURE.md +0 -583
  262. moai_adk/templates/.claude/skills/moai-cc-skill-factory/WEB-RESEARCH.md +0 -526
  263. moai_adk/templates/.claude/skills/moai-cc-skill-factory/reference.md +0 -465
  264. moai_adk/templates/.claude/skills/moai-cc-skill-factory/scripts/generate-structure.sh +0 -328
  265. moai_adk/templates/.claude/skills/moai-cc-skill-factory/scripts/validate-skill.sh +0 -312
  266. moai_adk/templates/.claude/skills/moai-cc-skill-factory/templates/SKILL_TEMPLATE.md +0 -245
  267. moai_adk/templates/.claude/skills/moai-cc-skill-factory/templates/examples-template.md +0 -285
  268. moai_adk/templates/.claude/skills/moai-cc-skill-factory/templates/reference-template.md +0 -278
  269. moai_adk/templates/.claude/skills/moai-cc-skill-factory/templates/scripts-template.sh +0 -303
  270. moai_adk/templates/.claude/skills/moai-cc-skills/SKILL.md +0 -291
  271. moai_adk/templates/.claude/skills/moai-cc-skills/templates/SKILL-template.md +0 -15
  272. moai_adk/templates/.claude/skills/moai-design-systems/SKILL.md +0 -802
  273. moai_adk/templates/.claude/skills/moai-design-systems/examples.md +0 -1238
  274. moai_adk/templates/.claude/skills/moai-design-systems/reference.md +0 -673
  275. moai_adk/templates/.claude/skills/moai-domain-backend/SKILL.md +0 -290
  276. moai_adk/templates/.claude/skills/moai-domain-backend/examples.md +0 -1633
  277. moai_adk/templates/.claude/skills/moai-domain-backend/reference.md +0 -660
  278. moai_adk/templates/.claude/skills/moai-domain-cli-tool/SKILL.md +0 -123
  279. moai_adk/templates/.claude/skills/moai-domain-cli-tool/examples.md +0 -29
  280. moai_adk/templates/.claude/skills/moai-domain-cli-tool/reference.md +0 -30
  281. moai_adk/templates/.claude/skills/moai-domain-data-science/SKILL.md +0 -123
  282. moai_adk/templates/.claude/skills/moai-domain-data-science/examples.md +0 -29
  283. moai_adk/templates/.claude/skills/moai-domain-data-science/reference.md +0 -30
  284. moai_adk/templates/.claude/skills/moai-domain-database/SKILL.md +0 -123
  285. moai_adk/templates/.claude/skills/moai-domain-database/examples.md +0 -29
  286. moai_adk/templates/.claude/skills/moai-domain-database/reference.md +0 -30
  287. moai_adk/templates/.claude/skills/moai-domain-devops/SKILL.md +0 -124
  288. moai_adk/templates/.claude/skills/moai-domain-devops/examples.md +0 -29
  289. moai_adk/templates/.claude/skills/moai-domain-devops/reference.md +0 -31
  290. moai_adk/templates/.claude/skills/moai-domain-frontend/SKILL.md +0 -128
  291. moai_adk/templates/.claude/skills/moai-domain-frontend/examples.md +0 -29
  292. moai_adk/templates/.claude/skills/moai-domain-frontend/reference.md +0 -31
  293. moai_adk/templates/.claude/skills/moai-domain-ml/SKILL.md +0 -123
  294. moai_adk/templates/.claude/skills/moai-domain-ml/examples.md +0 -29
  295. moai_adk/templates/.claude/skills/moai-domain-ml/reference.md +0 -30
  296. moai_adk/templates/.claude/skills/moai-domain-mobile-app/SKILL.md +0 -123
  297. moai_adk/templates/.claude/skills/moai-domain-mobile-app/examples.md +0 -29
  298. moai_adk/templates/.claude/skills/moai-domain-mobile-app/reference.md +0 -30
  299. moai_adk/templates/.claude/skills/moai-domain-security/SKILL.md +0 -123
  300. moai_adk/templates/.claude/skills/moai-domain-security/examples.md +0 -29
  301. moai_adk/templates/.claude/skills/moai-domain-security/reference.md +0 -30
  302. moai_adk/templates/.claude/skills/moai-domain-web-api/SKILL.md +0 -123
  303. moai_adk/templates/.claude/skills/moai-domain-web-api/examples.md +0 -29
  304. moai_adk/templates/.claude/skills/moai-domain-web-api/reference.md +0 -30
  305. moai_adk/templates/.claude/skills/moai-essentials-debug/SKILL.md +0 -303
  306. moai_adk/templates/.claude/skills/moai-essentials-debug/examples.md +0 -1064
  307. moai_adk/templates/.claude/skills/moai-essentials-debug/reference.md +0 -1047
  308. moai_adk/templates/.claude/skills/moai-essentials-perf/SKILL.md +0 -113
  309. moai_adk/templates/.claude/skills/moai-essentials-perf/examples.md +0 -29
  310. moai_adk/templates/.claude/skills/moai-essentials-perf/reference.md +0 -28
  311. moai_adk/templates/.claude/skills/moai-essentials-refactor/SKILL.md +0 -113
  312. moai_adk/templates/.claude/skills/moai-essentials-refactor/examples.md +0 -29
  313. moai_adk/templates/.claude/skills/moai-essentials-refactor/reference.md +0 -28
  314. moai_adk/templates/.claude/skills/moai-essentials-review/SKILL.md +0 -113
  315. moai_adk/templates/.claude/skills/moai-essentials-review/examples.md +0 -29
  316. moai_adk/templates/.claude/skills/moai-essentials-review/reference.md +0 -28
  317. moai_adk/templates/.claude/skills/moai-foundation-ears/SKILL.md +0 -116
  318. moai_adk/templates/.claude/skills/moai-foundation-ears/examples.md +0 -29
  319. moai_adk/templates/.claude/skills/moai-foundation-ears/reference.md +0 -28
  320. moai_adk/templates/.claude/skills/moai-foundation-git/SKILL.md +0 -122
  321. moai_adk/templates/.claude/skills/moai-foundation-git/examples.md +0 -29
  322. moai_adk/templates/.claude/skills/moai-foundation-git/reference.md +0 -29
  323. moai_adk/templates/.claude/skills/moai-foundation-langs/SKILL.md +0 -113
  324. moai_adk/templates/.claude/skills/moai-foundation-langs/examples.md +0 -29
  325. moai_adk/templates/.claude/skills/moai-foundation-langs/reference.md +0 -28
  326. moai_adk/templates/.claude/skills/moai-foundation-specs/SKILL.md +0 -113
  327. moai_adk/templates/.claude/skills/moai-foundation-specs/examples.md +0 -29
  328. moai_adk/templates/.claude/skills/moai-foundation-specs/reference.md +0 -28
  329. moai_adk/templates/.claude/skills/moai-foundation-tags/SKILL.md +0 -113
  330. moai_adk/templates/.claude/skills/moai-foundation-tags/examples.md +0 -29
  331. moai_adk/templates/.claude/skills/moai-foundation-tags/reference.md +0 -28
  332. moai_adk/templates/.claude/skills/moai-foundation-trust/SKILL.md +0 -307
  333. moai_adk/templates/.claude/skills/moai-foundation-trust/examples.md +0 -0
  334. moai_adk/templates/.claude/skills/moai-foundation-trust/reference.md +0 -1099
  335. moai_adk/templates/.claude/skills/moai-lang-c/SKILL.md +0 -124
  336. moai_adk/templates/.claude/skills/moai-lang-c/examples.md +0 -29
  337. moai_adk/templates/.claude/skills/moai-lang-c/reference.md +0 -31
  338. moai_adk/templates/.claude/skills/moai-lang-cpp/SKILL.md +0 -124
  339. moai_adk/templates/.claude/skills/moai-lang-cpp/examples.md +0 -29
  340. moai_adk/templates/.claude/skills/moai-lang-cpp/reference.md +0 -31
  341. moai_adk/templates/.claude/skills/moai-lang-csharp/SKILL.md +0 -123
  342. moai_adk/templates/.claude/skills/moai-lang-csharp/examples.md +0 -29
  343. moai_adk/templates/.claude/skills/moai-lang-csharp/reference.md +0 -30
  344. moai_adk/templates/.claude/skills/moai-lang-dart/SKILL.md +0 -123
  345. moai_adk/templates/.claude/skills/moai-lang-dart/examples.md +0 -29
  346. moai_adk/templates/.claude/skills/moai-lang-dart/reference.md +0 -30
  347. moai_adk/templates/.claude/skills/moai-lang-go/SKILL.md +0 -127
  348. moai_adk/templates/.claude/skills/moai-lang-go/examples.md +0 -29
  349. moai_adk/templates/.claude/skills/moai-lang-go/reference.md +0 -31
  350. moai_adk/templates/.claude/skills/moai-lang-java/SKILL.md +0 -126
  351. moai_adk/templates/.claude/skills/moai-lang-java/examples.md +0 -29
  352. moai_adk/templates/.claude/skills/moai-lang-java/reference.md +0 -31
  353. moai_adk/templates/.claude/skills/moai-lang-javascript/SKILL.md +0 -125
  354. moai_adk/templates/.claude/skills/moai-lang-javascript/examples.md +0 -29
  355. moai_adk/templates/.claude/skills/moai-lang-javascript/reference.md +0 -32
  356. moai_adk/templates/.claude/skills/moai-lang-kotlin/SKILL.md +0 -124
  357. moai_adk/templates/.claude/skills/moai-lang-kotlin/examples.md +0 -29
  358. moai_adk/templates/.claude/skills/moai-lang-kotlin/reference.md +0 -31
  359. moai_adk/templates/.claude/skills/moai-lang-php/SKILL.md +0 -126
  360. moai_adk/templates/.claude/skills/moai-lang-php/examples.md +0 -29
  361. moai_adk/templates/.claude/skills/moai-lang-php/reference.md +0 -30
  362. moai_adk/templates/.claude/skills/moai-lang-python/SKILL.md +0 -433
  363. moai_adk/templates/.claude/skills/moai-lang-python/examples.md +0 -624
  364. moai_adk/templates/.claude/skills/moai-lang-python/reference.md +0 -316
  365. moai_adk/templates/.claude/skills/moai-lang-r/SKILL.md +0 -123
  366. moai_adk/templates/.claude/skills/moai-lang-r/examples.md +0 -29
  367. moai_adk/templates/.claude/skills/moai-lang-r/reference.md +0 -30
  368. moai_adk/templates/.claude/skills/moai-lang-ruby/SKILL.md +0 -124
  369. moai_adk/templates/.claude/skills/moai-lang-ruby/examples.md +0 -29
  370. moai_adk/templates/.claude/skills/moai-lang-ruby/reference.md +0 -31
  371. moai_adk/templates/.claude/skills/moai-lang-rust/SKILL.md +0 -127
  372. moai_adk/templates/.claude/skills/moai-lang-rust/examples.md +0 -29
  373. moai_adk/templates/.claude/skills/moai-lang-rust/reference.md +0 -31
  374. moai_adk/templates/.claude/skills/moai-lang-scala/SKILL.md +0 -125
  375. moai_adk/templates/.claude/skills/moai-lang-scala/examples.md +0 -29
  376. moai_adk/templates/.claude/skills/moai-lang-scala/reference.md +0 -30
  377. moai_adk/templates/.claude/skills/moai-lang-shell/SKILL.md +0 -123
  378. moai_adk/templates/.claude/skills/moai-lang-shell/examples.md +0 -29
  379. moai_adk/templates/.claude/skills/moai-lang-shell/reference.md +0 -30
  380. moai_adk/templates/.claude/skills/moai-lang-sql/SKILL.md +0 -124
  381. moai_adk/templates/.claude/skills/moai-lang-sql/examples.md +0 -29
  382. moai_adk/templates/.claude/skills/moai-lang-sql/reference.md +0 -31
  383. moai_adk/templates/.claude/skills/moai-lang-swift/SKILL.md +0 -123
  384. moai_adk/templates/.claude/skills/moai-lang-swift/examples.md +0 -29
  385. moai_adk/templates/.claude/skills/moai-lang-swift/reference.md +0 -30
  386. moai_adk/templates/.claude/skills/moai-lang-typescript/SKILL.md +0 -133
  387. moai_adk/templates/.claude/skills/moai-lang-typescript/examples.md +0 -29
  388. moai_adk/templates/.claude/skills/moai-lang-typescript/reference.md +0 -34
  389. moai_adk/templates/.claude/skills/moai-project-documentation.md +0 -622
  390. moai_adk/templates/.github/workflows/c-tag-validation.yml +0 -11
  391. moai_adk/templates/.github/workflows/cpp-tag-validation.yml +0 -11
  392. moai_adk/templates/.github/workflows/csharp-tag-validation.yml +0 -11
  393. moai_adk/templates/.github/workflows/dart-tag-validation.yml +0 -11
  394. moai_adk/templates/.github/workflows/go-tag-validation.yml +0 -130
  395. moai_adk/templates/.github/workflows/java-tag-validation.yml +0 -11
  396. moai_adk/templates/.github/workflows/javascript-tag-validation.yml +0 -135
  397. moai_adk/templates/.github/workflows/kotlin-tag-validation.yml +0 -11
  398. moai_adk/templates/.github/workflows/php-tag-validation.yml +0 -11
  399. moai_adk/templates/.github/workflows/python-tag-validation.yml +0 -118
  400. moai_adk/templates/.github/workflows/release.yml +0 -118
  401. moai_adk/templates/.github/workflows/ruby-tag-validation.yml +0 -11
  402. moai_adk/templates/.github/workflows/rust-tag-validation.yml +0 -11
  403. moai_adk/templates/.github/workflows/shell-tag-validation.yml +0 -11
  404. moai_adk/templates/.github/workflows/swift-tag-validation.yml +0 -11
  405. moai_adk/templates/.github/workflows/tag-report.yml +0 -269
  406. moai_adk/templates/.github/workflows/tag-validation.yml +0 -186
  407. moai_adk/templates/.github/workflows/typescript-tag-validation.yml +0 -154
  408. moai_adk/templates/.moai/config.json +0 -115
  409. moai_adk/templates/workflows/go-tag-validation.yml +0 -30
  410. moai_adk/templates/workflows/javascript-tag-validation.yml +0 -41
  411. moai_adk/templates/workflows/python-tag-validation.yml +0 -42
  412. moai_adk/templates/workflows/typescript-tag-validation.yml +0 -31
  413. moai_adk-0.15.1.dist-info/METADATA +0 -3094
  414. moai_adk-0.15.1.dist-info/RECORD +0 -365
  415. {moai_adk-0.15.1.dist-info → moai_adk-0.25.4.dist-info}/WHEEL +0 -0
  416. {moai_adk-0.15.1.dist-info → moai_adk-0.25.4.dist-info}/entry_points.txt +0 -0
  417. {moai_adk-0.15.1.dist-info → moai_adk-0.25.4.dist-info}/licenses/LICENSE +0 -0
@@ -1,539 +0,0 @@
1
- # CLAUDE-RULES.md
2
-
3
- > MoAI-ADK Mandatory Rules & Standards
4
-
5
- ---
6
-
7
- ## For Alfred: Why This Document Matters
8
-
9
- When Alfred reads this document:
10
- 1. Before invoking a Skill - "Is this Skill invocation mandatory or optional?"
11
- 2. When user questions are ambiguous - "Should I use AskUserQuestion in this situation?"
12
- 3. When verifying code - "Have all TRUST 5 principles been followed?"
13
- 4. Before git commits - "Is this commit message format correct?"
14
- 5. When checking TAG chain integrity - "Have TAG rules been followed?"
15
-
16
- Alfred's Decision Making:
17
- - "Must I invoke a Skill in this situation?"
18
- - "Should I execute AskUserQuestion for the user's ambiguous question?"
19
- - "Does this code/commit comply with all our rules?"
20
-
21
- After reading this document:
22
- - Understand 10 mandatory Skill invocation scenarios
23
- - Master 5 mandatory situations for AskUserQuestion
24
- - Apply TRUST 5's 5 quality gates
25
- - Master TAG rules and validation methods
26
-
27
- ---
28
- → Related Documents:
29
- - [For Agent selection criteria, see CLAUDE-AGENTS-GUIDE.md](./CLAUDE-AGENTS-GUIDE.md#agent-selection-decision-tree)
30
- - [For specific execution examples, see CLAUDE-PRACTICES.md](./CLAUDE-PRACTICES.md#practical-workflow-examples)
31
-
32
- ---
33
-
34
- ## 🎯 Skill Invocation Rules
35
-
36
- ### ✅ Mandatory Skill Explicit Invocation
37
-
38
- **CRITICAL**: All 55 Skills in MoAI-ADK must be invoked **explicitly** using the `Skill("skill-name")` syntax. DO NOT use direct tools (Bash, Grep, Read) when a dedicated Skill exists for the task.
39
-
40
- | **User Request Keywords** | **Skill to Invoke** | **Invocation Pattern** | **Prohibited Actions** |
41
- |----------------------|-------------------|----------------------|-------------------|
42
- | TRUST validation, code quality check, quality gate, coverage check, test coverage | `moai-foundation-trust` | `Skill("moai-foundation-trust")` | ❌ Direct ruff/mypy |
43
- | TAG validation, tag check, orphan detection, TAG scan, TAG chain | `moai-foundation-tags` | `Skill("moai-foundation-tags")` | ❌ Direct rg search |
44
- | SPEC validation, spec check, SPEC metadata, spec authoring | `moai-foundation-specs` | `Skill("moai-foundation-specs")` | ❌ Direct YAML reading |
45
- | EARS syntax, requirement authoring, requirement formatting | `moai-foundation-ears` | `Skill("moai-foundation-ears")` | ❌ Generic templates |
46
- | Git workflow, branch management, PR policy, commit strategy | `moai-foundation-git` | `Skill("moai-foundation-git")` | ❌ Direct git commands |
47
- | Language detection, stack detection, framework identification | `moai-foundation-langs` | `Skill("moai-foundation-langs")` | ❌ Manual detection |
48
- | Debugging, error analysis, bug fix, exception handling | `moai-essentials-debug` | `Skill("moai-essentials-debug")` | ❌ Generic diagnostics |
49
- | Refactoring, code improvement, code cleanup, design patterns | `moai-essentials-refactor` | `Skill("moai-essentials-refactor")` | ❌ Direct modifications |
50
- | Performance optimization, profiling, bottleneck analysis | `moai-essentials-perf` | `Skill("moai-essentials-perf")` | ❌ Guesswork |
51
- | Code review, quality review, architecture review, security review | `moai-essentials-review` | `Skill("moai-essentials-review")` | ❌ Generic review |
52
-
53
- ### Skill Tier Overview (55 Total Skills)
54
-
55
- | **Tier** | **Count** | **Purpose** | **Auto-Trigger Conditions** |
56
- |----------|-----------|------------|--------------------------|
57
- | **Foundation** | 6 | Core TRUST/TAG/SPEC/EARS/Git/Language principles | Keyword detection in user request |
58
- | **Essentials** | 4 | Debug/Perf/Refactor/Review workflows | Error detection, refactor triggers |
59
- | **Alfred** | 11 | Workflow orchestration (SPEC authoring, TDD, sync, Git) | Command execution (`/alfred:*`) |
60
- | **Domain** | 10 | Backend, Frontend, Web API, Database, Security, DevOps, Data Science, ML, Mobile, CLI | Domain-specific keywords |
61
- | **Language** | 23 | Python, TypeScript, Go, Rust, Java, Kotlin, Swift, Dart, C/C++, C#, Scala, Ruby, PHP, JavaScript, SQL, Shell, and more | File extension detection (`.py`, `.ts`, `.go`, etc.) |
62
- | **Ops** | 1 | Claude Code session settings, output styles | Session start/configuration |
63
-
64
- ### Progressive Disclosure Pattern
65
-
66
- All Skills follow the **Progressive Disclosure** principle:
67
-
68
- 1. **Metadata** (always available): Skill name, description, triggers, keywords
69
- 2. **Content** (on-demand): Full SKILL.md loads when explicitly invoked via `Skill("name")`
70
- 3. **Supporting** (JIT): Templates, examples, and resources load only when needed
71
-
72
- ### 🌍 Language Boundary in Skill Invocation
73
-
74
- **CRITICAL: Three-Layer Language Rule**
75
-
76
- ```
77
- Layer 1: User Conversation
78
- ├─ ALWAYS: Use user's configured conversation_language
79
- ├─ Example: Korean user → respond in Korean only
80
- ├─ Example: Japanese user → respond in Japanese only
81
- └─ Includes: questions, explanations, all dialogue
82
-
83
- Layer 2: Internal Operations ← THE KEY DIFFERENCE
84
- ├─ Task() prompts → **English**
85
- ├─ Skill() invocations → **English**
86
- ├─ Sub-agent communication → **English**
87
- ├─ Git commits → **English**
88
- ├─ Error messages (internal) → **English**
89
- └─ ALL technical instructions → **English**
90
-
91
- Layer 3: Skills & Code
92
- ├─ Descriptions → English only
93
- ├─ Examples → English only
94
- ├─ Code comments → English only
95
- └─ ✅ NO multilingual versions needed!
96
- ```
97
-
98
- **Why This Works**:
99
- - ✅ **100% Reliability**: English prompts always match English Skill keywords = guaranteed activation
100
- - ✅ **Zero Maintenance**: 55 Skills in English only (no 55 × N language variants)
101
- - ✅ **Infinite Scalability**: Add Korean/Japanese/Spanish/Russian/any language with ZERO Skill modifications
102
- - ✅ **Industry Standard**: Localized UI + English backend = standard i18n pattern (like Netflix, Google, AWS)
103
-
104
- **The Golden Rule**:
105
- ```
106
- User Language ≠ Internal Language
107
-
108
- 100% Skill Match Guaranteed
109
- English-only Skills = Complete Scalability!
110
- ```
111
-
112
- **Sub-agent Implementation Example**:
113
- ```
114
- User Input (any language): "Create authentication system" / "認証システムを実装" / "Implementar sistema de autenticación"
115
-
116
- Alfred (internal): "Implement authentication system"
117
-
118
- Task(prompt="Create JWT authentication SPEC with 30-minute token expiry",
119
- subagent_type="spec-builder")
120
-
121
- spec-builder (receives English):
122
- Skill("moai-foundation-specs") ← 100% match!
123
- Skill("moai-foundation-ears") ← 100% match!
124
-
125
- Alfred (receives): English SPEC output
126
-
127
- Alfred (translates): User's language response
128
-
129
- User Receives: Response in their configured language
130
- ```
131
-
132
- ### Explicit Invocation Syntax
133
-
134
- **Standard Pattern**:
135
- ```python
136
- Skill("skill-name") # Invoke any Skill explicitly
137
- ```
138
-
139
- **With Context** (recommended):
140
- ```python
141
- # Example: Validate code quality
142
- Skill("moai-foundation-trust")
143
-
144
- # Example: Debug runtime error
145
- Skill("moai-essentials-debug")
146
- ```
147
-
148
- ### Example Workflows Using Explicit Skill Invocation
149
-
150
- **Workflow 1: Code Quality Validation (TRUST 5)**
151
- ```
152
- User: "Check code quality"
153
-
154
- Invoke: Skill("moai-foundation-trust")
155
- → Verify Test First: pytest coverage ≥85%
156
- → Verify Readable: ruff lint + linter checks
157
- → Verify Unified: mypy type safety
158
- → Verify Secured: security scanner (trivy)
159
- → Verify Trackable: @TAG chain validation
160
- → Return: Quality report with TRUST 5-principles
161
- ```
162
-
163
- **Workflow 2: TAG Orphan Detection (Full Project)**
164
- ```
165
- User: "Find all TAG orphans in the project"
166
-
167
- Invoke: Skill("moai-foundation-tags")
168
- → Scan entire project: .moai/specs/, tests/, src/, docs/
169
- → Detect @CODE without @SPEC
170
- → Detect @SPEC without @CODE
171
- → Detect @TEST without @SPEC
172
- → Detect @DOC without @SPEC/@CODE
173
- → Return: Complete orphan report with locations
174
- ```
175
-
176
- **Workflow 3: SPEC Authoring with EARS**
177
- ```
178
- User: "Create AUTH-001 JWT authentication SPEC"
179
-
180
- Invoke: Skill("moai-foundation-specs")
181
- → Validate SPEC structure (YAML metadata, HISTORY)
182
-
183
- Invoke: Skill("moai-foundation-ears")
184
- → Format requirements using EARS syntax
185
- → Ubiquitous: "The system must provide JWT-based authentication"
186
- → Event: "WHEN valid credentials provided, THEN issue JWT token"
187
- → Constraints: "Token expiration ≤ 30 minutes"
188
-
189
- Return: Properly formatted SPEC file with @SPEC:AUTH-001 TAG
190
- ```
191
-
192
- **Workflow 4: Debugging with Error Context**
193
- ```
194
- User: "TypeError: Cannot read property 'name' of undefined"
195
-
196
- Invoke: Skill("moai-essentials-debug")
197
- → Analyze stack trace
198
- → Identify root cause: null/undefined object access
199
- → Check related SPEC: @SPEC:USER-003
200
- → Check missing test cases: @TEST:USER-003
201
- → Suggest fix: Add null check, update test
202
- → Recommend: Re-run /alfred:2-run
203
- ```
204
-
205
- ---
206
-
207
- ## 🎯 Interactive Question Rules
208
-
209
- ### Mandatory AskUserQuestion Usage
210
-
211
- **IMPORTANT**: When the user needs to make a **choice** or **decision**, you **MUST** use AskUserQuestion. DO NOT make assumptions or implement directly.
212
-
213
- | Situation Type | Examples | Invocation | Required |
214
- |---------------|----------|------------|----------|
215
- | **Multiple valid approaches exist** | Database choice (PostgreSQL vs MongoDB), state management library (Redux vs Zustand), test framework selection | `AskUserQuestion(...)` | ✅ Required |
216
- | **Architecture/design decisions** | Microservices vs monolithic, client-side vs server-side rendering, authentication method (JWT vs OAuth) | `AskUserQuestion(...)` | ✅ Required |
217
- | **Ambiguous or high-level requirements** | "Add a dashboard", "Optimize performance", "Add multi-language support" | `AskUserQuestion(...)` | ✅ Required |
218
- | **Requests affecting existing components** | Refactoring scope, backward compatibility, migration strategy | `AskUserQuestion(...)` | ✅ Required |
219
- | **User experience/business logic decisions** | UI layout, data display method, workflow order | `AskUserQuestion(...)` | ✅ Required |
220
-
221
- ### Optional AskUserQuestion Usage
222
-
223
- You can proceed without AskUserQuestion in the following situations:
224
-
225
- - ✅ User has already provided clear instructions
226
- - ✅ Standard conventions or best practices are obvious
227
- - ✅ Technical constraints allow only one approach
228
- - ✅ User explicitly states "just implement it, I've already decided"
229
-
230
- ### Example: Correct AskUserQuestion Usage
231
-
232
- #### ❌ **Incorrect Response** (Making assumptions)
233
-
234
- ```
235
- User: "Add a dashboard page"
236
-
237
- Claude: [Proceeding without asking]
238
- - Tech: React + TypeScript
239
- - Layout: Left sidebar + main content
240
- - Chart library: Recharts
241
- - Data source: Direct REST API calls
242
-
243
- Starting implementation...
244
- ```
245
-
246
- **Problem**: High risk of rework due to not understanding actual user intent.
247
-
248
- #### ✅ **Correct Response** (Asking questions)
249
-
250
- ```
251
- User: "Add a dashboard page"
252
-
253
- Claude: I'll need to clarify a few decisions for the dashboard implementation.
254
-
255
- AskUserQuestion(...)
256
-
257
- [Example questions]
258
- - "Data source?" → [REST API | GraphQL | Local state]
259
- - "Primary chart type?" → [Time series | Category comparison | Distribution]
260
- - "Real-time updates needed?" → [Yes | No | Every 10 seconds]
261
- - "Access restrictions?" → [Admin only | Logged-in users | Public]
262
-
263
- [After user responses]
264
- Confirmed selections:
265
- - Data: REST API
266
- - Charts: Time series
267
- - Real-time: No
268
- - Access: Logged-in users
269
-
270
- Now implementing based on these requirements...
271
- ```
272
-
273
- **Benefits**: Clear intent understanding, minimized rework, accurate implementation.
274
-
275
- ### Best Practices for AskUserQuestion
276
-
277
- 1. **Limit to 3-5 questions**
278
- - ✅ "Choose from 3 mutually exclusive options"
279
- - ❌ "10+ options" (user fatigue)
280
-
281
- 2. **Options must be specific**
282
- - ✅ "PostgreSQL (ACID, JSON support)", "MongoDB (horizontal scaling, flexible schema)"
283
- - ❌ "Database 1", "Database 2"
284
-
285
- 3. **Always include "Other" option**
286
- - User's choice may not be listed
287
- - "Other" allows custom input
288
-
289
- 4. **Summary step after selection**
290
- - Display user selections summary
291
- - "Proceed with these choices?" final confirmation
292
-
293
- 5. **Integrate with Context Engineering**
294
- - Analyze existing code/SPEC before AskUserQuestion
295
- - Provide context like "Your project currently uses X"
296
-
297
- ### When NOT to Use AskUserQuestion
298
-
299
- ❌ When user has already given specific instructions:
300
- ```
301
- User: "Implement state management using Zustand"
302
- → AskUserQuestion unnecessary (already decided)
303
- ```
304
-
305
- ❌ When only one technical choice exists:
306
- ```
307
- User: "Improve type safety in TypeScript"
308
- → AskUserQuestion unnecessary (type system is fixed)
309
- ```
310
-
311
- ---
312
-
313
- ## Alfred's Next-Step Suggestion Principles
314
-
315
- ### Pre-suggestion Checklist
316
-
317
- Before suggesting the next step, always verify:
318
- - You have the latest status from agents.
319
- - All blockers are documented with context.
320
- - Required approvals or user confirmations are noted.
321
- - Suggested tasks include clear owners and outcomes.
322
- - There is at most one "must-do" suggestion per step.
323
-
324
- **cc-manager validation sequence**
325
-
326
- 1. **SPEC** – Confirm the SPEC file exists and note its status (`draft`, `active`, `completed`, `archived`). If missing, queue `/alfred:1-plan`.
327
- 2. **TEST & CODE** – Check whether tests and implementation files exist and whether the latest test run passed. Address failing tests before proposing new work.
328
- 3. **DOCS & TAGS** – Ensure `/alfred:3-sync` is not pending, Living Docs and TAG chains are current, and no orphan TAGs remain.
329
- 4. **GIT & PR** – Review the current branch, Draft/Ready PR state, and uncommitted changes. Highlight required Git actions explicitly.
330
- 5. **BLOCKERS & APPROVALS** – List outstanding approvals, unanswered questions, TodoWrite items, or dependency risks.
331
-
332
- > 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).
333
-
334
- ### Poor Suggestion Examples (❌)
335
-
336
- - Suggesting tasks already completed.
337
- - Mixing unrelated actions in one suggestion.
338
- - Proposing work without explaining the problem or expected result.
339
- - Ignoring known blockers or assumptions.
340
-
341
- ### Good Suggestion Examples (✅)
342
-
343
- - Link the suggestion to a clear goal or risk mitigation.
344
- - Reference evidence (logs, diffs, test output).
345
- - Provide concrete next steps with estimated effort.
346
-
347
- ### Suggestion Restrictions
348
-
349
- - Do not recommend direct commits; always go through review.
350
- - Avoid introducing new scope without confirming priority.
351
- - Never suppress warnings or tests without review.
352
- - Do not rely on manual verification when automation exists.
353
-
354
- ### Suggestion Priorities
355
-
356
- 1. Resolve production blockers → 2. Restore failing tests → 3. Close gaps against SPEC → 4. Improve DX/automation.
357
-
358
- ---
359
-
360
- ## Error Message Standard (Shared)
361
-
362
- ### Severity Icons
363
-
364
- - 🔴 Critical failure (stop immediately)
365
- - 🟠 Major issue (needs immediate attention)
366
- - 🟡 Warning (monitor closely)
367
- - 🔵 Info (no action needed)
368
-
369
- ### Message Format
370
-
371
- ```
372
- 🔴 <Title>
373
- - Cause: <root cause>
374
- - Scope: <affected components>
375
- - Evidence: <logs/screenshots/links>
376
- - Next Step: <required action>
377
- ```
378
-
379
- ---
380
-
381
- ## Git Commit Message Standard (Locale-aware)
382
-
383
- ### TDD Stage Commit Templates
384
-
385
- | Stage | Template |
386
- | -------- | ---------------------------------------------------------- |
387
- | RED | `test: add failing test for <feature>` |
388
- | GREEN | `feat: implement <feature> to pass tests` |
389
- | REFACTOR | `refactor: clean up <component> without changing behavior` |
390
-
391
- ### Commit Structure
392
-
393
- ```
394
- <type>(scope): <subject>
395
-
396
- - Context of the change
397
- - Additional notes (optional)
398
-
399
- Refs: @TAG-ID (if applicable)
400
-
401
- 🤖 Generated with [Claude Code](https://claude.com/claude-code)
402
-
403
- Co-Authored-By: 🎩 Alfred@[MoAI](https://adk.mo.ai.kr)
404
- ```
405
-
406
- **Signature Standard**: All git commits created through MoAI-ADK are attributed to **🎩 Alfred@[MoAI](https://adk.mo.ai.kr)**, the MoAI SuperAgent orchestrating all Git operations. This ensures clear traceability and accountability for all automated workflows.
407
-
408
- ---
409
-
410
- ## @TAG Lifecycle
411
-
412
- ### Core Principles
413
-
414
- - TAG IDs never change once assigned.
415
- - Content can evolve; log updates in HISTORY.
416
- - Tie implementations and tests to the same TAG.
417
-
418
- ### TAG Structure
419
-
420
- - `@SPEC:ID` in specs
421
- - `@CODE:ID` in source
422
- - `@TEST:ID` in tests
423
- - `@DOC:ID` in docs
424
-
425
- ### TAG Block Template
426
-
427
- ```
428
- // @CODE:AUTH-001 | SPEC: SPEC-AUTH-001.md | TEST: tests/auth/service.test.ts
429
- ```
430
-
431
- ### HISTORY Example
432
-
433
- ```
434
- ### v0.0.1 (2025-09-15)
435
-
436
- - **INITIAL**: Draft the JWT-based authentication SPEC.
437
- ```
438
-
439
- ### TAG Core Rules
440
-
441
- - **TAG ID**: `<Domain>-<3 digits>` (e.g., `AUTH-003`) — immutable.
442
- - **TAG Content**: Flexible but record changes in HISTORY.
443
- - **Versioning**: Semantic Versioning (`v0.0.1 → v0.1.0 → v1.0.0`).
444
- - Detailed rules: see `@.moai/memory/SPEC-METADATA.md#versioning`.
445
- - **TAG References**: Use file names without versions (e.g., `SPEC-AUTH-001.md`).
446
- - **Duplicate Check**: `rg "@SPEC:AUTH" -n` or `rg "AUTH-001" -n`.
447
- - **Code-first**: The source of truth lives in code.
448
-
449
- ### @CODE Subcategories (Comment Level)
450
-
451
- - `@CODE:ID:API` — REST/GraphQL endpoints
452
- - `@CODE:ID:UI` — Components and UI
453
- - `@CODE:ID:DATA` — Data models, schemas, types
454
- - `@CODE:ID:DOMAIN` — Business logic
455
- - `@CODE:ID:INFRA` — Infra, databases, integrations
456
-
457
- ### TAG Validation & Integrity
458
-
459
- **Avoid duplicates**:
460
- ```bash
461
- rg "@SPEC:AUTH" -n # Search AUTH specs
462
- rg "@CODE:AUTH-001" -n # Targeted ID search
463
- rg "AUTH-001" -n # Global ID search
464
- ```
465
-
466
- **TAG chain verification** (`/alfred:3-sync` runs automatically):
467
- ```bash
468
- rg '@(SPEC|TEST|CODE|DOC):' -n .moai/specs/ tests/ src/ docs/
469
-
470
- # Detect orphaned TAGs
471
- rg '@CODE:AUTH-001' -n src/ # CODE exists
472
- rg '@SPEC:AUTH-001' -n .moai/specs/ # SPEC missing → orphan
473
- ```
474
-
475
- ---
476
-
477
- ## TRUST 5 Principles (Language-agnostic)
478
-
479
- > Detailed guide: `@.moai/memory/DEVELOPMENT-GUIDE.md#trust-5-principles`
480
-
481
- Alfred enforces these quality gates on every change:
482
-
483
- - **T**est First: Use the best testing tool per language (Jest/Vitest, pytest, go test, cargo test, JUnit, flutter test, ...).
484
- - **R**eadable: Run linters (ESLint/Biome, ruff, golint, clippy, dart analyze, ...).
485
- - **U**nified: Ensure type safety or runtime validation.
486
- - **S**ecured: Apply security/static analysis tools.
487
- - **T**rackable: Maintain @TAG coverage directly in code.
488
-
489
- **Language-specific guidance**: `.moai/memory/DEVELOPMENT-GUIDE.md#trust-5-principles`.
490
-
491
- ---
492
-
493
- ## Language-specific Code Rules
494
-
495
- **Global constraints**:
496
- - Files ≤ 300 LOC
497
- - Functions ≤ 50 LOC
498
- - Parameters ≤ 5
499
- - Cyclomatic complexity ≤ 10
500
-
501
- **Quality targets**:
502
- - Test coverage ≥ 85%
503
- - Intent-revealing names
504
- - Early guard clauses
505
- - Use language-standard tooling
506
-
507
- **Testing strategy**:
508
- - Prefer the standard framework per language
509
- - Keep tests isolated and deterministic
510
- - Derive cases directly from the SPEC
511
-
512
- ---
513
-
514
- ## TDD Workflow Checklist
515
-
516
- **Step 1: SPEC authoring** (`/alfred:1-plan`)
517
- - [ ] Create `.moai/specs/SPEC-<ID>/spec.md` (with directory structure)
518
- - [ ] Add YAML front matter (id, version: 0.0.1, status: draft, created)
519
- - [ ] Include the `@SPEC:ID` TAG
520
- - [ ] Write the **HISTORY** section (v0.0.1 INITIAL)
521
- - [ ] Use EARS syntax for requirements
522
- - [ ] Check for duplicate IDs: `rg "@SPEC:<ID>" -n`
523
-
524
- **Step 2: TDD implementation** (`/alfred:2-run`)
525
- - [ ] **RED**: Write `@TEST:ID` under `tests/` and watch it fail
526
- - [ ] **GREEN**: Add `@CODE:ID` under `src/` and make the test pass
527
- - [ ] **REFACTOR**: Improve code quality; document TDD history in comments
528
- - [ ] List SPEC/TEST file paths in the TAG block
529
-
530
- **Step 3: Documentation sync** (`/alfred:3-sync`)
531
- - [ ] Scan TAGs: `rg '@(SPEC|TEST|CODE):' -n`
532
- - [ ] Ensure no orphan TAGs remain
533
- - [ ] Regenerate the Living Document
534
- - [ ] Move PR status from Draft → Ready
535
-
536
- ---
537
-
538
- **Last Updated**: 2025-10-27
539
- **Document Version**: v1.0.0
@@ -1,19 +0,0 @@
1
- ---
2
- name: moai-alfred-session-state
3
- description: "Session state management, runtime state tracking, session handoff notes."
4
- tier: Alfred
5
- allowed-tools: "Read"
6
- ---
7
-
8
- ## What It Does
9
-
10
- 세션 상태 관리, 진행 상황 추적, session handoff 규칙을 정의합니다.
11
-
12
- ## When to Use
13
-
14
- - ✅ Session 상태 확인
15
- - ✅ Task handoff 준비
16
-
17
- ---
18
-
19
- Learn more in `reference.md`.
@@ -1,4 +0,0 @@
1
- # Examples
2
-
3
- See `reference.md` for practical examples and usage patterns.
4
-
@@ -1,84 +0,0 @@
1
- # Session State Management
2
-
3
- **Last Updated**: 2025-10-31
4
- **Status**: SPEC-SESSION-CLEANUP-001 Implementation Complete
5
-
6
- ## Implementation Summary
7
-
8
- ### SPEC-SESSION-CLEANUP-001 Completion Status
9
-
10
- **Status**: ✅ COMPLETED
11
-
12
- - **Spec Creation**: 2025-10-30 (draft)
13
- - **Implementation**: 2025-10-31 (RED → GREEN → REFACTOR)
14
- - **Test Suite**: 11/11 passing
15
- - **Quality Gate**: PASS
16
-
17
- ### Files Modified
18
-
19
- 1. `.claude/commands/alfred/0-project.md` - Added "Final Step" section with AskUserQuestion pattern
20
- 2. `.claude/commands/alfred/1-plan.md` - Added "Final Step" section with AskUserQuestion pattern
21
- 3. `.claude/commands/alfred/2-run.md` - Added "Final Step" section with AskUserQuestion pattern
22
- 4. `.claude/commands/alfred/3-sync.md` - Added "Final Step" section with AskUserQuestion pattern
23
- 5. `tests/test_command_completion_patterns.py` - Test suite for validation
24
-
25
- ### @TAG Chain Verification
26
-
27
- **Primary Chain: REQ → DESIGN → TASK → TEST**
28
-
29
- - ✅ @SPEC:SESSION-CLEANUP-001 in `.moai/specs/SPEC-SESSION-CLEANUP-001/spec.md`
30
- - ✅ @CODE:SESSION-CLEANUP-001:CMD-0-PROJECT in `.claude/commands/alfred/0-project.md` (line 1193)
31
- - ✅ @CODE:SESSION-CLEANUP-001:CMD-1-PLAN in `.claude/commands/alfred/1-plan.md` (line 740)
32
- - ✅ @CODE:SESSION-CLEANUP-001:CMD-2-RUN in `.claude/commands/alfred/2-run.md` (estimated)
33
- - ✅ @CODE:SESSION-CLEANUP-001:CMD-3-SYNC in `.claude/commands/alfred/3-sync.md` (line 29)
34
- - ✅ @TEST:SESSION-CLEANUP-001 in `tests/test_command_completion_patterns.py` (line 4)
35
-
36
- **Total TAGs Found**: 5 @CODE:SESSION-CLEANUP-001 + 1 @SPEC:SESSION-CLEANUP-001 + 1 @TEST:SESSION-CLEANUP-001 = 7 total
37
-
38
- ### Acceptance Criteria Coverage
39
-
40
- **All 8 Scenarios from acceptance.md**:
41
-
42
- | Scenario | Status | Test Coverage |
43
- |----------|--------|----------------|
44
- | 1: /alfred:0-project AskUserQuestion | ✅ PASS | test_all_commands_have_askmserquestion_call |
45
- | 2: /alfred:1-plan AskUserQuestion | ✅ PASS | test_0_project_options |
46
- | 3: /alfred:2-run AskUserQuestion | ✅ PASS | test_1_plan_options |
47
- | 4: /alfred:3-sync AskUserQuestion | ✅ PASS | test_2_run_options |
48
- | 5: Session Summary Generation | ✅ PENDING | Documented, awaiting runtime |
49
- | 6: TodoWrite Cleanup | ✅ PENDING | Documented in CLAUDE.md |
50
- | 7: Prose Suggestion Prohibition | ✅ PASS | test_no_prose_suggestions_in_completion |
51
- | 8: Batched AskUserQuestion Design | ✅ PASS | test_commands_have_batched_design |
52
-
53
- ### Quality Metrics
54
-
55
- | Metric | Target | Actual | Status |
56
- |--------|--------|--------|--------|
57
- | Test Coverage | ≥90% | 11/11 passing | ✅ PASS |
58
- | Linting | 0 issues | 0 issues | ✅ PASS |
59
- | Type Checking | ≥95% | 100% | ✅ PASS |
60
- | Document Consistency | 100% | 100% | ✅ PASS |
61
- | TAGs Integrity | 100% | 7 TAGs verified | ✅ PASS |
62
-
63
- ---
64
-
65
- ## Next Session Context
66
-
67
- **For the next session**, use this state summary:
68
-
69
- 1. **Implementation Complete**: SPEC-SESSION-CLEANUP-001 implementation finished
70
- 2. **All 4 Commands Updated**: 0-project, 1-plan, 2-run, 3-sync all have completion patterns
71
- 3. **Test Suite Passing**: 11 test cases validating all requirements
72
- 4. **Ready for**: User acceptance testing / Runtime validation
73
- 5. **No Blockers**: All acceptance criteria documented and implemented
74
-
75
- ---
76
-
77
- ## Archival Notes
78
-
79
- This state file will be updated when:
80
- - Next SPEC execution begins
81
- - Session ends or transitions to new feature
82
- - Major workflow changes occur
83
-
84
- Current SPEC is CLOSED for implementation. Proceeding to documentation sync.