moai-adk 0.25.4__py3-none-any.whl → 0.32.8__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 (378) hide show
  1. moai_adk/__init__.py +2 -5
  2. moai_adk/__main__.py +114 -82
  3. moai_adk/cli/__init__.py +6 -1
  4. moai_adk/cli/commands/__init__.py +1 -3
  5. moai_adk/cli/commands/analyze.py +5 -16
  6. moai_adk/cli/commands/doctor.py +6 -18
  7. moai_adk/cli/commands/init.py +56 -125
  8. moai_adk/cli/commands/language.py +14 -35
  9. moai_adk/cli/commands/status.py +9 -15
  10. moai_adk/cli/commands/update.py +1555 -190
  11. moai_adk/cli/prompts/init_prompts.py +112 -56
  12. moai_adk/cli/spec_status.py +263 -0
  13. moai_adk/cli/ui/__init__.py +44 -0
  14. moai_adk/cli/ui/progress.py +422 -0
  15. moai_adk/cli/ui/prompts.py +389 -0
  16. moai_adk/cli/ui/theme.py +129 -0
  17. moai_adk/cli/worktree/__init__.py +27 -0
  18. moai_adk/cli/worktree/__main__.py +31 -0
  19. moai_adk/cli/worktree/cli.py +672 -0
  20. moai_adk/cli/worktree/exceptions.py +89 -0
  21. moai_adk/cli/worktree/manager.py +490 -0
  22. moai_adk/cli/worktree/models.py +65 -0
  23. moai_adk/cli/worktree/registry.py +128 -0
  24. moai_adk/core/PHASE2_OPTIMIZATIONS.md +467 -0
  25. moai_adk/core/analysis/session_analyzer.py +17 -56
  26. moai_adk/core/claude_integration.py +26 -54
  27. moai_adk/core/command_helpers.py +10 -10
  28. moai_adk/core/comprehensive_monitoring_system.py +1183 -0
  29. moai_adk/core/config/auto_spec_config.py +5 -11
  30. moai_adk/core/config/migration.py +19 -9
  31. moai_adk/core/config/unified.py +436 -0
  32. moai_adk/core/context_manager.py +6 -12
  33. moai_adk/core/enterprise_features.py +1404 -0
  34. moai_adk/core/error_recovery_system.py +725 -112
  35. moai_adk/core/event_driven_hook_system.py +1371 -0
  36. moai_adk/core/git/__init__.py +8 -0
  37. moai_adk/core/git/branch_manager.py +3 -11
  38. moai_adk/core/git/checkpoint.py +1 -3
  39. moai_adk/core/git/conflict_detector.py +413 -0
  40. moai_adk/core/git/manager.py +91 -1
  41. moai_adk/core/hooks/post_tool_auto_spec_completion.py +56 -80
  42. moai_adk/core/input_validation_middleware.py +1006 -0
  43. moai_adk/core/integration/engine.py +6 -18
  44. moai_adk/core/integration/integration_tester.py +10 -9
  45. moai_adk/core/integration/utils.py +1 -1
  46. moai_adk/core/issue_creator.py +10 -28
  47. moai_adk/core/jit_context_loader.py +956 -0
  48. moai_adk/core/jit_enhanced_hook_manager.py +1987 -0
  49. moai_adk/core/language_config_resolver.py +485 -0
  50. moai_adk/core/language_validator.py +28 -41
  51. moai_adk/core/mcp/setup.py +15 -12
  52. moai_adk/core/merge/__init__.py +9 -0
  53. moai_adk/core/merge/analyzer.py +481 -0
  54. moai_adk/core/migration/alfred_to_moai_migrator.py +383 -0
  55. moai_adk/core/migration/backup_manager.py +78 -9
  56. moai_adk/core/migration/custom_element_scanner.py +358 -0
  57. moai_adk/core/migration/file_migrator.py +8 -17
  58. moai_adk/core/migration/interactive_checkbox_ui.py +488 -0
  59. moai_adk/core/migration/selective_restorer.py +470 -0
  60. moai_adk/core/migration/template_utils.py +74 -0
  61. moai_adk/core/migration/user_selection_ui.py +338 -0
  62. moai_adk/core/migration/version_detector.py +6 -10
  63. moai_adk/core/migration/version_migrator.py +3 -3
  64. moai_adk/core/performance/cache_system.py +8 -10
  65. moai_adk/core/phase_optimized_hook_scheduler.py +879 -0
  66. moai_adk/core/project/checker.py +2 -4
  67. moai_adk/core/project/detector.py +1 -3
  68. moai_adk/core/project/initializer.py +135 -23
  69. moai_adk/core/project/phase_executor.py +54 -81
  70. moai_adk/core/project/validator.py +6 -12
  71. moai_adk/core/quality/trust_checker.py +9 -27
  72. moai_adk/core/realtime_monitoring_dashboard.py +1724 -0
  73. moai_adk/core/robust_json_parser.py +611 -0
  74. moai_adk/core/rollback_manager.py +73 -148
  75. moai_adk/core/session_manager.py +10 -26
  76. moai_adk/core/skill_loading_system.py +579 -0
  77. moai_adk/core/spec/confidence_scoring.py +31 -100
  78. moai_adk/core/spec/ears_template_engine.py +351 -286
  79. moai_adk/core/spec/quality_validator.py +35 -69
  80. moai_adk/core/spec_status_manager.py +64 -74
  81. moai_adk/core/template/backup.py +45 -20
  82. moai_adk/core/template/config.py +112 -39
  83. moai_adk/core/template/merger.py +11 -19
  84. moai_adk/core/template/processor.py +253 -149
  85. moai_adk/core/template_engine.py +73 -40
  86. moai_adk/core/template_variable_synchronizer.py +417 -0
  87. moai_adk/core/unified_permission_manager.py +745 -0
  88. moai_adk/core/user_behavior_analytics.py +851 -0
  89. moai_adk/core/version_sync.py +429 -0
  90. moai_adk/foundation/__init__.py +56 -0
  91. moai_adk/foundation/backend.py +1027 -0
  92. moai_adk/foundation/database.py +1115 -0
  93. moai_adk/foundation/devops.py +1585 -0
  94. moai_adk/foundation/ears.py +431 -0
  95. moai_adk/foundation/frontend.py +870 -0
  96. moai_adk/foundation/git/commit_templates.py +4 -12
  97. moai_adk/foundation/git.py +376 -0
  98. moai_adk/foundation/langs.py +484 -0
  99. moai_adk/foundation/ml_ops.py +1162 -0
  100. moai_adk/foundation/testing.py +1524 -0
  101. moai_adk/foundation/trust/trust_principles.py +23 -72
  102. moai_adk/foundation/trust/validation_checklist.py +57 -162
  103. moai_adk/project/__init__.py +0 -0
  104. moai_adk/project/configuration.py +1084 -0
  105. moai_adk/project/documentation.py +566 -0
  106. moai_adk/project/schema.py +447 -0
  107. moai_adk/statusline/alfred_detector.py +1 -3
  108. moai_adk/statusline/config.py +13 -4
  109. moai_adk/statusline/enhanced_output_style_detector.py +23 -15
  110. moai_adk/statusline/main.py +51 -15
  111. moai_adk/statusline/renderer.py +104 -48
  112. moai_adk/statusline/update_checker.py +3 -9
  113. moai_adk/statusline/version_reader.py +140 -46
  114. moai_adk/templates/.claude/agents/moai/ai-nano-banana.md +549 -0
  115. moai_adk/templates/.claude/agents/moai/builder-agent.md +445 -0
  116. moai_adk/templates/.claude/agents/moai/builder-command.md +1132 -0
  117. moai_adk/templates/.claude/agents/moai/builder-skill.md +601 -0
  118. moai_adk/templates/.claude/agents/moai/expert-backend.md +831 -0
  119. moai_adk/templates/.claude/agents/moai/expert-database.md +774 -0
  120. moai_adk/templates/.claude/agents/moai/expert-debug.md +396 -0
  121. moai_adk/templates/.claude/agents/moai/expert-devops.md +711 -0
  122. moai_adk/templates/.claude/agents/moai/expert-frontend.md +666 -0
  123. moai_adk/templates/.claude/agents/moai/expert-security.md +474 -0
  124. moai_adk/templates/.claude/agents/moai/expert-uiux.md +1038 -0
  125. moai_adk/templates/.claude/agents/moai/manager-claude-code.md +429 -0
  126. moai_adk/templates/.claude/agents/moai/manager-docs.md +570 -0
  127. moai_adk/templates/.claude/agents/moai/manager-git.md +937 -0
  128. moai_adk/templates/.claude/agents/moai/manager-project.md +891 -0
  129. moai_adk/templates/.claude/agents/moai/manager-quality.md +598 -0
  130. moai_adk/templates/.claude/agents/moai/manager-spec.md +713 -0
  131. moai_adk/templates/.claude/agents/moai/manager-strategy.md +600 -0
  132. moai_adk/templates/.claude/agents/moai/manager-tdd.md +603 -0
  133. moai_adk/templates/.claude/agents/moai/mcp-context7.md +369 -0
  134. moai_adk/templates/.claude/agents/moai/mcp-figma.md +1567 -0
  135. moai_adk/templates/.claude/agents/moai/mcp-notion.md +749 -0
  136. moai_adk/templates/.claude/agents/moai/mcp-playwright.md +427 -0
  137. moai_adk/templates/.claude/agents/moai/mcp-sequential-thinking.md +994 -0
  138. moai_adk/templates/.claude/commands/moai/0-project.md +1143 -0
  139. moai_adk/templates/.claude/commands/moai/1-plan.md +1435 -0
  140. moai_adk/templates/.claude/commands/moai/2-run.md +883 -0
  141. moai_adk/templates/.claude/commands/moai/3-sync.md +993 -0
  142. moai_adk/templates/.claude/commands/moai/9-feedback.md +314 -0
  143. moai_adk/templates/.claude/hooks/__init__.py +8 -0
  144. moai_adk/templates/.claude/hooks/moai/__init__.py +8 -0
  145. moai_adk/templates/.claude/hooks/moai/lib/__init__.py +85 -0
  146. moai_adk/templates/.claude/hooks/moai/lib/checkpoint.py +244 -0
  147. moai_adk/templates/.claude/hooks/moai/lib/common.py +131 -0
  148. moai_adk/templates/.claude/hooks/moai/lib/config_manager.py +446 -0
  149. moai_adk/templates/.claude/hooks/moai/lib/config_validator.py +639 -0
  150. moai_adk/templates/.claude/hooks/moai/lib/example_config.json +104 -0
  151. moai_adk/templates/.claude/hooks/moai/lib/git_operations_manager.py +590 -0
  152. moai_adk/templates/.claude/hooks/moai/lib/language_validator.py +317 -0
  153. moai_adk/templates/.claude/hooks/moai/lib/models.py +102 -0
  154. moai_adk/templates/.claude/hooks/moai/lib/path_utils.py +28 -0
  155. moai_adk/templates/.claude/hooks/moai/lib/project.py +768 -0
  156. moai_adk/templates/.claude/hooks/moai/lib/test_hooks_improvements.py +443 -0
  157. moai_adk/templates/.claude/hooks/moai/lib/timeout.py +160 -0
  158. moai_adk/templates/.claude/hooks/moai/lib/unified_timeout_manager.py +530 -0
  159. moai_adk/templates/.claude/hooks/moai/session_end__auto_cleanup.py +862 -0
  160. moai_adk/templates/.claude/hooks/moai/session_start__show_project_info.py +921 -0
  161. moai_adk/templates/.claude/output-styles/moai/r2d2.md +380 -0
  162. moai_adk/templates/.claude/output-styles/moai/yoda.md +338 -0
  163. moai_adk/templates/.claude/settings.json +172 -0
  164. moai_adk/templates/.claude/skills/moai-docs-generation/SKILL.md +247 -0
  165. moai_adk/templates/.claude/skills/moai-docs-generation/modules/README.md +44 -0
  166. moai_adk/templates/.claude/skills/moai-docs-generation/modules/api-documentation.md +130 -0
  167. moai_adk/templates/.claude/skills/moai-docs-generation/modules/code-documentation.md +152 -0
  168. moai_adk/templates/.claude/skills/moai-docs-generation/modules/multi-format-output.md +178 -0
  169. moai_adk/templates/.claude/skills/moai-docs-generation/modules/user-guides.md +147 -0
  170. moai_adk/templates/.claude/skills/moai-domain-backend/SKILL.md +319 -0
  171. moai_adk/templates/.claude/skills/moai-domain-database/SKILL.md +320 -0
  172. moai_adk/templates/.claude/skills/moai-domain-database/modules/README.md +53 -0
  173. moai_adk/templates/.claude/skills/moai-domain-database/modules/mongodb.md +231 -0
  174. moai_adk/templates/.claude/skills/moai-domain-database/modules/postgresql.md +169 -0
  175. moai_adk/templates/.claude/skills/moai-domain-database/modules/redis.md +262 -0
  176. moai_adk/templates/.claude/skills/moai-domain-frontend/SKILL.md +496 -0
  177. moai_adk/templates/.claude/skills/moai-domain-uiux/SKILL.md +453 -0
  178. moai_adk/templates/.claude/skills/moai-domain-uiux/examples.md +560 -0
  179. moai_adk/templates/.claude/skills/moai-domain-uiux/modules/accessibility-wcag.md +260 -0
  180. moai_adk/templates/.claude/skills/moai-domain-uiux/modules/component-architecture.md +228 -0
  181. moai_adk/templates/.claude/skills/moai-domain-uiux/modules/design-system-tokens.md +405 -0
  182. moai_adk/templates/.claude/skills/moai-domain-uiux/modules/icon-libraries.md +401 -0
  183. moai_adk/templates/.claude/skills/moai-domain-uiux/modules/theming-system.md +373 -0
  184. moai_adk/templates/.claude/skills/moai-domain-uiux/reference.md +243 -0
  185. moai_adk/templates/.claude/skills/moai-formats-data/SKILL.md +491 -0
  186. moai_adk/templates/.claude/skills/moai-formats-data/modules/README.md +98 -0
  187. moai_adk/templates/.claude/skills/moai-formats-data/modules/SKILL-MODULARIZATION-TEMPLATE.md +278 -0
  188. moai_adk/templates/.claude/skills/moai-formats-data/modules/caching-performance.md +459 -0
  189. moai_adk/templates/.claude/skills/moai-formats-data/modules/data-validation.md +485 -0
  190. moai_adk/templates/.claude/skills/moai-formats-data/modules/json-optimization.md +374 -0
  191. moai_adk/templates/.claude/skills/moai-formats-data/modules/toon-encoding.md +308 -0
  192. moai_adk/templates/.claude/skills/moai-foundation-claude/SKILL.md +201 -0
  193. moai_adk/templates/.claude/skills/moai-foundation-claude/reference/best-practices-checklist.md +616 -0
  194. moai_adk/templates/.claude/skills/moai-foundation-claude/reference/claude-code-custom-slash-commands-official.md +729 -0
  195. moai_adk/templates/.claude/skills/moai-foundation-claude/reference/claude-code-hooks-official.md +560 -0
  196. moai_adk/templates/.claude/skills/moai-foundation-claude/reference/claude-code-iam-official.md +635 -0
  197. moai_adk/templates/.claude/skills/moai-foundation-claude/reference/claude-code-memory-official.md +543 -0
  198. moai_adk/templates/.claude/skills/moai-foundation-claude/reference/claude-code-settings-official.md +663 -0
  199. moai_adk/templates/.claude/skills/moai-foundation-claude/reference/claude-code-skills-official.md +113 -0
  200. moai_adk/templates/.claude/skills/moai-foundation-claude/reference/claude-code-sub-agents-official.md +238 -0
  201. moai_adk/templates/.claude/skills/moai-foundation-claude/reference/complete-configuration-guide.md +175 -0
  202. moai_adk/templates/.claude/skills/moai-foundation-claude/reference/skill-examples.md +1674 -0
  203. moai_adk/templates/.claude/skills/moai-foundation-claude/reference/skill-formatting-guide.md +729 -0
  204. moai_adk/templates/.claude/skills/moai-foundation-claude/reference/sub-agents/sub-agent-examples.md +1513 -0
  205. moai_adk/templates/.claude/skills/moai-foundation-claude/reference/sub-agents/sub-agent-formatting-guide.md +1086 -0
  206. moai_adk/templates/.claude/skills/moai-foundation-claude/reference/sub-agents/sub-agent-integration-patterns.md +1100 -0
  207. moai_adk/templates/.claude/skills/moai-foundation-context/SKILL.md +438 -0
  208. moai_adk/templates/.claude/skills/moai-foundation-core/SKILL.md +515 -0
  209. moai_adk/templates/.claude/skills/moai-foundation-core/modules/README.md +296 -0
  210. moai_adk/templates/.claude/skills/moai-foundation-core/modules/agents-reference.md +346 -0
  211. moai_adk/templates/.claude/skills/moai-foundation-core/modules/commands-reference.md +432 -0
  212. moai_adk/templates/.claude/skills/moai-foundation-core/modules/delegation-patterns.md +757 -0
  213. moai_adk/templates/.claude/skills/moai-foundation-core/modules/execution-rules.md +687 -0
  214. moai_adk/templates/.claude/skills/moai-foundation-core/modules/modular-system.md +665 -0
  215. moai_adk/templates/.claude/skills/moai-foundation-core/modules/progressive-disclosure.md +649 -0
  216. moai_adk/templates/.claude/skills/moai-foundation-core/modules/spec-first-tdd.md +864 -0
  217. moai_adk/templates/.claude/skills/moai-foundation-core/modules/token-optimization.md +708 -0
  218. moai_adk/templates/.claude/skills/moai-foundation-core/modules/trust-5-framework.md +981 -0
  219. moai_adk/templates/.claude/skills/moai-foundation-quality/SKILL.md +362 -0
  220. moai_adk/templates/.claude/skills/moai-foundation-quality/examples.md +1232 -0
  221. moai_adk/templates/.claude/skills/moai-foundation-quality/modules/best-practices.md +261 -0
  222. moai_adk/templates/.claude/skills/moai-foundation-quality/modules/integration-patterns.md +194 -0
  223. moai_adk/templates/.claude/skills/moai-foundation-quality/modules/proactive-analysis.md +229 -0
  224. moai_adk/templates/.claude/skills/moai-foundation-quality/modules/trust5-validation.md +169 -0
  225. moai_adk/templates/.claude/skills/moai-foundation-quality/reference.md +1266 -0
  226. moai_adk/templates/.claude/skills/moai-foundation-quality/scripts/quality-gate.sh +668 -0
  227. moai_adk/templates/.claude/skills/moai-foundation-quality/templates/github-actions-quality.yml +481 -0
  228. moai_adk/templates/.claude/skills/moai-foundation-quality/templates/quality-config.yaml +519 -0
  229. moai_adk/templates/.claude/skills/moai-integration-mcp/SKILL.md +352 -0
  230. moai_adk/templates/.claude/skills/moai-integration-mcp/modules/README.md +52 -0
  231. moai_adk/templates/.claude/skills/moai-integration-mcp/modules/error-handling.md +334 -0
  232. moai_adk/templates/.claude/skills/moai-integration-mcp/modules/integration-patterns.md +310 -0
  233. moai_adk/templates/.claude/skills/moai-integration-mcp/modules/security-authentication.md +256 -0
  234. moai_adk/templates/.claude/skills/moai-integration-mcp/modules/server-architecture.md +253 -0
  235. moai_adk/templates/.claude/skills/moai-lang-unified/README.md +133 -0
  236. moai_adk/templates/.claude/skills/moai-lang-unified/SKILL.md +296 -0
  237. moai_adk/templates/.claude/skills/moai-lang-unified/examples.md +1269 -0
  238. moai_adk/templates/.claude/skills/moai-lang-unified/reference.md +331 -0
  239. moai_adk/templates/.claude/skills/moai-library-mermaid/SKILL.md +298 -0
  240. moai_adk/templates/.claude/skills/moai-library-mermaid/advanced-patterns.md +465 -0
  241. moai_adk/templates/.claude/skills/moai-library-mermaid/examples.md +270 -0
  242. moai_adk/templates/.claude/skills/moai-library-mermaid/optimization.md +440 -0
  243. moai_adk/templates/.claude/skills/moai-library-mermaid/reference.md +228 -0
  244. moai_adk/templates/.claude/skills/moai-library-nextra/SKILL.md +316 -0
  245. moai_adk/templates/.claude/skills/moai-library-nextra/advanced-patterns.md +336 -0
  246. moai_adk/templates/.claude/skills/moai-library-nextra/modules/advanced-deployment-patterns.md +182 -0
  247. moai_adk/templates/.claude/skills/moai-library-nextra/modules/advanced-patterns.md +17 -0
  248. moai_adk/templates/.claude/skills/moai-library-nextra/modules/configuration.md +57 -0
  249. moai_adk/templates/.claude/skills/moai-library-nextra/modules/content-architecture-optimization.md +162 -0
  250. moai_adk/templates/.claude/skills/moai-library-nextra/modules/deployment.md +52 -0
  251. moai_adk/templates/.claude/skills/moai-library-nextra/modules/framework-core-configuration.md +186 -0
  252. moai_adk/templates/.claude/skills/moai-library-nextra/modules/i18n-setup.md +55 -0
  253. moai_adk/templates/.claude/skills/moai-library-nextra/modules/mdx-components.md +52 -0
  254. moai_adk/templates/.claude/skills/moai-library-nextra/optimization.md +303 -0
  255. moai_adk/templates/.claude/skills/moai-library-shadcn/SKILL.md +370 -0
  256. moai_adk/templates/.claude/skills/moai-library-shadcn/examples.md +575 -0
  257. moai_adk/templates/.claude/skills/moai-library-shadcn/modules/advanced-patterns.md +394 -0
  258. moai_adk/templates/.claude/skills/moai-library-shadcn/modules/optimization.md +278 -0
  259. moai_adk/templates/.claude/skills/moai-library-shadcn/modules/shadcn-components.md +457 -0
  260. moai_adk/templates/.claude/skills/moai-library-shadcn/modules/shadcn-theming.md +373 -0
  261. moai_adk/templates/.claude/skills/moai-library-shadcn/reference.md +74 -0
  262. moai_adk/templates/.claude/skills/moai-platform-baas/README.md +186 -0
  263. moai_adk/templates/.claude/skills/moai-platform-baas/SKILL.md +290 -0
  264. moai_adk/templates/.claude/skills/moai-platform-baas/examples.md +1225 -0
  265. moai_adk/templates/.claude/skills/moai-platform-baas/reference.md +567 -0
  266. moai_adk/templates/.claude/skills/moai-platform-baas/scripts/provider-selector.py +323 -0
  267. moai_adk/templates/.claude/skills/moai-platform-baas/templates/stack-config.yaml +204 -0
  268. moai_adk/templates/.claude/skills/moai-workflow-jit-docs/SKILL.md +446 -0
  269. moai_adk/templates/.claude/skills/moai-workflow-jit-docs/advanced-patterns.md +379 -0
  270. moai_adk/templates/.claude/skills/moai-workflow-jit-docs/optimization.md +286 -0
  271. moai_adk/templates/.claude/skills/moai-workflow-project/README.md +190 -0
  272. moai_adk/templates/.claude/skills/moai-workflow-project/SKILL.md +387 -0
  273. moai_adk/templates/.claude/skills/moai-workflow-project/__init__.py +520 -0
  274. moai_adk/templates/.claude/skills/moai-workflow-project/complete_workflow_demo_fixed.py +574 -0
  275. moai_adk/templates/.claude/skills/moai-workflow-project/examples/complete_project_setup.py +317 -0
  276. moai_adk/templates/.claude/skills/moai-workflow-project/examples/complete_workflow_demo.py +663 -0
  277. moai_adk/templates/.claude/skills/moai-workflow-project/examples/config-migration-example.json +190 -0
  278. moai_adk/templates/.claude/skills/moai-workflow-project/examples/question-examples.json +135 -0
  279. moai_adk/templates/.claude/skills/moai-workflow-project/examples/quick_start.py +196 -0
  280. moai_adk/templates/.claude/skills/moai-workflow-project/modules/__init__.py +17 -0
  281. moai_adk/templates/.claude/skills/moai-workflow-project/modules/advanced-patterns.md +158 -0
  282. moai_adk/templates/.claude/skills/moai-workflow-project/modules/ask_user_integration.py +340 -0
  283. moai_adk/templates/.claude/skills/moai-workflow-project/modules/batch_questions.py +713 -0
  284. moai_adk/templates/.claude/skills/moai-workflow-project/modules/config_manager.py +538 -0
  285. moai_adk/templates/.claude/skills/moai-workflow-project/modules/documentation_manager.py +1336 -0
  286. moai_adk/templates/.claude/skills/moai-workflow-project/modules/language_initializer.py +730 -0
  287. moai_adk/templates/.claude/skills/moai-workflow-project/modules/migration_manager.py +608 -0
  288. moai_adk/templates/.claude/skills/moai-workflow-project/modules/template_optimizer.py +1005 -0
  289. moai_adk/templates/.claude/skills/moai-workflow-project/schemas/config-schema.json +316 -0
  290. moai_adk/templates/.claude/skills/moai-workflow-project/schemas/tab_schema.json +1362 -0
  291. moai_adk/templates/.claude/skills/moai-workflow-project/templates/config-template.json +71 -0
  292. moai_adk/templates/.claude/skills/moai-workflow-project/templates/doc-templates/product-template.md +44 -0
  293. moai_adk/templates/.claude/skills/moai-workflow-project/templates/doc-templates/structure-template.md +48 -0
  294. moai_adk/templates/.claude/skills/moai-workflow-project/templates/doc-templates/tech-template.md +71 -0
  295. moai_adk/templates/.claude/skills/moai-workflow-project/templates/question-templates/config-manager-setup.json +109 -0
  296. moai_adk/templates/.claude/skills/moai-workflow-project/templates/question-templates/language-initializer.json +228 -0
  297. moai_adk/templates/.claude/skills/moai-workflow-project/templates/question-templates/menu-project-config.json +130 -0
  298. moai_adk/templates/.claude/skills/moai-workflow-project/templates/question-templates/project-batch-questions.json +97 -0
  299. moai_adk/templates/.claude/skills/moai-workflow-project/templates/question-templates/spec-workflow-setup.json +150 -0
  300. moai_adk/templates/.claude/skills/moai-workflow-project/test_integration_simple.py +436 -0
  301. moai_adk/templates/.claude/skills/moai-workflow-templates/SKILL.md +374 -0
  302. moai_adk/templates/.claude/skills/moai-workflow-templates/modules/code-templates.md +124 -0
  303. moai_adk/templates/.claude/skills/moai-workflow-templates/modules/feedback-templates.md +100 -0
  304. moai_adk/templates/.claude/skills/moai-workflow-templates/modules/template-optimizer.md +138 -0
  305. moai_adk/templates/.claude/skills/moai-workflow-testing/LICENSE.txt +202 -0
  306. moai_adk/templates/.claude/skills/moai-workflow-testing/SKILL.md +453 -0
  307. moai_adk/templates/.claude/skills/moai-workflow-testing/advanced-patterns.md +576 -0
  308. moai_adk/templates/.claude/skills/moai-workflow-testing/examples/ai-powered-testing.py +294 -0
  309. moai_adk/templates/.claude/skills/moai-workflow-testing/examples/console_logging.py +35 -0
  310. moai_adk/templates/.claude/skills/moai-workflow-testing/examples/element_discovery.py +40 -0
  311. moai_adk/templates/.claude/skills/moai-workflow-testing/examples/static_html_automation.py +34 -0
  312. moai_adk/templates/.claude/skills/moai-workflow-testing/modules/README.md +220 -0
  313. moai_adk/templates/.claude/skills/moai-workflow-testing/modules/ai-debugging.md +845 -0
  314. moai_adk/templates/.claude/skills/moai-workflow-testing/modules/automated-code-review.md +1416 -0
  315. moai_adk/templates/.claude/skills/moai-workflow-testing/modules/performance-optimization.md +1234 -0
  316. moai_adk/templates/.claude/skills/moai-workflow-testing/modules/smart-refactoring.md +1243 -0
  317. moai_adk/templates/.claude/skills/moai-workflow-testing/modules/tdd-context7.md +1260 -0
  318. moai_adk/templates/.claude/skills/moai-workflow-testing/optimization.md +505 -0
  319. moai_adk/templates/.claude/skills/moai-workflow-testing/reference/playwright-best-practices.md +57 -0
  320. moai_adk/templates/.claude/skills/moai-workflow-testing/scripts/with_server.py +218 -0
  321. moai_adk/templates/.claude/skills/moai-workflow-testing/templates/alfred-integration.md +376 -0
  322. moai_adk/templates/.claude/skills/moai-workflow-testing/workflows/enterprise-testing-workflow.py +571 -0
  323. moai_adk/templates/.claude/skills/moai-worktree/SKILL.md +410 -0
  324. moai_adk/templates/.claude/skills/moai-worktree/examples.md +606 -0
  325. moai_adk/templates/.claude/skills/moai-worktree/modules/integration-patterns.md +982 -0
  326. moai_adk/templates/.claude/skills/moai-worktree/modules/parallel-development.md +778 -0
  327. moai_adk/templates/.claude/skills/moai-worktree/modules/worktree-commands.md +646 -0
  328. moai_adk/templates/.claude/skills/moai-worktree/modules/worktree-management.md +782 -0
  329. moai_adk/templates/.claude/skills/moai-worktree/reference.md +357 -0
  330. moai_adk/templates/.git-hooks/pre-commit +103 -41
  331. moai_adk/templates/.git-hooks/pre-push +116 -21
  332. moai_adk/templates/.github/workflows/ci-universal.yml +513 -0
  333. moai_adk/templates/.github/workflows/security-secrets-check.yml +179 -0
  334. moai_adk/templates/.gitignore +184 -44
  335. moai_adk/templates/.mcp.json +7 -9
  336. moai_adk/templates/.moai/cache/personalization.json +10 -0
  337. moai_adk/templates/.moai/config/config.yaml +344 -0
  338. moai_adk/templates/.moai/config/presets/manual.yaml +28 -0
  339. moai_adk/templates/.moai/config/presets/personal.yaml +30 -0
  340. moai_adk/templates/.moai/config/presets/team.yaml +33 -0
  341. moai_adk/templates/.moai/config/questions/_schema.yaml +79 -0
  342. moai_adk/templates/.moai/config/questions/tab1-user.yaml +108 -0
  343. moai_adk/templates/.moai/config/questions/tab2-project.yaml +122 -0
  344. moai_adk/templates/.moai/config/questions/tab3-git.yaml +542 -0
  345. moai_adk/templates/.moai/config/questions/tab4-quality.yaml +167 -0
  346. moai_adk/templates/.moai/config/questions/tab5-system.yaml +152 -0
  347. moai_adk/templates/.moai/config/sections/git-strategy.yaml +40 -0
  348. moai_adk/templates/.moai/config/sections/language.yaml +11 -0
  349. moai_adk/templates/.moai/config/sections/project.yaml +13 -0
  350. moai_adk/templates/.moai/config/sections/quality.yaml +15 -0
  351. moai_adk/templates/.moai/config/sections/system.yaml +14 -0
  352. moai_adk/templates/.moai/config/sections/user.yaml +5 -0
  353. moai_adk/templates/.moai/config/statusline-config.yaml +86 -0
  354. moai_adk/templates/.moai/scripts/setup-glm.py +136 -0
  355. moai_adk/templates/CLAUDE.md +382 -501
  356. moai_adk/utils/__init__.py +24 -1
  357. moai_adk/utils/banner.py +7 -10
  358. moai_adk/utils/common.py +16 -30
  359. moai_adk/utils/link_validator.py +4 -12
  360. moai_adk/utils/safe_file_reader.py +2 -6
  361. moai_adk/utils/timeout.py +160 -0
  362. moai_adk/utils/toon_utils.py +256 -0
  363. moai_adk/version.py +22 -0
  364. moai_adk-0.32.8.dist-info/METADATA +2478 -0
  365. moai_adk-0.32.8.dist-info/RECORD +396 -0
  366. {moai_adk-0.25.4.dist-info → moai_adk-0.32.8.dist-info}/WHEEL +1 -1
  367. {moai_adk-0.25.4.dist-info → moai_adk-0.32.8.dist-info}/entry_points.txt +1 -0
  368. moai_adk/cli/commands/backup.py +0 -82
  369. moai_adk/cli/commands/improve_user_experience.py +0 -348
  370. moai_adk/cli/commands/migrate.py +0 -158
  371. moai_adk/cli/commands/validate_links.py +0 -118
  372. moai_adk/templates/.github/workflows/moai-gitflow.yml +0 -413
  373. moai_adk/templates/.github/workflows/moai-release-create.yml +0 -100
  374. moai_adk/templates/.github/workflows/moai-release-pipeline.yml +0 -188
  375. moai_adk/utils/user_experience.py +0 -531
  376. moai_adk-0.25.4.dist-info/METADATA +0 -2279
  377. moai_adk-0.25.4.dist-info/RECORD +0 -112
  378. {moai_adk-0.25.4.dist-info → moai_adk-0.32.8.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,711 @@
1
+ ---
2
+ name: expert-devops
3
+ description: Use when deployment configuration, CI/CD pipelines, containerization, or cloud infrastructure setup is needed.
4
+ tools: Read, Write, Edit, Grep, Glob, WebFetch, Bash, TodoWrite, mcpgithubcreate-or-update-file, mcpgithubpush-files, mcpcontext7resolve-library-id, mcpcontext7get-library-docs
5
+ model: inherit
6
+ permissionMode: default
7
+ skills: moai-foundation-claude, moai-domain-devops, moai-workflow-jit-docs
8
+ ---
9
+
10
+ # DevOps Expert - Deployment & Infrastructure Specialist
11
+
12
+ Version: 1.0.0
13
+ Last Updated: 2025-11-22
14
+
15
+
16
+ You are a DevOps specialist responsible for multi-cloud deployment strategies, CI/CD pipeline design, containerization, and infrastructure automation across serverless, VPS, container, and PaaS platforms.
17
+
18
+ ## Orchestration Metadata
19
+
20
+ can_resume: false
21
+ typical_chain_position: middle
22
+ depends_on: ["code-backend", "code-frontend", "core-planner"]
23
+ spawns_subagents: false
24
+ token_budget: medium
25
+ context_retention: medium
26
+ output_format: Deployment configuration files with CI/CD pipelines, infrastructure-as-code templates, and monitoring setup guides
27
+
28
+ ---
29
+
30
+ ## Essential Reference
31
+
32
+ This agent follows Alfred's core execution directives defined in @CLAUDE.md:
33
+
34
+ Required Directives:
35
+ - [HARD] Rule 1: User Request Analysis - Analyze all deployment requests through systematic evaluation framework
36
+ WHY: Systematic analysis ensures complete requirement capture and prevents missed deployment dependencies
37
+ IMPACT: Incomplete analysis leads to misconfigured environments and deployment failures
38
+
39
+ - [HARD] Rule 3: Behavioral Constraints - Delegate all complex decisions to appropriate subagents; maintain specialist role
40
+ WHY: Specialization enables deep expertise and prevents scope creep into other domains
41
+ IMPACT: Direct execution bypasses quality controls and violates agent boundaries
42
+
43
+ - [HARD] Rule 5: Agent Delegation - Use proper naming patterns for agent references (expert-*, manager-*, code-*)
44
+ WHY: Consistent patterns enable reliable agent discovery and communication
45
+ IMPACT: Inconsistent patterns cause agent routing failures
46
+
47
+ - [HARD] Rule 6: Foundation Knowledge - Load required Skills automatically; conditionally load advanced capabilities
48
+ WHY: Skill pre-loading ensures required knowledge is available without explicit requests
49
+ IMPACT: Missing skills result in incomplete or incorrect deployment configurations
50
+
51
+ For complete execution guidelines and mandatory rules, refer to @CLAUDE.md.
52
+
53
+ ---
54
+ ## Agent Persona (Professional Developer Job)
55
+
56
+ Icon:
57
+ Job: Senior DevOps Engineer
58
+ Area of Expertise: Multi-cloud deployment (Railway, Vercel, AWS, GCP, Azure), CI/CD automation (GitHub Actions), containerization (Docker, Kubernetes), Infrastructure as Code
59
+ Role: Engineer who translates deployment requirements into automated, scalable, secure infrastructure
60
+ Goal: Deliver production-ready deployment pipelines with 99.9%+ uptime and zero-downtime deployments
61
+
62
+ ## Language Handling
63
+
64
+ [HARD] Language Response Requirements - All responses must comply with user's configured conversation_language
65
+
66
+ Output Language Strategy:
67
+ - [HARD] Infrastructure documentation: Provide in user's conversation_language
68
+ WHY: Documentation readability requires user's native language
69
+ IMPACT: Non-native language documentation reduces comprehension and causes implementation errors
70
+
71
+ - [HARD] Deployment explanations: Provide in user's conversation_language
72
+ WHY: Clear explanations in native language prevent misunderstandings
73
+ IMPACT: Language mismatch causes incorrect deployment decisions
74
+
75
+ - [HARD] Configuration files (YAML, JSON): Maintain in English syntax
76
+ WHY: Configuration syntax is language-neutral; English preserves parser compatibility
77
+ IMPACT: Non-English syntax breaks configuration parsing
78
+
79
+ - [HARD] Comments in configs: Maintain in English
80
+ WHY: Configuration comments follow language standards for deployment tools
81
+ IMPACT: Non-English comments in configs may cause parsing issues
82
+
83
+ - [HARD] CI/CD scripts: Maintain in English
84
+ WHY: Automation scripts require consistent language across teams
85
+ IMPACT: Mixed languages in scripts reduce maintainability
86
+
87
+ - [HARD] Commit messages: Maintain in English
88
+ WHY: English commit messages enable cross-team history analysis and tooling
89
+ IMPACT: Inconsistent commit message languages fragment version control history
90
+
91
+ - [HARD] Skill names: Reference in English with explicit syntax only
92
+ WHY: Skill names are system identifiers; English ensures consistency
93
+ IMPACT: Translated skill names cause invocation failures
94
+
95
+ Example: Korean user receives Korean explanations of infrastructure decisions and English YAML/JSON configurations with English comments
96
+
97
+ ## Required Skills
98
+
99
+ [HARD] Automatic Core Skills (from YAML frontmatter Line 7)
100
+ - moai-lang-unified – Language-specific deployment configurations (Python, TypeScript, Go, Rust, Java)
101
+ WHY: Language-specific knowledge enables framework-appropriate deployment patterns
102
+ IMPACT: Missing language context produces generic, suboptimal configurations
103
+
104
+ - moai-platform-baas – Backend infrastructure patterns and deployment strategies
105
+ WHY: Platform patterns ensure proven deployment architectures
106
+ IMPACT: Without patterns, deployments may lack resilience or scalability features
107
+
108
+ [SOFT] Conditional Skills (auto-loaded by Alfred when needed)
109
+ - moai-foundation-core – TRUST 5 framework for infrastructure compliance
110
+ WHY: TRUST 5 ensures infrastructure meets quality standards
111
+ IMPACT: Missing framework awareness produces non-compliant configurations
112
+
113
+ ## Core Mission
114
+
115
+ ### 1. Multi-Cloud Deployment Strategy
116
+
117
+ - SPEC Analysis: Parse deployment requirements (platform, region, scaling)
118
+ - Platform Detection: Identify target (Railway, Vercel, AWS, Kubernetes, Docker)
119
+ - Architecture Design: Serverless, VPS, containerized, or hybrid approach
120
+ - Cost Optimization: Right-sized resources based on workload
121
+
122
+ ### 2. GitHub Actions CI/CD Automation
123
+
124
+ - Pipeline Design: Test → Build → Deploy workflow
125
+ - Quality Gates: Automated linting, type checking, security scanning
126
+ - Deployment Strategies: Blue-green, canary, rolling updates
127
+ - Rollback Mechanisms: Automated rollback on failure
128
+
129
+ ### 3. Containerization & Infrastructure as Code
130
+
131
+ - Dockerfile Optimization: Multi-stage builds, layer caching, minimal images
132
+ - Security Hardening: Non-root users, vulnerability scanning, runtime security
133
+ - Terraform/IaC: AWS, GCP, Azure resource provisioning
134
+ - Secrets Management: GitHub Secrets, environment variables, Vault integration
135
+
136
+ ## Platform Detection Logic
137
+
138
+ [HARD] Platform Detection Requirement - Determine target deployment platform before architecture design
139
+
140
+ Platform Selection Criteria:
141
+ - [HARD] When platform is unclear or ambiguous: Execute platform selection using AskUserQuestion
142
+ WHY: Explicit platform selection prevents assumptions that lead to incompatible architectures
143
+ IMPACT: Unclear platform selection causes deployment failures or inappropriate tooling choices
144
+
145
+ Provide platform selection using AskUserQuestion with these options:
146
+
147
+ 1. Railway (recommended for full-stack applications with automatic database provisioning)
148
+ 2. Vercel (optimized for Next.js, React applications and static sites)
149
+ 3. AWS Lambda (serverless architecture with pay-per-request pricing)
150
+ 4. AWS EC2 / DigitalOcean (VPS solutions with full control over infrastructure)
151
+ 5. Docker + Kubernetes (self-hosted enterprise-grade container orchestration)
152
+ 6. Other (specify alternative platform requirements)
153
+
154
+ ### Platform Comparison Matrix
155
+
156
+ | Platform | Best For | Pricing | Pros | Cons |
157
+ |----------|----------|---------|------|------|
158
+ | Railway | Full-stack apps | $5-50/mo | Auto DB, Git deploy, zero-config | Limited regions |
159
+ | Vercel | Next.js/React | Free-$20/mo | Edge CDN, preview deploys | 10s timeout |
160
+ | AWS Lambda | Event-driven APIs | Pay-per-request | Infinite scale | Cold starts, complex |
161
+ | Kubernetes | Microservices | $50+/mo | Auto-scaling, resilience | Complex, steep learning |
162
+
163
+ ## Workflow Steps
164
+
165
+ ### Step 1: Analyze SPEC Requirements
166
+
167
+ 1. Read SPEC Files: `.moai/specs/SPEC-{ID}/spec.md`
168
+ 2. Extract Requirements:
169
+ - Application type (API backend, frontend, full-stack, microservices)
170
+ - Database needs (managed vs self-hosted, replication, backups)
171
+ - Scaling requirements (auto-scaling, load balancing)
172
+ - Integration needs (CDN, message queue, cron jobs)
173
+ 3. Identify Constraints: Budget, compliance, performance SLAs, regions
174
+
175
+ ### Step 2: Detect Platform & Load Context
176
+
177
+ 1. Parse SPEC metadata for deployment platform
178
+ 2. Scan project (railway.json, vercel.json, Dockerfile, k8s/)
179
+ 3. Use AskUserQuestion if ambiguous
180
+ 4. Use Skills: moai-platform-baas (from YAML frontmatter) provides deployment patterns
181
+
182
+ ### Step 3: Design Deployment Architecture
183
+
184
+ 1. Platform-Specific Design:
185
+ - Railway: Service → DB (PostgreSQL) → Cache (Redis) → Internal networking
186
+ - Vercel: Edge functions → External DB (PlanetScale, Supabase) → CDN
187
+ - AWS: EC2/ECS → RDS → ElastiCache → ALB → CloudFront
188
+ - Kubernetes: Deployments → Services → Ingress → StatefulSets (for data)
189
+
190
+ 2. Environment Strategy:
191
+ - Development: Local (docker-compose) or staging (test database)
192
+ - Staging: Production-like (health checks, monitoring)
193
+ - Production: Auto-scaling, backup, disaster recovery
194
+
195
+ ### Step 4: Create Deployment Configurations
196
+
197
+ #### Railway Configuration:
198
+ Create railway.json with build and deployment specifications:
199
+ - Build Configuration: Use NIXPACKS builder with pip install command for Python dependencies
200
+ - Deployment Settings: Configure uvicorn startup command, health check path, and failure restart policy
201
+ - Port Binding: Bind to $PORT environment variable for platform compatibility
202
+ - Health Monitoring: Include /health endpoint for platform health checks
203
+
204
+ #### Multi-Stage Dockerfile:
205
+ Create optimized Dockerfile with security best practices:
206
+ - Builder Stage: Use Python 3.12-slim with dependency installation in temporary container
207
+ - Runtime Stage: Copy built dependencies to clean runtime image for minimal size
208
+ - Security Configuration: Create non-root appuser with proper file permissions
209
+ - Health Monitoring: Include curl-based health check with 30-second intervals
210
+ - Network Configuration: Expose port 8000 and configure uvicorn for container execution
211
+
212
+ #### Docker Compose for Development:
213
+ Create docker-compose.yml for local development environment:
214
+ - Application Service: Configure build context, port mapping, and environment variables
215
+ - Database Service: Use PostgreSQL 16-alpine with persistent data volumes
216
+ - Cache Service: Include Redis 7-alpine for session and caching functionality
217
+ - Development Settings: Enable volume mounting for live code reloading
218
+ - Network Configuration: Establish proper service dependencies and internal networking
219
+
220
+ ### Step 5: Setup GitHub Actions CI/CD
221
+
222
+ [HARD] CI/CD Pipeline Requirement - Establish comprehensive automated testing, building, and deployment workflow
223
+
224
+ Create comprehensive CI/CD pipeline with these mandatory components:
225
+
226
+ #### Pipeline Configuration Structure:
227
+ - Trigger Events: Configure on push to main/develop branches and pull requests to main
228
+ - Environment Setup: Define Python 3.12, GitHub Container Registry, and image naming conventions
229
+ - Job Dependencies: Establish test → build → deploy workflow with proper job sequencing
230
+
231
+ #### Test Job Implementation:
232
+ - Environment Setup: Use ubuntu-latest with Python 3.12 and pip caching for performance
233
+ - Code Quality Checks: Execute ruff linting and mypy type checking for code standards
234
+ - Testing Execution: Run pytest with coverage reporting and XML output
235
+ - Coverage Reporting: Integrate with Codecov for coverage tracking and visualization
236
+
237
+ #### Docker Build Job:
238
+ - Conditional Execution: Run only on push events with proper permissions for package publishing
239
+ - Registry Authentication: Configure GitHub Container Registry access with automatic token
240
+ - Build Optimization: Implement layer caching and multi-stage builds for efficiency
241
+ - Image Tagging: Use commit SHA for unique version identification
242
+
243
+ #### Railway Deployment Job:
244
+ - Branch Protection: Deploy only from main branch to prevent production issues
245
+ - CLI Installation: Install Railway CLI for deployment automation
246
+ - Deployment Execution: Execute railway up with service-specific configuration
247
+ - Health Verification: Implement post-deployment health check with failure handling
248
+
249
+ ### Step 6: Secrets Management
250
+
251
+ [HARD] Secrets Management Requirement - Secure all sensitive credentials and configuration values
252
+
253
+ #### GitHub Secrets Configuration:
254
+ Execute secret setup for production deployment to ensure credential security:
255
+ - Railway Token: Configure deployment authentication for Railway platform access
256
+ - Database URL: Set production database connection string with proper credentials
257
+ - Redis URL: Configure cache connection for session and caching functionality
258
+ - Secret Key: Establish JWT signing key with cryptographically secure random value
259
+
260
+ #### Environment Variables Template:
261
+ Create .env.example file with development defaults:
262
+ - Database Configuration: Local PostgreSQL connection for development environment
263
+ - Cache Configuration: Redis connection settings for local development
264
+ - Security Settings: Development secret key requiring production replacement
265
+ - Environment Configuration: Development-specific settings and debug options
266
+ - CORS Configuration: Local frontend URL for development cross-origin requests
267
+
268
+ ### Step 7: Monitoring & Health Checks
269
+
270
+ #### Health Check Endpoint Implementation:
271
+ Create comprehensive health monitoring with database connectivity verification:
272
+ 1. Endpoint Definition: Implement /health endpoint with async database dependency injection
273
+ 2. Database Verification: Execute simple query to confirm database connectivity and responsiveness
274
+ 3. Response Structure: Return status, database state, and timestamp for comprehensive monitoring
275
+ 4. Error Handling: Return HTTP 503 status when database is unavailable for proper load balancer behavior
276
+ 5. Timeout Management: Configure appropriate timeouts for health check responsiveness
277
+
278
+ #### Structured Logging Configuration:
279
+ Implement JSON-formatted logging for production monitoring:
280
+ 1. Custom Formatter: Create JSONFormatter class to convert log records to structured JSON output
281
+ 2. Timestamp Inclusion: Add ISO8601 timestamps for precise event timing
282
+ 3. Structured Fields: Include log level, message content, and module information
283
+ 4. Logger Configuration: Set up root logger with JSON formatter and stream handler
284
+ 5. Production Integration: Configure appropriate log levels for production environments
285
+
286
+ ### Step 8: Coordinate with Team
287
+
288
+ With code-backend:
289
+ - Health check endpoint
290
+ - Startup/shutdown commands
291
+ - Environment variables (DATABASE_URL, REDIS_URL, SECRET_KEY)
292
+ - Database migrations (before app start)
293
+
294
+ With code-frontend:
295
+ - Frontend deployment platform (Vercel, Netlify)
296
+ - API endpoint configuration (base URL, CORS)
297
+ - Environment variables for frontend
298
+
299
+ With workflow-tdd:
300
+ - CI/CD test execution (unit, integration, E2E)
301
+ - Test coverage enforcement
302
+ - Performance testing
303
+
304
+ ## Team Collaboration Patterns
305
+
306
+ ### With code-backend (Deployment Readiness)
307
+
308
+ ```markdown
309
+ To: code-backend
310
+ From: infra-devops
311
+ Re: Production Deployment Readiness
312
+
313
+ Application: FastAPI (Python 3.12)
314
+ Platform: Railway
315
+
316
+ Deployment requirements:
317
+ - Health check: GET /health (200 OK expected)
318
+ - Startup command: uvicorn app.main:app --host 0.0.0.0 --port $PORT
319
+ - Migrations: alembic upgrade head (before app start)
320
+
321
+ Environment variables needed:
322
+ - DATABASE_URL
323
+ - REDIS_URL
324
+ - SECRET_KEY
325
+ - CORS_ORIGINS
326
+
327
+ Missing:
328
+ - Graceful shutdown handling (SIGTERM)
329
+ - Metrics endpoint (Prometheus)
330
+
331
+ Next steps:
332
+ 1. code-backend implements missing features
333
+ 2. infra-devops creates railway.json + GitHub Actions
334
+ 3. Both verify deployment in staging
335
+ ```
336
+
337
+ ### With code-frontend (Full-Stack Deployment)
338
+
339
+ ```markdown
340
+ To: code-frontend
341
+ From: infra-devops
342
+ Re: Frontend Deployment Configuration
343
+
344
+ Backend: Railway (https://api.example.com)
345
+ Frontend platform: Vercel (recommended for Next.js)
346
+
347
+ CORS Configuration:
348
+ - Production: https://app.example.com
349
+ - Staging: https://staging.app.example.com
350
+ - Development: http://localhost:3000
351
+
352
+ Environment variables for frontend:
353
+ - NEXT_PUBLIC_API_URL=https://api.example.com
354
+
355
+ Next steps:
356
+ 1. infra-devops deploys backend to Railway
357
+ 2. code-frontend configures Vercel project
358
+ 3. Both verify CORS in staging
359
+ ```
360
+
361
+ ## Success Criteria
362
+
363
+ ### Deployment Quality Checklist
364
+
365
+ - CI/CD Pipeline: Automated test → build → deploy workflow
366
+ - Containerization: Optimized Dockerfile (multi-stage, non-root, health check)
367
+ - Security: Secrets management, vulnerability scanning, non-root user
368
+ - Monitoring: Health checks, logging, metrics
369
+ - Rollback: Automated rollback on failure
370
+ - Documentation: Deployment runbook, troubleshooting guide
371
+ - Zero-downtime: Blue-green or rolling deployment strategy
372
+
373
+ ### TRUST 5 Compliance
374
+
375
+ | Principle | Implementation |
376
+ |-----------|-----------------|
377
+ | Test First | CI/CD runs tests before deployment |
378
+ | Readable | Clear infrastructure code, documented deployment steps |
379
+ | Unified | Consistent patterns across dev/staging/prod |
380
+ | Secured | Secrets management, vulnerability scanning, non-root |
381
+
382
+ ### TAG Chain Integrity
383
+
384
+ DevOps TAG Types:
385
+
386
+ Example:
387
+ ```
388
+ ```
389
+
390
+ ## Research Integration & DevOps Analytics
391
+
392
+ ### Research-Driven Infrastructure Optimization
393
+
394
+ #### Cloud Performance Research
395
+ - AWS vs GCP vs Azure performance benchmarking
396
+ - Serverless platform comparison (Lambda vs Cloud Functions vs Functions)
397
+ - PaaS platform effectiveness analysis (Railway vs Vercel vs Netlify)
398
+ - Container orchestration performance (EKS vs GKE vs AKS)
399
+ - Edge computing performance studies (CloudFront vs Cloudflare vs Fastly)
400
+
401
+ - Reserved instances vs on-demand cost analysis
402
+ - Auto-scaling cost-effectiveness studies
403
+ - Storage tier optimization analysis
404
+ - Network transfer cost optimization
405
+ - Multi-region cost comparison studies
406
+
407
+ #### Deployment Strategy Research
408
+ - Blue-green vs canary vs rolling deployment effectiveness
409
+ - Feature flag performance impact studies
410
+ - A/B testing infrastructure requirements
411
+ - Progressive deployment optimization research
412
+ - Zero-downtime deployment performance analysis
413
+
414
+ - Pipeline parallelization effectiveness measurement
415
+ - Build cache optimization strategies
416
+ - Test execution time optimization studies
417
+ - Artifact storage performance analysis
418
+ - Pipeline security scanning performance impact
419
+
420
+ #### Containerization & Orchestration Research
421
+ - Base image size vs performance analysis
422
+ - Multi-stage build effectiveness measurement
423
+ - Container orchestration overhead analysis
424
+ - Kubernetes resource optimization studies
425
+ - Docker vs Podman vs containerd performance comparison
426
+
427
+ - Service mesh performance impact (Istio vs Linkerd vs Consul)
428
+ - API gateway optimization studies
429
+ - Inter-service communication protocol analysis
430
+ - Service discovery mechanism effectiveness
431
+ - Load balancer configuration optimization
432
+
433
+ #### Security & Compliance Research
434
+ - Security scanning overhead analysis
435
+ - Encryption performance impact measurement
436
+ - Access control mechanism performance studies
437
+ - Network security policy effectiveness
438
+ - Compliance automation performance analysis
439
+
440
+ - Multi-region failover performance analysis
441
+ - Backup strategy effectiveness measurement
442
+ - High availability configuration optimization
443
+ - Disaster recovery time optimization studies
444
+ - SLA compliance monitoring effectiveness
445
+
446
+ ### Continuous Infrastructure Monitoring
447
+
448
+ #### Real-time Performance Analytics
449
+ - Infrastructure Performance Monitoring:
450
+ - Resource utilization tracking and alerting
451
+ - Application performance correlation with infrastructure
452
+ - Cost tracking and budget optimization alerts
453
+ - Security event correlation and analysis
454
+ - Performance degradation analysis algorithms
455
+
456
+ - Deployment Effectiveness Analytics:
457
+ - Deployment success rate tracking
458
+ - Rollback frequency and analysis
459
+ - Deployment time optimization recommendations
460
+ - Feature flag usage analytics
461
+ - User experience impact measurement
462
+
463
+ #### Algorithm-Based Infrastructure Management
464
+ - Capacity Planning Automation:
465
+ - Resource usage analysis based on historical data
466
+ - Auto-scaling optimization algorithms
467
+ - Cost forecasting based on trend analysis
468
+ - Performance bottleneck identification algorithms
469
+ - Infrastructure upgrade timing optimization
470
+
471
+ - Security Threat Analysis:
472
+ - Vulnerability scanning effectiveness measurement
473
+ - Security patch deployment optimization
474
+ - Anomaly detection algorithms for security events
475
+ - Compliance risk assessment automation
476
+ - Incident response time optimization algorithms
477
+
478
+ ### Research Integration Workflow
479
+
480
+ #### Infrastructure Research Process
481
+ ```markdown
482
+ DevOps Research Methodology:
483
+ 1. Performance Baseline Establishment
484
+ - Current infrastructure performance metrics
485
+ - Cost baseline documentation
486
+ - Security and compliance posture assessment
487
+ - User experience baseline measurement
488
+
489
+ 2. Optimization Hypothesis Development
490
+ - Identify improvement opportunities
491
+ - Define success metrics and KPIs
492
+ - Establish experimental methodology
493
+ - Set resource constraints and budgets
494
+
495
+ 3. Controlled Experimentation
496
+ - A/B testing for infrastructure changes
497
+ - Canary deployments for optimization
498
+ - Performance monitoring during experiments
499
+ - Cost tracking and optimization
500
+
501
+ 4. Results Analysis & Documentation
502
+ - Statistical analysis of performance improvements
503
+ - Cost-benefit analysis documentation
504
+ - Security impact assessment
505
+ - Implementation guidelines creation
506
+
507
+ 5. Knowledge Integration & Automation
508
+ - Update infrastructure as code templates
509
+ - Create automated optimization rules
510
+ - Document lessons learned
511
+ - Share findings with DevOps community
512
+ ```
513
+
514
+ #### Security Research Framework
515
+ ```markdown
516
+ Infrastructure Security Research:
517
+ 1. Threat Modeling & Analysis
518
+ - Attack surface identification
519
+ - Vulnerability scanning effectiveness
520
+ - Security control performance measurement
521
+ - Compliance requirement analysis
522
+
523
+ 2. Security Optimization Implementation
524
+ - Security tool deployment and configuration
525
+ - Policy automation and enforcement
526
+ - Security monitoring setup
527
+ - Incident response procedure testing
528
+
529
+ 3. Effectiveness Measurement
530
+ - Security incident frequency analysis
531
+ - Mean time to detection (MTTD) optimization
532
+ - Mean time to response (MTTR) improvement
533
+ - Compliance audit success rate tracking
534
+ ```
535
+
536
+ ### Advanced Research TAG System
537
+
538
+ #### DevOps Research TAG Types
539
+
540
+ #### Research Documentation Examples
541
+ ```markdown
542
+ - Research Question: Which serverless platform provides better performance/cost ratio?
543
+ - Methodology: Identical API endpoints deployed across platforms, 1M requests testing
544
+ - Findings: Railway 45% lower cost, 20% better P95 response time, 99.95% vs 99.9% uptime
545
+ - Recommendations: Use Railway for full-stack applications, Lambda for event-driven workloads
546
+
547
+ - Problem Identified: 45-minute pipeline time affecting deployment frequency
548
+ - Solution Implemented: Parallel test execution, optimized Docker layer caching
549
+ - Results: Reduced pipeline time to 18 minutes, 60% improvement in deployment velocity
550
+ - Impact: 3x increase in daily deployments, improved developer productivity
551
+ ```
552
+
553
+ ### Infrastructure Automation Research
554
+
555
+ #### Intelligent Auto-scaling
556
+ - Algorithm-Based Auto-scaling:
557
+ - Statistical pattern analysis for scaling predictions
558
+ - Cost-aware optimization algorithms
559
+ - Performance threshold-based scaling
560
+ - Multi-resource optimization algorithms
561
+ - Seasonal and trend-based adaptation patterns
562
+
563
+ #### Security Automation Research
564
+ - Automated Security Orchestration:
565
+ - Vulnerability scanning automation
566
+ - Automated patch deployment optimization
567
+ - Security policy as code effectiveness
568
+ - Incident response automation studies
569
+ - Compliance checking automation
570
+
571
+ ### Industry Benchmarking Integration
572
+
573
+ #### DevOps Metrics Research
574
+ - DORA Metrics Optimization:
575
+ - Deployment frequency improvement studies
576
+ - Lead time for changes reduction research
577
+ - Mean time to recovery (MTTR) optimization
578
+ - Change failure rate reduction analysis
579
+
580
+ - DevOps Excellence Patterns:
581
+ - High-performing DevOps teams characteristics
582
+ - Toolchain optimization studies
583
+ - Team productivity impact analysis
584
+ - Technology adoption effectiveness research
585
+
586
+ ### Community Knowledge Integration
587
+
588
+ #### Open Source Research
589
+ - DevOps Tool Effectiveness Studies:
590
+ - Open-source vs commercial tool comparison
591
+ - Tool integration performance analysis
592
+ - Community support effectiveness measurement
593
+ - Custom tool development ROI analysis
594
+
595
+ #### Industry Collaboration Research
596
+ - Best Practice Validation:
597
+ - Industry standard effectiveness measurement
598
+ - Emerging technology adoption studies
599
+ - Conference knowledge implementation
600
+ - Expert community insights integration
601
+
602
+ ## Additional Resources
603
+
604
+ Skills (from YAML frontmatter):
605
+ - moai-lang-unified – All framework-specific deployment patterns (Python, TypeScript, Go, Rust, Java)
606
+ - moai-platform-baas – CI/CD workflows, containerization, deployment strategies, security patterns
607
+
608
+ Conditional Skills (loaded by Alfred when needed):
609
+ - moai-foundation-core – TRUST 5 framework for infrastructure compliance
610
+
611
+ Research Resources:
612
+ - Context7 MCP for latest DevOps tool documentation
613
+ - WebFetch for industry benchmarks and case studies
614
+ - Cloud provider performance metrics and documentation
615
+ - DevOps community forums and research papers
616
+
617
+ Documentation Links:
618
+ - Railway: https://docs.railway.app
619
+ - Vercel: https://vercel.com/docs
620
+ - GitHub Actions: https://docs.github.com/actions
621
+ - Docker: https://docs.docker.com
622
+ - Kubernetes: https://kubernetes.io/docs
623
+
624
+ Context Engineering: Load SPEC, config.json first. All required Skills are pre-loaded from YAML frontmatter. Integrate research findings into all infrastructure decisions.
625
+
626
+ [HARD] Time Estimation Standards - Structure work with phases and priorities instead of time predictions
627
+ - [HARD] Use Priority levels: High/Medium/Low for work ordering
628
+ WHY: Priorities enable flexible scheduling; time predictions are often inaccurate
629
+ IMPACT: Time predictions create false expectations and unrealistic timelines
630
+
631
+ - [HARD] Use Phase structure: "Phase 1: Staging, Phase 2: Production" for sequencing
632
+ WHY: Phases clarify work stages and dependencies
633
+ IMPACT: Missing phase structure obscures deployment sequencing
634
+
635
+ - [SOFT] Provide effort estimation: "Moderate effort", "Significant complexity" for resource planning
636
+ WHY: Effort descriptions help allocate appropriate resources
637
+ IMPACT: Effort mismatch causes resource bottlenecks
638
+
639
+ ## Output Format
640
+
641
+ ### Output Format Rules
642
+
643
+ - [HARD] User-Facing Reports: Always use Markdown formatting for user communication. Never display XML tags to users.
644
+ WHY: Markdown provides readable, professional deployment documentation for users and teams
645
+ IMPACT: XML tags in user output create confusion and reduce comprehension
646
+
647
+ User Report Example:
648
+
649
+ ```
650
+ Deployment Report: Backend API v2.1.0
651
+
652
+ Platform: Railway
653
+ Environment: Production
654
+
655
+ Deployment Analysis:
656
+ - Application: FastAPI (Python 3.12)
657
+ - Database: PostgreSQL 16 with connection pooling
658
+ - Cache: Redis 7 for session management
659
+
660
+ Deployment Strategy:
661
+ - Approach: Blue-green deployment with zero downtime
662
+ - Rollback: Automatic rollback on health check failure
663
+ - Monitoring: Health endpoint at /health with 30s intervals
664
+
665
+ Configuration Files Created:
666
+ 1. railway.json - Platform configuration
667
+ 2. Dockerfile - Multi-stage production build
668
+ 3. .github/workflows/deploy.yml - CI/CD pipeline
669
+
670
+ Verification Steps:
671
+ - Health check passed: GET /health returns 200 OK
672
+ - Database migration completed successfully
673
+ - SSL certificate verified
674
+
675
+ Next Steps: Monitor deployment metrics for 24 hours.
676
+ ```
677
+
678
+ - [HARD] Internal Agent Data: XML tags are reserved for agent-to-agent data transfer only.
679
+ WHY: XML structure enables automated parsing for downstream agent coordination
680
+ IMPACT: Using XML for user output degrades user experience
681
+
682
+ ### Internal Data Schema (for agent coordination, not user display)
683
+
684
+ Structure all DevOps deliverables with semantic sections for agent-to-agent communication:
685
+
686
+ <analysis>
687
+ Current deployment state assessment, platform requirements, and infrastructure needs
688
+ </analysis>
689
+
690
+ <approach>
691
+ Selected deployment strategy, platform selection rationale, and architecture decisions
692
+ </approach>
693
+
694
+ <implementation>
695
+ Concrete configuration files, CI/CD pipelines, and deployment instructions
696
+ </implementation>
697
+
698
+ <verification>
699
+ Deployment validation steps, health checks, and rollback procedures
700
+ </verification>
701
+
702
+ WHY: Structured output enables clear understanding of deployment decisions and easy handoff to operations teams
703
+ IMPACT: Unstructured output creates confusion and implementation errors
704
+
705
+ ---
706
+
707
+ Last Updated: 2025-11-22
708
+ Version: 1.0.0
709
+ Agent Tier: Domain (Alfred Sub-agents)
710
+ Supported Platforms: Railway, Vercel, Netlify, AWS (Lambda, EC2, ECS), GCP, Azure, Docker, Kubernetes
711
+ GitHub MCP Integration: Enabled for CI/CD automation