moai-adk 0.3.10__tar.gz → 0.3.12__tar.gz

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 (91) hide show
  1. {moai_adk-0.3.10 → moai_adk-0.3.12}/PKG-INFO +1 -1
  2. {moai_adk-0.3.10 → moai_adk-0.3.12}/pyproject.toml +1 -1
  3. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/__init__.py +1 -1
  4. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/__main__.py +1 -3
  5. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/cli/commands/__init__.py +8 -4
  6. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/cli/commands/doctor.py +51 -1
  7. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/cli/commands/init.py +0 -1
  8. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/cli/prompts/init_prompts.py +11 -0
  9. moai_adk-0.3.12/src/moai_adk/core/diagnostics/__init__.py +19 -0
  10. moai_adk-0.3.12/src/moai_adk/core/diagnostics/slash_commands.py +160 -0
  11. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/core/template/processor.py +0 -25
  12. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/templates/.claude/commands/alfred/2-build.md +1 -1
  13. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/templates/.claude/settings.json +0 -11
  14. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/templates/.moai/memory/development-guide.md +3 -0
  15. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/templates/CLAUDE.md +1 -1
  16. moai_adk-0.3.10/src/moai_adk/cli/commands/restore.py +0 -77
  17. {moai_adk-0.3.10 → moai_adk-0.3.12}/.gitignore +0 -0
  18. {moai_adk-0.3.10 → moai_adk-0.3.12}/LICENSE +0 -0
  19. {moai_adk-0.3.10 → moai_adk-0.3.12}/README.md +0 -0
  20. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/cli/__init__.py +0 -0
  21. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/cli/commands/backup.py +0 -0
  22. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/cli/commands/status.py +0 -0
  23. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/cli/commands/update.py +0 -0
  24. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/cli/main.py +0 -0
  25. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/cli/prompts/__init__.py +0 -0
  26. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/core/__init__.py +0 -0
  27. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/core/git/__init__.py +0 -0
  28. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/core/git/branch.py +0 -0
  29. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/core/git/branch_manager.py +0 -0
  30. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/core/git/checkpoint.py +0 -0
  31. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/core/git/commit.py +0 -0
  32. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/core/git/event_detector.py +0 -0
  33. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/core/git/manager.py +0 -0
  34. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/core/project/__init__.py +0 -0
  35. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/core/project/backup_utils.py +0 -0
  36. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/core/project/checker.py +0 -0
  37. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/core/project/detector.py +0 -0
  38. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/core/project/initializer.py +0 -0
  39. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/core/project/phase_executor.py +0 -0
  40. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/core/project/validator.py +0 -0
  41. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/core/quality/__init__.py +0 -0
  42. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/core/quality/trust_checker.py +0 -0
  43. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/core/quality/validators/__init__.py +0 -0
  44. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/core/quality/validators/base_validator.py +0 -0
  45. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/core/template/__init__.py +0 -0
  46. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/core/template/backup.py +0 -0
  47. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/core/template/config.py +0 -0
  48. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/core/template/languages.py +0 -0
  49. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/core/template/merger.py +0 -0
  50. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/templates/.claude/agents/alfred/cc-manager.md +0 -0
  51. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/templates/.claude/agents/alfred/debug-helper.md +0 -0
  52. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/templates/.claude/agents/alfred/doc-syncer.md +0 -0
  53. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/templates/.claude/agents/alfred/git-manager.md +0 -0
  54. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/templates/.claude/agents/alfred/implementation-planner.md +0 -0
  55. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/templates/.claude/agents/alfred/project-manager.md +0 -0
  56. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/templates/.claude/agents/alfred/quality-gate.md +0 -0
  57. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/templates/.claude/agents/alfred/spec-builder.md +0 -0
  58. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/templates/.claude/agents/alfred/tag-agent.md +0 -0
  59. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/templates/.claude/agents/alfred/tdd-implementer.md +0 -0
  60. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/templates/.claude/agents/alfred/trust-checker.md +0 -0
  61. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/templates/.claude/commands/alfred/0-project.md +0 -0
  62. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/templates/.claude/commands/alfred/1-spec.md +0 -0
  63. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/templates/.claude/commands/alfred/3-sync.md +0 -0
  64. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/templates/.claude/hooks/alfred/README.md +0 -0
  65. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/templates/.claude/hooks/alfred/alfred_hooks.py +0 -0
  66. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/templates/.claude/hooks/alfred/core/__init__.py +0 -0
  67. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/templates/.claude/hooks/alfred/core/checkpoint.py +0 -0
  68. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/templates/.claude/hooks/alfred/core/context.py +0 -0
  69. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/templates/.claude/hooks/alfred/core/project.py +0 -0
  70. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/templates/.claude/hooks/alfred/handlers/__init__.py +0 -0
  71. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/templates/.claude/hooks/alfred/handlers/notification.py +0 -0
  72. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/templates/.claude/hooks/alfred/handlers/session.py +0 -0
  73. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/templates/.claude/hooks/alfred/handlers/tool.py +0 -0
  74. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/templates/.claude/hooks/alfred/handlers/user.py +0 -0
  75. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/templates/.claude/output-styles/alfred/agentic-coding.md +0 -0
  76. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/templates/.claude/output-styles/alfred/moai-adk-learning.md +0 -0
  77. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/templates/.claude/output-styles/alfred/study-with-alfred.md +0 -0
  78. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/templates/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  79. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/templates/.github/workflows/moai-gitflow.yml +0 -0
  80. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/templates/.gitignore +0 -0
  81. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/templates/.moai/config.json +0 -0
  82. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/templates/.moai/hooks/pre-push.sample +0 -0
  83. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/templates/.moai/memory/gitflow-protection-policy.md +0 -0
  84. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/templates/.moai/memory/spec-metadata.md +0 -0
  85. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/templates/.moai/project/product.md +0 -0
  86. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/templates/.moai/project/structure.md +0 -0
  87. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/templates/.moai/project/tech.md +0 -0
  88. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/templates/__init__.py +0 -0
  89. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/utils/__init__.py +0 -0
  90. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/utils/banner.py +0 -0
  91. {moai_adk-0.3.10 → moai_adk-0.3.12}/src/moai_adk/utils/logger.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: moai-adk
3
- Version: 0.3.10
3
+ Version: 0.3.12
4
4
  Summary: MoAI Agentic Development Kit - SPEC-First TDD with Alfred SuperAgent
5
5
  Project-URL: Homepage, https://github.com/modu-ai/moai-adk
6
6
  Project-URL: Repository, https://github.com/modu-ai/moai-adk
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "moai-adk"
3
- version = "0.3.10"
3
+ version = "0.3.12"
4
4
  description = "MoAI Agentic Development Kit - SPEC-First TDD with Alfred SuperAgent"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.13"
@@ -4,5 +4,5 @@
4
4
  SPEC-First TDD Framework with Alfred SuperAgent
5
5
  """
6
6
 
7
- __version__ = "0.3.9"
7
+ __version__ = "0.3.12"
8
8
  __all__ = ["__version__"]
@@ -6,7 +6,7 @@ Implements the CLI entry point:
6
6
  - Rich console terminal output
7
7
  - ASCII logo rendering
8
8
  - --version and --help options
9
- - Six core commands: init, doctor, status, backup, restore, update
9
+ - Five core commands: init, doctor, status, backup, update
10
10
  """
11
11
 
12
12
  import sys
@@ -19,7 +19,6 @@ from moai_adk import __version__
19
19
  from moai_adk.cli.commands.backup import backup
20
20
  from moai_adk.cli.commands.doctor import doctor
21
21
  from moai_adk.cli.commands.init import init
22
- from moai_adk.cli.commands.restore import restore
23
22
  from moai_adk.cli.commands.status import status
24
23
  from moai_adk.cli.commands.update import update
25
24
 
@@ -58,7 +57,6 @@ def cli(ctx: click.Context) -> None:
58
57
  cli.add_command(init)
59
58
  cli.add_command(doctor)
60
59
  cli.add_command(status)
61
- cli.add_command(restore)
62
60
  cli.add_command(backup)
63
61
  cli.add_command(update)
64
62
 
@@ -1,16 +1,20 @@
1
1
  # @CODE:CLI-001 | SPEC: SPEC-CLI-001.md | TEST: tests/unit/test_cli_commands.py
2
2
  """CLI command module
3
3
 
4
- Four core commands:
4
+ Core commands:
5
5
  - init: initialize the project
6
6
  - doctor: run system diagnostics
7
7
  - status: show project status
8
- - restore: restore backups
8
+ - update: update templates to latest version
9
+ - backup: create project backups
10
+
11
+ Note: restore functionality is handled by checkpoint system in core.git.checkpoint
9
12
  """
10
13
 
14
+ from moai_adk.cli.commands.backup import backup
11
15
  from moai_adk.cli.commands.doctor import doctor
12
16
  from moai_adk.cli.commands.init import init
13
- from moai_adk.cli.commands.restore import restore
14
17
  from moai_adk.cli.commands.status import status
18
+ from moai_adk.cli.commands.update import update
15
19
 
16
- __all__ = ["init", "doctor", "status", "restore"]
20
+ __all__ = ["init", "doctor", "status", "update", "backup"]
@@ -1,4 +1,5 @@
1
1
  # @CODE:CLI-001 | SPEC: SPEC-CLI-001.md | TEST: tests/unit/test_doctor.py
2
+ # @CODE:CLAUDE-COMMANDS-001:CLI | SPEC: SPEC-CLAUDE-COMMANDS-001.md | TEST: tests/unit/test_slash_commands.py
2
3
  """MoAI-ADK doctor command
3
4
 
4
5
  System diagnostics command:
@@ -6,6 +7,7 @@ System diagnostics command:
6
7
  - Verify Git installation
7
8
  - Validate project structure
8
9
  - Inspect language-specific tool chains
10
+ - Diagnose slash command loading issues (--check-commands)
9
11
  """
10
12
 
11
13
  import json
@@ -27,7 +29,8 @@ console = Console()
27
29
  @click.option("--fix", is_flag=True, help="Suggest fixes for missing tools")
28
30
  @click.option("--export", type=click.Path(), help="Export diagnostics to JSON file")
29
31
  @click.option("--check", type=str, help="Check specific tool only")
30
- def doctor(verbose: bool, fix: bool, export: str | None, check: str | None) -> None:
32
+ @click.option("--check-commands", is_flag=True, help="Diagnose slash command loading issues")
33
+ def doctor(verbose: bool, fix: bool, export: str | None, check: str | None, check_commands: bool) -> None:
31
34
  """Check system requirements and project health
32
35
 
33
36
  Verifies:
@@ -37,6 +40,11 @@ def doctor(verbose: bool, fix: bool, export: str | None, check: str | None) -> N
37
40
  - Language-specific tool chains (20+ languages)
38
41
  """
39
42
  try:
43
+ # Handle --check-commands option first
44
+ if check_commands:
45
+ _check_slash_commands()
46
+ return
47
+
40
48
  console.print("[cyan]Running system diagnostics...[/cyan]\n")
41
49
 
42
50
  # Run basic environment checks
@@ -182,3 +190,45 @@ def _export_diagnostics(export_path: str, data: dict) -> None:
182
190
  console.print(f"\n[green]✓ Diagnostics exported to {export_path}[/green]")
183
191
  except Exception as e:
184
192
  console.print(f"\n[red]✗ Failed to export diagnostics: {e}[/red]")
193
+
194
+
195
+ def _check_slash_commands() -> None:
196
+ """Check slash command loading issues (helper)"""
197
+ from moai_adk.core.diagnostics.slash_commands import diagnose_slash_commands
198
+
199
+ console.print("[cyan]Running slash command diagnostics...[/cyan]\n")
200
+
201
+ result = diagnose_slash_commands()
202
+
203
+ # Handle error case
204
+ if "error" in result:
205
+ console.print(f"[red]✗ {result['error']}[/red]")
206
+ return
207
+
208
+ # Build results table
209
+ table = Table(show_header=True, header_style="bold magenta")
210
+ table.add_column("Command File", style="dim", width=40)
211
+ table.add_column("Status", justify="center", width=10)
212
+ table.add_column("Issues", style="yellow")
213
+
214
+ for detail in result["details"]:
215
+ icon = "✓" if detail["valid"] else "✗"
216
+ color = "green" if detail["valid"] else "red"
217
+ issues = ", ".join(detail["errors"]) if detail["errors"] else "-"
218
+
219
+ table.add_row(detail["file"], f"[{color}]{icon}[/{color}]", issues)
220
+
221
+ console.print(table)
222
+ console.print()
223
+
224
+ # Summary
225
+ total = result["total_files"]
226
+ valid = result["valid_commands"]
227
+
228
+ if valid == total and total > 0:
229
+ console.print(f"[green]✓ {valid}/{total} command files are valid[/green]")
230
+ elif total == 0:
231
+ console.print("[yellow]⚠ No command files found in .claude/commands/[/yellow]")
232
+ else:
233
+ console.print(f"[yellow]⚠ Only {valid}/{total} command files are valid[/yellow]")
234
+ console.print("[dim]Fix the issues above to enable slash commands[/dim]")
@@ -15,7 +15,6 @@ from typing import Sequence
15
15
  import click
16
16
  from rich.console import Console
17
17
  from rich.progress import BarColumn, Progress, SpinnerColumn, TaskID, TextColumn
18
- from rich.prompt import Confirm
19
18
 
20
19
  from moai_adk import __version__
21
20
  from moai_adk.cli.prompts import prompt_project_setup
@@ -123,9 +123,20 @@ def prompt_project_setup(
123
123
  "Java",
124
124
  "Go",
125
125
  "Rust",
126
+ "Ruby",
126
127
  "Dart",
127
128
  "Swift",
128
129
  "Kotlin",
130
+ "PHP",
131
+ "C#",
132
+ "C",
133
+ "C++",
134
+ "Elixir",
135
+ "Scala",
136
+ "Clojure",
137
+ "Haskell",
138
+ "Lua",
139
+ "OCaml",
129
140
  "Generic",
130
141
  ],
131
142
  ).ask()
@@ -0,0 +1,19 @@
1
+ """Diagnostics module for MoAI-ADK
2
+
3
+ Provides diagnostic tools for:
4
+ - Slash command validation
5
+ - System health checks
6
+ - Environment verification
7
+ """
8
+
9
+ from moai_adk.core.diagnostics.slash_commands import (
10
+ diagnose_slash_commands,
11
+ scan_command_files,
12
+ validate_command_file,
13
+ )
14
+
15
+ __all__ = [
16
+ "diagnose_slash_commands",
17
+ "scan_command_files",
18
+ "validate_command_file",
19
+ ]
@@ -0,0 +1,160 @@
1
+ # @CODE:CLAUDE-COMMANDS-001:DIAGNOSTIC | SPEC: SPEC-CLAUDE-COMMANDS-001.md | TEST: tests/unit/test_slash_commands.py
2
+ """Slash command diagnostics
3
+
4
+ Diagnose and validate Claude Code slash command loading issues.
5
+
6
+ Functions:
7
+ - validate_command_file: Validate YAML front matter and required fields
8
+ - scan_command_files: Recursively scan for .md files
9
+ - diagnose_slash_commands: Comprehensive diagnostic report
10
+ """
11
+
12
+ from pathlib import Path
13
+
14
+ import yaml
15
+
16
+
17
+ def validate_command_file(file_path: Path) -> dict:
18
+ """Validate slash command file format
19
+
20
+ Checks:
21
+ 1. File exists and readable
22
+ 2. YAML front matter present (starts with ---)
23
+ 3. Valid YAML syntax
24
+ 4. Required fields: name, description
25
+
26
+ Args:
27
+ file_path: Path to command file (.md)
28
+
29
+ Returns:
30
+ dict with 'valid' (bool) and optional 'errors' (list[str])
31
+
32
+ Example:
33
+ >>> result = validate_command_file(Path("cmd.md"))
34
+ >>> if result["valid"]:
35
+ ... print("Valid command file")
36
+ ... else:
37
+ ... print(f"Errors: {result['errors']}")
38
+ """
39
+ try:
40
+ # Check file exists
41
+ if not file_path.exists():
42
+ return {"valid": False, "errors": ["File not found"]}
43
+
44
+ # Read file content
45
+ content = file_path.read_text(encoding="utf-8")
46
+
47
+ # Check front matter delimiter
48
+ if not content.startswith("---"):
49
+ return {
50
+ "valid": False,
51
+ "errors": ["Missing YAML front matter (must start with ---)"],
52
+ }
53
+
54
+ # Split by --- delimiter
55
+ parts = content.split("---", 2)
56
+ if len(parts) < 3:
57
+ return {
58
+ "valid": False,
59
+ "errors": ["Invalid front matter format (missing closing ---)"],
60
+ }
61
+
62
+ # Parse YAML
63
+ try:
64
+ metadata = yaml.safe_load(parts[1])
65
+ except yaml.YAMLError as e:
66
+ return {"valid": False, "errors": [f"YAML parsing error: {e}"]}
67
+
68
+ # Check required fields
69
+ required_fields = ["name", "description"]
70
+ missing_fields = [field for field in required_fields if field not in metadata]
71
+
72
+ if missing_fields:
73
+ return {
74
+ "valid": False,
75
+ "errors": [f"Missing required field: {', '.join(missing_fields)}"],
76
+ }
77
+
78
+ return {"valid": True}
79
+
80
+ except Exception as e:
81
+ return {"valid": False, "errors": [str(e)]}
82
+
83
+
84
+ def scan_command_files(commands_dir: Path) -> list[Path]:
85
+ """Scan directory for all .md files
86
+
87
+ Recursively searches for .md files in the given directory.
88
+
89
+ Args:
90
+ commands_dir: Directory to scan (e.g., .claude/commands)
91
+
92
+ Returns:
93
+ List of Path objects for found .md files
94
+
95
+ Example:
96
+ >>> files = scan_command_files(Path(".claude/commands"))
97
+ >>> print(f"Found {len(files)} command files")
98
+ """
99
+ if not commands_dir.exists():
100
+ return []
101
+
102
+ try:
103
+ return list(commands_dir.glob("**/*.md"))
104
+ except Exception:
105
+ return []
106
+
107
+
108
+ def diagnose_slash_commands() -> dict:
109
+ """Diagnose slash command loading issues
110
+
111
+ Comprehensive diagnostic that:
112
+ 1. Checks if .claude/commands directory exists
113
+ 2. Scans for all .md files
114
+ 3. Validates each file's format
115
+ 4. Returns detailed report
116
+
117
+ Returns:
118
+ dict with diagnostic results:
119
+ - total_files: Number of .md files found
120
+ - valid_commands: Number of valid command files
121
+ - details: List of per-file validation results
122
+ OR
123
+ - error: Error message if directory not found
124
+
125
+ Example:
126
+ >>> result = diagnose_slash_commands()
127
+ >>> if "error" in result:
128
+ ... print(f"Error: {result['error']}")
129
+ ... else:
130
+ ... print(f"{result['valid_commands']}/{result['total_files']} valid")
131
+ """
132
+ commands_dir = Path(".claude/commands")
133
+
134
+ # Check if directory exists
135
+ if not commands_dir.exists():
136
+ return {"error": "Commands directory not found"}
137
+
138
+ # Scan for .md files
139
+ md_files = scan_command_files(commands_dir)
140
+
141
+ # Validate each file
142
+ details = []
143
+ for file_path in md_files:
144
+ validation = validate_command_file(file_path)
145
+ details.append(
146
+ {
147
+ "file": str(file_path.relative_to(commands_dir)),
148
+ "valid": validation["valid"],
149
+ "errors": validation.get("errors", []),
150
+ }
151
+ )
152
+
153
+ # Count valid commands
154
+ valid_count = sum(1 for detail in details if detail["valid"])
155
+
156
+ return {
157
+ "total_files": len(md_files),
158
+ "valid_commands": valid_count,
159
+ "details": details,
160
+ }
@@ -305,31 +305,6 @@ class TemplateProcessor:
305
305
  if not silent:
306
306
  console.print(" ✅ .claude/ copy complete (variables substituted)")
307
307
 
308
- def _backup_alfred_folder(self, folder_path: Path, folder_name: str) -> None:
309
- """Backup an Alfred folder before overwriting (safety measure).
310
-
311
- Args:
312
- folder_path: Path to the folder to backup.
313
- folder_name: Name of the folder (e.g., "hooks/alfred").
314
- """
315
- if not folder_path.exists():
316
- return
317
-
318
- # Create backup directory in .moai-backups/.claude-backups/{timestamp}/
319
- backup_base = self.target_path / ".moai-backups" / ".claude-backups"
320
- backup_base.mkdir(parents=True, exist_ok=True)
321
-
322
- # Generate timestamp-based backup directory
323
- from moai_adk.core.project.backup_utils import generate_backup_dir_name
324
-
325
- timestamp = generate_backup_dir_name()
326
- backup_dir = backup_base / timestamp
327
-
328
- # Backup this specific folder
329
- backup_folder = backup_dir / folder_name
330
- backup_folder.parent.mkdir(parents=True, exist_ok=True)
331
- shutil.copytree(folder_path, backup_folder)
332
-
333
308
  def _copy_moai(self, silent: bool = False) -> None:
334
309
  """.moai/ directory copy with variable substitution (excludes protected paths)."""
335
310
  src = self.template_root / ".moai"
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: alfred:2-build
3
- description: 구현할 SPEC ID (예: SPEC-001) 또는 all로 모든 SPEC 구현: 언어별 최적화된 TDD 구현 (Red-Green-Refactor) with SQLite3 tags.db
3
+ description: "구현할 SPEC ID (예: SPEC-001) 또는 all로 모든 SPEC 구현 - 언어별 최적화된 TDD 구현 (Red-Green-Refactor) with SQLite3 tags.db"
4
4
  argument-hint: "SPEC-ID - 구현할 SPEC ID (예: SPEC-001) 또는 all로 모든 SPEC 구현"
5
5
  allowed-tools:
6
6
  - Read
@@ -6,17 +6,6 @@
6
6
  "PYTHON_ENV": "{{PROJECT_MODE}}"
7
7
  },
8
8
  "hooks": {
9
- "SessionStart": [
10
- {
11
- "hooks": [
12
- {
13
- "command": "uv run .claude/hooks/alfred/alfred_hooks.py SessionStart",
14
- "type": "command"
15
- }
16
- ],
17
- "matcher": "*"
18
- }
19
- ],
20
9
  "PreToolUse": [
21
10
  {
22
11
  "hooks": [
@@ -106,6 +106,7 @@ MoAI-ADK는 Anthropic의 "Effective Context Engineering for AI Agents" 원칙을
106
106
  - **Java**: JUnit + SPEC 어노테이션 (행동 주도 테스트)
107
107
  - **Go**: go test + SPEC 테이블 주도 테스트 (인터페이스 준수)
108
108
  - **Rust**: cargo test + SPEC 문서 테스트 (trait 검증)
109
+ - **Ruby**: RSpec + SPEC 기반 BDD 테스트 (행동 명세 우선)
109
110
 
110
111
  각 테스트는 @TEST:ID → @CODE:ID 참조를 통해 특정 SPEC 요구사항과 연결한다.
111
112
 
@@ -125,6 +126,7 @@ MoAI-ADK는 Anthropic의 "Effective Context Engineering for AI Agents" 원칙을
125
126
  - **Java**: SPEC 구성요소 구현 클래스 + 강한 타이핑
126
127
  - **Go**: SPEC 요구사항 충족 인터페이스 + gofmt
127
128
  - **Rust**: SPEC 안전 요구사항을 구현하는 타입 + rustfmt
129
+ - **Ruby**: SPEC 행동을 반영하는 duck typing + RuboCop 검증
128
130
 
129
131
  모든 코드 요소는 @TAG 주석을 통해 SPEC까지 추적 가능하다.
130
132
 
@@ -320,6 +322,7 @@ rg "### v[0-9]" .moai/specs/SPEC-AUTH-001.md | head -3
320
322
  - **Java**: JUnit (테스트), Maven/Gradle (빌드)
321
323
  - **Go**: go test (테스트), gofmt (포맷)
322
324
  - **Rust**: cargo test (테스트), rustfmt (포맷)
325
+ - **Ruby**: RSpec (테스트), RuboCop (린터+포맷), Bundler (패키지 관리)
323
326
 
324
327
  ## 변수 역할 참고
325
328
 
@@ -461,7 +461,7 @@ def handle_pre_tool_use(payload):
461
461
  - **SPEC-First**: 명세 없이는 코드 없음
462
462
  - **TDD-First**: 테스트 없이는 구현 없음
463
463
  - **GitFlow 지원**: Git 작업 자동화, Living Document 동기화, @TAG 추적성
464
- - **다중 언어 지원**: Python, TypeScript, Java, Go, Rust, Dart, Swift, Kotlin 등 모든 주요 언어
464
+ - **다중 언어 지원**: Python, TypeScript, Java, Go, Rust, Ruby, Dart, Swift, Kotlin 등 20개 주요 언어
465
465
  - **모바일 지원**: Flutter, React Native, iOS (Swift), Android (Kotlin)
466
466
  - **CODE-FIRST @TAG**: 코드 직접 스캔 방식 (중간 캐시 없음)
467
467
 
@@ -1,77 +0,0 @@
1
- # @CODE:CLI-001 | SPEC: SPEC-CLI-001.md | TEST: tests/unit/test_cli_commands.py
2
- """MoAI-ADK restore command
3
-
4
- Backup restore command:
5
- - Locate backups in .moai-backups/{timestamp}/ directory
6
- - Restore the specified timestamp or the latest backup
7
- - Confirm before performing the restore
8
- """
9
-
10
- from pathlib import Path
11
-
12
- import click
13
- from rich.console import Console
14
-
15
- console = Console()
16
-
17
-
18
- @click.command()
19
- @click.option(
20
- "--timestamp",
21
- help="Specific backup timestamp to restore (format: YYYY-MM-DD-HHMMSS)",
22
- )
23
- def restore(timestamp: str | None) -> None:
24
- """Restore from backup
25
-
26
- Args:
27
- timestamp: Optional specific backup timestamp
28
-
29
- Examples:
30
- python -m moai_adk restore # Restore from latest backup
31
- python -m moai_adk restore --timestamp 2025-10-13-120000 # Restore specific backup
32
- """
33
- try:
34
- project_root = Path.cwd()
35
- backup_dir = project_root / ".moai-backups"
36
-
37
- # Find all timestamp directories in .moai-backups/
38
- if not backup_dir.exists():
39
- console.print("[yellow]⚠ No backup directory found[/yellow]")
40
- console.print("[dim]Backups are stored in .moai-backups/{timestamp}/[/dim]")
41
- raise click.Abort()
42
-
43
- backup_dirs = sorted(
44
- [d for d in backup_dir.iterdir() if d.is_dir()],
45
- key=lambda x: x.name,
46
- reverse=True
47
- )
48
-
49
- if not backup_dirs:
50
- console.print("[yellow]⚠ No backup directories found[/yellow]")
51
- console.print("[dim]Backups are stored in .moai-backups/{timestamp}/[/dim]")
52
- raise click.Abort()
53
-
54
- # When a timestamp is provided, find the matching backup
55
- if timestamp:
56
- console.print(f"[cyan]Restoring from {timestamp}...[/cyan]")
57
- matching = [d for d in backup_dirs if timestamp in d.name]
58
- if not matching:
59
- console.print(f"[red]✗ Backup not found for timestamp: {timestamp}[/red]")
60
- raise click.Abort()
61
- backup_path = matching[0]
62
- else:
63
- console.print("[cyan]Restoring from latest backup...[/cyan]")
64
- backup_path = backup_dirs[0]
65
-
66
- # Placeholder for the future restore implementation
67
- console.print(f"[dim] └─ Backup: {backup_path.name}[/dim]")
68
- console.print("[green]✓ Restore completed[/green]")
69
-
70
- console.print("\n[yellow]Note:[/yellow] Restore functionality is not yet implemented")
71
- console.print("[dim]This will be added in a future release[/dim]")
72
-
73
- except click.Abort:
74
- raise
75
- except Exception as e:
76
- console.print(f"[red]✗ Restore failed: {e}[/red]")
77
- raise
File without changes
File without changes
File without changes