moai-adk 0.3.13__py3-none-any.whl → 0.4.0__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 (91) hide show
  1. moai_adk/__init__.py +8 -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/status.py +1 -1
  6. moai_adk/cli/commands/update.py +136 -90
  7. moai_adk/cli/prompts/init_prompts.py +1 -1
  8. moai_adk/core/__init__.py +1 -1
  9. moai_adk/core/git/branch.py +1 -1
  10. moai_adk/core/git/manager.py +1 -1
  11. moai_adk/core/quality/__init__.py +1 -1
  12. moai_adk/core/quality/trust_checker.py +1 -1
  13. moai_adk/core/quality/validators/__init__.py +1 -1
  14. moai_adk/core/quality/validators/base_validator.py +1 -1
  15. moai_adk/core/template/__init__.py +1 -1
  16. moai_adk/core/template/backup.py +2 -1
  17. moai_adk/core/template/config.py +24 -0
  18. moai_adk/core/template/languages.py +1 -1
  19. moai_adk/core/template/merger.py +58 -1
  20. moai_adk/core/template/processor.py +41 -12
  21. moai_adk/templates/.claude/agents/alfred/cc-manager.md +558 -3
  22. moai_adk/templates/.claude/commands/alfred/0-project.md +480 -12
  23. moai_adk/templates/.claude/commands/alfred/1-plan.md +563 -0
  24. moai_adk/templates/.claude/commands/alfred/1-spec.md +15 -516
  25. moai_adk/templates/.claude/commands/alfred/2-build.md +15 -417
  26. moai_adk/templates/.claude/commands/alfred/2-run.md +460 -0
  27. moai_adk/templates/.claude/hooks/alfred/handlers/session.py +10 -31
  28. moai_adk/templates/.claude/skills/moai-claude-code/SKILL.md +67 -0
  29. moai_adk/templates/.claude/skills/moai-claude-code/examples.md +513 -0
  30. moai_adk/templates/.claude/skills/moai-claude-code/reference.md +419 -0
  31. moai_adk/templates/.claude/skills/moai-claude-code/templates/agent-full.md +332 -0
  32. moai_adk/templates/.claude/skills/moai-claude-code/templates/command-full.md +384 -0
  33. moai_adk/templates/.claude/skills/moai-claude-code/templates/plugin-full.json +349 -0
  34. moai_adk/templates/.claude/skills/moai-claude-code/templates/settings-full.json +552 -0
  35. moai_adk/templates/.claude/skills/moai-claude-code/templates/skill-full.md +499 -0
  36. moai_adk/templates/.claude/skills/moai-domain-backend/SKILL.md +68 -0
  37. moai_adk/templates/.claude/skills/moai-domain-cli-tool/SKILL.md +64 -0
  38. moai_adk/templates/.claude/skills/moai-domain-data-science/SKILL.md +67 -0
  39. moai_adk/templates/.claude/skills/moai-domain-database/SKILL.md +69 -0
  40. moai_adk/templates/.claude/skills/moai-domain-devops/SKILL.md +69 -0
  41. moai_adk/templates/.claude/skills/moai-domain-frontend/SKILL.md +68 -0
  42. moai_adk/templates/.claude/skills/moai-domain-ml/SKILL.md +67 -0
  43. moai_adk/templates/.claude/skills/moai-domain-mobile-app/SKILL.md +62 -0
  44. moai_adk/templates/.claude/skills/moai-domain-security/SKILL.md +74 -0
  45. moai_adk/templates/.claude/skills/moai-domain-web-api/SKILL.md +66 -0
  46. moai_adk/templates/.claude/skills/moai-essentials-debug/SKILL.md +66 -0
  47. moai_adk/templates/.claude/skills/moai-essentials-perf/SKILL.md +68 -0
  48. moai_adk/templates/.claude/skills/moai-essentials-refactor/SKILL.md +59 -0
  49. moai_adk/templates/.claude/skills/moai-essentials-review/SKILL.md +76 -0
  50. moai_adk/templates/.claude/skills/moai-foundation-ears/SKILL.md +61 -0
  51. moai_adk/templates/.claude/skills/moai-foundation-git/SKILL.md +63 -0
  52. moai_adk/templates/.claude/skills/moai-foundation-langs/SKILL.md +64 -0
  53. moai_adk/templates/.claude/skills/moai-foundation-specs/SKILL.md +61 -0
  54. moai_adk/templates/.claude/skills/moai-foundation-tags/SKILL.md +54 -0
  55. moai_adk/templates/.claude/skills/moai-foundation-trust/SKILL.md +46 -0
  56. moai_adk/templates/.claude/skills/moai-lang-c/SKILL.md +68 -0
  57. moai_adk/templates/.claude/skills/moai-lang-clojure/SKILL.md +68 -0
  58. moai_adk/templates/.claude/skills/moai-lang-cpp/SKILL.md +69 -0
  59. moai_adk/templates/.claude/skills/moai-lang-csharp/SKILL.md +67 -0
  60. moai_adk/templates/.claude/skills/moai-lang-dart/SKILL.md +66 -0
  61. moai_adk/templates/.claude/skills/moai-lang-elixir/SKILL.md +66 -0
  62. moai_adk/templates/.claude/skills/moai-lang-go/SKILL.md +67 -0
  63. moai_adk/templates/.claude/skills/moai-lang-haskell/SKILL.md +67 -0
  64. moai_adk/templates/.claude/skills/moai-lang-java/SKILL.md +66 -0
  65. moai_adk/templates/.claude/skills/moai-lang-javascript/SKILL.md +64 -0
  66. moai_adk/templates/.claude/skills/moai-lang-julia/SKILL.md +66 -0
  67. moai_adk/templates/.claude/skills/moai-lang-kotlin/SKILL.md +67 -0
  68. moai_adk/templates/.claude/skills/moai-lang-lua/SKILL.md +65 -0
  69. moai_adk/templates/.claude/skills/moai-lang-php/SKILL.md +65 -0
  70. moai_adk/templates/.claude/skills/moai-lang-python/SKILL.md +64 -0
  71. moai_adk/templates/.claude/skills/moai-lang-r/SKILL.md +66 -0
  72. moai_adk/templates/.claude/skills/moai-lang-ruby/SKILL.md +66 -0
  73. moai_adk/templates/.claude/skills/moai-lang-rust/SKILL.md +68 -0
  74. moai_adk/templates/.claude/skills/moai-lang-scala/SKILL.md +68 -0
  75. moai_adk/templates/.claude/skills/moai-lang-shell/SKILL.md +67 -0
  76. moai_adk/templates/.claude/skills/moai-lang-sql/SKILL.md +68 -0
  77. moai_adk/templates/.claude/skills/moai-lang-swift/SKILL.md +67 -0
  78. moai_adk/templates/.claude/skills/moai-lang-typescript/SKILL.md +64 -0
  79. moai_adk/templates/.claude/skills/scripts/standardize_skills.py +166 -0
  80. moai_adk/templates/.claude/skills/scripts/verify_standardization.sh +43 -0
  81. moai_adk/templates/CLAUDE.md +153 -0
  82. moai_adk/templates/__init__.py +1 -1
  83. moai_adk/utils/__init__.py +1 -1
  84. moai_adk/utils/banner.py +7 -7
  85. moai_adk/utils/logger.py +1 -1
  86. {moai_adk-0.3.13.dist-info → moai_adk-0.4.0.dist-info}/METADATA +231 -1
  87. moai_adk-0.4.0.dist-info/RECORD +145 -0
  88. moai_adk-0.3.13.dist-info/RECORD +0 -90
  89. {moai_adk-0.3.13.dist-info → moai_adk-0.4.0.dist-info}/WHEEL +0 -0
  90. {moai_adk-0.3.13.dist-info → moai_adk-0.4.0.dist-info}/entry_points.txt +0 -0
  91. {moai_adk-0.3.13.dist-info → moai_adk-0.4.0.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,64 @@
1
+ ---
2
+ name: moai-lang-python
3
+ description: Python best practices with pytest, mypy, ruff, black, and uv package
4
+ management
5
+ allowed-tools:
6
+ - Read
7
+ - Bash
8
+ ---
9
+
10
+ # Python Expert
11
+
12
+ ## What it does
13
+
14
+ Provides Python-specific expertise for TDD development, including pytest testing, mypy type checking, ruff linting, black formatting, and modern uv package management.
15
+
16
+ ## When to use
17
+
18
+ - "Python 테스트 작성", "pytest 사용법", "Python 타입 힌트"
19
+ - Automatically invoked when working with Python projects
20
+ - Python SPEC implementation (`/alfred:2-build`)
21
+
22
+ ## How it works
23
+
24
+ **TDD Framework**:
25
+ - **pytest**: Test discovery, fixtures, parametrize, markers
26
+ - **coverage.py**: Test coverage ≥85% enforcement
27
+ - **pytest-mock**: Mocking and patching
28
+
29
+ **Type Safety**:
30
+ - **mypy**: Static type checking with strict mode
31
+ - Type hints for function signatures, return types
32
+ - Generic types, Protocols, TypedDict
33
+
34
+ **Code Quality**:
35
+ - **ruff**: Fast Python linter (replaces flake8, isort, pylint)
36
+ - **black**: Opinionated code formatter
37
+ - Complexity checks (≤10), line length (≤88)
38
+
39
+ **Package Management**:
40
+ - **uv**: Modern, fast package installer
41
+ - `pyproject.toml` for project configuration
42
+ - Virtual environment management
43
+
44
+ **Best Practices**:
45
+ - File ≤300 LOC, function ≤50 LOC
46
+ - Meaningful variable names (no single letters except loops)
47
+ - Guard clauses over nested conditions
48
+ - Docstrings for public APIs
49
+
50
+ ## Examples
51
+
52
+ ### Example 1: TDD with pytest
53
+ User: "/alfred:2-build AUTH-001"
54
+ Claude: (creates RED test with pytest, GREEN implementation, REFACTOR with type hints)
55
+
56
+ ### Example 2: Type checking validation
57
+ User: "mypy 타입 체크 실행"
58
+ Claude: (runs mypy --strict and reports type errors)
59
+
60
+ ## Works well with
61
+
62
+ - alfred-trust-validation (coverage verification)
63
+ - alfred-code-reviewer (Python-specific review)
64
+ - alfred-debugger-pro (Python debugging)
@@ -0,0 +1,66 @@
1
+ ---
2
+ name: moai-lang-r
3
+ description: R best practices with testthat, lintr, and data analysis patterns
4
+ allowed-tools:
5
+ - Read
6
+ - Bash
7
+ ---
8
+
9
+ # R Expert
10
+
11
+ ## What it does
12
+
13
+ Provides R-specific expertise for TDD development, including testthat testing framework, lintr code linting, and statistical data analysis patterns.
14
+
15
+ ## When to use
16
+
17
+ - "R 테스트 작성", "testthat 사용법", "데이터 분석 패턴"
18
+ - Automatically invoked when working with R projects
19
+ - R SPEC implementation (`/alfred:2-build`)
20
+
21
+ ## How it works
22
+
23
+ **TDD Framework**:
24
+ - **testthat**: Unit testing framework
25
+ - **covr**: Test coverage tool
26
+ - **mockery**: Mocking library
27
+ - Test coverage ≥85% enforcement
28
+
29
+ **Code Quality**:
30
+ - **lintr**: Static code analysis
31
+ - **styler**: Code formatting
32
+ - **goodpractice**: R package best practices
33
+
34
+ **Package Management**:
35
+ - **devtools**: Package development tools
36
+ - **usethis**: Workflow automation
37
+ - **CRAN**: Official package repository
38
+
39
+ **Data Analysis Patterns**:
40
+ - **tidyverse**: Data manipulation (dplyr, ggplot2)
41
+ - **data.table**: High-performance data manipulation
42
+ - **Vectorization** over loops
43
+ - **Pipes** (%>%) for readable code
44
+
45
+ **Best Practices**:
46
+ - File ≤300 LOC, function ≤50 LOC
47
+ - Document functions with roxygen2
48
+ - Use meaningful variable names
49
+ - Avoid global variables
50
+ - Prefer functional programming
51
+
52
+ ## Examples
53
+
54
+ ### Example 1: TDD with testthat
55
+ User: "/alfred:2-build ANALYSIS-001"
56
+ Claude: (creates RED test with testthat, GREEN implementation, REFACTOR with tidyverse)
57
+
58
+ ### Example 2: Linting check
59
+ User: "lintr 실행"
60
+ Claude: (runs lintr::lint_package() and reports style issues)
61
+
62
+ ## Works well with
63
+
64
+ - alfred-trust-validation (coverage verification)
65
+ - alfred-code-reviewer (R-specific review)
66
+ - data-science-expert (statistical analysis)
@@ -0,0 +1,66 @@
1
+ ---
2
+ name: moai-lang-ruby
3
+ description: Ruby best practices with RSpec, RuboCop, Bundler, and Rails patterns
4
+ allowed-tools:
5
+ - Read
6
+ - Bash
7
+ ---
8
+
9
+ # Ruby Expert
10
+
11
+ ## What it does
12
+
13
+ Provides Ruby-specific expertise for TDD development, including RSpec BDD testing, RuboCop linting, Bundler package management, and Rails framework patterns.
14
+
15
+ ## When to use
16
+
17
+ - "Ruby 테스트 작성", "RSpec 사용법", "Rails 패턴"
18
+ - Automatically invoked when working with Ruby/Rails projects
19
+ - Ruby SPEC implementation (`/alfred:2-build`)
20
+
21
+ ## How it works
22
+
23
+ **TDD Framework**:
24
+ - **RSpec**: Behavior-driven development (describe, context, it)
25
+ - **FactoryBot**: Test data factories
26
+ - **Capybara**: Integration testing for web apps
27
+ - Test coverage ≥85% with SimpleCov
28
+
29
+ **Code Quality**:
30
+ - **RuboCop**: Ruby linter and formatter
31
+ - **Reek**: Code smell detection
32
+ - **Brakeman**: Security vulnerability scanner (Rails)
33
+
34
+ **Package Management**:
35
+ - **Bundler**: Dependency management with Gemfile
36
+ - **RubyGems**: Package distribution
37
+ - Semantic versioning in gemspec
38
+
39
+ **Rails Patterns**:
40
+ - MVC architecture (Model-View-Controller)
41
+ - ActiveRecord for database interactions
42
+ - RESTful routing conventions
43
+ - Service objects for business logic
44
+ - Strong parameters for security
45
+
46
+ **Best Practices**:
47
+ - File ≤300 LOC, method ≤50 LOC
48
+ - Prefer symbols over strings for hash keys
49
+ - Use blocks and yielding for abstraction
50
+ - Duck typing over explicit type checking
51
+
52
+ ## Examples
53
+
54
+ ### Example 1: TDD with RSpec
55
+ User: "/alfred:2-build USER-001"
56
+ Claude: (creates RED test with RSpec BDD style, GREEN implementation, REFACTOR)
57
+
58
+ ### Example 2: RuboCop check
59
+ User: "RuboCop 실행"
60
+ Claude: (runs rubocop and reports style violations)
61
+
62
+ ## Works well with
63
+
64
+ - alfred-trust-validation (coverage verification)
65
+ - alfred-code-reviewer (Ruby-specific review)
66
+ - web-api-expert (Rails API development)
@@ -0,0 +1,68 @@
1
+ ---
2
+ name: moai-lang-rust
3
+ description: Rust best practices with cargo test, clippy, rustfmt, and ownership/borrow
4
+ checker mastery
5
+ allowed-tools:
6
+ - Read
7
+ - Bash
8
+ ---
9
+
10
+ # Rust Expert
11
+
12
+ ## What it does
13
+
14
+ Provides Rust-specific expertise for TDD development, including cargo test, clippy linting, rustfmt formatting, and ownership/borrow checker compliance.
15
+
16
+ ## When to use
17
+
18
+ - "Rust 테스트 작성", "cargo test 사용법", "소유권 규칙"
19
+ - Automatically invoked when working with Rust projects
20
+ - Rust SPEC implementation (`/alfred:2-build`)
21
+
22
+ ## How it works
23
+
24
+ **TDD Framework**:
25
+ - **cargo test**: Built-in test framework
26
+ - **proptest**: Property-based testing
27
+ - **criterion**: Benchmarking
28
+ - Test coverage with `cargo tarpaulin` or `cargo llvm-cov`
29
+
30
+ **Code Quality**:
31
+ - **clippy**: Rust linter with 500+ lint rules
32
+ - **rustfmt**: Automatic code formatting
33
+ - **cargo check**: Fast compilation check
34
+ - **cargo audit**: Security vulnerability scanning
35
+
36
+ **Memory Safety**:
37
+ - **Ownership**: One owner per value
38
+ - **Borrowing**: Immutable (&T) or mutable (&mut T) references
39
+ - **Lifetimes**: Explicit lifetime annotations when needed
40
+ - **Move semantics**: Understanding Copy vs Clone
41
+
42
+ **Rust Patterns**:
43
+ - Result<T, E> for error handling (no exceptions)
44
+ - Option<T> for nullable values
45
+ - Traits for polymorphism
46
+ - Match expressions for exhaustive handling
47
+
48
+ **Best Practices**:
49
+ - File ≤300 LOC, function ≤50 LOC
50
+ - Prefer immutable bindings (let vs let mut)
51
+ - Use iterators over manual loops
52
+ - Avoid `unwrap()` in production code, use proper error handling
53
+
54
+ ## Examples
55
+
56
+ ### Example 1: TDD with cargo test
57
+ User: "/alfred:2-build PARSER-001"
58
+ Claude: (creates RED test, GREEN implementation with Result<T, E>, REFACTOR with lifetimes)
59
+
60
+ ### Example 2: Clippy check
61
+ User: "clippy 린트 실행"
62
+ Claude: (runs cargo clippy -- -D warnings and reports issues)
63
+
64
+ ## Works well with
65
+
66
+ - alfred-trust-validation (coverage verification)
67
+ - alfred-code-reviewer (Rust-specific review)
68
+ - alfred-performance-optimizer (Rust benchmarking)
@@ -0,0 +1,68 @@
1
+ ---
2
+ name: moai-lang-scala
3
+ description: Scala best practices with ScalaTest, sbt, and functional programming
4
+ patterns
5
+ allowed-tools:
6
+ - Read
7
+ - Bash
8
+ ---
9
+
10
+ # Scala Expert
11
+
12
+ ## What it does
13
+
14
+ Provides Scala-specific expertise for TDD development, including ScalaTest framework, sbt build tool, and functional programming patterns.
15
+
16
+ ## When to use
17
+
18
+ - "Scala 테스트 작성", "ScalaTest 사용법", "함수형 프로그래밍"
19
+ - Automatically invoked when working with Scala projects
20
+ - Scala SPEC implementation (`/alfred:2-build`)
21
+
22
+ ## How it works
23
+
24
+ **TDD Framework**:
25
+ - **ScalaTest**: Flexible testing framework
26
+ - **specs2**: BDD-style testing
27
+ - **ScalaCheck**: Property-based testing
28
+ - Test coverage with sbt-scoverage
29
+
30
+ **Build Tools**:
31
+ - **sbt**: Scala build tool
32
+ - **build.sbt**: Build configuration
33
+ - Multi-project builds
34
+
35
+ **Code Quality**:
36
+ - **Scalafmt**: Code formatting
37
+ - **Scalafix**: Linting and refactoring
38
+ - **WartRemover**: Code linting
39
+
40
+ **Functional Programming**:
41
+ - **Immutable data structures**
42
+ - **Higher-order functions**
43
+ - **Pattern matching**
44
+ - **For-comprehensions**
45
+ - **Monads (Option, Either, Try)**
46
+
47
+ **Best Practices**:
48
+ - File ≤300 LOC, method ≤50 LOC
49
+ - Prefer immutable vals over mutable vars
50
+ - Case classes for data modeling
51
+ - Tail recursion for loops
52
+ - Avoid null, use Option
53
+
54
+ ## Examples
55
+
56
+ ### Example 1: TDD with ScalaTest
57
+ User: "/alfred:2-build PARSER-001"
58
+ Claude: (creates RED test with ScalaTest, GREEN implementation with immutability, REFACTOR)
59
+
60
+ ### Example 2: Property testing
61
+ User: "ScalaCheck 속성 테스트 작성"
62
+ Claude: (creates property-based tests for edge cases)
63
+
64
+ ## Works well with
65
+
66
+ - alfred-trust-validation (coverage verification)
67
+ - alfred-code-reviewer (Scala-specific review)
68
+ - alfred-refactoring-coach (functional refactoring)
@@ -0,0 +1,67 @@
1
+ ---
2
+ name: moai-lang-shell
3
+ description: Shell scripting best practices with bats, shellcheck, and POSIX compliance
4
+ allowed-tools:
5
+ - Read
6
+ - Bash
7
+ ---
8
+
9
+ # Shell Expert
10
+
11
+ ## What it does
12
+
13
+ Provides shell scripting expertise for TDD development, including bats testing framework, shellcheck linting, and POSIX compliance for portable scripts.
14
+
15
+ ## When to use
16
+
17
+ - "Shell 스크립트 작성", "bats 테스트", "POSIX 호환성"
18
+ - Automatically invoked when working with shell script projects
19
+ - Shell SPEC implementation (`/alfred:2-build`)
20
+
21
+ ## How it works
22
+
23
+ **TDD Framework**:
24
+ - **bats**: Bash Automated Testing System
25
+ - **shunit2**: xUnit-style shell testing
26
+ - **assert.sh**: Shell assertion library
27
+ - Test-driven shell development
28
+
29
+ **Code Quality**:
30
+ - **shellcheck**: Static analysis for shell scripts
31
+ - **shfmt**: Shell script formatting
32
+ - **bashate**: Style checker
33
+
34
+ **POSIX Compliance**:
35
+ - Portable shell features (sh vs bash)
36
+ - Avoid bashisms for portability
37
+ - Use `[ ]` instead of `[[ ]]` for POSIX
38
+ - Standard utilities (no GNU extensions)
39
+
40
+ **Shell Patterns**:
41
+ - **Error handling**: set -e, set -u, set -o pipefail
42
+ - **Exit codes**: Proper use of 0 (success) and non-zero
43
+ - **Quoting**: Always quote variables ("$var")
44
+ - **Functions**: Modular script organization
45
+
46
+ **Best Practices**:
47
+ - File ≤300 LOC, function ≤50 LOC
48
+ - Use `#!/bin/sh` for POSIX, `#!/bin/bash` for Bash
49
+ - Check command existence with `command -v`
50
+ - Use `$()` over backticks
51
+ - Validate input arguments
52
+
53
+ ## Examples
54
+
55
+ ### Example 1: TDD with bats
56
+ User: "/alfred:2-build DEPLOY-001"
57
+ Claude: (creates RED test with bats, GREEN implementation, REFACTOR with error handling)
58
+
59
+ ### Example 2: Shellcheck validation
60
+ User: "shellcheck 실행"
61
+ Claude: (runs shellcheck *.sh and reports issues)
62
+
63
+ ## Works well with
64
+
65
+ - alfred-trust-validation (coverage verification)
66
+ - alfred-code-reviewer (Shell-specific review)
67
+ - devops-expert (Deployment scripts)
@@ -0,0 +1,68 @@
1
+ ---
2
+ name: moai-lang-sql
3
+ description: SQL best practices with testing frameworks, query optimization, and migration
4
+ management
5
+ allowed-tools:
6
+ - Read
7
+ - Bash
8
+ ---
9
+
10
+ # SQL Expert
11
+
12
+ ## What it does
13
+
14
+ Provides SQL-specific expertise for database development, including SQL testing strategies, query optimization techniques, and migration management best practices.
15
+
16
+ ## When to use
17
+
18
+ - "SQL 테스트 작성", "쿼리 최적화", "마이그레이션 관리"
19
+ - Automatically invoked when working with database projects
20
+ - SQL SPEC implementation (`/alfred:2-build`)
21
+
22
+ ## How it works
23
+
24
+ **Testing Strategies**:
25
+ - **pgTAP**: PostgreSQL testing framework
26
+ - **DbUnit**: Database testing for JVM
27
+ - **SQLTest**: SQL unit testing
28
+ - Integration tests with test databases
29
+
30
+ **Query Optimization**:
31
+ - **EXPLAIN/EXPLAIN ANALYZE**: Execution plan analysis
32
+ - **Index optimization**: B-tree, Hash, GiST indices
33
+ - **Query rewriting**: JOIN optimization
34
+ - **Avoiding N+1 queries**: Eager loading
35
+
36
+ **Migration Management**:
37
+ - **Flyway**: Version-based migrations
38
+ - **Liquibase**: Changelog-based migrations
39
+ - **Alembic**: Python database migrations
40
+ - **Rails migrations**: Ruby on Rails approach
41
+
42
+ **SQL Best Practices**:
43
+ - **Normalization**: 3NF compliance
44
+ - **Constraints**: Foreign keys, NOT NULL, CHECK
45
+ - **Transactions**: ACID properties
46
+ - **Prepared statements**: SQL injection prevention
47
+
48
+ **Database Patterns**:
49
+ - Use CTEs (Common Table Expressions) for readability
50
+ - Window functions over self-joins
51
+ - Avoid SELECT * in production code
52
+ - Use parameterized queries
53
+
54
+ ## Examples
55
+
56
+ ### Example 1: TDD with pgTAP
57
+ User: "/alfred:2-build SCHEMA-001"
58
+ Claude: (creates RED test with pgTAP, GREEN schema implementation, REFACTOR with indices)
59
+
60
+ ### Example 2: Query optimization
61
+ User: "쿼리 성능 분석"
62
+ Claude: (runs EXPLAIN ANALYZE and suggests optimization)
63
+
64
+ ## Works well with
65
+
66
+ - alfred-trust-validation (migration validation)
67
+ - alfred-code-reviewer (SQL review)
68
+ - database-expert (database design)
@@ -0,0 +1,67 @@
1
+ ---
2
+ name: moai-lang-swift
3
+ description: Swift best practices with XCTest, SwiftLint, and iOS/macOS development
4
+ patterns
5
+ allowed-tools:
6
+ - Read
7
+ - Bash
8
+ ---
9
+
10
+ # Swift Expert
11
+
12
+ ## What it does
13
+
14
+ Provides Swift-specific expertise for TDD development, including XCTest framework, SwiftLint linting, Swift Package Manager, and iOS/macOS platform patterns.
15
+
16
+ ## When to use
17
+
18
+ - "Swift 테스트 작성", "XCTest 사용법", "iOS 패턴"
19
+ - Automatically invoked when working with Swift/iOS projects
20
+ - Swift SPEC implementation (`/alfred:2-build`)
21
+
22
+ ## How it works
23
+
24
+ **TDD Framework**:
25
+ - **XCTest**: Apple's native testing framework
26
+ - **Quick/Nimble**: BDD-style testing (alternative)
27
+ - **XCUITest**: UI testing for iOS/macOS apps
28
+ - Test coverage with Xcode Code Coverage
29
+
30
+ **Code Quality**:
31
+ - **SwiftLint**: Swift linter and style checker
32
+ - **SwiftFormat**: Code formatting tool
33
+ - **Xcode Analyzer**: Static code analysis
34
+
35
+ **Package Management**:
36
+ - **Swift Package Manager (SPM)**: Dependency management
37
+ - **CocoaPods**: Alternative package manager (legacy)
38
+ - **Carthage**: Decentralized dependency manager
39
+
40
+ **Swift Patterns**:
41
+ - **Optionals**: Safe handling of nil values (?, !)
42
+ - **Guard statements**: Early exit patterns
43
+ - **Protocol-oriented programming**: Protocols over inheritance
44
+ - **Value types**: Prefer structs over classes
45
+ - **Closures**: First-class functions
46
+
47
+ **iOS/macOS Patterns**:
48
+ - **SwiftUI**: Declarative UI framework
49
+ - **Combine**: Reactive programming
50
+ - **UIKit/AppKit**: Traditional UI frameworks
51
+ - **MVVM/MVC**: Architecture patterns
52
+
53
+ ## Examples
54
+
55
+ ### Example 1: TDD with XCTest
56
+ User: "/alfred:2-build AUTH-001"
57
+ Claude: (creates RED test with XCTest, GREEN implementation with optionals, REFACTOR)
58
+
59
+ ### Example 2: SwiftLint check
60
+ User: "SwiftLint 실행"
61
+ Claude: (runs swiftlint and reports style violations)
62
+
63
+ ## Works well with
64
+
65
+ - alfred-trust-validation (coverage verification)
66
+ - alfred-code-reviewer (Swift-specific review)
67
+ - mobile-app-expert (iOS app development)
@@ -0,0 +1,64 @@
1
+ ---
2
+ name: moai-lang-typescript
3
+ description: TypeScript best practices with Vitest, Biome, strict typing, and npm/pnpm
4
+ package management
5
+ allowed-tools:
6
+ - Read
7
+ - Bash
8
+ ---
9
+
10
+ # TypeScript Expert
11
+
12
+ ## What it does
13
+
14
+ Provides TypeScript-specific expertise for TDD development, including Vitest testing, Biome linting/formatting, strict type checking, and modern npm/pnpm package management.
15
+
16
+ ## When to use
17
+
18
+ - "TypeScript 테스트 작성", "Vitest 사용법", "타입 안전성"
19
+ - Automatically invoked when working with TypeScript projects
20
+ - TypeScript SPEC implementation (`/alfred:2-build`)
21
+
22
+ ## How it works
23
+
24
+ **TDD Framework**:
25
+ - **Vitest**: Fast unit testing (Jest-compatible API)
26
+ - **@testing-library**: Component testing for React/Vue
27
+ - Test coverage ≥85% with c8/istanbul
28
+
29
+ **Type Safety**:
30
+ - **strict: true** in tsconfig.json
31
+ - **noImplicitAny**, **strictNullChecks**, **strictFunctionTypes**
32
+ - Interface definitions, Generics, Type guards
33
+
34
+ **Code Quality**:
35
+ - **Biome**: Fast linter + formatter (replaces ESLint + Prettier)
36
+ - Type-safe configurations
37
+ - Import organization, unused variable detection
38
+
39
+ **Package Management**:
40
+ - **pnpm**: Fast, disk-efficient package manager (preferred)
41
+ - **npm**: Fallback option
42
+ - `package.json` + `tsconfig.json` configuration
43
+
44
+ **Best Practices**:
45
+ - File ≤300 LOC, function ≤50 LOC
46
+ - Prefer interfaces over types for public APIs
47
+ - Use const assertions for literal types
48
+ - Avoid `any`, prefer `unknown` or proper types
49
+
50
+ ## Examples
51
+
52
+ ### Example 1: TDD with Vitest
53
+ User: "/alfred:2-build USER-001"
54
+ Claude: (creates RED test with Vitest, GREEN implementation with strict types, REFACTOR)
55
+
56
+ ### Example 2: Type checking
57
+ User: "TypeScript 타입 오류 확인"
58
+ Claude: (runs tsc --noEmit and reports type errors)
59
+
60
+ ## Works well with
61
+
62
+ - alfred-trust-validation (coverage verification)
63
+ - alfred-code-reviewer (TypeScript-specific review)
64
+ - alfred-refactoring-coach (type-safe refactoring)