claude-symphony 0.0.1

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 (197) hide show
  1. package/README.md +374 -0
  2. package/bin/create.js +250 -0
  3. package/package.json +43 -0
  4. package/template/.claude/commands/benchmark.md +103 -0
  5. package/template/.claude/commands/brainstorm.md +67 -0
  6. package/template/.claude/commands/checkpoint.md +93 -0
  7. package/template/.claude/commands/codex.md +107 -0
  8. package/template/.claude/commands/collaborate.md +85 -0
  9. package/template/.claude/commands/context.md +154 -0
  10. package/template/.claude/commands/deploy.md +102 -0
  11. package/template/.claude/commands/fork.md +142 -0
  12. package/template/.claude/commands/gemini.md +84 -0
  13. package/template/.claude/commands/handoff.md +80 -0
  14. package/template/.claude/commands/implement.md +82 -0
  15. package/template/.claude/commands/init-project.md +49 -0
  16. package/template/.claude/commands/next.md +125 -0
  17. package/template/.claude/commands/planning.md +69 -0
  18. package/template/.claude/commands/qa.md +81 -0
  19. package/template/.claude/commands/refactor.md +95 -0
  20. package/template/.claude/commands/research.md +60 -0
  21. package/template/.claude/commands/restore.md +113 -0
  22. package/template/.claude/commands/run-stage.md +78 -0
  23. package/template/.claude/commands/stages.md +109 -0
  24. package/template/.claude/commands/status.md +73 -0
  25. package/template/.claude/commands/tasks.md +80 -0
  26. package/template/.claude/commands/test.md +93 -0
  27. package/template/.claude/commands/ui-ux.md +61 -0
  28. package/template/.claude/commands/validate.md +174 -0
  29. package/template/.claude/hooks/ai-selector.sh +223 -0
  30. package/template/.claude/hooks/auto-checkpoint.sh +187 -0
  31. package/template/.claude/hooks/output-validator.sh +289 -0
  32. package/template/.claude/hooks/post-stage.sh +123 -0
  33. package/template/.claude/hooks/pre-stage.sh +186 -0
  34. package/template/.claude/hooks/session-start.sh +90 -0
  35. package/template/.claude/hooks/statusline.sh +115 -0
  36. package/template/.claude/hooks/stop.sh +104 -0
  37. package/template/.claude/settings.json +149 -0
  38. package/template/.claude/skills/ai-collaboration/README.md +61 -0
  39. package/template/.claude/skills/ai-collaboration/debate.md +148 -0
  40. package/template/.claude/skills/ai-collaboration/parallel.md +96 -0
  41. package/template/.claude/skills/ai-collaboration/prompts/CLAUDE.md +107 -0
  42. package/template/.claude/skills/auto-checkpoint/README.md +77 -0
  43. package/template/.claude/skills/auto-checkpoint/prompts/CLAUDE.md +113 -0
  44. package/template/.claude/skills/auto-checkpoint/rollback.md +152 -0
  45. package/template/.claude/skills/auto-checkpoint/trigger.md +122 -0
  46. package/template/.claude/skills/context-compression/README.md +121 -0
  47. package/template/.claude/skills/context-compression/analyze.md +114 -0
  48. package/template/.claude/skills/context-compression/compress.md +175 -0
  49. package/template/.claude/skills/context-compression/prompts/compression.md +172 -0
  50. package/template/.claude/skills/output-validator/README.md +86 -0
  51. package/template/.claude/skills/output-validator/prompts/CLAUDE.md +119 -0
  52. package/template/.claude/skills/output-validator/validate.md +182 -0
  53. package/template/.claude/skills/smart-handoff/README.md +59 -0
  54. package/template/.claude/skills/smart-handoff/extract.md +76 -0
  55. package/template/.claude/skills/smart-handoff/prompts/CLAUDE.md +86 -0
  56. package/template/.claude/skills/smart-handoff/summarize.md +94 -0
  57. package/template/.claude/skills/stage-transition/README.md +84 -0
  58. package/template/.claude/skills/stage-transition/handoff-gen.md +160 -0
  59. package/template/.claude/skills/stage-transition/prompts/transition.md +145 -0
  60. package/template/.claude/skills/stage-transition/validate.md +108 -0
  61. package/template/CLAUDE.md +528 -0
  62. package/template/config/ai_benchmarking.yaml +184 -0
  63. package/template/config/ai_collaboration.yaml +159 -0
  64. package/template/config/ai_logging.yaml +129 -0
  65. package/template/config/auto_checkpoint.yaml +189 -0
  66. package/template/config/context.yaml +78 -0
  67. package/template/config/git.yaml +161 -0
  68. package/template/config/handoff_intelligence.yaml +229 -0
  69. package/template/config/implementation.yaml.template +181 -0
  70. package/template/config/mcp_fallbacks.yaml +252 -0
  71. package/template/config/memory_integration.yaml +200 -0
  72. package/template/config/model_enforcement.yaml +141 -0
  73. package/template/config/models.yaml +242 -0
  74. package/template/config/output_validation.yaml +352 -0
  75. package/template/config/pipeline.yaml +357 -0
  76. package/template/config/pipeline_forking.yaml +236 -0
  77. package/template/config/qa_logging.yaml +166 -0
  78. package/template/config/smart_rollback.yaml +209 -0
  79. package/template/config/stage_personas.yaml +354 -0
  80. package/template/config/workflow.yaml +54 -0
  81. package/template/scripts/ai-benchmark.sh +272 -0
  82. package/template/scripts/codex-wrapper.sh +97 -0
  83. package/template/scripts/context-manager.sh +528 -0
  84. package/template/scripts/create-checkpoint.sh +116 -0
  85. package/template/scripts/gemini-wrapper.sh +96 -0
  86. package/template/scripts/init-project.sh +109 -0
  87. package/template/scripts/list-stages.sh +245 -0
  88. package/template/scripts/next-stage.sh +228 -0
  89. package/template/scripts/output-validate.sh +12 -0
  90. package/template/scripts/pipeline-fork.sh +293 -0
  91. package/template/scripts/pre-run-check.sh +361 -0
  92. package/template/scripts/restore-checkpoint.sh +247 -0
  93. package/template/scripts/run-stage.sh +139 -0
  94. package/template/scripts/show-status.sh +185 -0
  95. package/template/scripts/smart-handoff.sh +254 -0
  96. package/template/stages/01-brainstorm/CLAUDE.md +103 -0
  97. package/template/stages/01-brainstorm/HANDOFF.md.template +112 -0
  98. package/template/stages/01-brainstorm/README.md +97 -0
  99. package/template/stages/01-brainstorm/config.yaml +92 -0
  100. package/template/stages/01-brainstorm/inputs/.gitkeep +0 -0
  101. package/template/stages/01-brainstorm/outputs/.gitkeep +0 -0
  102. package/template/stages/01-brainstorm/prompts/collaboration.md +46 -0
  103. package/template/stages/01-brainstorm/prompts/ideation.md +62 -0
  104. package/template/stages/01-brainstorm/prompts/persona.md +73 -0
  105. package/template/stages/01-brainstorm/prompts/requirements.md +73 -0
  106. package/template/stages/01-brainstorm/prompts/validation.md +50 -0
  107. package/template/stages/01-brainstorm/templates/ideas.md +91 -0
  108. package/template/stages/01-brainstorm/templates/requirements_analysis.md +129 -0
  109. package/template/stages/02-research/CLAUDE.md +101 -0
  110. package/template/stages/02-research/HANDOFF.md.template +102 -0
  111. package/template/stages/02-research/config.yaml +68 -0
  112. package/template/stages/02-research/inputs/.gitkeep +0 -0
  113. package/template/stages/02-research/outputs/.gitkeep +0 -0
  114. package/template/stages/02-research/prompts/collaboration.md +51 -0
  115. package/template/stages/02-research/prompts/feasibility.md +73 -0
  116. package/template/stages/02-research/prompts/market_analysis.md +58 -0
  117. package/template/stages/02-research/prompts/tech_stack.md +60 -0
  118. package/template/stages/02-research/prompts/validation.md +51 -0
  119. package/template/stages/02-research/templates/.gitkeep +0 -0
  120. package/template/stages/03-planning/CLAUDE.md +98 -0
  121. package/template/stages/03-planning/HANDOFF.md.template +91 -0
  122. package/template/stages/03-planning/config.yaml +64 -0
  123. package/template/stages/03-planning/inputs/.gitkeep +0 -0
  124. package/template/stages/03-planning/outputs/.gitkeep +0 -0
  125. package/template/stages/03-planning/prompts/architecture.md +62 -0
  126. package/template/stages/03-planning/prompts/collaboration.md +57 -0
  127. package/template/stages/03-planning/prompts/validation.md +59 -0
  128. package/template/stages/03-planning/templates/.gitkeep +0 -0
  129. package/template/stages/04-ui-ux/CLAUDE.md +88 -0
  130. package/template/stages/04-ui-ux/HANDOFF.md.template +92 -0
  131. package/template/stages/04-ui-ux/config.yaml +57 -0
  132. package/template/stages/04-ui-ux/inputs/.gitkeep +0 -0
  133. package/template/stages/04-ui-ux/outputs/.gitkeep +0 -0
  134. package/template/stages/04-ui-ux/prompts/.gitkeep +0 -0
  135. package/template/stages/04-ui-ux/prompts/collaboration.md +56 -0
  136. package/template/stages/04-ui-ux/prompts/validation.md +54 -0
  137. package/template/stages/04-ui-ux/templates/.gitkeep +0 -0
  138. package/template/stages/05-task-management/CLAUDE.md +105 -0
  139. package/template/stages/05-task-management/HANDOFF.md.template +97 -0
  140. package/template/stages/05-task-management/config.yaml +81 -0
  141. package/template/stages/05-task-management/inputs/.gitkeep +0 -0
  142. package/template/stages/05-task-management/outputs/.gitkeep +0 -0
  143. package/template/stages/05-task-management/prompts/.gitkeep +0 -0
  144. package/template/stages/05-task-management/prompts/collaboration.md +54 -0
  145. package/template/stages/05-task-management/prompts/validation.md +66 -0
  146. package/template/stages/05-task-management/templates/notion_integration.md +176 -0
  147. package/template/stages/05-task-management/templates/parallel_groups.yaml +153 -0
  148. package/template/stages/05-task-management/templates/task_schema.yaml +154 -0
  149. package/template/stages/06-implementation/CLAUDE.md +163 -0
  150. package/template/stages/06-implementation/HANDOFF.md.template +192 -0
  151. package/template/stages/06-implementation/config.yaml +62 -0
  152. package/template/stages/06-implementation/inputs/.gitkeep +0 -0
  153. package/template/stages/06-implementation/outputs/.gitkeep +0 -0
  154. package/template/stages/06-implementation/prompts/.gitkeep +0 -0
  155. package/template/stages/06-implementation/prompts/collaboration.md +64 -0
  156. package/template/stages/06-implementation/prompts/validation.md +65 -0
  157. package/template/stages/06-implementation/templates/.gitkeep +0 -0
  158. package/template/stages/07-refactoring/CLAUDE.md +180 -0
  159. package/template/stages/07-refactoring/HANDOFF.md.template +97 -0
  160. package/template/stages/07-refactoring/config.yaml +68 -0
  161. package/template/stages/07-refactoring/inputs/.gitkeep +0 -0
  162. package/template/stages/07-refactoring/outputs/.gitkeep +0 -0
  163. package/template/stages/07-refactoring/prompts/.gitkeep +0 -0
  164. package/template/stages/07-refactoring/prompts/collaboration.md +71 -0
  165. package/template/stages/07-refactoring/prompts/validation.md +76 -0
  166. package/template/stages/07-refactoring/templates/.gitkeep +0 -0
  167. package/template/stages/08-qa/CLAUDE.md +93 -0
  168. package/template/stages/08-qa/HANDOFF.md.template +96 -0
  169. package/template/stages/08-qa/config.yaml +56 -0
  170. package/template/stages/08-qa/inputs/.gitkeep +0 -0
  171. package/template/stages/08-qa/outputs/.gitkeep +0 -0
  172. package/template/stages/08-qa/prompts/.gitkeep +0 -0
  173. package/template/stages/08-qa/prompts/collaboration.md +65 -0
  174. package/template/stages/08-qa/prompts/validation.md +71 -0
  175. package/template/stages/08-qa/templates/.gitkeep +0 -0
  176. package/template/stages/09-testing/CLAUDE.md +124 -0
  177. package/template/stages/09-testing/HANDOFF.md.template +113 -0
  178. package/template/stages/09-testing/config.yaml +65 -0
  179. package/template/stages/09-testing/inputs/.gitkeep +0 -0
  180. package/template/stages/09-testing/outputs/.gitkeep +0 -0
  181. package/template/stages/09-testing/prompts/.gitkeep +0 -0
  182. package/template/stages/09-testing/prompts/collaboration.md +77 -0
  183. package/template/stages/09-testing/prompts/validation.md +83 -0
  184. package/template/stages/09-testing/templates/.gitkeep +0 -0
  185. package/template/stages/10-deployment/CLAUDE.md +117 -0
  186. package/template/stages/10-deployment/HANDOFF.md.template +148 -0
  187. package/template/stages/10-deployment/config.yaml +61 -0
  188. package/template/stages/10-deployment/inputs/.gitkeep +0 -0
  189. package/template/stages/10-deployment/outputs/.gitkeep +0 -0
  190. package/template/stages/10-deployment/prompts/.gitkeep +0 -0
  191. package/template/stages/10-deployment/prompts/collaboration.md +80 -0
  192. package/template/stages/10-deployment/prompts/validation.md +93 -0
  193. package/template/stages/10-deployment/templates/github-actions-cd.yaml +118 -0
  194. package/template/stages/10-deployment/templates/github-actions-ci.yaml +136 -0
  195. package/template/state/progress.json.template +111 -0
  196. package/template/state/templates/handoff_base.md.template +187 -0
  197. package/template/state/templates/phase_state.md.template +97 -0
@@ -0,0 +1,528 @@
1
+ # claude-symphony - Multi-AI Orchestration Framework
2
+
3
+ 10단계 소프트웨어 개발 워크플로우 오케스트레이션 시스템
4
+
5
+ ## 파이프라인 개요
6
+
7
+ | 단계 | 이름 | AI 모델 | 실행 모드 |
8
+ |------|------|---------|-----------|
9
+ | 01 | Brainstorming | Gemini + ClaudeCode | YOLO (Container) |
10
+ | 02 | Research | Claude | Plan Mode |
11
+ | 03 | Planning | Gemini | Plan Mode |
12
+ | 04 | UI/UX Planning | Gemini | Plan Mode |
13
+ | 05 | Task Management | ClaudeCode | Plan Mode |
14
+ | 06 | Implementation | ClaudeCode | Plan + Sandbox |
15
+ | 07 | Refactoring | Codex | Deep Dive |
16
+ | 08 | QA | ClaudeCode | Plan + Sandbox |
17
+ | 09 | Testing & E2E | Codex | Sandbox + Playwright |
18
+ | 10 | CI/CD & Deployment | ClaudeCode | Headless |
19
+
20
+ ## 컨텍스트 관리 규칙
21
+
22
+ > 설정 파일: `config/context.yaml`
23
+
24
+ ### 퍼센트 기반 임계값 (남은 컨텍스트 기준)
25
+
26
+ | 임계값 | 트리거 | 동작 |
27
+ |--------|--------|------|
28
+ | **60%** (warning) | 경고 표시 | 압축 비율 계산, 배너 표시 |
29
+ | **50%** (action) | 자동 저장 | `state/context/`에 상태 저장, 압축 권장 |
30
+ | **40%** (critical) | `/clear` 권고 | 강제 저장, 복구 HANDOFF 생성 |
31
+
32
+ ### 태스크 기반 자동 저장
33
+ - **5개 태스크 완료마다** 상태 자동 저장
34
+ - 저장 위치: `state/context/state_{timestamp}_{stage}.md`
35
+
36
+ ### 상태 저장 형식
37
+ > 템플릿: `state/templates/phase_state.md.template`
38
+
39
+ ```markdown
40
+ # 작업 상태 저장 - {{TIMESTAMP}}
41
+
42
+ ## 컨텍스트 상태
43
+ - 남은 컨텍스트: {{REMAINING_PERCENT}}%
44
+ - 저장 트리거: {{TRIGGER_REASON}}
45
+
46
+ ## 현재 스테이지
47
+ {{STAGE_ID}}: {{STAGE_NAME}}
48
+
49
+ ## 진행 상황
50
+ - 완료: [목록]
51
+ - 진행 중: [현재 작업]
52
+ - 대기: [남은 작업]
53
+
54
+ ## 핵심 컨텍스트
55
+ - 주요 결정사항
56
+ - 수정된 파일
57
+ - 활성 이슈/버그
58
+
59
+ ## AI 호출 기록
60
+ | AI | 시간 | 프롬프트 | 결과 |
61
+ |----|------|---------|------|
62
+
63
+ ## 복구 지침
64
+ 1. 이 파일 읽기
65
+ 2. {{HANDOFF_FILE}} 참조
66
+ 3. {{CURRENT_TASK}}부터 재개
67
+ ```
68
+
69
+ ### 컨텍스트 압축 전략
70
+ 1. **summarize_completed**: 완료된 작업을 요약으로 대체
71
+ 2. **externalize_code**: 코드 블록을 파일 참조로 대체
72
+ 3. **handoff_generation**: 현재 상태를 HANDOFF.md로 외부화
73
+
74
+ ## 스테이지 전환 프로토콜
75
+
76
+ ### 필수 순서
77
+ 1. 현재 스테이지의 모든 outputs 생성 확인
78
+ 2. `HANDOFF.md` 생성 (필수)
79
+ 3. 체크포인트 생성 (구현/리팩토링 스테이지)
80
+ 4. `state/progress.json` 업데이트
81
+ 5. 다음 스테이지 `CLAUDE.md` 로드
82
+
83
+ ### HANDOFF.md 필수 포함 항목
84
+ - 완료된 작업 체크리스트
85
+ - 핵심 결정사항 및 이유
86
+ - 성공/실패한 접근법
87
+ - 다음 단계 즉시 실행 작업
88
+ - 체크포인트 참조 (해당시)
89
+
90
+ ## 슬래시 커맨드
91
+
92
+ ### 기본 명령어
93
+ | 커맨드 | 설명 |
94
+ |--------|------|
95
+ | `/init-project` | 새 프로젝트 초기화 |
96
+ | `/run-stage [id]` | 특정 스테이지 실행 |
97
+ | `/handoff` | 현재 스테이지 HANDOFF.md 생성 |
98
+ | `/checkpoint` | 체크포인트 생성 |
99
+ | `/gemini [prompt]` | Gemini CLI 호출 |
100
+ | `/codex [prompt]` | Codex CLI 호출 |
101
+
102
+ ### Multi-AI 명령어
103
+ | 커맨드 | 설명 |
104
+ |--------|------|
105
+ | `/collaborate` | Multi-AI 협업 실행 |
106
+ | `/benchmark` | AI 모델 벤치마킹 |
107
+ | `/fork` | 파이프라인 분기 관리 |
108
+ | `/validate` | 산출물 검증 실행 |
109
+
110
+ ### 가시성 명령어
111
+ | 커맨드 | 설명 |
112
+ |--------|------|
113
+ | `/status` | 파이프라인 전체 상태 확인 |
114
+ | `/stages` | 스테이지 목록 및 상세 |
115
+ | `/context` | 컨텍스트(토큰) 상태 관리 |
116
+
117
+ ### 네비게이션 명령어
118
+ | 커맨드 | 설명 |
119
+ |--------|------|
120
+ | `/next` | 다음 스테이지로 전환 |
121
+ | `/restore` | 체크포인트에서 복구 |
122
+
123
+ ### 스테이지 단축 명령어
124
+ | 커맨드 | 스테이지 |
125
+ |--------|----------|
126
+ | `/brainstorm` | 01-brainstorm |
127
+ | `/research` | 02-research |
128
+ | `/planning` | 03-planning |
129
+ | `/ui-ux` | 04-ui-ux |
130
+ | `/tasks` | 05-task-management |
131
+ | `/implement` | 06-implementation |
132
+ | `/refactor` | 07-refactoring |
133
+ | `/qa` | 08-qa |
134
+ | `/test` | 09-testing |
135
+ | `/deploy` | 10-deployment |
136
+
137
+ ## 스킬 (자동 활성화)
138
+
139
+ | 스킬 | 트리거 | 설명 |
140
+ |------|--------|------|
141
+ | `stage-transition` | "완료", "/next" | 스테이지 완료 감지 및 전환 자동화 |
142
+ | `context-compression` | 토큰 50k+ | 컨텍스트 압축 및 상태 저장 |
143
+ | `smart-handoff` | 스테이지 완료 | 스마트 컨텍스트 추출 및 HANDOFF 생성 |
144
+ | `ai-collaboration` | `/collaborate` | Multi-AI 협업 오케스트레이션 |
145
+ | `auto-checkpoint` | 트리거 조건 충족 | 자동 체크포인트 생성 |
146
+ | `output-validator` | `/validate`, 스테이지 완료 | 산출물 검증 및 품질 확인 |
147
+
148
+ ## Git 자동 커밋 규칙
149
+
150
+ > 설정 파일: `config/git.yaml`
151
+
152
+ ### 자동 커밋 트리거
153
+ - **태스크 완료 시**: 관련 파일 커밋
154
+ - **스테이지 완료 시**: 전체 변경사항 커밋 + 태그 생성
155
+ - **체크포인트 생성 시**: 체크포인트 커밋 + 태그
156
+
157
+ ### 커밋 메시지 형식 (Conventional Commits)
158
+ ```
159
+ <type>(<scope>): <description>
160
+ ```
161
+
162
+ | 스테이지 | 타입 | 스코프 | 예시 |
163
+ |---------|------|--------|------|
164
+ | 06-implementation | `feat` | `impl` | `feat(impl): 사용자 인증 구현` |
165
+ | 07-refactoring | `refactor` | `refactor` | `refactor(refactor): 인증 서비스 최적화` |
166
+ | 08-qa | `fix` | `qa` | `fix(qa): 세션 만료 버그 수정` |
167
+ | 09-testing | `test` | `test` | `test(test): E2E 테스트 추가` |
168
+ | 10-deployment | `ci` | `deploy` | `ci(deploy): GitHub Actions 설정` |
169
+
170
+ ### 커밋 원칙
171
+ - 작은 단위로 자주 커밋
172
+ - 의미 있는 커밋 메시지 작성
173
+ - 커밋 전 lint/format 실행
174
+
175
+ ## AI 호출 로깅
176
+
177
+ > 설정 파일: `config/ai_logging.yaml`
178
+
179
+ ### AI 호출 기록
180
+ - 모든 AI 호출(Gemini, Codex, ClaudeCode)은 HANDOFF.md에 기록됩니다
181
+ - 호출 시간, 프롬프트 파일, 결과 파일, 상태를 추적합니다
182
+
183
+ ### Gemini 호출 검증 체크리스트
184
+ | 단계 | 확인 항목 | 명령어 |
185
+ |------|----------|--------|
186
+ | 1 | CLI 설치 확인 | `which gemini` |
187
+ | 2 | 래퍼 사용 | `scripts/gemini-wrapper.sh` |
188
+ | 3 | tmux 세션 확인 | `tmux attach -t symphony-gemini` |
189
+ | 4 | 출력 파일 저장 | `outputs/` 디렉토리 |
190
+
191
+ ### AI 호출 로그 형식 (HANDOFF.md)
192
+ ```markdown
193
+ ## AI 호출 기록
194
+ | AI | 호출 시간 | 프롬프트 | 결과 | 상태 |
195
+ |----|----------|---------|------|------|
196
+ | Gemini | 14:30 | prompts/ideation.md | outputs/ideas.md | 성공 |
197
+ ```
198
+
199
+ ## 문답 자동 기록 (Q&A Logging)
200
+
201
+ > 설정 파일: `config/qa_logging.yaml`
202
+
203
+ ### 자동 기록 트리거
204
+ - **스테이지 완료 시**: 해당 스테이지의 주요 Q&A 기록
205
+ - **이슈 발견 시**: 문제와 해결 방법 기록
206
+ - **프로세스 변경 요청 시**: 변경 내용과 이유 기록
207
+
208
+ ### 기록 형식
209
+ ```markdown
210
+ ### Q{{number}}: {{title}}
211
+ **질문**: {{question}}
212
+ **답변**: {{answer}}
213
+ **해결 방법**: {{solution}}
214
+ **향후 개선 제안**: {{suggestion}}
215
+ ```
216
+
217
+ ### 기록 대상 파일
218
+ - 기본: `feedback.md`
219
+ - 백업: `state/qa_backups/`
220
+
221
+ ### 카테고리
222
+ - `workflow_improvements`: 워크플로우 개선
223
+ - `tool_usage`: 도구 사용법
224
+ - `process_changes`: 프로세스 변경
225
+ - `bug_fixes`: 버그 수정
226
+ - `best_practices`: 모범 사례
227
+
228
+ ## 금지 사항
229
+
230
+ - HANDOFF.md 없이 스테이지 전환
231
+ - 체크포인트 없이 파괴적 작업 (구현/리팩토링)
232
+ - 단일 세션에 복수 스테이지 혼합
233
+ - 이전 스테이지 outputs 수정
234
+ - WIP 커밋, 의미 없는 커밋 메시지
235
+
236
+ ## 디렉토리 구조 (Issue #17 해결)
237
+
238
+ ### ⚠️ 핵심 구분: TEMPLATE_ROOT vs PROJECT_ROOT
239
+
240
+ ```
241
+ TEMPLATE_ROOT (파이프라인 관리) PROJECT_ROOT (소스코드)
242
+ /my-new-project/ /my-new-project/[project-name]/
243
+ ├── stages/ ← 산출물 ├── src/
244
+ │ └── XX-stage/ ├── public/
245
+ │ └── outputs/ ├── package.json
246
+ ├── config/ └── ...
247
+ ├── state/
248
+ └── CLAUDE.md
249
+ ```
250
+
251
+ ### 경로 규칙
252
+
253
+ | 유형 | 저장 위치 | 예시 |
254
+ |------|----------|------|
255
+ | 산출물 (문서) | `stages/XX/outputs/` | `ideas.md`, `architecture.md` |
256
+ | 소스 코드 | `[project-name]/src/` | 컴포넌트, API |
257
+ | 상태 파일 | `state/` | `progress.json`, 체크포인트 |
258
+ | HANDOFF | `stages/XX/` | `HANDOFF.md` |
259
+
260
+ ### ⚠️ 금지: PROJECT_ROOT에 stages/ 생성
261
+ ```
262
+ ❌ 잘못된 구조
263
+ /my-new-project/my-app/
264
+ ├── stages/ ← 여기에 생성하면 안됨!
265
+ └── src/
266
+
267
+ ✅ 올바른 구조
268
+ /my-new-project/
269
+ ├── stages/ ← TEMPLATE_ROOT에만 존재
270
+ └── my-app/
271
+ └── src/ ← PROJECT_ROOT
272
+ ```
273
+
274
+ ### 파이프라인 파일 구조
275
+
276
+ ```
277
+ config/
278
+ pipeline.yaml # 파이프라인 정의
279
+ models.yaml # AI 모델 할당
280
+ context.yaml # 컨텍스트 관리 설정
281
+ model_enforcement.yaml # AI 역할 분담
282
+ git.yaml # Git 자동 커밋 규칙
283
+ mcp_fallbacks.yaml # MCP 폴백 설정
284
+ ai_logging.yaml # AI 호출 로깅 설정
285
+ qa_logging.yaml # 문답 자동 기록 설정
286
+ implementation.yaml.template # 구현 규칙 템플릿
287
+
288
+ stages/
289
+ XX-stage-name/
290
+ CLAUDE.md # 스테이지 AI 지침
291
+ config.yaml # 스테이지 설정
292
+ prompts/ # 프롬프트 템플릿
293
+ templates/ # 출력 템플릿
294
+ inputs/ # 입력 파일 (이전 스테이지 링크)
295
+ outputs/ # 출력 파일 (산출물)
296
+ HANDOFF.md # 생성된 핸드오프
297
+
298
+ state/
299
+ progress.json # 파이프라인 진행 상황
300
+ checkpoints/ # 체크포인트 저장
301
+ context/ # 컨텍스트 상태 저장
302
+ handoffs/ # 핸드오프 아카이브
303
+ templates/ # 상태 템플릿
304
+ ```
305
+
306
+ ## 디자인 패턴 적용
307
+
308
+ 1. **Sequential Workflow Architecture** - 순차적 단계 정의 및 자동 진행
309
+ 2. **Stateless Orchestration** - 무상태 컨텍스트 전달 (HANDOFF.md)
310
+ 3. **Orchestrator-Workers** - 병렬 에이전트 실행 (Brainstorm 스테이지)
311
+ 4. **Proactive State Externalization** - 외부 상태 파일 관리
312
+ 5. **State Machine Workflow** - 상태 전이 관리 (progress.json)
313
+ 6. **Layered Configuration** - 계층화된 설정 구조 (global → stage)
314
+
315
+ ---
316
+
317
+ ## Multi-AI Orchestration
318
+
319
+ > 설정 파일: `config/ai_collaboration.yaml`, `config/ai_benchmarking.yaml`
320
+
321
+ ### AI 협업 모드
322
+
323
+ | 모드 | 설명 | 사용 스테이지 |
324
+ |------|------|--------------|
325
+ | `parallel` | 동일 작업을 여러 AI로 동시 실행 | 01-brainstorm, 02-research |
326
+ | `sequential` | AI 간 순차 전달 (리뷰 체인) | 06-implementation, 07-refactoring |
327
+ | `debate` | AI 간 토론으로 최적 결론 도출 | 03-planning, 04-ui-ux |
328
+
329
+ ### AI 모델 전문화
330
+
331
+ | AI 모델 | 강점 | 최적 스테이지 |
332
+ |--------|------|--------------|
333
+ | Claude | 정확한 코드 생성, 로직 분석 | 06-implementation, 08-qa |
334
+ | Gemini | 창의적 아이디어, 빠른 탐색 | 01-brainstorm, 03-planning |
335
+ | Codex | 깊이 있는 분석, 리팩토링 | 07-refactoring, 09-testing |
336
+
337
+ ### 사용 방법
338
+ ```bash
339
+ # 병렬 협업 실행
340
+ /collaborate --mode parallel --models claude,gemini --task "아이디어 생성"
341
+
342
+ # 토론 모드
343
+ /collaborate --mode debate --rounds 3
344
+
345
+ # AI 벤치마킹
346
+ /benchmark --task code_generation --models claude,codex
347
+ ```
348
+
349
+ ---
350
+
351
+ ## Smart HANDOFF 시스템
352
+
353
+ > 설정 파일: `config/handoff_intelligence.yaml`, `config/memory_integration.yaml`
354
+
355
+ ### 자동 추출 항목
356
+ - 완료된 작업 (`completed_tasks`)
357
+ - 핵심 결정사항 (`key_decisions`)
358
+ - 수정된 파일 (`modified_files`)
359
+ - 대기 이슈 (`pending_issues`)
360
+ - AI 호출 기록 (`ai_call_history`)
361
+
362
+ ### 컨텍스트 압축
363
+ - **전략**: 의미 기반 압축 (`semantic`)
364
+ - **목표 비율**: 원본의 30%
365
+ - **보존 항목**: 핵심 결정, 차단 이슈, 파일 변경
366
+
367
+ ### AI 메모리 통합
368
+ - claude-mem MCP와 연동
369
+ - 스테이지 완료 시 자동 메모리 저장
370
+ - 스테이지 시작 시 이전 컨텍스트 주입
371
+
372
+ ### HANDOFF 모드
373
+ ```bash
374
+ # 기본 (스마트) HANDOFF
375
+ /handoff
376
+
377
+ # 컴팩트 모드 (최소 필수 정보만)
378
+ /handoff --compact
379
+
380
+ # 복구용 상세 HANDOFF
381
+ /handoff --recovery
382
+ ```
383
+
384
+ ---
385
+
386
+ ## 자동 체크포인트 시스템
387
+
388
+ > 설정 파일: `config/auto_checkpoint.yaml`, `config/smart_rollback.yaml`
389
+
390
+ ### 자동 생성 트리거
391
+
392
+ | 트리거 | 조건 | 동작 |
393
+ |--------|------|------|
394
+ | 태스크 기반 | 5개 태스크 완료 | 체크포인트 생성 |
395
+ | 파일 변경 | 100줄 이상 변경 | 체크포인트 생성 |
396
+ | 파괴적 작업 | rm, delete, drop 패턴 | 강제 체크포인트 |
397
+ | 시간 기반 | 30분 경과 | 체크포인트 생성 |
398
+
399
+ ### 보존 정책
400
+ - 최대 보존: 10개
401
+ - 마일스톤 유지: 스테이지 완료 체크포인트는 영구 보존
402
+
403
+ ### 스마트 롤백
404
+ ```bash
405
+ # 체크포인트 목록
406
+ /restore --list
407
+
408
+ # 특정 체크포인트로 롤백
409
+ /restore checkpoint_20240101_120000
410
+
411
+ # 부분 롤백 (파일 레벨)
412
+ /restore checkpoint_id --partial --files "src/auth/*"
413
+ ```
414
+
415
+ ---
416
+
417
+ ## 파이프라인 분기 (Forking)
418
+
419
+ > 설정 파일: `config/pipeline_forking.yaml`
420
+
421
+ ### 분기 시점
422
+ - 아키텍처 대안 제안 시 (03-planning)
423
+ - 기술적 선택지 존재 시 (06-implementation)
424
+
425
+ ### 분기 관리
426
+ - **최대 활성 분기**: 3개
427
+ - **병합 전략**: 최고 성능 기준 (`best_performer`)
428
+
429
+ ### 비교 메트릭
430
+ - 코드 품질 (`code_quality`)
431
+ - 성능 (`performance`)
432
+ - 유지보수성 (`maintainability`)
433
+
434
+ ### 사용 방법
435
+ ```bash
436
+ # 분기 생성
437
+ /fork create --reason "아키텍처 대안 탐색" --direction "microservices"
438
+
439
+ # 분기 목록
440
+ /fork list
441
+
442
+ # 분기 비교
443
+ /fork compare
444
+
445
+ # 분기 병합
446
+ /fork merge fork_name
447
+
448
+ # 분기 삭제
449
+ /fork delete fork_name
450
+ ```
451
+
452
+ ---
453
+
454
+ ## 스테이지 페르소나
455
+
456
+ > 설정 파일: `config/stage_personas.yaml`
457
+
458
+ 각 스테이지에 최적화된 AI 행동 특성을 정의합니다.
459
+
460
+ | 스테이지 | 페르소나 | 특성 | Temperature |
461
+ |---------|---------|------|-------------|
462
+ | 01-brainstorm | Creative Explorer | 발산적 사고, 제약 없는 아이디어 | 0.9 |
463
+ | 02-research | Analytical Investigator | 체계적 분석, 깊이 있는 조사 | 0.5 |
464
+ | 03-planning | Strategic Architect | 장기적 관점, 구조적 사고 | 0.6 |
465
+ | 06-implementation | Precise Builder | 정확한 구현, 에러 방지 | 0.3 |
466
+ | 07-refactoring | Code Surgeon | 깊이 있는 분석, 성능 최적화 | 0.5 |
467
+ | 08-qa | Quality Guardian | 철저한 검증, 위험 감지 | 0.4 |
468
+
469
+ ---
470
+
471
+ ## 산출물 검증
472
+
473
+ > 설정 파일: `config/output_validation.yaml`
474
+
475
+ ### 검증 항목
476
+
477
+ | 스테이지 | 필수 산출물 | 검증 명령 |
478
+ |---------|-----------|----------|
479
+ | 01-brainstorm | `ideas.md` (최소 5개 아이디어) | - |
480
+ | 06-implementation | `src/` (lint, typecheck 통과) | `npm run lint`, `npm run typecheck` |
481
+ | 09-testing | `tests/` (커버리지 80%+) | `npm run test:coverage` |
482
+
483
+ ### 품질 메트릭
484
+ - 코드 품질 기준: 0.8
485
+ - 테스트 커버리지 기준: 80%
486
+
487
+ ### 사용 방법
488
+ ```bash
489
+ # 현재 스테이지 검증
490
+ /validate
491
+
492
+ # 특정 스테이지 검증
493
+ /validate --stage 06-implementation
494
+
495
+ # 자동 수정 포함
496
+ /validate --fix
497
+
498
+ # 상세 출력
499
+ /validate --verbose
500
+
501
+ # 실패해도 진행 (비권장)
502
+ /validate --force
503
+ ```
504
+
505
+ ---
506
+
507
+ ## 신규 설정 파일
508
+
509
+ | 파일 | 설명 |
510
+ |------|------|
511
+ | `config/ai_collaboration.yaml` | AI 협업 모드 설정 |
512
+ | `config/ai_benchmarking.yaml` | AI 벤치마킹 설정 |
513
+ | `config/handoff_intelligence.yaml` | 스마트 HANDOFF 설정 |
514
+ | `config/memory_integration.yaml` | AI 메모리 통합 설정 |
515
+ | `config/auto_checkpoint.yaml` | 자동 체크포인트 설정 |
516
+ | `config/smart_rollback.yaml` | 스마트 롤백 설정 |
517
+ | `config/pipeline_forking.yaml` | 파이프라인 분기 설정 |
518
+ | `config/stage_personas.yaml` | 스테이지 페르소나 설정 |
519
+ | `config/output_validation.yaml` | 산출물 검증 설정 |
520
+
521
+ ## 신규 State 디렉토리
522
+
523
+ | 디렉토리 | 설명 |
524
+ |---------|------|
525
+ | `state/ai_benchmarks/` | AI 벤치마크 결과 저장 |
526
+ | `state/forks/` | 파이프라인 분기 상태 저장 |
527
+ | `state/validations/` | 검증 결과 저장 |
528
+
@@ -0,0 +1,184 @@
1
+ # claude-symphony AI Benchmarking Configuration
2
+ # Model performance comparison and dynamic selection
3
+
4
+ benchmarking:
5
+ enabled: true
6
+ description: "AI 모델 성능 비교 및 최적 모델 동적 선택"
7
+
8
+ # 벤치마킹이 활성화되는 스테이지
9
+ enabled_stages:
10
+ - "06-implementation"
11
+ - "07-refactoring"
12
+ - "09-testing"
13
+
14
+ # 벤치마크 태스크 정의
15
+ benchmark_tasks:
16
+ code_generation:
17
+ description: "코드 생성 품질 비교"
18
+ models: ["claude", "codex"]
19
+ metrics:
20
+ - name: "correctness"
21
+ weight: 0.4
22
+ measure: "test_pass_rate"
23
+ - name: "performance"
24
+ weight: 0.2
25
+ measure: "execution_time"
26
+ - name: "style_compliance"
27
+ weight: 0.2
28
+ measure: "lint_score"
29
+ - name: "readability"
30
+ weight: 0.2
31
+ measure: "complexity_score"
32
+
33
+ refactoring:
34
+ description: "리팩토링 품질 비교"
35
+ models: ["codex", "claude"]
36
+ metrics:
37
+ - name: "complexity_reduction"
38
+ weight: 0.3
39
+ measure: "cyclomatic_complexity_delta"
40
+ - name: "test_coverage"
41
+ weight: 0.3
42
+ measure: "coverage_percentage"
43
+ - name: "performance_improvement"
44
+ weight: 0.2
45
+ measure: "benchmark_time_delta"
46
+ - name: "maintainability"
47
+ weight: 0.2
48
+ measure: "maintainability_index"
49
+
50
+ test_generation:
51
+ description: "테스트 코드 생성 비교"
52
+ models: ["codex", "claude"]
53
+ metrics:
54
+ - name: "coverage"
55
+ weight: 0.4
56
+ measure: "line_coverage"
57
+ - name: "edge_cases"
58
+ weight: 0.3
59
+ measure: "branch_coverage"
60
+ - name: "quality"
61
+ weight: 0.3
62
+ measure: "mutation_score"
63
+
64
+ # 자동 선택 전략
65
+ selection_strategy:
66
+ auto: true
67
+ method: "weighted_score"
68
+
69
+ thresholds:
70
+ auto_select_minimum: 0.75 # 최소 점수
71
+ confidence_gap: 0.15 # 1위와 2위 점수 차이
72
+
73
+ fallback:
74
+ enabled: true
75
+ fallback_to: "claude"
76
+ on_tie: "prefer_faster"
77
+
78
+ # 히스토리 추적
79
+ history_tracking:
80
+ enabled: true
81
+ storage_path: "state/ai_benchmarks/"
82
+ retention_days: 90
83
+
84
+ track_metrics:
85
+ - "model"
86
+ - "task_type"
87
+ - "scores"
88
+ - "execution_time"
89
+ - "token_usage"
90
+ - "timestamp"
91
+
92
+ aggregation:
93
+ period: "weekly"
94
+ metrics: ["avg_score", "success_rate", "avg_latency"]
95
+
96
+ # 동적 모델 선택 설정
97
+ dynamic_selection:
98
+ enabled: true
99
+ description: "태스크 특성에 따른 최적 AI 모델 자동 선택"
100
+
101
+ criteria:
102
+ task_type:
103
+ weight: 0.4
104
+ mapping:
105
+ brainstorming: "gemini"
106
+ implementation: "claude"
107
+ refactoring: "codex"
108
+ testing: "codex"
109
+ research: "claude"
110
+
111
+ complexity:
112
+ weight: 0.3
113
+ levels:
114
+ low:
115
+ prefer: "haiku" # 빠른 응답
116
+ threshold: 100 # lines of code
117
+ medium:
118
+ prefer: "claude"
119
+ threshold: 500
120
+ high:
121
+ prefer: "claude" # 복잡한 로직
122
+ threshold: null
123
+
124
+ previous_performance:
125
+ weight: 0.3
126
+ lookback_period: 7 # days
127
+ min_samples: 3
128
+
129
+ override:
130
+ user_preference: true
131
+ stage_assignment: true # models.yaml의 stage_assignments 우선
132
+
133
+ # 벤치마킹 실행 설정
134
+ execution:
135
+ parallel_benchmark: true
136
+ max_concurrent_benchmarks: 2
137
+
138
+ sample_tasks:
139
+ enabled: true
140
+ sample_size: 3
141
+ sampling_method: "stratified"
142
+
143
+ timeout:
144
+ per_model: 300 # 5 minutes
145
+ total: 900 # 15 minutes
146
+
147
+ resource_limits:
148
+ max_tokens_per_benchmark: 10000
149
+ max_retries: 2
150
+
151
+ # 결과 리포팅
152
+ reporting:
153
+ format: "markdown"
154
+ output_path: "state/ai_benchmarks/reports/"
155
+
156
+ include:
157
+ - summary_table
158
+ - metric_breakdown
159
+ - historical_comparison
160
+ - recommendation
161
+
162
+ visualization:
163
+ enabled: true
164
+ charts:
165
+ - "score_comparison_bar"
166
+ - "trend_line"
167
+ - "radar_chart"
168
+
169
+ notifications:
170
+ on_significant_change:
171
+ threshold: 0.2 # 20% 변화
172
+ channels: ["console", "handoff"]
173
+
174
+ # 통합 설정
175
+ integration:
176
+ # HANDOFF에 벤치마크 결과 포함
177
+ handoff:
178
+ include_summary: true
179
+ include_recommendation: true
180
+
181
+ # 컨텍스트 압축 시 벤치마크 데이터 처리
182
+ context_compression:
183
+ preserve_recent: 3 # 최근 3개 벤치마크 결과 유지
184
+ summarize_older: true