moai-adk 0.3.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 (87) hide show
  1. moai_adk/__init__.py +8 -0
  2. moai_adk/__main__.py +86 -0
  3. moai_adk/cli/__init__.py +2 -0
  4. moai_adk/cli/commands/__init__.py +16 -0
  5. moai_adk/cli/commands/backup.py +56 -0
  6. moai_adk/cli/commands/doctor.py +184 -0
  7. moai_adk/cli/commands/init.py +284 -0
  8. moai_adk/cli/commands/restore.py +77 -0
  9. moai_adk/cli/commands/status.py +79 -0
  10. moai_adk/cli/commands/update.py +133 -0
  11. moai_adk/cli/main.py +12 -0
  12. moai_adk/cli/prompts/__init__.py +5 -0
  13. moai_adk/cli/prompts/init_prompts.py +159 -0
  14. moai_adk/core/__init__.py +2 -0
  15. moai_adk/core/git/__init__.py +24 -0
  16. moai_adk/core/git/branch.py +26 -0
  17. moai_adk/core/git/branch_manager.py +137 -0
  18. moai_adk/core/git/checkpoint.py +140 -0
  19. moai_adk/core/git/commit.py +68 -0
  20. moai_adk/core/git/event_detector.py +81 -0
  21. moai_adk/core/git/manager.py +127 -0
  22. moai_adk/core/project/__init__.py +2 -0
  23. moai_adk/core/project/backup_utils.py +84 -0
  24. moai_adk/core/project/checker.py +302 -0
  25. moai_adk/core/project/detector.py +105 -0
  26. moai_adk/core/project/initializer.py +174 -0
  27. moai_adk/core/project/phase_executor.py +297 -0
  28. moai_adk/core/project/validator.py +118 -0
  29. moai_adk/core/quality/__init__.py +6 -0
  30. moai_adk/core/quality/trust_checker.py +441 -0
  31. moai_adk/core/quality/validators/__init__.py +6 -0
  32. moai_adk/core/quality/validators/base_validator.py +19 -0
  33. moai_adk/core/template/__init__.py +8 -0
  34. moai_adk/core/template/backup.py +95 -0
  35. moai_adk/core/template/config.py +95 -0
  36. moai_adk/core/template/languages.py +44 -0
  37. moai_adk/core/template/merger.py +117 -0
  38. moai_adk/core/template/processor.py +310 -0
  39. moai_adk/templates/.claude/agents/alfred/cc-manager.md +474 -0
  40. moai_adk/templates/.claude/agents/alfred/code-builder.md +534 -0
  41. moai_adk/templates/.claude/agents/alfred/debug-helper.md +302 -0
  42. moai_adk/templates/.claude/agents/alfred/doc-syncer.md +175 -0
  43. moai_adk/templates/.claude/agents/alfred/git-manager.md +200 -0
  44. moai_adk/templates/.claude/agents/alfred/project-manager.md +152 -0
  45. moai_adk/templates/.claude/agents/alfred/spec-builder.md +256 -0
  46. moai_adk/templates/.claude/agents/alfred/tag-agent.md +247 -0
  47. moai_adk/templates/.claude/agents/alfred/trust-checker.md +332 -0
  48. moai_adk/templates/.claude/commands/alfred/0-project.md +523 -0
  49. moai_adk/templates/.claude/commands/alfred/1-spec.md +531 -0
  50. moai_adk/templates/.claude/commands/alfred/2-build.md +413 -0
  51. moai_adk/templates/.claude/commands/alfred/3-sync.md +552 -0
  52. moai_adk/templates/.claude/hooks/alfred/README.md +238 -0
  53. moai_adk/templates/.claude/hooks/alfred/alfred_hooks.py +165 -0
  54. moai_adk/templates/.claude/hooks/alfred/core/__init__.py +79 -0
  55. moai_adk/templates/.claude/hooks/alfred/core/checkpoint.py +271 -0
  56. moai_adk/templates/.claude/hooks/alfred/core/context.py +110 -0
  57. moai_adk/templates/.claude/hooks/alfred/core/project.py +284 -0
  58. moai_adk/templates/.claude/hooks/alfred/core/tags.py +244 -0
  59. moai_adk/templates/.claude/hooks/alfred/handlers/__init__.py +23 -0
  60. moai_adk/templates/.claude/hooks/alfred/handlers/compact.py +51 -0
  61. moai_adk/templates/.claude/hooks/alfred/handlers/notification.py +25 -0
  62. moai_adk/templates/.claude/hooks/alfred/handlers/session.py +80 -0
  63. moai_adk/templates/.claude/hooks/alfred/handlers/tool.py +71 -0
  64. moai_adk/templates/.claude/hooks/alfred/handlers/user.py +41 -0
  65. moai_adk/templates/.claude/output-styles/alfred/agentic-coding.md +635 -0
  66. moai_adk/templates/.claude/output-styles/alfred/moai-adk-learning.md +691 -0
  67. moai_adk/templates/.claude/output-styles/alfred/study-with-alfred.md +469 -0
  68. moai_adk/templates/.claude/settings.json +135 -0
  69. moai_adk/templates/.github/PULL_REQUEST_TEMPLATE.md +68 -0
  70. moai_adk/templates/.github/workflows/moai-gitflow.yml +255 -0
  71. moai_adk/templates/.gitignore +41 -0
  72. moai_adk/templates/.moai/config.json +89 -0
  73. moai_adk/templates/.moai/memory/development-guide.md +367 -0
  74. moai_adk/templates/.moai/memory/spec-metadata.md +277 -0
  75. moai_adk/templates/.moai/project/product.md +121 -0
  76. moai_adk/templates/.moai/project/structure.md +150 -0
  77. moai_adk/templates/.moai/project/tech.md +221 -0
  78. moai_adk/templates/CLAUDE.md +733 -0
  79. moai_adk/templates/__init__.py +2 -0
  80. moai_adk/utils/__init__.py +8 -0
  81. moai_adk/utils/banner.py +42 -0
  82. moai_adk/utils/logger.py +152 -0
  83. moai_adk-0.3.0.dist-info/METADATA +20 -0
  84. moai_adk-0.3.0.dist-info/RECORD +87 -0
  85. moai_adk-0.3.0.dist-info/WHEEL +4 -0
  86. moai_adk-0.3.0.dist-info/entry_points.txt +2 -0
  87. moai_adk-0.3.0.dist-info/licenses/LICENSE +21 -0
@@ -0,0 +1,255 @@
1
+ name: MoAI-ADK GitFlow μžλ™ν™”
2
+
3
+ # MoAI-ADK 3단계 νŒŒμ΄ν”„λΌμΈ: spec β†’ build β†’ sync
4
+ # GitFlow μ™„μ „ 투λͺ…μ„± - κ°œλ°œμžκ°€ Git을 λͺ°λΌλ„ λ˜λŠ” μžλ™ν™”
5
+
6
+ on:
7
+ push:
8
+ branches: [develop, "feature/**"]
9
+ pull_request:
10
+ types: [opened, ready_for_review, converted_to_draft]
11
+
12
+ jobs:
13
+ moai-pipeline:
14
+ name: πŸ—Ώ MoAI-ADK νŒŒμ΄ν”„λΌμΈ
15
+ runs-on: ubuntu-latest
16
+ steps:
17
+ - name: 체크아웃
18
+ uses: actions/checkout@v4
19
+
20
+ # Multi-language toolchains (conditional)
21
+ - name: Setup Python
22
+ if: ${{ hashFiles('requirements.txt') != '' || hashFiles('pyproject.toml') != '' || hashFiles('setup.py') != '' }}
23
+ uses: actions/setup-python@v5
24
+ with:
25
+ python-version: "3.13"
26
+
27
+ - name: Setup Node.js
28
+ if: ${{ hashFiles('package.json') != '' }}
29
+ uses: actions/setup-node@v4
30
+ with:
31
+ node-version: "22"
32
+
33
+ - name: Setup Bun
34
+ if: ${{ hashFiles('bun.lockb') != '' }}
35
+ uses: oven-sh/setup-bun@v2
36
+ with:
37
+ bun-version: "latest"
38
+
39
+ - name: Setup Go
40
+ if: ${{ hashFiles('go.mod') != '' }}
41
+ uses: actions/setup-go@v5
42
+ with:
43
+ go-version: "1.23"
44
+
45
+ - name: Setup Rust
46
+ if: ${{ hashFiles('Cargo.toml') != '' }}
47
+ uses: dtolnay/rust-toolchain@stable
48
+
49
+ - name: Setup Java
50
+ if: ${{ hashFiles('pom.xml') != '' || hashFiles('build.gradle') != '' || hashFiles('build.gradle.kts') != '' }}
51
+ uses: actions/setup-java@v4
52
+ with:
53
+ distribution: "temurin"
54
+ java-version: "21"
55
+
56
+ - name: Setup .NET
57
+ if: ${{ hashFiles('**/*.sln') != '' || hashFiles('**/*.csproj') != '' }}
58
+ uses: actions/setup-dotnet@v4
59
+ with:
60
+ dotnet-version: "8.0.x"
61
+
62
+ - name: Setup Ruby
63
+ if: ${{ hashFiles('Gemfile') != '' }}
64
+ uses: ruby/setup-ruby@v1
65
+ with:
66
+ ruby-version: "3.3"
67
+ bundler-cache: true
68
+
69
+ - name: Setup Flutter
70
+ if: ${{ hashFiles('pubspec.yaml') != '' }}
71
+ uses: subosito/flutter-action@v2
72
+ with:
73
+ flutter-version: "3.24.x"
74
+ channel: "stable"
75
+
76
+ - name: Setup Swift (Xcode)
77
+ if: ${{ hashFiles('Package.swift') != '' || hashFiles('**/*.xcodeproj') != '' || hashFiles('**/*.xcworkspace') != '' }}
78
+ uses: maxim-lobanov/setup-xcode@v1
79
+ with:
80
+ xcode-version: "latest-stable"
81
+
82
+ - name: Setup Kotlin
83
+ if: ${{ hashFiles('build.gradle.kts') != '' || hashFiles('settings.gradle.kts') != '' }}
84
+ uses: actions/setup-java@v4
85
+ with:
86
+ distribution: "temurin"
87
+ java-version: "21"
88
+
89
+ # TRUST 5원칙 μžλ™ 검증
90
+ # Note: Validation is now handled by TypeScript-based tools
91
+ - name: 🧭 TRUST 5원칙 검증
92
+ run: |
93
+ echo "βœ… TRUST 원칙 검증은 TypeScript 기반 λ„κ΅¬λ‘œ μˆ˜ν–‰λ©λ‹ˆλ‹€"
94
+ echo " - @agent-trust-checker μ‚¬μš©"
95
+ echo " - TypeScript ν›… μ‹œμŠ€ν…œ ν™œμš©"
96
+
97
+ # Draft PRμ—μ„œλŠ” ν…ŒμŠ€νŠΈ μ‹€νŒ¨λ₯Ό λ¬΄μ‹œν•˜κ³ , Ready PRμ—μ„œλŠ” μ‹€νŒ¨ μ‹œ CI μ‹€νŒ¨
98
+ - name: Run language-aware tests
99
+ run: |
100
+ set -e
101
+ ALLOW_FAILURE="${{ github.event.pull_request.draft == true }}"
102
+ echo "πŸ”Ž Running language-aware tests (Draft PR: allow failure = $ALLOW_FAILURE)"
103
+
104
+ # Python tests
105
+ if [ -f "requirements.txt" ] || [ -f "pyproject.toml" ] || [ -f "setup.py" ]; then
106
+ echo "➑️ Python tests"
107
+ pip install -q pytest pytest-cov 2>/dev/null || true
108
+ if [ "$ALLOW_FAILURE" = "true" ]; then
109
+ pytest --cov --cov-report=term-missing || true
110
+ else
111
+ pytest --cov --cov-report=term-missing
112
+ fi
113
+ fi
114
+
115
+ # Node.js/Bun tests
116
+ if [ -f "package.json" ]; then
117
+ echo "➑️ Node.js/Bun tests"
118
+ if [ -f "bun.lockb" ]; then
119
+ bun install --frozen-lockfile || bun install
120
+ if [ "$ALLOW_FAILURE" = "true" ]; then
121
+ bun test || true
122
+ else
123
+ bun test
124
+ fi
125
+ else
126
+ npm ci --prefer-offline || npm install
127
+ if [ "$ALLOW_FAILURE" = "true" ]; then
128
+ npm test --if-present -- --coverage || true
129
+ else
130
+ npm test --if-present -- --coverage
131
+ fi
132
+ fi
133
+ fi
134
+
135
+ # Go tests
136
+ if [ -f "go.mod" ]; then
137
+ echo "➑️ Go tests"
138
+ if [ "$ALLOW_FAILURE" = "true" ]; then
139
+ go test -v -cover ./... || true
140
+ else
141
+ go test -v -cover ./...
142
+ fi
143
+ fi
144
+
145
+ # Rust tests
146
+ if [ -f "Cargo.toml" ]; then
147
+ echo "➑️ Rust tests"
148
+ if [ "$ALLOW_FAILURE" = "true" ]; then
149
+ cargo test --all --locked || cargo test || true
150
+ else
151
+ cargo test --all --locked || cargo test
152
+ fi
153
+ fi
154
+
155
+ # Java tests (Maven)
156
+ if [ -f "pom.xml" ]; then
157
+ echo "➑️ Java tests (Maven)"
158
+ if [ "$ALLOW_FAILURE" = "true" ]; then
159
+ mvn -q -DskipTests=false test || true
160
+ else
161
+ mvn -q -DskipTests=false test
162
+ fi
163
+ fi
164
+
165
+ # Java/Kotlin tests (Gradle)
166
+ if [ -f "build.gradle" ] || [ -f "build.gradle.kts" ]; then
167
+ echo "➑️ Java/Kotlin tests (Gradle)"
168
+ if [ "$ALLOW_FAILURE" = "true" ]; then
169
+ ./gradlew test || gradle test || true
170
+ else
171
+ ./gradlew test || gradle test
172
+ fi
173
+ fi
174
+
175
+ # .NET tests
176
+ if compgen -G "**/*.sln" > /dev/null || compgen -G "**/*.csproj" > /dev/null; then
177
+ echo "➑️ .NET tests"
178
+ if [ "$ALLOW_FAILURE" = "true" ]; then
179
+ dotnet test || true
180
+ else
181
+ dotnet test
182
+ fi
183
+ fi
184
+
185
+ # Ruby tests
186
+ if [ -f "Gemfile" ]; then
187
+ echo "➑️ Ruby tests"
188
+ if [ "$ALLOW_FAILURE" = "true" ]; then
189
+ bundle exec rspec || bundle exec rake test || true
190
+ else
191
+ bundle exec rspec || bundle exec rake test
192
+ fi
193
+ fi
194
+
195
+ # Flutter tests
196
+ if [ -f "pubspec.yaml" ]; then
197
+ echo "➑️ Flutter tests"
198
+ flutter pub get
199
+ if [ "$ALLOW_FAILURE" = "true" ]; then
200
+ flutter test || true
201
+ else
202
+ flutter test
203
+ fi
204
+ fi
205
+
206
+ # Swift tests
207
+ if [ -f "Package.swift" ]; then
208
+ echo "➑️ Swift tests (SPM)"
209
+ if [ "$ALLOW_FAILURE" = "true" ]; then
210
+ swift test || true
211
+ else
212
+ swift test
213
+ fi
214
+ elif compgen -G "**/*.xcodeproj" > /dev/null || compgen -G "**/*.xcworkspace" > /dev/null; then
215
+ echo "➑️ Swift tests (Xcode)"
216
+ # Xcode ν”„λ‘œμ νŠΈλŠ” μŠ€ν‚΄μ΄ ν•„μš”ν•˜λ―€λ‘œ 쑰건뢀 μ‹€ν–‰
217
+ if [ "$ALLOW_FAILURE" = "true" ]; then
218
+ echo "⚠️ Xcode ν…ŒμŠ€νŠΈλŠ” μŠ€ν‚΄ 섀정이 ν•„μš”ν•©λ‹ˆλ‹€"
219
+ else
220
+ echo "⚠️ Xcode ν…ŒμŠ€νŠΈλŠ” μŠ€ν‚΄ 섀정이 ν•„μš”ν•©λ‹ˆλ‹€"
221
+ fi
222
+ fi
223
+
224
+ # TAG μ‹œμŠ€ν…œ 검증 (μ½”λ“œ 파일만)
225
+ - name: 🏷️ TAG μ‹œμŠ€ν…œ 검증
226
+ run: |
227
+ echo "βœ… TAG 검증은 tag_validator.py Hookμ—μ„œ μžλ™ 처리됨"
228
+
229
+ # λΈŒλžœμΉ˜λ³„ 단계 μ‹€ν–‰
230
+ - name: πŸ“ SPEC 단계 (feature 브랜치)
231
+ if: startsWith(github.ref, 'refs/heads/feature/')
232
+ run: |
233
+ echo "🌿 Feature 브랜치: SPEC 검증 단계"
234
+ echo "- spec-builder μ—μ΄μ „νŠΈκ°€ EARS λͺ…μ„Έ μž‘μ„±"
235
+ echo "- Draft PR μžλ™ 생성"
236
+
237
+ - name: πŸ”΄πŸŸ’πŸ”„ BUILD 단계 (Draft PR)
238
+ if: github.event.pull_request.draft == true
239
+ run: |
240
+ echo "πŸ“ Draft PR: TDD κ΅¬ν˜„ 단계"
241
+ echo "- code-builder μ—μ΄μ „νŠΈκ°€ RED-GREEN-REFACTOR"
242
+ echo "- TRUST 5원칙 μ€€μˆ˜ 검증"
243
+
244
+ - name: πŸ“š SYNC 단계 (Ready PR)
245
+ if: github.event.pull_request.draft == false && github.event.action == 'ready_for_review'
246
+ run: |
247
+ echo "βœ… Ready PR: λ¬Έμ„œ 동기화 단계"
248
+ echo "- doc-syncer μ—μ΄μ „νŠΈκ°€ Living Document 동기화"
249
+ echo "- PR 리뷰 μ€€λΉ„ μ™„λ£Œ"
250
+
251
+ # μ΅œμ’… κ²°κ³Ό 리포트
252
+ - name: πŸ“Š MoAI νŒŒμ΄ν”„λΌμΈ μ™„λ£Œ
253
+ run: |
254
+ echo "πŸ—Ώ MoAI-ADK GitFlow μžλ™ν™” μ™„λ£Œ"
255
+ echo "✨ Git을 λͺ°λΌλ„ ν”„λ‘œνŽ˜μ…”λ„ μ›Œν¬ν”Œλ‘œμš° κ΅¬ν˜„"
@@ -0,0 +1,41 @@
1
+ # Build artifacts
2
+ build/
3
+ dist/
4
+ *.egg-info/
5
+ *.egg
6
+
7
+ # Cache
8
+ __pycache__/
9
+ .pytest_cache/
10
+ *.pyc
11
+ *.pyo
12
+ node_modules/
13
+ *.tsbuildinfo
14
+ .tscache/
15
+
16
+ # Backups
17
+
18
+ # Virtual environment
19
+ venv/
20
+ .venv/
21
+ env/
22
+ .env/
23
+
24
+ # IDE
25
+ .vscode/
26
+ .idea/
27
+ *.swp
28
+ *.swo
29
+ *~
30
+
31
+ # OS
32
+ .DS_Store
33
+ Thumbs.db
34
+
35
+ # Logs
36
+ *.log
37
+ logs/
38
+
39
+ # Temporary files
40
+ *.tmp
41
+ *.temp
@@ -0,0 +1,89 @@
1
+ {
2
+ "_meta": {
3
+ "@CODE:CONFIG-STRUCTURE-001": "@DOC:JSON-CONFIG-001",
4
+ "@SPEC:PROJECT-CONFIG-001": "@SPEC:MOAI-CONFIG-001"
5
+ },
6
+ "moai": {
7
+ "version": "{{MOAI_VERSION}}"
8
+ },
9
+ "constitution": {
10
+ "enforce_tdd": true,
11
+ "principles": {
12
+ "simplicity": {
13
+ "max_projects": 5,
14
+ "notes": "κΈ°λ³Έ ꢌμž₯κ°’. ν”„λ‘œμ νŠΈ 규λͺ¨μ— 따라 .moai/config.json λ˜λŠ” SPEC/ADR둜 근거와 ν•¨κ»˜ μ‘°μ •ν•˜μ„Έμš”."
15
+ }
16
+ },
17
+ "require_tags": true,
18
+ "simplicity_threshold": 5,
19
+ "test_coverage_target": 85
20
+ },
21
+ "git_strategy": {
22
+ "personal": {
23
+ "auto_checkpoint": "event-driven",
24
+ "checkpoint_events": [
25
+ "delete",
26
+ "refactor",
27
+ "merge",
28
+ "script",
29
+ "critical-file"
30
+ ],
31
+ "checkpoint_type": "local-branch",
32
+ "max_checkpoints": 10,
33
+ "cleanup_days": 7,
34
+ "push_to_remote": false,
35
+ "auto_commit": true,
36
+ "branch_prefix": "feature/",
37
+ "develop_branch": "develop",
38
+ "main_branch": "main"
39
+ },
40
+ "team": {
41
+ "auto_pr": true,
42
+ "develop_branch": "develop",
43
+ "draft_pr": true,
44
+ "feature_prefix": "feature/SPEC-",
45
+ "main_branch": "main",
46
+ "use_gitflow": true
47
+ }
48
+ },
49
+ "pipeline": {
50
+ "available_commands": [
51
+ "/alfred:0-project",
52
+ "/alfred:1-spec",
53
+ "/alfred:2-build",
54
+ "/alfred:3-sync"
55
+ ],
56
+ "current_stage": "initialized"
57
+ },
58
+ "project": {
59
+ "created_at": "{{CREATION_TIMESTAMP}}",
60
+ "description": "{{PROJECT_DESCRIPTION}}",
61
+ "initialized": true,
62
+ "locale": "ko",
63
+ "mode": "{{PROJECT_MODE}}",
64
+ "name": "{{PROJECT_NAME}}",
65
+ "moai_adk_version": "{{MOAI_VERSION}}",
66
+ "optimized": false
67
+ },
68
+ "tags": {
69
+ "auto_sync": true,
70
+ "storage_type": "code_scan",
71
+ "categories": [
72
+ "REQ",
73
+ "DESIGN",
74
+ "TASK",
75
+ "TEST",
76
+ "FEATURE",
77
+ "API",
78
+ "UI",
79
+ "DATA"
80
+ ],
81
+ "code_scan_policy": {
82
+ "no_intermediate_cache": true,
83
+ "realtime_validation": true,
84
+ "scan_tools": ["rg", "grep"],
85
+ "scan_command": "rg '@TAG' -n",
86
+ "philosophy": "TAG의 진싀은 μ½”λ“œ μžμ²΄μ—λ§Œ 쑴재"
87
+ }
88
+ }
89
+ }