moai-adk 0.4.5__py3-none-any.whl → 0.20.1__py3-none-any.whl

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

Potentially problematic release.


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

Files changed (433) hide show
  1. moai_adk/__init__.py +1 -1
  2. moai_adk/__main__.py +74 -1
  3. moai_adk/cli/commands/__init__.py +1 -1
  4. moai_adk/cli/commands/analyze.py +119 -0
  5. moai_adk/cli/commands/backup.py +25 -1
  6. moai_adk/cli/commands/doctor.py +31 -5
  7. moai_adk/cli/commands/improve_user_experience.py +307 -0
  8. moai_adk/cli/commands/init.py +111 -10
  9. moai_adk/cli/commands/status.py +33 -3
  10. moai_adk/cli/commands/update.py +921 -130
  11. moai_adk/cli/commands/validate_links.py +120 -0
  12. moai_adk/cli/prompts/init_prompts.py +22 -87
  13. moai_adk/core/analysis/__init__.py +9 -0
  14. moai_adk/core/analysis/session_analyzer.py +388 -0
  15. moai_adk/core/analysis/tag_chain_analyzer.py +344 -0
  16. moai_adk/core/analysis/tag_chain_repair.py +879 -0
  17. moai_adk/core/config/__init__.py +19 -0
  18. moai_adk/core/config/migration.py +235 -0
  19. moai_adk/core/git/__init__.py +1 -1
  20. moai_adk/core/git/branch.py +1 -1
  21. moai_adk/core/git/commit.py +1 -1
  22. moai_adk/core/git/manager.py +1 -1
  23. moai_adk/core/issue_creator.py +313 -0
  24. moai_adk/core/mcp/setup.py +56 -0
  25. moai_adk/core/mcp/setup_old.py +296 -0
  26. moai_adk/core/project/backup_utils.py +1 -1
  27. moai_adk/core/project/checker.py +2 -2
  28. moai_adk/core/project/detector.py +211 -12
  29. moai_adk/core/project/initializer.py +85 -15
  30. moai_adk/core/project/phase_executor.py +76 -13
  31. moai_adk/core/project/validator.py +13 -13
  32. moai_adk/core/quality/__init__.py +1 -1
  33. moai_adk/core/quality/trust_checker.py +1 -1
  34. moai_adk/core/quality/validators/__init__.py +1 -1
  35. moai_adk/core/quality/validators/base_validator.py +1 -1
  36. moai_adk/core/tags/__init__.py +86 -0
  37. moai_adk/core/tags/auto_corrector.py +693 -0
  38. moai_adk/core/tags/ci_validator.py +463 -0
  39. moai_adk/core/tags/cli.py +283 -0
  40. moai_adk/core/tags/generator.py +109 -0
  41. moai_adk/core/tags/inserter.py +99 -0
  42. moai_adk/core/tags/mapper.py +126 -0
  43. moai_adk/core/tags/parser.py +76 -0
  44. moai_adk/core/tags/policy_validator.py +580 -0
  45. moai_adk/core/tags/pre_commit_validator.py +421 -0
  46. moai_adk/core/tags/reporter.py +956 -0
  47. moai_adk/core/tags/rollback_manager.py +525 -0
  48. moai_adk/core/tags/tags.py +149 -0
  49. moai_adk/core/tags/validator.py +897 -0
  50. moai_adk/core/template/__init__.py +1 -1
  51. moai_adk/core/template/backup.py +1 -1
  52. moai_adk/core/template/merger.py +50 -1
  53. moai_adk/core/template/processor.py +119 -13
  54. moai_adk/core/template_engine.py +268 -0
  55. moai_adk/templates/.claude/agents/alfred/backend-expert.md +348 -0
  56. moai_adk/templates/.claude/agents/alfred/cc-manager.md +209 -944
  57. moai_adk/templates/.claude/agents/alfred/database-expert.md +352 -0
  58. moai_adk/templates/.claude/agents/alfred/debug-helper.md +34 -5
  59. moai_adk/templates/.claude/agents/alfred/devops-expert.md +464 -0
  60. moai_adk/templates/.claude/agents/alfred/doc-syncer.md +38 -8
  61. moai_adk/templates/.claude/agents/alfred/format-expert.md +469 -0
  62. moai_adk/templates/.claude/agents/alfred/frontend-expert.md +357 -0
  63. moai_adk/templates/.claude/agents/alfred/git-manager.md +128 -9
  64. moai_adk/templates/.claude/agents/alfred/implementation-planner.md +104 -6
  65. moai_adk/templates/.claude/agents/alfred/project-manager.md +88 -16
  66. moai_adk/templates/.claude/agents/alfred/quality-gate.md +36 -9
  67. moai_adk/templates/.claude/agents/alfred/security-expert.md +270 -0
  68. moai_adk/templates/.claude/agents/alfred/skill-factory.md +865 -0
  69. moai_adk/templates/.claude/agents/alfred/spec-builder.md +214 -43
  70. moai_adk/templates/.claude/agents/alfred/tag-agent.md +111 -9
  71. moai_adk/templates/.claude/agents/alfred/tdd-implementer.md +309 -160
  72. moai_adk/templates/.claude/agents/alfred/trust-checker.md +36 -7
  73. moai_adk/templates/.claude/agents/alfred/ui-ux-expert.md +605 -0
  74. moai_adk/templates/.claude/commands/alfred/0-project.md +393 -966
  75. moai_adk/templates/.claude/commands/alfred/1-plan.md +651 -367
  76. moai_adk/templates/.claude/commands/alfred/2-run.md +388 -241
  77. moai_adk/templates/.claude/commands/alfred/3-sync.md +1921 -410
  78. moai_adk/templates/.claude/commands/alfred/9-feedback.md +153 -0
  79. moai_adk/templates/.claude/commands/alfred/release-new.md +3604 -0
  80. moai_adk/templates/.claude/hooks/alfred/core/project.py +484 -20
  81. moai_adk/templates/.claude/hooks/alfred/core/timeout.py +136 -0
  82. moai_adk/templates/.claude/hooks/alfred/core/ttl_cache.py +108 -0
  83. moai_adk/templates/.claude/hooks/alfred/core/version_cache.py +198 -0
  84. moai_adk/templates/.claude/hooks/alfred/handlers/__init__.py +14 -6
  85. moai_adk/templates/.claude/hooks/alfred/post_tool__enable_streaming_ui.py +50 -0
  86. moai_adk/templates/.claude/hooks/alfred/post_tool__log_changes.py +93 -0
  87. moai_adk/templates/.claude/hooks/alfred/post_tool__tag_auto_corrector.py +407 -0
  88. moai_adk/templates/.claude/hooks/alfred/pre_tool__auto_checkpoint.py +99 -0
  89. moai_adk/templates/.claude/hooks/alfred/pre_tool__realtime_tag_monitor.py +335 -0
  90. moai_adk/templates/.claude/hooks/alfred/pre_tool__tag_policy_validator.py +325 -0
  91. moai_adk/templates/.claude/hooks/alfred/session_end__cleanup.py +93 -0
  92. moai_adk/templates/.claude/hooks/alfred/session_start__auto_cleanup.py +580 -0
  93. moai_adk/templates/.claude/hooks/alfred/session_start__show_project_info.py +298 -0
  94. moai_adk/templates/.claude/hooks/alfred/shared/core/__init__.py +170 -0
  95. moai_adk/templates/.claude/hooks/alfred/{core → shared/core}/checkpoint.py +3 -3
  96. moai_adk/templates/.claude/hooks/alfred/{core → shared/core}/context.py +5 -5
  97. moai_adk/templates/.claude/hooks/alfred/shared/core/project.py +749 -0
  98. moai_adk/templates/.claude/hooks/alfred/shared/core/tags.py +230 -0
  99. moai_adk/templates/.claude/hooks/alfred/shared/core/version_cache.py +198 -0
  100. moai_adk/templates/.claude/hooks/alfred/shared/handlers/__init__.py +21 -0
  101. moai_adk/templates/.claude/hooks/alfred/shared/handlers/daily_analysis.py +351 -0
  102. moai_adk/templates/.claude/hooks/alfred/shared/handlers/notification.py +154 -0
  103. moai_adk/templates/.claude/hooks/alfred/shared/handlers/session.py +174 -0
  104. moai_adk/templates/.claude/hooks/alfred/shared/handlers/tool.py +87 -0
  105. moai_adk/templates/.claude/hooks/alfred/shared/handlers/user.py +61 -0
  106. moai_adk/templates/.claude/hooks/alfred/user_prompt__jit_load_docs.py +111 -0
  107. moai_adk/templates/.claude/hooks/alfred/utils/__init__.py +1 -0
  108. moai_adk/templates/.claude/hooks/alfred/utils/hook_config.py +94 -0
  109. moai_adk/templates/.claude/hooks/alfred/utils/timeout.py +161 -0
  110. moai_adk/templates/.claude/output-styles/alfred/alfred-moai-adk-beginner.md +267 -0
  111. moai_adk/templates/.claude/output-styles/alfred/keating-personal-tutor.md +440 -0
  112. moai_adk/templates/.claude/output-styles/alfred/r2d2-agentic-coding.md +583 -0
  113. moai_adk/templates/.claude/settings.json +96 -14
  114. moai_adk/templates/.claude/skills/moai-alfred-agent-guide/SKILL.md +70 -0
  115. moai_adk/templates/.claude/skills/moai-alfred-agent-guide/examples.md +62 -0
  116. moai_adk/templates/.claude/skills/moai-alfred-agent-guide/reference.md +242 -0
  117. moai_adk/templates/.claude/skills/moai-alfred-ask-user-questions/SKILL.md +237 -0
  118. moai_adk/templates/.claude/skills/moai-alfred-ask-user-questions/examples.md +871 -0
  119. moai_adk/templates/.claude/skills/moai-alfred-ask-user-questions/reference.md +653 -0
  120. moai_adk/templates/.claude/skills/moai-alfred-clone-pattern/README.md +162 -0
  121. moai_adk/templates/.claude/skills/moai-alfred-clone-pattern/SKILL.md +227 -0
  122. moai_adk/templates/.claude/skills/moai-alfred-clone-pattern/examples.md +354 -0
  123. moai_adk/templates/.claude/skills/moai-alfred-clone-pattern/reference.md +158 -0
  124. moai_adk/templates/.claude/skills/moai-alfred-code-reviewer/SKILL.md +179 -79
  125. moai_adk/templates/.claude/skills/moai-alfred-code-reviewer/examples.md +117 -0
  126. moai_adk/templates/.claude/skills/moai-alfred-code-reviewer/scripts/pre-review-check.sh +62 -0
  127. moai_adk/templates/.claude/skills/moai-alfred-config-schema/SKILL.md +132 -0
  128. moai_adk/templates/.claude/skills/moai-alfred-config-schema/examples.md +28 -0
  129. moai_adk/templates/.claude/skills/moai-alfred-config-schema/reference.md +444 -0
  130. moai_adk/templates/.claude/skills/moai-alfred-context-budget/SKILL.md +62 -0
  131. moai_adk/templates/.claude/skills/moai-alfred-context-budget/examples.md +28 -0
  132. moai_adk/templates/.claude/skills/moai-alfred-context-budget/reference.md +405 -0
  133. moai_adk/templates/.claude/skills/moai-alfred-dev-guide/SKILL.md +51 -0
  134. moai_adk/templates/.claude/skills/moai-alfred-dev-guide/examples.md +355 -0
  135. moai_adk/templates/.claude/skills/moai-alfred-dev-guide/reference.md +239 -0
  136. moai_adk/templates/.claude/skills/moai-alfred-expertise-detection/SKILL.md +323 -0
  137. moai_adk/templates/.claude/skills/moai-alfred-expertise-detection/examples.md +286 -0
  138. moai_adk/templates/.claude/skills/moai-alfred-expertise-detection/reference.md +126 -0
  139. moai_adk/templates/.claude/skills/moai-alfred-issue-labels/SKILL.md +229 -0
  140. moai_adk/templates/.claude/skills/moai-alfred-issue-labels/examples.md +4 -0
  141. moai_adk/templates/.claude/skills/moai-alfred-issue-labels/reference.md +150 -0
  142. moai_adk/templates/.claude/skills/moai-alfred-language-detection/SKILL.md +87 -73
  143. moai_adk/templates/.claude/skills/moai-alfred-language-detection/examples.md +29 -0
  144. moai_adk/templates/.claude/skills/moai-alfred-language-detection/reference.md +28 -0
  145. moai_adk/templates/.claude/skills/moai-alfred-personas/README.md +42 -0
  146. moai_adk/templates/.claude/skills/moai-alfred-personas/SKILL.md +429 -0
  147. moai_adk/templates/.claude/skills/moai-alfred-personas/examples.md +520 -0
  148. moai_adk/templates/.claude/skills/moai-alfred-personas/reference.md +405 -0
  149. moai_adk/templates/.claude/skills/moai-alfred-practices/SKILL.md +89 -0
  150. moai_adk/templates/.claude/skills/moai-alfred-practices/examples.md +122 -0
  151. moai_adk/templates/.claude/skills/moai-alfred-practices/reference.md +369 -0
  152. moai_adk/templates/.claude/skills/moai-alfred-proactive-suggestions/SKILL.md +508 -0
  153. moai_adk/templates/.claude/skills/moai-alfred-proactive-suggestions/examples.md +481 -0
  154. moai_adk/templates/.claude/skills/moai-alfred-proactive-suggestions/reference.md +100 -0
  155. moai_adk/templates/.claude/skills/moai-alfred-rules/SKILL.md +77 -0
  156. moai_adk/templates/.claude/skills/moai-alfred-rules/examples.md +265 -0
  157. moai_adk/templates/.claude/skills/moai-alfred-rules/reference.md +539 -0
  158. moai_adk/templates/.claude/skills/moai-alfred-session-state/SKILL.md +320 -0
  159. moai_adk/templates/.claude/skills/moai-alfred-session-state/examples.md +4 -0
  160. moai_adk/templates/.claude/skills/moai-alfred-session-state/reference.md +84 -0
  161. moai_adk/templates/.claude/skills/moai-alfred-spec-authoring/README.md +137 -0
  162. moai_adk/templates/.claude/skills/moai-alfred-spec-authoring/SKILL.md +219 -0
  163. moai_adk/templates/.claude/skills/moai-alfred-spec-authoring/examples/validate-spec.sh +161 -0
  164. moai_adk/templates/.claude/skills/moai-alfred-spec-authoring/examples.md +541 -0
  165. moai_adk/templates/.claude/skills/moai-alfred-spec-authoring/reference.md +622 -0
  166. moai_adk/templates/.claude/skills/moai-alfred-todowrite-pattern/SKILL.md +19 -0
  167. moai_adk/templates/.claude/skills/moai-alfred-todowrite-pattern/examples.md +4 -0
  168. moai_adk/templates/.claude/skills/moai-alfred-todowrite-pattern/reference.md +211 -0
  169. moai_adk/templates/.claude/skills/moai-alfred-workflow/SKILL.md +288 -0
  170. moai_adk/templates/.claude/skills/moai-cc-agents/SKILL.md +269 -0
  171. moai_adk/templates/.claude/skills/moai-cc-agents/templates/agent-template.md +32 -0
  172. moai_adk/templates/.claude/skills/moai-cc-claude-md/SKILL.md +298 -0
  173. moai_adk/templates/.claude/skills/moai-cc-claude-md/templates/CLAUDE-template.md +26 -0
  174. moai_adk/templates/.claude/skills/moai-cc-commands/SKILL.md +307 -0
  175. moai_adk/templates/.claude/skills/moai-cc-commands/templates/command-template.md +21 -0
  176. moai_adk/templates/.claude/skills/moai-cc-hooks/SKILL.md +252 -0
  177. moai_adk/templates/.claude/skills/moai-cc-hooks/scripts/pre-bash-check.sh +19 -0
  178. moai_adk/templates/.claude/skills/moai-cc-hooks/scripts/preserve-permissions.sh +19 -0
  179. moai_adk/templates/.claude/skills/moai-cc-hooks/scripts/validate-bash-command.py +24 -0
  180. moai_adk/templates/.claude/skills/moai-cc-mcp-plugins/SKILL.md +199 -0
  181. moai_adk/templates/.claude/skills/moai-cc-mcp-plugins/templates/settings-mcp-template.json +39 -0
  182. moai_adk/templates/.claude/skills/moai-cc-memory/SKILL.md +316 -0
  183. moai_adk/templates/.claude/skills/moai-cc-memory/templates/session-summary-template.md +18 -0
  184. moai_adk/templates/.claude/skills/moai-cc-settings/SKILL.md +263 -0
  185. moai_adk/templates/.claude/skills/moai-cc-settings/templates/settings-complete-template.json +30 -0
  186. moai_adk/templates/.claude/skills/moai-cc-skill-factory/CHECKLIST.md +482 -0
  187. moai_adk/templates/.claude/skills/moai-cc-skill-factory/EXAMPLES.md +303 -0
  188. moai_adk/templates/.claude/skills/moai-cc-skill-factory/INTERACTIVE-DISCOVERY.md +524 -0
  189. moai_adk/templates/.claude/skills/moai-cc-skill-factory/METADATA.md +477 -0
  190. moai_adk/templates/.claude/skills/moai-cc-skill-factory/PARALLEL-ANALYSIS-REPORT.md +429 -0
  191. moai_adk/templates/.claude/skills/moai-cc-skill-factory/PYTHON-VERSION-MATRIX.md +391 -0
  192. moai_adk/templates/.claude/skills/moai-cc-skill-factory/SKILL-FACTORY-WORKFLOW.md +431 -0
  193. moai_adk/templates/.claude/skills/moai-cc-skill-factory/SKILL-UPDATE-ADVISOR.md +577 -0
  194. moai_adk/templates/.claude/skills/moai-cc-skill-factory/SKILL.md +273 -0
  195. moai_adk/templates/.claude/skills/moai-cc-skill-factory/STEP-BY-STEP-GUIDE.md +466 -0
  196. moai_adk/templates/.claude/skills/moai-cc-skill-factory/STRUCTURE.md +583 -0
  197. moai_adk/templates/.claude/skills/moai-cc-skill-factory/WEB-RESEARCH.md +526 -0
  198. moai_adk/templates/.claude/skills/moai-cc-skill-factory/reference.md +608 -0
  199. moai_adk/templates/.claude/skills/moai-cc-skill-factory/scripts/generate-structure.sh +328 -0
  200. moai_adk/templates/.claude/skills/moai-cc-skill-factory/scripts/validate-skill.sh +312 -0
  201. moai_adk/templates/.claude/skills/moai-cc-skill-factory/templates/SKILL_TEMPLATE.md +245 -0
  202. moai_adk/templates/.claude/skills/moai-cc-skill-factory/templates/examples-template.md +285 -0
  203. moai_adk/templates/.claude/skills/moai-cc-skill-factory/templates/reference-template.md +278 -0
  204. moai_adk/templates/.claude/skills/moai-cc-skill-factory/templates/scripts-template.sh +303 -0
  205. moai_adk/templates/.claude/skills/moai-cc-skills/SKILL.md +291 -0
  206. moai_adk/templates/.claude/skills/moai-cc-skills/templates/SKILL-template.md +15 -0
  207. moai_adk/templates/.claude/skills/moai-change-logger/SKILL.md +563 -0
  208. moai_adk/templates/.claude/skills/moai-design-systems/SKILL.md +802 -0
  209. moai_adk/templates/.claude/skills/moai-design-systems/examples.md +1238 -0
  210. moai_adk/templates/.claude/skills/moai-design-systems/reference.md +673 -0
  211. moai_adk/templates/.claude/skills/moai-domain-backend/SKILL.md +234 -43
  212. moai_adk/templates/.claude/skills/moai-domain-backend/examples.md +1633 -0
  213. moai_adk/templates/.claude/skills/moai-domain-backend/reference.md +660 -0
  214. moai_adk/templates/.claude/skills/moai-domain-cli-tool/SKILL.md +97 -69
  215. moai_adk/templates/.claude/skills/moai-domain-cli-tool/examples.md +29 -0
  216. moai_adk/templates/.claude/skills/moai-domain-cli-tool/reference.md +30 -0
  217. moai_adk/templates/.claude/skills/moai-domain-data-science/SKILL.md +97 -72
  218. moai_adk/templates/.claude/skills/moai-domain-data-science/examples.md +29 -0
  219. moai_adk/templates/.claude/skills/moai-domain-data-science/reference.md +30 -0
  220. moai_adk/templates/.claude/skills/moai-domain-database/SKILL.md +97 -74
  221. moai_adk/templates/.claude/skills/moai-domain-database/examples.md +29 -0
  222. moai_adk/templates/.claude/skills/moai-domain-database/reference.md +30 -0
  223. moai_adk/templates/.claude/skills/moai-domain-devops/SKILL.md +98 -74
  224. moai_adk/templates/.claude/skills/moai-domain-devops/examples.md +29 -0
  225. moai_adk/templates/.claude/skills/moai-domain-devops/reference.md +31 -0
  226. moai_adk/templates/.claude/skills/moai-domain-frontend/SKILL.md +102 -73
  227. moai_adk/templates/.claude/skills/moai-domain-frontend/examples.md +29 -0
  228. moai_adk/templates/.claude/skills/moai-domain-frontend/reference.md +31 -0
  229. moai_adk/templates/.claude/skills/moai-domain-ml/SKILL.md +97 -73
  230. moai_adk/templates/.claude/skills/moai-domain-ml/examples.md +29 -0
  231. moai_adk/templates/.claude/skills/moai-domain-ml/reference.md +30 -0
  232. moai_adk/templates/.claude/skills/moai-domain-mobile-app/SKILL.md +97 -67
  233. moai_adk/templates/.claude/skills/moai-domain-mobile-app/examples.md +29 -0
  234. moai_adk/templates/.claude/skills/moai-domain-mobile-app/reference.md +30 -0
  235. moai_adk/templates/.claude/skills/moai-domain-security/SKILL.md +97 -79
  236. moai_adk/templates/.claude/skills/moai-domain-security/examples.md +29 -0
  237. moai_adk/templates/.claude/skills/moai-domain-security/reference.md +30 -0
  238. moai_adk/templates/.claude/skills/moai-domain-web-api/SKILL.md +97 -71
  239. moai_adk/templates/.claude/skills/moai-domain-web-api/examples.md +29 -0
  240. moai_adk/templates/.claude/skills/moai-domain-web-api/reference.md +30 -0
  241. moai_adk/templates/.claude/skills/moai-essentials-debug/SKILL.md +265 -64
  242. moai_adk/templates/.claude/skills/moai-essentials-debug/examples.md +1064 -0
  243. moai_adk/templates/.claude/skills/moai-essentials-debug/reference.md +1047 -0
  244. moai_adk/templates/.claude/skills/moai-essentials-perf/SKILL.md +87 -78
  245. moai_adk/templates/.claude/skills/moai-essentials-perf/examples.md +29 -0
  246. moai_adk/templates/.claude/skills/moai-essentials-perf/reference.md +28 -0
  247. moai_adk/templates/.claude/skills/moai-essentials-refactor/SKILL.md +87 -70
  248. moai_adk/templates/.claude/skills/moai-essentials-refactor/examples.md +29 -0
  249. moai_adk/templates/.claude/skills/moai-essentials-refactor/reference.md +28 -0
  250. moai_adk/templates/.claude/skills/moai-essentials-review/SKILL.md +87 -86
  251. moai_adk/templates/.claude/skills/moai-essentials-review/examples.md +29 -0
  252. moai_adk/templates/.claude/skills/moai-essentials-review/reference.md +28 -0
  253. moai_adk/templates/.claude/skills/moai-foundation-ears/SKILL.md +80 -62
  254. moai_adk/templates/.claude/skills/moai-foundation-ears/examples.md +29 -0
  255. moai_adk/templates/.claude/skills/moai-foundation-ears/reference.md +28 -0
  256. moai_adk/templates/.claude/skills/moai-foundation-git/SKILL.md +207 -50
  257. moai_adk/templates/.claude/skills/moai-foundation-git/examples.md +29 -0
  258. moai_adk/templates/.claude/skills/moai-foundation-git/reference.md +29 -0
  259. moai_adk/templates/.claude/skills/moai-foundation-langs/SKILL.md +90 -71
  260. moai_adk/templates/.claude/skills/moai-foundation-langs/examples.md +29 -0
  261. moai_adk/templates/.claude/skills/moai-foundation-langs/reference.md +28 -0
  262. moai_adk/templates/.claude/skills/moai-foundation-specs/SKILL.md +78 -58
  263. moai_adk/templates/.claude/skills/moai-foundation-specs/examples.md +29 -0
  264. moai_adk/templates/.claude/skills/moai-foundation-specs/reference.md +28 -0
  265. moai_adk/templates/.claude/skills/moai-foundation-tags/SKILL.md +78 -51
  266. moai_adk/templates/.claude/skills/moai-foundation-tags/examples.md +29 -0
  267. moai_adk/templates/.claude/skills/moai-foundation-tags/reference.md +28 -0
  268. moai_adk/templates/.claude/skills/moai-foundation-trust/.!11330!examples.md +0 -0
  269. moai_adk/templates/.claude/skills/moai-foundation-trust/SKILL.md +253 -32
  270. moai_adk/templates/.claude/skills/moai-foundation-trust/examples.md +0 -0
  271. moai_adk/templates/.claude/skills/moai-foundation-trust/reference.md +1099 -0
  272. moai_adk/templates/.claude/skills/moai-jit-docs-enhanced/SKILL.md +460 -0
  273. moai_adk/templates/.claude/skills/moai-lang-c/SKILL.md +98 -74
  274. moai_adk/templates/.claude/skills/moai-lang-c/examples.md +29 -0
  275. moai_adk/templates/.claude/skills/moai-lang-c/reference.md +31 -0
  276. moai_adk/templates/.claude/skills/moai-lang-cpp/SKILL.md +98 -76
  277. moai_adk/templates/.claude/skills/moai-lang-cpp/examples.md +29 -0
  278. moai_adk/templates/.claude/skills/moai-lang-cpp/reference.md +31 -0
  279. moai_adk/templates/.claude/skills/moai-lang-csharp/SKILL.md +2358 -70
  280. moai_adk/templates/.claude/skills/moai-lang-csharp/examples.md +29 -0
  281. moai_adk/templates/.claude/skills/moai-lang-csharp/reference.md +30 -0
  282. moai_adk/templates/.claude/skills/moai-lang-dart/SKILL.md +2962 -68
  283. moai_adk/templates/.claude/skills/moai-lang-dart/examples.md +29 -0
  284. moai_adk/templates/.claude/skills/moai-lang-dart/reference.md +30 -0
  285. moai_adk/templates/.claude/skills/moai-lang-go/SKILL.md +1898 -70
  286. moai_adk/templates/.claude/skills/moai-lang-go/examples.md +29 -0
  287. moai_adk/templates/.claude/skills/moai-lang-go/reference.md +31 -0
  288. moai_adk/templates/.claude/skills/moai-lang-java/SKILL.md +1465 -68
  289. moai_adk/templates/.claude/skills/moai-lang-java/examples.md +29 -0
  290. moai_adk/templates/.claude/skills/moai-lang-java/reference.md +31 -0
  291. moai_adk/templates/.claude/skills/moai-lang-javascript/SKILL.md +2364 -66
  292. moai_adk/templates/.claude/skills/moai-lang-javascript/examples.md +29 -0
  293. moai_adk/templates/.claude/skills/moai-lang-javascript/reference.md +32 -0
  294. moai_adk/templates/.claude/skills/moai-lang-kotlin/SKILL.md +1630 -69
  295. moai_adk/templates/.claude/skills/moai-lang-kotlin/examples.md +29 -0
  296. moai_adk/templates/.claude/skills/moai-lang-kotlin/reference.md +31 -0
  297. moai_adk/templates/.claude/skills/moai-lang-php/SKILL.md +89 -61
  298. moai_adk/templates/.claude/skills/moai-lang-php/examples.md +29 -0
  299. moai_adk/templates/.claude/skills/moai-lang-php/reference.md +30 -0
  300. moai_adk/templates/.claude/skills/moai-lang-python/SKILL.md +735 -66
  301. moai_adk/templates/.claude/skills/moai-lang-python/examples.md +624 -0
  302. moai_adk/templates/.claude/skills/moai-lang-python/reference.md +316 -0
  303. moai_adk/templates/.claude/skills/moai-lang-r/SKILL.md +97 -73
  304. moai_adk/templates/.claude/skills/moai-lang-r/examples.md +29 -0
  305. moai_adk/templates/.claude/skills/moai-lang-r/reference.md +30 -0
  306. moai_adk/templates/.claude/skills/moai-lang-ruby/SKILL.md +98 -73
  307. moai_adk/templates/.claude/skills/moai-lang-ruby/examples.md +29 -0
  308. moai_adk/templates/.claude/skills/moai-lang-ruby/reference.md +31 -0
  309. moai_adk/templates/.claude/skills/moai-lang-rust/SKILL.md +1834 -70
  310. moai_adk/templates/.claude/skills/moai-lang-rust/examples.md +29 -0
  311. moai_adk/templates/.claude/skills/moai-lang-rust/reference.md +31 -0
  312. moai_adk/templates/.claude/skills/moai-lang-scala/SKILL.md +99 -74
  313. moai_adk/templates/.claude/skills/moai-lang-scala/examples.md +29 -0
  314. moai_adk/templates/.claude/skills/moai-lang-scala/reference.md +30 -0
  315. moai_adk/templates/.claude/skills/moai-lang-shell/SKILL.md +97 -74
  316. moai_adk/templates/.claude/skills/moai-lang-shell/examples.md +29 -0
  317. moai_adk/templates/.claude/skills/moai-lang-shell/reference.md +30 -0
  318. moai_adk/templates/.claude/skills/moai-lang-sql/SKILL.md +98 -74
  319. moai_adk/templates/.claude/skills/moai-lang-sql/examples.md +29 -0
  320. moai_adk/templates/.claude/skills/moai-lang-sql/reference.md +31 -0
  321. moai_adk/templates/.claude/skills/moai-lang-swift/SKILL.md +1959 -69
  322. moai_adk/templates/.claude/skills/moai-lang-swift/examples.md +29 -0
  323. moai_adk/templates/.claude/skills/moai-lang-swift/reference.md +30 -0
  324. moai_adk/templates/.claude/skills/moai-lang-template/SKILL.md +348 -0
  325. moai_adk/templates/.claude/skills/moai-lang-template/VARIABLES.md +98 -0
  326. moai_adk/templates/.claude/skills/moai-lang-typescript/SKILL.md +1230 -66
  327. moai_adk/templates/.claude/skills/moai-lang-typescript/examples.md +29 -0
  328. moai_adk/templates/.claude/skills/moai-lang-typescript/reference.md +34 -0
  329. moai_adk/templates/.claude/skills/moai-learning-optimizer/SKILL.md +575 -0
  330. moai_adk/templates/.claude/skills/moai-project-batch-questions/README.md +50 -0
  331. moai_adk/templates/.claude/skills/moai-project-batch-questions/SKILL.md +304 -0
  332. moai_adk/templates/.claude/skills/moai-project-batch-questions/examples.md +417 -0
  333. moai_adk/templates/.claude/skills/moai-project-batch-questions/reference.md +704 -0
  334. moai_adk/templates/.claude/skills/moai-project-config-manager/README.md +87 -0
  335. moai_adk/templates/.claude/skills/moai-project-config-manager/SKILL.md +552 -0
  336. moai_adk/templates/.claude/skills/moai-project-config-manager/examples.md +1109 -0
  337. moai_adk/templates/.claude/skills/moai-project-config-manager/reference.md +514 -0
  338. moai_adk/templates/.claude/skills/moai-project-config-manager/validate.py +106 -0
  339. moai_adk/templates/.claude/skills/moai-project-documentation/README.md +11 -0
  340. moai_adk/templates/.claude/skills/moai-project-documentation/SKILL.md +622 -0
  341. moai_adk/templates/.claude/skills/moai-project-documentation/examples.md +20 -0
  342. moai_adk/templates/.claude/skills/moai-project-documentation/reference.md +12 -0
  343. moai_adk/templates/.claude/skills/moai-project-language-initializer/README.md +152 -0
  344. moai_adk/templates/.claude/skills/moai-project-language-initializer/SKILL.md +285 -0
  345. moai_adk/templates/.claude/skills/moai-project-language-initializer/examples.md +333 -0
  346. moai_adk/templates/.claude/skills/moai-project-language-initializer/reference.md +386 -0
  347. moai_adk/templates/.claude/skills/moai-project-template-optimizer/README.md +49 -0
  348. moai_adk/templates/.claude/skills/moai-project-template-optimizer/SKILL.md +319 -0
  349. moai_adk/templates/.claude/skills/moai-project-template-optimizer/examples.md +58 -0
  350. moai_adk/templates/.claude/skills/moai-project-template-optimizer/reference.md +123 -0
  351. moai_adk/templates/.claude/skills/moai-session-info/SKILL.md +314 -0
  352. moai_adk/templates/.claude/skills/moai-streaming-ui/SKILL.md +552 -0
  353. moai_adk/templates/.claude/skills/moai-tag-policy-validator/SKILL.md +570 -0
  354. moai_adk/templates/.git-hooks/pre-commit +66 -0
  355. moai_adk/templates/.git-hooks/pre-push +255 -0
  356. moai_adk/templates/.github/workflows/c-tag-validation.yml +11 -0
  357. moai_adk/templates/.github/workflows/cpp-tag-validation.yml +11 -0
  358. moai_adk/templates/.github/workflows/csharp-tag-validation.yml +11 -0
  359. moai_adk/templates/.github/workflows/dart-tag-validation.yml +11 -0
  360. moai_adk/templates/.github/workflows/go-tag-validation.yml +130 -0
  361. moai_adk/templates/.github/workflows/java-tag-validation.yml +11 -0
  362. moai_adk/templates/.github/workflows/javascript-tag-validation.yml +135 -0
  363. moai_adk/templates/.github/workflows/kotlin-tag-validation.yml +11 -0
  364. moai_adk/templates/.github/workflows/moai-gitflow.yml +166 -3
  365. moai_adk/templates/.github/workflows/moai-release-create.yml +100 -0
  366. moai_adk/templates/.github/workflows/moai-release-pipeline.yml +188 -0
  367. moai_adk/templates/.github/workflows/php-tag-validation.yml +11 -0
  368. moai_adk/templates/.github/workflows/python-tag-validation.yml +118 -0
  369. moai_adk/templates/.github/workflows/release.yml +118 -0
  370. moai_adk/templates/.github/workflows/ruby-tag-validation.yml +11 -0
  371. moai_adk/templates/.github/workflows/rust-tag-validation.yml +11 -0
  372. moai_adk/templates/.github/workflows/shell-tag-validation.yml +11 -0
  373. moai_adk/templates/.github/workflows/spec-issue-sync.yml +338 -0
  374. moai_adk/templates/.github/workflows/swift-tag-validation.yml +11 -0
  375. moai_adk/templates/.github/workflows/tag-report.yml +269 -0
  376. moai_adk/templates/.github/workflows/tag-validation.yml +186 -0
  377. moai_adk/templates/.github/workflows/typescript-tag-validation.yml +154 -0
  378. moai_adk/templates/.mcp.json +31 -0
  379. moai_adk/templates/.moai/config.json +80 -7
  380. moai_adk/templates/CLAUDE.md +562 -546
  381. moai_adk/utils/banner.py +5 -5
  382. moai_adk/utils/common.py +294 -0
  383. moai_adk/utils/link_validator.py +235 -0
  384. moai_adk/utils/logger.py +8 -8
  385. moai_adk/utils/user_experience.py +451 -0
  386. moai_adk-0.20.1.dist-info/METADATA +233 -0
  387. moai_adk-0.20.1.dist-info/RECORD +404 -0
  388. moai_adk/templates/.claude/hooks/alfred/README.md +0 -230
  389. moai_adk/templates/.claude/hooks/alfred/alfred_hooks.py +0 -156
  390. moai_adk/templates/.claude/hooks/alfred/core/__init__.py +0 -85
  391. moai_adk/templates/.claude/hooks/alfred/handlers/notification.py +0 -25
  392. moai_adk/templates/.claude/hooks/alfred/handlers/session.py +0 -92
  393. moai_adk/templates/.claude/hooks/alfred/handlers/tool.py +0 -70
  394. moai_adk/templates/.claude/hooks/alfred/handlers/user.py +0 -41
  395. moai_adk/templates/.claude/output-styles/alfred/agentic-coding.md +0 -636
  396. moai_adk/templates/.claude/output-styles/alfred/moai-adk-learning.md +0 -692
  397. moai_adk/templates/.claude/output-styles/alfred/study-with-alfred.md +0 -470
  398. moai_adk/templates/.claude/skills/moai-alfred-debugger-pro/SKILL.md +0 -103
  399. moai_adk/templates/.claude/skills/moai-alfred-ears-authoring/SKILL.md +0 -103
  400. moai_adk/templates/.claude/skills/moai-alfred-git-workflow/SKILL.md +0 -95
  401. moai_adk/templates/.claude/skills/moai-alfred-performance-optimizer/SKILL.md +0 -105
  402. moai_adk/templates/.claude/skills/moai-alfred-refactoring-coach/SKILL.md +0 -97
  403. moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-validation/SKILL.md +0 -97
  404. moai_adk/templates/.claude/skills/moai-alfred-tag-scanning/SKILL.md +0 -90
  405. moai_adk/templates/.claude/skills/moai-alfred-trust-validation/SKILL.md +0 -99
  406. moai_adk/templates/.claude/skills/moai-alfred-tui-survey/SKILL.md +0 -87
  407. moai_adk/templates/.claude/skills/moai-alfred-tui-survey/examples.md +0 -62
  408. moai_adk/templates/.claude/skills/moai-claude-code/SKILL.md +0 -94
  409. moai_adk/templates/.claude/skills/moai-claude-code/examples.md +0 -513
  410. moai_adk/templates/.claude/skills/moai-claude-code/reference.md +0 -433
  411. moai_adk/templates/.claude/skills/moai-claude-code/templates/agent-full.md +0 -332
  412. moai_adk/templates/.claude/skills/moai-claude-code/templates/command-full.md +0 -384
  413. moai_adk/templates/.claude/skills/moai-claude-code/templates/plugin-full.json +0 -363
  414. moai_adk/templates/.claude/skills/moai-claude-code/templates/settings-full.json +0 -595
  415. moai_adk/templates/.claude/skills/moai-claude-code/templates/skill-full.md +0 -496
  416. moai_adk/templates/.claude/skills/moai-lang-clojure/SKILL.md +0 -100
  417. moai_adk/templates/.claude/skills/moai-lang-elixir/SKILL.md +0 -99
  418. moai_adk/templates/.claude/skills/moai-lang-haskell/SKILL.md +0 -100
  419. moai_adk/templates/.claude/skills/moai-lang-julia/SKILL.md +0 -98
  420. moai_adk/templates/.claude/skills/moai-lang-lua/SKILL.md +0 -98
  421. moai_adk/templates/.github/PULL_REQUEST_TEMPLATE.md +0 -69
  422. moai_adk/templates/.moai/memory/development-guide.md +0 -344
  423. moai_adk/templates/.moai/memory/gitflow-protection-policy.md +0 -220
  424. moai_adk/templates/.moai/memory/spec-metadata.md +0 -356
  425. moai_adk/templates/.moai/project/product.md +0 -161
  426. moai_adk/templates/.moai/project/structure.md +0 -156
  427. moai_adk/templates/.moai/project/tech.md +0 -227
  428. moai_adk/templates/__init__.py +0 -2
  429. moai_adk-0.4.5.dist-info/METADATA +0 -369
  430. moai_adk-0.4.5.dist-info/RECORD +0 -152
  431. {moai_adk-0.4.5.dist-info → moai_adk-0.20.1.dist-info}/WHEEL +0 -0
  432. {moai_adk-0.4.5.dist-info → moai_adk-0.20.1.dist-info}/entry_points.txt +0 -0
  433. {moai_adk-0.4.5.dist-info → moai_adk-0.20.1.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,1109 @@
1
+ # Project Configuration Manager - Usage Examples
2
+
3
+ ## Quick Start Examples
4
+
5
+ ### Basic Interactive Configuration Update
6
+
7
+ ```python
8
+ # Start interactive configuration management
9
+ Skill("moai-project-config-manager")
10
+
11
+ # Expected workflow:
12
+ # 1. Displays current settings
13
+ # 2. User selects which settings to modify
14
+ # 3. Collects new values through TUI surveys
15
+ # 4. Validates and saves changes with backup
16
+ ```
17
+
18
+ ### Programmatic Language Change
19
+
20
+ ```python
21
+ # Change conversation language to English
22
+ Skill(
23
+ "moai-project-config-manager",
24
+ action="update",
25
+ changes={
26
+ "language": {
27
+ "conversation_language": "en",
28
+ "conversation_language_name": "English",
29
+ "agent_prompt_language": "english"
30
+ }
31
+ }
32
+ )
33
+
34
+ # Result: Configuration updated with automatic backup
35
+ ```
36
+
37
+ ### GitHub Settings Update
38
+
39
+ ```python
40
+ # Enable auto-delete branches and set workflow
41
+ Skill(
42
+ "moai-project-config-manager",
43
+ action="update",
44
+ changes={
45
+ "github": {
46
+ "auto_delete_branches": True,
47
+ "spec_git_workflow": "feature_branch"
48
+ }
49
+ }
50
+ )
51
+ ```
52
+
53
+ ---
54
+
55
+ ## Real-World Scenarios
56
+
57
+ ### Scenario 1: New Project Setup
58
+
59
+ **Context**: Setting up a new MoAI project for a Korean development team
60
+
61
+ ```python
62
+ # Initialize configuration for Korean team
63
+ Skill(
64
+ "moai-project-config-manager",
65
+ action="update",
66
+ changes={
67
+ "language": {
68
+ "conversation_language": "ko",
69
+ "conversation_language_name": "한국어",
70
+ "agent_prompt_language": "localized"
71
+ },
72
+ "user": {
73
+ "nickname": "개발팀"
74
+ },
75
+ "github": {
76
+ "auto_delete_branches": True,
77
+ "spec_git_workflow": "feature_branch"
78
+ },
79
+ "report_generation": {
80
+ "enabled": True,
81
+ "auto_create": False,
82
+ "user_choice": "Minimal"
83
+ },
84
+ "stack": {
85
+ "selected_domains": ["frontend", "backend", "devops"]
86
+ }
87
+ }
88
+ )
89
+
90
+ # Validation to ensure setup is correct
91
+ validation = Skill("moai-project-config-manager", action="validate")
92
+ if validation["valid"]:
93
+ print("✅ Project configuration ready for Korean team")
94
+ else:
95
+ print(f"❌ Configuration errors: {validation['errors']}")
96
+ ```
97
+
98
+ ### Scenario 2: Team Workflow Migration
99
+
100
+ **Context**: Migrating from direct commits to PR-based workflow
101
+
102
+ ```python
103
+ # First, backup current configuration
104
+ backup_result = Skill("moai-project-config-manager", action="backup")
105
+ print(f"📁 Configuration backed up to: {backup_result['backup_path']}")
106
+
107
+ # Update GitHub workflow for team collaboration
108
+ Skill(
109
+ "moai-project-config-manager",
110
+ action="update",
111
+ changes={
112
+ "github": {
113
+ "auto_delete_branches": True,
114
+ "spec_git_workflow": "feature_branch"
115
+ }
116
+ }
117
+ )
118
+
119
+ # Verify the change
120
+ current_config = Skill("moai-project-config-manager", action="get_current")
121
+ workflow = current_config["github"]["spec_git_workflow"]
122
+ print(f"🔄 Git workflow updated to: {workflow}")
123
+ ```
124
+
125
+ ### Scenario 3: Report Generation Optimization
126
+
127
+ **Context**: Reducing token usage by switching to minimal reports
128
+
129
+ ```python
130
+ # Check current report settings
131
+ config = Skill("moai-project-config-manager", action="get_current")
132
+ current_reports = config["report_generation"]
133
+ print(f"Current report setting: {current_reports['user_choice']}")
134
+
135
+ # Update to minimal reports for cost savings
136
+ Skill(
137
+ "moai-project-config-manager",
138
+ action="update",
139
+ changes={
140
+ "report_generation": {
141
+ "enabled": True,
142
+ "auto_create": False,
143
+ "user_choice": "Minimal"
144
+ }
145
+ }
146
+ )
147
+
148
+ print("✅ Updated to minimal reports (saves ~60% tokens)")
149
+ ```
150
+
151
+ ### Scenario 4: Multi-Language Project Support
152
+
153
+ **Context**: Adding Japanese language support to existing project
154
+
155
+ ```python
156
+ # Show what will change before applying
157
+ diff_result = Skill(
158
+ "moai-project-config-manager",
159
+ action="diff",
160
+ changes={
161
+ "language": {
162
+ "conversation_language": "ja",
163
+ "conversation_language_name": "日本語"
164
+ }
165
+ }
166
+ )
167
+
168
+ print("Planned changes:")
169
+ for change in diff_result["changes"]:
170
+ print(f" {change['path']}: {change['old']} → {change['new']}")
171
+
172
+ # Apply the change
173
+ Skill(
174
+ "moai-project-config-manager",
175
+ action="update",
176
+ changes={
177
+ "language": {
178
+ "conversation_language": "ja",
179
+ "conversation_language_name": "日本語"
180
+ }
181
+ }
182
+ )
183
+ ```
184
+
185
+ ---
186
+
187
+ ## Integration Examples
188
+
189
+ ### Integration with Alfred Commands
190
+
191
+ #### In /alfred:0-project Command
192
+
193
+ ```python
194
+ def initialize_or_update_project():
195
+ """Handle project initialization or setting updates"""
196
+
197
+ # Check if configuration exists
198
+ if not Path(".moai/config.json").exists():
199
+ print("🆕 Creating new project configuration...")
200
+ # Use skill to create default configuration
201
+ Skill("moai-project-config-manager", action="create_default")
202
+ else:
203
+ print("🔧 Existing project found. Select operation:")
204
+ # Interactive choice for project setup vs setting modification
205
+ response = AskUserQuestion(
206
+ question="What would you like to do?",
207
+ options=[
208
+ "🆕 Initialize project documentation",
209
+ "🔧 Modify project settings",
210
+ "📊 View current configuration"
211
+ ]
212
+ )
213
+
214
+ if response == "🔧 Modify project settings":
215
+ # Delegate to configuration manager
216
+ Skill("moai-project-config-manager")
217
+ elif response == "📊 View current configuration":
218
+ show_current_configuration()
219
+ ```
220
+
221
+ #### In /alfred:1-plan Command
222
+
223
+ ```python
224
+ def plan_with_configuration():
225
+ """Use configuration settings in planning phase"""
226
+
227
+ # Load and validate configuration
228
+ validation = Skill("moai-project-config-manager", action="validate")
229
+ if not validation["valid"]:
230
+ print(f"❌ Configuration errors: {validation['errors']}")
231
+ return
232
+
233
+ # Get configuration for planning
234
+ config = Skill("moai-project-config-manager", action="get_current")
235
+
236
+ # Use language setting for plan output
237
+ language = config["language"]["conversation_language"]
238
+ if language == "ko":
239
+ plan_prompt = "한국어로 개발 계획을 작성해주세요"
240
+ else:
241
+ plan_prompt = "Please write the development plan in English"
242
+
243
+ # Use domain settings for specialized planning
244
+ domains = config.get("stack", {}).get("selected_domains", [])
245
+ if "frontend" in domains:
246
+ plan_prompt += "\nInclude frontend architecture considerations"
247
+ if "security" in domains:
248
+ plan_prompt += "\nInclude security planning and best practices"
249
+
250
+ # Generate plan with configuration context
251
+ generate_development_plan(plan_prompt)
252
+ ```
253
+
254
+ #### In /alfred:2-run Command
255
+
256
+ ```python
257
+ def execute_with_configuration():
258
+ """Execute tasks using configuration settings"""
259
+
260
+ # Load configuration
261
+ config = Skill("moai-project-config-manager", action="get_current")
262
+
263
+ # Configure execution based on settings
264
+ execution_config = {
265
+ "language": config["language"]["conversation_language"],
266
+ "workflow": config["github"]["spec_git_workflow"],
267
+ "reports": config["report_generation"]["user_choice"],
268
+ "domains": config.get("stack", {}).get("selected_domains", [])
269
+ }
270
+
271
+ # Adjust execution based on configuration
272
+ if execution_config["workflow"] == "feature_branch":
273
+ create_feature_branch()
274
+ execute_in_feature_branch()
275
+ else:
276
+ execute_directly()
277
+
278
+ # Generate reports based on setting
279
+ if execution_config["reports"] == "Enable":
280
+ generate_full_report()
281
+ elif execution_config["reports"] == "Minimal":
282
+ generate_minimal_report()
283
+ ```
284
+
285
+ ### Integration with Custom Scripts
286
+
287
+ #### Configuration Migration Script
288
+
289
+ ```python
290
+ #!/usr/bin/env python3
291
+ """
292
+ Migrate configuration from old format to new format
293
+ """
294
+
295
+ def migrate_configuration():
296
+ """Migrate old configuration to new schema"""
297
+
298
+ print("🔄 Starting configuration migration...")
299
+
300
+ # Backup current configuration
301
+ backup_result = Skill("moai-project-config-manager", action="backup")
302
+ print(f"📁 Backup created: {backup_result['backup_path']}")
303
+
304
+ # Load current configuration
305
+ config = Skill("moai-project-config-manager", action="get_current")
306
+
307
+ # Perform migration transformations
308
+ updates = {}
309
+
310
+ # Example: Add new report_generation settings if missing
311
+ if "report_generation" not in config:
312
+ updates["report_generation"] = {
313
+ "enabled": True,
314
+ "auto_create": False,
315
+ "user_choice": "Minimal",
316
+ "updated_at": datetime.now().isoformat()
317
+ }
318
+
319
+ # Example: Migrate old domain format
320
+ if "project_domains" in config and "stack" not in config:
321
+ updates["stack"] = {
322
+ "selected_domains": config["project_domains"],
323
+ "domain_selection_date": datetime.now().isoformat()
324
+ }
325
+
326
+ # Apply updates if any
327
+ if updates:
328
+ Skill("moai-project-config-manager", action="update", changes=updates)
329
+ print(f"✅ Applied {len(updates)} migration updates")
330
+ else:
331
+ print("✅ Configuration already up to date")
332
+
333
+ # Validate migrated configuration
334
+ validation = Skill("moai-project-config-manager", action="validate")
335
+ if validation["valid"]:
336
+ print("✅ Migration completed successfully")
337
+ else:
338
+ print(f"❌ Migration validation failed: {validation['errors']}")
339
+
340
+ if __name__ == "__main__":
341
+ migrate_configuration()
342
+ ```
343
+
344
+ #### Configuration Backup Manager
345
+
346
+ ```python
347
+ #!/usr/bin/env python3
348
+ """
349
+ Manage configuration backups with cleanup and restore capabilities
350
+ """
351
+
352
+ def backup_manager():
353
+ """Manage configuration backups"""
354
+
355
+ while True:
356
+ print("\n🗂️ Configuration Backup Manager")
357
+ print("1. Create backup")
358
+ print("2. List backups")
359
+ print("3. Restore backup")
360
+ print("4. Clean old backups")
361
+ print("5. Exit")
362
+
363
+ choice = input("Select option (1-5): ")
364
+
365
+ if choice == "1":
366
+ # Create backup
367
+ result = Skill("moai-project-config-manager", action="backup")
368
+ print(f"✅ Backup created: {result['backup_path']}")
369
+
370
+ elif choice == "2":
371
+ # List backups
372
+ backups = Skill("moai-project-config-manager", action="list_backups")
373
+ if backups:
374
+ print("\n📁 Available backups:")
375
+ for path, timestamp in backups.items():
376
+ print(f" {path} - {timestamp}")
377
+ else:
378
+ print("📭 No backups found")
379
+
380
+ elif choice == "3":
381
+ # Restore backup
382
+ backups = Skill("moai-project-config-manager", action="list_backups")
383
+ if not backups:
384
+ print("📭 No backups available to restore")
385
+ continue
386
+
387
+ print("\nSelect backup to restore:")
388
+ for i, (path, timestamp) in enumerate(backups.items(), 1):
389
+ print(f"{i}. {path} - {timestamp}")
390
+
391
+ try:
392
+ selection = int(input("Enter backup number: ")) - 1
393
+ backup_path = list(backups.keys())[selection]
394
+
395
+ result = Skill(
396
+ "moai-project-config-manager",
397
+ action="restore",
398
+ backup_path=backup_path
399
+ )
400
+
401
+ if result["success"]:
402
+ print(f"✅ Restored from: {backup_path}")
403
+ else:
404
+ print(f"❌ Restore failed: {result.get('error', 'Unknown error')}")
405
+
406
+ except (ValueError, IndexError):
407
+ print("❌ Invalid selection")
408
+
409
+ elif choice == "4":
410
+ # Clean old backups
411
+ days = int(input("Delete backups older than how many days? "))
412
+ result = Skill(
413
+ "moai-project-config-manager",
414
+ action="cleanup_backups",
415
+ older_than_days=days
416
+ )
417
+ print(f"🗑️ Deleted {result['deleted_count']} old backups")
418
+
419
+ elif choice == "5":
420
+ break
421
+
422
+ else:
423
+ print("❌ Invalid option")
424
+
425
+ if __name__ == "__main__":
426
+ backup_manager()
427
+ ```
428
+
429
+ ---
430
+
431
+ ## Error Handling Examples
432
+
433
+ ### Handling Configuration Errors
434
+
435
+ ```python
436
+ def safe_configuration_update(changes):
437
+ """Safely update configuration with error handling"""
438
+
439
+ try:
440
+ # Validate current configuration first
441
+ validation = Skill("moai-project-config-manager", action="validate")
442
+ if not validation["valid"]:
443
+ print(f"⚠️ Current configuration has errors: {validation['errors']}")
444
+
445
+ # Show what will change
446
+ diff_result = Skill(
447
+ "moai-project-config-manager",
448
+ action="diff",
449
+ changes=changes
450
+ )
451
+
452
+ print("Planned changes:")
453
+ for change in diff_result["changes"]:
454
+ print(f" {change['path']}: {change['old']} → {change['new']}")
455
+
456
+ # Ask for confirmation
457
+ confirm = AskUserQuestion(
458
+ question="Apply these changes?",
459
+ options=["Yes", "No"]
460
+ )
461
+
462
+ if confirm == "Yes":
463
+ # Apply changes
464
+ result = Skill(
465
+ "moai-project-config-manager",
466
+ action="update",
467
+ changes=changes
468
+ )
469
+
470
+ if result.get("success", True):
471
+ print("✅ Configuration updated successfully")
472
+ if "backup_path" in result:
473
+ print(f"📁 Backup created: {result['backup_path']}")
474
+ else:
475
+ print(f"❌ Update failed: {result.get('error', 'Unknown error')}")
476
+
477
+ else:
478
+ print("❌ Changes cancelled")
479
+
480
+ except Exception as e:
481
+ print(f"❌ Unexpected error: {e}")
482
+
483
+ # Try to restore from backup if available
484
+ if "backup_path" in locals():
485
+ restore_result = Skill(
486
+ "moai-project-config-manager",
487
+ action="restore",
488
+ backup_path=backup_path
489
+ )
490
+ if restore_result["success"]:
491
+ print("✅ Restored configuration from backup")
492
+ ```
493
+
494
+ ### Configuration Recovery
495
+
496
+ ```python
497
+ def recover_configuration():
498
+ """Recover from configuration corruption"""
499
+
500
+ print("🔧 Configuration Recovery Mode")
501
+
502
+ # Check if configuration file exists
503
+ if not Path(".moai/config.json").exists():
504
+ print("📭 Configuration file not found")
505
+ create_new = AskUserQuestion(
506
+ question="Create new default configuration?",
507
+ options=["Yes", "No"]
508
+ )
509
+
510
+ if create_new == "Yes":
511
+ Skill("moai-project-config-manager", action="create_default")
512
+ print("✅ New configuration created")
513
+ return
514
+
515
+ # Try to validate existing configuration
516
+ validation = Skill("moai-project-config-manager", action="validate")
517
+
518
+ if validation["valid"]:
519
+ print("✅ Configuration is valid")
520
+ return
521
+
522
+ print(f"❌ Configuration errors found: {validation['errors']}")
523
+
524
+ # Show recovery options
525
+ recovery_option = AskUserQuestion(
526
+ question="How would you like to recover?",
527
+ options=[
528
+ "🔧 Attempt automatic repair",
529
+ "📁 Restore from backup",
530
+ "🆕 Create new configuration",
531
+ "❌ Exit"
532
+ ]
533
+ )
534
+
535
+ if recovery_option == "🔧 Attempt automatic repair":
536
+ # Try to repair common issues
537
+ print("🔧 Attempting automatic repair...")
538
+ result = Skill("moai-project-config-manager", action="auto_repair")
539
+
540
+ if result["success"]:
541
+ print("✅ Configuration repaired successfully")
542
+ else:
543
+ print(f"❌ Automatic repair failed: {result['error']}")
544
+
545
+ elif recovery_option == "📁 Restore from backup":
546
+ # List available backups
547
+ backups = Skill("moai-project-config-manager", action="list_backups")
548
+
549
+ if backups:
550
+ print("📁 Available backups:")
551
+ for i, (path, timestamp) in enumerate(backups.items(), 1):
552
+ print(f"{i}. {path} - {timestamp}")
553
+
554
+ try:
555
+ selection = int(input("Select backup to restore: ")) - 1
556
+ backup_path = list(backups.keys())[selection]
557
+
558
+ result = Skill(
559
+ "moai-project-config-manager",
560
+ action="restore",
561
+ backup_path=backup_path
562
+ )
563
+
564
+ if result["success"]:
565
+ print("✅ Configuration restored from backup")
566
+ else:
567
+ print(f"❌ Restore failed: {result['error']}")
568
+
569
+ except (ValueError, IndexError):
570
+ print("❌ Invalid backup selection")
571
+ else:
572
+ print("📭 No backups available")
573
+
574
+ elif recovery_option == "🆕 Create new configuration":
575
+ # Create fresh configuration
576
+ Skill("moai-project-config-manager", action="create_default")
577
+ print("✅ New default configuration created")
578
+ ```
579
+
580
+ ---
581
+
582
+ ## Testing and Validation Examples
583
+
584
+ ### Unit Test Examples
585
+
586
+ ```python
587
+ import pytest
588
+ from unittest.mock import patch, MagicMock
589
+
590
+ def test_language_validation():
591
+ """Test language configuration validation"""
592
+
593
+ # Valid language configuration
594
+ valid_config = {
595
+ "language": {
596
+ "conversation_language": "ko",
597
+ "conversation_language_name": "한국어",
598
+ "agent_prompt_language": "localized"
599
+ }
600
+ }
601
+
602
+ result = Skill("moai-project-config-manager", action="validate", config=valid_config)
603
+ assert result["valid"] == True
604
+
605
+ # Invalid language configuration
606
+ invalid_config = {
607
+ "language": {
608
+ "conversation_language": "fr", # Invalid language code
609
+ "conversation_language_name": "Français",
610
+ "agent_prompt_language": "localized"
611
+ }
612
+ }
613
+
614
+ result = Skill("moai-project-config-manager", action="validate", config=invalid_config)
615
+ assert result["valid"] == False
616
+ assert any("Invalid language code" in error["message"] for error in result["errors"])
617
+
618
+ def test_configuration_merge():
619
+ """Test configuration merging logic"""
620
+
621
+ original_config = {
622
+ "language": {
623
+ "conversation_language": "ko",
624
+ "conversation_language_name": "한국어",
625
+ "agent_prompt_language": "localized"
626
+ },
627
+ "github": {
628
+ "auto_delete_branches": False,
629
+ "spec_git_workflow": "develop_direct"
630
+ }
631
+ }
632
+
633
+ # Update only language settings
634
+ changes = {
635
+ "language": {
636
+ "conversation_language": "en",
637
+ "conversation_language_name": "English"
638
+ }
639
+ }
640
+
641
+ result = Skill(
642
+ "moai-project-config-manager",
643
+ action="merge_test",
644
+ original=original_config,
645
+ changes=changes
646
+ )
647
+
648
+ # Language should be updated
649
+ assert result["merged"]["language"]["conversation_language"] == "en"
650
+ # GitHub settings should be preserved
651
+ assert result["merged"]["github"]["auto_delete_branches"] == False
652
+
653
+ @patch('pathlib.Path.exists')
654
+ @patch('pathlib.Path.read_text')
655
+ def test_invalid_json_handling(mock_read, mock_exists):
656
+ """Test handling of invalid JSON configuration"""
657
+
658
+ mock_exists.return_value = True
659
+ mock_read.return_value = '{"invalid": json content}'
660
+
661
+ # Should attempt repair or raise appropriate error
662
+ with pytest.raises(ConfigError) as exc_info:
663
+ Skill("moai-project-config-manager", action="load")
664
+
665
+ assert "Invalid JSON" in str(exc_info.value)
666
+ ```
667
+
668
+ ### Integration Test Examples
669
+
670
+ ```python
671
+ def test_full_configuration_workflow():
672
+ """Test complete configuration management workflow"""
673
+
674
+ # Start with clean state
675
+ if Path(".moai/config.json").exists():
676
+ Path(".moai/config.json").unlink()
677
+
678
+ # 1. Create initial configuration
679
+ Skill("moai-project-config-manager", action="create_default")
680
+
681
+ # Verify creation
682
+ assert Path(".moai/config.json").exists()
683
+
684
+ validation = Skill("moai-project-config-manager", action="validate")
685
+ assert validation["valid"] == True
686
+
687
+ # 2. Update configuration
688
+ changes = {
689
+ "language": {
690
+ "conversation_language": "en",
691
+ "conversation_language_name": "English"
692
+ },
693
+ "github": {
694
+ "auto_delete_branches": True
695
+ }
696
+ }
697
+
698
+ Skill("moai-project-config-manager", action="update", changes=changes)
699
+
700
+ # Verify updates
701
+ config = Skill("moai-project-config-manager", action="get_current")
702
+ assert config["language"]["conversation_language"] == "en"
703
+ assert config["github"]["auto_delete_branches"] == True
704
+
705
+ # 3. Create backup and test restore
706
+ backup_result = Skill("moai-project-config-manager", action="backup")
707
+
708
+ # Make additional changes
709
+ Skill("moai-project-config-manager", action="update", changes={
710
+ "user": {"nickname": "TestUser"}
711
+ })
712
+
713
+ # Restore from backup
714
+ Skill("moai-project-config-manager", action="restore",
715
+ backup_path=backup_result["backup_path"])
716
+
717
+ # Verify restore
718
+ config = Skill("moai-project-config-manager", action="get_current")
719
+ assert "user" not in config # Should be gone after restore
720
+ assert config["language"]["conversation_language"] == "en" # Should remain
721
+
722
+ def test_error_recovery():
723
+ """Test error recovery mechanisms"""
724
+
725
+ # Create valid configuration
726
+ Skill("moai-project-config-manager", action="create_default")
727
+
728
+ # Simulate corruption by writing invalid JSON
729
+ with open(".moai/config.json", "w") as f:
730
+ f.write('{"invalid": json}')
731
+
732
+ # Should handle gracefully
733
+ try:
734
+ validation = Skill("moai-project-config-manager", action="validate")
735
+ assert validation["valid"] == False
736
+ assert len(validation["errors"]) > 0
737
+ except Exception as e:
738
+ # Should raise appropriate error, not crash
739
+ assert "Invalid JSON" in str(e)
740
+
741
+ # Recovery should work
742
+ Skill("moai-project-config-manager", action="auto_repair")
743
+
744
+ # Should be valid after repair
745
+ validation = Skill("moai-project-config-manager", action="validate")
746
+ assert validation["valid"] == True
747
+ ```
748
+
749
+ ---
750
+
751
+ ## Performance Monitoring Examples
752
+
753
+ ### Configuration Performance Metrics
754
+
755
+ ```python
756
+ def monitor_configuration_performance():
757
+ """Monitor configuration operation performance"""
758
+
759
+ import time
760
+
761
+ operations = []
762
+
763
+ # Test configuration loading
764
+ start = time.time()
765
+ config = Skill("moai-project-config-manager", action="get_current")
766
+ load_time = time.time() - start
767
+ operations.append(("load", load_time))
768
+
769
+ # Test validation
770
+ start = time.time()
771
+ validation = Skill("moai-project-config-manager", action="validate")
772
+ validation_time = time.time() - start
773
+ operations.append(("validate", validation_time))
774
+
775
+ # Test backup creation
776
+ start = time.time()
777
+ backup = Skill("moai-project-config-manager", action="backup")
778
+ backup_time = time.time() - start
779
+ operations.append(("backup", backup_time))
780
+
781
+ # Test update operation
782
+ start = time.time()
783
+ Skill("moai-project-config-manager", action="update", changes={
784
+ "report_generation": {"updated_at": datetime.now().isoformat()}
785
+ })
786
+ update_time = time.time() - start
787
+ operations.append(("update", update_time))
788
+
789
+ # Report performance
790
+ print("📊 Configuration Performance Metrics:")
791
+ for operation, duration in operations:
792
+ status = "✅" if duration < 0.1 else "⚠️" if duration < 0.5 else "❌"
793
+ print(f" {status} {operation}: {duration:.3f}s")
794
+
795
+ # Performance recommendations
796
+ avg_time = sum(duration for _, duration in operations) / len(operations)
797
+ if avg_time > 0.2:
798
+ print("\n⚠️ Performance Recommendations:")
799
+ print(" - Consider optimizing JSON parsing")
800
+ print(" - Check disk I/O performance")
801
+ print(" - Review validation rules complexity")
802
+ else:
803
+ print("\n✅ Performance is within acceptable ranges")
804
+
805
+ def analyze_configuration_usage():
806
+ """Analyze configuration usage patterns"""
807
+
808
+ # Load configuration
809
+ config = Skill("moai-project-config-manager", action="get_current")
810
+
811
+ # Analyze settings usage
812
+ analysis = {
813
+ "language_efficiency": analyze_language_settings(config),
814
+ "github_workflow": analyze_github_settings(config),
815
+ "report_optimization": analyze_report_settings(config),
816
+ "domain_coverage": analyze_domain_settings(config)
817
+ }
818
+
819
+ print("📈 Configuration Usage Analysis:")
820
+
821
+ # Language analysis
822
+ lang_analysis = analysis["language_efficiency"]
823
+ print(f"\n🌍 Language Settings:")
824
+ print(f" Conversation Language: {lang_analysis['conversation_language']}")
825
+ print(f" Agent Language: {lang_analysis['agent_prompt_language']}")
826
+ print(f" Localization Impact: {lang_analysis['localization_impact']}")
827
+
828
+ # GitHub analysis
829
+ github_analysis = analysis["github_workflow"]
830
+ print(f"\n🔧 GitHub Workflow:")
831
+ print(f" Auto-delete Branches: {github_analysis['auto_delete']}")
832
+ print(f" Workflow Type: {github_analysis['workflow_type']}")
833
+ print(f" Team Collaboration: {github_analysis['collaboration_score']}/10")
834
+
835
+ # Report analysis
836
+ report_analysis = analysis["report_optimization"]
837
+ print(f"\n📊 Report Generation:")
838
+ print(f" Setting: {report_analysis['current_setting']}")
839
+ print(f" Token Efficiency: {report_analysis['token_efficiency']}")
840
+ print(f" Cost Optimization: {report_analysis['cost_impact']}")
841
+
842
+ # Domain analysis
843
+ domain_analysis = analysis["domain_coverage"]
844
+ print(f"\n🎯 Domain Coverage:")
845
+ print(f" Selected Domains: {', '.join(domain_analysis['domains'])}")
846
+ print(f" Coverage Score: {domain_analysis['coverage_score']}/5")
847
+ print(f" Recommendations: {domain_analysis['recommendations']}")
848
+
849
+ def analyze_language_settings(config):
850
+ """Analyze language configuration efficiency"""
851
+
852
+ lang = config.get("language", {})
853
+
854
+ conversation_lang = lang.get("conversation_language", "en")
855
+ agent_lang = lang.get("agent_prompt_language", "english")
856
+
857
+ # Calculate localization impact
858
+ localization_impact = "low" if agent_lang == "english" else "high"
859
+
860
+ return {
861
+ "conversation_language": conversation_lang,
862
+ "agent_prompt_language": agent_lang,
863
+ "localization_impact": localization_impact
864
+ }
865
+
866
+ def analyze_github_settings(config):
867
+ """Analyze GitHub workflow settings"""
868
+
869
+ github = config.get("github", {})
870
+
871
+ auto_delete = github.get("auto_delete_branches", False)
872
+ workflow = github.get("spec_git_workflow", "develop_direct")
873
+
874
+ # Calculate collaboration score
875
+ collaboration_scores = {
876
+ "feature_branch": 9,
877
+ "develop_direct": 5,
878
+ "per_spec": 7
879
+ }
880
+
881
+ return {
882
+ "auto_delete": auto_delete,
883
+ "workflow_type": workflow,
884
+ "collaboration_score": collaboration_scores.get(workflow, 5)
885
+ }
886
+
887
+ def analyze_report_settings(config):
888
+ """Analyze report generation optimization"""
889
+
890
+ reports = config.get("report_generation", {})
891
+
892
+ setting = reports.get("user_choice", "Minimal")
893
+ enabled = reports.get("enabled", True)
894
+
895
+ # Calculate efficiency metrics
896
+ efficiency_map = {
897
+ "Enable": {"tokens": "50-60", "cost": "high"},
898
+ "Minimal": {"tokens": "20-30", "cost": "medium"},
899
+ "Disable": {"tokens": "0", "cost": "low"}
900
+ }
901
+
902
+ efficiency = efficiency_map.get(setting, efficiency_map["Minimal"])
903
+
904
+ return {
905
+ "current_setting": setting,
906
+ "token_efficiency": f"{efficiency['tokens']} tokens/report",
907
+ "cost_impact": efficiency["cost"]
908
+ }
909
+
910
+ def analyze_domain_settings(config):
911
+ """Analyze domain selection coverage"""
912
+
913
+ stack = config.get("stack", {})
914
+ domains = stack.get("selected_domains", [])
915
+
916
+ # Calculate coverage score
917
+ available_domains = ["frontend", "backend", "data", "devops", "security"]
918
+ coverage_score = len(domains) / len(available_domains) * 5
919
+
920
+ # Generate recommendations
921
+ recommendations = []
922
+ if "frontend" not in domains:
923
+ recommendations.append("Consider frontend domain for UI projects")
924
+ if "security" not in domains:
925
+ recommendations.append("Add security domain for production projects")
926
+ if len(domains) < 2:
927
+ recommendations.append("Select more domains for comprehensive coverage")
928
+
929
+ return {
930
+ "domains": domains,
931
+ "coverage_score": round(coverage_score, 1),
932
+ "recommendations": recommendations
933
+ }
934
+
935
+ if __name__ == "__main__":
936
+ monitor_configuration_performance()
937
+ analyze_configuration_usage()
938
+ ```
939
+
940
+ ---
941
+
942
+ ## Advanced Usage Patterns
943
+
944
+ ### Configuration Templates
945
+
946
+ ```python
947
+ def apply_configuration_template(template_name):
948
+ """Apply predefined configuration templates"""
949
+
950
+ templates = {
951
+ "startup": {
952
+ "description": "Fast-moving startup with direct workflow",
953
+ "settings": {
954
+ "language": {
955
+ "conversation_language": "en",
956
+ "conversation_language_name": "English",
957
+ "agent_prompt_language": "english"
958
+ },
959
+ "github": {
960
+ "auto_delete_branches": True,
961
+ "spec_git_workflow": "develop_direct"
962
+ },
963
+ "report_generation": {
964
+ "enabled": True,
965
+ "auto_create": False,
966
+ "user_choice": "Minimal"
967
+ },
968
+ "stack": {
969
+ "selected_domains": ["frontend", "backend"]
970
+ }
971
+ }
972
+ },
973
+ "enterprise": {
974
+ "description": "Enterprise team with PR workflow",
975
+ "settings": {
976
+ "language": {
977
+ "conversation_language": "en",
978
+ "conversation_language_name": "English",
979
+ "agent_prompt_language": "english"
980
+ },
981
+ "github": {
982
+ "auto_delete_branches": True,
983
+ "spec_git_workflow": "feature_branch"
984
+ },
985
+ "report_generation": {
986
+ "enabled": True,
987
+ "auto_create": True,
988
+ "user_choice": "Enable"
989
+ },
990
+ "stack": {
991
+ "selected_domains": ["frontend", "backend", "devops", "security"]
992
+ }
993
+ }
994
+ },
995
+ "research": {
996
+ "description": "Research project with minimal workflow",
997
+ "settings": {
998
+ "language": {
999
+ "conversation_language": "en",
1000
+ "conversation_language_name": "English",
1001
+ "agent_prompt_language": "english"
1002
+ },
1003
+ "github": {
1004
+ "auto_delete_branches": False,
1005
+ "spec_git_workflow": "per_spec"
1006
+ },
1007
+ "report_generation": {
1008
+ "enabled": True,
1009
+ "auto_create": True,
1010
+ "user_choice": "Enable"
1011
+ },
1012
+ "stack": {
1013
+ "selected_domains": ["data", "frontend"]
1014
+ }
1015
+ }
1016
+ }
1017
+ }
1018
+
1019
+ if template_name not in templates:
1020
+ print(f"❌ Unknown template: {template_name}")
1021
+ print(f"Available templates: {', '.join(templates.keys())}")
1022
+ return
1023
+
1024
+ template = templates[template_name]
1025
+ print(f"📋 Applying template: {template['description']}")
1026
+
1027
+ # Apply template settings
1028
+ Skill("moai-project-config-manager", action="update", changes=template["settings"])
1029
+
1030
+ print(f"✅ Template '{template_name}' applied successfully")
1031
+
1032
+ # Usage examples:
1033
+ # apply_configuration_template("startup")
1034
+ # apply_configuration_template("enterprise")
1035
+ # apply_configuration_template("research")
1036
+ ```
1037
+
1038
+ ### Configuration Synchronization
1039
+
1040
+ ```python
1041
+ def synchronize_configurations(source_project, target_project):
1042
+ """Synchronize configuration between projects"""
1043
+
1044
+ print(f"🔄 Synchronizing configuration from {source_project} to {target_project}")
1045
+
1046
+ # Load source configuration
1047
+ source_config = Skill(
1048
+ "moai-project-config-manager",
1049
+ action="load_from_path",
1050
+ project_path=source_project
1051
+ )
1052
+
1053
+ # Backup target configuration
1054
+ target_backup = Skill(
1055
+ "moai-project-config-manager",
1056
+ action="backup",
1057
+ project_path=target_project
1058
+ )
1059
+
1060
+ print(f"📁 Target configuration backed up: {target_backup['backup_path']}")
1061
+
1062
+ # Determine which sections to synchronize
1063
+ sync_options = [
1064
+ "🌍 Language settings",
1065
+ "🔧 GitHub settings",
1066
+ "📊 Report settings",
1067
+ "🎯 Domain settings",
1068
+ "👤 User settings",
1069
+ "📋 All settings"
1070
+ ]
1071
+
1072
+ selection = AskUserQuestion(
1073
+ question="Which settings to synchronize?",
1074
+ options=sync_options
1075
+ )
1076
+
1077
+ # Prepare changes based on selection
1078
+ changes = {}
1079
+
1080
+ if selection in ["🌍 Language settings", "📋 All settings"]:
1081
+ changes["language"] = source_config.get("language", {})
1082
+
1083
+ if selection in ["🔧 GitHub settings", "📋 All settings"]:
1084
+ changes["github"] = source_config.get("github", {})
1085
+
1086
+ if selection in ["📊 Report settings", "📋 All settings"]:
1087
+ changes["report_generation"] = source_config.get("report_generation", {})
1088
+
1089
+ if selection in ["🎯 Domain settings", "📋 All settings"]:
1090
+ changes["stack"] = source_config.get("stack", {})
1091
+
1092
+ if selection in ["👤 User settings", "📋 All settings"]:
1093
+ changes["user"] = source_config.get("user", {})
1094
+
1095
+ # Apply synchronization
1096
+ if changes:
1097
+ Skill(
1098
+ "moai-project-config-manager",
1099
+ action="update",
1100
+ changes=changes,
1101
+ project_path=target_project
1102
+ )
1103
+
1104
+ print(f"✅ Synchronized {len(changes)} configuration sections to {target_project}")
1105
+ else:
1106
+ print("❌ No settings selected for synchronization")
1107
+ ```
1108
+
1109
+ These examples demonstrate comprehensive usage patterns for the moai-project-config-manager skill, from basic operations to advanced integration scenarios, error handling, testing, and performance monitoring.