@rpamis/comet 0.2.9 → 0.3.1
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 +15 -1
- package/assets/manifest.json +2 -1
- package/assets/skills/comet/SKILL.md +47 -33
- package/assets/skills/comet/reference/dirty-worktree.md +58 -0
- package/assets/skills/comet/scripts/comet-state.sh +23 -7
- package/assets/skills/comet/scripts/comet-yaml-validate.sh +1 -1
- package/assets/skills/comet-archive/SKILL.md +2 -2
- package/assets/skills/comet-build/SKILL.md +31 -40
- package/assets/skills/comet-design/SKILL.md +88 -20
- package/assets/skills/comet-hotfix/SKILL.md +42 -21
- package/assets/skills/comet-open/SKILL.md +34 -30
- package/assets/skills/comet-tweak/SKILL.md +36 -17
- package/assets/skills/comet-verify/SKILL.md +88 -43
- package/assets/skills-zh/comet/SKILL.md +17 -9
- package/assets/skills-zh/comet/reference/dirty-worktree.md +58 -0
- package/assets/skills-zh/comet-build/SKILL.md +30 -39
- package/assets/skills-zh/comet-design/SKILL.md +23 -5
- package/assets/skills-zh/comet-hotfix/SKILL.md +32 -17
- package/assets/skills-zh/comet-open/SKILL.md +3 -1
- package/assets/skills-zh/comet-tweak/SKILL.md +17 -4
- package/assets/skills-zh/comet-verify/SKILL.md +48 -18
- package/dist/commands/update.js +1 -1
- package/dist/commands/update.js.map +1 -1
- package/dist/core/superpowers.d.ts.map +1 -1
- package/dist/core/superpowers.js +17 -1
- package/dist/core/superpowers.js.map +1 -1
- package/package.json +1 -1
|
@@ -20,58 +20,126 @@ Execute entry verification:
|
|
|
20
20
|
COMET_SEARCH_ROOTS=("." "$HOME/.claude/skills" "$HOME/.codex/skills" "$HOME/.cursor/skills")
|
|
21
21
|
COMET_STATE="${COMET_STATE:-$(find "${COMET_SEARCH_ROOTS[@]}" -path '*/comet/scripts/comet-state.sh' -type f -print -quit 2>/dev/null)}"
|
|
22
22
|
COMET_GUARD="${COMET_GUARD:-$(find "${COMET_SEARCH_ROOTS[@]}" -path '*/comet/scripts/comet-guard.sh' -type f -print -quit 2>/dev/null)}"
|
|
23
|
+
COMET_HANDOFF="${COMET_HANDOFF:-$(find "${COMET_SEARCH_ROOTS[@]}" -path '*/comet/scripts/comet-handoff.sh' -type f -print -quit 2>/dev/null)}"
|
|
23
24
|
bash "$COMET_STATE" check <name> design
|
|
24
25
|
```
|
|
25
26
|
|
|
26
27
|
Proceed to Step 1 after verification passes. The script outputs specific failure reasons when verification fails.
|
|
27
28
|
|
|
28
|
-
### 1a.
|
|
29
|
+
### 1a. Generate OpenSpec → Superpowers Handoff Package
|
|
29
30
|
|
|
30
|
-
|
|
31
|
-
- **Proposal summary**: goals, motivation, scope
|
|
32
|
-
- **Design summary**: architectural decisions, high-level design
|
|
31
|
+
**Must be generated by script. Agent writing summaries on the fly is not allowed.**
|
|
33
32
|
|
|
34
|
-
|
|
33
|
+
```bash
|
|
34
|
+
bash "$COMET_HANDOFF" <change-name> design --write
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
The script generates and records:
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
openspec/changes/<name>/.comet/handoff/design-context.json
|
|
41
|
+
openspec/changes/<name>/.comet/handoff/design-context.md
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
And writes to `.comet.yaml`:
|
|
35
45
|
|
|
36
|
-
|
|
46
|
+
```yaml
|
|
47
|
+
handoff_context: openspec/changes/<name>/.comet/handoff/design-context.json
|
|
48
|
+
handoff_hash: <sha256>
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
The default handoff package is a **compact traceable excerpt**, not an agent summary:
|
|
52
|
+
- `design-context.json`: machine index containing change, phase, canonical spec, source paths, hash
|
|
53
|
+
- `design-context.md`: context for Superpowers to read, containing script markers, source path, line range, sha256, deterministic excerpts
|
|
54
|
+
- When exceeding excerpt budget, marks `[TRUNCATED]` and retains Full source path
|
|
55
|
+
|
|
56
|
+
If full context is genuinely needed, explicitly run:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
bash "$COMET_HANDOFF" <change-name> design --write --full
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Handoff package sources come from OpenSpec open phase artifacts:
|
|
63
|
+
- `proposal.md`: goals, motivation, scope, non-goals
|
|
64
|
+
- `design.md`: high-level architecture decisions, approach constraints
|
|
65
|
+
- `tasks.md`: initial task boundaries
|
|
66
|
+
- `specs/*/spec.md`: delta capability specs
|
|
67
|
+
|
|
68
|
+
### 1b. Execute Brainstorming (with Context)
|
|
69
|
+
|
|
70
|
+
**Immediately execute:** Use the Skill tool to load the `superpowers:brainstorming` skill, ARGUMENTS containing:
|
|
37
71
|
|
|
38
72
|
```
|
|
39
73
|
Change: <change-name>
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
74
|
+
OpenSpec Context Pack: openspec/changes/<name>/.comet/handoff/design-context.md
|
|
75
|
+
Machine handoff: openspec/changes/<name>/.comet/handoff/design-context.json
|
|
76
|
+
|
|
77
|
+
OpenSpec artifacts are the upstream source of truth. Do not redefine requirements, do not rewrite proposal/spec.
|
|
78
|
+
Your task is to perform deep technical design based on the handoff package: implementation approach, technical risks, testing strategy, boundary conditions.
|
|
79
|
+
If you find OpenSpec delta spec missing acceptance scenarios, you may only propose Spec Patches and write them back to OpenSpec delta spec; do not create a second requirements spec in the Design Doc.
|
|
80
|
+
|
|
81
|
+
Design Doc frontmatter must be minimal, containing only:
|
|
82
|
+
---
|
|
83
|
+
comet_change: <change-name>
|
|
84
|
+
role: technical-design
|
|
85
|
+
canonical_spec: openspec
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
Skip redundant context exploration, proceed directly to design questions.
|
|
43
89
|
```
|
|
44
90
|
|
|
45
|
-
Skipping this step is prohibited
|
|
91
|
+
Skipping this step is prohibited. Proceeding without loading this skill is prohibited.
|
|
46
92
|
|
|
47
93
|
If `superpowers:brainstorming` is unavailable, stop the process and prompt to install or enable Superpowers skills. Do not substitute this step with normal conversation.
|
|
48
94
|
|
|
49
|
-
After the skill loads, follow its guidance to produce:
|
|
50
|
-
-
|
|
51
|
-
-
|
|
95
|
+
After the skill loads, follow its guidance to produce design proposals (presented as conversation):
|
|
96
|
+
- Technical approach: architecture, data flow, key technology choices and risks
|
|
97
|
+
- Testing strategy
|
|
98
|
+
- If acceptance scenarios need supplementing, indicate delta spec changes to be written back
|
|
99
|
+
|
|
100
|
+
The brainstorming phase does not write to the Design Doc file; it only produces design proposals for Step 1c user confirmation. Only after confirmation should `docs/superpowers/specs/YYYY-MM-DD-<topic>-design.md` be created and delta spec written back.
|
|
101
|
+
|
|
102
|
+
### 1c. User Confirms Design Proposal (Blocking Point)
|
|
103
|
+
|
|
104
|
+
After brainstorming produces a design proposal, **must pause and wait for the user to explicitly confirm the design proposal**. Must not create the final Design Doc, write `design_doc`, run design guard, or enter `/comet-build` before user confirmation.
|
|
105
|
+
|
|
106
|
+
When pausing, only present essential summary:
|
|
107
|
+
- Technical approach adopted
|
|
108
|
+
- Key trade-offs and risks
|
|
109
|
+
- Testing strategy
|
|
110
|
+
- If there are Spec Patches, list the delta spec changes to be written back
|
|
111
|
+
|
|
112
|
+
Only after the user explicitly confirms, proceed to Step 2. If the user requests adjustments, continue brainstorming iteration until the user confirms.
|
|
52
113
|
|
|
53
114
|
### 2. Update Comet State
|
|
54
115
|
|
|
55
|
-
|
|
116
|
+
First record the design_doc path. If Step 1c wrote back delta spec (added or modified `specs/*/spec.md`), must regenerate handoff to update hash:
|
|
56
117
|
|
|
57
118
|
```bash
|
|
58
119
|
# Record design_doc path
|
|
59
120
|
bash "$COMET_STATE" set <name> design_doc docs/superpowers/specs/YYYY-MM-DD-topic-design.md
|
|
60
121
|
|
|
122
|
+
# If delta spec changes exist, regenerate handoff (update hash)
|
|
123
|
+
bash "$COMET_HANDOFF" <change-name> design --write
|
|
124
|
+
|
|
61
125
|
# Auto-transition to next phase
|
|
62
126
|
bash "$COMET_GUARD" <change-name> design --apply
|
|
63
127
|
```
|
|
64
128
|
|
|
65
|
-
|
|
129
|
+
If there are no delta spec changes, skip the handoff regeneration step. The state file updates automatically; no manual editing of other fields needed.
|
|
66
130
|
|
|
67
131
|
## Exit Conditions
|
|
68
132
|
|
|
69
|
-
- Design Doc
|
|
70
|
-
-
|
|
133
|
+
- Design Doc created and saved
|
|
134
|
+
- Design Doc frontmatter contains `comet_change`, `role: technical-design`, `canonical_spec: openspec`
|
|
135
|
+
- `handoff_context` and `handoff_hash` written to `.comet.yaml` (enforced by guard)
|
|
136
|
+
- `handoff_hash` matches current OpenSpec open phase artifacts (enforced by guard)
|
|
137
|
+
- `design-context.md` must be script-generated and contain source path, mode, sha256 traceability markers (enforced by guard)
|
|
138
|
+
- If new capabilities or supplementary acceptance scenarios exist, OpenSpec delta spec has been created/updated
|
|
71
139
|
- `design_doc` written to `.comet.yaml`
|
|
72
|
-
- **Phase guard**: Run `bash "$COMET_GUARD" <change-name> design --apply`; after all PASS,
|
|
140
|
+
- **Phase guard**: Run `bash "$COMET_GUARD" <change-name> design --apply`; after all PASS, auto-transitions to `phase: build`
|
|
73
141
|
|
|
74
|
-
|
|
142
|
+
Must use `--apply` before exit:
|
|
75
143
|
|
|
76
144
|
```bash
|
|
77
145
|
bash "$COMET_GUARD" <change-name> design --apply
|
|
@@ -81,4 +149,4 @@ bash "$COMET_GUARD" <change-name> design --apply
|
|
|
81
149
|
|
|
82
150
|
After exit conditions are met, **proceed immediately to the next phase without waiting for user input**:
|
|
83
151
|
|
|
84
|
-
> **REQUIRED NEXT SKILL:** Invoke `comet-build` skill to enter the
|
|
152
|
+
> **REQUIRED NEXT SKILL:** Invoke `comet-build` skill to enter the plan and build phase.
|
|
@@ -16,9 +16,9 @@ Quick bug fix workflow: open → build → verify → archive. Skip brainstormin
|
|
|
16
16
|
|
|
17
17
|
---
|
|
18
18
|
|
|
19
|
-
## Process (preset workflow,
|
|
19
|
+
## Process (preset workflow, 5 steps)
|
|
20
20
|
|
|
21
|
-
Execution chain: open → build → verify → archive. Hotfix provides default decisions for each phase: streamlined open, direct build, scale-based verification, archive after verification passes.
|
|
21
|
+
Execution chain: open → build → root cause check → verify → archive. Hotfix provides default decisions for each phase: streamlined open, direct build, root cause confirmation, scale-based verification, archive after verification passes.
|
|
22
22
|
|
|
23
23
|
Locate Comet scripts before starting:
|
|
24
24
|
|
|
@@ -47,6 +47,12 @@ Initialize Comet state file:
|
|
|
47
47
|
bash "$COMET_STATE" init <name> hotfix
|
|
48
48
|
```
|
|
49
49
|
|
|
50
|
+
Verify initialized state:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
bash "$COMET_STATE" check <name> open
|
|
54
|
+
```
|
|
55
|
+
|
|
50
56
|
Run phase guard to transition open → build:
|
|
51
57
|
|
|
52
58
|
```bash
|
|
@@ -57,6 +63,8 @@ bash "$COMET_GUARD" <change-name> open --apply
|
|
|
57
63
|
|
|
58
64
|
Use hotfix defaults: `build_mode: direct`. Skip `superpowers:brainstorming` and `superpowers:writing-plans` (unless tasks > 3; if exceeds 3 tasks, transfer to `/comet-build`'s plan and execution method selection).
|
|
59
65
|
|
|
66
|
+
Before continuing or starting changes, handle uncommitted changes through `comet/reference/dirty-worktree.md`. If attribution shows the fix scope exceeds hotfix, handle it through this file's "Upgrade Conditions".
|
|
67
|
+
|
|
60
68
|
**Immediately execute:** Execute tasks one by one according to tasks.md:
|
|
61
69
|
|
|
62
70
|
1. Read `openspec/changes/<name>/tasks.md`, get incomplete task list
|
|
@@ -67,33 +75,34 @@ Use hotfix defaults: `build_mode: direct`. Skip `superpowers:brainstorming` and
|
|
|
67
75
|
- Check corresponding `- [ ]` to `- [x]` in tasks.md
|
|
68
76
|
- Commit code, commit message format: `fix: <brief fix description>`
|
|
69
77
|
3. After all tasks complete, explicitly run relevant project tests and build commands
|
|
70
|
-
4. Run phase guard to transition build → verify:
|
|
71
|
-
|
|
72
|
-
```bash
|
|
73
|
-
bash "$COMET_GUARD" <change-name> build --apply
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
State automatically updates to `phase: verify`, `verify_result: pending`, then enter verification.
|
|
77
78
|
|
|
78
79
|
**If fix affects existing spec acceptance scenarios**:
|
|
79
80
|
- Create delta spec in `openspec/changes/<name>/specs/<capability>/spec.md`
|
|
80
81
|
- Only include `## MODIFIED Requirements` section
|
|
81
82
|
|
|
82
|
-
###
|
|
83
|
+
### 3. Root Cause Elimination Check
|
|
83
84
|
|
|
84
|
-
**Execute before
|
|
85
|
+
**Execute before running build guard**, ensuring the fix actually eliminates the root cause:
|
|
85
86
|
|
|
86
87
|
1. Read bug description and root cause in proposal.md
|
|
87
88
|
2. Search and verify problem code no longer exists
|
|
88
|
-
3. If root cause not eliminated, return to Step 2 to continue fix
|
|
89
|
+
3. If root cause not eliminated, return to Step 2 to continue fix (still in build phase, no state transition needed)
|
|
89
90
|
|
|
90
91
|
**Upgrade conditions**:
|
|
91
|
-
- Root cause check reveals deep architecture issues → Stop hotfix,
|
|
92
|
-
- Fix requires additional interface changes → Stop hotfix,
|
|
92
|
+
- Root cause check reveals deep architecture issues → Stop hotfix, handle per "Upgrade Conditions" section
|
|
93
|
+
- Fix requires additional interface changes → Stop hotfix, handle per "Upgrade Conditions" section
|
|
94
|
+
|
|
95
|
+
After root cause is confirmed eliminated, run phase guard to transition build → verify:
|
|
93
96
|
|
|
94
|
-
|
|
97
|
+
```bash
|
|
98
|
+
bash "$COMET_GUARD" <change-name> build --apply
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
State automatically updates to `phase: verify`, `verify_result: pending`, then enter verification.
|
|
102
|
+
|
|
103
|
+
### 4. Verification (preset verify)
|
|
95
104
|
|
|
96
|
-
|
|
105
|
+
Reuse `/comet-verify`, with comet-verify's scale assessment deciding lightweight or full verification.
|
|
97
106
|
|
|
98
107
|
**Immediately execute:** Use the Skill tool to load the `comet-verify` skill. Skipping this step is prohibited.
|
|
99
108
|
|
|
@@ -101,7 +110,7 @@ Small-scale hotfixes without delta spec usually meet lightweight verification co
|
|
|
101
110
|
|
|
102
111
|
After verification passes, record `.comet.yaml` `verify_result` as `pass` according to `/comet-verify` rules, must not skip this status before archiving.
|
|
103
112
|
|
|
104
|
-
###
|
|
113
|
+
### 5. Archive (preset archive)
|
|
105
114
|
|
|
106
115
|
Reuse `/comet-archive`. Must satisfy `verify_result: pass` in `.comet.yaml` before archiving.
|
|
107
116
|
|
|
@@ -113,11 +122,15 @@ If there is delta spec, sync to main spec according to comet-archive rules, and
|
|
|
113
122
|
## Continuous Execution Mode
|
|
114
123
|
|
|
115
124
|
<IMPORTANT>
|
|
116
|
-
Hotfix workflow is **one-time continuous execution**. After invoking `/comet-hotfix`, agent must automatically
|
|
125
|
+
Hotfix workflow is **one-time continuous execution**. After invoking `/comet-hotfix`, agent must automatically advance through hotfix steps, without pausing to wait for user input mid-way. But the following situations must pause and wait for user confirmation:
|
|
117
126
|
|
|
118
|
-
|
|
127
|
+
1. Encountering upgrade conditions (see "Upgrade Conditions" section)
|
|
128
|
+
2. When tasks exceed 3 and transfer to `/comet-build` for workspace isolation and execution method selection
|
|
129
|
+
3. Verification phase (comet-verify) verification failure decision and branch handling decision
|
|
119
130
|
|
|
120
|
-
|
|
131
|
+
Execution order: quick open → direct build → root cause check → verification → archive → complete
|
|
132
|
+
|
|
133
|
+
After each step completes, immediately enter next step. Within each phase, must still call corresponding Comet/OpenSpec/Superpowers skill according to above requirements; if the called skill has its own user decision points, follow that skill's rules.
|
|
121
134
|
</IMPORTANT>
|
|
122
135
|
|
|
123
136
|
---
|
|
@@ -134,7 +147,15 @@ Upgrade to full `/comet` when **any** of the following conditions are met:
|
|
|
134
147
|
| Introduces new public API | Fix creates new external interface |
|
|
135
148
|
| Fix scope exceeds single function/module | Requires coordinated changes |
|
|
136
149
|
|
|
137
|
-
|
|
150
|
+
When upgrade conditions are met, must pause and wait for user to explicitly confirm upgrade to full `/comet` workflow. Must not directly enter `/comet-design`, must not automatically supplement Design Doc.
|
|
151
|
+
|
|
152
|
+
After user confirms upgrade, **must first update the workflow field** before entering full flow:
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
bash "$COMET_STATE" set <name> workflow full
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
Then on current change basis, supplement Design Doc: **immediately use Skill tool to load `comet-design` skill**, proceed normally with full workflow. If user does not confirm upgrade, stop hotfix and report that current change has exceeded hotfix scope.
|
|
138
159
|
|
|
139
160
|
---
|
|
140
161
|
|
|
@@ -1,40 +1,25 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: comet-open
|
|
3
|
-
description: "Comet Phase 1: Open. Invoke with /comet-open. Explore ideas through OpenSpec
|
|
3
|
+
description: "Comet Phase 1: Open. Invoke with /comet-open. Explore ideas through OpenSpec, create change structure (proposal + design + tasks)."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Comet Phase 1: Open
|
|
7
7
|
|
|
8
8
|
## Prerequisites
|
|
9
9
|
|
|
10
|
-
- No active change, or user
|
|
10
|
+
- No active change, or user wants to create a new change
|
|
11
11
|
|
|
12
12
|
## Steps
|
|
13
13
|
|
|
14
|
-
###
|
|
15
|
-
|
|
16
|
-
Locate scripts before creating state:
|
|
17
|
-
|
|
18
|
-
```bash
|
|
19
|
-
COMET_SEARCH_ROOTS=("." "$HOME/.claude/skills" "$HOME/.codex/skills" "$HOME/.cursor/skills")
|
|
20
|
-
COMET_STATE="${COMET_STATE:-$(find "${COMET_SEARCH_ROOTS[@]}" -path '*/comet/scripts/comet-state.sh' -type f -print -quit 2>/dev/null)}"
|
|
21
|
-
COMET_GUARD="${COMET_GUARD:-$(find "${COMET_SEARCH_ROOTS[@]}" -path '*/comet/scripts/comet-guard.sh' -type f -print -quit 2>/dev/null)}"
|
|
22
|
-
|
|
23
|
-
if [ -z "$COMET_STATE" ] || [ -z "$COMET_GUARD" ]; then
|
|
24
|
-
echo "ERROR: Comet scripts not found. Ensure the comet skill is installed." >&2
|
|
25
|
-
return 1
|
|
26
|
-
fi
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
### 1. Explore Idea
|
|
14
|
+
### 1. Explore Ideas
|
|
30
15
|
|
|
31
16
|
**Immediately execute:** Use the Skill tool to load the `openspec-explore` skill. Skipping this step is prohibited.
|
|
32
17
|
|
|
33
18
|
After the skill loads, freely explore the problem space following its guidance.
|
|
34
19
|
|
|
35
|
-
### 2. Create Change Structure
|
|
20
|
+
### 2. Create Change Structure + Initialize State
|
|
36
21
|
|
|
37
|
-
**Immediately execute:** Use the Skill tool to load the `openspec-new-change` skill. If user intent is unclear and needs
|
|
22
|
+
**Immediately execute:** Use the Skill tool to load the `openspec-new-change` skill. If the user's intent is unclear and needs proposal formation first, load `openspec-propose` instead. Skipping this step is prohibited.
|
|
38
23
|
|
|
39
24
|
Confirm the following artifacts have been created:
|
|
40
25
|
|
|
@@ -43,40 +28,59 @@ openspec/changes/<name>/
|
|
|
43
28
|
├── .openspec.yaml
|
|
44
29
|
├── .comet.yaml
|
|
45
30
|
├── proposal.md # Why + What: problem, goals, scope
|
|
46
|
-
├── design.md # How (high-level):
|
|
31
|
+
├── design.md # How (high-level): architecture decisions, approach selection
|
|
47
32
|
└── tasks.md # Task checklist (checkboxes)
|
|
48
33
|
```
|
|
49
34
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
Initialize Comet state file:
|
|
35
|
+
Create `.comet.yaml` state file:
|
|
53
36
|
|
|
54
37
|
```bash
|
|
38
|
+
COMET_SEARCH_ROOTS=("." "$HOME/.claude/skills" "$HOME/.codex/skills" "$HOME/.cursor/skills")
|
|
39
|
+
COMET_STATE="${COMET_STATE:-$(find "${COMET_SEARCH_ROOTS[@]}" -path '*/comet/scripts/comet-state.sh' -type f -print -quit 2>/dev/null)}"
|
|
40
|
+
COMET_GUARD="${COMET_GUARD:-$(find "${COMET_SEARCH_ROOTS[@]}" -path '*/comet/scripts/comet-guard.sh' -type f -print -quit 2>/dev/null)}"
|
|
41
|
+
|
|
42
|
+
if [ -z "$COMET_STATE" ] || [ -z "$COMET_GUARD" ]; then
|
|
43
|
+
echo "ERROR: Comet scripts not found. Ensure the comet skill is installed." >&2
|
|
44
|
+
return 1
|
|
45
|
+
fi
|
|
46
|
+
|
|
55
47
|
bash "$COMET_STATE" init <name> full
|
|
56
48
|
```
|
|
57
49
|
|
|
50
|
+
### 3. Entry State Verification
|
|
51
|
+
|
|
52
|
+
Verify state machine has been correctly initialized:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
bash "$COMET_STATE" check <name> open
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Proceed to Step 4 after verification passes. The script outputs specific failure reasons when verification fails.
|
|
59
|
+
|
|
58
60
|
### 4. Content Completeness Check
|
|
59
61
|
|
|
60
62
|
Confirm the three documents have complete content:
|
|
61
63
|
- **proposal.md**: problem background, goals, scope, non-goals
|
|
62
|
-
- **design.md**: high-level
|
|
64
|
+
- **design.md**: high-level architecture decisions, approach selection, data flow
|
|
63
65
|
- **tasks.md**: task list, each task has a clear description
|
|
64
66
|
|
|
65
67
|
## Exit Conditions
|
|
66
68
|
|
|
67
|
-
- proposal.md, design.md,
|
|
68
|
-
- **Phase guard**: Run `bash "$COMET_GUARD" <change-name> open --apply`; after all PASS,
|
|
69
|
+
- proposal.md, design.md, tasks.md all created with complete content
|
|
70
|
+
- **Phase guard**: Run `bash "$COMET_GUARD" <change-name> open --apply`; after all PASS, auto-transitions to next phase
|
|
69
71
|
|
|
70
|
-
|
|
72
|
+
Must use `--apply` before exit, otherwise `.comet.yaml` remains at `phase: open` and the next phase entry check will fail.
|
|
71
73
|
|
|
72
74
|
```bash
|
|
73
75
|
bash "$COMET_GUARD" <change-name> open --apply
|
|
74
76
|
```
|
|
75
77
|
|
|
76
|
-
Full workflow
|
|
78
|
+
Full workflow auto-transitions to `phase: design`; hotfix/tweak presets auto-transition to `phase: build`.
|
|
77
79
|
|
|
78
80
|
## Automatic Transition
|
|
79
81
|
|
|
80
82
|
After exit conditions are met, **proceed immediately to the next phase without waiting for user input**:
|
|
81
83
|
|
|
82
|
-
> **REQUIRED NEXT SKILL:** Invoke `comet-design` skill to enter the deep design phase.
|
|
84
|
+
> **REQUIRED NEXT SKILL (full workflow):** Invoke `comet-design` skill to enter the deep design phase.
|
|
85
|
+
>
|
|
86
|
+
> Hotfix/tweak presets are controlled by their corresponding preset skill for subsequent transitions (phase goes directly to build), and do not go through this section.
|
|
@@ -5,17 +5,17 @@ description: "Comet preset path: Non-bug small changes (tweak). Skip brainstormi
|
|
|
5
5
|
|
|
6
6
|
# Comet Preset Path: Tweak
|
|
7
7
|
|
|
8
|
-
Tweak is a preset workflow of Comet's five-phase capabilities, not
|
|
8
|
+
Tweak is a preset workflow of Comet's five-phase capabilities, not an independent parallel process. It reuses open, build, verify, archive capabilities, only skipping brainstorming and full plan.
|
|
9
9
|
|
|
10
|
-
Applicable for
|
|
10
|
+
Applicable for non-bug small scope changes, such as copy adjustment, configuration adjustment, documentation or prompt local optimization.
|
|
11
11
|
|
|
12
12
|
**Applicable conditions** (all must be met):
|
|
13
13
|
1. No new capability
|
|
14
14
|
2. No architecture changes
|
|
15
|
-
3. No interface changes
|
|
16
|
-
4.
|
|
15
|
+
3. No interface changes
|
|
16
|
+
4. Typically no more than 3 tasks, 4 files
|
|
17
17
|
|
|
18
|
-
**Not applicable**: If change process discovers need for capability, architecture
|
|
18
|
+
**Not applicable**: If change process discovers need for capability, architecture or interface adjustments, should upgrade to full `/comet` workflow.
|
|
19
19
|
|
|
20
20
|
---
|
|
21
21
|
|
|
@@ -41,8 +41,8 @@ Reuse Comet open capability to create change, but use tweak defaults: do not exe
|
|
|
41
41
|
After the skill loads, follow its guidance to create streamlined artifacts:
|
|
42
42
|
- `proposal.md` — change motivation + goals + scope
|
|
43
43
|
- `design.md` — brief implementation description (no solution comparison needed)
|
|
44
|
-
- `tasks.md` —
|
|
45
|
-
- **No delta spec needed** (unless change
|
|
44
|
+
- `tasks.md` — no more than 3 tasks
|
|
45
|
+
- **No delta spec needed** (unless change modifies existing spec acceptance scenarios; once delta spec is needed, upgrade to full `/comet`)
|
|
46
46
|
|
|
47
47
|
Initialize Comet state file:
|
|
48
48
|
|
|
@@ -50,6 +50,12 @@ Initialize Comet state file:
|
|
|
50
50
|
bash "$COMET_STATE" init <name> tweak
|
|
51
51
|
```
|
|
52
52
|
|
|
53
|
+
Verify initialized state:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
bash "$COMET_STATE" check <name> open
|
|
57
|
+
```
|
|
58
|
+
|
|
53
59
|
Run phase guard to transition open → build:
|
|
54
60
|
|
|
55
61
|
```bash
|
|
@@ -60,11 +66,13 @@ bash "$COMET_GUARD" <change-name> open --apply
|
|
|
60
66
|
|
|
61
67
|
Use tweak defaults: `build_mode: direct`. Skip `superpowers:brainstorming` and `superpowers:writing-plans`.
|
|
62
68
|
|
|
69
|
+
Before continuing or starting changes, handle uncommitted changes through `comet/reference/dirty-worktree.md`. If attribution shows scope exceeds tweak, handle it through this file's "Upgrade Conditions".
|
|
70
|
+
|
|
63
71
|
**Immediately execute:** Execute tasks one by one according to tasks.md:
|
|
64
72
|
|
|
65
73
|
1. Read `openspec/changes/<name>/tasks.md`, get incomplete task list
|
|
66
74
|
2. For each incomplete task:
|
|
67
|
-
- Modify target
|
|
75
|
+
- Modify target files according to task description
|
|
68
76
|
- Run project formatter (e.g., `mvn spotless:apply`, `npm run format`)
|
|
69
77
|
- Run related tests to confirm pass
|
|
70
78
|
- Check corresponding `- [ ]` to `- [x]` in tasks.md
|
|
@@ -84,7 +92,7 @@ Reuse `/comet-verify`. Tweak must maintain lightweight verification conditions:
|
|
|
84
92
|
|
|
85
93
|
**Immediately execute:** Use the Skill tool to load the `comet-verify` skill. Skipping this step is prohibited.
|
|
86
94
|
|
|
87
|
-
If scale assessment enters full verification path, stop tweak, upgrade
|
|
95
|
+
If scale assessment enters full verification path, stop tweak, handle per upgrade conditions blocking confirmation.
|
|
88
96
|
|
|
89
97
|
After verification passes, record `.comet.yaml` `verify_result` as `pass` according to `/comet-verify` rules, must not skip this status before archiving.
|
|
90
98
|
|
|
@@ -99,11 +107,14 @@ Reuse `/comet-archive`. Must satisfy `verify_result: pass` in `.comet.yaml` befo
|
|
|
99
107
|
## Continuous Execution Mode
|
|
100
108
|
|
|
101
109
|
<IMPORTANT>
|
|
102
|
-
Tweak workflow is **one-time continuous execution**. After invoking `/comet-tweak`, agent must automatically
|
|
110
|
+
Tweak workflow is **one-time continuous execution**. After invoking `/comet-tweak`, agent must automatically advance through tweak steps, without pausing to wait for user input mid-way. But the following situations must pause and wait for user confirmation:
|
|
111
|
+
|
|
112
|
+
1. Encountering upgrade conditions (see "Upgrade Conditions" section)
|
|
113
|
+
2. Verification phase (comet-verify) verification failure decision and branch handling decision
|
|
103
114
|
|
|
104
115
|
Execution order: quick open → lightweight build → lightweight verification → archive → complete
|
|
105
116
|
|
|
106
|
-
After each phase completes, immediately enter next phase
|
|
117
|
+
After each phase completes, immediately enter next phase. Within each phase, must still call corresponding Comet/OpenSpec/Superpowers skill according to above requirements; if the called skill has its own user decision points, follow that skill's rules.
|
|
107
118
|
</IMPORTANT>
|
|
108
119
|
|
|
109
120
|
---
|
|
@@ -115,13 +126,21 @@ Upgrade to full `/comet` when **any** of the following conditions are met:
|
|
|
115
126
|
| Condition | Explanation |
|
|
116
127
|
|-----------|-------------|
|
|
117
128
|
| Change involves **5+ files** | Exceeds small change scope |
|
|
118
|
-
| Cross-module coordination required |
|
|
119
|
-
| **5+** new test cases needed | Change complexity
|
|
120
|
-
| Config item additions or deletions |
|
|
129
|
+
| Cross-module coordination required | Requires cross-component coordination |
|
|
130
|
+
| **5+** new test cases needed | Change complexity rising |
|
|
131
|
+
| Config item additions or deletions | Config changes beyond value modifications |
|
|
121
132
|
| New capability needed | Exceeds local optimization |
|
|
122
|
-
| Delta spec needed | Affects existing
|
|
133
|
+
| Delta spec needed | Affects existing specs |
|
|
134
|
+
|
|
135
|
+
When upgrade conditions are met, must pause and wait for user to explicitly confirm upgrade to full `/comet` workflow. Must not directly enter `/comet-design`, must not automatically supplement Design Doc.
|
|
136
|
+
|
|
137
|
+
After user confirms upgrade, **must first update the workflow field** before entering full flow:
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
bash "$COMET_STATE" set <name> workflow full
|
|
141
|
+
```
|
|
123
142
|
|
|
124
|
-
|
|
143
|
+
Then on current change basis, supplement Design Doc: **immediately use Skill tool to load `comet-design` skill**, proceed normally with full workflow. If user does not confirm upgrade, stop tweak and report that current change has exceeded tweak scope.
|
|
125
144
|
|
|
126
145
|
---
|
|
127
146
|
|
|
@@ -129,5 +148,5 @@ Upgrade method: On current change basis, supplement Design Doc (execute `/comet-
|
|
|
129
148
|
|
|
130
149
|
- Small change completed, tests pass
|
|
131
150
|
- Change archived
|
|
132
|
-
- No new capability, architecture adjustments
|
|
151
|
+
- No new capability, architecture adjustments or interface changes
|
|
133
152
|
- **Phase guard**: Before build → verify run `bash "$COMET_GUARD" <change-name> build --apply`; before verify → archive follow `/comet-verify` and run `bash "$COMET_GUARD" <change-name> verify --apply`
|