@rpamis/comet 0.3.7 → 0.3.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/LICENSE +21 -21
- package/README.md +559 -539
- package/assets/manifest.json +41 -34
- package/assets/skills/comet/SKILL.md +282 -329
- package/assets/skills/comet/reference/auto-transition.md +27 -0
- package/assets/skills/comet/reference/comet-yaml-fields.md +68 -0
- package/assets/skills/comet/reference/context-recovery.md +35 -0
- package/assets/skills/comet/reference/debug-gate.md +17 -0
- package/assets/skills/comet/reference/decision-point.md +20 -0
- package/assets/skills/comet/reference/file-structure.md +28 -0
- package/assets/skills/comet/reference/subagent-dispatch.md +113 -0
- package/assets/skills/comet/rules/comet-phase-guard.en.md +99 -0
- package/assets/skills/comet/rules/comet-phase-guard.md +99 -90
- package/assets/skills/comet/scripts/comet-state.sh +62 -0
- package/assets/skills/comet-archive/SKILL.md +100 -106
- package/assets/skills/comet-build/SKILL.md +304 -316
- package/assets/skills/comet-design/SKILL.md +263 -272
- package/assets/skills/comet-hotfix/SKILL.md +204 -211
- package/assets/skills/comet-open/SKILL.md +203 -186
- package/assets/skills/comet-tweak/SKILL.md +180 -179
- package/assets/skills/comet-verify/SKILL.md +234 -240
- package/assets/skills-zh/comet/SKILL.md +269 -332
- package/assets/skills-zh/comet/reference/auto-transition.md +27 -0
- package/assets/skills-zh/comet/reference/comet-yaml-fields.md +68 -0
- package/assets/skills-zh/comet/reference/context-recovery.md +35 -0
- package/assets/skills-zh/comet/reference/debug-gate.md +17 -0
- package/assets/skills-zh/comet/reference/decision-point.md +20 -0
- package/assets/skills-zh/comet/reference/file-structure.md +28 -0
- package/assets/skills-zh/comet/reference/subagent-dispatch.md +113 -0
- package/assets/skills-zh/comet-archive/SKILL.md +100 -106
- package/assets/skills-zh/comet-build/SKILL.md +304 -316
- package/assets/skills-zh/comet-design/SKILL.md +264 -273
- package/assets/skills-zh/comet-hotfix/SKILL.md +200 -207
- package/assets/skills-zh/comet-open/SKILL.md +203 -186
- package/assets/skills-zh/comet-tweak/SKILL.md +176 -175
- package/assets/skills-zh/comet-verify/SKILL.md +232 -238
- package/bin/comet.js +3 -3
- package/dist/cli/index.js +19 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +8 -8
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/uninstall.d.ts +9 -0
- package/dist/commands/uninstall.d.ts.map +1 -0
- package/dist/commands/uninstall.js +113 -0
- package/dist/commands/uninstall.js.map +1 -0
- package/dist/commands/update.d.ts +1 -1
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +65 -36
- package/dist/commands/update.js.map +1 -1
- package/dist/core/codegraph.d.ts +2 -7
- package/dist/core/codegraph.d.ts.map +1 -1
- package/dist/core/codegraph.js +4 -37
- package/dist/core/codegraph.js.map +1 -1
- package/dist/core/detect.d.ts +8 -1
- package/dist/core/detect.d.ts.map +1 -1
- package/dist/core/detect.js +41 -2
- package/dist/core/detect.js.map +1 -1
- package/dist/core/openspec.d.ts +1 -1
- package/dist/core/openspec.d.ts.map +1 -1
- package/dist/core/openspec.js +40 -17
- package/dist/core/openspec.js.map +1 -1
- package/dist/core/platforms.d.ts.map +1 -1
- package/dist/core/platforms.js +14 -1
- package/dist/core/platforms.js.map +1 -1
- package/dist/core/skills.d.ts +3 -1
- package/dist/core/skills.d.ts.map +1 -1
- package/dist/core/skills.js +142 -65
- package/dist/core/skills.js.map +1 -1
- package/dist/core/superpowers.d.ts.map +1 -1
- package/dist/core/superpowers.js +1 -0
- package/dist/core/superpowers.js.map +1 -1
- package/dist/core/uninstall.d.ts +28 -0
- package/dist/core/uninstall.d.ts.map +1 -0
- package/dist/core/uninstall.js +421 -0
- package/dist/core/uninstall.js.map +1 -0
- package/dist/core/version.d.ts +31 -0
- package/dist/core/version.d.ts.map +1 -0
- package/dist/core/version.js +111 -0
- package/dist/core/version.js.map +1 -0
- package/dist/utils/file-system.d.ts +23 -0
- package/dist/utils/file-system.d.ts.map +1 -1
- package/dist/utils/file-system.js +100 -5
- package/dist/utils/file-system.js.map +1 -1
- package/package.json +69 -64
- package/scripts/postinstall.js +44 -44
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
# check <change-name> <phase> — Verify entry requirements for a phase
|
|
11
11
|
# check <change-name> <phase> --recover — Output structured recovery context for compaction resume
|
|
12
12
|
# scale <change-name> — Assess and set verification mode based on metrics
|
|
13
|
+
# task-checkoff <file> <task-text> — Verify one unique task is checked
|
|
13
14
|
#
|
|
14
15
|
# Workflows: full, hotfix, tweak
|
|
15
16
|
# Phases for check: open, design, build, verify, archive
|
|
@@ -1024,6 +1025,59 @@ cmd_scale() {
|
|
|
1024
1025
|
green "[SCALE] verify_mode=$result"
|
|
1025
1026
|
}
|
|
1026
1027
|
|
|
1028
|
+
cmd_task_checkoff() {
|
|
1029
|
+
local task_file="$1"
|
|
1030
|
+
local task_text="$2"
|
|
1031
|
+
|
|
1032
|
+
validate_path_field "$task_file" "task file"
|
|
1033
|
+
|
|
1034
|
+
if [ -z "$task_text" ]; then
|
|
1035
|
+
red "ERROR: Task text cannot be empty" >&2
|
|
1036
|
+
exit 1
|
|
1037
|
+
fi
|
|
1038
|
+
|
|
1039
|
+
if [ ! -f "$task_file" ]; then
|
|
1040
|
+
red "ERROR: Task file not found: $task_file" >&2
|
|
1041
|
+
exit 1
|
|
1042
|
+
fi
|
|
1043
|
+
|
|
1044
|
+
local counts
|
|
1045
|
+
counts=$(TASK_TEXT="$task_text" awk '
|
|
1046
|
+
BEGIN {
|
|
1047
|
+
task = ENVIRON["TASK_TEXT"]
|
|
1048
|
+
}
|
|
1049
|
+
{
|
|
1050
|
+
sub(/\r$/, "")
|
|
1051
|
+
if ($0 == "- [ ] " task || $0 == "- [x] " task || $0 == "- [X] " task) {
|
|
1052
|
+
total++
|
|
1053
|
+
}
|
|
1054
|
+
if ($0 == "- [x] " task || $0 == "- [X] " task) {
|
|
1055
|
+
checked++
|
|
1056
|
+
}
|
|
1057
|
+
}
|
|
1058
|
+
END {
|
|
1059
|
+
printf "%d %d\n", total + 0, checked + 0
|
|
1060
|
+
}
|
|
1061
|
+
' "$task_file")
|
|
1062
|
+
|
|
1063
|
+
local total="${counts%% *}"
|
|
1064
|
+
local checked="${counts##* }"
|
|
1065
|
+
|
|
1066
|
+
if [ "$total" -ne 1 ]; then
|
|
1067
|
+
red "ERROR: task text must appear exactly once in $task_file (found $total): $task_text" >&2
|
|
1068
|
+
exit 1
|
|
1069
|
+
fi
|
|
1070
|
+
|
|
1071
|
+
if [ "$checked" -ne 1 ]; then
|
|
1072
|
+
red "ERROR: task is not checked in $task_file: $task_text" >&2
|
|
1073
|
+
exit 1
|
|
1074
|
+
fi
|
|
1075
|
+
|
|
1076
|
+
echo "TASK_CHECKOFF: PASS"
|
|
1077
|
+
echo "FILE: $task_file"
|
|
1078
|
+
echo "TASK: $task_text"
|
|
1079
|
+
}
|
|
1080
|
+
|
|
1027
1081
|
# Resolve the next workflow step after a guard --apply phase advance.
|
|
1028
1082
|
# Reads the (already advanced) phase, workflow, and auto_transition, then emits
|
|
1029
1083
|
# a deterministic next-step contract so skills don't hardcode the next skill name.
|
|
@@ -1155,6 +1209,13 @@ case "$SUBCOMMAND" in
|
|
|
1155
1209
|
fi
|
|
1156
1210
|
cmd_scale "$@"
|
|
1157
1211
|
;;
|
|
1212
|
+
task-checkoff)
|
|
1213
|
+
if [ $# -lt 2 ]; then
|
|
1214
|
+
red "Usage: comet-state.sh task-checkoff <file> <task-text>" >&2
|
|
1215
|
+
exit 1
|
|
1216
|
+
fi
|
|
1217
|
+
cmd_task_checkoff "$@"
|
|
1218
|
+
;;
|
|
1158
1219
|
next)
|
|
1159
1220
|
if [ $# -lt 1 ]; then
|
|
1160
1221
|
red "Usage: comet-state.sh next <change-name>" >&2
|
|
@@ -1174,6 +1235,7 @@ case "$SUBCOMMAND" in
|
|
|
1174
1235
|
echo " transition <change-name> <event> — Apply a validated state transition" >&2
|
|
1175
1236
|
echo " check <change-name> <phase> — Verify entry requirements for a phase" >&2
|
|
1176
1237
|
echo " scale <change-name> — Assess and set verification mode based on metrics" >&2
|
|
1238
|
+
echo " task-checkoff <file> <task-text> — Verify one unique task is checked" >&2
|
|
1177
1239
|
echo " next <change-name> — Resolve the next workflow step (auto/manual/done)" >&2
|
|
1178
1240
|
echo "" >&2
|
|
1179
1241
|
echo "Workflows: full, hotfix, tweak" >&2
|
|
@@ -1,106 +1,100 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: comet-archive
|
|
3
|
-
description: "Comet Phase 5: Archive. Invoke with /comet-archive. Merge delta specs into main specs with OpenSpec semantics, archive change."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Comet Phase 5: Archive (Archive)
|
|
7
|
-
|
|
8
|
-
## Prerequisites
|
|
9
|
-
|
|
10
|
-
- Verification passed (Phase 4 complete)
|
|
11
|
-
- Branch handled
|
|
12
|
-
- `verify_result: pass` in `openspec/changes/<name>/.comet.yaml`
|
|
13
|
-
|
|
14
|
-
## Steps
|
|
15
|
-
|
|
16
|
-
### 0. Output Language Constraint
|
|
17
|
-
|
|
18
|
-
Archive summaries and lifecycle closure notes must use the language of the user request that triggered this workflow.
|
|
19
|
-
|
|
20
|
-
### 0. Entry State Verification (Entry Check)
|
|
21
|
-
|
|
22
|
-
Execute entry verification:
|
|
23
|
-
|
|
24
|
-
```bash
|
|
25
|
-
COMET_ENV="${COMET_ENV:-$(find . "$HOME"/.*/skills "$HOME/.config" "$HOME/.gemini" -path '*/comet/scripts/comet-env.sh' -type f -print -quit 2>/dev/null)}"
|
|
26
|
-
if [ -z "$COMET_ENV" ]; then
|
|
27
|
-
echo "ERROR: comet-env.sh not found. Ensure the comet skill is installed." >&2
|
|
28
|
-
return 1
|
|
29
|
-
fi
|
|
30
|
-
. "$COMET_ENV"
|
|
31
|
-
"$COMET_BASH" "$COMET_STATE" check <name> archive
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
Proceed to Step 1 after verification passes. The script outputs specific failure reasons when verification fails.
|
|
35
|
-
|
|
36
|
-
### 1. Final Archive Confirmation (Blocking Point)
|
|
37
|
-
|
|
38
|
-
After entry verification passes, **must
|
|
39
|
-
|
|
40
|
-
Before confirmation, show the user a brief summary:
|
|
41
|
-
- Change name
|
|
42
|
-
- Verification report path and result
|
|
43
|
-
- Branch handling status
|
|
44
|
-
- Irreversible actions this archive will perform: merge main specs with OpenSpec delta semantics, annotate design doc / plan, and move the change to the archive directory
|
|
45
|
-
|
|
46
|
-
The user confirmation question must be presented as a single-select question with these options:
|
|
47
|
-
- "Confirm archive" — immediately run the archive script to complete spec merge and change movement
|
|
48
|
-
- "Needs adjustment or re-verification" — do not archive; run `"$COMET_BASH" "$COMET_STATE" transition <change-name> archive-reopen` to return to `phase: verify`, then invoke `/comet-verify`. If verification confirms fixes are needed, follow `/comet-verify`'s verification-failure decision flow back to `/comet-build`
|
|
49
|
-
- "Do not archive yet" — do not archive; keep the current `phase: archive` state and wait for the user to invoke `/comet-archive` again later
|
|
50
|
-
|
|
51
|
-
Only after the user selects "Confirm archive" may Step 2 continue. After the user selects "Needs adjustment or re-verification", must first run the `archive-reopen` state transition; do not edit `.comet.yaml` manually.
|
|
52
|
-
|
|
53
|
-
### 2. Execute Archive
|
|
54
|
-
|
|
55
|
-
Run the archive script to automatically complete all steps:
|
|
56
|
-
|
|
57
|
-
```bash
|
|
58
|
-
"$COMET_BASH" "$COMET_ARCHIVE" "<change-name>"
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
The script automatically executes:
|
|
62
|
-
1. Entry state validation (phase=archive, verify_result=pass, archived=false)
|
|
63
|
-
2. Design doc frontmatter annotation (archived-with, status)
|
|
64
|
-
3. Plan frontmatter annotation (archived-with)
|
|
65
|
-
4. OpenSpec archive for delta-merge semantics and moving the change to the archive directory
|
|
66
|
-
5. Main spec guard against leaked delta-only section headings
|
|
67
|
-
6. Update `archived: true` through `comet-state transition <archive-name> archived`
|
|
68
|
-
|
|
69
|
-
If script returns non-zero exit code, report error and stop.
|
|
70
|
-
If script returns zero exit code, archive is complete.
|
|
71
|
-
The summary `X/Y steps succeeded` counts real executed steps and does not double-count delta spec sync or document annotation.
|
|
72
|
-
|
|
73
|
-
The script calls OpenSpec archive to merge `ADDED/MODIFIED/REMOVED/RENAMED` delta semantics into main specs, then verifies main specs do not contain delta-only section headings.
|
|
74
|
-
|
|
75
|
-
Use `--dry-run` flag to preview without executing.
|
|
76
|
-
|
|
77
|
-
### 3. Lifecycle Closed Loop
|
|
78
|
-
|
|
79
|
-
Spec lifecycle completes here:
|
|
80
|
-
```
|
|
81
|
-
brainstorming → delta spec → implementation → verification → main spec merge → design doc annotation → archive
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
## Exit Conditions
|
|
85
|
-
|
|
86
|
-
- Archive script executed successfully (exit code 0)
|
|
87
|
-
- Archive directory `openspec/changes/archive/YYYY-MM-DD-<change-name>/` exists
|
|
88
|
-
- Archived `.comet.yaml` contains `archived: true`
|
|
89
|
-
|
|
90
|
-
The archive script moves `openspec/changes/<name>/` to `openspec/changes/archive/YYYY-MM-DD-<name>/`.
|
|
91
|
-
|
|
92
|
-
> **WARNING**: After successful archive, **do not run** `"$COMET_BASH" "$COMET_GUARD" <change-name> archive` against the old active change name; the active directory no longer exists. Doing so will cause the guard to error with "change directory not found". Archive completeness is determined by script exit code and archived directory state.
|
|
93
|
-
|
|
94
|
-
## Complete
|
|
95
|
-
|
|
96
|
-
Comet workflow complete. To start new work, invoke `/comet` or `/comet-open`.
|
|
97
|
-
|
|
98
|
-
## Context
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
```bash
|
|
103
|
-
"$COMET_BASH" "$COMET_STATE" check <change-name> archive --recover
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
The script outputs structured recovery context (archive status, completed steps). Follow the Recovery action to determine next steps. If `archived: true` and the archive directory exists, archiving is already complete — no need to run the archive operation again.
|
|
1
|
+
---
|
|
2
|
+
name: comet-archive
|
|
3
|
+
description: "Comet Phase 5: Archive. Invoke with /comet-archive. Merge delta specs into main specs with OpenSpec semantics, archive change."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Comet Phase 5: Archive (Archive)
|
|
7
|
+
|
|
8
|
+
## Prerequisites
|
|
9
|
+
|
|
10
|
+
- Verification passed (Phase 4 complete)
|
|
11
|
+
- Branch handled
|
|
12
|
+
- `verify_result: pass` in `openspec/changes/<name>/.comet.yaml`
|
|
13
|
+
|
|
14
|
+
## Steps
|
|
15
|
+
|
|
16
|
+
### 0. Output Language Constraint
|
|
17
|
+
|
|
18
|
+
Archive summaries and lifecycle closure notes must use the language of the user request that triggered this workflow.
|
|
19
|
+
|
|
20
|
+
### 0. Entry State Verification (Entry Check)
|
|
21
|
+
|
|
22
|
+
Execute entry verification:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
COMET_ENV="${COMET_ENV:-$(find . "$HOME"/.*/skills "$HOME/.config" "$HOME/.gemini" -path '*/comet/scripts/comet-env.sh' -type f -print -quit 2>/dev/null)}"
|
|
26
|
+
if [ -z "$COMET_ENV" ]; then
|
|
27
|
+
echo "ERROR: comet-env.sh not found. Ensure the comet skill is installed." >&2
|
|
28
|
+
return 1
|
|
29
|
+
fi
|
|
30
|
+
. "$COMET_ENV"
|
|
31
|
+
"$COMET_BASH" "$COMET_STATE" check <name> archive
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Proceed to Step 1 after verification passes. The script outputs specific failure reasons when verification fails.
|
|
35
|
+
|
|
36
|
+
### 1. Final Archive Confirmation (Blocking Point)
|
|
37
|
+
|
|
38
|
+
After entry verification passes, **must follow the `comet/reference/decision-point.md` protocol to pause and wait for the user to confirm whether to archive immediately**. Must not run `"$COMET_BASH" "$COMET_ARCHIVE" "<change-name>"` before user confirmation.
|
|
39
|
+
|
|
40
|
+
Before confirmation, show the user a brief summary:
|
|
41
|
+
- Change name
|
|
42
|
+
- Verification report path and result
|
|
43
|
+
- Branch handling status
|
|
44
|
+
- Irreversible actions this archive will perform: merge main specs with OpenSpec delta semantics, annotate design doc / plan, and move the change to the archive directory
|
|
45
|
+
|
|
46
|
+
The user confirmation question must be presented as a single-select question with these options:
|
|
47
|
+
- "Confirm archive" — immediately run the archive script to complete spec merge and change movement
|
|
48
|
+
- "Needs adjustment or re-verification" — do not archive; run `"$COMET_BASH" "$COMET_STATE" transition <change-name> archive-reopen` to return to `phase: verify`, then invoke `/comet-verify`. If verification confirms fixes are needed, follow `/comet-verify`'s verification-failure decision flow back to `/comet-build`
|
|
49
|
+
- "Do not archive yet" — do not archive; keep the current `phase: archive` state and wait for the user to invoke `/comet-archive` again later
|
|
50
|
+
|
|
51
|
+
Only after the user selects "Confirm archive" may Step 2 continue. After the user selects "Needs adjustment or re-verification", must first run the `archive-reopen` state transition; do not edit `.comet.yaml` manually.
|
|
52
|
+
|
|
53
|
+
### 2. Execute Archive
|
|
54
|
+
|
|
55
|
+
Run the archive script to automatically complete all steps:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
"$COMET_BASH" "$COMET_ARCHIVE" "<change-name>"
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
The script automatically executes:
|
|
62
|
+
1. Entry state validation (phase=archive, verify_result=pass, archived=false)
|
|
63
|
+
2. Design doc frontmatter annotation (archived-with, status)
|
|
64
|
+
3. Plan frontmatter annotation (archived-with)
|
|
65
|
+
4. OpenSpec archive for delta-merge semantics and moving the change to the archive directory
|
|
66
|
+
5. Main spec guard against leaked delta-only section headings
|
|
67
|
+
6. Update `archived: true` through `comet-state transition <archive-name> archived`
|
|
68
|
+
|
|
69
|
+
If script returns non-zero exit code, report error and stop.
|
|
70
|
+
If script returns zero exit code, archive is complete.
|
|
71
|
+
The summary `X/Y steps succeeded` counts real executed steps and does not double-count delta spec sync or document annotation.
|
|
72
|
+
|
|
73
|
+
The script calls OpenSpec archive to merge `ADDED/MODIFIED/REMOVED/RENAMED` delta semantics into main specs, then verifies main specs do not contain delta-only section headings.
|
|
74
|
+
|
|
75
|
+
Use `--dry-run` flag to preview without executing.
|
|
76
|
+
|
|
77
|
+
### 3. Lifecycle Closed Loop
|
|
78
|
+
|
|
79
|
+
Spec lifecycle completes here:
|
|
80
|
+
```
|
|
81
|
+
brainstorming → delta spec → implementation → verification → main spec merge → design doc annotation → archive
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Exit Conditions
|
|
85
|
+
|
|
86
|
+
- Archive script executed successfully (exit code 0)
|
|
87
|
+
- Archive directory `openspec/changes/archive/YYYY-MM-DD-<change-name>/` exists
|
|
88
|
+
- Archived `.comet.yaml` contains `archived: true`
|
|
89
|
+
|
|
90
|
+
The archive script moves `openspec/changes/<name>/` to `openspec/changes/archive/YYYY-MM-DD-<name>/`.
|
|
91
|
+
|
|
92
|
+
> **WARNING**: After successful archive, **do not run** `"$COMET_BASH" "$COMET_GUARD" <change-name> archive` against the old active change name; the active directory no longer exists. Doing so will cause the guard to error with "change directory not found". Archive completeness is determined by script exit code and archived directory state.
|
|
93
|
+
|
|
94
|
+
## Complete
|
|
95
|
+
|
|
96
|
+
Comet workflow complete. To start new work, invoke `/comet` or `/comet-open`.
|
|
97
|
+
|
|
98
|
+
## Context Compression Recovery
|
|
99
|
+
|
|
100
|
+
Follow `comet/reference/context-recovery.md` with phase set to `archive`. If `archived: true` and archive directory exists, archival is complete — do not re-execute archive operations.
|