aiwf 0.3.15 → 0.3.17

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.
Files changed (45) hide show
  1. package/README.ko.md +4 -5
  2. package/README.md +90 -196
  3. package/docs/ADR_MANAGEMENT_GUIDE.ko.md +602 -0
  4. package/docs/ADR_MANAGEMENT_GUIDE.md +602 -0
  5. package/docs/API_REFERENCE_FULL.ko.md +1135 -0
  6. package/docs/API_REFERENCE_FULL.md +1135 -0
  7. package/docs/ARCHITECTURE.ko.md +314 -0
  8. package/docs/ARCHITECTURE.md +314 -0
  9. package/docs/EXAMPLES.ko.md +695 -0
  10. package/docs/EXAMPLES.md +12 -12
  11. package/docs/GETTING_STARTED.ko.md +219 -0
  12. package/docs/GETTING_STARTED.md +19 -26
  13. package/docs/MODULE_MANAGEMENT_GUIDE.ko.md +289 -0
  14. package/docs/MODULE_MANAGEMENT_GUIDE.md +289 -0
  15. package/docs/PERFORMANCE_GUIDELINES.ko.md +388 -0
  16. package/docs/PRD.ko.md +2 -2
  17. package/docs/PRD.md +2 -2
  18. package/docs/TROUBLESHOOTING.ko.md +366 -0
  19. package/docs/YOLO_SYSTEM_GUIDE.ko.md +542 -0
  20. package/docs/YOLO_SYSTEM_GUIDE.md +542 -0
  21. package/package.json +50 -2
  22. package/src/DEPENDENCY_MAP.md +90 -0
  23. package/src/lib/installer.js +1 -0
  24. package/src/lib/resources/templates/api-server/template/src/controllers/aiwfController.ts +0 -14
  25. package/src/lib/resources/templates/api-server/template/src/routes/aiwf.ts +0 -11
  26. package/src/lib/resources/templates/web-app/template/src/pages/AiwfDashboard.tsx +2 -5
  27. package/src/lib/resources/utils/token-reporter.js +2 -3
  28. package/src/utils/checkpoint-manager.js +11 -1
  29. package/src/utils/engineering-guard.js +11 -1
  30. package/templates/api-server/template/src/controllers/aiwfController.ts +0 -14
  31. package/templates/api-server/template/src/routes/aiwf.ts +0 -11
  32. package/templates/web-app/template/src/pages/AiwfDashboard.tsx +2 -5
  33. package/docs/guides/feature-git-integration-guide-ko.md +0 -481
  34. package/docs/guides/feature-git-integration-guide.md +0 -481
  35. package/src/commands/cache-templates.js +0 -209
  36. package/src/commands/create-offline.js +0 -86
  37. package/src/commands/state-refactored.js +0 -419
  38. package/src/lib/resources/commands/feature-ledger.js +0 -565
  39. package/src/lib/resources/commands/feature_commit_report.js +0 -370
  40. package/src/lib/resources/commands/scan_git_history.js +0 -234
  41. package/src/lib/resources/commands/sync_feature_commits.js +0 -154
  42. package/src/lib/resources/templates/web-app/template/src/components/aiwf/FeatureLedger.tsx +0 -93
  43. package/src/lib/resources/utils/feature-updater.js +0 -271
  44. package/src/utils/git-integration.js +0 -173
  45. package/templates/web-app/template/src/components/aiwf/FeatureLedger.tsx +0 -93
package/docs/EXAMPLES.md CHANGED
@@ -38,13 +38,13 @@ aiwf install
38
38
  #### Step 2: Define Project Vision
39
39
 
40
40
  ```bash
41
- /project:aiwf:create_project_doc "E-commerce Platform" "Modern e-commerce solution with AI-powered recommendations"
41
+ /project:aiwf:aiwf_create_prd "E-commerce Platform" "Modern e-commerce solution with AI-powered recommendations"
42
42
  ```
43
43
 
44
44
  #### Step 3: Plan First Milestone
45
45
 
46
46
  ```bash
47
- /project:aiwf:plan_milestone "MVP Core Features"
47
+ /project:aiwf:aiwf_create_milestone_plan "MVP Core Features"
48
48
  ```
49
49
 
50
50
  **Claude Code will help you define:**
@@ -75,7 +75,7 @@ aiwf install
75
75
  "Please design the overall architecture for our e-commerce platform"
76
76
 
77
77
  # Create feature for authentication
78
- /project:aiwf:create_feature_ledger "User Authentication System"
78
+ /project:aiwf:aiwf_create_general_task "User Authentication System"
79
79
  # Returns: FL001
80
80
 
81
81
  # Create Git branch
@@ -94,7 +94,7 @@ git checkout -b feature/FL001-user-authentication
94
94
  #### Step 1: Create Feature Entry
95
95
 
96
96
  ```bash
97
- /project:aiwf:create_feature_ledger "Real-time Notification System"
97
+ /project:aiwf:aiwf_create_general_task "Real-time Notification System"
98
98
  # Returns: FL002
99
99
 
100
100
  # Create detailed feature specification
@@ -159,7 +159,7 @@ npm test
159
159
  "Create API documentation for the notification endpoints"
160
160
 
161
161
  # Generate feature changelog
162
- /project:aiwf:feature_changelog FL002
162
+ # Feature changelog command has been removed - use aiwf_project_review instead
163
163
  ```
164
164
 
165
165
  #### Step 7: Complete Feature
@@ -174,7 +174,7 @@ gh pr create --title "[FL002] Real-time Notification System" \
174
174
  --body "Implements WebSocket-based real-time notifications"
175
175
 
176
176
  # Update feature status
177
- /project:aiwf:update_feature_status FL002 completed
177
+ # Feature status commands have been removed - use aiwf_smart_complete instead
178
178
  ```
179
179
 
180
180
  ---
@@ -219,7 +219,7 @@ EOF
219
219
  **Developer A: Authentication Service**
220
220
  ```bash
221
221
  # Create feature
222
- /project:aiwf:create_feature_ledger "Authentication Microservice"
222
+ /project:aiwf:aiwf_create_general_task "Authentication Microservice"
223
223
  # FL003
224
224
 
225
225
  # Work on auth service
@@ -231,7 +231,7 @@ git checkout -b feature/FL003-auth-service
231
231
  **Developer B: Product Service**
232
232
  ```bash
233
233
  # Create feature
234
- /project:aiwf:create_feature_ledger "Product Catalog Microservice"
234
+ /project:aiwf:aiwf_create_general_task "Product Catalog Microservice"
235
235
  # FL004
236
236
 
237
237
  # Work on product service
@@ -375,12 +375,12 @@ if (regression.hasRegression) {
375
375
 
376
376
  ```bash
377
377
  # Create milestone for modernization
378
- /project:aiwf:plan_milestone "Legacy System Modernization"
378
+ /project:aiwf:aiwf_create_milestone_plan "Legacy System Modernization"
379
379
 
380
380
  # Break down into features
381
- /project:aiwf:create_feature_ledger "Database Migration" # FL005
382
- /project:aiwf:create_feature_ledger "API Modernization" # FL006
383
- /project:aiwf:create_feature_ledger "Frontend Refactoring" # FL007
381
+ /project:aiwf:aiwf_create_general_task "Database Migration" # T001
382
+ /project:aiwf:aiwf_create_general_task "API Modernization" # T002
383
+ /project:aiwf:aiwf_create_general_task "Frontend Refactoring" # T003
384
384
  ```
385
385
 
386
386
  #### Step 3: Incremental Refactoring
@@ -0,0 +1,219 @@
1
+ # AIWF 시작하기
2
+
3
+ [한국어](GETTING_STARTED.ko.md) | [English](GETTING_STARTED.md)
4
+
5
+ > AIWF를 사용하여 AI 지원 개발을 시작하는 빠른 가이드
6
+
7
+ ## 📋 목차
8
+
9
+ 1. [설치](#설치)
10
+ 2. [첫 프로젝트 설정](#첫-프로젝트-설정)
11
+ 3. [기본 워크플로우](#기본-워크플로우)
12
+ 4. [핵심 개념](#핵심-개념)
13
+ 5. [다음 단계](#다음-단계)
14
+
15
+ ## 설치
16
+
17
+ ### 전역 설치 (권장)
18
+
19
+ ```bash
20
+ npm install -g aiwf
21
+ ```
22
+
23
+ ### 프로젝트에 AIWF 설치
24
+
25
+ 프로젝트 디렉토리로 이동한 후:
26
+
27
+ ```bash
28
+ aiwf install
29
+ ```
30
+
31
+ 설치 프로그램이 다음을 안내합니다:
32
+ 1. **언어 선택**: 한국어 또는 영어 선택
33
+ 2. **프로젝트 설정**: 현재 디렉토리에 AIWF 초기화
34
+ 3. **Claude 명령어**: 언어별 명령어 설치
35
+ 4. **문서**: 가이드 및 템플릿 다운로드
36
+
37
+ ## 첫 프로젝트 설정
38
+
39
+ ### 1. 새 프로젝트 생성
40
+
41
+ ```bash
42
+ # 대화형 프로젝트 생성
43
+ aiwf create-project
44
+
45
+ # 템플릿 사용
46
+ aiwf create-project my-api --template api-server
47
+ aiwf create-project my-lib --template npm-library
48
+ aiwf create-project my-app --template web-app
49
+ ```
50
+
51
+ ### 2. 기존 프로젝트에 AIWF 추가
52
+
53
+ ```bash
54
+ cd my-existing-project
55
+ aiwf install
56
+ ```
57
+
58
+ ### 3. 프로젝트 상태 초기화
59
+
60
+ ```bash
61
+ aiwf state init
62
+ ```
63
+
64
+ ## 기본 워크플로우
65
+
66
+ ### 1. 마일스톤 계획
67
+
68
+ ```bash
69
+ # PRD로부터 마일스톤 생성
70
+ aiwf create-milestone-plan
71
+
72
+ # 마일스톤으로부터 스프린트 생성
73
+ aiwf create-sprints-from-milestone
74
+ ```
75
+
76
+ ### 2. 태스크 관리
77
+
78
+ ```bash
79
+ # 일반 태스크 생성
80
+ aiwf create-general-task "기능 구현" --description "사용자 인증 추가"
81
+
82
+ # 스프린트에 태스크 추가
83
+ aiwf add-sprint-task S01 "API 엔드포인트 구현"
84
+
85
+ # 스마트 태스크 시작
86
+ aiwf smart-start
87
+
88
+ # 태스크 완료
89
+ aiwf smart-complete
90
+ ```
91
+
92
+ ### 3. 상태 추적
93
+
94
+ ```bash
95
+ # 상태 업데이트
96
+ aiwf state update
97
+
98
+ # 현재 상태 확인
99
+ aiwf state show
100
+
101
+ # 다음 추천 작업
102
+ aiwf state next
103
+ ```
104
+
105
+ ### 4. YOLO 모드 (자율 실행)
106
+
107
+ ```bash
108
+ # 전체 스프린트 자동 실행
109
+ aiwf yolo
110
+
111
+ # 안전 모드로 실행
112
+ aiwf yolo --safe
113
+
114
+ # 드라이런 (시뮬레이션)
115
+ aiwf yolo --dry-run
116
+ ```
117
+
118
+ ## 핵심 개념
119
+
120
+ ### 📂 프로젝트 구조
121
+
122
+ ```
123
+ my-project/
124
+ ├── .aiwf/ # AIWF 구성 및 상태
125
+ │ ├── config.json # 프로젝트 설정
126
+ │ ├── state/ # 상태 파일
127
+ │ └── checkpoints/ # YOLO 체크포인트
128
+ ├── milestones/ # 마일스톤 정의
129
+ ├── sprints/ # 스프린트 정의
130
+ └── tasks/ # 태스크 파일
131
+ ```
132
+
133
+ ### 🎯 워크플로우 단계
134
+
135
+ 1. **계획 (Planning)**
136
+ - PRD 작성
137
+ - 마일스톤 정의
138
+ - 스프린트 분할
139
+
140
+ 2. **개발 (Development)**
141
+ - 태스크 생성 및 할당
142
+ - 코드 구현
143
+ - 테스트 작성
144
+
145
+ 3. **리뷰 (Review)**
146
+ - 코드 리뷰
147
+ - 테스트 실행
148
+ - 품질 평가
149
+
150
+ 4. **배포 (Deployment)**
151
+ - 최종 검증
152
+ - 릴리스 준비
153
+ - 문서 업데이트
154
+
155
+ ### 🤖 AI 페르소나
156
+
157
+ AIWF는 전문 AI 페르소나를 제공합니다:
158
+
159
+ - **Architect**: 시스템 설계 및 아키텍처
160
+ - **Backend**: 백엔드 개발 및 API
161
+ - **Frontend**: UI/UX 및 프론트엔드
162
+ - **Security**: 보안 검토 및 개선
163
+ - **Data Analyst**: 데이터 분석 및 최적화
164
+
165
+ 페르소나 사용 예:
166
+
167
+ ```bash
168
+ # 아키텍처 리뷰
169
+ aiwf persona apply architect
170
+
171
+ # 보안 검토
172
+ aiwf persona apply security
173
+ ```
174
+
175
+ ### 💾 체크포인트 시스템
176
+
177
+ YOLO 모드 실행 중 진행 상황 자동 저장:
178
+
179
+ ```bash
180
+ # 체크포인트 목록
181
+ aiwf checkpoint list
182
+
183
+ # 특정 체크포인트에서 재개
184
+ aiwf yolo --resume checkpoint-id
185
+ ```
186
+
187
+ ## 다음 단계
188
+
189
+ ### 📚 추천 문서
190
+
191
+ 1. **[명령어 가이드](COMMANDS_GUIDE.ko.md)** - 모든 AIWF 명령어 상세 설명
192
+ 2. **[상태 관리 가이드](STATE_MANAGEMENT_GUIDE.ko.md)** - 고급 상태 관리 기법
193
+ 3. **[AI 페르소나 가이드](guides/ai-personas-guide-ko.md)** - 페르소나 활용법
194
+ 4. **[독립 스프린트 가이드](guides/independent-sprint-guide-ko.md)** - YOLO 최적화 스프린트
195
+
196
+ ### 🎓 학습 경로
197
+
198
+ 1. **초급**: 기본 명령어와 워크플로우 익히기
199
+ 2. **중급**: 상태 관리와 AI 페르소나 활용
200
+ 3. **고급**: YOLO 모드와 커스터마이징
201
+
202
+ ### 💡 팁
203
+
204
+ - 항상 `aiwf state update`로 상태 동기화
205
+ - 큰 작업은 작은 태스크로 분할
206
+ - YOLO 모드는 충분한 컨텍스트와 함께 사용
207
+ - 정기적으로 체크포인트 확인
208
+
209
+ ## 🆘 도움말
210
+
211
+ 문제가 발생하면:
212
+
213
+ 1. `aiwf --help` 명령어 도움말 확인
214
+ 2. [문제 해결 가이드](TROUBLESHOOTING.ko.md) 참조
215
+ 3. [GitHub 이슈](https://github.com/moonklabs/aiwf/issues) 제출
216
+
217
+ ---
218
+
219
+ 🎉 이제 AIWF로 AI 지원 개발을 시작할 준비가 되었습니다!
@@ -92,7 +92,7 @@ Claude will help you set up the project structure and create initial documentati
92
92
  ### Step 2: Define Your Project Vision
93
93
 
94
94
  ```bash
95
- /project:aiwf:create_project_doc "Task Manager" "A simple task management app with CRUD operations"
95
+ /project:aiwf:aiwf_create_prd "Task Manager" "A simple task management app with CRUD operations"
96
96
  ```
97
97
 
98
98
  This creates:
@@ -102,7 +102,7 @@ This creates:
102
102
  ### Step 3: Plan Your First Milestone
103
103
 
104
104
  ```bash
105
- /project:aiwf:plan_milestone "Basic Task Management"
105
+ /project:aiwf:aiwf_create_milestone_plan "Basic Task Management"
106
106
  ```
107
107
 
108
108
  Claude will guide you through:
@@ -169,7 +169,6 @@ my-project/
169
169
  │ │ └── S03_M01_integration_testing/
170
170
  │ ├── 04_GENERAL_TASKS/ # Non-sprint tasks
171
171
  │ ├── 05_ARCHITECTURAL_DECISIONS/ # ADRs
172
- │ ├── 06_FEATURE_LEDGERS/ # Feature tracking
173
172
  │ └── 99_TEMPLATES/ # Reusable templates
174
173
  ├── .claude/commands/aiwf/ # Claude commands
175
174
  ├── src/ # Your source code
@@ -198,7 +197,7 @@ my-project/
198
197
 
199
198
  | Command | Description |
200
199
  |---------|-------------|
201
- | `/project:aiwf:plan_milestone` | Create a new milestone |
200
+ | `/project:aiwf:aiwf_create_milestone_plan` | Create a new milestone |
202
201
  | `/project:aiwf:create_sprints_from_milestone` | Generate sprints |
203
202
  | `/project:aiwf:sprint_status` | Check sprint progress |
204
203
 
@@ -211,13 +210,12 @@ my-project/
211
210
  | `/project:aiwf:list_tasks` | List tasks in sprint |
212
211
  | `/project:aiwf:complete_task` | Mark task as done |
213
212
 
214
- ### Feature Management
213
+ ### GitHub Integration
215
214
 
216
215
  | Command | Description |
217
216
  |---------|-------------|
218
- | `/project:aiwf:create_feature_ledger` | Create feature entry |
219
- | `/project:aiwf:update_feature_status` | Update feature status |
220
- | `/project:aiwf:feature_changelog` | Generate feature changelog |
217
+ | `/project:aiwf:aiwf_issue_create` | Create GitHub issue |
218
+ | `/project:aiwf:aiwf_pr_create` | Create pull request |
221
219
 
222
220
  ### AI Personas
223
221
 
@@ -225,25 +223,20 @@ AIWF includes an AI Persona system that optimizes Claude Code's behavior for dif
225
223
 
226
224
  | Command | Description |
227
225
  |---------|-------------|
228
- | `/project:aiwf:ai_persona:architect` | System design mode |
229
- | `/project:aiwf:ai_persona:debugger` | Debugging mode |
230
- | `/project:aiwf:ai_persona:reviewer` | Code review mode |
231
- | `/project:aiwf:ai_persona:documenter` | Documentation mode |
232
- | `/project:aiwf:ai_persona:optimizer` | Performance optimization |
233
- | `/project:aiwf:ai_persona:developer` | General development (default) |
226
+ | `/project:aiwf:aiwf_persona_architect` | System design and architecture |
227
+ | `/project:aiwf:aiwf_persona_security` | Security-focused development |
228
+ | `/project:aiwf:aiwf_persona_frontend` | Frontend development |
229
+ | `/project:aiwf:aiwf_persona_backend` | Backend development |
230
+ | `/project:aiwf:aiwf_persona_data_analyst` | Data analysis and insights |
234
231
 
235
- #### Additional Persona Commands
232
+ #### Core Workflow Commands
236
233
 
237
234
  | Command | Description |
238
235
  |---------|-------------|
239
- | `/project:aiwf:ai_persona:switch <name>` | Switch to specific persona |
240
- | `/project:aiwf:ai_persona:status` | View current persona |
241
- | `/project:aiwf:ai_persona:list` | List all available personas |
242
- | `/project:aiwf:ai_persona:auto on/off` | Enable/disable auto-detection |
243
- | `/project:aiwf:ai_persona:detect <task>` | Detect optimal persona for task |
244
- | `/project:aiwf:ai_persona:report` | Generate performance report |
245
- | `/project:aiwf:ai_persona:stats [persona]` | View persona statistics |
246
- | `/project:aiwf:ai_persona:reset` | Reset to default persona |
236
+ | `/project:aiwf:aiwf_yolo` | Autonomous task execution |
237
+ | `/project:aiwf:aiwf_code_review` | Automated code review |
238
+ | `/project:aiwf:aiwf_test` | Run project tests |
239
+ | `/project:aiwf:aiwf_validate_state` | Validate workflow state |
247
240
 
248
241
  See the [AI Personas Guide](guides/ai-personas-guide.md) for detailed information.
249
242
 
@@ -437,9 +430,9 @@ echo "Custom rules" > .aiwf/personas/custom.json
437
430
  ## Quick Reference Card
438
431
 
439
432
  ```bash
440
- # Start new feature
441
- /project:aiwf:create_feature_ledger "Feature Name" # → FL001
442
- git checkout -b feature/FL001-feature-name
433
+ # Start new task
434
+ /project:aiwf:aiwf_create_general_task "Feature Name" # → T001
435
+ git checkout -b feature/T001-feature-name
443
436
 
444
437
  # Work on tasks
445
438
  /project:aiwf:list_tasks S01
@@ -0,0 +1,289 @@
1
+ # AIWF 모듈 관리 가이드
2
+
3
+ > AIWF의 모듈러 아키텍처와 의존성을 이해하고 관리하기 위한 종합 가이드
4
+
5
+ [한국어](MODULE_MANAGEMENT_GUIDE.ko.md) | [English](MODULE_MANAGEMENT_GUIDE.md)
6
+
7
+ ## 목차
8
+
9
+ 1. [개요](#개요)
10
+ 2. [모듈 분류](#모듈-분류)
11
+ 3. [의존성 매트릭스](#의존성-매트릭스)
12
+ 4. [중요 모듈](#중요-모듈)
13
+ 5. [안전한 모듈 관리](#안전한-모듈-관리)
14
+ 6. [문제 해결](#문제-해결)
15
+ 7. [모범 사례](#모범-사례)
16
+
17
+ ## 개요
18
+
19
+ AIWF는 기능이 전문화된 모듈들에 분산되어 있는 모듈러 아키텍처를 따릅니다. 이러한 모듈들 간의 의존성 관계를 이해하는 것은 다음과 같은 작업에 중요합니다:
20
+
21
+ - **안전한 리팩토링**: 다른 모듈을 깨뜨리지 않고 수정할 수 있는 모듈 파악
22
+ - **기능 개발**: 새로운 기능을 어디에 배치할지 이해
23
+ - **디버깅**: 의존성 체인을 통한 문제 추적
24
+ - **성능 최적화**: 모듈 로딩의 병목 지점 식별
25
+
26
+ ## 모듈 분류
27
+
28
+ ### 🔧 핵심 유틸리티 (중요 - 절대 삭제 금지)
29
+
30
+ 시스템 전체에서 사용되는 기반 모듈들:
31
+
32
+ #### `utils/paths.js`
33
+ - **사용처**: CLI 및 명령어 전반 8개 이상 위치
34
+ - **목적**: 크로스 플랫폼 호환을 위한 중앙화된 경로 관리
35
+ - **의존성**: 없음
36
+ - **중요한 이유**: 모든 파일 작업, 템플릿 해결, 리소스 로딩
37
+
38
+ #### `utils/messages.js`
39
+ - **사용처**: CLI 및 사용자 대면 명령어 5개 이상 위치
40
+ - **목적**: 다국어 메시지 시스템
41
+ - **의존성**: `language-utils.js`
42
+ - **중요한 이유**: 사용자 인터페이스, 오류 메시지, 국제화
43
+
44
+ #### `utils/language-utils.js`
45
+ - **사용처**: 언어 관리 3개 이상 위치
46
+ - **목적**: 언어 감지 및 설정
47
+ - **의존성**: `paths.js`
48
+ - **중요한 이유**: 언어 전환, 로케일 감지
49
+
50
+ ### 🚀 YOLO 시스템 (중요 - 절대 삭제 금지)
51
+
52
+ 자율 실행을 위한 전문 모듈들:
53
+
54
+ #### `utils/engineering-guard.js`
55
+ - **사용처**: YOLO 템플릿에서 동적 import
56
+ - **목적**: 자율 실행 중 오버엔지니어링 방지
57
+ - **의존성**: 없음 (자체 포함)
58
+ - **중요한 이유**: YOLO 모드 품질 제어
59
+ - **⚠️ 경고**: 동적 로딩 - 정적 분석에서 보이지 않음
60
+
61
+ #### `utils/checkpoint-manager.js`
62
+ - **사용처**: YOLO 명령어 및 복구 시스템
63
+ - **목적**: 자율 실행을 위한 진행률 추적 및 복구
64
+ - **의존성**: 없음
65
+ - **중요한 이유**: YOLO 세션 관리, 진행률 복구
66
+
67
+ ### 🎯 명령어별 전용 모듈
68
+
69
+ #### AI 페르소나 시스템
70
+ ```
71
+ ai-persona-manager.js (메인)
72
+ ├── context-engine.js
73
+ ├── metrics-collector.js
74
+ ├── task-analyzer.js
75
+ └── token-optimizer.js (context-engine에서 사용)
76
+ ```
77
+
78
+ #### 설치 및 백업 시스템
79
+ ```
80
+ installer.js (메인)
81
+ ├── backup-manager.js
82
+ ├── file-downloader.js
83
+ ├── rollback-manager.js
84
+ └── validator.js
85
+ ```
86
+
87
+ #### 캐시 시스템
88
+ ```
89
+ template-cache-system.js (메인)
90
+ ├── offline-detector.js
91
+ ├── template-downloader.js
92
+ └── template-version-manager.js
93
+ ```
94
+
95
+ #### GitHub 통합
96
+ ```
97
+ github-integration.js (메인)
98
+ ├── state/state-index.js
99
+ ├── state/priority-calculator.js
100
+ └── state/task-scanner.js
101
+ ```
102
+
103
+ ### 🌐 공유 리소스
104
+
105
+ #### `lib/resource-loader.js`
106
+ - **사용처**: 5개 이상 명령어 (compress, token, evaluate 등)
107
+ - **목적**: 번들 및 사용자 리소스를 위한 통합 리소스 관리
108
+ - **의존성**: `paths.js`
109
+ - **중요한 이유**: 템플릿 로딩, 페르소나 관리, 리소스 해결
110
+
111
+ ## 의존성 매트릭스
112
+
113
+ ### CLI 명령어 의존성
114
+
115
+ | 명령어 | 직접 의존성 | 간접 의존성 | 특수 사항 |
116
+ |--------|-------------|-------------|-----------|
117
+ | `aiwf install` | installer.js | backup-manager.js, file-downloader.js, rollback-manager.js, validator.js | - |
118
+ | `aiwf persona` | persona.js, ai-persona-manager.js | context-engine.js, metrics-collector.js, task-analyzer.js, token-optimizer.js | - |
119
+ | `aiwf compress` | compress.js, resource-loader.js | - | - |
120
+ | `aiwf token` | token.js, resource-loader.js | - | - |
121
+ | `aiwf evaluate` | evaluate.js, resource-loader.js | - | - |
122
+ | `aiwf checkpoint` | checkpoint-manager.js | - | ⚠️ YOLO 전용 |
123
+ | `aiwf-checkpoint` | checkpoint-manager.js | - | ⚠️ YOLO 전용 |
124
+ | `aiwf cache` | cache-cli.js | template-cache-system.js, offline-detector.js, template-downloader.js, template-version-manager.js | - |
125
+ | `YOLO 모드` | engineering-guard.js | - | ⚠️ 동적 import |
126
+
127
+ ## 중요 모듈
128
+
129
+ ### ⚠️ 동적 로딩 모듈
130
+
131
+ 런타임에 로드되며 정적 의존성 분석에서 나타나지 않는 모듈들:
132
+
133
+ 1. **`engineering-guard.js`**: YOLO 템플릿에서 `import()` 사용
134
+ 2. **상태 시스템 모듈들**: GitHub 통합에서 사용
135
+ 3. **페르소나 하위 모듈들**: 활성 페르소나에 따라 로드
136
+
137
+ ### 삭제 위험도 평가
138
+
139
+ #### ❌ 절대 삭제 금지
140
+ - `paths.js`, `messages.js`, `language-utils.js` (핵심 유틸리티)
141
+ - `engineering-guard.js`, `checkpoint-manager.js` (YOLO 시스템)
142
+ - `resource-loader.js` (여러 명령어에서 공유)
143
+
144
+ #### ⚠️ 주의해서 삭제
145
+ - AI 페르소나 시스템 모듈들 (페르소나 명령어 사용 여부 확인)
146
+ - 캐시 시스템 모듈들 (오프라인 기능에 영향)
147
+ - GitHub 통합 모듈들 (GitHub 명령어에 영향)
148
+
149
+ #### ✅ 조건부 삭제 가능
150
+ - 명령어별 전용 모듈들 (해당 명령어가 사용되지 않는 경우)
151
+ - 템플릿별 리소스들 (템플릿이 필요하지 않은 경우)
152
+
153
+ ## 안전한 모듈 관리
154
+
155
+ ### 모듈 수정 전 확인 사항
156
+
157
+ 1. **의존성 맵 확인**: `src/DEPENDENCY_MAP.md` 검토
158
+ 2. **사용처 검색**: `grep -r "모듈명" src/`로 모든 참조 확인
159
+ 3. **동적 import 확인**: `import()` 구문 검색
160
+ 4. **CLI 통합 확인**: CLI 명령어에서의 모듈 사용 여부 확인
161
+ 5. **YOLO 기능 검증**: YOLO 모듈 수정 시 YOLO 모드 작동 확인
162
+
163
+ ### 안전한 수정 단계
164
+
165
+ ```bash
166
+ # 1. 정적 의존성 확인
167
+ grep -r "your-module.js" src/
168
+
169
+ # 2. 동적 import 확인
170
+ grep -r "import.*your-module" src/
171
+
172
+ # 3. YOLO 통합 확인
173
+ grep -r "your-module" claude-code/
174
+
175
+ # 4. CLI 명령어 매핑 확인
176
+ grep -r "your-module" src/cli/
177
+
178
+ # 5. 중요 기능 테스트
179
+ npm test
180
+ aiwf install --force
181
+ aiwf-checkpoint list
182
+ ```
183
+
184
+ ### 모듈 추가 가이드라인
185
+
186
+ 새 모듈 추가 시:
187
+
188
+ 1. **의존성 맵 업데이트**: `src/DEPENDENCY_MAP.md`에 항목 추가
189
+ 2. **경고 주석 추가**: 중요 모듈에 `@warning` 주석 포함
190
+ 3. **사용처 문서화**: 어떤 명령어나 시스템에서 사용하는지 명시
191
+ 4. **동적 로딩 고려**: `import()` 지연 로딩 사용 시 표시
192
+ 5. **통합 테스트**: 개발 및 프로덕션 환경에서 모듈 작동 확인
193
+
194
+ ## 문제 해결
195
+
196
+ ### 일반적인 문제들
197
+
198
+ #### "Module not found" 오류
199
+ ```bash
200
+ # 모듈 존재 확인
201
+ ls -la src/utils/your-module.js
202
+
203
+ # import 경로 정확성 확인
204
+ grep -r "your-module" src/
205
+
206
+ # 모듈 export 확인
207
+ node -e "console.log(require('./src/utils/your-module.js'))"
208
+ ```
209
+
210
+ #### YOLO 모드 실패
211
+ ```bash
212
+ # engineering-guard 가용성 확인
213
+ ls -la src/utils/engineering-guard.js
214
+
215
+ # 동적 import 테스트
216
+ node -e "import('./src/utils/engineering-guard.js').then(m => console.log('OK'))"
217
+
218
+ # 체크포인트 시스템 확인
219
+ aiwf checkpoint status
220
+ ```
221
+
222
+ #### 순환 의존성
223
+ ```bash
224
+ # 순환 의존성 감지
225
+ npm install -g madge
226
+ madge --circular src/
227
+ ```
228
+
229
+ ### 복구 절차
230
+
231
+ #### 핵심 유틸리티 실수로 삭제한 경우
232
+ 1. git에서 복원: `git checkout HEAD -- src/utils/paths.js`
233
+ 2. AIWF 재설치: `aiwf install --force`
234
+ 3. 기능 확인: `aiwf --version`
235
+
236
+ #### YOLO 시스템이 손상된 경우
237
+ 1. YOLO 설정 확인: `cat .aiwf/yolo-config.yaml`
238
+ 2. 체크포인트 매니저 복원: `git checkout HEAD -- src/utils/checkpoint-manager.js`
239
+ 3. YOLO 모드 테스트: `aiwf-checkpoint status`
240
+
241
+ ## 모범 사례
242
+
243
+ ### 모듈 개발
244
+
245
+ 1. **단일 책임**: 각 모듈은 하나의 명확한 목적을 가져야 함
246
+ 2. **최소 의존성**: 결합도를 줄이기 위해 불필요한 의존성 피하기
247
+ 3. **명확한 인터페이스**: 필요한 함수/클래스만 export
248
+ 4. **문서화**: 사용법 주석 및 의존성 정보 포함
249
+ 5. **오류 처리**: 누락된 의존성을 우아하게 처리
250
+
251
+ ### 의존성 관리
252
+
253
+ 1. **정기 감사**: 의존성 맵을 주기적으로 검토하고 업데이트
254
+ 2. **영향 분석**: 변경 전 종속 모듈에 대한 잠재적 영향 분석
255
+ 3. **테스트 전략**: 직접 및 간접 의존성 모두 테스트
256
+ 4. **버전 제어**: git을 사용하여 모듈 변경 및 의존성 추적
257
+ 5. **문서화**: 의존성 문서를 최신 상태로 유지
258
+
259
+ ### 성능 고려사항
260
+
261
+ 1. **지연 로딩**: 중요하지 않은 모듈에 동적 import 사용
262
+ 2. **캐싱**: 자주 액세스하는 모듈 캐시
263
+ 3. **번들 최적화**: 의존성 추가 시 모듈 크기 고려
264
+ 4. **트리 셰이킹**: 모듈이 데드 코드 제거를 지원하는지 확인
265
+
266
+ ## 모듈 통합 체크리스트
267
+
268
+ 새 모듈 통합 또는 기존 모듈 수정 시:
269
+
270
+ - [ ] `src/DEPENDENCY_MAP.md` 업데이트
271
+ - [ ] 적절한 경고 주석 추가
272
+ - [ ] 사용 패턴 문서화
273
+ - [ ] CLI 및 YOLO 모드에서 테스트
274
+ - [ ] 리소스 로딩 작동 확인
275
+ - [ ] 순환 의존성 확인
276
+ - [ ] 관련 문서 업데이트
277
+ - [ ] 필요 시 통합 테스트 추가
278
+
279
+ ## 관련 문서
280
+
281
+ - [DEPENDENCY_MAP.md](../src/DEPENDENCY_MAP.md) - 상세 의존성 매트릭스
282
+ - [ARCHITECTURE.md](ARCHITECTURE.ko.md) - 전체 시스템 아키텍처
283
+ - [DEVELOPMENT_GUIDE.md](DEVELOPMENT_GUIDE.ko.md) - 개발 가이드라인
284
+ - [YOLO_SYSTEM_GUIDE.md](YOLO_SYSTEM_GUIDE.ko.md) - YOLO 시스템 세부사항
285
+
286
+ ---
287
+
288
+ **마지막 업데이트**: 2025-01-27
289
+ **검증 방법**: `grep -r "모듈명" src/`를 사용하여 사용 패턴 확인