moai-adk 0.3.13__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 (141) hide show
  1. moai_adk/__init__.py +1 -1
  2. moai_adk/__main__.py +1 -1
  3. moai_adk/cli/commands/__init__.py +1 -1
  4. moai_adk/cli/commands/doctor.py +2 -2
  5. moai_adk/cli/commands/init.py +10 -5
  6. moai_adk/cli/commands/status.py +1 -1
  7. moai_adk/cli/commands/update.py +210 -8
  8. moai_adk/cli/prompts/init_prompts.py +15 -19
  9. moai_adk/core/__init__.py +1 -1
  10. moai_adk/core/diagnostics/slash_commands.py +1 -1
  11. moai_adk/core/git/branch.py +1 -1
  12. moai_adk/core/git/manager.py +1 -1
  13. moai_adk/core/project/backup_utils.py +1 -0
  14. moai_adk/core/project/phase_executor.py +3 -1
  15. moai_adk/core/project/validator.py +3 -2
  16. moai_adk/core/quality/__init__.py +1 -1
  17. moai_adk/core/quality/trust_checker.py +1 -1
  18. moai_adk/core/quality/validators/__init__.py +1 -1
  19. moai_adk/core/quality/validators/base_validator.py +1 -1
  20. moai_adk/core/template/__init__.py +1 -1
  21. moai_adk/core/template/backup.py +12 -3
  22. moai_adk/core/template/config.py +24 -0
  23. moai_adk/core/template/languages.py +1 -1
  24. moai_adk/core/template/merger.py +74 -4
  25. moai_adk/core/template/processor.py +62 -14
  26. moai_adk/templates/.claude/agents/alfred/cc-manager.md +765 -191
  27. moai_adk/templates/.claude/agents/alfred/debug-helper.md +116 -103
  28. moai_adk/templates/.claude/agents/alfred/doc-syncer.md +130 -116
  29. moai_adk/templates/.claude/agents/alfred/git-manager.md +186 -174
  30. moai_adk/templates/.claude/agents/alfred/implementation-planner.md +227 -213
  31. moai_adk/templates/.claude/agents/alfred/project-manager.md +205 -125
  32. moai_adk/templates/.claude/agents/alfred/quality-gate.md +224 -209
  33. moai_adk/templates/.claude/agents/alfred/spec-builder.md +174 -160
  34. moai_adk/templates/.claude/agents/alfred/tag-agent.md +151 -139
  35. moai_adk/templates/.claude/agents/alfred/tdd-implementer.md +209 -196
  36. moai_adk/templates/.claude/agents/alfred/trust-checker.md +247 -233
  37. moai_adk/templates/.claude/commands/alfred/0-project.md +856 -355
  38. moai_adk/templates/.claude/commands/alfred/1-plan.md +572 -0
  39. moai_adk/templates/.claude/commands/alfred/2-run.md +470 -0
  40. moai_adk/templates/.claude/commands/alfred/3-sync.md +366 -356
  41. moai_adk/templates/.claude/hooks/alfred/README.md +52 -52
  42. moai_adk/templates/.claude/hooks/alfred/alfred_hooks.py +44 -48
  43. moai_adk/templates/.claude/hooks/alfred/core/__init__.py +17 -17
  44. moai_adk/templates/.claude/hooks/alfred/core/checkpoint.py +59 -59
  45. moai_adk/templates/.claude/hooks/alfred/core/context.py +19 -19
  46. moai_adk/templates/.claude/hooks/alfred/core/project.py +52 -52
  47. moai_adk/templates/.claude/hooks/alfred/handlers/__init__.py +1 -1
  48. moai_adk/templates/.claude/hooks/alfred/handlers/notification.py +4 -4
  49. moai_adk/templates/.claude/hooks/alfred/handlers/session.py +30 -51
  50. moai_adk/templates/.claude/hooks/alfred/handlers/tool.py +16 -17
  51. moai_adk/templates/.claude/hooks/alfred/handlers/user.py +11 -11
  52. moai_adk/templates/.claude/output-styles/alfred/agentic-coding.md +308 -307
  53. moai_adk/templates/.claude/output-styles/alfred/moai-adk-learning.md +297 -296
  54. moai_adk/templates/.claude/output-styles/alfred/study-with-alfred.md +191 -190
  55. moai_adk/templates/.claude/skills/moai-alfred-code-reviewer/SKILL.md +112 -0
  56. moai_adk/templates/.claude/skills/moai-alfred-debugger-pro/SKILL.md +103 -0
  57. moai_adk/templates/.claude/skills/moai-alfred-ears-authoring/SKILL.md +103 -0
  58. moai_adk/templates/.claude/skills/moai-alfred-git-workflow/SKILL.md +95 -0
  59. moai_adk/templates/.claude/skills/moai-alfred-language-detection/SKILL.md +99 -0
  60. moai_adk/templates/.claude/skills/moai-alfred-performance-optimizer/SKILL.md +105 -0
  61. moai_adk/templates/.claude/skills/moai-alfred-refactoring-coach/SKILL.md +97 -0
  62. moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-validation/SKILL.md +97 -0
  63. moai_adk/templates/.claude/skills/moai-alfred-tag-scanning/SKILL.md +90 -0
  64. moai_adk/templates/.claude/skills/moai-alfred-trust-validation/SKILL.md +99 -0
  65. moai_adk/templates/.claude/skills/moai-alfred-tui-survey/SKILL.md +87 -0
  66. moai_adk/templates/.claude/skills/moai-alfred-tui-survey/examples.md +62 -0
  67. moai_adk/templates/.claude/skills/moai-claude-code/SKILL.md +94 -0
  68. moai_adk/templates/.claude/skills/moai-claude-code/examples.md +513 -0
  69. moai_adk/templates/.claude/skills/moai-claude-code/reference.md +433 -0
  70. moai_adk/templates/.claude/skills/moai-claude-code/templates/agent-full.md +332 -0
  71. moai_adk/templates/.claude/skills/moai-claude-code/templates/command-full.md +384 -0
  72. moai_adk/templates/.claude/skills/moai-claude-code/templates/plugin-full.json +363 -0
  73. moai_adk/templates/.claude/skills/moai-claude-code/templates/settings-full.json +595 -0
  74. moai_adk/templates/.claude/skills/moai-claude-code/templates/skill-full.md +496 -0
  75. moai_adk/templates/.claude/skills/moai-domain-backend/SKILL.md +99 -0
  76. moai_adk/templates/.claude/skills/moai-domain-cli-tool/SKILL.md +95 -0
  77. moai_adk/templates/.claude/skills/moai-domain-data-science/SKILL.md +98 -0
  78. moai_adk/templates/.claude/skills/moai-domain-database/SKILL.md +100 -0
  79. moai_adk/templates/.claude/skills/moai-domain-devops/SKILL.md +100 -0
  80. moai_adk/templates/.claude/skills/moai-domain-frontend/SKILL.md +99 -0
  81. moai_adk/templates/.claude/skills/moai-domain-ml/SKILL.md +99 -0
  82. moai_adk/templates/.claude/skills/moai-domain-mobile-app/SKILL.md +93 -0
  83. moai_adk/templates/.claude/skills/moai-domain-security/SKILL.md +105 -0
  84. moai_adk/templates/.claude/skills/moai-domain-web-api/SKILL.md +97 -0
  85. moai_adk/templates/.claude/skills/moai-essentials-debug/SKILL.md +102 -0
  86. moai_adk/templates/.claude/skills/moai-essentials-perf/SKILL.md +104 -0
  87. moai_adk/templates/.claude/skills/moai-essentials-refactor/SKILL.md +96 -0
  88. moai_adk/templates/.claude/skills/moai-essentials-review/SKILL.md +112 -0
  89. moai_adk/templates/.claude/skills/moai-foundation-ears/SKILL.md +98 -0
  90. moai_adk/templates/.claude/skills/moai-foundation-git/SKILL.md +90 -0
  91. moai_adk/templates/.claude/skills/moai-foundation-langs/SKILL.md +94 -0
  92. moai_adk/templates/.claude/skills/moai-foundation-specs/SKILL.md +93 -0
  93. moai_adk/templates/.claude/skills/moai-foundation-tags/SKILL.md +86 -0
  94. moai_adk/templates/.claude/skills/moai-foundation-trust/SKILL.md +86 -0
  95. moai_adk/templates/.claude/skills/moai-lang-c/SKILL.md +100 -0
  96. moai_adk/templates/.claude/skills/moai-lang-clojure/SKILL.md +100 -0
  97. moai_adk/templates/.claude/skills/moai-lang-cpp/SKILL.md +102 -0
  98. moai_adk/templates/.claude/skills/moai-lang-csharp/SKILL.md +100 -0
  99. moai_adk/templates/.claude/skills/moai-lang-dart/SKILL.md +98 -0
  100. moai_adk/templates/.claude/skills/moai-lang-elixir/SKILL.md +99 -0
  101. moai_adk/templates/.claude/skills/moai-lang-go/SKILL.md +100 -0
  102. moai_adk/templates/.claude/skills/moai-lang-haskell/SKILL.md +100 -0
  103. moai_adk/templates/.claude/skills/moai-lang-java/SKILL.md +98 -0
  104. moai_adk/templates/.claude/skills/moai-lang-javascript/SKILL.md +96 -0
  105. moai_adk/templates/.claude/skills/moai-lang-julia/SKILL.md +98 -0
  106. moai_adk/templates/.claude/skills/moai-lang-kotlin/SKILL.md +99 -0
  107. moai_adk/templates/.claude/skills/moai-lang-lua/SKILL.md +98 -0
  108. moai_adk/templates/.claude/skills/moai-lang-php/SKILL.md +98 -0
  109. moai_adk/templates/.claude/skills/moai-lang-python/SKILL.md +96 -0
  110. moai_adk/templates/.claude/skills/moai-lang-r/SKILL.md +99 -0
  111. moai_adk/templates/.claude/skills/moai-lang-ruby/SKILL.md +99 -0
  112. moai_adk/templates/.claude/skills/moai-lang-rust/SKILL.md +100 -0
  113. moai_adk/templates/.claude/skills/moai-lang-scala/SKILL.md +100 -0
  114. moai_adk/templates/.claude/skills/moai-lang-shell/SKILL.md +100 -0
  115. moai_adk/templates/.claude/skills/moai-lang-sql/SKILL.md +100 -0
  116. moai_adk/templates/.claude/skills/moai-lang-swift/SKILL.md +99 -0
  117. moai_adk/templates/.claude/skills/moai-lang-typescript/SKILL.md +96 -0
  118. moai_adk/templates/.github/PULL_REQUEST_TEMPLATE.md +44 -43
  119. moai_adk/templates/.github/workflows/moai-gitflow.yml +36 -35
  120. moai_adk/templates/.moai/config.json +9 -6
  121. moai_adk/templates/.moai/memory/development-guide.md +220 -221
  122. moai_adk/templates/.moai/memory/gitflow-protection-policy.md +85 -85
  123. moai_adk/templates/.moai/memory/spec-metadata.md +149 -150
  124. moai_adk/templates/.moai/project/product.md +90 -90
  125. moai_adk/templates/.moai/project/structure.md +85 -85
  126. moai_adk/templates/.moai/project/tech.md +117 -117
  127. moai_adk/templates/CLAUDE.md +354 -573
  128. moai_adk/templates/__init__.py +1 -1
  129. moai_adk/utils/__init__.py +1 -1
  130. moai_adk/utils/banner.py +7 -7
  131. moai_adk/utils/logger.py +1 -1
  132. moai_adk-0.4.1.dist-info/METADATA +303 -0
  133. moai_adk-0.4.1.dist-info/RECORD +152 -0
  134. moai_adk/templates/.claude/commands/alfred/1-spec.md +0 -532
  135. moai_adk/templates/.claude/commands/alfred/2-build.md +0 -432
  136. moai_adk/templates/.moai/hooks/pre-push.sample +0 -88
  137. moai_adk-0.3.13.dist-info/METADATA +0 -1586
  138. moai_adk-0.3.13.dist-info/RECORD +0 -90
  139. {moai_adk-0.3.13.dist-info → moai_adk-0.4.1.dist-info}/WHEEL +0 -0
  140. {moai_adk-0.3.13.dist-info → moai_adk-0.4.1.dist-info}/entry_points.txt +0 -0
  141. {moai_adk-0.3.13.dist-info → moai_adk-0.4.1.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,100 @@
1
+ ---
2
+
3
+ name: moai-lang-rust
4
+ description: Rust best practices with cargo test, clippy, rustfmt, and ownership/borrow checker mastery. Use when writing or reviewing Rust code in project workflows.
5
+ allowed-tools:
6
+ - Read
7
+ - Bash
8
+ ---
9
+
10
+ # Rust Expert
11
+
12
+ ## Skill Metadata
13
+ | Field | Value |
14
+ | ----- | ----- |
15
+ | Allowed tools | Read (read_file), Bash (terminal) |
16
+ | Auto-load | On demand when language keywords are detected |
17
+ | Trigger cues | Rust code discussions, framework guidance, or file extensions such as .rs. |
18
+ | Tier | 3 |
19
+
20
+ ## What it does
21
+
22
+ Provides Rust-specific expertise for TDD development, including cargo test, clippy linting, rustfmt formatting, and ownership/borrow checker compliance.
23
+
24
+ ## When to use
25
+
26
+ - Engages when the conversation references Rust work, frameworks, or files like .rs.
27
+ - “Writing Rust tests”, “How to use cargo tests”, “Ownership rules”
28
+ - Automatically invoked when working with Rust projects
29
+ - Rust SPEC implementation (`/alfred:2-run`)
30
+
31
+ ## How it works
32
+
33
+ **TDD Framework**:
34
+ - **cargo test**: Built-in test framework
35
+ - **proptest**: Property-based testing
36
+ - **criterion**: Benchmarking
37
+ - Test coverage with `cargo tarpaulin` or `cargo llvm-cov`
38
+
39
+ **Code Quality**:
40
+ - **clippy**: Rust linter with 500+ lint rules
41
+ - **rustfmt**: Automatic code formatting
42
+ - **cargo check**: Fast compilation check
43
+ - **cargo audit**: Security vulnerability scanning
44
+
45
+ **Memory Safety**:
46
+ - **Ownership**: One owner per value
47
+ - **Borrowing**: Immutable (&T) or mutable (&mut T) references
48
+ - **Lifetimes**: Explicit lifetime annotations when needed
49
+ - **Move semantics**: Understanding Copy vs Clone
50
+
51
+ **Rust Patterns**:
52
+ - Result<T, E> for error handling (no exceptions)
53
+ - Option<T> for nullable values
54
+ - Traits for polymorphism
55
+ - Match expressions for exhaustive handling
56
+
57
+ **Best Practices**:
58
+ - File ≤300 LOC, function ≤50 LOC
59
+ - Prefer immutable bindings (let vs let mut)
60
+ - Use iterators over manual loops
61
+ - Avoid `unwrap()` in production code, use proper error handling
62
+
63
+ ## Examples
64
+ ```bash
65
+ cargo test && cargo clippy -- -D warnings
66
+ ```
67
+
68
+ ## Inputs
69
+ - Language-specific source directories (e.g. `src/`, `app/`).
70
+ - Language-specific build/test configuration files (e.g. `package.json`, `pyproject.toml`, `go.mod`).
71
+ - Relevant test suites and sample data.
72
+
73
+ ## Outputs
74
+ - Test/lint execution plan tailored to the selected language.
75
+ - List of key language idioms and review checkpoints.
76
+
77
+ ## Failure Modes
78
+ - When the language runtime or package manager is not installed.
79
+ - When the main language cannot be determined in a multilingual project.
80
+
81
+ ## Dependencies
82
+ - Access to the project file is required using the Read/Grep tool.
83
+ - When used with `Skill("moai-foundation-langs")`, it is easy to share cross-language conventions.
84
+
85
+ ## References
86
+ - Rust Project Developers. "The Rust Programming Language." https://doc.rust-lang.org/book/ (accessed 2025-03-29).
87
+ - Rust Project Developers. "Clippy." https://doc.rust-lang.org/clippy/ (accessed 2025-03-29).
88
+
89
+ ## Changelog
90
+ - 2025-03-29: Input/output/failure response/reference information for each language has been specified.
91
+
92
+ ## Works well with
93
+
94
+ - alfred-trust-validation (coverage verification)
95
+ - alfred-code-reviewer (Rust-specific review)
96
+ - alfred-performance-optimizer (Rust benchmarking)
97
+
98
+ ## Best Practices
99
+ - Enable automatic validation by matching your linter with the language's official style guide.
100
+ - Fix test/build pipelines with reproducible commands in CI.
@@ -0,0 +1,100 @@
1
+ ---
2
+
3
+ name: moai-lang-scala
4
+ description: Scala best practices with ScalaTest, sbt, and functional programming patterns. Use when writing or reviewing Scala code in project workflows.
5
+ allowed-tools:
6
+ - Read
7
+ - Bash
8
+ ---
9
+
10
+ # Scala Expert
11
+
12
+ ## Skill Metadata
13
+ | Field | Value |
14
+ | ----- | ----- |
15
+ | Allowed tools | Read (read_file), Bash (terminal) |
16
+ | Auto-load | On demand when language keywords are detected |
17
+ | Trigger cues | Scala code discussions, framework guidance, or file extensions such as .scala. |
18
+ | Tier | 3 |
19
+
20
+ ## What it does
21
+
22
+ Provides Scala-specific expertise for TDD development, including ScalaTest framework, sbt build tool, and functional programming patterns.
23
+
24
+ ## When to use
25
+
26
+ - Engages when the conversation references Scala work, frameworks, or files like .scala.
27
+ - “Writing Scala tests”, “How to use ScalaTest”, “Functional programming”
28
+ - Automatically invoked when working with Scala projects
29
+ - Scala SPEC implementation (`/alfred:2-run`)
30
+
31
+ ## How it works
32
+
33
+ **TDD Framework**:
34
+ - **ScalaTest**: Flexible testing framework
35
+ - **specs2**: BDD-style testing
36
+ - **ScalaCheck**: Property-based testing
37
+ - Test coverage with sbt-scoverage
38
+
39
+ **Build Tools**:
40
+ - **sbt**: Scala build tool
41
+ - **build.sbt**: Build configuration
42
+ - Multi-project builds
43
+
44
+ **Code Quality**:
45
+ - **Scalafmt**: Code formatting
46
+ - **Scalafix**: Linting and refactoring
47
+ - **WartRemover**: Code linting
48
+
49
+ **Functional Programming**:
50
+ - **Immutable data structures**
51
+ - **Higher-order functions**
52
+ - **Pattern matching**
53
+ - **For-comprehensions**
54
+ - **Monads (Option, Either, Try)**
55
+
56
+ **Best Practices**:
57
+ - File ≤300 LOC, method ≤50 LOC
58
+ - Prefer immutable vals over mutable vars
59
+ - Case classes for data modeling
60
+ - Tail recursion for loops
61
+ - Avoid null, use Option
62
+
63
+ ## Examples
64
+ ```bash
65
+ sbt test && sbt scalafmtCheck
66
+ ```
67
+
68
+ ## Inputs
69
+ - Language-specific source directories (e.g. `src/`, `app/`).
70
+ - Language-specific build/test configuration files (e.g. `package.json`, `pyproject.toml`, `go.mod`).
71
+ - Relevant test suites and sample data.
72
+
73
+ ## Outputs
74
+ - Test/lint execution plan tailored to the selected language.
75
+ - List of key language idioms and review checkpoints.
76
+
77
+ ## Failure Modes
78
+ - When the language runtime or package manager is not installed.
79
+ - When the main language cannot be determined in a multilingual project.
80
+
81
+ ## Dependencies
82
+ - Access to the project file is required using the Read/Grep tool.
83
+ - When used with `Skill("moai-foundation-langs")`, it is easy to share cross-language conventions.
84
+
85
+ ## References
86
+ - Lightbend. "Scala Documentation." https://docs.scala-lang.org/ (accessed 2025-03-29).
87
+ - Scalameta. "scalafmt." https://scalameta.org/scalafmt/ (accessed 2025-03-29).
88
+
89
+ ## Changelog
90
+ - 2025-03-29: Input/output/failure response/reference information for each language has been specified.
91
+
92
+ ## Works well with
93
+
94
+ - alfred-trust-validation (coverage verification)
95
+ - alfred-code-reviewer (Scala-specific review)
96
+ - alfred-refactoring-coach (functional refactoring)
97
+
98
+ ## Best Practices
99
+ - Enable automatic validation by matching your linter with the language's official style guide.
100
+ - Fix test/build pipelines with reproducible commands in CI.
@@ -0,0 +1,100 @@
1
+ ---
2
+
3
+ name: moai-lang-shell
4
+ description: Shell scripting best practices with bats, shellcheck, and POSIX compliance. Use when writing or reviewing Shell scripts code in project workflows.
5
+ allowed-tools:
6
+ - Read
7
+ - Bash
8
+ ---
9
+
10
+ # Shell Expert
11
+
12
+ ## Skill Metadata
13
+ | Field | Value |
14
+ | ----- | ----- |
15
+ | Allowed tools | Read (read_file), Bash (terminal) |
16
+ | Auto-load | On demand when language keywords are detected |
17
+ | Trigger cues | Shell code discussions, framework guidance, or file extensions such as .sh/.bash. |
18
+ | Tier | 3 |
19
+
20
+ ## What it does
21
+
22
+ Provides shell scripting expertise for TDD development, including bats testing framework, shellcheck linting, and POSIX compliance for portable scripts.
23
+
24
+ ## When to use
25
+
26
+ - Engages when the conversation references Shell work, frameworks, or files like .sh/.bash.
27
+ - "Writing shell scripts", "bats testing", "POSIX compatibility"
28
+ - Automatically invoked when working with shell script projects
29
+ - Shell SPEC implementation (`/alfred:2-run`)
30
+
31
+ ## How it works
32
+
33
+ **TDD Framework**:
34
+ - **bats**: Bash Automated Testing System
35
+ - **shunit2**: xUnit-style shell testing
36
+ - **assert.sh**: Shell assertion library
37
+ - Test-driven shell development
38
+
39
+ **Code Quality**:
40
+ - **shellcheck**: Static analysis for shell scripts
41
+ - **shfmt**: Shell script formatting
42
+ - **bashate**: Style checker
43
+
44
+ **POSIX Compliance**:
45
+ - Portable shell features (sh vs bash)
46
+ - Avoid bashisms for portability
47
+ - Use `[ ]` instead of `[[ ]]` for POSIX
48
+ - Standard utilities (no GNU extensions)
49
+
50
+ **Shell Patterns**:
51
+ - **Error handling**: set -e, set -u, set -o pipefail
52
+ - **Exit codes**: Proper use of 0 (success) and non-zero
53
+ - **Quoting**: Always quote variables ("$var")
54
+ - **Functions**: Modular script organization
55
+
56
+ **Best Practices**:
57
+ - File ≤300 LOC, function ≤50 LOC
58
+ - Use `#!/bin/sh` for POSIX, `#!/bin/bash` for Bash
59
+ - Check command existence with `command -v`
60
+ - Use `$()` over backticks
61
+ - Validate input arguments
62
+
63
+ ## Examples
64
+ ```bash
65
+ bats tests && shellcheck scripts/*.sh
66
+ ```
67
+
68
+ ## Inputs
69
+ - Language-specific source directories (e.g. `src/`, `app/`).
70
+ - Language-specific build/test configuration files (e.g. `package.json`, `pyproject.toml`, `go.mod`).
71
+ - Relevant test suites and sample data.
72
+
73
+ ## Outputs
74
+ - Test/lint execution plan tailored to the selected language.
75
+ - List of key language idioms and review checkpoints.
76
+
77
+ ## Failure Modes
78
+ - When the language runtime or package manager is not installed.
79
+ - When the main language cannot be determined in a multilingual project.
80
+
81
+ ## Dependencies
82
+ - Access to the project file is required using the Read/Grep tool.
83
+ - When used with `Skill("moai-foundation-langs")`, it is easy to share cross-language conventions.
84
+
85
+ ## References
86
+ - GNU. "Bash Reference Manual." https://www.gnu.org/software/bash/manual/bash.html (accessed 2025-03-29).
87
+ - koalaman. "ShellCheck." https://www.shellcheck.net/ (accessed 2025-03-29).
88
+
89
+ ## Changelog
90
+ - 2025-03-29: Input/output/failure response/reference information for each language has been specified.
91
+
92
+ ## Works well with
93
+
94
+ - alfred-trust-validation (coverage verification)
95
+ - alfred-code-reviewer (Shell-specific review)
96
+ - devops-expert (Deployment scripts)
97
+
98
+ ## Best Practices
99
+ - Enable automatic validation by matching your linter with the language's official style guide.
100
+ - Fix test/build pipelines with reproducible commands in CI.
@@ -0,0 +1,100 @@
1
+ ---
2
+
3
+ name: moai-lang-sql
4
+ description: SQL best practices with testing frameworks, query optimization, and migration management. Use when writing or reviewing SQL code in project workflows.
5
+ allowed-tools:
6
+ - Read
7
+ - Bash
8
+ ---
9
+
10
+ # SQL Expert
11
+
12
+ ## Skill Metadata
13
+ | Field | Value |
14
+ | ----- | ----- |
15
+ | Allowed tools | Read (read_file), Bash (terminal) |
16
+ | Auto-load | On demand when language keywords are detected |
17
+ | Trigger cues | SQL code discussions, framework guidance, or file extensions such as .sql. |
18
+ | Tier | 3 |
19
+
20
+ ## What it does
21
+
22
+ Provides SQL-specific expertise for database development, including SQL testing strategies, query optimization techniques, and migration management best practices.
23
+
24
+ ## When to use
25
+
26
+ - Engages when the conversation references SQL work, frameworks, or files like .sql.
27
+ - “Writing SQL tests”, “Query optimization”, “Migration management”
28
+ - Automatically invoked when working with database projects
29
+ - SQL SPEC implementation (`/alfred:2-run`)
30
+
31
+ ## How it works
32
+
33
+ **Testing Strategies**:
34
+ - **pgTAP**: PostgreSQL testing framework
35
+ - **DbUnit**: Database testing for JVM
36
+ - **SQLTest**: SQL unit testing
37
+ - Integration tests with test databases
38
+
39
+ **Query Optimization**:
40
+ - **EXPLAIN/EXPLAIN ANALYZE**: Execution plan analysis
41
+ - **Index optimization**: B-tree, Hash, GiST indices
42
+ - **Query rewriting**: JOIN optimization
43
+ - **Avoiding N+1 queries**: Eager loading
44
+
45
+ **Migration Management**:
46
+ - **Flyway**: Version-based migrations
47
+ - **Liquibase**: Changelog-based migrations
48
+ - **Alembic**: Python database migrations
49
+ - **Rails migrations**: Ruby on Rails approach
50
+
51
+ **SQL Best Practices**:
52
+ - **Normalization**: 3NF compliance
53
+ - **Constraints**: Foreign keys, NOT NULL, CHECK
54
+ - **Transactions**: ACID properties
55
+ - **Prepared statements**: SQL injection prevention
56
+
57
+ **Database Patterns**:
58
+ - Use CTEs (Common Table Expressions) for readability
59
+ - Window functions over self-joins
60
+ - Avoid SELECT * in production code
61
+ - Use parameterized queries
62
+
63
+ ## Examples
64
+ ```bash
65
+ sqlfluff lint sql/ && sqlfluff fix sql/
66
+ ```
67
+
68
+ ## Inputs
69
+ - Language-specific source directories (e.g. `src/`, `app/`).
70
+ - Language-specific build/test configuration files (e.g. `package.json`, `pyproject.toml`, `go.mod`).
71
+ - Relevant test suites and sample data.
72
+
73
+ ## Outputs
74
+ - Test/lint execution plan tailored to the selected language.
75
+ - List of key language idioms and review checkpoints.
76
+
77
+ ## Failure Modes
78
+ - When the language runtime or package manager is not installed.
79
+ - When the main language cannot be determined in a multilingual project.
80
+
81
+ ## Dependencies
82
+ - Access to the project file is required using the Read/Grep tool.
83
+ - When used with `Skill("moai-foundation-langs")`, it is easy to share cross-language conventions.
84
+
85
+ ## References
86
+ - PostgreSQL Global Development Group. "PostgreSQL Documentation." https://www.postgresql.org/docs/ (accessed 2025-03-29).
87
+ - SQLFluff. "SQLFluff Documentation." https://docs.sqlfluff.com/en/stable/ (accessed 2025-03-29).
88
+
89
+ ## Changelog
90
+ - 2025-03-29: Input/output/failure response/reference information for each language has been specified.
91
+
92
+ ## Works well with
93
+
94
+ - alfred-trust-validation (migration validation)
95
+ - alfred-code-reviewer (SQL review)
96
+ - database-expert (database design)
97
+
98
+ ## Best Practices
99
+ - Enable automatic validation by matching your linter with the language's official style guide.
100
+ - Fix test/build pipelines with reproducible commands in CI.
@@ -0,0 +1,99 @@
1
+ ---
2
+
3
+ name: moai-lang-swift
4
+ description: Swift best practices with XCTest, SwiftLint, and iOS/macOS development patterns. Use when writing or reviewing Swift code in project workflows.
5
+ allowed-tools:
6
+ - Read
7
+ - Bash
8
+ ---
9
+
10
+ # Swift Expert
11
+
12
+ ## Skill Metadata
13
+ | Field | Value |
14
+ | ----- | ----- |
15
+ | Allowed tools | Read (read_file), Bash (terminal) |
16
+ | Auto-load | On demand when language keywords are detected |
17
+ | Trigger cues | Swift code discussions, framework guidance, or file extensions such as .swift. |
18
+ | Tier | 3 |
19
+
20
+ ## What it does
21
+
22
+ Provides Swift-specific expertise for TDD development, including XCTest framework, SwiftLint linting, Swift Package Manager, and iOS/macOS platform patterns.
23
+
24
+ ## When to use
25
+
26
+ - Engages when the conversation references Swift work, frameworks, or files like .swift.
27
+ - “Writing Swift tests”, “How to use XCTest”, “iOS patterns”
28
+ - Automatically invoked when working with Swift/iOS projects
29
+ - Swift SPEC implementation (`/alfred:2-run`)
30
+
31
+ ## How it works
32
+
33
+ **TDD Framework**:
34
+ - **XCTest**: Apple's native testing framework
35
+ - **Quick/Nimble**: BDD-style testing (alternative)
36
+ - **XCUITest**: UI testing for iOS/macOS apps
37
+ - Test coverage with Xcode Code Coverage
38
+
39
+ **Code Quality**:
40
+ - **SwiftLint**: Swift linter and style checker
41
+ - **SwiftFormat**: Code formatting tool
42
+ - **Xcode Analyzer**: Static code analysis
43
+
44
+ **Package Management**:
45
+ - **Swift Package Manager (SPM)**: Dependency management
46
+ - **CocoaPods**: Alternative package manager (legacy)
47
+ - **Carthage**: Decentralized dependency manager
48
+
49
+ **Swift Patterns**:
50
+ - **Optionals**: Safe handling of nil values (?, !)
51
+ - **Guard statements**: Early exit patterns
52
+ - **Protocol-oriented programming**: Protocols over inheritance
53
+ - **Value types**: Prefer structs over classes
54
+ - **Closures**: First-class functions
55
+
56
+ **iOS/macOS Patterns**:
57
+ - **SwiftUI**: Declarative UI framework
58
+ - **Combine**: Reactive programming
59
+ - **UIKit/AppKit**: Traditional UI frameworks
60
+ - **MVVM/MVC**: Architecture patterns
61
+
62
+ ## Examples
63
+ ```bash
64
+ swift test && swift-format --lint --recursive Sources
65
+ ```
66
+
67
+ ## Inputs
68
+ - Language-specific source directories (e.g. `src/`, `app/`).
69
+ - Language-specific build/test configuration files (e.g. `package.json`, `pyproject.toml`, `go.mod`).
70
+ - Relevant test suites and sample data.
71
+
72
+ ## Outputs
73
+ - Test/lint execution plan tailored to the selected language.
74
+ - List of key language idioms and review checkpoints.
75
+
76
+ ## Failure Modes
77
+ - When the language runtime or package manager is not installed.
78
+ - When the main language cannot be determined in a multilingual project.
79
+
80
+ ## Dependencies
81
+ - Access to the project file is required using the Read/Grep tool.
82
+ - When used with `Skill("moai-foundation-langs")`, it is easy to share cross-language conventions.
83
+
84
+ ## References
85
+ - Apple. "Swift Programming Language Guide." https://docs.swift.org/swift-book/ (accessed 2025-03-29).
86
+ - Apple. "Swift Package Manager." https://developer.apple.com/documentation/swift_packages (accessed 2025-03-29).
87
+
88
+ ## Changelog
89
+ - 2025-03-29: Input/output/failure response/reference information for each language has been specified.
90
+
91
+ ## Works well with
92
+
93
+ - alfred-trust-validation (coverage verification)
94
+ - alfred-code-reviewer (Swift-specific review)
95
+ - mobile-app-expert (iOS app development)
96
+
97
+ ## Best Practices
98
+ - Enable automatic validation by matching your linter with the language's official style guide.
99
+ - Fix test/build pipelines with reproducible commands in CI.
@@ -0,0 +1,96 @@
1
+ ---
2
+
3
+ name: moai-lang-typescript
4
+ description: TypeScript best practices with Vitest, Biome, strict typing, and npm/pnpm package management. Use when writing or reviewing TypeScript code in project workflows.
5
+ allowed-tools:
6
+ - Read
7
+ - Bash
8
+ ---
9
+
10
+ # TypeScript Expert
11
+
12
+ ## Skill Metadata
13
+ | Field | Value |
14
+ | ----- | ----- |
15
+ | Allowed tools | Read (read_file), Bash (terminal) |
16
+ | Auto-load | On demand when language keywords are detected |
17
+ | Trigger cues | TypeScript code discussions, framework guidance, or file extensions such as .ts/.tsx. |
18
+ | Tier | 3 |
19
+
20
+ ## What it does
21
+
22
+ Provides TypeScript-specific expertise for TDD development, including Vitest testing, Biome linting/formatting, strict type checking, and modern npm/pnpm package management.
23
+
24
+ ## When to use
25
+
26
+ - Engages when the conversation references TypeScript work, frameworks, or files like .ts/.tsx.
27
+ - "Writing TypeScript tests", "How to use Vitest", "Type safety"
28
+ - Automatically invoked when working with TypeScript projects
29
+ - TypeScript SPEC implementation (`/alfred:2-run`)
30
+
31
+ ## How it works
32
+
33
+ **TDD Framework**:
34
+ - **Vitest**: Fast unit testing (Jest-compatible API)
35
+ - **@testing-library**: Component testing for React/Vue
36
+ - Test coverage ≥85% with c8/istanbul
37
+
38
+ **Type Safety**:
39
+ - **strict: true** in tsconfig.json
40
+ - **noImplicitAny**, **strictNullChecks**, **strictFunctionTypes**
41
+ - Interface definitions, Generics, Type guards
42
+
43
+ **Code Quality**:
44
+ - **Biome**: Fast linter + formatter (replaces ESLint + Prettier)
45
+ - Type-safe configurations
46
+ - Import organization, unused variable detection
47
+
48
+ **Package Management**:
49
+ - **pnpm**: Fast, disk-efficient package manager (preferred)
50
+ - **npm**: Fallback option
51
+ - `package.json` + `tsconfig.json` configuration
52
+
53
+ **Best Practices**:
54
+ - File ≤300 LOC, function ≤50 LOC
55
+ - Prefer interfaces over types for public APIs
56
+ - Use const assertions for literal types
57
+ - Avoid `any`, prefer `unknown` or proper types
58
+
59
+ ## Examples
60
+ ```bash
61
+ npm run lint && npm test
62
+ ```
63
+
64
+ ## Inputs
65
+ - Language-specific source directories (e.g. `src/`, `app/`).
66
+ - Language-specific build/test configuration files (e.g. `package.json`, `pyproject.toml`, `go.mod`).
67
+ - Relevant test suites and sample data.
68
+
69
+ ## Outputs
70
+ - Test/lint execution plan tailored to the selected language.
71
+ - List of key language idioms and review checkpoints.
72
+
73
+ ## Failure Modes
74
+ - When the language runtime or package manager is not installed.
75
+ - When the main language cannot be determined in a multilingual project.
76
+
77
+ ## Dependencies
78
+ - Access to the project file is required using the Read/Grep tool.
79
+ - When used with `Skill("moai-foundation-langs")`, it is easy to share cross-language conventions.
80
+
81
+ ## References
82
+ - Microsoft. "TypeScript Handbook." https://www.typescriptlang.org/docs/ (accessed 2025-03-29).
83
+ - OpenJS Foundation. "ESLint User Guide." https://eslint.org/docs/latest/ (accessed 2025-03-29).
84
+
85
+ ## Changelog
86
+ - 2025-03-29: Input/output/failure response/reference information for each language has been specified.
87
+
88
+ ## Works well with
89
+
90
+ - alfred-trust-validation (coverage verification)
91
+ - alfred-code-reviewer (TypeScript-specific review)
92
+ - alfred-refactoring-coach (type-safe refactoring)
93
+
94
+ ## Best Practices
95
+ - Enable automatic validation by matching your linter with the language's official style guide.
96
+ - Fix test/build pipelines with reproducible commands in CI.