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.
- package/README.md +374 -0
- package/bin/create.js +193 -0
- package/package.json +38 -0
- package/template/.claude/CLAUDE.md +7 -0
- package/template/.claude/commands/CLAUDE.md +0 -0
- package/template/.claude/commands/benchmark.md +103 -0
- package/template/.claude/commands/brainstorm.md +67 -0
- package/template/.claude/commands/checkpoint.md +93 -0
- package/template/.claude/commands/codex.md +107 -0
- package/template/.claude/commands/collaborate.md +85 -0
- package/template/.claude/commands/context.md +154 -0
- package/template/.claude/commands/deploy.md +102 -0
- package/template/.claude/commands/fork.md +142 -0
- package/template/.claude/commands/gemini.md +84 -0
- package/template/.claude/commands/handoff.md +80 -0
- package/template/.claude/commands/implement.md +82 -0
- package/template/.claude/commands/init-project.md +49 -0
- package/template/.claude/commands/next.md +125 -0
- package/template/.claude/commands/planning.md +69 -0
- package/template/.claude/commands/qa.md +81 -0
- package/template/.claude/commands/refactor.md +95 -0
- package/template/.claude/commands/research.md +60 -0
- package/template/.claude/commands/restore.md +113 -0
- package/template/.claude/commands/run-stage.md +78 -0
- package/template/.claude/commands/stages.md +109 -0
- package/template/.claude/commands/status.md +73 -0
- package/template/.claude/commands/tasks.md +80 -0
- package/template/.claude/commands/test.md +93 -0
- package/template/.claude/commands/ui-ux.md +61 -0
- package/template/.claude/commands/validate.md +174 -0
- package/template/.claude/hooks/CLAUDE.md +0 -0
- package/template/.claude/hooks/ai-selector.sh +223 -0
- package/template/.claude/hooks/auto-checkpoint.sh +187 -0
- package/template/.claude/hooks/output-validator.sh +289 -0
- package/template/.claude/hooks/post-stage.sh +123 -0
- package/template/.claude/hooks/pre-stage.sh +186 -0
- package/template/.claude/hooks/session-start.sh +90 -0
- package/template/.claude/hooks/statusline.sh +115 -0
- package/template/.claude/hooks/stop.sh +104 -0
- package/template/.claude/settings.json +149 -0
- package/template/.claude/skills/ai-collaboration/CLAUDE.md +0 -0
- package/template/.claude/skills/ai-collaboration/README.md +61 -0
- package/template/.claude/skills/ai-collaboration/debate.md +148 -0
- package/template/.claude/skills/ai-collaboration/parallel.md +96 -0
- package/template/.claude/skills/ai-collaboration/prompts/CLAUDE.md +107 -0
- package/template/.claude/skills/auto-checkpoint/CLAUDE.md +0 -0
- package/template/.claude/skills/auto-checkpoint/README.md +77 -0
- package/template/.claude/skills/auto-checkpoint/prompts/CLAUDE.md +113 -0
- package/template/.claude/skills/auto-checkpoint/rollback.md +152 -0
- package/template/.claude/skills/auto-checkpoint/trigger.md +122 -0
- package/template/.claude/skills/context-compression/CLAUDE.md +0 -0
- package/template/.claude/skills/context-compression/README.md +121 -0
- package/template/.claude/skills/context-compression/analyze.md +114 -0
- package/template/.claude/skills/context-compression/compress.md +175 -0
- package/template/.claude/skills/context-compression/prompts/CLAUDE.md +0 -0
- package/template/.claude/skills/context-compression/prompts/compression.md +172 -0
- package/template/.claude/skills/output-validator/CLAUDE.md +0 -0
- package/template/.claude/skills/output-validator/README.md +86 -0
- package/template/.claude/skills/output-validator/prompts/CLAUDE.md +119 -0
- package/template/.claude/skills/output-validator/validate.md +182 -0
- package/template/.claude/skills/smart-handoff/CLAUDE.md +0 -0
- package/template/.claude/skills/smart-handoff/README.md +59 -0
- package/template/.claude/skills/smart-handoff/extract.md +76 -0
- package/template/.claude/skills/smart-handoff/prompts/CLAUDE.md +86 -0
- package/template/.claude/skills/smart-handoff/summarize.md +94 -0
- package/template/.claude/skills/stage-transition/CLAUDE.md +0 -0
- package/template/.claude/skills/stage-transition/README.md +84 -0
- package/template/.claude/skills/stage-transition/handoff-gen.md +160 -0
- package/template/.claude/skills/stage-transition/prompts/CLAUDE.md +0 -0
- package/template/.claude/skills/stage-transition/prompts/transition.md +145 -0
- package/template/.claude/skills/stage-transition/validate.md +108 -0
- package/template/CLAUDE.md +528 -0
- package/template/config/CLAUDE.md +0 -0
- package/template/config/ai_benchmarking.yaml +184 -0
- package/template/config/ai_collaboration.yaml +159 -0
- package/template/config/ai_logging.yaml +129 -0
- package/template/config/auto_checkpoint.yaml +189 -0
- package/template/config/context.yaml +78 -0
- package/template/config/git.yaml +161 -0
- package/template/config/handoff_intelligence.yaml +229 -0
- package/template/config/implementation.yaml.template +181 -0
- package/template/config/mcp_fallbacks.yaml +252 -0
- package/template/config/memory_integration.yaml +200 -0
- package/template/config/model_enforcement.yaml +141 -0
- package/template/config/models.yaml +242 -0
- package/template/config/output_validation.yaml +352 -0
- package/template/config/pipeline.yaml +357 -0
- package/template/config/pipeline_forking.yaml +236 -0
- package/template/config/qa_logging.yaml +166 -0
- package/template/config/smart_rollback.yaml +209 -0
- package/template/config/stage_personas.yaml +354 -0
- package/template/config/workflow.yaml +54 -0
- package/template/scripts/CLAUDE.md +0 -0
- package/template/scripts/ai-benchmark.sh +272 -0
- package/template/scripts/codex-wrapper.sh +97 -0
- package/template/scripts/context-manager.sh +528 -0
- package/template/scripts/create-checkpoint.sh +116 -0
- package/template/scripts/gemini-wrapper.sh +96 -0
- package/template/scripts/init-project.sh +109 -0
- package/template/scripts/list-stages.sh +245 -0
- package/template/scripts/next-stage.sh +228 -0
- package/template/scripts/output-validate.sh +12 -0
- package/template/scripts/pipeline-fork.sh +293 -0
- package/template/scripts/pre-run-check.sh +361 -0
- package/template/scripts/restore-checkpoint.sh +247 -0
- package/template/scripts/run-stage.sh +139 -0
- package/template/scripts/show-status.sh +185 -0
- package/template/scripts/smart-handoff.sh +254 -0
- package/template/stages/01-brainstorm/CLAUDE.md +103 -0
- package/template/stages/01-brainstorm/HANDOFF.md +110 -0
- package/template/stages/01-brainstorm/HANDOFF.md.template +112 -0
- package/template/stages/01-brainstorm/README.md +97 -0
- package/template/stages/01-brainstorm/config.yaml +92 -0
- package/template/stages/01-brainstorm/inputs/.gitkeep +0 -0
- package/template/stages/01-brainstorm/inputs/CLAUDE.md +0 -0
- package/template/stages/01-brainstorm/inputs/project_brief.md +40 -0
- package/template/stages/01-brainstorm/outputs/.gitkeep +0 -0
- package/template/stages/01-brainstorm/outputs/CLAUDE.md +0 -0
- package/template/stages/01-brainstorm/outputs/ideas.md +159 -0
- package/template/stages/01-brainstorm/outputs/requirements_analysis.md +222 -0
- package/template/stages/01-brainstorm/prompts/CLAUDE.md +0 -0
- package/template/stages/01-brainstorm/prompts/collaboration.md +46 -0
- package/template/stages/01-brainstorm/prompts/ideation.md +62 -0
- package/template/stages/01-brainstorm/prompts/persona.md +73 -0
- package/template/stages/01-brainstorm/prompts/requirements.md +73 -0
- package/template/stages/01-brainstorm/prompts/validation.md +50 -0
- package/template/stages/01-brainstorm/templates/CLAUDE.md +0 -0
- package/template/stages/01-brainstorm/templates/ideas.md +91 -0
- package/template/stages/01-brainstorm/templates/requirements_analysis.md +129 -0
- package/template/stages/02-research/CLAUDE.md +101 -0
- package/template/stages/02-research/HANDOFF.md +158 -0
- package/template/stages/02-research/HANDOFF.md.template +102 -0
- package/template/stages/02-research/config.yaml +68 -0
- package/template/stages/02-research/inputs/.gitkeep +0 -0
- package/template/stages/02-research/outputs/.gitkeep +0 -0
- package/template/stages/02-research/outputs/CLAUDE.md +0 -0
- package/template/stages/02-research/outputs/feasibility_report.md +176 -0
- package/template/stages/02-research/outputs/tech_research.md +403 -0
- package/template/stages/02-research/prompts/CLAUDE.md +0 -0
- package/template/stages/02-research/prompts/collaboration.md +51 -0
- package/template/stages/02-research/prompts/feasibility.md +73 -0
- package/template/stages/02-research/prompts/market_analysis.md +58 -0
- package/template/stages/02-research/prompts/tech_stack.md +60 -0
- package/template/stages/02-research/prompts/validation.md +51 -0
- package/template/stages/02-research/templates/.gitkeep +0 -0
- package/template/stages/03-planning/CLAUDE.md +98 -0
- package/template/stages/03-planning/HANDOFF.md +168 -0
- package/template/stages/03-planning/HANDOFF.md.template +91 -0
- package/template/stages/03-planning/config.yaml +64 -0
- package/template/stages/03-planning/inputs/.gitkeep +0 -0
- package/template/stages/03-planning/outputs/.gitkeep +0 -0
- package/template/stages/03-planning/outputs/CLAUDE.md +0 -0
- package/template/stages/03-planning/outputs/architecture.md +400 -0
- package/template/stages/03-planning/outputs/implementation.yaml +209 -0
- package/template/stages/03-planning/outputs/project_plan.md +204 -0
- package/template/stages/03-planning/outputs/tech_stack.md +176 -0
- package/template/stages/03-planning/prompts/CLAUDE.md +0 -0
- package/template/stages/03-planning/prompts/architecture.md +62 -0
- package/template/stages/03-planning/prompts/collaboration.md +57 -0
- package/template/stages/03-planning/prompts/validation.md +59 -0
- package/template/stages/03-planning/templates/.gitkeep +0 -0
- package/template/stages/04-ui-ux/CLAUDE.md +88 -0
- package/template/stages/04-ui-ux/HANDOFF.md +165 -0
- package/template/stages/04-ui-ux/HANDOFF.md.template +92 -0
- package/template/stages/04-ui-ux/config.yaml +57 -0
- package/template/stages/04-ui-ux/inputs/.gitkeep +0 -0
- package/template/stages/04-ui-ux/outputs/.gitkeep +0 -0
- package/template/stages/04-ui-ux/outputs/CLAUDE.md +0 -0
- package/template/stages/04-ui-ux/outputs/design_system.md +449 -0
- package/template/stages/04-ui-ux/outputs/user_flows.md +321 -0
- package/template/stages/04-ui-ux/outputs/wireframes.md +241 -0
- package/template/stages/04-ui-ux/prompts/.gitkeep +0 -0
- package/template/stages/04-ui-ux/prompts/CLAUDE.md +0 -0
- package/template/stages/04-ui-ux/prompts/collaboration.md +56 -0
- package/template/stages/04-ui-ux/prompts/validation.md +54 -0
- package/template/stages/04-ui-ux/templates/.gitkeep +0 -0
- package/template/stages/05-task-management/CLAUDE.md +105 -0
- package/template/stages/05-task-management/HANDOFF.md +187 -0
- package/template/stages/05-task-management/HANDOFF.md.template +97 -0
- package/template/stages/05-task-management/config.yaml +81 -0
- package/template/stages/05-task-management/inputs/.gitkeep +0 -0
- package/template/stages/05-task-management/outputs/.gitkeep +0 -0
- package/template/stages/05-task-management/outputs/CLAUDE.md +0 -0
- package/template/stages/05-task-management/outputs/milestones.md +253 -0
- package/template/stages/05-task-management/outputs/sprint_plan.md +203 -0
- package/template/stages/05-task-management/outputs/tasks.md +402 -0
- package/template/stages/05-task-management/prompts/.gitkeep +0 -0
- package/template/stages/05-task-management/prompts/CLAUDE.md +0 -0
- package/template/stages/05-task-management/prompts/collaboration.md +54 -0
- package/template/stages/05-task-management/prompts/validation.md +66 -0
- package/template/stages/05-task-management/templates/CLAUDE.md +0 -0
- package/template/stages/05-task-management/templates/notion_integration.md +176 -0
- package/template/stages/05-task-management/templates/parallel_groups.yaml +153 -0
- package/template/stages/05-task-management/templates/task_schema.yaml +154 -0
- package/template/stages/06-implementation/CLAUDE.md +163 -0
- package/template/stages/06-implementation/HANDOFF.md +184 -0
- package/template/stages/06-implementation/HANDOFF.md.template +192 -0
- package/template/stages/06-implementation/config.yaml +62 -0
- package/template/stages/06-implementation/inputs/.gitkeep +0 -0
- package/template/stages/06-implementation/outputs/.gitkeep +0 -0
- package/template/stages/06-implementation/prompts/.gitkeep +0 -0
- package/template/stages/06-implementation/prompts/CLAUDE.md +0 -0
- package/template/stages/06-implementation/prompts/collaboration.md +64 -0
- package/template/stages/06-implementation/prompts/validation.md +65 -0
- package/template/stages/06-implementation/templates/.gitkeep +0 -0
- package/template/stages/07-refactoring/CLAUDE.md +180 -0
- package/template/stages/07-refactoring/HANDOFF.md +82 -0
- package/template/stages/07-refactoring/HANDOFF.md.template +97 -0
- package/template/stages/07-refactoring/config.yaml +68 -0
- package/template/stages/07-refactoring/inputs/.gitkeep +0 -0
- package/template/stages/07-refactoring/outputs/.gitkeep +0 -0
- package/template/stages/07-refactoring/outputs/refactoring_report.md +102 -0
- package/template/stages/07-refactoring/prompts/.gitkeep +0 -0
- package/template/stages/07-refactoring/prompts/CLAUDE.md +0 -0
- package/template/stages/07-refactoring/prompts/collaboration.md +71 -0
- package/template/stages/07-refactoring/prompts/validation.md +76 -0
- package/template/stages/07-refactoring/templates/.gitkeep +0 -0
- package/template/stages/08-qa/CLAUDE.md +93 -0
- package/template/stages/08-qa/HANDOFF.md +114 -0
- package/template/stages/08-qa/HANDOFF.md.template +96 -0
- package/template/stages/08-qa/config.yaml +56 -0
- package/template/stages/08-qa/inputs/.gitkeep +0 -0
- package/template/stages/08-qa/outputs/.gitkeep +0 -0
- package/template/stages/08-qa/outputs/qa_report.md +138 -0
- package/template/stages/08-qa/prompts/.gitkeep +0 -0
- package/template/stages/08-qa/prompts/CLAUDE.md +0 -0
- package/template/stages/08-qa/prompts/collaboration.md +65 -0
- package/template/stages/08-qa/prompts/validation.md +71 -0
- package/template/stages/08-qa/templates/.gitkeep +0 -0
- package/template/stages/09-testing/CLAUDE.md +124 -0
- package/template/stages/09-testing/HANDOFF.md +118 -0
- package/template/stages/09-testing/HANDOFF.md.template +113 -0
- package/template/stages/09-testing/config.yaml +65 -0
- package/template/stages/09-testing/inputs/.gitkeep +0 -0
- package/template/stages/09-testing/outputs/.gitkeep +0 -0
- package/template/stages/09-testing/outputs/test_report.md +146 -0
- package/template/stages/09-testing/prompts/.gitkeep +0 -0
- package/template/stages/09-testing/prompts/CLAUDE.md +0 -0
- package/template/stages/09-testing/prompts/collaboration.md +77 -0
- package/template/stages/09-testing/prompts/validation.md +83 -0
- package/template/stages/09-testing/templates/.gitkeep +0 -0
- package/template/stages/10-deployment/CLAUDE.md +117 -0
- package/template/stages/10-deployment/HANDOFF.md +141 -0
- package/template/stages/10-deployment/HANDOFF.md.template +148 -0
- package/template/stages/10-deployment/config.yaml +61 -0
- package/template/stages/10-deployment/inputs/.gitkeep +0 -0
- package/template/stages/10-deployment/outputs/.gitkeep +0 -0
- package/template/stages/10-deployment/prompts/.gitkeep +0 -0
- package/template/stages/10-deployment/prompts/CLAUDE.md +0 -0
- package/template/stages/10-deployment/prompts/collaboration.md +80 -0
- package/template/stages/10-deployment/prompts/validation.md +93 -0
- package/template/stages/10-deployment/templates/CLAUDE.md +0 -0
- package/template/stages/10-deployment/templates/github-actions-cd.yaml +118 -0
- package/template/stages/10-deployment/templates/github-actions-ci.yaml +136 -0
- package/template/state/progress.json.template +111 -0
- package/template/state/templates/CLAUDE.md +0 -0
- package/template/state/templates/handoff_base.md.template +187 -0
- package/template/state/templates/phase_state.md.template +97 -0
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# Stage Handoff: 07-refactoring → 08-qa
|
|
2
|
+
|
|
3
|
+
**생성일**: {{TIMESTAMP}}
|
|
4
|
+
**생성자**: Codex
|
|
5
|
+
**소요 시간**: {{DURATION}}
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 완료된 작업
|
|
10
|
+
|
|
11
|
+
- [ ] 코드 품질 분석
|
|
12
|
+
- [ ] 중복 코드 제거 ({{DUP_REMOVED}}개)
|
|
13
|
+
- [ ] 성능 최적화
|
|
14
|
+
- [ ] 리팩토링 보고서 작성
|
|
15
|
+
- [ ] 체크포인트 생성
|
|
16
|
+
- [ ] HANDOFF.md 생성
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## 다음 에이전트를 위한 컨텍스트
|
|
21
|
+
|
|
22
|
+
### 리팩토링 요약
|
|
23
|
+
|
|
24
|
+
| 영역 | 이전 | 이후 | 개선율 |
|
|
25
|
+
|------|------|------|--------|
|
|
26
|
+
| 코드 중복 | {{DUP_BEFORE}} | {{DUP_AFTER}} | {{DUP_IMPROVE}}% |
|
|
27
|
+
| 번들 사이즈 | {{BUNDLE_BEFORE}} | {{BUNDLE_AFTER}} | {{BUNDLE_IMPROVE}}% |
|
|
28
|
+
| 복잡도 | {{COMPLEX_BEFORE}} | {{COMPLEX_AFTER}} | {{COMPLEX_IMPROVE}}% |
|
|
29
|
+
|
|
30
|
+
### 주요 변경 사항
|
|
31
|
+
1. {{CHANGE_1}}
|
|
32
|
+
2. {{CHANGE_2}}
|
|
33
|
+
3. {{CHANGE_3}}
|
|
34
|
+
|
|
35
|
+
### 남은 기술 부채
|
|
36
|
+
- {{REMAINING_DEBT_1}}
|
|
37
|
+
- {{REMAINING_DEBT_2}}
|
|
38
|
+
|
|
39
|
+
### QA 중점 확인 필요 영역
|
|
40
|
+
- {{QA_FOCUS_1}}: 리팩토링으로 인한 영향
|
|
41
|
+
- {{QA_FOCUS_2}}: 최적화로 인한 동작 변화
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## 체크포인트 정보
|
|
46
|
+
|
|
47
|
+
| ID | 생성일 | 설명 |
|
|
48
|
+
|----|--------|------|
|
|
49
|
+
| {{CP_ID}} | {{CP_DATE}} | 리팩토링 완료 |
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## 생성된 산출물
|
|
54
|
+
|
|
55
|
+
| 파일 | 설명 |
|
|
56
|
+
|------|------|
|
|
57
|
+
| refactored_code/ | 리팩토링된 코드 |
|
|
58
|
+
| refactoring_report.md | 리팩토링 보고서 |
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## 08-qa 스테이지 가이드
|
|
63
|
+
|
|
64
|
+
### 즉시 실행할 작업
|
|
65
|
+
1. 리팩토링 영역 기능 테스트
|
|
66
|
+
2. 회귀 테스트
|
|
67
|
+
3. 성능 벤치마크
|
|
68
|
+
|
|
69
|
+
### 테스트 우선순위
|
|
70
|
+
1. {{TEST_PRIORITY_1}}
|
|
71
|
+
2. {{TEST_PRIORITY_2}}
|
|
72
|
+
3. {{TEST_PRIORITY_3}}
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## AI 호출 기록
|
|
77
|
+
|
|
78
|
+
| AI | 호출 시간 | 프롬프트 | 결과 | 상태 |
|
|
79
|
+
|----|----------|---------|------|------|
|
|
80
|
+
| {{AI_1}} | {{TIME_1}} | {{PROMPT_1}} | {{OUTPUT_1}} | {{STATUS_1}} |
|
|
81
|
+
| {{AI_2}} | {{TIME_2}} | {{PROMPT_2}} | {{OUTPUT_2}} | {{STATUS_2}} |
|
|
82
|
+
|
|
83
|
+
> 설정: `config/ai_logging.yaml`
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## 메타데이터
|
|
88
|
+
|
|
89
|
+
```yaml
|
|
90
|
+
stage: "07-refactoring"
|
|
91
|
+
status: "completed"
|
|
92
|
+
next_stage: "08-qa"
|
|
93
|
+
models_used:
|
|
94
|
+
- codex
|
|
95
|
+
- claudecode
|
|
96
|
+
checkpoint_id: "{{CP_ID}}"
|
|
97
|
+
```
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# Stage 07: Refactoring Configuration
|
|
2
|
+
|
|
3
|
+
stage:
|
|
4
|
+
id: "07-refactoring"
|
|
5
|
+
name: "Refactoring"
|
|
6
|
+
description: "코드 품질 개선 및 최적화"
|
|
7
|
+
|
|
8
|
+
models:
|
|
9
|
+
primary: "codex"
|
|
10
|
+
secondary: "claudecode"
|
|
11
|
+
collaboration: "sequential"
|
|
12
|
+
|
|
13
|
+
# AI 자동 호출 설정 (Issue #12, #14 해결)
|
|
14
|
+
auto_invoke:
|
|
15
|
+
enabled: true
|
|
16
|
+
model: "codex"
|
|
17
|
+
trigger: "refactoring_start"
|
|
18
|
+
prompt_file: "prompts/code_analysis.md"
|
|
19
|
+
wrapper: "scripts/codex-wrapper.sh"
|
|
20
|
+
flags: "--full-auto"
|
|
21
|
+
required: true
|
|
22
|
+
message: "🤖 Codex 자동 호출: 코드 분석 및 리팩토링 시작"
|
|
23
|
+
|
|
24
|
+
execution:
|
|
25
|
+
mode: "deep_dive"
|
|
26
|
+
container: false
|
|
27
|
+
sandbox: false
|
|
28
|
+
timeout: 7200 # 2 hours
|
|
29
|
+
|
|
30
|
+
inputs:
|
|
31
|
+
required:
|
|
32
|
+
- name: "../06-implementation/outputs/source_code/"
|
|
33
|
+
- name: "../06-implementation/outputs/implementation_log.md"
|
|
34
|
+
- name: "../06-implementation/HANDOFF.md"
|
|
35
|
+
|
|
36
|
+
outputs:
|
|
37
|
+
required:
|
|
38
|
+
- name: "refactored_code/"
|
|
39
|
+
description: "리팩토링된 코드"
|
|
40
|
+
- name: "refactoring_report.md"
|
|
41
|
+
description: "리팩토링 보고서"
|
|
42
|
+
- name: "HANDOFF.md"
|
|
43
|
+
|
|
44
|
+
prompts:
|
|
45
|
+
- name: "code_analysis"
|
|
46
|
+
file: "prompts/code_analysis.md"
|
|
47
|
+
model: "codex"
|
|
48
|
+
- name: "refactoring"
|
|
49
|
+
file: "prompts/refactoring.md"
|
|
50
|
+
model: "codex"
|
|
51
|
+
- name: "optimization"
|
|
52
|
+
file: "prompts/optimization.md"
|
|
53
|
+
model: "codex"
|
|
54
|
+
|
|
55
|
+
completion:
|
|
56
|
+
checklist:
|
|
57
|
+
- "코드 품질 분석 완료"
|
|
58
|
+
- "중복 코드 제거"
|
|
59
|
+
- "성능 최적화 적용"
|
|
60
|
+
- "리팩토링 보고서 작성"
|
|
61
|
+
- "체크포인트 생성"
|
|
62
|
+
|
|
63
|
+
transition:
|
|
64
|
+
next_stage: "08-qa"
|
|
65
|
+
prerequisites:
|
|
66
|
+
- "06-implementation"
|
|
67
|
+
handoff_required: true
|
|
68
|
+
checkpoint_required: true # 필수!
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# 🔧 Refactoring Report - Snake Game
|
|
2
|
+
|
|
3
|
+
> 생성일: 2026-01-21
|
|
4
|
+
> 프로젝트: snake-game
|
|
5
|
+
> 스테이지: 07-refactoring
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 개선 사항 요약
|
|
10
|
+
|
|
11
|
+
| 영역 | 개선 전 | 개선 후 | 상태 |
|
|
12
|
+
|------|--------|--------|------|
|
|
13
|
+
| useGameLoop | ESLint 오류 | Ref 패턴으로 수정 | ✅ |
|
|
14
|
+
| ESLint | 1 error | 0 errors | ✅ |
|
|
15
|
+
| 빌드 | 성공 | 성공 | ✅ |
|
|
16
|
+
| 번들 크기 | 204KB | 204KB | ✅ |
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## 수행된 리팩토링
|
|
21
|
+
|
|
22
|
+
### 1. useGameLoop 훅 개선
|
|
23
|
+
|
|
24
|
+
**문제**: useCallback 내부에서 자기 자신을 참조하여 ESLint `react-hooks/immutability` 오류 발생
|
|
25
|
+
|
|
26
|
+
**해결**: Ref 패턴을 사용하여 stale closure 문제 방지
|
|
27
|
+
|
|
28
|
+
**변경 내용**:
|
|
29
|
+
- `useCallback` 제거하고 `useEffect` 내부에서 직접 함수 정의
|
|
30
|
+
- `onTick`, `speed`, `isRunning` 값을 Ref로 관리하여 최신 값 참조 보장
|
|
31
|
+
- 게임 루프가 중단될 때 `cancelAnimationFrame` 정확히 호출
|
|
32
|
+
|
|
33
|
+
```typescript
|
|
34
|
+
// Before (ESLint Error)
|
|
35
|
+
const gameLoop = useCallback((timestamp) => {
|
|
36
|
+
// ...
|
|
37
|
+
rafIdRef.current = requestAnimationFrame(gameLoop); // 자기 참조 오류
|
|
38
|
+
}, [onTick, speed, isRunning]);
|
|
39
|
+
|
|
40
|
+
// After (Fixed)
|
|
41
|
+
useEffect(() => {
|
|
42
|
+
const gameLoop = (timestamp) => {
|
|
43
|
+
// Ref를 통해 최신 값 접근
|
|
44
|
+
onTickRef.current();
|
|
45
|
+
rafIdRef.current = requestAnimationFrame(gameLoop);
|
|
46
|
+
};
|
|
47
|
+
// ...
|
|
48
|
+
}, [isRunning]);
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## 코드 품질 분석
|
|
54
|
+
|
|
55
|
+
### ESLint 결과
|
|
56
|
+
```
|
|
57
|
+
✅ 0 errors, 0 warnings
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### TypeScript 컴파일
|
|
61
|
+
```
|
|
62
|
+
✅ tsc -b 성공
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### 번들 분석
|
|
66
|
+
|
|
67
|
+
| 파일 | 크기 | Gzip |
|
|
68
|
+
|------|------|------|
|
|
69
|
+
| index.html | 0.46 KB | 0.29 KB |
|
|
70
|
+
| index.css | 12.85 KB | 2.69 KB |
|
|
71
|
+
| index.js | 204.52 KB | 64.51 KB |
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## 추가 개선 권장사항
|
|
76
|
+
|
|
77
|
+
### 성능 최적화 (향후)
|
|
78
|
+
- [ ] `React.memo`로 불필요한 리렌더링 방지
|
|
79
|
+
- [ ] Canvas 렌더링 최적화 (더티 영역만 갱신)
|
|
80
|
+
- [ ] 뱀 몸통 렌더링 배치 처리
|
|
81
|
+
|
|
82
|
+
### 코드 품질 (향후)
|
|
83
|
+
- [ ] 테스트 커버리지 추가
|
|
84
|
+
- [ ] JSDoc 주석 추가
|
|
85
|
+
- [ ] 에러 바운더리 구현
|
|
86
|
+
|
|
87
|
+
### 접근성 (향후)
|
|
88
|
+
- [ ] 키보드 포커스 관리
|
|
89
|
+
- [ ] 스크린 리더 지원
|
|
90
|
+
- [ ] 감소된 모션 설정 지원
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## 결론
|
|
95
|
+
|
|
96
|
+
07-refactoring 스테이지에서 ESLint 오류를 수정하고 코드 품질을 개선했습니다.
|
|
97
|
+
게임은 정상적으로 빌드되고 실행됩니다.
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
**작성자**: ClaudeCode
|
|
102
|
+
**검토일**: 2026-01-21
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# AI 협업 프롬프트 - Refactoring
|
|
2
|
+
|
|
3
|
+
## 협업 모드: Sequential Review Chain
|
|
4
|
+
|
|
5
|
+
이 스테이지에서는 **순차적 리뷰 체인**을 사용하여 리팩토링 품질을 보장합니다.
|
|
6
|
+
|
|
7
|
+
### 참여 모델
|
|
8
|
+
- **Codex**: 코드 분석, 최적화
|
|
9
|
+
- **ClaudeCode**: 복잡한 리팩토링, 검증
|
|
10
|
+
|
|
11
|
+
### 협업 프롬프트
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
# 리뷰 체인: Codex 분석 → Claude 검증
|
|
15
|
+
/collaborate --mode sequential --chain "codex:analyze -> claude:review -> codex:refactor"
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
### AI 벤치마킹
|
|
19
|
+
|
|
20
|
+
성능 최적화 비교:
|
|
21
|
+
```
|
|
22
|
+
/benchmark --task "performance_optimization" --models "codex,claude"
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### 작업 흐름
|
|
26
|
+
|
|
27
|
+
1. **분석**: 정적 분석, 복잡도 측정
|
|
28
|
+
2. **계획**: 리팩토링 우선순위 결정
|
|
29
|
+
3. **실행**: 작은 단위로 리팩토링
|
|
30
|
+
4. **검증**: 테스트 통과 확인
|
|
31
|
+
|
|
32
|
+
### 체크포인트 필수
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
# 리팩토링 전 체크포인트
|
|
36
|
+
/checkpoint --reason "리팩토링 시작 전 상태"
|
|
37
|
+
|
|
38
|
+
# 주요 리팩토링 후
|
|
39
|
+
/checkpoint --reason "함수 X 리팩토링 완료"
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### 롤백 준비
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
# 롤백 가능 상태 확인
|
|
46
|
+
/restore --list
|
|
47
|
+
|
|
48
|
+
# 필요시 부분 롤백
|
|
49
|
+
/restore checkpoint_id --partial --files "src/utils/*"
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### 출력 형식
|
|
53
|
+
|
|
54
|
+
```markdown
|
|
55
|
+
## AI 협업 결과
|
|
56
|
+
|
|
57
|
+
### Codex 분석
|
|
58
|
+
- 복잡도 높은 함수 목록
|
|
59
|
+
- 중복 코드 위치
|
|
60
|
+
- 성능 병목
|
|
61
|
+
|
|
62
|
+
### Claude 검증
|
|
63
|
+
- 리팩토링 영향 범위
|
|
64
|
+
- 테스트 필요 영역
|
|
65
|
+
- 위험 요소
|
|
66
|
+
|
|
67
|
+
### 리팩토링 계획
|
|
68
|
+
1. [우선순위 1 항목]
|
|
69
|
+
2. [우선순위 2 항목]
|
|
70
|
+
...
|
|
71
|
+
```
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# 산출물 검증 프롬프트 - Refactoring
|
|
2
|
+
|
|
3
|
+
## 검증 대상
|
|
4
|
+
|
|
5
|
+
| 산출물 | 필수 조건 | 검증 방법 |
|
|
6
|
+
|--------|----------|----------|
|
|
7
|
+
| `refactored_code/` | 동작 유지 | 테스트 통과 |
|
|
8
|
+
| `refactored_code/` | 품질 개선 | 메트릭 비교 |
|
|
9
|
+
| `refactoring_report.md` | 변경 내역 | 구조 확인 |
|
|
10
|
+
| `HANDOFF.md` | 체크포인트 참조 | 항목 확인 |
|
|
11
|
+
|
|
12
|
+
## 검증 명령
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
/validate --stage 07-refactoring
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## 품질 기준
|
|
19
|
+
|
|
20
|
+
### refactored_code/
|
|
21
|
+
- [ ] 모든 기존 테스트 통과
|
|
22
|
+
- [ ] Lint 에러 없음
|
|
23
|
+
- [ ] 타입 에러 없음
|
|
24
|
+
- [ ] 복잡도 감소 (목표: 20%↓)
|
|
25
|
+
- [ ] 중복 코드 감소 (목표: 50%↓)
|
|
26
|
+
|
|
27
|
+
### refactoring_report.md
|
|
28
|
+
- [ ] 리팩토링된 함수/클래스 목록
|
|
29
|
+
- [ ] 변경 전후 비교
|
|
30
|
+
- [ ] 성능 개선 측정값
|
|
31
|
+
- [ ] 남은 기술 부채
|
|
32
|
+
|
|
33
|
+
### HANDOFF.md
|
|
34
|
+
- [ ] 완료된 리팩토링 목록
|
|
35
|
+
- [ ] 체크포인트 참조
|
|
36
|
+
- [ ] QA 필요 영역
|
|
37
|
+
|
|
38
|
+
## 자동 검증 스크립트
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
# 테스트 통과 확인
|
|
42
|
+
npm run test
|
|
43
|
+
|
|
44
|
+
# Lint 검사
|
|
45
|
+
npm run lint
|
|
46
|
+
|
|
47
|
+
# 번들 사이즈 비교
|
|
48
|
+
npm run build && du -sh dist/
|
|
49
|
+
|
|
50
|
+
# 복잡도 측정 (선택적)
|
|
51
|
+
npx complexity-report src/**/*.ts
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## 품질 메트릭 비교
|
|
55
|
+
|
|
56
|
+
| 메트릭 | 이전 | 이후 | 개선율 |
|
|
57
|
+
|--------|------|------|--------|
|
|
58
|
+
| 평균 복잡도 | - | - | - |
|
|
59
|
+
| 중복 코드 | - | - | - |
|
|
60
|
+
| 번들 사이즈 | - | - | - |
|
|
61
|
+
|
|
62
|
+
## 회귀 테스트
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
# 전체 테스트 실행
|
|
66
|
+
npm run test
|
|
67
|
+
|
|
68
|
+
# E2E 테스트 실행 (있는 경우)
|
|
69
|
+
npm run test:e2e
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## 실패 시 조치
|
|
73
|
+
|
|
74
|
+
1. 테스트 실패 → 체크포인트로 롤백 후 재시도
|
|
75
|
+
2. 성능 저하 → 변경 사항 검토 및 최적화
|
|
76
|
+
3. 타입 에러 → 타입 수정 후 재검증
|
|
File without changes
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# Stage 08: QA
|
|
2
|
+
|
|
3
|
+
품질 보증 및 코드 리뷰 단계
|
|
4
|
+
|
|
5
|
+
## 🎭 페르소나: Quality Guardian
|
|
6
|
+
|
|
7
|
+
> 당신은 Quality Guardian입니다.
|
|
8
|
+
> 모든 가능한 문제를 찾아내고 품질을 보장하세요.
|
|
9
|
+
> 엣지 케이스와 보안 취약점에 특히 주의하세요.
|
|
10
|
+
|
|
11
|
+
### 특성
|
|
12
|
+
- 꼼꼼한 검토
|
|
13
|
+
- 엣지 케이스 발견
|
|
14
|
+
- 보안 의식
|
|
15
|
+
- 사용자 관점
|
|
16
|
+
|
|
17
|
+
### 권장 행동
|
|
18
|
+
- 엣지 케이스 탐색
|
|
19
|
+
- 보안 취약점 검사
|
|
20
|
+
- 성능 문제 식별
|
|
21
|
+
- 사용성 검토
|
|
22
|
+
|
|
23
|
+
### 지양 행동
|
|
24
|
+
- 표면적 검토
|
|
25
|
+
- 긍정적 가정
|
|
26
|
+
- 버그 무시
|
|
27
|
+
|
|
28
|
+
### AI 설정
|
|
29
|
+
- **Temperature**: 0.3 (철저한 검토)
|
|
30
|
+
- **철저함**: High
|
|
31
|
+
- **회의적 태도**: Healthy
|
|
32
|
+
|
|
33
|
+
## 실행 모델
|
|
34
|
+
- **Primary**: ClaudeCode (코드 리뷰, 버그 수정)
|
|
35
|
+
- **Mode**: Plan + Sandbox
|
|
36
|
+
|
|
37
|
+
## 목표
|
|
38
|
+
1. 코드 리뷰 수행
|
|
39
|
+
2. 버그 식별 및 수정
|
|
40
|
+
3. 보안 취약점 검사
|
|
41
|
+
4. 품질 기준 준수 확인
|
|
42
|
+
|
|
43
|
+
## 입력 파일
|
|
44
|
+
- `../07-refactoring/outputs/refactored_code/`
|
|
45
|
+
- `../07-refactoring/outputs/refactoring_report.md`
|
|
46
|
+
- `../07-refactoring/HANDOFF.md`
|
|
47
|
+
|
|
48
|
+
## 출력 파일
|
|
49
|
+
- `outputs/qa_report.md` - QA 보고서
|
|
50
|
+
- `outputs/bug_fixes.md` - 버그 수정 내역
|
|
51
|
+
- `HANDOFF.md` - 다음 스테이지 인계 문서
|
|
52
|
+
|
|
53
|
+
## 워크플로우
|
|
54
|
+
|
|
55
|
+
### 1. 코드 리뷰
|
|
56
|
+
- 코딩 표준 준수 확인
|
|
57
|
+
- 베스트 프랙티스 적용 여부
|
|
58
|
+
- 문서화 수준 검토
|
|
59
|
+
|
|
60
|
+
### 2. 기능 테스트
|
|
61
|
+
- 요구사항 대비 기능 검증
|
|
62
|
+
- 엣지 케이스 테스트
|
|
63
|
+
- 에러 핸들링 검증
|
|
64
|
+
|
|
65
|
+
### 3. 보안 검사
|
|
66
|
+
- OWASP Top 10 체크
|
|
67
|
+
- 입력 검증
|
|
68
|
+
- 인증/인가 검증
|
|
69
|
+
- 민감 정보 노출 검사
|
|
70
|
+
|
|
71
|
+
### 4. 성능 검토
|
|
72
|
+
- 응답 시간 측정
|
|
73
|
+
- 메모리 사용량
|
|
74
|
+
- 불필요한 리렌더링
|
|
75
|
+
|
|
76
|
+
### 5. 버그 수정
|
|
77
|
+
- 식별된 버그 우선순위 지정
|
|
78
|
+
- 수정 및 검증
|
|
79
|
+
- 회귀 테스트
|
|
80
|
+
|
|
81
|
+
## 완료 조건
|
|
82
|
+
- [ ] 코드 리뷰 완료
|
|
83
|
+
- [ ] 보안 검사 통과
|
|
84
|
+
- [ ] 식별된 버그 수정
|
|
85
|
+
- [ ] QA 보고서 작성
|
|
86
|
+
- [ ] HANDOFF.md 생성
|
|
87
|
+
|
|
88
|
+
## 다음 스테이지
|
|
89
|
+
→ **09-testing**: 테스트 코드 작성 및 E2E 테스트
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# HANDOFF: 08-qa → 09-testing
|
|
2
|
+
|
|
3
|
+
> 생성일: 2026-01-21
|
|
4
|
+
> 프로젝트: snake-game
|
|
5
|
+
> 현재 스테이지: 08-qa (완료)
|
|
6
|
+
> 다음 스테이지: 09-testing
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## ✅ 완료된 작업
|
|
11
|
+
|
|
12
|
+
- [x] 코드 품질 검증 (ESLint, TypeScript)
|
|
13
|
+
- [x] 프로덕션 빌드 검증
|
|
14
|
+
- [x] BUG-001 수정: useGameLoop 초기화 문제
|
|
15
|
+
- [x] 기능 테스트 (Playwright MCP)
|
|
16
|
+
- [x] 게임 시작/재시작
|
|
17
|
+
- [x] 키보드 입력 (방향키)
|
|
18
|
+
- [x] 벽 충돌 게임 오버
|
|
19
|
+
- [x] QA 보고서 작성
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## 🐛 수정된 버그
|
|
24
|
+
|
|
25
|
+
### BUG-001: 게임 시작 즉시 게임 오버
|
|
26
|
+
- **파일**: `src/hooks/useGameLoop.ts`
|
|
27
|
+
- **원인**: 첫 프레임에서 큰 deltaTime으로 인해 다수의 MOVE 호출
|
|
28
|
+
- **수정**: 첫 프레임 스킵 + deltaTime 클램핑
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## 📁 생성/수정된 파일
|
|
33
|
+
|
|
34
|
+
| 파일 | 변경 유형 | 설명 |
|
|
35
|
+
|------|----------|------|
|
|
36
|
+
| `src/hooks/useGameLoop.ts` | 수정 | 버그 수정 |
|
|
37
|
+
| `outputs/qa_report.md` | 생성 | QA 보고서 |
|
|
38
|
+
| `HANDOFF.md` | 생성 | 인계 문서 |
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## 🔍 코드 품질 상태
|
|
43
|
+
|
|
44
|
+
| 항목 | 상태 |
|
|
45
|
+
|------|------|
|
|
46
|
+
| ESLint | ✅ 0 errors |
|
|
47
|
+
| TypeScript | ✅ 컴파일 성공 |
|
|
48
|
+
| 빌드 | ✅ 성공 |
|
|
49
|
+
| 번들 크기 | ✅ 204.59KB |
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## 🎯 09-testing 권장 작업
|
|
54
|
+
|
|
55
|
+
### 1. 단위 테스트 (Vitest)
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
npm install -D vitest @testing-library/react
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
#### 테스트 대상
|
|
62
|
+
- `collision.ts`
|
|
63
|
+
- `checkWallCollision()` - 경계 조건
|
|
64
|
+
- `checkSelfCollision()` - 자기 몸 충돌
|
|
65
|
+
- `checkFoodCollision()` - 먹이 충돌
|
|
66
|
+
|
|
67
|
+
- `gameReducer.ts`
|
|
68
|
+
- START_GAME → PLAYING 상태 전이
|
|
69
|
+
- MOVE → 뱀 이동 검증
|
|
70
|
+
- CHANGE_DIRECTION → 반대 방향 차단
|
|
71
|
+
|
|
72
|
+
- `useGameLoop.ts`
|
|
73
|
+
- 게임 루프 시작/정지
|
|
74
|
+
- 타이밍 정확도
|
|
75
|
+
|
|
76
|
+
### 2. E2E 테스트 (Playwright)
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
npm install -D @playwright/test
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
#### 테스트 시나리오
|
|
83
|
+
1. 전체 게임 플로우
|
|
84
|
+
- 페이지 로드 → 시작 버튼 → 게임 플레이 → 게임오버 → 재시작
|
|
85
|
+
|
|
86
|
+
2. 점수 시스템
|
|
87
|
+
- 먹이 먹기 → 점수 증가 확인
|
|
88
|
+
- 레벨업 시 속도 변화 확인
|
|
89
|
+
|
|
90
|
+
3. 최고 점수
|
|
91
|
+
- localStorage 저장 확인
|
|
92
|
+
- 새로고침 후 유지 확인
|
|
93
|
+
|
|
94
|
+
### 3. 커버리지 목표
|
|
95
|
+
- 단위 테스트: 80%+
|
|
96
|
+
- E2E 테스트: 핵심 플로우 100%
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## 🚀 다음 단계
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
# 09-testing 스테이지 실행
|
|
104
|
+
/run-stage 09-testing
|
|
105
|
+
|
|
106
|
+
# 또는
|
|
107
|
+
/test
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
**생성자**: ClaudeCode
|
|
113
|
+
**검토자**: -
|
|
114
|
+
**승인**: 대기
|