@rpamis/comet 0.1.7 → 0.1.8
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 +20 -8
- package/assets/skills/comet/scripts/comet-archive.sh +8 -2
- package/assets/skills/comet/scripts/comet-guard.sh +32 -22
- package/assets/skills/comet/scripts/comet-state.sh +495 -0
- package/assets/skills/comet-archive/SKILL.md +5 -18
- package/assets/skills/comet-build/SKILL.md +16 -23
- package/assets/skills/comet-design/SKILL.md +7 -23
- package/assets/skills/comet-hotfix/SKILL.md +9 -43
- package/assets/skills/comet-open/SKILL.md +9 -31
- package/assets/skills/comet-tweak/SKILL.md +9 -43
- package/assets/skills/comet-verify/SKILL.md +10 -30
- package/assets/skills-zh/comet/SKILL.md +7 -1
- package/assets/skills-zh/comet-archive/SKILL.md +5 -18
- package/assets/skills-zh/comet-build/SKILL.md +16 -23
- package/assets/skills-zh/comet-design/SKILL.md +7 -23
- package/assets/skills-zh/comet-hotfix/SKILL.md +9 -43
- package/assets/skills-zh/comet-open/SKILL.md +9 -31
- package/assets/skills-zh/comet-tweak/SKILL.md +9 -43
- package/assets/skills-zh/comet-verify/SKILL.md +10 -30
- package/package.json +1 -1
|
@@ -14,29 +14,14 @@ description: "Comet Phase 3: Plan and Build. Invoke with /comet-build. Create pl
|
|
|
14
14
|
|
|
15
15
|
### 0. Entry State Verification (Entry Check)
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
Execute entry verification:
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
3. `design_doc` field is non-null and non-empty
|
|
23
|
-
4. File referenced by `design_doc` exists (e.g., `docs/superpowers/specs/YYYY-MM-DD-topic-design.md`)
|
|
24
|
-
5. `openspec/changes/<name>/proposal.md` exists and is non-empty
|
|
25
|
-
6. `openspec/changes/<name>/tasks.md` exists and is non-empty
|
|
26
|
-
|
|
27
|
-
**Verification method:**
|
|
28
|
-
- `cat openspec/changes/<name>/.comet.yaml` to read all fields
|
|
29
|
-
- Use `ls` or `test -f` to confirm design_doc file exists
|
|
30
|
-
|
|
31
|
-
**Failure output:**
|
|
32
|
-
```
|
|
33
|
-
[HARD STOP] Entry check failed for comet-build
|
|
34
|
-
Expected: phase=build, design_doc=<path> exists
|
|
35
|
-
Actual: phase=<actual-value>, design_doc=<actual-value or file does not exist>
|
|
36
|
-
Suggestion: Run comet-design first, or verify design_doc file exists.
|
|
19
|
+
```bash
|
|
20
|
+
COMET_STATE=$(find . -path '*/comet/scripts/comet-state.sh' -type f -print -quit)
|
|
21
|
+
bash "$COMET_STATE" check <name> build
|
|
37
22
|
```
|
|
38
23
|
|
|
39
|
-
Proceed to Step 1
|
|
24
|
+
Proceed to Step 1 after verification passes. The script outputs specific failure reasons when verification fails.
|
|
40
25
|
|
|
41
26
|
### 1. Create Plan
|
|
42
27
|
|
|
@@ -59,7 +44,7 @@ design-doc: docs/superpowers/specs/YYYY-MM-DD-<topic>-design.md
|
|
|
59
44
|
Record plan path:
|
|
60
45
|
|
|
61
46
|
```bash
|
|
62
|
-
|
|
47
|
+
bash "$COMET_STATE" set <name> plan docs/superpowers/plans/YYYY-MM-DD-feature.md
|
|
63
48
|
```
|
|
64
49
|
|
|
65
50
|
No manual phase update needed — guard auto-transitions when exit conditions are met.
|
|
@@ -77,7 +62,11 @@ Plan has been written to the current branch. Before starting execution, choose w
|
|
|
77
62
|
- Change involves ≤ 3 files → Recommend A
|
|
78
63
|
- Need parallel development, current branch has uncommitted work → Recommend B
|
|
79
64
|
|
|
80
|
-
After user selection, update `isolation`
|
|
65
|
+
After user selection, update `isolation` field. `isolation` only allows one of the following values:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
bash "$COMET_STATE" set <name> isolation <value>
|
|
69
|
+
```
|
|
81
70
|
|
|
82
71
|
- `branch`
|
|
83
72
|
- `worktree`
|
|
@@ -103,7 +92,11 @@ Present plan summary to user (task count, involved modules), then ask for execut
|
|
|
103
92
|
- Task count ≤ 2 and no cross-module dependencies → Recommend B
|
|
104
93
|
- From hotfix path → Recommend B
|
|
105
94
|
|
|
106
|
-
After user selection, update `build_mode`
|
|
95
|
+
After user selection, update `build_mode` field. `build_mode` only allows one of the following values:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
bash "$COMET_STATE" set <name> build_mode <value>
|
|
99
|
+
```
|
|
107
100
|
|
|
108
101
|
- `subagent-driven-development`
|
|
109
102
|
- `executing-plans`
|
|
@@ -14,30 +14,14 @@ description: "Comet Phase 2: Deep Design. Invoke with /comet-design. Produce Des
|
|
|
14
14
|
|
|
15
15
|
### 0. Entry State Verification (Entry Check)
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
3. `workflow` field value is `"full"`
|
|
23
|
-
4. `design_doc` field is `null` or empty
|
|
24
|
-
5. `openspec/changes/<name>/proposal.md` exists and is non-empty
|
|
25
|
-
6. `openspec/changes/<name>/design.md` exists and is non-empty
|
|
26
|
-
7. `openspec/changes/<name>/tasks.md` exists and is non-empty
|
|
27
|
-
|
|
28
|
-
**Verification method:**
|
|
29
|
-
- `cat openspec/changes/<name>/.comet.yaml` to read all fields
|
|
30
|
-
- Check checklist items one by one
|
|
31
|
-
|
|
32
|
-
**Failure output:**
|
|
33
|
-
```
|
|
34
|
-
[HARD STOP] Entry check failed for comet-design
|
|
35
|
-
Expected: phase=design, design_doc=<empty/null>, workflow=full
|
|
36
|
-
Actual: phase=<actual-value>, design_doc=<actual-value>, workflow=<actual-value>
|
|
37
|
-
Suggestion: Run comet-open first, or check if .comet.yaml was modified out of sequence.
|
|
17
|
+
Execute entry verification:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
COMET_STATE=$(find . -path '*/comet/scripts/comet-state.sh' -type f -print -quit)
|
|
21
|
+
bash "$COMET_STATE" check <name> design
|
|
38
22
|
```
|
|
39
23
|
|
|
40
|
-
Proceed to Step 1
|
|
24
|
+
Proceed to Step 1 after verification passes. The script outputs specific failure reasons when verification fails.
|
|
41
25
|
|
|
42
26
|
### 1a. Read Existing Context
|
|
43
27
|
|
|
@@ -70,7 +54,7 @@ Record design_doc path, then run guard to auto-transition:
|
|
|
70
54
|
|
|
71
55
|
```bash
|
|
72
56
|
# Record design_doc path
|
|
73
|
-
|
|
57
|
+
bash "$COMET_STATE" set <name> design_doc docs/superpowers/specs/YYYY-MM-DD-topic-design.md
|
|
74
58
|
|
|
75
59
|
# Auto-transition to next phase
|
|
76
60
|
bash $COMET_GUARD <change-name> design --apply
|
|
@@ -22,25 +22,14 @@ Applicable for bug fixes, hotfixes, small-scale behavior corrections. Does not i
|
|
|
22
22
|
|
|
23
23
|
### 0. Entry State Verification (Entry Check)
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
Execute entry verification:
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
**Verification method:**
|
|
31
|
-
- `test -d openspec/changes/<name>` to check directory
|
|
32
|
-
- If directory exists, `test -f openspec/changes/<name>/.comet.yaml` to check config file
|
|
33
|
-
- If `.comet.yaml` exists, read `phase` to check if it's an incomplete hotfix
|
|
34
|
-
|
|
35
|
-
**Failure output (has conflict):**
|
|
36
|
-
```
|
|
37
|
-
[HARD STOP] Entry check failed for comet-hotfix
|
|
38
|
-
Expected: openspec/changes/<name>/.comet.yaml does not exist (new change)
|
|
39
|
-
Actual: .comet.yaml exists with phase=<actual-value>
|
|
40
|
-
Suggestion: Pick a different change name, or check if an existing hotfix is in progress.
|
|
27
|
+
```bash
|
|
28
|
+
COMET_STATE=$(find . -path '*/comet/scripts/comet-state.sh' -type f -print -quit)
|
|
29
|
+
bash "$COMET_STATE" check <name> open
|
|
41
30
|
```
|
|
42
31
|
|
|
43
|
-
Proceed to process steps
|
|
32
|
+
Proceed to process steps after verification passes. The script outputs specific failure reasons when verification fails.
|
|
44
33
|
|
|
45
34
|
Execution chain: open → build → verify → archive. Hotfix provides default decisions for each phase: streamlined open, direct build, scale-based verification, archive after verification passes.
|
|
46
35
|
|
|
@@ -56,34 +45,11 @@ After the skill loads, follow its guidance to create streamlined artifacts:
|
|
|
56
45
|
- `tasks.md` — fix task list
|
|
57
46
|
- **No delta spec needed** (unless fix changes existing spec acceptance scenarios)
|
|
58
47
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
```yaml
|
|
62
|
-
workflow: hotfix
|
|
63
|
-
phase: build
|
|
64
|
-
design_doc: null
|
|
65
|
-
plan: null
|
|
66
|
-
build_mode: direct
|
|
67
|
-
isolation: branch
|
|
68
|
-
verify_mode: light
|
|
69
|
-
verify_result: pending
|
|
70
|
-
verified_at: null
|
|
71
|
-
archived: false
|
|
72
|
-
```
|
|
48
|
+
Initialize Comet state file:
|
|
73
49
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
Confirm phase line value is "build"
|
|
78
|
-
Confirm design_doc line value is "null"
|
|
79
|
-
Confirm plan line value is "null"
|
|
80
|
-
Confirm build_mode line value is "direct"
|
|
81
|
-
Confirm isolation line value is "branch"
|
|
82
|
-
Confirm verify_mode line value is "light"
|
|
83
|
-
Confirm verify_result line value is "pending"
|
|
84
|
-
Confirm verified_at line value is "null"
|
|
85
|
-
Confirm archived line value is "false"
|
|
86
|
-
If any field does not match, retry write then verify again. Maximum 2 retries, report error and terminate if still fails.
|
|
50
|
+
```bash
|
|
51
|
+
bash "$COMET_STATE" init <name> hotfix
|
|
52
|
+
```
|
|
87
53
|
|
|
88
54
|
### 2. Direct Build (preset build)
|
|
89
55
|
|
|
@@ -13,28 +13,14 @@ description: "Comet Phase 1: Open. Invoke with /comet-open. Explore ideas throug
|
|
|
13
13
|
|
|
14
14
|
### 0. Entry State Verification (Entry Check)
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
Execute entry verification:
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
3. `openspec/changes/<name>/proposal.md` exists and is non-empty
|
|
22
|
-
4. `openspec/changes/<name>/design.md` exists and is non-empty
|
|
23
|
-
5. `openspec/changes/<name>/tasks.md` exists and is non-empty
|
|
24
|
-
|
|
25
|
-
**Verification method:**
|
|
26
|
-
- Read the above paths to confirm existence/non-existence
|
|
27
|
-
- If `.comet.yaml` already exists, read its `phase` field: if phase is not empty, output `[HARD STOP]` and prompt that there may already be an active change
|
|
28
|
-
|
|
29
|
-
**Failure output:**
|
|
30
|
-
```
|
|
31
|
-
[HARD STOP] Entry check failed for comet-open
|
|
32
|
-
Expected: .comet.yaml does not exist, proposal.md + design.md + tasks.md exist
|
|
33
|
-
Actual: phase=<actual-value>, design_doc=<actual-value> (or file does not exist)
|
|
34
|
-
Suggestion: Check if another change with the same name is already active.
|
|
18
|
+
```bash
|
|
19
|
+
COMET_STATE=$(find . -path '*/comet/scripts/comet-state.sh' -type f -print -quit)
|
|
20
|
+
bash "$COMET_STATE" check <name> open
|
|
35
21
|
```
|
|
36
22
|
|
|
37
|
-
Proceed to Step 1
|
|
23
|
+
Proceed to Step 1 after verification passes. The script outputs specific failure reasons when verification fails.
|
|
38
24
|
|
|
39
25
|
### 1. Explore Idea
|
|
40
26
|
|
|
@@ -59,18 +45,10 @@ openspec/changes/<name>/
|
|
|
59
45
|
|
|
60
46
|
### 3. Initialize Comet State
|
|
61
47
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
phase: design
|
|
67
|
-
design_doc: null
|
|
68
|
-
plan: null
|
|
69
|
-
build_mode: null
|
|
70
|
-
verify_mode: null
|
|
71
|
-
verify_result: pending
|
|
72
|
-
verified_at: null
|
|
73
|
-
archived: false
|
|
48
|
+
Initialize Comet state file:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
bash "$COMET_STATE" init <name> full
|
|
74
52
|
```
|
|
75
53
|
|
|
76
54
|
### 4. Content Completeness Check
|
|
@@ -23,25 +23,14 @@ Applicable for small-scale non-bug changes, such as copy adjustments, configurat
|
|
|
23
23
|
|
|
24
24
|
### 0. Entry State Verification (Entry Check)
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
Execute entry verification:
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
**Verification method:**
|
|
32
|
-
- `test -d openspec/changes/<name>` to check directory
|
|
33
|
-
- If directory exists, `test -f openspec/changes/<name>/.comet.yaml` to check config file
|
|
34
|
-
- If `.comet.yaml` exists, read `phase` to check if it's an incomplete tweak
|
|
35
|
-
|
|
36
|
-
**Failure output (has conflict):**
|
|
37
|
-
```
|
|
38
|
-
[HARD STOP] Entry check failed for comet-tweak
|
|
39
|
-
Expected: openspec/changes/<name>/.comet.yaml does not exist (new change)
|
|
40
|
-
Actual: .comet.yaml exists with phase=<actual-value>
|
|
41
|
-
Suggestion: Pick a different change name, or check if an existing tweak is in progress.
|
|
28
|
+
```bash
|
|
29
|
+
COMET_STATE=$(find . -path '*/comet/scripts/comet-state.sh' -type f -print -quit)
|
|
30
|
+
bash "$COMET_STATE" check <name> open
|
|
42
31
|
```
|
|
43
32
|
|
|
44
|
-
Proceed to process steps
|
|
33
|
+
Proceed to process steps after verification passes. The script outputs specific failure reasons when verification fails.
|
|
45
34
|
|
|
46
35
|
Execution chain: open → lightweight build → light verify → archive. Tweak provides default decisions for each phase: streamlined open, lightweight build, lightweight verification, archive after verification passes.
|
|
47
36
|
|
|
@@ -57,34 +46,11 @@ After the skill loads, follow its guidance to create streamlined artifacts:
|
|
|
57
46
|
- `tasks.md` — not exceeding 3 tasks
|
|
58
47
|
- **No delta spec needed** (unless change changes existing spec acceptance scenarios; once delta spec needed, upgrade to full `/comet`)
|
|
59
48
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
```yaml
|
|
63
|
-
workflow: tweak
|
|
64
|
-
phase: build
|
|
65
|
-
design_doc: null
|
|
66
|
-
plan: null
|
|
67
|
-
build_mode: direct
|
|
68
|
-
isolation: branch
|
|
69
|
-
verify_mode: light
|
|
70
|
-
verify_result: pending
|
|
71
|
-
verified_at: null
|
|
72
|
-
archived: false
|
|
73
|
-
```
|
|
49
|
+
Initialize Comet state file:
|
|
74
50
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
Confirm phase line value is "build"
|
|
79
|
-
Confirm design_doc line value is "null"
|
|
80
|
-
Confirm plan line value is "null"
|
|
81
|
-
Confirm build_mode line value is "direct"
|
|
82
|
-
Confirm isolation line value is "branch"
|
|
83
|
-
Confirm verify_mode line value is "light"
|
|
84
|
-
Confirm verify_result line value is "pending"
|
|
85
|
-
Confirm verified_at line value is "null"
|
|
86
|
-
Confirm archived line value is "false"
|
|
87
|
-
If any field does not match, retry write then verify again. Maximum 2 retries, report error and terminate if still fails.
|
|
51
|
+
```bash
|
|
52
|
+
bash "$COMET_STATE" init <name> tweak
|
|
53
|
+
```
|
|
88
54
|
|
|
89
55
|
### 2. Lightweight Build (preset build)
|
|
90
56
|
|
|
@@ -14,44 +14,24 @@ description: "Comet Phase 4: Verify and Complete. Invoke with /comet-verify. Ver
|
|
|
14
14
|
|
|
15
15
|
### 0. Entry State Verification (Entry Check)
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
Execute entry verification:
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
3. `verify_result` field is `"pending"` or null (not yet verified)
|
|
23
|
-
|
|
24
|
-
**Verification method:**
|
|
25
|
-
- `cat openspec/changes/<name>/.comet.yaml` to read all fields
|
|
26
|
-
- If `verify_result` is already `"pass"`, this change has already been verified
|
|
27
|
-
|
|
28
|
-
**Failure output:**
|
|
29
|
-
```
|
|
30
|
-
[HARD STOP] Entry check failed for comet-verify
|
|
31
|
-
Expected: phase=verify, verify_result=pending|null
|
|
32
|
-
Actual: phase=<actual-value>, verify_result=<actual-value>
|
|
33
|
-
Suggestion: Run comet-build first, or this change was already verified.
|
|
19
|
+
```bash
|
|
20
|
+
COMET_STATE=$(find . -path '*/comet/scripts/comet-state.sh' -type f -print -quit)
|
|
21
|
+
bash "$COMET_STATE" check <name> verify
|
|
34
22
|
```
|
|
35
23
|
|
|
36
|
-
Proceed to Step 1
|
|
24
|
+
Proceed to Step 1 after verification passes. The script outputs specific failure reasons when verification fails.
|
|
37
25
|
|
|
38
26
|
### 1. Change Scale Assessment
|
|
39
27
|
|
|
40
|
-
|
|
28
|
+
Execute scale assessment:
|
|
41
29
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
| Changed file count (git diff --stat) | ≤ 5 | > 5 |
|
|
46
|
-
| Has delta spec | No | Yes |
|
|
47
|
-
| New capability added | No | Yes |
|
|
48
|
-
|
|
49
|
-
**Decision rule**: Any metric hitting "large" → full verification. All hitting "small" → lightweight verification.
|
|
50
|
-
|
|
51
|
-
After determination, record actual verification mode in `openspec/changes/<name>/.comet.yaml`. `verify_mode` only allows one of the following values:
|
|
30
|
+
```bash
|
|
31
|
+
bash "$COMET_STATE" scale <name>
|
|
32
|
+
```
|
|
52
33
|
|
|
53
|
-
|
|
54
|
-
- `full`
|
|
34
|
+
Script automatically counts tasks, delta specs, and changed files to determine whether to use light or full verification mode, and sets the verify_mode field.
|
|
55
35
|
|
|
56
36
|
### 2a. Lightweight Verification (Small Changes)
|
|
57
37
|
|
|
@@ -151,7 +151,7 @@ archived: false
|
|
|
151
151
|
|------|---------|
|
|
152
152
|
| `openspec list --json` 失败 | 检查 openspec 是否已安装,提示用户运行 `openspec init` |
|
|
153
153
|
| 子 skill 不可用(如 `superpowers:brainstorming`) | 停止流程,提示安装或启用对应 skill |
|
|
154
|
-
| `.comet.yaml` 格式异常或缺失 | 以文件状态为准(tasks.md、docs/superpowers
|
|
154
|
+
| `.comet.yaml` 格式异常或缺失 | 以文件状态为准(tasks.md、docs/superpowers/),使用 `bash $COMET_STATE set <name> <field> <value>` 修正元数据后继续 |
|
|
155
155
|
| Maven 编译/测试失败 | 返回 build 阶段修复,不进入 verify |
|
|
156
156
|
| change 目录结构不完整 | 按 `comet-open` 的产物要求补齐缺失文件 |
|
|
157
157
|
|
|
@@ -169,6 +169,12 @@ COMET_GUARD=$(find . -path '*/comet/scripts/comet-guard.sh' -type f -print -quit
|
|
|
169
169
|
bash "$COMET_GUARD" <change-name> <phase>
|
|
170
170
|
```
|
|
171
171
|
|
|
172
|
+
**状态管理脚本**:`comet-state.sh` 提供 init/set/get/check/scale 五个子命令,统一管理状态文件字段:
|
|
173
|
+
|
|
174
|
+
```bash
|
|
175
|
+
COMET_STATE=$(find . -path '*/comet/scripts/comet-state.sh' -type f -print -quit)
|
|
176
|
+
```
|
|
177
|
+
|
|
172
178
|
**自动状态更新**:guard 支持 `--apply` 参数,验证通过后自动更新 `.comet.yaml` 状态字段:
|
|
173
179
|
|
|
174
180
|
```bash
|
|
@@ -15,27 +15,14 @@ description: "Comet 阶段 5:归档。用 /comet-archive 调用。同步 delta
|
|
|
15
15
|
|
|
16
16
|
### 0. 入口状态验证(Entry Check)
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
执行入口验证:
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
3. `verify_result` 字段的值为 `"pass"`
|
|
24
|
-
4. `archived` 字段为 `"false"` 或 null(尚未归档)
|
|
25
|
-
|
|
26
|
-
**验证方式:**
|
|
27
|
-
- `cat openspec/changes/<name>/.comet.yaml` 读取全部字段
|
|
28
|
-
- 如 `verify_result` 不是 `"pass"`,必须先完成验证
|
|
29
|
-
|
|
30
|
-
**失败输出:**
|
|
31
|
-
```
|
|
32
|
-
[HARD STOP] Entry check failed for comet-archive
|
|
33
|
-
Expected: phase=archive, verify_result=pass, archived=false|null
|
|
34
|
-
Actual: phase=<实际值>, verify_result=<实际值>, archived=<实际值>
|
|
35
|
-
Suggestion: Run comet-verify first, or this change was already archived.
|
|
20
|
+
```bash
|
|
21
|
+
COMET_STATE=$(find . -path '*/comet/scripts/comet-state.sh' -type f -print -quit)
|
|
22
|
+
bash "$COMET_STATE" check <name> archive
|
|
36
23
|
```
|
|
37
24
|
|
|
38
|
-
|
|
25
|
+
验证通过后继续 Step 1。验证失败时脚本会输出具体失败原因。
|
|
39
26
|
|
|
40
27
|
### 1. 执行归档
|
|
41
28
|
|
|
@@ -14,29 +14,14 @@ description: "Comet 阶段 3:计划与构建。用 /comet-build 调用。制
|
|
|
14
14
|
|
|
15
15
|
### 0. 入口状态验证(Entry Check)
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
执行入口验证:
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
3. `design_doc` 字段非 null 且非空
|
|
23
|
-
4. `design_doc` 引用的文件存在(例如 `docs/superpowers/specs/YYYY-MM-DD-topic-design.md`)
|
|
24
|
-
5. `openspec/changes/<name>/proposal.md` 存在且非空
|
|
25
|
-
6. `openspec/changes/<name>/tasks.md` 存在且非空
|
|
26
|
-
|
|
27
|
-
**验证方式:**
|
|
28
|
-
- `cat openspec/changes/<name>/.comet.yaml` 读取全部字段
|
|
29
|
-
- 用 `ls` 或 `test -f` 确认 design_doc 文件存在
|
|
30
|
-
|
|
31
|
-
**失败输出:**
|
|
32
|
-
```
|
|
33
|
-
[HARD STOP] Entry check failed for comet-build
|
|
34
|
-
Expected: phase=build, design_doc=<path> exists
|
|
35
|
-
Actual: phase=<实际值>, design_doc=<实际值或文件不存在>
|
|
36
|
-
Suggestion: Run comet-design first, or verify design_doc file exists.
|
|
19
|
+
```bash
|
|
20
|
+
COMET_STATE=$(find . -path '*/comet/scripts/comet-state.sh' -type f -print -quit)
|
|
21
|
+
bash "$COMET_STATE" check <name> build
|
|
37
22
|
```
|
|
38
23
|
|
|
39
|
-
|
|
24
|
+
验证通过后继续 Step 1。验证失败时脚本会输出具体失败原因。
|
|
40
25
|
|
|
41
26
|
### 1. 制定计划
|
|
42
27
|
|
|
@@ -59,7 +44,7 @@ design-doc: docs/superpowers/specs/YYYY-MM-DD-<topic>-design.md
|
|
|
59
44
|
先记录 plan 路径:
|
|
60
45
|
|
|
61
46
|
```bash
|
|
62
|
-
|
|
47
|
+
bash "$COMET_STATE" set <name> plan docs/superpowers/plans/YYYY-MM-DD-feature.md
|
|
63
48
|
```
|
|
64
49
|
|
|
65
50
|
无需手动更新 phase,guard 会在退出条件满足后自动流转。
|
|
@@ -77,7 +62,11 @@ sed -i 's|^plan:.*|plan: docs/superpowers/plans/YYYY-MM-DD-feature.md|' openspec
|
|
|
77
62
|
- 变更涉及 ≤ 3 个文件 → 推荐 A
|
|
78
63
|
- 需要并行开发、当前分支有未提交工作 → 推荐 B
|
|
79
64
|
|
|
80
|
-
|
|
65
|
+
用户选择后,更新 `isolation` 字段。`isolation` 只允许以下值之一:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
bash "$COMET_STATE" set <name> isolation <value>
|
|
69
|
+
```
|
|
81
70
|
|
|
82
71
|
- `branch`
|
|
83
72
|
- `worktree`
|
|
@@ -103,7 +92,11 @@ sed -i 's|^plan:.*|plan: docs/superpowers/plans/YYYY-MM-DD-feature.md|' openspec
|
|
|
103
92
|
- 任务数 ≤ 2 且无跨模块依赖 → 推荐 B
|
|
104
93
|
- 来自 hotfix 路径 → 推荐 B
|
|
105
94
|
|
|
106
|
-
|
|
95
|
+
用户选择后,更新 `build_mode` 字段。`build_mode` 只允许以下值之一:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
bash "$COMET_STATE" set <name> build_mode <value>
|
|
99
|
+
```
|
|
107
100
|
|
|
108
101
|
- `subagent-driven-development`
|
|
109
102
|
- `executing-plans`
|
|
@@ -14,30 +14,14 @@ description: "Comet 阶段 2:深度设计。用 /comet-design 调用。通过
|
|
|
14
14
|
|
|
15
15
|
### 0. 入口状态验证(Entry Check)
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
3. `workflow` 字段的值为 `"full"`
|
|
23
|
-
4. `design_doc` 字段为 `null` 或空
|
|
24
|
-
5. `openspec/changes/<name>/proposal.md` 存在且非空
|
|
25
|
-
6. `openspec/changes/<name>/design.md` 存在且非空
|
|
26
|
-
7. `openspec/changes/<name>/tasks.md` 存在且非空
|
|
27
|
-
|
|
28
|
-
**验证方式:**
|
|
29
|
-
- `cat openspec/changes/<name>/.comet.yaml` 读取全部字段
|
|
30
|
-
- 逐条比对检查清单
|
|
31
|
-
|
|
32
|
-
**失败输出:**
|
|
33
|
-
```
|
|
34
|
-
[HARD STOP] Entry check failed for comet-design
|
|
35
|
-
Expected: phase=design, design_doc=<empty/null>, workflow=full
|
|
36
|
-
Actual: phase=<实际值>, design_doc=<实际值>, workflow=<实际值>
|
|
37
|
-
Suggestion: Run comet-open first, or check if .comet.yaml was modified out of sequence.
|
|
17
|
+
执行入口验证:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
COMET_STATE=$(find . -path '*/comet/scripts/comet-state.sh' -type f -print -quit)
|
|
21
|
+
bash "$COMET_STATE" check <name> design
|
|
38
22
|
```
|
|
39
23
|
|
|
40
|
-
|
|
24
|
+
验证通过后继续 Step 1。验证失败时脚本会输出具体失败原因。
|
|
41
25
|
|
|
42
26
|
### 1a. 读取已有上下文
|
|
43
27
|
|
|
@@ -70,7 +54,7 @@ Design 摘要: <design.md 架构决策>
|
|
|
70
54
|
|
|
71
55
|
```bash
|
|
72
56
|
# 记录 design_doc 路径
|
|
73
|
-
|
|
57
|
+
bash "$COMET_STATE" set <name> design_doc docs/superpowers/specs/YYYY-MM-DD-topic-design.md
|
|
74
58
|
|
|
75
59
|
# 自动流转到下一阶段
|
|
76
60
|
bash $COMET_GUARD <change-name> design --apply
|
|
@@ -22,25 +22,14 @@ Hotfix 是 Comet 五阶段能力的预设工作流,不是独立的平行流程
|
|
|
22
22
|
|
|
23
23
|
### 0. 入口状态验证(Entry Check)
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
执行入口验证:
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
**验证方式:**
|
|
31
|
-
- `test -d openspec/changes/<name>` 检查目录
|
|
32
|
-
- 如目录存在,`test -f openspec/changes/<name>/.comet.yaml` 检查配置文件
|
|
33
|
-
- 如 `.comet.yaml` 已存在,读取 `phase` 检查是否为未完成的 hotfix
|
|
34
|
-
|
|
35
|
-
**失败输出(有冲突):**
|
|
36
|
-
```
|
|
37
|
-
[HARD STOP] Entry check failed for comet-hotfix
|
|
38
|
-
Expected: openspec/changes/<name>/.comet.yaml does not exist (new change)
|
|
39
|
-
Actual: .comet.yaml exists with phase=<实际值>
|
|
40
|
-
Suggestion: Pick a different change name, or check if an existing hotfix is in progress.
|
|
27
|
+
```bash
|
|
28
|
+
COMET_STATE=$(find . -path '*/comet/scripts/comet-state.sh' -type f -print -quit)
|
|
29
|
+
bash "$COMET_STATE" check <name> open
|
|
41
30
|
```
|
|
42
31
|
|
|
43
|
-
|
|
32
|
+
验证通过后继续流程步骤。验证失败时脚本会输出具体失败原因。
|
|
44
33
|
|
|
45
34
|
执行链路:open → build → verify → archive。Hotfix 为每个阶段提供默认决策:精简开启、直接构建、按规模验证、验证通过后归档。
|
|
46
35
|
|
|
@@ -56,34 +45,11 @@ Hotfix 是 Comet 五阶段能力的预设工作流,不是独立的平行流程
|
|
|
56
45
|
- `tasks.md` — 修复任务清单
|
|
57
46
|
- **无需 delta spec**(除非修复改变了已有 spec 的验收场景)
|
|
58
47
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
```yaml
|
|
62
|
-
workflow: hotfix
|
|
63
|
-
phase: build
|
|
64
|
-
design_doc: null
|
|
65
|
-
plan: null
|
|
66
|
-
build_mode: direct
|
|
67
|
-
isolation: branch
|
|
68
|
-
verify_mode: light
|
|
69
|
-
verify_result: pending
|
|
70
|
-
verified_at: null
|
|
71
|
-
archived: false
|
|
72
|
-
```
|
|
48
|
+
初始化 Comet 状态文件:
|
|
73
49
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
确认 phase 行的值为 "build"
|
|
78
|
-
确认 design_doc 行的值为 "null"
|
|
79
|
-
确认 plan 行的值为 "null"
|
|
80
|
-
确认 build_mode 行的值为 "direct"
|
|
81
|
-
确认 isolation 行的值为 "branch"
|
|
82
|
-
确认 verify_mode 行的值为 "light"
|
|
83
|
-
确认 verify_result 行的值为 "pending"
|
|
84
|
-
确认 verified_at 行的值为 "null"
|
|
85
|
-
确认 archived 行的值为 "false"
|
|
86
|
-
如任一字段不匹配,重试写入后再次验证。最多重试 2 次,仍失败则报告错误并终止。
|
|
50
|
+
```bash
|
|
51
|
+
bash "$COMET_STATE" init <name> hotfix
|
|
52
|
+
```
|
|
87
53
|
|
|
88
54
|
### 2. 直接构建(preset build)
|
|
89
55
|
|