moai-adk 0.4.0__py3-none-any.whl → 0.4.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 (125) hide show
  1. moai_adk/__init__.py +1 -8
  2. moai_adk/cli/commands/init.py +10 -5
  3. moai_adk/cli/commands/update.py +274 -118
  4. moai_adk/cli/prompts/init_prompts.py +14 -18
  5. moai_adk/core/diagnostics/slash_commands.py +1 -1
  6. moai_adk/core/project/backup_utils.py +1 -0
  7. moai_adk/core/project/phase_executor.py +3 -1
  8. moai_adk/core/project/validator.py +3 -2
  9. moai_adk/core/template/backup.py +11 -3
  10. moai_adk/core/template/merger.py +16 -3
  11. moai_adk/core/template/processor.py +22 -3
  12. moai_adk/templates/.claude/agents/alfred/cc-manager.md +443 -424
  13. moai_adk/templates/.claude/agents/alfred/debug-helper.md +116 -103
  14. moai_adk/templates/.claude/agents/alfred/doc-syncer.md +130 -116
  15. moai_adk/templates/.claude/agents/alfred/git-manager.md +186 -174
  16. moai_adk/templates/.claude/agents/alfred/implementation-planner.md +227 -213
  17. moai_adk/templates/.claude/agents/alfred/project-manager.md +205 -125
  18. moai_adk/templates/.claude/agents/alfred/quality-gate.md +224 -209
  19. moai_adk/templates/.claude/agents/alfred/spec-builder.md +174 -160
  20. moai_adk/templates/.claude/agents/alfred/tag-agent.md +151 -139
  21. moai_adk/templates/.claude/agents/alfred/tdd-implementer.md +209 -196
  22. moai_adk/templates/.claude/agents/alfred/trust-checker.md +247 -233
  23. moai_adk/templates/.claude/commands/alfred/0-project.md +673 -640
  24. moai_adk/templates/.claude/commands/alfred/1-plan.md +342 -333
  25. moai_adk/templates/.claude/commands/alfred/2-run.md +295 -285
  26. moai_adk/templates/.claude/commands/alfred/3-sync.md +366 -356
  27. moai_adk/templates/.claude/hooks/alfred/README.md +52 -52
  28. moai_adk/templates/.claude/hooks/alfred/alfred_hooks.py +44 -48
  29. moai_adk/templates/.claude/hooks/alfred/core/__init__.py +17 -17
  30. moai_adk/templates/.claude/hooks/alfred/core/checkpoint.py +59 -59
  31. moai_adk/templates/.claude/hooks/alfred/core/context.py +19 -19
  32. moai_adk/templates/.claude/hooks/alfred/core/project.py +52 -52
  33. moai_adk/templates/.claude/hooks/alfred/handlers/__init__.py +1 -1
  34. moai_adk/templates/.claude/hooks/alfred/handlers/notification.py +4 -4
  35. moai_adk/templates/.claude/hooks/alfred/handlers/session.py +27 -27
  36. moai_adk/templates/.claude/hooks/alfred/handlers/tool.py +16 -17
  37. moai_adk/templates/.claude/hooks/alfred/handlers/user.py +11 -11
  38. moai_adk/templates/.claude/output-styles/alfred/agentic-coding.md +308 -307
  39. moai_adk/templates/.claude/output-styles/alfred/moai-adk-learning.md +297 -296
  40. moai_adk/templates/.claude/output-styles/alfred/study-with-alfred.md +191 -190
  41. moai_adk/templates/.claude/skills/moai-alfred-code-reviewer/SKILL.md +112 -0
  42. moai_adk/templates/.claude/skills/moai-alfred-debugger-pro/SKILL.md +103 -0
  43. moai_adk/templates/.claude/skills/moai-alfred-ears-authoring/SKILL.md +103 -0
  44. moai_adk/templates/.claude/skills/moai-alfred-git-workflow/SKILL.md +95 -0
  45. moai_adk/templates/.claude/skills/moai-alfred-language-detection/SKILL.md +99 -0
  46. moai_adk/templates/.claude/skills/moai-alfred-performance-optimizer/SKILL.md +105 -0
  47. moai_adk/templates/.claude/skills/moai-alfred-refactoring-coach/SKILL.md +97 -0
  48. moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-validation/SKILL.md +97 -0
  49. moai_adk/templates/.claude/skills/moai-alfred-tag-scanning/SKILL.md +90 -0
  50. moai_adk/templates/.claude/skills/moai-alfred-trust-validation/SKILL.md +99 -0
  51. moai_adk/templates/.claude/skills/moai-alfred-tui-survey/SKILL.md +87 -0
  52. moai_adk/templates/.claude/skills/moai-alfred-tui-survey/examples.md +62 -0
  53. moai_adk/templates/.claude/skills/moai-claude-code/SKILL.md +70 -43
  54. moai_adk/templates/.claude/skills/moai-claude-code/examples.md +141 -141
  55. moai_adk/templates/.claude/skills/moai-claude-code/reference.md +179 -165
  56. moai_adk/templates/.claude/skills/moai-claude-code/templates/agent-full.md +78 -78
  57. moai_adk/templates/.claude/skills/moai-claude-code/templates/command-full.md +90 -90
  58. moai_adk/templates/.claude/skills/moai-claude-code/templates/plugin-full.json +39 -25
  59. moai_adk/templates/.claude/skills/moai-claude-code/templates/settings-full.json +117 -74
  60. moai_adk/templates/.claude/skills/moai-claude-code/templates/skill-full.md +131 -134
  61. moai_adk/templates/.claude/skills/moai-domain-backend/SKILL.md +43 -12
  62. moai_adk/templates/.claude/skills/moai-domain-cli-tool/SKILL.md +43 -12
  63. moai_adk/templates/.claude/skills/moai-domain-data-science/SKILL.md +43 -12
  64. moai_adk/templates/.claude/skills/moai-domain-database/SKILL.md +43 -12
  65. moai_adk/templates/.claude/skills/moai-domain-devops/SKILL.md +43 -12
  66. moai_adk/templates/.claude/skills/moai-domain-frontend/SKILL.md +43 -12
  67. moai_adk/templates/.claude/skills/moai-domain-ml/SKILL.md +43 -11
  68. moai_adk/templates/.claude/skills/moai-domain-mobile-app/SKILL.md +43 -12
  69. moai_adk/templates/.claude/skills/moai-domain-security/SKILL.md +43 -12
  70. moai_adk/templates/.claude/skills/moai-domain-web-api/SKILL.md +43 -12
  71. moai_adk/templates/.claude/skills/moai-essentials-debug/SKILL.md +47 -11
  72. moai_adk/templates/.claude/skills/moai-essentials-perf/SKILL.md +47 -11
  73. moai_adk/templates/.claude/skills/moai-essentials-refactor/SKILL.md +51 -14
  74. moai_adk/templates/.claude/skills/moai-essentials-review/SKILL.md +46 -10
  75. moai_adk/templates/.claude/skills/moai-foundation-ears/SKILL.md +62 -25
  76. moai_adk/templates/.claude/skills/moai-foundation-git/SKILL.md +44 -17
  77. moai_adk/templates/.claude/skills/moai-foundation-langs/SKILL.md +44 -14
  78. moai_adk/templates/.claude/skills/moai-foundation-specs/SKILL.md +45 -13
  79. moai_adk/templates/.claude/skills/moai-foundation-tags/SKILL.md +46 -14
  80. moai_adk/templates/.claude/skills/moai-foundation-trust/SKILL.md +48 -8
  81. moai_adk/templates/.claude/skills/moai-lang-c/SKILL.md +44 -12
  82. moai_adk/templates/.claude/skills/moai-lang-clojure/SKILL.md +44 -12
  83. moai_adk/templates/.claude/skills/moai-lang-cpp/SKILL.md +44 -11
  84. moai_adk/templates/.claude/skills/moai-lang-csharp/SKILL.md +44 -11
  85. moai_adk/templates/.claude/skills/moai-lang-dart/SKILL.md +44 -12
  86. moai_adk/templates/.claude/skills/moai-lang-elixir/SKILL.md +44 -11
  87. moai_adk/templates/.claude/skills/moai-lang-go/SKILL.md +44 -11
  88. moai_adk/templates/.claude/skills/moai-lang-haskell/SKILL.md +44 -11
  89. moai_adk/templates/.claude/skills/moai-lang-java/SKILL.md +44 -12
  90. moai_adk/templates/.claude/skills/moai-lang-javascript/SKILL.md +44 -12
  91. moai_adk/templates/.claude/skills/moai-lang-julia/SKILL.md +44 -12
  92. moai_adk/templates/.claude/skills/moai-lang-kotlin/SKILL.md +44 -12
  93. moai_adk/templates/.claude/skills/moai-lang-lua/SKILL.md +44 -11
  94. moai_adk/templates/.claude/skills/moai-lang-php/SKILL.md +44 -11
  95. moai_adk/templates/.claude/skills/moai-lang-python/SKILL.md +44 -12
  96. moai_adk/templates/.claude/skills/moai-lang-r/SKILL.md +44 -11
  97. moai_adk/templates/.claude/skills/moai-lang-ruby/SKILL.md +44 -11
  98. moai_adk/templates/.claude/skills/moai-lang-rust/SKILL.md +44 -12
  99. moai_adk/templates/.claude/skills/moai-lang-scala/SKILL.md +44 -12
  100. moai_adk/templates/.claude/skills/moai-lang-shell/SKILL.md +44 -11
  101. moai_adk/templates/.claude/skills/moai-lang-sql/SKILL.md +44 -12
  102. moai_adk/templates/.claude/skills/moai-lang-swift/SKILL.md +44 -12
  103. moai_adk/templates/.claude/skills/moai-lang-typescript/SKILL.md +44 -12
  104. moai_adk/templates/.github/PULL_REQUEST_TEMPLATE.md +44 -43
  105. moai_adk/templates/.github/workflows/moai-gitflow.yml +36 -35
  106. moai_adk/templates/.moai/config.json +9 -6
  107. moai_adk/templates/.moai/memory/development-guide.md +220 -221
  108. moai_adk/templates/.moai/memory/gitflow-protection-policy.md +85 -85
  109. moai_adk/templates/.moai/memory/spec-metadata.md +149 -150
  110. moai_adk/templates/.moai/project/product.md +90 -90
  111. moai_adk/templates/.moai/project/structure.md +85 -85
  112. moai_adk/templates/.moai/project/tech.md +117 -117
  113. moai_adk/templates/CLAUDE.md +350 -722
  114. moai_adk-0.4.1.dist-info/METADATA +303 -0
  115. moai_adk-0.4.1.dist-info/RECORD +152 -0
  116. moai_adk/templates/.claude/commands/alfred/1-spec.md +0 -31
  117. moai_adk/templates/.claude/commands/alfred/2-build.md +0 -30
  118. moai_adk/templates/.claude/skills/scripts/standardize_skills.py +0 -166
  119. moai_adk/templates/.claude/skills/scripts/verify_standardization.sh +0 -43
  120. moai_adk/templates/.moai/hooks/pre-push.sample +0 -88
  121. moai_adk-0.4.0.dist-info/METADATA +0 -1816
  122. moai_adk-0.4.0.dist-info/RECORD +0 -145
  123. {moai_adk-0.4.0.dist-info → moai_adk-0.4.1.dist-info}/WHEEL +0 -0
  124. {moai_adk-0.4.0.dist-info → moai_adk-0.4.1.dist-info}/entry_points.txt +0 -0
  125. {moai_adk-0.4.0.dist-info → moai_adk-0.4.1.dist-info}/licenses/LICENSE +0 -0
@@ -27,7 +27,15 @@ class TemplateBackup:
27
27
  target_path: Project path (absolute).
28
28
  """
29
29
  self.target_path = target_path.resolve()
30
- self.backup_dir = self.target_path / ".moai-backups"
30
+
31
+ @property
32
+ def backup_dir(self) -> Path:
33
+ """Get the backup directory path.
34
+
35
+ Returns:
36
+ Path to .moai-backups directory.
37
+ """
38
+ return self.target_path / ".moai-backups"
31
39
 
32
40
  def has_existing_files(self) -> bool:
33
41
  """Check whether backup-worthy files already exist.
@@ -37,7 +45,7 @@ class TemplateBackup:
37
45
  """
38
46
  return any(
39
47
  (self.target_path / item).exists()
40
- for item in [".moai", ".claude", "CLAUDE.md"]
48
+ for item in [".moai", ".claude", ".github", "CLAUDE.md"]
41
49
  )
42
50
 
43
51
  def create_backup(self) -> Path:
@@ -51,7 +59,7 @@ class TemplateBackup:
51
59
  backup_path.mkdir(parents=True, exist_ok=True)
52
60
 
53
61
  # Copy backup targets
54
- for item in [".moai", ".claude", "CLAUDE.md"]:
62
+ for item in [".moai", ".claude", ".github", "CLAUDE.md"]:
55
63
  src = self.target_path / item
56
64
  if not src.exists():
57
65
  continue
@@ -15,6 +15,11 @@ from typing import Any
15
15
  class TemplateMerger:
16
16
  """Encapsulate template merging logic."""
17
17
 
18
+ PROJECT_INFO_HEADERS = (
19
+ "## 프로젝트 정보",
20
+ "## Project Information",
21
+ )
22
+
18
23
  def __init__(self, target_path: Path) -> None:
19
24
  """Initialize the merger.
20
25
 
@@ -34,9 +39,9 @@ class TemplateMerger:
34
39
  template_path: Template CLAUDE.md.
35
40
  existing_path: Existing CLAUDE.md.
36
41
  """
37
- # Extract the existing "## 프로젝트 정보" section
42
+ # Extract the existing project information section
38
43
  existing_content = existing_path.read_text(encoding="utf-8")
39
- project_info_start = existing_content.find("## 프로젝트 정보")
44
+ project_info_start, _ = self._find_project_info_section(existing_content)
40
45
  project_info = ""
41
46
  if project_info_start != -1:
42
47
  # Extract until EOF
@@ -48,7 +53,7 @@ class TemplateMerger:
48
53
  # Merge when project info exists
49
54
  if project_info:
50
55
  # Remove the project info section from the template
51
- template_project_start = template_content.find("## 프로젝트 정보")
56
+ template_project_start, _ = self._find_project_info_section(template_content)
52
57
  if template_project_start != -1:
53
58
  template_content = template_content[:template_project_start].rstrip()
54
59
 
@@ -59,6 +64,14 @@ class TemplateMerger:
59
64
  # No project info; copy the template as-is
60
65
  shutil.copy2(template_path, existing_path)
61
66
 
67
+ def _find_project_info_section(self, content: str) -> tuple[int, str | None]:
68
+ """Find the project information header in the given content."""
69
+ for header in self.PROJECT_INFO_HEADERS:
70
+ index = content.find(header)
71
+ if index != -1:
72
+ return index, header
73
+ return -1, None
74
+
62
75
  def merge_gitignore(self, template_path: Path, existing_path: Path) -> None:
63
76
  """.gitignore merge.
64
77
 
@@ -178,6 +178,7 @@ class TemplateProcessor:
178
178
 
179
179
  self._copy_claude(silent)
180
180
  self._copy_moai(silent)
181
+ self._copy_github(silent)
181
182
  self._copy_claude_md(silent)
182
183
  self._copy_gitignore(silent)
183
184
 
@@ -237,7 +238,7 @@ class TemplateProcessor:
237
238
  Strategy:
238
239
  - Alfred folders (commands/agents/hooks/output-styles/alfred) → copy wholesale (delete & overwrite)
239
240
  * Creates individual backup before deletion for safety
240
- * Commands: 0-project.md, 1-spec.md, 2-build.md, 3-sync.md
241
+ * Commands: 0-project.md, 1-plan.md, 2-run.md, 3-sync.md
241
242
  - Other files/folders → copy individually (preserve existing)
242
243
  """
243
244
  src = self.template_root / ".claude"
@@ -256,7 +257,7 @@ class TemplateProcessor:
256
257
  # Alfred folders to copy wholesale (overwrite)
257
258
  alfred_folders = [
258
259
  "hooks/alfred",
259
- "commands/alfred", # Contains 0-project.md, 1-spec.md, 2-build.md, 3-sync.md
260
+ "commands/alfred", # Contains 0-project.md, 1-plan.md, 2-run.md, 3-sync.md
260
261
  "output-styles/alfred",
261
262
  "agents/alfred",
262
263
  ]
@@ -356,8 +357,26 @@ class TemplateProcessor:
356
357
  if not silent:
357
358
  console.print(" ✅ .moai/ copy complete (variables substituted)")
358
359
 
360
+ def _copy_github(self, silent: bool = False) -> None:
361
+ """.github/ directory copy with variable substitution."""
362
+ src = self.template_root / ".github"
363
+ dst = self.target_path / ".github"
364
+
365
+ if not src.exists():
366
+ if not silent:
367
+ console.print("⚠️ .github/ template not found")
368
+ return
369
+
370
+ if dst.exists():
371
+ shutil.rmtree(dst)
372
+
373
+ self._copy_dir_with_substitution(src, dst)
374
+
375
+ if not silent:
376
+ console.print(" ✅ .github/ copy complete (variables substituted)")
377
+
359
378
  def _copy_claude_md(self, silent: bool = False) -> None:
360
- """Copy CLAUDE.md with smart merge (preserves "## 프로젝트 정보" section)."""
379
+ """Copy CLAUDE.md with smart merge (preserves \"## 프로젝트 정보\" section)."""
361
380
  src = self.template_root / "CLAUDE.md"
362
381
  dst = self.target_path / "CLAUDE.md"
363
382