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,61 @@
|
|
|
1
|
+
# /ui-ux
|
|
2
|
+
|
|
3
|
+
04-ui-ux 스테이지를 바로 시작합니다.
|
|
4
|
+
|
|
5
|
+
## 사용법
|
|
6
|
+
```
|
|
7
|
+
/ui-ux
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## 스테이지 정보
|
|
11
|
+
|
|
12
|
+
| 항목 | 값 |
|
|
13
|
+
|------|-----|
|
|
14
|
+
| 스테이지 | 04-ui-ux |
|
|
15
|
+
| AI 모델 | Gemini |
|
|
16
|
+
| 실행 모드 | Plan Mode |
|
|
17
|
+
| 체크포인트 | 선택 |
|
|
18
|
+
|
|
19
|
+
## 동작
|
|
20
|
+
|
|
21
|
+
1. **전제 조건 확인**
|
|
22
|
+
- 03-planning 완료 여부
|
|
23
|
+
- PRD.md 존재
|
|
24
|
+
|
|
25
|
+
2. **UI/UX 설계**
|
|
26
|
+
- 와이어프레임 설계
|
|
27
|
+
- 컴포넌트 명세
|
|
28
|
+
- 디자인 시스템
|
|
29
|
+
|
|
30
|
+
3. **산출물 생성**
|
|
31
|
+
- wireframes/ - 와이어프레임 파일
|
|
32
|
+
- component-spec.md - 컴포넌트 명세
|
|
33
|
+
- design-system.md - 디자인 시스템
|
|
34
|
+
|
|
35
|
+
## 실행
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
scripts/run-stage.sh 04-ui-ux "$ARGUMENTS"
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## 입력 파일
|
|
42
|
+
|
|
43
|
+
- `stages/03-planning/outputs/PRD.md`
|
|
44
|
+
- `stages/03-planning/outputs/architecture.md`
|
|
45
|
+
|
|
46
|
+
## 출력 파일
|
|
47
|
+
|
|
48
|
+
- `stages/04-ui-ux/outputs/wireframes/`
|
|
49
|
+
- `stages/04-ui-ux/outputs/component-spec.md`
|
|
50
|
+
- `stages/04-ui-ux/outputs/design-system.md`
|
|
51
|
+
|
|
52
|
+
## 관련 명령어
|
|
53
|
+
|
|
54
|
+
- `/run-stage 04` - 전제조건 확인 후 시작
|
|
55
|
+
- `/next` - 다음 스테이지 (05-task-management)
|
|
56
|
+
- `/planning` - 이전 스테이지
|
|
57
|
+
|
|
58
|
+
## 도구 활용
|
|
59
|
+
|
|
60
|
+
- Figma MCP - 디자인 컨텍스트 (설정 시)
|
|
61
|
+
- 21st Magic - UI 컴포넌트 영감
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
# /validate - Output Validation Command
|
|
2
|
+
|
|
3
|
+
현재 스테이지의 산출물을 검증합니다.
|
|
4
|
+
|
|
5
|
+
## 사용법
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
/validate [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## 옵션
|
|
12
|
+
|
|
13
|
+
| 옵션 | 설명 | 기본값 |
|
|
14
|
+
|------|------|--------|
|
|
15
|
+
| `--stage` | 검증할 스테이지 ID | 현재 스테이지 |
|
|
16
|
+
| `--verbose` | 상세 출력 | false |
|
|
17
|
+
| `--fix` | 자동 수정 제안 | false |
|
|
18
|
+
| `--skip-commands` | 명령어 검증 건너뛰기 | false |
|
|
19
|
+
| `--force` | 실패해도 통과 처리 | false |
|
|
20
|
+
|
|
21
|
+
## 검증 항목
|
|
22
|
+
|
|
23
|
+
### 1. 필수 파일 존재
|
|
24
|
+
```bash
|
|
25
|
+
/validate
|
|
26
|
+
# → ideas.md ✅, requirements_analysis.md ❌ (누락)
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### 2. 파일 내용 검증
|
|
30
|
+
```bash
|
|
31
|
+
/validate --verbose
|
|
32
|
+
# → ideas.md: 8개 아이디어 (최소 5개) ✅
|
|
33
|
+
# → 필수 섹션: 기능 요구사항 ✅, 비기능 요구사항 ❌
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### 3. 명령어 검증
|
|
37
|
+
```bash
|
|
38
|
+
/validate
|
|
39
|
+
# → npm run lint ✅
|
|
40
|
+
# → npm run typecheck ✅
|
|
41
|
+
# → npm run test ❌ (3개 실패)
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### 4. 품질 점수
|
|
45
|
+
```bash
|
|
46
|
+
/validate
|
|
47
|
+
# → 종합 점수: 0.85/1.0
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## 출력 형식
|
|
51
|
+
|
|
52
|
+
### 간단 출력
|
|
53
|
+
```
|
|
54
|
+
✅ 검증 통과: 06-implementation (점수: 0.95)
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### 실패 시
|
|
58
|
+
```
|
|
59
|
+
❌ 검증 실패: 06-implementation
|
|
60
|
+
|
|
61
|
+
실패 항목:
|
|
62
|
+
1. 테스트 실패 (3개)
|
|
63
|
+
2. 커버리지 미달 (75% < 80%)
|
|
64
|
+
|
|
65
|
+
수정 필요:
|
|
66
|
+
- [ ] tests/auth.test.ts:45 수정
|
|
67
|
+
- [ ] 테스트 커버리지 5% 향상
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### 상세 출력 (--verbose)
|
|
71
|
+
```markdown
|
|
72
|
+
# 산출물 검증 리포트
|
|
73
|
+
|
|
74
|
+
## 스테이지: 06-implementation
|
|
75
|
+
## 상태: ⚠️ 부분 통과
|
|
76
|
+
## 점수: 0.85
|
|
77
|
+
|
|
78
|
+
### 파일 검증
|
|
79
|
+
| 파일 | 상태 | 상세 |
|
|
80
|
+
|------|------|------|
|
|
81
|
+
| source_code/ | ✅ | 디렉토리 존재 |
|
|
82
|
+
| implementation_log.md | ✅ | 필수 형식 충족 |
|
|
83
|
+
|
|
84
|
+
### 명령어 검증
|
|
85
|
+
| 명령 | 결과 | 시간 |
|
|
86
|
+
|------|------|------|
|
|
87
|
+
| lint | ✅ | 2.3s |
|
|
88
|
+
| typecheck | ✅ | 4.1s |
|
|
89
|
+
| test | ❌ | 15.2s |
|
|
90
|
+
|
|
91
|
+
### 품질 메트릭
|
|
92
|
+
| 메트릭 | 현재 | 목표 | 상태 |
|
|
93
|
+
|--------|------|------|------|
|
|
94
|
+
| Lint | 0.95 | 0.90 | ✅ |
|
|
95
|
+
| Coverage | 0.75 | 0.80 | ❌ |
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## 자동 수정 제안
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
/validate --fix
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
```markdown
|
|
105
|
+
## 자동 수정 제안
|
|
106
|
+
|
|
107
|
+
### 1. 누락된 섹션 추가
|
|
108
|
+
**파일**: requirements_analysis.md
|
|
109
|
+
**제안**: "비기능 요구사항" 섹션 추가
|
|
110
|
+
|
|
111
|
+
### 2. 테스트 수정
|
|
112
|
+
**파일**: tests/auth.test.ts:45
|
|
113
|
+
**원인**: 반환 타입 불일치
|
|
114
|
+
**수정안**:
|
|
115
|
+
```typescript
|
|
116
|
+
expect(result).toHaveProperty('token');
|
|
117
|
+
// 변경 →
|
|
118
|
+
expect(result.data).toHaveProperty('token');
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
자동 수정을 적용하시겠습니까? (y/n)
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## 강제 통과
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
/validate --force
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
```
|
|
131
|
+
⚠️ 검증 실패 항목이 있습니다.
|
|
132
|
+
강제로 통과 처리하시겠습니까?
|
|
133
|
+
|
|
134
|
+
이유를 입력하세요:
|
|
135
|
+
> 테스트 환경 문제로 일시적 실패, 로컬에서 통과 확인됨
|
|
136
|
+
|
|
137
|
+
✅ 강제 통과 처리됨 (이유 기록됨)
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
## 예시
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
# 현재 스테이지 검증
|
|
144
|
+
/validate
|
|
145
|
+
|
|
146
|
+
# 특정 스테이지 상세 검증
|
|
147
|
+
/validate --stage 06 --verbose
|
|
148
|
+
|
|
149
|
+
# 자동 수정 제안 포함
|
|
150
|
+
/validate --fix
|
|
151
|
+
|
|
152
|
+
# 빠른 검증 (명령어 건너뛰기)
|
|
153
|
+
/validate --skip-commands
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
## 검증 결과 저장
|
|
157
|
+
|
|
158
|
+
- 결과: `state/validations/{stage}_{timestamp}.json`
|
|
159
|
+
- 리포트: `state/validations/{stage}_{timestamp}.md`
|
|
160
|
+
|
|
161
|
+
## 설정
|
|
162
|
+
|
|
163
|
+
`config/output_validation.yaml` 참조
|
|
164
|
+
|
|
165
|
+
## 스테이지 전환 시 자동 실행
|
|
166
|
+
|
|
167
|
+
`/next` 명령어 실행 시 자동으로 검증이 수행됩니다.
|
|
168
|
+
검증 실패 시 스테이지 전환이 차단됩니다.
|
|
169
|
+
|
|
170
|
+
## 관련 커맨드
|
|
171
|
+
|
|
172
|
+
- `/next` - 다음 스테이지 전환
|
|
173
|
+
- `/status` - 파이프라인 상태
|
|
174
|
+
- `/stages` - 스테이지 목록
|
|
File without changes
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# ax-templates AI Selector Hook
|
|
3
|
+
# 동적 AI 모델 선택
|
|
4
|
+
|
|
5
|
+
set -e
|
|
6
|
+
|
|
7
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
8
|
+
PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
|
|
9
|
+
CONFIG_FILE="$PROJECT_ROOT/config/models.yaml"
|
|
10
|
+
BENCHMARKS_DIR="$PROJECT_ROOT/state/ai_benchmarks"
|
|
11
|
+
PROGRESS_FILE="$PROJECT_ROOT/state/progress.json"
|
|
12
|
+
|
|
13
|
+
# 색상 정의
|
|
14
|
+
BLUE='\033[0;34m'
|
|
15
|
+
GREEN='\033[0;32m'
|
|
16
|
+
YELLOW='\033[1;33m'
|
|
17
|
+
NC='\033[0m'
|
|
18
|
+
|
|
19
|
+
# 로그 함수
|
|
20
|
+
log_info() { echo -e "${BLUE}[AI-SELECT]${NC} $1"; }
|
|
21
|
+
log_success() { echo -e "${GREEN}[AI-SELECT]${NC} $1"; }
|
|
22
|
+
log_suggest() { echo -e "${YELLOW}[AI-SELECT]${NC} $1"; }
|
|
23
|
+
|
|
24
|
+
# 현재 스테이지 확인
|
|
25
|
+
get_current_stage() {
|
|
26
|
+
if [ -f "$PROGRESS_FILE" ]; then
|
|
27
|
+
cat "$PROGRESS_FILE" 2>/dev/null | grep -o '"current_stage"[[:space:]]*:[[:space:]]*"[^"]*"' | cut -d'"' -f4
|
|
28
|
+
else
|
|
29
|
+
echo "unknown"
|
|
30
|
+
fi
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
# 스테이지 기반 모델 선택
|
|
34
|
+
get_stage_model() {
|
|
35
|
+
local stage="$1"
|
|
36
|
+
|
|
37
|
+
case "$stage" in
|
|
38
|
+
"01-brainstorm")
|
|
39
|
+
echo "gemini"
|
|
40
|
+
;;
|
|
41
|
+
"02-research")
|
|
42
|
+
echo "claude"
|
|
43
|
+
;;
|
|
44
|
+
"03-planning"|"04-ui-ux")
|
|
45
|
+
echo "gemini"
|
|
46
|
+
;;
|
|
47
|
+
"05-task-management"|"06-implementation"|"08-qa"|"10-deployment")
|
|
48
|
+
echo "claudecode"
|
|
49
|
+
;;
|
|
50
|
+
"07-refactoring"|"09-testing")
|
|
51
|
+
echo "codex"
|
|
52
|
+
;;
|
|
53
|
+
*)
|
|
54
|
+
echo "claudecode"
|
|
55
|
+
;;
|
|
56
|
+
esac
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
# 태스크 유형 기반 모델 선택
|
|
60
|
+
get_task_model() {
|
|
61
|
+
local task_type="$1"
|
|
62
|
+
|
|
63
|
+
case "$task_type" in
|
|
64
|
+
"brainstorming"|"creative"|"ideation")
|
|
65
|
+
echo "gemini"
|
|
66
|
+
;;
|
|
67
|
+
"research"|"analysis"|"documentation")
|
|
68
|
+
echo "claude"
|
|
69
|
+
;;
|
|
70
|
+
"implementation"|"debugging"|"review")
|
|
71
|
+
echo "claudecode"
|
|
72
|
+
;;
|
|
73
|
+
"refactoring"|"testing"|"optimization")
|
|
74
|
+
echo "codex"
|
|
75
|
+
;;
|
|
76
|
+
*)
|
|
77
|
+
echo "claudecode"
|
|
78
|
+
;;
|
|
79
|
+
esac
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
# 이전 성능 기반 모델 선택
|
|
83
|
+
get_performance_model() {
|
|
84
|
+
local task_type="$1"
|
|
85
|
+
local benchmark_file="$BENCHMARKS_DIR/latest.json"
|
|
86
|
+
|
|
87
|
+
if [ -f "$benchmark_file" ]; then
|
|
88
|
+
# 최근 벤치마크 결과에서 최고 성능 모델 추출
|
|
89
|
+
local best_model=$(cat "$benchmark_file" 2>/dev/null | grep -o '"best_model"[[:space:]]*:[[:space:]]*"[^"]*"' | cut -d'"' -f4)
|
|
90
|
+
|
|
91
|
+
if [ -n "$best_model" ]; then
|
|
92
|
+
echo "$best_model"
|
|
93
|
+
return
|
|
94
|
+
fi
|
|
95
|
+
fi
|
|
96
|
+
|
|
97
|
+
# 벤치마크 없으면 기본값
|
|
98
|
+
echo "claudecode"
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
# 복잡도 기반 모델 선택
|
|
102
|
+
get_complexity_model() {
|
|
103
|
+
local complexity="$1"
|
|
104
|
+
|
|
105
|
+
case "$complexity" in
|
|
106
|
+
"simple"|"low")
|
|
107
|
+
echo "claudecode" # 빠른 응답
|
|
108
|
+
;;
|
|
109
|
+
"moderate"|"medium")
|
|
110
|
+
echo "claudecode"
|
|
111
|
+
;;
|
|
112
|
+
"complex"|"high")
|
|
113
|
+
echo "claudecode" # 복잡한 로직 처리
|
|
114
|
+
;;
|
|
115
|
+
*)
|
|
116
|
+
echo "claudecode"
|
|
117
|
+
;;
|
|
118
|
+
esac
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
# 최적 모델 선택 (종합)
|
|
122
|
+
select_best_model() {
|
|
123
|
+
local stage="$1"
|
|
124
|
+
local task_type="$2"
|
|
125
|
+
local complexity="$3"
|
|
126
|
+
|
|
127
|
+
# 가중치
|
|
128
|
+
local stage_weight=0.4
|
|
129
|
+
local task_weight=0.3
|
|
130
|
+
local perf_weight=0.2
|
|
131
|
+
local complexity_weight=0.1
|
|
132
|
+
|
|
133
|
+
# 각 기준별 모델
|
|
134
|
+
local stage_model=$(get_stage_model "$stage")
|
|
135
|
+
local task_model=$(get_task_model "$task_type")
|
|
136
|
+
local perf_model=$(get_performance_model "$task_type")
|
|
137
|
+
local comp_model=$(get_complexity_model "$complexity")
|
|
138
|
+
|
|
139
|
+
log_info "모델 선택 분석:"
|
|
140
|
+
log_info " 스테이지 기반: $stage_model (가중치: $stage_weight)"
|
|
141
|
+
log_info " 태스크 기반: $task_model (가중치: $task_weight)"
|
|
142
|
+
log_info " 성능 기반: $perf_model (가중치: $perf_weight)"
|
|
143
|
+
log_info " 복잡도 기반: $comp_model (가중치: $complexity_weight)"
|
|
144
|
+
|
|
145
|
+
# 스테이지 기반이 가장 높은 가중치이므로 우선 선택
|
|
146
|
+
# 실제 구현에서는 점수 계산 필요
|
|
147
|
+
local selected_model="$stage_model"
|
|
148
|
+
|
|
149
|
+
log_success "선택된 모델: $selected_model"
|
|
150
|
+
echo "$selected_model"
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
# 모델 정보 출력
|
|
154
|
+
print_model_info() {
|
|
155
|
+
local model="$1"
|
|
156
|
+
|
|
157
|
+
case "$model" in
|
|
158
|
+
"claudecode")
|
|
159
|
+
echo "Claude Code - 정확한 코드 생성, 복잡한 로직 분석"
|
|
160
|
+
;;
|
|
161
|
+
"claude")
|
|
162
|
+
echo "Claude - 심층 리서치, 문서 분석 및 요약"
|
|
163
|
+
;;
|
|
164
|
+
"gemini")
|
|
165
|
+
echo "Gemini - 창의적 아이디어, 다양한 관점 탐색"
|
|
166
|
+
;;
|
|
167
|
+
"codex")
|
|
168
|
+
echo "Codex - 코드 분석, 리팩토링, 테스트 생성"
|
|
169
|
+
;;
|
|
170
|
+
esac
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
# 메인 실행
|
|
174
|
+
main() {
|
|
175
|
+
local action="$1"
|
|
176
|
+
shift
|
|
177
|
+
|
|
178
|
+
case "$action" in
|
|
179
|
+
"stage")
|
|
180
|
+
local stage="${1:-$(get_current_stage)}"
|
|
181
|
+
local model=$(get_stage_model "$stage")
|
|
182
|
+
echo "$model"
|
|
183
|
+
;;
|
|
184
|
+
"task")
|
|
185
|
+
local task_type="$1"
|
|
186
|
+
local model=$(get_task_model "$task_type")
|
|
187
|
+
echo "$model"
|
|
188
|
+
;;
|
|
189
|
+
"select")
|
|
190
|
+
local stage="${1:-$(get_current_stage)}"
|
|
191
|
+
local task_type="${2:-implementation}"
|
|
192
|
+
local complexity="${3:-moderate}"
|
|
193
|
+
select_best_model "$stage" "$task_type" "$complexity"
|
|
194
|
+
;;
|
|
195
|
+
"info")
|
|
196
|
+
local model="$1"
|
|
197
|
+
print_model_info "$model"
|
|
198
|
+
;;
|
|
199
|
+
"current")
|
|
200
|
+
local stage=$(get_current_stage)
|
|
201
|
+
local model=$(get_stage_model "$stage")
|
|
202
|
+
log_info "현재 스테이지: $stage"
|
|
203
|
+
log_info "권장 모델: $model"
|
|
204
|
+
print_model_info "$model"
|
|
205
|
+
;;
|
|
206
|
+
*)
|
|
207
|
+
echo "사용법: $0 {stage|task|select|info|current} [args]"
|
|
208
|
+
echo ""
|
|
209
|
+
echo "명령어:"
|
|
210
|
+
echo " stage [stage_id] - 스테이지 기반 모델 선택"
|
|
211
|
+
echo " task [task_type] - 태스크 유형 기반 모델 선택"
|
|
212
|
+
echo " select [stage] [task] [complexity] - 종합 모델 선택"
|
|
213
|
+
echo " info [model] - 모델 정보 출력"
|
|
214
|
+
echo " current - 현재 스테이지 권장 모델"
|
|
215
|
+
exit 1
|
|
216
|
+
;;
|
|
217
|
+
esac
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
# 직접 실행 시에만 main 호출
|
|
221
|
+
if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
|
|
222
|
+
main "$@"
|
|
223
|
+
fi
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# ax-templates Auto-Checkpoint Hook
|
|
3
|
+
# 자동 체크포인트 트리거 감지 및 생성
|
|
4
|
+
|
|
5
|
+
set -e
|
|
6
|
+
|
|
7
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
8
|
+
PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
|
|
9
|
+
CONFIG_FILE="$PROJECT_ROOT/config/auto_checkpoint.yaml"
|
|
10
|
+
CHECKPOINTS_DIR="$PROJECT_ROOT/state/checkpoints"
|
|
11
|
+
PROGRESS_FILE="$PROJECT_ROOT/state/progress.json"
|
|
12
|
+
|
|
13
|
+
# 색상 정의
|
|
14
|
+
RED='\033[0;31m'
|
|
15
|
+
GREEN='\033[0;32m'
|
|
16
|
+
YELLOW='\033[1;33m'
|
|
17
|
+
BLUE='\033[0;34m'
|
|
18
|
+
NC='\033[0m'
|
|
19
|
+
|
|
20
|
+
# 로그 함수
|
|
21
|
+
log_info() { echo -e "${BLUE}[INFO]${NC} $1"; }
|
|
22
|
+
log_success() { echo -e "${GREEN}[SUCCESS]${NC} $1"; }
|
|
23
|
+
log_warning() { echo -e "${YELLOW}[WARNING]${NC} $1"; }
|
|
24
|
+
log_error() { echo -e "${RED}[ERROR]${NC} $1"; }
|
|
25
|
+
|
|
26
|
+
# 체크포인트 디렉토리 확인
|
|
27
|
+
ensure_checkpoint_dir() {
|
|
28
|
+
mkdir -p "$CHECKPOINTS_DIR"
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
# 현재 스테이지 확인
|
|
32
|
+
get_current_stage() {
|
|
33
|
+
if [ -f "$PROGRESS_FILE" ]; then
|
|
34
|
+
cat "$PROGRESS_FILE" 2>/dev/null | grep -o '"current_stage"[[:space:]]*:[[:space:]]*"[^"]*"' | cut -d'"' -f4
|
|
35
|
+
else
|
|
36
|
+
echo "unknown"
|
|
37
|
+
fi
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
# 변경된 라인 수 계산
|
|
41
|
+
get_changed_lines() {
|
|
42
|
+
if git rev-parse --is-inside-work-tree > /dev/null 2>&1; then
|
|
43
|
+
git diff --stat 2>/dev/null | tail -1 | grep -oE '[0-9]+ insertion|[0-9]+ deletion' | grep -oE '[0-9]+' | paste -sd+ | bc 2>/dev/null || echo "0"
|
|
44
|
+
else
|
|
45
|
+
echo "0"
|
|
46
|
+
fi
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
# 체크포인트 생성
|
|
50
|
+
create_checkpoint() {
|
|
51
|
+
local trigger_reason="$1"
|
|
52
|
+
local checkpoint_name="$2"
|
|
53
|
+
|
|
54
|
+
ensure_checkpoint_dir
|
|
55
|
+
|
|
56
|
+
local timestamp=$(date +%Y%m%d_%H%M%S)
|
|
57
|
+
local stage=$(get_current_stage)
|
|
58
|
+
|
|
59
|
+
if [ -z "$checkpoint_name" ]; then
|
|
60
|
+
checkpoint_name="${trigger_reason}_${stage}_${timestamp}"
|
|
61
|
+
fi
|
|
62
|
+
|
|
63
|
+
local checkpoint_path="$CHECKPOINTS_DIR/$checkpoint_name"
|
|
64
|
+
|
|
65
|
+
log_info "체크포인트 생성 중: $checkpoint_name"
|
|
66
|
+
|
|
67
|
+
# 체크포인트 디렉토리 생성
|
|
68
|
+
mkdir -p "$checkpoint_path"
|
|
69
|
+
|
|
70
|
+
# 소스 코드 복사 (node_modules 제외)
|
|
71
|
+
if [ -d "$PROJECT_ROOT/src" ]; then
|
|
72
|
+
rsync -a --exclude='node_modules' --exclude='.git' --exclude='state/checkpoints' \
|
|
73
|
+
"$PROJECT_ROOT/src" "$checkpoint_path/" 2>/dev/null || true
|
|
74
|
+
fi
|
|
75
|
+
|
|
76
|
+
# 설정 파일 복사
|
|
77
|
+
if [ -d "$PROJECT_ROOT/config" ]; then
|
|
78
|
+
cp -r "$PROJECT_ROOT/config" "$checkpoint_path/" 2>/dev/null || true
|
|
79
|
+
fi
|
|
80
|
+
|
|
81
|
+
# 상태 파일 복사
|
|
82
|
+
if [ -d "$PROJECT_ROOT/state" ]; then
|
|
83
|
+
mkdir -p "$checkpoint_path/state"
|
|
84
|
+
cp "$PROJECT_ROOT/state/progress.json" "$checkpoint_path/state/" 2>/dev/null || true
|
|
85
|
+
fi
|
|
86
|
+
|
|
87
|
+
# 스테이지 outputs 복사
|
|
88
|
+
if [ -d "$PROJECT_ROOT/stages" ]; then
|
|
89
|
+
mkdir -p "$checkpoint_path/stages"
|
|
90
|
+
find "$PROJECT_ROOT/stages" -name "outputs" -type d -exec cp -r {} "$checkpoint_path/stages/" \; 2>/dev/null || true
|
|
91
|
+
fi
|
|
92
|
+
|
|
93
|
+
# HANDOFF 복사
|
|
94
|
+
find "$PROJECT_ROOT/stages" -name "HANDOFF.md" -exec cp {} "$checkpoint_path/" \; 2>/dev/null || true
|
|
95
|
+
|
|
96
|
+
# 메타데이터 생성
|
|
97
|
+
cat > "$checkpoint_path/metadata.json" << EOF
|
|
98
|
+
{
|
|
99
|
+
"name": "$checkpoint_name",
|
|
100
|
+
"timestamp": "$(date -u +%Y-%m-%dT%H:%M:%SZ)",
|
|
101
|
+
"trigger": "$trigger_reason",
|
|
102
|
+
"stage": "$stage",
|
|
103
|
+
"git_commit": "$(git rev-parse HEAD 2>/dev/null || echo 'unknown')",
|
|
104
|
+
"files_changed": $(git diff --stat 2>/dev/null | grep -c '|' || echo 0)
|
|
105
|
+
}
|
|
106
|
+
EOF
|
|
107
|
+
|
|
108
|
+
log_success "체크포인트 생성 완료: $checkpoint_name"
|
|
109
|
+
|
|
110
|
+
# Git 태그 생성 (옵션)
|
|
111
|
+
if git rev-parse --is-inside-work-tree > /dev/null 2>&1; then
|
|
112
|
+
git tag -a "checkpoint/$checkpoint_name" -m "Auto-checkpoint: $trigger_reason" 2>/dev/null || true
|
|
113
|
+
fi
|
|
114
|
+
|
|
115
|
+
# 오래된 체크포인트 정리
|
|
116
|
+
cleanup_old_checkpoints
|
|
117
|
+
|
|
118
|
+
echo "$checkpoint_name"
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
# 오래된 체크포인트 정리
|
|
122
|
+
cleanup_old_checkpoints() {
|
|
123
|
+
local max_checkpoints=20
|
|
124
|
+
local checkpoint_count=$(ls -1 "$CHECKPOINTS_DIR" 2>/dev/null | wc -l)
|
|
125
|
+
|
|
126
|
+
if [ "$checkpoint_count" -gt "$max_checkpoints" ]; then
|
|
127
|
+
local to_delete=$((checkpoint_count - max_checkpoints))
|
|
128
|
+
log_info "오래된 체크포인트 정리: ${to_delete}개"
|
|
129
|
+
|
|
130
|
+
# 가장 오래된 것부터 삭제 (milestone 제외)
|
|
131
|
+
ls -1t "$CHECKPOINTS_DIR" | tail -n "$to_delete" | while read -r checkpoint; do
|
|
132
|
+
# milestone 체크포인트는 보존
|
|
133
|
+
if [[ ! "$checkpoint" =~ (stage_complete|pre_destructive|manual) ]]; then
|
|
134
|
+
rm -rf "$CHECKPOINTS_DIR/$checkpoint"
|
|
135
|
+
log_info "삭제됨: $checkpoint"
|
|
136
|
+
fi
|
|
137
|
+
done
|
|
138
|
+
fi
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
# 파괴적 작업 감지
|
|
142
|
+
check_destructive_action() {
|
|
143
|
+
local command="$1"
|
|
144
|
+
|
|
145
|
+
# 파괴적 패턴
|
|
146
|
+
local patterns=("rm -rf" "git reset --hard" "drop table" "DELETE FROM" "truncate")
|
|
147
|
+
|
|
148
|
+
for pattern in "${patterns[@]}"; do
|
|
149
|
+
if [[ "$command" == *"$pattern"* ]]; then
|
|
150
|
+
log_warning "파괴적 작업 감지: $pattern"
|
|
151
|
+
create_checkpoint "pre_destructive" ""
|
|
152
|
+
return 0
|
|
153
|
+
fi
|
|
154
|
+
done
|
|
155
|
+
|
|
156
|
+
return 1
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
# 메인 실행
|
|
160
|
+
main() {
|
|
161
|
+
local action="$1"
|
|
162
|
+
shift
|
|
163
|
+
|
|
164
|
+
case "$action" in
|
|
165
|
+
"create")
|
|
166
|
+
create_checkpoint "${1:-manual}" "${2:-}"
|
|
167
|
+
;;
|
|
168
|
+
"check-destructive")
|
|
169
|
+
check_destructive_action "$*"
|
|
170
|
+
;;
|
|
171
|
+
"cleanup")
|
|
172
|
+
cleanup_old_checkpoints
|
|
173
|
+
;;
|
|
174
|
+
"list")
|
|
175
|
+
ls -1t "$CHECKPOINTS_DIR" 2>/dev/null || echo "체크포인트 없음"
|
|
176
|
+
;;
|
|
177
|
+
*)
|
|
178
|
+
echo "사용법: $0 {create|check-destructive|cleanup|list} [args]"
|
|
179
|
+
exit 1
|
|
180
|
+
;;
|
|
181
|
+
esac
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
# 직접 실행 시에만 main 호출
|
|
185
|
+
if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
|
|
186
|
+
main "$@"
|
|
187
|
+
fi
|