create-ax-project 1.0.0

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 (258) hide show
  1. package/README.md +374 -0
  2. package/bin/create.js +193 -0
  3. package/package.json +38 -0
  4. package/template/.claude/CLAUDE.md +7 -0
  5. package/template/.claude/commands/CLAUDE.md +0 -0
  6. package/template/.claude/commands/benchmark.md +103 -0
  7. package/template/.claude/commands/brainstorm.md +67 -0
  8. package/template/.claude/commands/checkpoint.md +93 -0
  9. package/template/.claude/commands/codex.md +107 -0
  10. package/template/.claude/commands/collaborate.md +85 -0
  11. package/template/.claude/commands/context.md +154 -0
  12. package/template/.claude/commands/deploy.md +102 -0
  13. package/template/.claude/commands/fork.md +142 -0
  14. package/template/.claude/commands/gemini.md +84 -0
  15. package/template/.claude/commands/handoff.md +80 -0
  16. package/template/.claude/commands/implement.md +82 -0
  17. package/template/.claude/commands/init-project.md +49 -0
  18. package/template/.claude/commands/next.md +125 -0
  19. package/template/.claude/commands/planning.md +69 -0
  20. package/template/.claude/commands/qa.md +81 -0
  21. package/template/.claude/commands/refactor.md +95 -0
  22. package/template/.claude/commands/research.md +60 -0
  23. package/template/.claude/commands/restore.md +113 -0
  24. package/template/.claude/commands/run-stage.md +78 -0
  25. package/template/.claude/commands/stages.md +109 -0
  26. package/template/.claude/commands/status.md +73 -0
  27. package/template/.claude/commands/tasks.md +80 -0
  28. package/template/.claude/commands/test.md +93 -0
  29. package/template/.claude/commands/ui-ux.md +61 -0
  30. package/template/.claude/commands/validate.md +174 -0
  31. package/template/.claude/hooks/CLAUDE.md +0 -0
  32. package/template/.claude/hooks/ai-selector.sh +223 -0
  33. package/template/.claude/hooks/auto-checkpoint.sh +187 -0
  34. package/template/.claude/hooks/output-validator.sh +289 -0
  35. package/template/.claude/hooks/post-stage.sh +123 -0
  36. package/template/.claude/hooks/pre-stage.sh +186 -0
  37. package/template/.claude/hooks/session-start.sh +90 -0
  38. package/template/.claude/hooks/statusline.sh +115 -0
  39. package/template/.claude/hooks/stop.sh +104 -0
  40. package/template/.claude/settings.json +149 -0
  41. package/template/.claude/skills/ai-collaboration/CLAUDE.md +0 -0
  42. package/template/.claude/skills/ai-collaboration/README.md +61 -0
  43. package/template/.claude/skills/ai-collaboration/debate.md +148 -0
  44. package/template/.claude/skills/ai-collaboration/parallel.md +96 -0
  45. package/template/.claude/skills/ai-collaboration/prompts/CLAUDE.md +107 -0
  46. package/template/.claude/skills/auto-checkpoint/CLAUDE.md +0 -0
  47. package/template/.claude/skills/auto-checkpoint/README.md +77 -0
  48. package/template/.claude/skills/auto-checkpoint/prompts/CLAUDE.md +113 -0
  49. package/template/.claude/skills/auto-checkpoint/rollback.md +152 -0
  50. package/template/.claude/skills/auto-checkpoint/trigger.md +122 -0
  51. package/template/.claude/skills/context-compression/CLAUDE.md +0 -0
  52. package/template/.claude/skills/context-compression/README.md +121 -0
  53. package/template/.claude/skills/context-compression/analyze.md +114 -0
  54. package/template/.claude/skills/context-compression/compress.md +175 -0
  55. package/template/.claude/skills/context-compression/prompts/CLAUDE.md +0 -0
  56. package/template/.claude/skills/context-compression/prompts/compression.md +172 -0
  57. package/template/.claude/skills/output-validator/CLAUDE.md +0 -0
  58. package/template/.claude/skills/output-validator/README.md +86 -0
  59. package/template/.claude/skills/output-validator/prompts/CLAUDE.md +119 -0
  60. package/template/.claude/skills/output-validator/validate.md +182 -0
  61. package/template/.claude/skills/smart-handoff/CLAUDE.md +0 -0
  62. package/template/.claude/skills/smart-handoff/README.md +59 -0
  63. package/template/.claude/skills/smart-handoff/extract.md +76 -0
  64. package/template/.claude/skills/smart-handoff/prompts/CLAUDE.md +86 -0
  65. package/template/.claude/skills/smart-handoff/summarize.md +94 -0
  66. package/template/.claude/skills/stage-transition/CLAUDE.md +0 -0
  67. package/template/.claude/skills/stage-transition/README.md +84 -0
  68. package/template/.claude/skills/stage-transition/handoff-gen.md +160 -0
  69. package/template/.claude/skills/stage-transition/prompts/CLAUDE.md +0 -0
  70. package/template/.claude/skills/stage-transition/prompts/transition.md +145 -0
  71. package/template/.claude/skills/stage-transition/validate.md +108 -0
  72. package/template/CLAUDE.md +528 -0
  73. package/template/config/CLAUDE.md +0 -0
  74. package/template/config/ai_benchmarking.yaml +184 -0
  75. package/template/config/ai_collaboration.yaml +159 -0
  76. package/template/config/ai_logging.yaml +129 -0
  77. package/template/config/auto_checkpoint.yaml +189 -0
  78. package/template/config/context.yaml +78 -0
  79. package/template/config/git.yaml +161 -0
  80. package/template/config/handoff_intelligence.yaml +229 -0
  81. package/template/config/implementation.yaml.template +181 -0
  82. package/template/config/mcp_fallbacks.yaml +252 -0
  83. package/template/config/memory_integration.yaml +200 -0
  84. package/template/config/model_enforcement.yaml +141 -0
  85. package/template/config/models.yaml +242 -0
  86. package/template/config/output_validation.yaml +352 -0
  87. package/template/config/pipeline.yaml +357 -0
  88. package/template/config/pipeline_forking.yaml +236 -0
  89. package/template/config/qa_logging.yaml +166 -0
  90. package/template/config/smart_rollback.yaml +209 -0
  91. package/template/config/stage_personas.yaml +354 -0
  92. package/template/config/workflow.yaml +54 -0
  93. package/template/scripts/CLAUDE.md +0 -0
  94. package/template/scripts/ai-benchmark.sh +272 -0
  95. package/template/scripts/codex-wrapper.sh +97 -0
  96. package/template/scripts/context-manager.sh +528 -0
  97. package/template/scripts/create-checkpoint.sh +116 -0
  98. package/template/scripts/gemini-wrapper.sh +96 -0
  99. package/template/scripts/init-project.sh +109 -0
  100. package/template/scripts/list-stages.sh +245 -0
  101. package/template/scripts/next-stage.sh +228 -0
  102. package/template/scripts/output-validate.sh +12 -0
  103. package/template/scripts/pipeline-fork.sh +293 -0
  104. package/template/scripts/pre-run-check.sh +361 -0
  105. package/template/scripts/restore-checkpoint.sh +247 -0
  106. package/template/scripts/run-stage.sh +139 -0
  107. package/template/scripts/show-status.sh +185 -0
  108. package/template/scripts/smart-handoff.sh +254 -0
  109. package/template/stages/01-brainstorm/CLAUDE.md +103 -0
  110. package/template/stages/01-brainstorm/HANDOFF.md +110 -0
  111. package/template/stages/01-brainstorm/HANDOFF.md.template +112 -0
  112. package/template/stages/01-brainstorm/README.md +97 -0
  113. package/template/stages/01-brainstorm/config.yaml +92 -0
  114. package/template/stages/01-brainstorm/inputs/.gitkeep +0 -0
  115. package/template/stages/01-brainstorm/inputs/CLAUDE.md +0 -0
  116. package/template/stages/01-brainstorm/inputs/project_brief.md +40 -0
  117. package/template/stages/01-brainstorm/outputs/.gitkeep +0 -0
  118. package/template/stages/01-brainstorm/outputs/CLAUDE.md +0 -0
  119. package/template/stages/01-brainstorm/outputs/ideas.md +159 -0
  120. package/template/stages/01-brainstorm/outputs/requirements_analysis.md +222 -0
  121. package/template/stages/01-brainstorm/prompts/CLAUDE.md +0 -0
  122. package/template/stages/01-brainstorm/prompts/collaboration.md +46 -0
  123. package/template/stages/01-brainstorm/prompts/ideation.md +62 -0
  124. package/template/stages/01-brainstorm/prompts/persona.md +73 -0
  125. package/template/stages/01-brainstorm/prompts/requirements.md +73 -0
  126. package/template/stages/01-brainstorm/prompts/validation.md +50 -0
  127. package/template/stages/01-brainstorm/templates/CLAUDE.md +0 -0
  128. package/template/stages/01-brainstorm/templates/ideas.md +91 -0
  129. package/template/stages/01-brainstorm/templates/requirements_analysis.md +129 -0
  130. package/template/stages/02-research/CLAUDE.md +101 -0
  131. package/template/stages/02-research/HANDOFF.md +158 -0
  132. package/template/stages/02-research/HANDOFF.md.template +102 -0
  133. package/template/stages/02-research/config.yaml +68 -0
  134. package/template/stages/02-research/inputs/.gitkeep +0 -0
  135. package/template/stages/02-research/outputs/.gitkeep +0 -0
  136. package/template/stages/02-research/outputs/CLAUDE.md +0 -0
  137. package/template/stages/02-research/outputs/feasibility_report.md +176 -0
  138. package/template/stages/02-research/outputs/tech_research.md +403 -0
  139. package/template/stages/02-research/prompts/CLAUDE.md +0 -0
  140. package/template/stages/02-research/prompts/collaboration.md +51 -0
  141. package/template/stages/02-research/prompts/feasibility.md +73 -0
  142. package/template/stages/02-research/prompts/market_analysis.md +58 -0
  143. package/template/stages/02-research/prompts/tech_stack.md +60 -0
  144. package/template/stages/02-research/prompts/validation.md +51 -0
  145. package/template/stages/02-research/templates/.gitkeep +0 -0
  146. package/template/stages/03-planning/CLAUDE.md +98 -0
  147. package/template/stages/03-planning/HANDOFF.md +168 -0
  148. package/template/stages/03-planning/HANDOFF.md.template +91 -0
  149. package/template/stages/03-planning/config.yaml +64 -0
  150. package/template/stages/03-planning/inputs/.gitkeep +0 -0
  151. package/template/stages/03-planning/outputs/.gitkeep +0 -0
  152. package/template/stages/03-planning/outputs/CLAUDE.md +0 -0
  153. package/template/stages/03-planning/outputs/architecture.md +400 -0
  154. package/template/stages/03-planning/outputs/implementation.yaml +209 -0
  155. package/template/stages/03-planning/outputs/project_plan.md +204 -0
  156. package/template/stages/03-planning/outputs/tech_stack.md +176 -0
  157. package/template/stages/03-planning/prompts/CLAUDE.md +0 -0
  158. package/template/stages/03-planning/prompts/architecture.md +62 -0
  159. package/template/stages/03-planning/prompts/collaboration.md +57 -0
  160. package/template/stages/03-planning/prompts/validation.md +59 -0
  161. package/template/stages/03-planning/templates/.gitkeep +0 -0
  162. package/template/stages/04-ui-ux/CLAUDE.md +88 -0
  163. package/template/stages/04-ui-ux/HANDOFF.md +165 -0
  164. package/template/stages/04-ui-ux/HANDOFF.md.template +92 -0
  165. package/template/stages/04-ui-ux/config.yaml +57 -0
  166. package/template/stages/04-ui-ux/inputs/.gitkeep +0 -0
  167. package/template/stages/04-ui-ux/outputs/.gitkeep +0 -0
  168. package/template/stages/04-ui-ux/outputs/CLAUDE.md +0 -0
  169. package/template/stages/04-ui-ux/outputs/design_system.md +449 -0
  170. package/template/stages/04-ui-ux/outputs/user_flows.md +321 -0
  171. package/template/stages/04-ui-ux/outputs/wireframes.md +241 -0
  172. package/template/stages/04-ui-ux/prompts/.gitkeep +0 -0
  173. package/template/stages/04-ui-ux/prompts/CLAUDE.md +0 -0
  174. package/template/stages/04-ui-ux/prompts/collaboration.md +56 -0
  175. package/template/stages/04-ui-ux/prompts/validation.md +54 -0
  176. package/template/stages/04-ui-ux/templates/.gitkeep +0 -0
  177. package/template/stages/05-task-management/CLAUDE.md +105 -0
  178. package/template/stages/05-task-management/HANDOFF.md +187 -0
  179. package/template/stages/05-task-management/HANDOFF.md.template +97 -0
  180. package/template/stages/05-task-management/config.yaml +81 -0
  181. package/template/stages/05-task-management/inputs/.gitkeep +0 -0
  182. package/template/stages/05-task-management/outputs/.gitkeep +0 -0
  183. package/template/stages/05-task-management/outputs/CLAUDE.md +0 -0
  184. package/template/stages/05-task-management/outputs/milestones.md +253 -0
  185. package/template/stages/05-task-management/outputs/sprint_plan.md +203 -0
  186. package/template/stages/05-task-management/outputs/tasks.md +402 -0
  187. package/template/stages/05-task-management/prompts/.gitkeep +0 -0
  188. package/template/stages/05-task-management/prompts/CLAUDE.md +0 -0
  189. package/template/stages/05-task-management/prompts/collaboration.md +54 -0
  190. package/template/stages/05-task-management/prompts/validation.md +66 -0
  191. package/template/stages/05-task-management/templates/CLAUDE.md +0 -0
  192. package/template/stages/05-task-management/templates/notion_integration.md +176 -0
  193. package/template/stages/05-task-management/templates/parallel_groups.yaml +153 -0
  194. package/template/stages/05-task-management/templates/task_schema.yaml +154 -0
  195. package/template/stages/06-implementation/CLAUDE.md +163 -0
  196. package/template/stages/06-implementation/HANDOFF.md +184 -0
  197. package/template/stages/06-implementation/HANDOFF.md.template +192 -0
  198. package/template/stages/06-implementation/config.yaml +62 -0
  199. package/template/stages/06-implementation/inputs/.gitkeep +0 -0
  200. package/template/stages/06-implementation/outputs/.gitkeep +0 -0
  201. package/template/stages/06-implementation/prompts/.gitkeep +0 -0
  202. package/template/stages/06-implementation/prompts/CLAUDE.md +0 -0
  203. package/template/stages/06-implementation/prompts/collaboration.md +64 -0
  204. package/template/stages/06-implementation/prompts/validation.md +65 -0
  205. package/template/stages/06-implementation/templates/.gitkeep +0 -0
  206. package/template/stages/07-refactoring/CLAUDE.md +180 -0
  207. package/template/stages/07-refactoring/HANDOFF.md +82 -0
  208. package/template/stages/07-refactoring/HANDOFF.md.template +97 -0
  209. package/template/stages/07-refactoring/config.yaml +68 -0
  210. package/template/stages/07-refactoring/inputs/.gitkeep +0 -0
  211. package/template/stages/07-refactoring/outputs/.gitkeep +0 -0
  212. package/template/stages/07-refactoring/outputs/refactoring_report.md +102 -0
  213. package/template/stages/07-refactoring/prompts/.gitkeep +0 -0
  214. package/template/stages/07-refactoring/prompts/CLAUDE.md +0 -0
  215. package/template/stages/07-refactoring/prompts/collaboration.md +71 -0
  216. package/template/stages/07-refactoring/prompts/validation.md +76 -0
  217. package/template/stages/07-refactoring/templates/.gitkeep +0 -0
  218. package/template/stages/08-qa/CLAUDE.md +93 -0
  219. package/template/stages/08-qa/HANDOFF.md +114 -0
  220. package/template/stages/08-qa/HANDOFF.md.template +96 -0
  221. package/template/stages/08-qa/config.yaml +56 -0
  222. package/template/stages/08-qa/inputs/.gitkeep +0 -0
  223. package/template/stages/08-qa/outputs/.gitkeep +0 -0
  224. package/template/stages/08-qa/outputs/qa_report.md +138 -0
  225. package/template/stages/08-qa/prompts/.gitkeep +0 -0
  226. package/template/stages/08-qa/prompts/CLAUDE.md +0 -0
  227. package/template/stages/08-qa/prompts/collaboration.md +65 -0
  228. package/template/stages/08-qa/prompts/validation.md +71 -0
  229. package/template/stages/08-qa/templates/.gitkeep +0 -0
  230. package/template/stages/09-testing/CLAUDE.md +124 -0
  231. package/template/stages/09-testing/HANDOFF.md +118 -0
  232. package/template/stages/09-testing/HANDOFF.md.template +113 -0
  233. package/template/stages/09-testing/config.yaml +65 -0
  234. package/template/stages/09-testing/inputs/.gitkeep +0 -0
  235. package/template/stages/09-testing/outputs/.gitkeep +0 -0
  236. package/template/stages/09-testing/outputs/test_report.md +146 -0
  237. package/template/stages/09-testing/prompts/.gitkeep +0 -0
  238. package/template/stages/09-testing/prompts/CLAUDE.md +0 -0
  239. package/template/stages/09-testing/prompts/collaboration.md +77 -0
  240. package/template/stages/09-testing/prompts/validation.md +83 -0
  241. package/template/stages/09-testing/templates/.gitkeep +0 -0
  242. package/template/stages/10-deployment/CLAUDE.md +117 -0
  243. package/template/stages/10-deployment/HANDOFF.md +141 -0
  244. package/template/stages/10-deployment/HANDOFF.md.template +148 -0
  245. package/template/stages/10-deployment/config.yaml +61 -0
  246. package/template/stages/10-deployment/inputs/.gitkeep +0 -0
  247. package/template/stages/10-deployment/outputs/.gitkeep +0 -0
  248. package/template/stages/10-deployment/prompts/.gitkeep +0 -0
  249. package/template/stages/10-deployment/prompts/CLAUDE.md +0 -0
  250. package/template/stages/10-deployment/prompts/collaboration.md +80 -0
  251. package/template/stages/10-deployment/prompts/validation.md +93 -0
  252. package/template/stages/10-deployment/templates/CLAUDE.md +0 -0
  253. package/template/stages/10-deployment/templates/github-actions-cd.yaml +118 -0
  254. package/template/stages/10-deployment/templates/github-actions-ci.yaml +136 -0
  255. package/template/state/progress.json.template +111 -0
  256. package/template/state/templates/CLAUDE.md +0 -0
  257. package/template/state/templates/handoff_base.md.template +187 -0
  258. package/template/state/templates/phase_state.md.template +97 -0
@@ -0,0 +1,176 @@
1
+ # 📊 Snake Game - 실현 가능성 보고서
2
+
3
+ > 생성일: 2026-01-21
4
+ > 스테이지: 02-research
5
+ > 프로젝트: snake-game
6
+
7
+ ---
8
+
9
+ ## 1. 기술적 실현 가능성
10
+
11
+ ### 1.1 종합 평가
12
+
13
+ | 항목 | 난이도 | 실현 가능성 | 비고 |
14
+ |------|--------|------------|------|
15
+ | Canvas 렌더링 | ⭐⭐ | ✅ 높음 | 표준 API, 풍부한 자료 |
16
+ | 게임 루프 | ⭐⭐ | ✅ 높음 | requestAnimationFrame 표준 |
17
+ | 키보드 입력 | ⭐ | ✅ 높음 | 기본 이벤트 처리 |
18
+ | 터치 입력 | ⭐⭐ | ✅ 높음 | 검증된 패턴 존재 |
19
+ | 충돌 감지 | ⭐ | ✅ 높음 | 간단한 알고리즘 |
20
+ | 상태 관리 | ⭐⭐ | ✅ 높음 | useReducer 활용 |
21
+ | localStorage | ⭐ | ✅ 높음 | 브라우저 기본 API |
22
+ | 반응형 디자인 | ⭐⭐ | ✅ 높음 | CSS + JS 조합 |
23
+
24
+ **종합 평가**: ✅ **높은 실현 가능성**
25
+
26
+ ---
27
+
28
+ ### 1.2 기술 스택 적합성
29
+
30
+ | 기술 | 선택 이유 | 대안 | 리스크 |
31
+ |------|----------|------|--------|
32
+ | React 18 | 컴포넌트 기반, 훅 시스템 | Vue, Svelte | 낮음 |
33
+ | TypeScript | 타입 안전성, IDE 지원 | JavaScript | 낮음 |
34
+ | Vite | 빠른 개발 서버, HMR | CRA, Next.js | 낮음 |
35
+ | Canvas API | 게임 렌더링 최적화 | CSS Grid | 낮음 |
36
+
37
+ ---
38
+
39
+ ## 2. 리소스 요구사항
40
+
41
+ ### 2.1 개발 환경
42
+
43
+ | 항목 | 요구사항 | 현재 상태 |
44
+ |------|---------|----------|
45
+ | Node.js | 18+ | ✅ |
46
+ | npm/yarn | 최신 | ✅ |
47
+ | IDE | VSCode + TypeScript | ✅ |
48
+ | 브라우저 | Chrome/Firefox 최신 | ✅ |
49
+
50
+ ### 2.2 외부 의존성
51
+
52
+ | 패키지 | 버전 | 용도 | 필수 |
53
+ |--------|------|------|------|
54
+ | react | ^18.2.0 | UI 프레임워크 | ✅ |
55
+ | react-dom | ^18.2.0 | DOM 렌더링 | ✅ |
56
+ | typescript | ^5.0.0 | 타입 시스템 | ✅ |
57
+ | vite | ^5.0.0 | 빌드 도구 | ✅ |
58
+
59
+ **외부 게임 엔진 불필요** - 순수 React + Canvas로 구현 가능
60
+
61
+ ---
62
+
63
+ ## 3. 리스크 평가
64
+
65
+ ### 3.1 기술적 리스크
66
+
67
+ | 리스크 | 확률 | 영향도 | 대응 방안 |
68
+ |--------|------|--------|----------|
69
+ | 모바일 성능 저하 | 중 | 중 | Canvas 최적화, 프레임 스킵 |
70
+ | 터치 입력 지연 | 낮 | 중 | passive 리스너, 즉시 응답 |
71
+ | 브라우저 호환성 | 낮 | 낮 | 폴리필, 기능 감지 |
72
+ | 메모리 누수 | 낮 | 중 | cleanup 함수, useEffect 정리 |
73
+
74
+ ### 3.2 프로젝트 리스크
75
+
76
+ | 리스크 | 확률 | 영향도 | 대응 방안 |
77
+ |--------|------|--------|----------|
78
+ | 범위 확장 | 중 | 중 | MVP 우선, 기능 동결 |
79
+ | 테스트 부족 | 중 | 중 | TDD 접근, 커버리지 목표 설정 |
80
+ | 일정 지연 | 낮 | 낮 | 버퍼 시간 확보 |
81
+
82
+ ---
83
+
84
+ ## 4. MVP vs 전체 기능 비교
85
+
86
+ ### 4.1 MVP 범위 (Phase 1)
87
+
88
+ | 기능 | 복잡도 | 예상 시간 | 우선순위 |
89
+ |------|--------|----------|---------|
90
+ | 기본 뱀 조작 | 낮 | 30분 | 🔴 필수 |
91
+ | 먹이 시스템 | 낮 | 20분 | 🔴 필수 |
92
+ | 충돌 감지 | 낮 | 20분 | 🔴 필수 |
93
+ | 점수 시스템 | 낮 | 10분 | 🔴 필수 |
94
+ | 게임 재시작 | 낮 | 15분 | 🔴 필수 |
95
+ | **소계** | - | **~1.5시간** | - |
96
+
97
+ ### 4.2 추가 기능 (Phase 2)
98
+
99
+ | 기능 | 복잡도 | 예상 시간 | 우선순위 |
100
+ |------|--------|----------|---------|
101
+ | 레벨 시스템 | 낮 | 20분 | 🟡 중요 |
102
+ | 최고 점수 저장 | 낮 | 15분 | 🟡 중요 |
103
+ | 일시정지 | 낮 | 15분 | 🟡 중요 |
104
+ | 모바일 터치 | 중 | 40분 | 🟡 중요 |
105
+ | **소계** | - | **~1.5시간** | - |
106
+
107
+ ### 4.3 선택 기능 (Phase 3)
108
+
109
+ | 기능 | 복잡도 | 예상 시간 | 우선순위 |
110
+ |------|--------|----------|---------|
111
+ | 사운드 효과 | 중 | 30분 | 🟢 선택 |
112
+ | 테마/스킨 | 중 | 45분 | 🟢 선택 |
113
+ | 장애물 모드 | 중 | 30분 | 🟢 선택 |
114
+ | **소계** | - | **~2시간** | - |
115
+
116
+ ---
117
+
118
+ ## 5. 성공 지표
119
+
120
+ ### 5.1 기술 지표
121
+
122
+ | 지표 | 목표 | 측정 방법 |
123
+ |------|------|----------|
124
+ | 프레임레이트 | 60fps | Chrome DevTools |
125
+ | 초기 로딩 | < 2초 | Lighthouse |
126
+ | 번들 크기 | < 200KB | vite-bundle-visualizer |
127
+ | 테스트 커버리지 | > 80% | vitest coverage |
128
+
129
+ ### 5.2 품질 지표
130
+
131
+ | 지표 | 목표 | 측정 방법 |
132
+ |------|------|----------|
133
+ | TypeScript 에러 | 0개 | tsc --noEmit |
134
+ | ESLint 경고 | 0개 | eslint . |
135
+ | 접근성 | WCAG AA | axe-core |
136
+
137
+ ---
138
+
139
+ ## 6. 결론 및 권장사항
140
+
141
+ ### 6.1 최종 평가
142
+
143
+ ```
144
+ ┌─────────────────────────────────────────────────────────┐
145
+ │ 실현 가능성: ✅ 매우 높음 │
146
+ │ 기술적 난이도: ⭐⭐ (중하) │
147
+ │ 리스크 수준: 🟢 낮음 │
148
+ │ 권장 진행: ✅ 승인 │
149
+ └─────────────────────────────────────────────────────────┘
150
+ ```
151
+
152
+ ### 6.2 권장사항
153
+
154
+ 1. **MVP 우선 개발**: 핵심 기능 먼저 완성 후 확장
155
+ 2. **Canvas 사용**: CSS Grid 대신 성능 우선
156
+ 3. **useRef 활용**: 게임 상태는 리렌더링 최소화
157
+ 4. **테스트 병행**: 로직 테스트 먼저, UI 테스트 나중
158
+ 5. **점진적 모바일 지원**: 데스크톱 완성 후 터치 추가
159
+
160
+ ### 6.3 다음 단계
161
+
162
+ 1. **03-planning**: 상세 아키텍처 설계
163
+ 2. **04-ui-ux**: 게임 화면 와이어프레임
164
+ 3. **05-tasks**: 스프린트 계획 수립
165
+ 4. **06-implementation**: MVP 개발 착수
166
+
167
+ ---
168
+
169
+ ## 📝 승인
170
+
171
+ | 항목 | 상태 |
172
+ |------|------|
173
+ | 기술적 실현 가능성 | ✅ 확인 |
174
+ | 리소스 요구사항 | ✅ 충족 |
175
+ | 리스크 평가 | ✅ 수용 가능 |
176
+ | **최종 결정** | ✅ **개발 진행 승인** |
@@ -0,0 +1,403 @@
1
+ # 🔬 Snake Game - 기술 리서치
2
+
3
+ > 생성일: 2026-01-21
4
+ > 스테이지: 02-research
5
+ > 프로젝트: snake-game
6
+ > AI 도구: Claude + Exa MCP
7
+
8
+ ---
9
+
10
+ ## 📋 조사 항목 요약
11
+
12
+ | 항목 | 권장 기술 | 근거 |
13
+ |------|----------|------|
14
+ | 렌더링 | Canvas API | 게임 성능, 60fps 유지 |
15
+ | 게임 루프 | requestAnimationFrame | 브라우저 최적화, 탭 비활성화 처리 |
16
+ | 상태 관리 | useReducer + useRef | 복잡한 게임 상태, 리렌더링 최소화 |
17
+ | 모바일 조작 | Custom useSwipe Hook | 터치 이벤트 직접 처리 |
18
+ | 하이스코어 | localStorage | 백엔드 불필요, 간단한 구현 |
19
+
20
+ ---
21
+
22
+ ## 1. Canvas 게임 루프 구현
23
+
24
+ ### 1.1 requestAnimationFrame 기반 게임 루프
25
+
26
+ **핵심 패턴** (Exa 조사 결과):
27
+
28
+ ```typescript
29
+ // useGameLoop.ts
30
+ const useGameLoop = (callback: (deltaTime: number) => void) => {
31
+ const requestRef = useRef<number>();
32
+ const previousTimeRef = useRef<number>();
33
+
34
+ const animate = (time: number) => {
35
+ if (previousTimeRef.current !== undefined) {
36
+ const deltaTime = time - previousTimeRef.current;
37
+ callback(deltaTime);
38
+ }
39
+ previousTimeRef.current = time;
40
+ requestRef.current = requestAnimationFrame(animate);
41
+ };
42
+
43
+ useEffect(() => {
44
+ requestRef.current = requestAnimationFrame(animate);
45
+ return () => {
46
+ if (requestRef.current) {
47
+ cancelAnimationFrame(requestRef.current);
48
+ }
49
+ };
50
+ }, []);
51
+ };
52
+ ```
53
+
54
+ ### 1.2 setInterval vs requestAnimationFrame 비교
55
+
56
+ | 특성 | setInterval | requestAnimationFrame |
57
+ |------|-------------|----------------------|
58
+ | **정확도** | 낮음 (지연 발생) | 높음 (브라우저 최적화) |
59
+ | **탭 비활성화** | 계속 실행 (리소스 낭비) | 자동 일시정지 |
60
+ | **프레임레이트** | 고정 (부정확) | 디스플레이 동기화 (60fps) |
61
+ | **성능** | 보통 | 최적화됨 |
62
+
63
+ **결론**: requestAnimationFrame 사용 권장
64
+
65
+ ### 1.3 하이브리드 게임 루프 (고정 타임스텝)
66
+
67
+ ```typescript
68
+ // 물리 시뮬레이션과 렌더링 분리
69
+ const TICK_RATE = 1000 / 60; // 60 TPS
70
+ let accumulator = 0;
71
+
72
+ const gameLoop = (currentTime: number) => {
73
+ const deltaTime = currentTime - lastTime;
74
+ accumulator += Math.min(deltaTime, 100); // 프레임 스킵 제한
75
+
76
+ while (accumulator >= TICK_RATE) {
77
+ updateGameState(); // 고정 타임스텝 업데이트
78
+ accumulator -= TICK_RATE;
79
+ }
80
+
81
+ render(); // 가변 렌더링
82
+ requestAnimationFrame(gameLoop);
83
+ };
84
+ ```
85
+
86
+ ---
87
+
88
+ ## 2. React + Canvas 통합 패턴
89
+
90
+ ### 2.1 useRef로 Canvas 접근
91
+
92
+ ```typescript
93
+ const GameBoard: React.FC = () => {
94
+ const canvasRef = useRef<HTMLCanvasElement>(null);
95
+
96
+ useEffect(() => {
97
+ const canvas = canvasRef.current;
98
+ if (!canvas) return;
99
+
100
+ const ctx = canvas.getContext('2d');
101
+ if (!ctx) return;
102
+
103
+ // 게임 렌더링 로직
104
+ const draw = () => {
105
+ ctx.clearRect(0, 0, canvas.width, canvas.height);
106
+ // ... 렌더링
107
+ };
108
+
109
+ draw();
110
+ }, [gameState]);
111
+
112
+ return <canvas ref={canvasRef} width={400} height={400} />;
113
+ };
114
+ ```
115
+
116
+ ### 2.2 리렌더링 최소화 전략
117
+
118
+ **문제**: React setState가 너무 자주 호출되면 성능 저하
119
+
120
+ **해결책**:
121
+ 1. **useRef로 게임 상태 관리** - 리렌더링 없이 상태 업데이트
122
+ 2. **Canvas 직접 업데이트** - React DOM 업데이트 우회
123
+ 3. **requestAnimationFrame 내에서 렌더링** - 효율적인 드로잉
124
+
125
+ ```typescript
126
+ // 게임 상태는 useRef로 관리
127
+ const gameStateRef = useRef<GameState>({
128
+ snake: [{x: 10, y: 10}],
129
+ food: {x: 5, y: 5},
130
+ direction: 'RIGHT',
131
+ score: 0
132
+ });
133
+
134
+ // UI에 표시할 점수만 useState로 관리
135
+ const [displayScore, setDisplayScore] = useState(0);
136
+ ```
137
+
138
+ ---
139
+
140
+ ## 3. 모바일 터치 조작 구현
141
+
142
+ ### 3.1 useSwipe 커스텀 훅
143
+
144
+ **Exa 조사 결과 기반 구현**:
145
+
146
+ ```typescript
147
+ interface SwipeHandlers {
148
+ left?: () => void;
149
+ right?: () => void;
150
+ up?: () => void;
151
+ down?: () => void;
152
+ }
153
+
154
+ const useSwipe = (handlers: SwipeHandlers) => {
155
+ const touchCoordsRef = useRef({
156
+ touchStart: { x: 0, y: 0, time: Date.now() }
157
+ });
158
+
159
+ useEffect(() => {
160
+ const handleTouchStart = (e: TouchEvent) => {
161
+ touchCoordsRef.current.touchStart = {
162
+ x: e.targetTouches[0].clientX,
163
+ y: e.targetTouches[0].clientY,
164
+ time: Date.now()
165
+ };
166
+ };
167
+
168
+ const handleTouchEnd = (e: TouchEvent) => {
169
+ const threshold = 50; // 최소 스와이프 거리
170
+ const maxTime = 500; // 최대 스와이프 시간 (ms)
171
+
172
+ const { touchStart } = touchCoordsRef.current;
173
+ const touchEnd = {
174
+ x: e.changedTouches[0].clientX,
175
+ y: e.changedTouches[0].clientY
176
+ };
177
+
178
+ const elapsed = Date.now() - touchStart.time;
179
+ if (elapsed > maxTime) return;
180
+
181
+ const xDiff = touchStart.x - touchEnd.x;
182
+ const yDiff = touchStart.y - touchEnd.y;
183
+
184
+ if (Math.abs(xDiff) > Math.abs(yDiff)) {
185
+ // 수평 스와이프
186
+ if (Math.abs(xDiff) > threshold) {
187
+ xDiff > 0 ? handlers.left?.() : handlers.right?.();
188
+ }
189
+ } else {
190
+ // 수직 스와이프
191
+ if (Math.abs(yDiff) > threshold) {
192
+ yDiff > 0 ? handlers.up?.() : handlers.down?.();
193
+ }
194
+ }
195
+ };
196
+
197
+ window.addEventListener('touchstart', handleTouchStart, { passive: true });
198
+ window.addEventListener('touchend', handleTouchEnd, { passive: true });
199
+
200
+ return () => {
201
+ window.removeEventListener('touchstart', handleTouchStart);
202
+ window.removeEventListener('touchend', handleTouchEnd);
203
+ };
204
+ }, [handlers]);
205
+ };
206
+ ```
207
+
208
+ ### 3.2 모바일 방향 버튼 (대안)
209
+
210
+ ```typescript
211
+ const MobileControls: React.FC<{ onDirection: (dir: Direction) => void }> = ({ onDirection }) => (
212
+ <div className="mobile-controls">
213
+ <button onTouchStart={() => onDirection('UP')}>↑</button>
214
+ <div>
215
+ <button onTouchStart={() => onDirection('LEFT')}>←</button>
216
+ <button onTouchStart={() => onDirection('RIGHT')}>→</button>
217
+ </div>
218
+ <button onTouchStart={() => onDirection('DOWN')}>↓</button>
219
+ </div>
220
+ );
221
+ ```
222
+
223
+ ---
224
+
225
+ ## 4. 충돌 감지 알고리즘
226
+
227
+ ### 4.1 벽 충돌 (O(1))
228
+
229
+ ```typescript
230
+ const checkWallCollision = (head: Position, boardSize: number): boolean => {
231
+ return head.x < 0 || head.x >= boardSize || head.y < 0 || head.y >= boardSize;
232
+ };
233
+ ```
234
+
235
+ ### 4.2 자기 몸 충돌 (O(n))
236
+
237
+ ```typescript
238
+ const checkSelfCollision = (head: Position, body: Position[]): boolean => {
239
+ // body[0]은 머리이므로 1부터 시작
240
+ return body.slice(1).some(segment =>
241
+ segment.x === head.x && segment.y === head.y
242
+ );
243
+ };
244
+ ```
245
+
246
+ ### 4.3 먹이 충돌 (O(1))
247
+
248
+ ```typescript
249
+ const checkFoodCollision = (head: Position, food: Position): boolean => {
250
+ return head.x === food.x && head.y === food.y;
251
+ };
252
+ ```
253
+
254
+ ---
255
+
256
+ ## 5. 상태 관리 구조
257
+
258
+ ### 5.1 게임 상태 타입 정의
259
+
260
+ ```typescript
261
+ // types/game.ts
262
+ type Direction = 'UP' | 'DOWN' | 'LEFT' | 'RIGHT';
263
+ type GameStatus = 'idle' | 'playing' | 'paused' | 'gameover';
264
+
265
+ interface Position {
266
+ x: number;
267
+ y: number;
268
+ }
269
+
270
+ interface GameState {
271
+ snake: Position[];
272
+ food: Position;
273
+ direction: Direction;
274
+ nextDirection: Direction; // 입력 버퍼
275
+ score: number;
276
+ level: number;
277
+ status: GameStatus;
278
+ }
279
+
280
+ interface GameConfig {
281
+ boardSize: number;
282
+ cellSize: number;
283
+ initialSpeed: number;
284
+ speedIncrement: number;
285
+ }
286
+ ```
287
+
288
+ ### 5.2 useReducer 기반 상태 관리
289
+
290
+ ```typescript
291
+ type GameAction =
292
+ | { type: 'START_GAME' }
293
+ | { type: 'PAUSE_GAME' }
294
+ | { type: 'RESUME_GAME' }
295
+ | { type: 'GAME_OVER' }
296
+ | { type: 'SET_DIRECTION'; payload: Direction }
297
+ | { type: 'MOVE_SNAKE' }
298
+ | { type: 'EAT_FOOD' }
299
+ | { type: 'RESET_GAME' };
300
+
301
+ const gameReducer = (state: GameState, action: GameAction): GameState => {
302
+ switch (action.type) {
303
+ case 'START_GAME':
304
+ return { ...state, status: 'playing' };
305
+ case 'SET_DIRECTION':
306
+ // 반대 방향 이동 방지
307
+ if (!isOppositeDirection(state.direction, action.payload)) {
308
+ return { ...state, nextDirection: action.payload };
309
+ }
310
+ return state;
311
+ case 'MOVE_SNAKE':
312
+ // 뱀 이동 로직
313
+ return moveSnake(state);
314
+ // ... 기타 액션
315
+ }
316
+ };
317
+ ```
318
+
319
+ ---
320
+
321
+ ## 6. localStorage 하이스코어
322
+
323
+ ### 6.1 저장 및 로드
324
+
325
+ ```typescript
326
+ const HIGH_SCORE_KEY = 'snake_game_high_score';
327
+
328
+ const saveHighScore = (score: number): void => {
329
+ const currentHigh = getHighScore();
330
+ if (score > currentHigh) {
331
+ localStorage.setItem(HIGH_SCORE_KEY, score.toString());
332
+ }
333
+ };
334
+
335
+ const getHighScore = (): number => {
336
+ const stored = localStorage.getItem(HIGH_SCORE_KEY);
337
+ return stored ? parseInt(stored, 10) : 0;
338
+ };
339
+ ```
340
+
341
+ ### 6.2 커스텀 훅
342
+
343
+ ```typescript
344
+ const useHighScore = () => {
345
+ const [highScore, setHighScore] = useState(() => getHighScore());
346
+
347
+ const updateHighScore = useCallback((score: number) => {
348
+ if (score > highScore) {
349
+ setHighScore(score);
350
+ saveHighScore(score);
351
+ }
352
+ }, [highScore]);
353
+
354
+ return { highScore, updateHighScore };
355
+ };
356
+ ```
357
+
358
+ ---
359
+
360
+ ## 7. 성능 최적화 팁
361
+
362
+ ### 7.1 Canvas 최적화
363
+
364
+ 1. **오프스크린 캔버스**: 복잡한 요소 미리 렌더링
365
+ 2. **부분 리드로잉**: 변경된 부분만 다시 그리기
366
+ 3. **이미지 스프라이트**: 여러 이미지 하나로 합치기
367
+
368
+ ### 7.2 React 최적화
369
+
370
+ 1. **useCallback/useMemo**: 불필요한 재생성 방지
371
+ 2. **React.memo**: 순수 컴포넌트 메모이제이션
372
+ 3. **게임 로직 분리**: Canvas 업데이트는 React 외부에서
373
+
374
+ ---
375
+
376
+ ## 📚 참고 자료
377
+
378
+ ### GitHub 오픈소스 프로젝트
379
+ - [gimnathperera/snake-loop](https://github.com/gimnathperera/snake-loop) - React + RTK Query
380
+ - [markkaylor/react-snake-ts](https://github.com/markkaylor/react-snake-ts) - TypeScript 구현
381
+ - [v662-coder/SnakeGame](https://github.com/v662-coder/SnakeGame) - Canvas 기반
382
+
383
+ ### 기술 문서
384
+ - [30-seconds-of-code: useRequestAnimationFrame](https://github.com/Chalarangelo/30-seconds-of-code)
385
+ - [react-use: useRafLoop](https://github.com/streamich/react-use)
386
+ - [beautiful-react-hooks: useRequestAnimationFrame](https://github.com/antonioru/beautiful-react-hooks)
387
+
388
+ ### 튜토리얼
389
+ - [Learn Advance React Hooks by Building Snake Game](https://javascript.plainenglish.io/learn-advance-react-hooks-by-building-snake-game)
390
+ - [Build Your First Snake Game with TypeScript React](https://javascript.plainenglish.io/build-your-first-snake-game-with-typescript-react)
391
+ - [Create Dead-Simple Canvas Animations in React](https://spin.atomicobject.com/animations-react)
392
+
393
+ ---
394
+
395
+ ## ✅ 리서치 완료 체크리스트
396
+
397
+ - [x] Canvas 게임 루프 구현 방법 조사
398
+ - [x] React + Canvas 통합 패턴 분석
399
+ - [x] 모바일 터치 이벤트 처리 조사
400
+ - [x] 충돌 감지 알고리즘 정리
401
+ - [x] localStorage 하이스코어 구현 방법
402
+ - [x] 성능 최적화 기법 조사
403
+ - [x] 오픈소스 프로젝트 사례 수집
File without changes
@@ -0,0 +1,51 @@
1
+ # AI 협업 프롬프트 - Research
2
+
3
+ ## 협업 모드: Parallel + Sequential
4
+
5
+ 이 스테이지에서는 **병렬 리서치** 후 **순차적 통합**을 진행합니다.
6
+
7
+ ### 참여 모델
8
+ - **Claude**: 심층 분석, 기술 문서 합성
9
+ - **Gemini**: 시장 트렌드, 경쟁사 분석
10
+
11
+ ### 협업 프롬프트
12
+
13
+ ```
14
+ # 병렬 리서치
15
+ /collaborate --mode parallel --models claude,gemini --task "기술 및 시장 리서치"
16
+
17
+ # 순차적 통합 (Claude가 Gemini 결과 검토)
18
+ /collaborate --mode sequential --chain "gemini:market_research -> claude:synthesis"
19
+ ```
20
+
21
+ ### 작업 분담
22
+
23
+ | AI | 담당 영역 | 출력 |
24
+ |----|----------|------|
25
+ | Gemini | 시장 분석, 경쟁사 조사 | market_analysis.md |
26
+ | Claude | 기술 스택 분석, 실현 가능성 | tech_research.md, feasibility_report.md |
27
+
28
+ ### MCP 서버 활용
29
+
30
+ - **firecrawl**: 웹 크롤링 (Gemini 활용)
31
+ - **exa**: AI 검색 (Claude 활용)
32
+ - **context7**: 문서 검색 (Claude 활용)
33
+
34
+ ### 출력 형식
35
+
36
+ ```markdown
37
+ ## AI 협업 결과
38
+
39
+ ### Gemini 리서치 (시장)
40
+ - 경쟁사 분석
41
+ - 시장 트렌드
42
+ ...
43
+
44
+ ### Claude 리서치 (기술)
45
+ - 기술 스택 비교
46
+ - 실현 가능성 평가
47
+ ...
48
+
49
+ ### 통합 인사이트
50
+ - [핵심 발견]
51
+ ```
@@ -0,0 +1,73 @@
1
+ # Feasibility Analysis Prompt
2
+
3
+ ## 사용 모델
4
+ Claude
5
+
6
+ ## 프롬프트
7
+
8
+ ```
9
+ 당신은 프로젝트 실현 가능성 평가 전문가입니다.
10
+
11
+ 다음 자료를 바탕으로 종합적인 실현 가능성 평가를 수행해주세요:
12
+
13
+ ---
14
+ ## 기술 리서치
15
+ {{TECH_RESEARCH}}
16
+
17
+ ## 시장 분석
18
+ {{MARKET_ANALYSIS}}
19
+
20
+ ## 요구사항
21
+ {{REQUIREMENTS}}
22
+ ---
23
+
24
+ ## 평가 항목
25
+
26
+ ### 1. 기술적 실현 가능성
27
+ - 기술 스택 성숙도
28
+ - 팀 역량 대비 복잡도
29
+ - 기술적 리스크
30
+
31
+ 점수: /10
32
+
33
+ ### 2. 경제적 실현 가능성
34
+ - 예상 개발 비용
35
+ - 운영 비용 (인프라, 유지보수)
36
+ - ROI 예측
37
+
38
+ 점수: /10
39
+
40
+ ### 3. 일정 실현 가능성
41
+ - MVP 개발 예상 기간
42
+ - 전체 개발 예상 기간
43
+ - 일정 리스크
44
+
45
+ 점수: /10
46
+
47
+ ### 4. 시장 실현 가능성
48
+ - 시장 진입 가능성
49
+ - 차별화 가능성
50
+ - 성장 가능성
51
+
52
+ 점수: /10
53
+
54
+ ### 5. 리스크 매트릭스
55
+
56
+ | 리스크 | 영향도 | 발생확률 | 완화전략 | 담당 |
57
+ |--------|--------|----------|----------|------|
58
+
59
+ ### 6. Go/No-Go 권고
60
+
61
+ 종합 점수: /40
62
+
63
+ 권고: GO / CONDITIONAL GO / NO-GO
64
+
65
+ 조건 (CONDITIONAL일 경우):
66
+ -
67
+
68
+ ## 출력 형식
69
+ 실현 가능성 보고서 (경영진 요약 포함)
70
+ ```
71
+
72
+ ## 기대 출력
73
+ `outputs/feasibility_report.md`