moai-adk 0.3.12__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 (92) 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/project/detector.py +14 -2
  12. moai_adk/core/quality/__init__.py +1 -1
  13. moai_adk/core/quality/trust_checker.py +1 -1
  14. moai_adk/core/quality/validators/__init__.py +1 -1
  15. moai_adk/core/quality/validators/base_validator.py +1 -1
  16. moai_adk/core/template/__init__.py +1 -1
  17. moai_adk/core/template/backup.py +2 -1
  18. moai_adk/core/template/config.py +24 -0
  19. moai_adk/core/template/languages.py +1 -1
  20. moai_adk/core/template/merger.py +58 -1
  21. moai_adk/core/template/processor.py +41 -12
  22. moai_adk/templates/.claude/agents/alfred/cc-manager.md +558 -3
  23. moai_adk/templates/.claude/commands/alfred/0-project.md +480 -12
  24. moai_adk/templates/.claude/commands/alfred/1-plan.md +563 -0
  25. moai_adk/templates/.claude/commands/alfred/1-spec.md +15 -516
  26. moai_adk/templates/.claude/commands/alfred/2-build.md +15 -417
  27. moai_adk/templates/.claude/commands/alfred/2-run.md +460 -0
  28. moai_adk/templates/.claude/hooks/alfred/handlers/session.py +12 -0
  29. moai_adk/templates/.claude/skills/moai-claude-code/SKILL.md +67 -0
  30. moai_adk/templates/.claude/skills/moai-claude-code/examples.md +513 -0
  31. moai_adk/templates/.claude/skills/moai-claude-code/reference.md +419 -0
  32. moai_adk/templates/.claude/skills/moai-claude-code/templates/agent-full.md +332 -0
  33. moai_adk/templates/.claude/skills/moai-claude-code/templates/command-full.md +384 -0
  34. moai_adk/templates/.claude/skills/moai-claude-code/templates/plugin-full.json +349 -0
  35. moai_adk/templates/.claude/skills/moai-claude-code/templates/settings-full.json +552 -0
  36. moai_adk/templates/.claude/skills/moai-claude-code/templates/skill-full.md +499 -0
  37. moai_adk/templates/.claude/skills/moai-domain-backend/SKILL.md +68 -0
  38. moai_adk/templates/.claude/skills/moai-domain-cli-tool/SKILL.md +64 -0
  39. moai_adk/templates/.claude/skills/moai-domain-data-science/SKILL.md +67 -0
  40. moai_adk/templates/.claude/skills/moai-domain-database/SKILL.md +69 -0
  41. moai_adk/templates/.claude/skills/moai-domain-devops/SKILL.md +69 -0
  42. moai_adk/templates/.claude/skills/moai-domain-frontend/SKILL.md +68 -0
  43. moai_adk/templates/.claude/skills/moai-domain-ml/SKILL.md +67 -0
  44. moai_adk/templates/.claude/skills/moai-domain-mobile-app/SKILL.md +62 -0
  45. moai_adk/templates/.claude/skills/moai-domain-security/SKILL.md +74 -0
  46. moai_adk/templates/.claude/skills/moai-domain-web-api/SKILL.md +66 -0
  47. moai_adk/templates/.claude/skills/moai-essentials-debug/SKILL.md +66 -0
  48. moai_adk/templates/.claude/skills/moai-essentials-perf/SKILL.md +68 -0
  49. moai_adk/templates/.claude/skills/moai-essentials-refactor/SKILL.md +59 -0
  50. moai_adk/templates/.claude/skills/moai-essentials-review/SKILL.md +76 -0
  51. moai_adk/templates/.claude/skills/moai-foundation-ears/SKILL.md +61 -0
  52. moai_adk/templates/.claude/skills/moai-foundation-git/SKILL.md +63 -0
  53. moai_adk/templates/.claude/skills/moai-foundation-langs/SKILL.md +64 -0
  54. moai_adk/templates/.claude/skills/moai-foundation-specs/SKILL.md +61 -0
  55. moai_adk/templates/.claude/skills/moai-foundation-tags/SKILL.md +54 -0
  56. moai_adk/templates/.claude/skills/moai-foundation-trust/SKILL.md +46 -0
  57. moai_adk/templates/.claude/skills/moai-lang-c/SKILL.md +68 -0
  58. moai_adk/templates/.claude/skills/moai-lang-clojure/SKILL.md +68 -0
  59. moai_adk/templates/.claude/skills/moai-lang-cpp/SKILL.md +69 -0
  60. moai_adk/templates/.claude/skills/moai-lang-csharp/SKILL.md +67 -0
  61. moai_adk/templates/.claude/skills/moai-lang-dart/SKILL.md +66 -0
  62. moai_adk/templates/.claude/skills/moai-lang-elixir/SKILL.md +66 -0
  63. moai_adk/templates/.claude/skills/moai-lang-go/SKILL.md +67 -0
  64. moai_adk/templates/.claude/skills/moai-lang-haskell/SKILL.md +67 -0
  65. moai_adk/templates/.claude/skills/moai-lang-java/SKILL.md +66 -0
  66. moai_adk/templates/.claude/skills/moai-lang-javascript/SKILL.md +64 -0
  67. moai_adk/templates/.claude/skills/moai-lang-julia/SKILL.md +66 -0
  68. moai_adk/templates/.claude/skills/moai-lang-kotlin/SKILL.md +67 -0
  69. moai_adk/templates/.claude/skills/moai-lang-lua/SKILL.md +65 -0
  70. moai_adk/templates/.claude/skills/moai-lang-php/SKILL.md +65 -0
  71. moai_adk/templates/.claude/skills/moai-lang-python/SKILL.md +64 -0
  72. moai_adk/templates/.claude/skills/moai-lang-r/SKILL.md +66 -0
  73. moai_adk/templates/.claude/skills/moai-lang-ruby/SKILL.md +66 -0
  74. moai_adk/templates/.claude/skills/moai-lang-rust/SKILL.md +68 -0
  75. moai_adk/templates/.claude/skills/moai-lang-scala/SKILL.md +68 -0
  76. moai_adk/templates/.claude/skills/moai-lang-shell/SKILL.md +67 -0
  77. moai_adk/templates/.claude/skills/moai-lang-sql/SKILL.md +68 -0
  78. moai_adk/templates/.claude/skills/moai-lang-swift/SKILL.md +67 -0
  79. moai_adk/templates/.claude/skills/moai-lang-typescript/SKILL.md +64 -0
  80. moai_adk/templates/.claude/skills/scripts/standardize_skills.py +166 -0
  81. moai_adk/templates/.claude/skills/scripts/verify_standardization.sh +43 -0
  82. moai_adk/templates/CLAUDE.md +153 -0
  83. moai_adk/templates/__init__.py +1 -1
  84. moai_adk/utils/__init__.py +1 -1
  85. moai_adk/utils/banner.py +1 -1
  86. moai_adk/utils/logger.py +1 -1
  87. {moai_adk-0.3.12.dist-info → moai_adk-0.4.0.dist-info}/METADATA +244 -3
  88. moai_adk-0.4.0.dist-info/RECORD +145 -0
  89. moai_adk-0.3.12.dist-info/RECORD +0 -90
  90. {moai_adk-0.3.12.dist-info → moai_adk-0.4.0.dist-info}/WHEEL +0 -0
  91. {moai_adk-0.3.12.dist-info → moai_adk-0.4.0.dist-info}/entry_points.txt +0 -0
  92. {moai_adk-0.3.12.dist-info → moai_adk-0.4.0.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,419 @@
1
+ # Claude Code 컴포넌트 작성 가이드
2
+
3
+ > **5가지 컴포넌트의 완벽한 작성 가이드**
4
+ >
5
+ > Agent, Command, Skill, Plugin, Settings
6
+
7
+ ---
8
+
9
+ ## 📋 목차
10
+
11
+ 1. [Agent 작성 가이드](#1-agent-작성-가이드)
12
+ 2. [Command 작성 가이드](#2-command-작성-가이드)
13
+ 3. [Skill 작성 가이드](#3-skill-작성-가이드)
14
+ 4. [Plugin 설정 가이드](#4-plugin-설정-가이드)
15
+ 5. [Settings 설정 가이드](#5-settings-설정-가이드)
16
+
17
+ ---
18
+
19
+ ## 1. Agent 작성 가이드
20
+
21
+ ### 📐 파일 구조
22
+
23
+ **위치**: `.claude/agents/{agent-name}.md`
24
+
25
+ **YAML Frontmatter** (필수):
26
+ ```yaml
27
+ ---
28
+ name: {agent-name} # kebab-case
29
+ description: "Use when: {trigger}" # "Use when:" 패턴 필수
30
+ tools: Read, Write, Edit # 필요한 도구만
31
+ model: sonnet # sonnet|haiku
32
+ ---
33
+ ```
34
+
35
+ ### 🎭 에이전트 페르소나
36
+
37
+ **필수 요소**:
38
+ - **아이콘**: 시각적 식별자 (emoji)
39
+ - **직무**: IT 전문 직무 (System Architect, QA Lead 등)
40
+ - **전문 영역**: 구체적 전문 분야
41
+ - **역할**: 에이전트 책임
42
+ - **목표**: 달성하려는 목표
43
+
44
+ **예시**:
45
+ ```markdown
46
+ ## 🎭 에이전트 페르소나
47
+
48
+ **아이콘**: 🏗️
49
+ **직무**: 시스템 아키텍트 (System Architect)
50
+ **전문 영역**: SPEC 작성, EARS 명세, 요구사항 분석
51
+ **역할**: 비즈니스 요구사항을 체계적인 SPEC으로 변환
52
+ **목표**: 명확하고 테스트 가능한 SPEC 문서 작성
53
+ ```
54
+
55
+ ### ⚙️ 모델 선택 가이드
56
+
57
+ | 모델 | 사용 시점 | 예시 |
58
+ |------|----------|------|
59
+ | **sonnet** | 복잡한 판단, 설계, 창의성 | SPEC 작성, TDD 전략, 디버깅 |
60
+ | **haiku** | 빠른 처리, 패턴 기반 작업 | 문서 동기화, TAG 스캔, 린팅 |
61
+
62
+ ### 🛠️ 도구 선택 가이드
63
+
64
+ | 작업 유형 | 필수 도구 |
65
+ |----------|----------|
66
+ | **분석** | Read, Grep, Glob |
67
+ | **문서 작성** | Read, Write, Edit |
68
+ | **코드 구현** | Read, Write, Edit, MultiEdit |
69
+ | **Git 작업** | Read, Bash(git:*) |
70
+ | **검증** | Read, Grep, Bash |
71
+
72
+ ### ✅ 검증 체크리스트
73
+
74
+ - [ ] YAML frontmatter 존재
75
+ - [ ] `name`: kebab-case
76
+ - [ ] `description`: "Use when:" 패턴 포함
77
+ - [ ] `tools`: 필요한 도구만
78
+ - [ ] `model`: sonnet 또는 haiku
79
+ - [ ] 에이전트 페르소나 섹션 포함
80
+ - [ ] 워크플로우 구체적 단계 포함
81
+
82
+ ---
83
+
84
+ ## 2. Command 작성 가이드
85
+
86
+ ### 📐 파일 구조
87
+
88
+ **위치**: `.claude/commands/{command-name}.md`
89
+
90
+ **YAML Frontmatter** (필수):
91
+ ```yaml
92
+ ---
93
+ name: {command-name} # kebab-case
94
+ description: {한 줄 설명} # 명확한 목적
95
+ argument-hint: [{param}] # 선택적
96
+ allowed-tools: # 필요한 도구만
97
+ - Read
98
+ - Write
99
+ - Task
100
+ ---
101
+ ```
102
+
103
+ ### 🔧 명명 규칙
104
+
105
+ - **kebab-case** 사용
106
+ - **동사로 시작** (run, check, deploy, create)
107
+ - **명확하고 구체적**
108
+
109
+ **올바른 예시**:
110
+ - ✅ `deploy-production`
111
+ - ✅ `run-tests`
112
+ - ✅ `alfred:1-spec`
113
+
114
+ **잘못된 예시**:
115
+ - ❌ `doSomething` (camelCase)
116
+ - ❌ `cmd1` (불명확)
117
+
118
+ ### 📋 표준 섹션 구조
119
+
120
+ ```markdown
121
+ # {Command Title}
122
+
123
+ {Brief description}
124
+
125
+ ## 🎯 커맨드 목적
126
+ {Detailed purpose}
127
+
128
+ ## 💡 사용 예시
129
+ \`\`\`bash
130
+ /{command-name} {example-args}
131
+ \`\`\`
132
+
133
+ ## 📋 실행 흐름
134
+ 1. **Phase 1**: {Planning}
135
+ 2. **Phase 2**: {Execution}
136
+
137
+ ## 🔗 연관 에이전트
138
+ - **Primary**: {agent-name} - {role}
139
+
140
+ ## ⚠️ 주의사항
141
+ - {Warning 1}
142
+
143
+ ## 📋 다음 단계
144
+ - {Next step}
145
+ ```
146
+
147
+ ### ✅ 검증 체크리스트
148
+
149
+ - [ ] YAML frontmatter 존재
150
+ - [ ] `name`: kebab-case
151
+ - [ ] `description`: 한 줄 설명
152
+ - [ ] `allowed-tools`: 배열 형식
153
+ - [ ] Bash 도구 사용 시 구체적 패턴 (`Bash(git:*)`)
154
+ - [ ] 사용 예시 포함
155
+ - [ ] 실행 흐름 명시
156
+
157
+ ---
158
+
159
+ ## 3. Skill 작성 가이드
160
+
161
+ ### 📐 파일 구조
162
+
163
+ **위치**: `.claude/skills/{skill-name}/SKILL.md`
164
+
165
+ **YAML Frontmatter** (필수):
166
+ ```yaml
167
+ ---
168
+ name: {skill-name} # kebab-case
169
+ description: {한 줄 설명} # 동사로 시작, 200자 이하
170
+ model: haiku # haiku|sonnet
171
+ allowed-tools: # 최소 권한
172
+ - Read
173
+ - Write
174
+ ---
175
+ ```
176
+
177
+ ### 🎯 description 작성법
178
+
179
+ **중요**: Claude가 언제 스킬을 호출할지 결정하는 핵심 필드 (200자 이하)
180
+
181
+ **좋은 예시**:
182
+ - ✅ "TAG 마커 직접 스캔 및 인벤토리 생성 (CODE-FIRST 원칙)"
183
+ - ✅ "프로젝트 유형별 최적 기능 선택 (37개 스킬 → 3~5개 자동 필터링)"
184
+
185
+ **나쁜 예시**:
186
+ - ❌ "스킬입니다" (너무 모호)
187
+ - ❌ "This skill does something" (비구체적)
188
+
189
+ ### 📁 선택적 파일 구조
190
+
191
+ ```
192
+ .claude/skills/{skill-name}/
193
+ ├── SKILL.md (required)
194
+ ├── reference.md (optional)
195
+ ├── examples.md (optional)
196
+ ├── scripts/ (optional)
197
+ │ └── helper.py
198
+ └── templates/ (optional)
199
+ └── template.txt
200
+ ```
201
+
202
+ ### ✅ 검증 체크리스트
203
+
204
+ - [ ] YAML frontmatter 존재
205
+ - [ ] `name`: kebab-case
206
+ - [ ] `description`: 200자 이하, 구체적
207
+ - [ ] `model`: haiku 또는 sonnet
208
+ - [ ] `allowed-tools`: 최소 권한 원칙
209
+ - [ ] 제목 (# {Skill Title}) 존재
210
+ - [ ] 목적 섹션 포함
211
+
212
+ ---
213
+
214
+ ## 4. Plugin 설정 가이드
215
+
216
+ ### 📐 파일 구조
217
+
218
+ **위치**: `.claude/settings.json` (mcpServers 섹션)
219
+
220
+ **기본 구조**:
221
+ ```json
222
+ {
223
+ "mcpServers": {
224
+ "{plugin-name}": {
225
+ "command": "npx",
226
+ "args": ["-y", "{plugin-package}"],
227
+ "env": {
228
+ "API_KEY": "${API_KEY}"
229
+ }
230
+ }
231
+ }
232
+ }
233
+ ```
234
+
235
+ ### 🌟 추천 Plugin
236
+
237
+ | Plugin | 용도 | MoAI-ADK 활용 |
238
+ |--------|------|--------------|
239
+ | **@modelcontextprotocol/server-github** | GitHub API | PR/Issue 자동 생성 |
240
+ | **@modelcontextprotocol/server-filesystem** | 파일 시스템 | `.moai/` 안전 접근 |
241
+ | **@modelcontextprotocol/server-brave-search** | 웹 검색 | 기술 문서 참조 |
242
+
243
+ ### 🔒 보안 원칙
244
+
245
+ #### 필수 체크리스트
246
+ - [ ] 환경변수 사용 (하드코딩 금지)
247
+ - [ ] 경로 제한 (Filesystem MCP)
248
+ - [ ] 최소 권한
249
+ - [ ] 민감 정보 차단 (`.env`, `secrets/`)
250
+ - [ ] 출처 신뢰성 (공식 또는 검증된 Plugin)
251
+
252
+ #### 안전한 설정
253
+ ```json
254
+ {
255
+ "mcpServers": {
256
+ "github": {
257
+ "env": {
258
+ "GITHUB_TOKEN": "${GITHUB_TOKEN}" // ✅ 환경변수
259
+ }
260
+ },
261
+ "filesystem": {
262
+ "args": [
263
+ "-y",
264
+ "@modelcontextprotocol/server-filesystem",
265
+ "${CLAUDE_PROJECT_DIR}/.moai", // ✅ 제한된 경로
266
+ "${CLAUDE_PROJECT_DIR}/src"
267
+ ]
268
+ }
269
+ }
270
+ }
271
+ ```
272
+
273
+ ### ✅ 검증 체크리스트
274
+
275
+ - [ ] JSON 구문 오류 없음
276
+ - [ ] 환경변수 사용 (하드코딩 금지)
277
+ - [ ] 파일 시스템 경로 제한
278
+ - [ ] 필요한 환경변수 설정 완료
279
+
280
+ ---
281
+
282
+ ## 5. Settings 설정 가이드
283
+
284
+ ### 📐 파일 구조
285
+
286
+ **위치**: `.claude/settings.json`
287
+
288
+ **주요 섹션**:
289
+ ```json
290
+ {
291
+ "permissions": {
292
+ "defaultMode": "default",
293
+ "allow": [...],
294
+ "ask": [...],
295
+ "deny": [...]
296
+ },
297
+ "hooks": {
298
+ "SessionStart": [...],
299
+ "PreToolUse": [...]
300
+ },
301
+ "mcpServers": {...}
302
+ }
303
+ ```
304
+
305
+ ### 🔒 3단계 권한 관리
306
+
307
+ #### 1. `allow` - 자동 승인
308
+ 안전하고 필수적인 도구만 허용:
309
+ ```json
310
+ "allow": [
311
+ "Read",
312
+ "Write",
313
+ "Edit",
314
+ "Grep",
315
+ "Glob",
316
+ "Bash(git:*)",
317
+ "Bash(pytest:*)"
318
+ ]
319
+ ```
320
+
321
+ #### 2. `ask` - 사용자 확인
322
+ 중요하거나 변경 가능성이 있는 작업:
323
+ ```json
324
+ "ask": [
325
+ "Bash(git push:*)",
326
+ "Bash(pip install:*)",
327
+ "Bash(rm:*)"
328
+ ]
329
+ ```
330
+
331
+ #### 3. `deny` - 절대 금지
332
+ 위험하거나 민감한 작업 차단:
333
+ ```json
334
+ "deny": [
335
+ "Read(./.env)",
336
+ "Read(./secrets/**)",
337
+ "Bash(sudo:*)",
338
+ "Bash(rm -rf:*)"
339
+ ]
340
+ ```
341
+
342
+ ### 🪝 훅 시스템
343
+
344
+ #### SessionStart 훅
345
+ 세션 시작 시 프로젝트 정보 표시:
346
+ ```json
347
+ {
348
+ "hooks": {
349
+ "SessionStart": [
350
+ {
351
+ "hooks": [
352
+ {
353
+ "command": "node $CLAUDE_PROJECT_DIR/.claude/hooks/alfred/session-notice.cjs",
354
+ "type": "command"
355
+ }
356
+ ],
357
+ "matcher": "*"
358
+ }
359
+ ]
360
+ }
361
+ }
362
+ ```
363
+
364
+ #### PreToolUse 훅
365
+ 도구 실행 전 검증 및 차단:
366
+ ```json
367
+ {
368
+ "hooks": {
369
+ "PreToolUse": [
370
+ {
371
+ "hooks": [
372
+ {
373
+ "command": "node $CLAUDE_PROJECT_DIR/.claude/hooks/alfred/pre-write-guard.cjs",
374
+ "type": "command"
375
+ }
376
+ ],
377
+ "matcher": "Edit|Write|MultiEdit"
378
+ }
379
+ ]
380
+ }
381
+ }
382
+ ```
383
+
384
+ ### ✅ 검증 체크리스트
385
+
386
+ - [ ] JSON 구문 오류 없음
387
+ - [ ] `allow`: 필수 도구만
388
+ - [ ] `ask`: 중요한 작업
389
+ - [ ] `deny`: 민감한 파일/명령
390
+ - [ ] Bash 패턴 구체화 (`Bash(git:*)`)
391
+ - [ ] 훅 파일 존재 및 실행 권한
392
+
393
+ ---
394
+
395
+ ## 📊 베스트 프랙티스
396
+
397
+ ### 공통 원칙
398
+
399
+ 1. **최소 권한 원칙**
400
+ - 필요한 도구만 명시
401
+ - Bash 사용 시 구체적 패턴
402
+
403
+ 2. **공식 표준 준수**
404
+ - YAML frontmatter 필수 필드
405
+ - 파일명 규칙 (kebab-case)
406
+
407
+ 3. **보안 우선**
408
+ - 민감 정보 환경변수로 관리
409
+ - 위험한 작업 차단
410
+
411
+ 4. **문서화**
412
+ - 명확한 설명
413
+ - 구체적 예시
414
+ - 검증 방법
415
+
416
+ ---
417
+
418
+ **최종 업데이트**: 2025-10-19
419
+ **작성자**: @Alfred