claude-symphony 0.0.1 → 0.0.2
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 +16 -12
- package/bin/create.js +80 -69
- package/package.json +1 -1
- package/template/.claude/commands/benchmark.md +32 -32
- package/template/.claude/commands/brainstorm.md +33 -33
- package/template/.claude/commands/checkpoint.md +42 -42
- package/template/.claude/commands/codex.md +52 -52
- package/template/.claude/commands/collaborate.md +47 -47
- package/template/.claude/commands/context.md +77 -77
- package/template/.claude/commands/deploy.md +50 -50
- package/template/.claude/commands/fork.md +46 -46
- package/template/.claude/commands/gemini.md +43 -43
- package/template/.claude/commands/handoff.md +42 -42
- package/template/.claude/commands/implement.md +42 -42
- package/template/.claude/commands/init-project.md +25 -25
- package/template/.claude/commands/next.md +67 -67
- package/template/.claude/commands/planning.md +38 -38
- package/template/.claude/commands/qa.md +47 -47
- package/template/.claude/commands/refactor.md +50 -50
- package/template/.claude/commands/research.md +31 -31
- package/template/.claude/commands/restore.md +53 -53
- package/template/.claude/commands/run-stage.md +45 -45
- package/template/.claude/commands/stages.md +49 -49
- package/template/.claude/commands/status.md +41 -41
- package/template/.claude/commands/tasks.md +33 -33
- package/template/.claude/commands/test.md +45 -45
- package/template/.claude/commands/ui-ux.md +31 -31
- package/template/.claude/commands/validate.md +81 -81
- package/template/.claude/hooks/ai-selector.sh +39 -39
- package/template/.claude/hooks/auto-checkpoint.sh +30 -30
- package/template/.claude/hooks/output-validator.sh +45 -45
- package/template/.claude/hooks/post-stage.sh +28 -28
- package/template/.claude/hooks/pre-stage.sh +47 -47
- package/template/.claude/hooks/session-start.sh +27 -27
- package/template/.claude/hooks/statusline.sh +24 -24
- package/template/.claude/hooks/stop.sh +26 -26
- package/template/.claude/settings.json +32 -32
- package/template/.claude/skills/ai-collaboration/README.md +31 -31
- package/template/.claude/skills/ai-collaboration/debate.md +66 -66
- package/template/.claude/skills/ai-collaboration/parallel.md +34 -34
- package/template/.claude/skills/ai-collaboration/prompts/CLAUDE.md +59 -63
- package/template/.claude/skills/auto-checkpoint/README.md +46 -46
- package/template/.claude/skills/auto-checkpoint/prompts/CLAUDE.md +68 -72
- package/template/.claude/skills/auto-checkpoint/rollback.md +95 -95
- package/template/.claude/skills/auto-checkpoint/trigger.md +37 -37
- package/template/.claude/skills/context-compression/README.md +69 -69
- package/template/.claude/skills/context-compression/analyze.md +74 -74
- package/template/.claude/skills/context-compression/compress.md +103 -103
- package/template/.claude/skills/context-compression/prompts/compression.md +78 -78
- package/template/.claude/skills/output-validator/README.md +33 -33
- package/template/.claude/skills/output-validator/prompts/CLAUDE.md +74 -78
- package/template/.claude/skills/output-validator/validate.md +76 -76
- package/template/.claude/skills/smart-handoff/README.md +35 -35
- package/template/.claude/skills/smart-handoff/extract.md +42 -42
- package/template/.claude/skills/smart-handoff/prompts/CLAUDE.md +52 -54
- package/template/.claude/skills/smart-handoff/summarize.md +55 -55
- package/template/.claude/skills/stage-transition/README.md +50 -50
- package/template/.claude/skills/stage-transition/handoff-gen.md +89 -89
- package/template/.claude/skills/stage-transition/prompts/transition.md +74 -74
- package/template/.claude/skills/stage-transition/validate.md +41 -41
- package/template/CLAUDE.md +334 -335
- package/template/config/ai_benchmarking.yaml +22 -22
- package/template/config/ai_collaboration.yaml +18 -18
- package/template/config/ai_logging.yaml +50 -50
- package/template/config/auto_checkpoint.yaml +32 -32
- package/template/config/context.yaml +20 -20
- package/template/config/git.yaml +51 -51
- package/template/config/handoff_intelligence.yaml +23 -23
- package/template/config/mcp_fallbacks.yaml +71 -71
- package/template/config/memory_integration.yaml +23 -23
- package/template/config/model_enforcement.yaml +53 -53
- package/template/config/models.yaml +24 -24
- package/template/config/output_validation.yaml +44 -44
- package/template/config/pipeline.yaml +25 -25
- package/template/config/pipeline_forking.yaml +40 -40
- package/template/config/qa_logging.yaml +67 -67
- package/template/config/smart_rollback.yaml +48 -48
- package/template/config/stage_personas.yaml +154 -154
- package/template/config/workflow.yaml +16 -16
- package/template/scripts/ai-benchmark.sh +41 -41
- package/template/scripts/codex-wrapper.sh +32 -32
- package/template/scripts/context-manager.sh +136 -136
- package/template/scripts/create-checkpoint.sh +34 -34
- package/template/scripts/gemini-wrapper.sh +31 -31
- package/template/scripts/init-project.sh +40 -40
- package/template/scripts/list-stages.sh +30 -30
- package/template/scripts/next-stage.sh +67 -67
- package/template/scripts/output-validate.sh +2 -2
- package/template/scripts/pipeline-fork.sh +68 -68
- package/template/scripts/pre-run-check.sh +84 -84
- package/template/scripts/restore-checkpoint.sh +50 -50
- package/template/scripts/run-stage.sh +44 -44
- package/template/scripts/show-status.sh +30 -30
- package/template/scripts/smart-handoff.sh +70 -70
- package/template/stages/01-brainstorm/CLAUDE.md +70 -74
- package/template/stages/01-brainstorm/README.md +54 -54
- package/template/stages/01-brainstorm/config.yaml +18 -18
- package/template/stages/01-brainstorm/prompts/collaboration.md +24 -24
- package/template/stages/01-brainstorm/prompts/ideation.md +41 -41
- package/template/stages/01-brainstorm/prompts/persona.md +50 -50
- package/template/stages/01-brainstorm/prompts/requirements.md +55 -55
- package/template/stages/01-brainstorm/prompts/validation.md +28 -28
- package/template/stages/01-brainstorm/templates/ideas.md +47 -47
- package/template/stages/01-brainstorm/templates/requirements_analysis.md +61 -61
- package/template/stages/02-research/CLAUDE.md +72 -76
- package/template/stages/02-research/config.yaml +12 -12
- package/template/stages/02-research/prompts/collaboration.md +29 -29
- package/template/stages/02-research/prompts/feasibility.md +38 -38
- package/template/stages/02-research/prompts/market_analysis.md +29 -29
- package/template/stages/02-research/prompts/tech_stack.md +34 -34
- package/template/stages/02-research/prompts/validation.md +29 -29
- package/template/stages/03-planning/CLAUDE.md +88 -92
- package/template/stages/03-planning/config.yaml +10 -10
- package/template/stages/03-planning/prompts/architecture.md +43 -43
- package/template/stages/03-planning/prompts/collaboration.md +34 -34
- package/template/stages/03-planning/prompts/validation.md +34 -34
- package/template/stages/04-ui-ux/CLAUDE.md +68 -72
- package/template/stages/04-ui-ux/config.yaml +5 -5
- package/template/stages/04-ui-ux/prompts/collaboration.md +35 -35
- package/template/stages/04-ui-ux/prompts/validation.md +30 -30
- package/template/stages/05-task-management/CLAUDE.md +81 -85
- package/template/stages/05-task-management/config.yaml +17 -17
- package/template/stages/05-task-management/prompts/collaboration.md +30 -30
- package/template/stages/05-task-management/prompts/validation.md +33 -33
- package/template/stages/05-task-management/templates/notion_integration.md +70 -70
- package/template/stages/05-task-management/templates/parallel_groups.yaml +64 -64
- package/template/stages/05-task-management/templates/task_schema.yaml +33 -33
- package/template/stages/06-implementation/CLAUDE.md +117 -121
- package/template/stages/06-implementation/config.yaml +10 -10
- package/template/stages/06-implementation/prompts/collaboration.md +29 -29
- package/template/stages/06-implementation/prompts/validation.md +36 -36
- package/template/stages/07-refactoring/CLAUDE.md +120 -124
- package/template/stages/07-refactoring/config.yaml +11 -11
- package/template/stages/07-refactoring/prompts/collaboration.md +36 -36
- package/template/stages/07-refactoring/prompts/validation.md +40 -40
- package/template/stages/08-qa/CLAUDE.md +80 -84
- package/template/stages/08-qa/config.yaml +7 -7
- package/template/stages/08-qa/prompts/collaboration.md +34 -34
- package/template/stages/08-qa/prompts/validation.md +41 -41
- package/template/stages/09-testing/CLAUDE.md +86 -90
- package/template/stages/09-testing/config.yaml +10 -10
- package/template/stages/09-testing/prompts/collaboration.md +38 -38
- package/template/stages/09-testing/prompts/validation.md +41 -41
- package/template/stages/10-deployment/CLAUDE.md +86 -90
- package/template/stages/10-deployment/config.yaml +11 -11
- package/template/stages/10-deployment/prompts/collaboration.md +37 -37
- package/template/stages/10-deployment/prompts/validation.md +54 -54
- package/template/stages/10-deployment/templates/github-actions-cd.yaml +1 -1
|
@@ -1,113 +1,109 @@
|
|
|
1
1
|
# Auto-Checkpoint Skill - AI Instructions
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Role
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
You are a checkpoint and rollback management specialist. You manage checkpoints for safe work progress and support smart rollback when issues occur.
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Core Responsibilities
|
|
8
8
|
|
|
9
|
-
### 1.
|
|
9
|
+
### 1. Checkpoint Trigger Detection
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Detect the following situations to suggest or execute checkpoint creation:
|
|
12
12
|
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
13
|
+
- **Task completion**: Every 5 tasks completed
|
|
14
|
+
- **File change**: When 100+ lines changed
|
|
15
|
+
- **Destructive action**: When rm, reset, drop, etc. detected
|
|
16
|
+
- **Stage completion**: On stage end
|
|
17
17
|
|
|
18
|
-
### 2.
|
|
18
|
+
### 2. Checkpoint Creation
|
|
19
19
|
|
|
20
20
|
```
|
|
21
|
-
|
|
22
|
-
1.
|
|
23
|
-
2.
|
|
24
|
-
3.
|
|
25
|
-
4. HANDOFF (
|
|
26
|
-
5.
|
|
21
|
+
Items to include when creating checkpoint:
|
|
22
|
+
1. Current source code
|
|
23
|
+
2. Config files
|
|
24
|
+
3. State files (progress.json, etc.)
|
|
25
|
+
4. HANDOFF (if exists)
|
|
26
|
+
5. Metadata (trigger, time, summary)
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
-
### 3.
|
|
29
|
+
### 3. Rollback Suggestion
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
1.
|
|
33
|
-
2.
|
|
34
|
-
3.
|
|
35
|
-
4.
|
|
31
|
+
On error:
|
|
32
|
+
1. Analyze error type
|
|
33
|
+
2. Identify related checkpoints
|
|
34
|
+
3. Suggest appropriate rollback scope
|
|
35
|
+
4. Provide impact analysis
|
|
36
36
|
|
|
37
|
-
##
|
|
37
|
+
## Checkpoint Creation Protocol
|
|
38
38
|
|
|
39
|
-
###
|
|
39
|
+
### Auto Checkpoint
|
|
40
40
|
```
|
|
41
|
-
1.
|
|
42
|
-
2.
|
|
43
|
-
3.
|
|
44
|
-
4.
|
|
41
|
+
1. Check trigger condition
|
|
42
|
+
2. Verify current state
|
|
43
|
+
3. Create checkpoint
|
|
44
|
+
4. Display brief notification
|
|
45
45
|
```
|
|
46
46
|
|
|
47
|
-
###
|
|
47
|
+
### Checkpoint Before Destructive Action
|
|
48
48
|
```
|
|
49
|
-
1.
|
|
50
|
-
2.
|
|
51
|
-
3.
|
|
52
|
-
4.
|
|
49
|
+
1. Detect destructive pattern
|
|
50
|
+
2. **Create checkpoint immediately**
|
|
51
|
+
3. Display warning to user
|
|
52
|
+
4. Proceed only after confirmation
|
|
53
53
|
```
|
|
54
54
|
|
|
55
|
-
##
|
|
55
|
+
## Rollback Protocol
|
|
56
56
|
|
|
57
|
-
###
|
|
57
|
+
### When Suggesting Rollback
|
|
58
58
|
```markdown
|
|
59
|
-
##
|
|
59
|
+
## Rollback Suggestion
|
|
60
60
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
61
|
+
**Error Type**: [Analyzed error]
|
|
62
|
+
**Recommended Checkpoint**: [Checkpoint name]
|
|
63
|
+
**Recommended Scope**: [File/Function/Stage]
|
|
64
64
|
|
|
65
|
-
###
|
|
66
|
-
-
|
|
67
|
-
-
|
|
65
|
+
### Impact Analysis
|
|
66
|
+
- Files to restore: [List]
|
|
67
|
+
- Changes to lose: [Summary]
|
|
68
68
|
|
|
69
|
-
|
|
69
|
+
Proceed with rollback?
|
|
70
70
|
```
|
|
71
71
|
|
|
72
|
-
###
|
|
72
|
+
### When Executing Rollback
|
|
73
73
|
```
|
|
74
|
-
1.
|
|
75
|
-
2.
|
|
76
|
-
3.
|
|
77
|
-
4.
|
|
78
|
-
5.
|
|
74
|
+
1. Backup current state (safety net)
|
|
75
|
+
2. Validate checkpoint
|
|
76
|
+
3. Restore only selected scope
|
|
77
|
+
4. Verify integrity
|
|
78
|
+
5. Provide recovery guide
|
|
79
79
|
```
|
|
80
80
|
|
|
81
|
-
##
|
|
81
|
+
## Notification Format
|
|
82
82
|
|
|
83
|
-
###
|
|
83
|
+
### Checkpoint Creation Complete
|
|
84
84
|
```
|
|
85
|
-
✅
|
|
86
|
-
-
|
|
87
|
-
-
|
|
85
|
+
✅ Checkpoint created: {name}
|
|
86
|
+
- Trigger: {reason}
|
|
87
|
+
- Files: {count}
|
|
88
88
|
```
|
|
89
89
|
|
|
90
|
-
###
|
|
90
|
+
### Rollback Complete
|
|
91
91
|
```
|
|
92
|
-
🔄
|
|
93
|
-
-
|
|
94
|
-
-
|
|
92
|
+
🔄 Rollback complete: {checkpoint} → current
|
|
93
|
+
- Files restored: {count}
|
|
94
|
+
- Next steps: {recommendations}
|
|
95
95
|
```
|
|
96
96
|
|
|
97
|
-
##
|
|
98
|
-
|
|
99
|
-
- 사용자 확인 없이 롤백 실행
|
|
100
|
-
- 파괴적 작업 전 체크포인트 생략
|
|
101
|
-
- 불완전한 체크포인트 생성
|
|
102
|
-
- 롤백 후 복구 가이드 누락
|
|
103
|
-
|
|
104
|
-
## 우선순위
|
|
105
|
-
|
|
106
|
-
1. 데이터 보호 (체크포인트 생성)
|
|
107
|
-
2. 사용자 경고 (파괴적 작업)
|
|
108
|
-
3. 스마트 제안 (롤백 범위)
|
|
109
|
-
4. 간결한 알림 (상태 표시)
|
|
110
|
-
|
|
97
|
+
## Prohibited Actions
|
|
111
98
|
|
|
99
|
+
- Execute rollback without user confirmation
|
|
100
|
+
- Skip checkpoint before destructive action
|
|
101
|
+
- Create incomplete checkpoints
|
|
102
|
+
- Omit recovery guide after rollback
|
|
112
103
|
|
|
104
|
+
## Priorities
|
|
113
105
|
|
|
106
|
+
1. Data protection (checkpoint creation)
|
|
107
|
+
2. User warning (destructive actions)
|
|
108
|
+
3. Smart suggestions (rollback scope)
|
|
109
|
+
4. Concise notifications (status display)
|
|
@@ -1,152 +1,152 @@
|
|
|
1
1
|
# Auto-Checkpoint - Rollback Guide
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Smart Rollback System
|
|
4
4
|
|
|
5
|
-
###
|
|
5
|
+
### Auto Analysis on Error
|
|
6
6
|
|
|
7
7
|
```mermaid
|
|
8
8
|
graph TD
|
|
9
|
-
A[
|
|
10
|
-
B --> C[
|
|
11
|
-
C --> D[
|
|
12
|
-
D --> E[
|
|
13
|
-
E --> F{
|
|
14
|
-
F -->|Yes| G[
|
|
15
|
-
F -->|No| H[
|
|
9
|
+
A[Error occurred] --> B[Analyze error type]
|
|
10
|
+
B --> C[Search related checkpoints]
|
|
11
|
+
C --> D[Calculate rollback scope]
|
|
12
|
+
D --> E[Display rollback suggestion]
|
|
13
|
+
E --> F{User approval?}
|
|
14
|
+
F -->|Yes| G[Execute rollback]
|
|
15
|
+
F -->|No| H[Manual handling]
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
###
|
|
18
|
+
### Rollback Strategy by Error Type
|
|
19
19
|
|
|
20
|
-
|
|
|
21
|
-
|
|
22
|
-
|
|
|
23
|
-
|
|
|
24
|
-
|
|
|
25
|
-
|
|
|
26
|
-
|
|
|
20
|
+
| Error Type | Recommended Scope | Auto Suggestion |
|
|
21
|
+
|------------|------------------|-----------------|
|
|
22
|
+
| Build failure | File level | ✅ |
|
|
23
|
+
| Test failure | Function level | ✅ |
|
|
24
|
+
| Runtime error | File level | ✅ |
|
|
25
|
+
| Config error | Config files only | ✅ |
|
|
26
|
+
| Severe error | Stage level | Confirmation required |
|
|
27
27
|
|
|
28
|
-
##
|
|
28
|
+
## Rollback Scopes
|
|
29
29
|
|
|
30
|
-
### 1.
|
|
30
|
+
### 1. File Level Rollback
|
|
31
31
|
```bash
|
|
32
|
-
#
|
|
32
|
+
# Restore specific file from checkpoint
|
|
33
33
|
/restore --checkpoint "auto_task_5" --files "src/auth/UserService.ts"
|
|
34
34
|
```
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
-
|
|
38
|
-
-
|
|
36
|
+
**Suitable Situations**:
|
|
37
|
+
- Error due to single file change
|
|
38
|
+
- Rolling back specific module
|
|
39
39
|
|
|
40
|
-
### 2.
|
|
40
|
+
### 2. Function Level Rollback
|
|
41
41
|
```bash
|
|
42
|
-
#
|
|
42
|
+
# Restore specific function (Supported: TS, JS, Python)
|
|
43
43
|
/restore --checkpoint "auto_task_5" --function "UserService.login"
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
-
|
|
47
|
-
-
|
|
48
|
-
-
|
|
46
|
+
**Suitable Situations**:
|
|
47
|
+
- Specific function issue during refactoring
|
|
48
|
+
- Partial logic error
|
|
49
49
|
|
|
50
|
-
### 3.
|
|
50
|
+
### 3. Stage Level Rollback
|
|
51
51
|
```bash
|
|
52
|
-
#
|
|
52
|
+
# Restore entire stage state
|
|
53
53
|
/restore --checkpoint "stage_06_start"
|
|
54
54
|
```
|
|
55
55
|
|
|
56
|
-
|
|
57
|
-
-
|
|
58
|
-
-
|
|
56
|
+
**Suitable Situations**:
|
|
57
|
+
- Widespread issues
|
|
58
|
+
- Canceling architecture-level changes
|
|
59
59
|
|
|
60
|
-
### 4.
|
|
60
|
+
### 4. Config Files Only Rollback
|
|
61
61
|
```bash
|
|
62
62
|
/restore --checkpoint "auto_change" --config-only
|
|
63
63
|
```
|
|
64
64
|
|
|
65
|
-
|
|
66
|
-
-
|
|
67
|
-
-
|
|
65
|
+
**Suitable Situations**:
|
|
66
|
+
- Error due to config changes
|
|
67
|
+
- Environment configuration issues
|
|
68
68
|
|
|
69
|
-
##
|
|
69
|
+
## Rollback Preview
|
|
70
70
|
|
|
71
71
|
```markdown
|
|
72
|
-
##
|
|
72
|
+
## Rollback Preview
|
|
73
73
|
|
|
74
|
-
|
|
75
|
-
|
|
74
|
+
**Target Checkpoint**: auto_task_5_20240120
|
|
75
|
+
**Rollback Scope**: File level
|
|
76
76
|
|
|
77
|
-
###
|
|
78
|
-
|
|
|
79
|
-
|
|
80
|
-
| src/auth/UserService.ts | 250
|
|
81
|
-
| src/types/auth.ts | 50
|
|
82
|
-
| tests/auth.test.ts | 100
|
|
77
|
+
### Files to Restore (3)
|
|
78
|
+
| File | Current Size | Restore Size | Change |
|
|
79
|
+
|------|--------------|--------------|--------|
|
|
80
|
+
| src/auth/UserService.ts | 250 lines | 180 lines | -70 lines |
|
|
81
|
+
| src/types/auth.ts | 50 lines | 45 lines | -5 lines |
|
|
82
|
+
| tests/auth.test.ts | 100 lines | 80 lines | -20 lines |
|
|
83
83
|
|
|
84
|
-
###
|
|
85
|
-
-
|
|
86
|
-
-
|
|
87
|
-
-
|
|
84
|
+
### Changes to be Lost
|
|
85
|
+
- Password hash function added (UserService.ts:45-80)
|
|
86
|
+
- New type definitions (auth.ts:40-50)
|
|
87
|
+
- Related tests (auth.test.ts:70-100)
|
|
88
88
|
|
|
89
|
-
###
|
|
90
|
-
- LoginForm
|
|
89
|
+
### Affected Dependencies
|
|
90
|
+
- LoginForm component (import check required)
|
|
91
91
|
|
|
92
|
-
|
|
92
|
+
**Execute this rollback? (y/n)**
|
|
93
93
|
```
|
|
94
94
|
|
|
95
|
-
##
|
|
95
|
+
## Rollback Execution Process
|
|
96
96
|
|
|
97
|
-
###
|
|
98
|
-
1.
|
|
99
|
-
2.
|
|
97
|
+
### Pre-work
|
|
98
|
+
1. Create backup checkpoint of current state
|
|
99
|
+
2. Stash uncommitted changes
|
|
100
100
|
|
|
101
|
-
###
|
|
102
|
-
1.
|
|
103
|
-
2.
|
|
104
|
-
3.
|
|
105
|
-
4.
|
|
106
|
-
5.
|
|
101
|
+
### Rollback Steps
|
|
102
|
+
1. Validate checkpoint
|
|
103
|
+
2. Extract files
|
|
104
|
+
3. Restore selected files
|
|
105
|
+
4. Verify integrity
|
|
106
|
+
5. Update state files
|
|
107
107
|
|
|
108
|
-
###
|
|
109
|
-
1.
|
|
110
|
-
2. HANDOFF
|
|
111
|
-
3.
|
|
108
|
+
### Post-work
|
|
109
|
+
1. Run verification tests
|
|
110
|
+
2. Update HANDOFF
|
|
111
|
+
3. Save rollback history
|
|
112
112
|
|
|
113
|
-
##
|
|
113
|
+
## Auto-Generated Recovery Guide
|
|
114
114
|
|
|
115
115
|
```markdown
|
|
116
|
-
##
|
|
116
|
+
## File Rollback Complete
|
|
117
117
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
118
|
+
**Checkpoint**: auto_task_5_20240120
|
|
119
|
+
**Files Restored**: 3
|
|
120
|
+
**Time**: 2024-01-20 14:45:00
|
|
121
121
|
|
|
122
|
-
###
|
|
122
|
+
### Recovered Files
|
|
123
123
|
- src/auth/UserService.ts
|
|
124
124
|
- src/types/auth.ts
|
|
125
125
|
- tests/auth.test.ts
|
|
126
126
|
|
|
127
|
-
###
|
|
128
|
-
1.
|
|
129
|
-
2.
|
|
130
|
-
3.
|
|
131
|
-
-
|
|
132
|
-
-
|
|
133
|
-
4.
|
|
134
|
-
-
|
|
135
|
-
- `/restore --suggest`
|
|
127
|
+
### Recommended Next Steps
|
|
128
|
+
1. Check changes: `git diff`
|
|
129
|
+
2. Run tests: `npm test`
|
|
130
|
+
3. If issue resolved:
|
|
131
|
+
- Analyze cause and re-implement
|
|
132
|
+
- Work in smaller units
|
|
133
|
+
4. If issue persists:
|
|
134
|
+
- Additional rollback may be needed
|
|
135
|
+
- Run `/restore --suggest`
|
|
136
136
|
```
|
|
137
137
|
|
|
138
|
-
##
|
|
138
|
+
## Safety Measures
|
|
139
139
|
|
|
140
|
-
###
|
|
141
|
-
-
|
|
142
|
-
-
|
|
143
|
-
-
|
|
140
|
+
### Rollback Block Conditions
|
|
141
|
+
- Uncommitted changes exist
|
|
142
|
+
- Active processes running
|
|
143
|
+
- Files locked
|
|
144
144
|
|
|
145
|
-
###
|
|
146
|
-
-
|
|
147
|
-
- 10
|
|
148
|
-
-
|
|
145
|
+
### Confirmation Required Conditions
|
|
146
|
+
- Stage level rollback
|
|
147
|
+
- 10+ files affected
|
|
148
|
+
- Production-related files included
|
|
149
149
|
|
|
150
|
-
###
|
|
151
|
-
-
|
|
152
|
-
-
|
|
150
|
+
### Cooldown
|
|
151
|
+
- 5 minute wait between consecutive rollbacks
|
|
152
|
+
- Warning on rolling back same checkpoint again
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Auto-Checkpoint - Trigger Guide
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Checkpoint Trigger Conditions
|
|
4
4
|
|
|
5
|
-
### 1.
|
|
5
|
+
### 1. Task Completion Based
|
|
6
6
|
```yaml
|
|
7
7
|
trigger:
|
|
8
8
|
condition: "tasks_completed"
|
|
@@ -10,11 +10,11 @@ trigger:
|
|
|
10
10
|
action: "create_checkpoint"
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
13
|
+
**Detection Method**:
|
|
14
|
+
- Count `completed` status from TodoWrite
|
|
15
|
+
- Analyze commit history
|
|
16
16
|
|
|
17
|
-
### 2.
|
|
17
|
+
### 2. File Change Based
|
|
18
18
|
```yaml
|
|
19
19
|
trigger:
|
|
20
20
|
condition: "major_file_change"
|
|
@@ -25,13 +25,13 @@ trigger:
|
|
|
25
25
|
"*.md": 0.3
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
**Detection Method**:
|
|
29
29
|
```bash
|
|
30
|
-
#
|
|
30
|
+
# Calculate change amount
|
|
31
31
|
git diff --stat | awk '{sum+=$4} END {print sum}'
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
-
### 3.
|
|
34
|
+
### 3. Before Destructive Action
|
|
35
35
|
```yaml
|
|
36
36
|
trigger:
|
|
37
37
|
condition: "destructive_action"
|
|
@@ -41,12 +41,12 @@ trigger:
|
|
|
41
41
|
- "drop table"
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
1.
|
|
46
|
-
2.
|
|
47
|
-
3.
|
|
44
|
+
**Action on Detection**:
|
|
45
|
+
1. Create checkpoint immediately
|
|
46
|
+
2. Request user confirmation
|
|
47
|
+
3. Proceed with action after confirmation
|
|
48
48
|
|
|
49
|
-
### 4.
|
|
49
|
+
### 4. Time Based
|
|
50
50
|
```yaml
|
|
51
51
|
trigger:
|
|
52
52
|
condition: "interval"
|
|
@@ -54,7 +54,7 @@ trigger:
|
|
|
54
54
|
only_if_changes: true
|
|
55
55
|
```
|
|
56
56
|
|
|
57
|
-
### 5.
|
|
57
|
+
### 5. Stage Based
|
|
58
58
|
```yaml
|
|
59
59
|
trigger:
|
|
60
60
|
conditions:
|
|
@@ -62,22 +62,22 @@ trigger:
|
|
|
62
62
|
on_stage_error: true
|
|
63
63
|
```
|
|
64
64
|
|
|
65
|
-
##
|
|
65
|
+
## Checkpoint Creation Process
|
|
66
66
|
|
|
67
67
|
```mermaid
|
|
68
68
|
graph TD
|
|
69
|
-
A[
|
|
70
|
-
B -->|Yes| C[
|
|
71
|
-
B -->|No| Z[
|
|
72
|
-
C --> D[
|
|
73
|
-
D --> E[
|
|
74
|
-
E --> F[
|
|
75
|
-
F --> G[
|
|
76
|
-
G --> H[Git
|
|
77
|
-
H --> I[
|
|
69
|
+
A[Trigger detected] --> B{Valid trigger?}
|
|
70
|
+
B -->|Yes| C[Verify current state]
|
|
71
|
+
B -->|No| Z[Ignore]
|
|
72
|
+
C --> D[Collect files]
|
|
73
|
+
D --> E[Generate metadata]
|
|
74
|
+
E --> F[Create archive]
|
|
75
|
+
F --> G[Verify integrity]
|
|
76
|
+
G --> H[Create Git tag]
|
|
77
|
+
H --> I[Cleanup old checkpoints]
|
|
78
78
|
```
|
|
79
79
|
|
|
80
|
-
##
|
|
80
|
+
## Metadata Format
|
|
81
81
|
|
|
82
82
|
```yaml
|
|
83
83
|
checkpoint:
|
|
@@ -94,29 +94,29 @@ checkpoint:
|
|
|
94
94
|
modified_files:
|
|
95
95
|
- "src/auth/UserService.ts"
|
|
96
96
|
- "src/components/LoginForm.tsx"
|
|
97
|
-
key_changes: "
|
|
97
|
+
key_changes: "User authentication system implementation"
|
|
98
98
|
```
|
|
99
99
|
|
|
100
|
-
##
|
|
100
|
+
## Retention Policy
|
|
101
101
|
|
|
102
102
|
```yaml
|
|
103
103
|
retention:
|
|
104
104
|
max_checkpoints: 20
|
|
105
105
|
max_age_days: 30
|
|
106
106
|
|
|
107
|
-
#
|
|
107
|
+
# Never delete
|
|
108
108
|
milestones:
|
|
109
109
|
- stage_complete
|
|
110
110
|
- pre_destructive
|
|
111
111
|
- user_created
|
|
112
112
|
```
|
|
113
113
|
|
|
114
|
-
##
|
|
114
|
+
## Naming Conventions
|
|
115
115
|
|
|
116
|
-
|
|
|
117
|
-
|
|
118
|
-
|
|
|
119
|
-
|
|
|
120
|
-
|
|
|
121
|
-
|
|
|
122
|
-
|
|
|
116
|
+
| Trigger | Format | Example |
|
|
117
|
+
|---------|--------|---------|
|
|
118
|
+
| Task | `auto_task_{count}_{timestamp}` | `auto_task_5_20240120` |
|
|
119
|
+
| File change | `auto_change_{timestamp}` | `auto_change_20240120_143022` |
|
|
120
|
+
| Destructive | `pre_destructive_{timestamp}` | `pre_destructive_20240120_143022` |
|
|
121
|
+
| Stage | `stage_{id}_{status}_{timestamp}` | `stage_06_complete_20240120` |
|
|
122
|
+
| Manual | `manual_{name}_{timestamp}` | `manual_feature_complete_20240120` |
|