@rpamis/comet 0.4.0-beta.4 → 0.4.0-beta.5
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 +5 -1
- package/assets/manifest.json +1 -1
- package/assets/skills/comet/SKILL.md +30 -28
- package/assets/skills/comet/reference/auto-transition.md +1 -1
- package/assets/skills/comet/reference/comet-yaml-fields.md +6 -4
- package/assets/skills/comet/reference/context-recovery.md +2 -2
- package/assets/skills/comet/reference/decision-point.md +11 -0
- package/assets/skills/comet/reference/subagent-dispatch.md +6 -5
- package/assets/skills/comet/rules/comet-phase-guard.en.md +23 -28
- package/assets/skills/comet/rules/comet-phase-guard.md +22 -28
- package/assets/skills/comet/scripts/comet-runtime.mjs +185 -56
- package/assets/skills/comet-any/SKILL.md +1 -1
- package/assets/skills/comet-any/reference/authored-zone-example.md +10 -5
- package/assets/skills/comet-any/reference/subagents/pause-points-author.md +14 -11
- package/assets/skills/comet-any/reference/subagents/skill-reviewer.md +2 -0
- package/assets/skills/comet-any/reference/subagents/workflow-entry-author.md +5 -4
- package/assets/skills/comet-archive/SKILL.md +34 -13
- package/assets/skills/comet-build/SKILL.md +23 -21
- package/assets/skills/comet-design/SKILL.md +23 -22
- package/assets/skills/comet-hotfix/SKILL.md +35 -34
- package/assets/skills/comet-open/SKILL.md +97 -58
- package/assets/skills/comet-tweak/SKILL.md +21 -18
- package/assets/skills/comet-verify/SKILL.md +35 -59
- package/assets/skills-zh/comet/SKILL.md +30 -28
- package/assets/skills-zh/comet/reference/auto-transition.md +1 -1
- package/assets/skills-zh/comet/reference/comet-yaml-fields.md +6 -4
- package/assets/skills-zh/comet/reference/context-recovery.md +2 -2
- package/assets/skills-zh/comet/reference/decision-point.md +11 -0
- package/assets/skills-zh/comet/reference/subagent-dispatch.md +6 -5
- package/assets/skills-zh/comet-any/SKILL.md +1 -1
- package/assets/skills-zh/comet-any/reference/authored-zone-example.md +10 -5
- package/assets/skills-zh/comet-any/reference/subagents/pause-points-author.md +14 -12
- package/assets/skills-zh/comet-any/reference/subagents/skill-reviewer.md +2 -0
- package/assets/skills-zh/comet-any/reference/subagents/workflow-entry-author.md +5 -4
- package/assets/skills-zh/comet-archive/SKILL.md +34 -13
- package/assets/skills-zh/comet-build/SKILL.md +23 -21
- package/assets/skills-zh/comet-design/SKILL.md +23 -22
- package/assets/skills-zh/comet-hotfix/SKILL.md +34 -33
- package/assets/skills-zh/comet-open/SKILL.md +96 -57
- package/assets/skills-zh/comet-tweak/SKILL.md +20 -17
- package/assets/skills-zh/comet-verify/SKILL.md +35 -59
- package/dist/app/commands/doctor.d.ts.map +1 -1
- package/dist/app/commands/doctor.js +62 -15
- package/dist/app/commands/doctor.js.map +1 -1
- package/dist/app/commands/init.d.ts +1 -1
- package/dist/app/commands/init.d.ts.map +1 -1
- package/dist/app/commands/init.js +58 -14
- package/dist/app/commands/init.js.map +1 -1
- package/dist/app/commands/uninstall.d.ts +3 -0
- package/dist/app/commands/uninstall.d.ts.map +1 -1
- package/dist/app/commands/uninstall.js +70 -36
- package/dist/app/commands/uninstall.js.map +1 -1
- package/dist/app/commands/update.d.ts.map +1 -1
- package/dist/app/commands/update.js +213 -34
- package/dist/app/commands/update.js.map +1 -1
- package/dist/domains/bundle/bundle-platform.d.ts +1 -0
- package/dist/domains/bundle/bundle-platform.d.ts.map +1 -1
- package/dist/domains/bundle/bundle-platform.js +6 -2
- package/dist/domains/bundle/bundle-platform.js.map +1 -1
- package/dist/domains/comet-classic/classic-guard.d.ts.map +1 -1
- package/dist/domains/comet-classic/classic-guard.js +15 -11
- package/dist/domains/comet-classic/classic-guard.js.map +1 -1
- package/dist/domains/comet-classic/classic-hook-guard.d.ts.map +1 -1
- package/dist/domains/comet-classic/classic-hook-guard.js +113 -19
- package/dist/domains/comet-classic/classic-hook-guard.js.map +1 -1
- package/dist/domains/comet-classic/classic-resolver.js +1 -1
- package/dist/domains/comet-classic/classic-resolver.js.map +1 -1
- package/dist/domains/comet-classic/classic-state-command.d.ts.map +1 -1
- package/dist/domains/comet-classic/classic-state-command.js +22 -13
- package/dist/domains/comet-classic/classic-state-command.js.map +1 -1
- package/dist/domains/comet-classic/classic-state.d.ts +3 -2
- package/dist/domains/comet-classic/classic-state.d.ts.map +1 -1
- package/dist/domains/comet-classic/classic-state.js +13 -1
- package/dist/domains/comet-classic/classic-state.js.map +1 -1
- package/dist/domains/comet-classic/classic-transitions.d.ts.map +1 -1
- package/dist/domains/comet-classic/classic-transitions.js +16 -2
- package/dist/domains/comet-classic/classic-transitions.js.map +1 -1
- package/dist/domains/comet-classic/classic-validate-command.d.ts.map +1 -1
- package/dist/domains/comet-classic/classic-validate-command.js +7 -1
- package/dist/domains/comet-classic/classic-validate-command.js.map +1 -1
- package/dist/domains/dashboard/web/assets/_commonjsHelpers-CqkleIqs.js +1 -0
- package/dist/domains/dashboard/web/assets/arc-TGVUG2WN.js +1 -0
- package/dist/domains/dashboard/web/assets/architectureDiagram-3BPJPVTR-ASHmiHoP.js +36 -0
- package/dist/domains/dashboard/web/assets/blockDiagram-GPEHLZMM-CwASxBKe.js +132 -0
- package/dist/domains/dashboard/web/assets/c4Diagram-AAUBKEIU-BU8z_WNk.js +10 -0
- package/dist/domains/dashboard/web/assets/channel-kp6Ng2JJ.js +1 -0
- package/dist/domains/dashboard/web/assets/chunk-2J33WTMH-CBGlUx4_.js +1 -0
- package/dist/domains/dashboard/web/assets/chunk-4BX2VUAB-CS-iGcFz.js +1 -0
- package/dist/domains/dashboard/web/assets/chunk-55IACEB6-BUtCVJat.js +1 -0
- package/dist/domains/dashboard/web/assets/chunk-727SXJPM-C94tj_pf.js +206 -0
- package/dist/domains/dashboard/web/assets/chunk-AQP2D5EJ-BFOKcpdG.js +231 -0
- package/dist/domains/dashboard/web/assets/chunk-FMBD7UC4-Dmx8B-st.js +15 -0
- package/dist/domains/dashboard/web/assets/chunk-ND2GUHAM-DYV00CNn.js +1 -0
- package/dist/domains/dashboard/web/assets/chunk-QZHKN3VN-DMJJyQnw.js +1 -0
- package/dist/domains/dashboard/web/assets/classDiagram-4FO5ZUOK-yBDjgMY_.js +1 -0
- package/dist/domains/dashboard/web/assets/classDiagram-v2-Q7XG4LA2-yBDjgMY_.js +1 -0
- package/dist/domains/dashboard/web/assets/cose-bilkent-S5V4N54A-P4nE2rea.js +1 -0
- package/dist/domains/dashboard/web/assets/cynefin-VYW2F7L2-C-R1HXDv.js +166 -0
- package/dist/domains/dashboard/web/assets/cytoscape.esm-D3_iZ_3b.js +321 -0
- package/dist/domains/dashboard/web/assets/dagre-BM42HDAG-BH8d-C9z.js +4 -0
- package/dist/domains/dashboard/web/assets/defaultLocale-DX6XiGOO.js +1 -0
- package/dist/domains/dashboard/web/assets/diagram-2AECGRRQ-DpXTgQIH.js +43 -0
- package/dist/domains/dashboard/web/assets/diagram-5GNKFQAL-DSiFJzSw.js +10 -0
- package/dist/domains/dashboard/web/assets/diagram-KO2AKTUF-DULMkben.js +3 -0
- package/dist/domains/dashboard/web/assets/diagram-LMA3HP47-Pi8m_NO9.js +24 -0
- package/dist/domains/dashboard/web/assets/diagram-OG6HWLK6-BSe6bCWm.js +24 -0
- package/dist/domains/dashboard/web/assets/erDiagram-TEJ5UH35-zb-FEcbq.js +85 -0
- package/dist/domains/dashboard/web/assets/flowDiagram-I6XJVG4X-Dr-Gk0z2.js +162 -0
- package/dist/domains/dashboard/web/assets/ganttDiagram-6RSMTGT7-qs6Zb2A6.js +292 -0
- package/dist/domains/dashboard/web/assets/gitGraphDiagram-PVQCEYII-BQ314orT.js +106 -0
- package/dist/domains/dashboard/web/assets/graph--OzhPTMs.js +1 -0
- package/dist/domains/dashboard/web/assets/index-BLAfkNTu.css +1 -0
- package/dist/domains/dashboard/web/assets/index-DlSYK56b.js +139 -0
- package/dist/domains/dashboard/web/assets/index-DtLUOcAW.js +24 -0
- package/dist/domains/dashboard/web/assets/index-QO0z6F4w.js +10 -0
- package/dist/domains/dashboard/web/assets/infoDiagram-5YYISTIA-O0bQp98A.js +2 -0
- package/dist/domains/dashboard/web/assets/init-Gi6I4Gst.js +1 -0
- package/dist/domains/dashboard/web/assets/ishikawaDiagram-YF4QCWOH-BPC7wbKh.js +70 -0
- package/dist/domains/dashboard/web/assets/journeyDiagram-JHISSGLW-ohViOd4b.js +139 -0
- package/dist/domains/dashboard/web/assets/kanban-definition-UN3LZRKU-CHleNdbG.js +89 -0
- package/dist/domains/dashboard/web/assets/katex-HP8lGamR.js +257 -0
- package/dist/domains/dashboard/web/assets/layout-SsrduOYp.js +1 -0
- package/dist/domains/dashboard/web/assets/linear-CyqiW--Q.js +1 -0
- package/dist/domains/dashboard/web/assets/marked.esm-DECB3bxB.js +64 -0
- package/dist/domains/dashboard/web/assets/mermaid.core-qS9XvtaK.js +301 -0
- package/dist/domains/dashboard/web/assets/mindmap-definition-RKZ34NQL-oaGkqO9l.js +96 -0
- package/dist/domains/dashboard/web/assets/ordinal-Cboi1Yqb.js +1 -0
- package/dist/domains/dashboard/web/assets/pieDiagram-4H26LBE5-CPcB-AFh.js +30 -0
- package/dist/domains/dashboard/web/assets/purify.es-VaSPOPhr.js +3 -0
- package/dist/domains/dashboard/web/assets/quadrantDiagram-W4KKPZXB-LFy52Qtj.js +7 -0
- package/dist/domains/dashboard/web/assets/requirementDiagram-4Y6WPE33-BdjeaYP_.js +84 -0
- package/dist/domains/dashboard/web/assets/sankeyDiagram-5OEKKPKP-DDJ4styL.js +40 -0
- package/dist/domains/dashboard/web/assets/sequenceDiagram-3UESZ5HK-BL5bFNoz.js +162 -0
- package/dist/domains/dashboard/web/assets/stateDiagram-AJRCARHV-BNUfikui.js +1 -0
- package/dist/domains/dashboard/web/assets/stateDiagram-v2-BHNVJYJU-DGrsmWts.js +1 -0
- package/dist/domains/dashboard/web/assets/timeline-definition-PNZ67QCA--ps2uu6L.js +120 -0
- package/dist/domains/dashboard/web/assets/vennDiagram-CIIHVFJN-C2q8q26c.js +34 -0
- package/dist/domains/dashboard/web/assets/wardleyDiagram-YWT4CUSO-BUH9gXqd.js +78 -0
- package/dist/domains/dashboard/web/assets/xychartDiagram-2RQKCTM6-B-DielEy.js +7 -0
- package/dist/domains/dashboard/web/index.html +16 -16
- package/dist/domains/factory/package.d.ts.map +1 -1
- package/dist/domains/factory/package.js +20 -6
- package/dist/domains/factory/package.js.map +1 -1
- package/dist/domains/integrations/openspec.d.ts +4 -1
- package/dist/domains/integrations/openspec.d.ts.map +1 -1
- package/dist/domains/integrations/openspec.js +56 -4
- package/dist/domains/integrations/openspec.js.map +1 -1
- package/dist/domains/skill/json-object.d.ts +13 -0
- package/dist/domains/skill/json-object.d.ts.map +1 -0
- package/dist/domains/skill/json-object.js +24 -0
- package/dist/domains/skill/json-object.js.map +1 -0
- package/dist/domains/skill/platform-inspect.d.ts +9 -0
- package/dist/domains/skill/platform-inspect.d.ts.map +1 -0
- package/dist/domains/skill/platform-inspect.js +149 -0
- package/dist/domains/skill/platform-inspect.js.map +1 -0
- package/dist/domains/skill/platform-install.d.ts +16 -6
- package/dist/domains/skill/platform-install.d.ts.map +1 -1
- package/dist/domains/skill/platform-install.js +277 -144
- package/dist/domains/skill/platform-install.js.map +1 -1
- package/dist/domains/skill/uninstall.d.ts.map +1 -1
- package/dist/domains/skill/uninstall.js +204 -141
- package/dist/domains/skill/uninstall.js.map +1 -1
- package/dist/platform/fs/file-system.d.ts +3 -3
- package/dist/platform/fs/file-system.d.ts.map +1 -1
- package/dist/platform/fs/file-system.js +21 -11
- package/dist/platform/fs/file-system.js.map +1 -1
- package/dist/platform/install/platforms.d.ts +4 -0
- package/dist/platform/install/platforms.d.ts.map +1 -1
- package/dist/platform/install/platforms.js +2 -0
- package/dist/platform/install/platforms.js.map +1 -1
- package/dist/platform/install/project-registry.d.ts +1 -0
- package/dist/platform/install/project-registry.d.ts.map +1 -1
- package/dist/platform/install/project-registry.js +9 -1
- package/dist/platform/install/project-registry.js.map +1 -1
- package/dist/platform/install/skill-root-owner.d.ts +15 -0
- package/dist/platform/install/skill-root-owner.d.ts.map +1 -0
- package/dist/platform/install/skill-root-owner.js +68 -0
- package/dist/platform/install/skill-root-owner.js.map +1 -0
- package/package.json +6 -1
- package/dist/domains/dashboard/web/assets/index-CIvN-PL8.js +0 -22
- package/dist/domains/dashboard/web/assets/index-DcyRPBnT.css +0 -1
- package/eval/.env +0 -28
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: comet-hotfix
|
|
3
|
-
description: "Use when
|
|
3
|
+
description: "Use only when explicitly invoked as /comet-hotfix or routed by the root Comet skill/runtime to the hotfix preset; fix an existing behavior bug, not an ordinary unmanaged bugfix."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Comet Preset Path: Hotfix
|
|
@@ -20,7 +20,7 @@ Quick bug fix workflow: open → build → verify → archive. Skip brainstormin
|
|
|
20
20
|
|
|
21
21
|
### 0. Output Language Constraint
|
|
22
22
|
|
|
23
|
-
Streamlined OpenSpec artifacts must use the configured Comet artifact language. Before `.comet.yaml` exists, read `language` from project `.comet/config.yaml`, then fall back to global `~/.comet/config.yaml`; after initialization, use `
|
|
23
|
+
Streamlined OpenSpec artifacts must use the configured Comet artifact language. Before `.comet.yaml` exists, read `language` from project `.comet/config.yaml`, then fall back to global `~/.comet/config.yaml`; after initialization, use `comet state get <name> language`.
|
|
24
24
|
|
|
25
25
|
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, and final archive confirmation after verification passes.
|
|
26
26
|
|
|
@@ -34,52 +34,54 @@ Reuse Comet open capability to create change, but use hotfix defaults: do not ex
|
|
|
34
34
|
|
|
35
35
|
**Immediately execute:** Use the Skill tool to load the `openspec-new-change` skill. Skipping this step is prohibited.
|
|
36
36
|
|
|
37
|
-
After the skill loads,
|
|
38
|
-
- `proposal.md` — problem description + root cause analysis + fix goal (no solution comparison needed)
|
|
39
|
-
- `design.md` — fix solution (one is enough, no multi-solution comparison needed)
|
|
40
|
-
- `tasks.md` — fix task list
|
|
41
|
-
- **No delta spec needed** (unless fix changes existing spec acceptance scenarios)
|
|
42
|
-
|
|
43
|
-
Initialize Comet state file:
|
|
37
|
+
After the skill loads, create the change skeleton first, then immediately initialize recoverable state and bind the current change:
|
|
44
38
|
|
|
45
39
|
```bash
|
|
46
|
-
|
|
40
|
+
comet state init <name> hotfix
|
|
41
|
+
comet state select <name>
|
|
42
|
+
comet state check <name> open
|
|
47
43
|
```
|
|
48
44
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
45
|
+
Hotfix defaults to `isolation: current`, truthfully indicating execution in the current workspace. Change it to `branch` or `worktree` only after that workspace is actually created/selected. Then create the streamlined artifacts:
|
|
46
|
+
- `proposal.md` — problem description + root cause analysis + fix goal (no solution comparison needed)
|
|
47
|
+
- `design.md` — fix solution (one is enough, no multi-solution comparison needed)
|
|
48
|
+
- `tasks.md` — fix task list
|
|
49
|
+
- **No delta spec needed** (unless fix changes existing spec acceptance scenarios)
|
|
54
50
|
|
|
55
51
|
Run phase guard to transition open → build:
|
|
56
52
|
|
|
57
53
|
```bash
|
|
58
|
-
|
|
54
|
+
comet guard <change-name> open --apply
|
|
59
55
|
```
|
|
60
56
|
|
|
61
57
|
Check `auto_transition` to decide whether to continue:
|
|
62
58
|
|
|
63
59
|
```bash
|
|
64
|
-
|
|
60
|
+
comet state next <name>
|
|
65
61
|
```
|
|
66
62
|
|
|
67
63
|
- `NEXT: auto` → continue to Step 2
|
|
68
|
-
- `NEXT: manual` →
|
|
64
|
+
- `NEXT: manual` → return control with `HINT` and end the current invocation; do not ask whether to continue
|
|
69
65
|
|
|
70
66
|
### 2. Direct Build (preset build)
|
|
71
67
|
|
|
72
|
-
Use hotfix defaults: `build_mode: direct`, `review_mode: off`
|
|
68
|
+
Use hotfix defaults: `build_mode: direct`, `tdd_mode: direct`, `review_mode: off`, and `isolation: current`. Here `direct` skips full planning/TDD orchestration; it never skips reproduction, regression coverage, or verification. Skip Superpowers `brainstorming` and `writing-plans`; **task count alone does not route to `/comet-build`**. Keep larger task lists ordered in the current hotfix and ask about upgrading only when a qualitative-change signal or scope tripwire is hit.
|
|
73
69
|
|
|
74
70
|
Before continuing or starting changes, handle uncommitted changes through `comet/reference/dirty-worktree.md`. If attribution shows a qualitative-change signal or file-count tripwire is hit, handle it through this file's "Upgrade Assessment".
|
|
75
71
|
|
|
76
|
-
|
|
72
|
+
Before implementation, **reproduce the bug and record failing evidence first**:
|
|
73
|
+
|
|
74
|
+
1. Confirm the reported old behavior with minimal repeatable steps and record the command, input, and actual result
|
|
75
|
+
2. When automatable, add and run a regression test that fails for this bug; confirm the failure is caused by the bug rather than the environment or test itself
|
|
76
|
+
3. If automation is temporarily impossible, record why plus repeatable manual failing evidence in the proposal/verification report; never edit code without evidence
|
|
77
|
+
|
|
78
|
+
After RED evidence exists, execute tasks one by one according to tasks.md:
|
|
77
79
|
|
|
78
80
|
1. Read `openspec/changes/<name>/tasks.md`, get incomplete task list
|
|
79
81
|
2. For each incomplete task:
|
|
80
82
|
- Modify code according to task description
|
|
81
83
|
- Run project formatter (e.g., `mvn spotless:apply`, `npm run format`)
|
|
82
|
-
-
|
|
84
|
+
- First rerun the new failing regression test and confirm it turns green, then run related tests
|
|
83
85
|
- Check corresponding `- [ ]` to `- [x]` in tasks.md
|
|
84
86
|
- Commit code, commit message format: `fix: <brief fix description>`
|
|
85
87
|
3. After all tasks complete, explicitly run relevant project tests and build commands
|
|
@@ -107,7 +109,7 @@ For specific investigation, minimal failing test, fix verification, and keeping
|
|
|
107
109
|
After root cause is confirmed eliminated, run phase guard to transition build → verify:
|
|
108
110
|
|
|
109
111
|
```bash
|
|
110
|
-
|
|
112
|
+
comet guard <change-name> build --apply
|
|
111
113
|
```
|
|
112
114
|
|
|
113
115
|
State automatically updates to `phase: verify`, `verify_result: pending`, then enter verification.
|
|
@@ -118,7 +120,7 @@ Reuse `/comet-verify`, with comet-verify's scale assessment deciding lightweight
|
|
|
118
120
|
|
|
119
121
|
**Immediately execute:** Use the Skill tool to load the `comet-verify` skill. Skipping this step is prohibited.
|
|
120
122
|
|
|
121
|
-
Small-scale hotfixes without delta spec usually meet lightweight verification conditions (≤ 3 tasks, changed files below the scale threshold), comet-verify's scale assessment will select the lightweight verification path (6 quick checks; default `review_mode: off` does not dispatch automatic code review). If the user wants to increase review, they can run `
|
|
123
|
+
Small-scale hotfixes without delta spec usually meet lightweight verification conditions (≤ 3 tasks, changed files below the scale threshold), comet-verify's scale assessment will select the lightweight verification path (6 quick checks; default `review_mode: off` does not dispatch automatic code review). If the user wants to increase review, they can run `comet state set <name> review_mode standard` or `thorough` before verification. If hotfix created delta spec, enter full verification path according to comet-verify's scale assessment rules.
|
|
122
124
|
|
|
123
125
|
After verification passes, record `.comet.yaml` `verify_result` as `pass` according to `/comet-verify` rules, must not skip this status before archiving. After verification passes, still enter `/comet-archive`'s final archive confirmation; do not automatically run the archive script.
|
|
124
126
|
|
|
@@ -136,14 +138,13 @@ If there is delta spec, sync to main spec according to comet-archive rules, and
|
|
|
136
138
|
<IMPORTANT>
|
|
137
139
|
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.
|
|
138
140
|
|
|
139
|
-
Exception: when `.comet.yaml` has `auto_transition: false`,
|
|
141
|
+
Exception: when `.comet.yaml` has `auto_transition: false`, end the current invocation at each phase boundary and return control with `HINT`; the user may run the next phase later. This is a manual handoff, not a new confirmation point.
|
|
140
142
|
|
|
141
|
-
The following
|
|
143
|
+
The following genuine user decisions still pause:
|
|
142
144
|
|
|
143
145
|
1. Encountering an upgrade-assessment signal (see "Upgrade Assessment" section). **Must use the current platform's available user input/confirmation mechanism to pause and wait for the user to explicitly choose**: continue the hotfix flow, or upgrade to the full `/comet` workflow
|
|
144
|
-
2.
|
|
145
|
-
3.
|
|
146
|
-
4. Final archive confirmation (before comet-archive runs the archive script)
|
|
146
|
+
2. Verify-phase acceptance of WARNING/SUGGESTION deviations, Spec drift handling, or strategy after the automatic repair limit; the first 3 clearly repairable failures close automatically
|
|
147
|
+
3. Final archive confirmation and the branch-handling decision after the archive commit
|
|
147
148
|
|
|
148
149
|
Execution order: quick open → direct build → root cause check → verification → archive → complete
|
|
149
150
|
|
|
@@ -154,7 +155,7 @@ After each step completes, immediately enter next step. Within each phase, must
|
|
|
154
155
|
|
|
155
156
|
## Upgrade Assessment
|
|
156
157
|
|
|
157
|
-
Hotfix upgrade assessment only decides whether to move from the preset workflow to full; file count never upgrades automatically, and `comet
|
|
158
|
+
Hotfix upgrade assessment only decides whether to move from the preset workflow to full; file count never upgrades automatically, and `comet state scale` only decides verification weight.
|
|
158
159
|
|
|
159
160
|
If `/comet` passes an intent frame from the entry, hotfix must recheck `risk_signal` and escalation signals only before build: new capability, public API, schema change, cross-module coordination, or deep architecture work. When any signal matches, enter the existing escalation decision point; do not reimplement entry intent recognition.
|
|
160
161
|
|
|
@@ -167,10 +168,10 @@ When a qualitative-change signal or file-count tripwire is hit, **must pause und
|
|
|
167
168
|
After the user chooses upgrade (option B), use the legal state-machine upgrade channel, a single command that converts the preset workflow to full and rolls back to design:
|
|
168
169
|
|
|
169
170
|
```bash
|
|
170
|
-
|
|
171
|
+
comet state transition <name> preset-escalate
|
|
171
172
|
```
|
|
172
173
|
|
|
173
|
-
This command atomically sets `workflow`/`classic_profile` to `full`, rolls `phase` back to `design`, and clears `
|
|
174
|
+
This command atomically sets `workflow`/`classic_profile` to `full`, rolls `phase` back to `design`, clears `design_doc`, and clears preset-only `build_mode`, `tdd_mode`, `review_mode`, `isolation`, and `verify_mode`. Then add the Design Doc on the current change: **immediately use the Skill tool to load the `comet-design` skill**. On entering build, run the full joint workflow-configuration decision again.
|
|
174
175
|
|
|
175
176
|
When the user chooses continue (option A), continue the hotfix workflow and record the user's reason for continuing.
|
|
176
177
|
|
|
@@ -181,16 +182,16 @@ When the user chooses continue (option A), continue the hotfix workflow and reco
|
|
|
181
182
|
- Bug fixed, tests pass
|
|
182
183
|
- Change archived
|
|
183
184
|
- If spec changes, synced to main spec
|
|
184
|
-
- **Phase guard**: Before build → verify run `
|
|
185
|
+
- **Phase guard**: Before build → verify run `comet guard <change-name> build --apply`; before verify → archive follow `/comet-verify` and run `comet guard <change-name> verify --apply`
|
|
185
186
|
|
|
186
187
|
## Automatic Handoff to Next Phase
|
|
187
188
|
|
|
188
189
|
Follow `comet/reference/auto-transition.md`. Key command:
|
|
189
190
|
|
|
190
191
|
```bash
|
|
191
|
-
|
|
192
|
+
comet state next <name>
|
|
192
193
|
```
|
|
193
194
|
|
|
194
195
|
- `NEXT: auto` → invoke the skill pointed to by `SKILL` to continue hotfix workflow (`phase: build` returns `comet-hotfix`, `verify` returns `comet-verify`, `archive` returns `comet-archive`)
|
|
195
|
-
- `NEXT: manual` → do not invoke the next skill;
|
|
196
|
+
- `NEXT: manual` → do not invoke the next skill; return control with `HINT`, end the invocation, and do not create another confirmation point
|
|
196
197
|
- `NEXT: done` → workflow is complete, no further action needed
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: comet-open
|
|
3
|
-
description: "Use when Comet
|
|
3
|
+
description: "Use only when explicitly invoked as /comet-open or routed by the root Comet skill/runtime to the open phase; create or recover an OpenSpec change and its proposal/design/tasks/.comet.yaml artifacts."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Comet Phase 1: Open
|
|
@@ -13,11 +13,15 @@ description: "Use when Comet needs to create a new OpenSpec change, or an active
|
|
|
13
13
|
|
|
14
14
|
### 0. Output Language Constraint
|
|
15
15
|
|
|
16
|
-
Every prompt and artifact request passed to OpenSpec must include the resolved Comet artifact language, using normalized ids such as `en` or `zh-CN`. Before `.comet.yaml` exists, read `language` from project `.comet/config.yaml`, then fall back to global `~/.comet/config.yaml`; after the change is initialized, use `
|
|
16
|
+
Every prompt and artifact request passed to OpenSpec must include the resolved Comet artifact language, using normalized ids such as `en` or `zh-CN`. Before `.comet.yaml` exists, read `language` from project `.comet/config.yaml`, then fall back to global `~/.comet/config.yaml`; after the change is initialized, use `comet state get <name> language`. If no configured language exists, fall back to the current user request language. The generated `proposal.md`, `design.md`, and `tasks.md` must use that language as their main language.
|
|
17
17
|
|
|
18
18
|
### 0a. Current Change Binding
|
|
19
19
|
|
|
20
|
-
When resuming an existing change,
|
|
20
|
+
When resuming an existing change, inspect `openspec/changes/<change-name>/.comet.yaml` first:
|
|
21
|
+
|
|
22
|
+
- If it exists and parses, select the change as the first state operation
|
|
23
|
+
- If it is missing but the change directory is valid, run `comet state init <change-name> full`, then select the change
|
|
24
|
+
- If it is malformed, stop and report the parse error; repair it manually from version control, a backup, or verifiable artifacts before continuing, and never overwrite a damaged file with `state set`
|
|
21
25
|
|
|
22
26
|
```bash
|
|
23
27
|
comet state select <change-name>
|
|
@@ -25,6 +29,16 @@ comet state select <change-name>
|
|
|
25
29
|
|
|
26
30
|
When creating a new change, initialize `.comet.yaml` first, then immediately run the same command; never fabricate a selection before state exists.
|
|
27
31
|
|
|
32
|
+
### 0b. OpenSpec Compatibility Check
|
|
33
|
+
|
|
34
|
+
Before any OpenSpec status or instructions command, run:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
openspec --version
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
This flow requires **OpenSpec >= 1.5.0**. Stop immediately if the version is older than 1.5.0, cannot be parsed, the command is unavailable, or it exits non-zero. Ask the user to run `npm install -g @fission-ai/openspec@latest` and retry. Never continue with an older CLI that lacks the `applyRequires`, `artifactPaths`, `changeRoot`, or `resolvedOutputPath` contracts.
|
|
41
|
+
|
|
28
42
|
### 1. Explore Ideas and Clarify Requirements
|
|
29
43
|
|
|
30
44
|
**Immediately execute:** Use the Skill tool to load the `openspec-explore` skill. Skipping this step is prohibited.
|
|
@@ -67,36 +81,44 @@ Every accepted split item must be created as an independent change through `/com
|
|
|
67
81
|
|
|
68
82
|
Must not create proposal.md, design.md, or tasks.md before the user completes the PRD split choice. If the user chooses to create multiple changes, the current `/comet-open` invocation only completes split confirmation and coordination, then enters `/comet-open` for each split item in the user-confirmed order.
|
|
69
83
|
|
|
84
|
+
Immediately after the user confirms multiple changes, persist the accepted split to `.comet/batches/<batch-id>.json`. Use a stable kebab-case `batch-id`. The file must record at least `version`, the original goal summary, creation time, the ordered change names, and each item's goals, scope, non-goals, acceptance scenarios, and `pending|open-complete|selected` status. Atomically update it after each item is created or completed. This is a batch orchestration manifest, not a replacement for each change's `.comet.yaml`.
|
|
85
|
+
|
|
70
86
|
In batch split mode, entering `/comet-open` for each split item must explicitly mark it as a "confirmed split item" and carry that split item's goals, scope, non-goals, and acceptance scenarios. Confirmed split items skip the PRD split preflight by default, unless the split item itself still clearly contains multiple independent capabilities.
|
|
71
87
|
|
|
72
|
-
In batch split mode, a single split item must not auto-advance to `/comet-design` after completing the open phase.
|
|
88
|
+
In batch split mode, a single split item must not auto-advance to `/comet-design` after completing the open phase.
|
|
73
89
|
|
|
74
|
-
|
|
90
|
+
**Batch completion hard check (must not be skipped)**: after every split item completes its own open phase, run the following for each `<name>` in the user-confirmed list:
|
|
75
91
|
|
|
76
|
-
|
|
92
|
+
```bash
|
|
93
|
+
openspec status --change "<name>" --json
|
|
94
|
+
comet state check <name> design
|
|
95
|
+
```
|
|
77
96
|
|
|
78
|
-
|
|
97
|
+
The OpenSpec JSON must satisfy all of these conditions:
|
|
98
|
+
- Resolved `changeRoot` must equal repository-local `openspec/changes/<name>`; stop if it does not, because Classic runtime does not support an external change root
|
|
99
|
+
- The schema must include core artifact ids `proposal`, `design`, and `tasks`; extra artifacts are allowed, but a missing core id is an incompatible schema
|
|
100
|
+
- Every artifact listed in `applyRequires` must be `done` in `artifacts`
|
|
101
|
+
- Concrete outputs in `artifactPaths.<artifact-id>.existingOutputPaths` (or `resolvedOutputPath` from instructions) must exist and be non-empty
|
|
102
|
+
- Treat `isComplete` as diagnostic only; it neither replaces the `applyRequires` implementation-readiness check nor lets optional artifacts block phase advancement
|
|
79
103
|
|
|
80
|
-
|
|
104
|
+
If any split item fails these checks, must not report splitting complete or ask which change to start. Stop and resume `/comet-open` from that change's first `ready` or `blocked` artifact. If OpenSpec passes but Comet state fails, repair `.comet.yaml` initialization or phase, then rerun the checks for the entire batch.
|
|
81
105
|
|
|
82
|
-
|
|
106
|
+
Only after every split item passes both CLI checks may you pause and ask which change to start. Mark the chosen item `selected` in the batch manifest, then advance only that change into `/comet-design`; other changes remain active and can be resumed later through `/comet`.
|
|
83
107
|
|
|
84
|
-
|
|
108
|
+
On resume, read `.comet/batches/<batch-id>.json` first, then run the CLI checks above for already-created active changes. Do not recreate items that fully pass; resume incomplete items from the first `ready` artifact returned by OpenSpec. Create missing items from the persisted manifest. If the manifest is missing or damaged, stop and ask the user to rebuild/confirm it instead of inferring the original batch boundary from directory names.
|
|
85
109
|
|
|
86
|
-
|
|
110
|
+
### 1b. Resolve Requirements and Change Name (Non-blocking by Default)
|
|
87
111
|
|
|
88
|
-
OpenSpec
|
|
112
|
+
Before creating OpenSpec artifacts, turn Step 1 clarification into a resolved brief containing the goal, non-goals, scope boundaries, key unknowns, and draft acceptance scenarios. Derive one kebab-case English change name that accurately represents that scope.
|
|
89
113
|
|
|
90
|
-
|
|
91
|
-
-
|
|
92
|
-
-
|
|
93
|
-
-
|
|
114
|
+
- **Continue directly when scope and naming are both unambiguous**. Do not pause merely to approve a summary or name; final review confirms the change name, scope, and artifacts together
|
|
115
|
+
- If the user supplied a name, normalize it to kebab-case and echo it in the progress update. Do not re-confirm when normalization preserves meaning
|
|
116
|
+
- Reuse a confirmed batch item's persisted summary and name. Re-clarify only when scope drift or missing manifest data is detected
|
|
117
|
+
- Use `comet/reference/decision-point.md` for one joint question only when mutually exclusive choices still change scope or the target change identity. Naming preference alone is not a blocking point
|
|
94
118
|
|
|
95
|
-
|
|
96
|
-
- Pick one of the recommended names
|
|
97
|
-
- "Enter a custom name" — accept the user's input; if it is already valid kebab-case English, use it directly; if it is Chinese or otherwise non-conforming, convert it to compliant kebab-case English and show the converted name for confirmation before continuing
|
|
119
|
+
OpenSpec names must be kebab-case English using lowercase letters, digits, and single hyphens. When a collision exists but the target remains clear, derive a stable non-conflicting name and continue. Ask only when Comet cannot determine whether to reuse the existing change or create a new one.
|
|
98
120
|
|
|
99
|
-
|
|
121
|
+
Do not run `openspec new change` or create proposal/design/tasks while the resolved brief or name remains ambiguous. Continue clarification or resolve the genuine user decision before Step 2.
|
|
100
122
|
|
|
101
123
|
### 2. Create Change Structure + Initialize State
|
|
102
124
|
|
|
@@ -104,35 +126,50 @@ Must not run `openspec new change` or create `.comet.yaml` before the user confi
|
|
|
104
126
|
|
|
105
127
|
Full `/comet` workflow must not use the Skill tool to load the `openspec-propose` skill by default; only load it when the user explicitly requests generating the proposal and artifacts in one pass.
|
|
106
128
|
|
|
107
|
-
After the skill loads, follow its guidance to create the change skeleton,
|
|
129
|
+
After the skill loads, follow its guidance to create the change skeleton. When Step 1b has produced an unambiguous resolved brief, override its "STOP and wait for user direction" behavior to avoid a duplicate question.
|
|
130
|
+
|
|
131
|
+
Use the Step 1b resolved brief directly to populate artifact content. Fall back to the skill's question flow only when ambiguity remains that would change scope.
|
|
132
|
+
|
|
133
|
+
Immediately after creating the change skeleton, initialize recoverable state instead of waiting until every artifact is generated:
|
|
108
134
|
|
|
109
|
-
|
|
135
|
+
```bash
|
|
136
|
+
comet state init <name> full
|
|
137
|
+
comet state select <name>
|
|
138
|
+
comet state check <name> open
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
Stop if any command fails. Then run `openspec status --change "<name>" --json` once and perform compatibility preflight:
|
|
110
142
|
|
|
111
|
-
|
|
143
|
+
- Resolved `changeRoot` must equal repository-local `openspec/changes/<name>`, and `planningHome` (when present) must remain inside the current repository
|
|
144
|
+
- `artifacts` must contain core ids `proposal`, `design`, and `tasks`; extra artifacts are allowed
|
|
145
|
+
- `applyRequires` must be a parseable list of artifact ids and every id must exist in `artifacts`
|
|
146
|
+
- Stop on missing fields, escaping paths, or missing core ids; never fall back to a guessed fixed template
|
|
112
147
|
|
|
113
|
-
|
|
148
|
+
After preflight, generate the implementation-required artifacts from the OpenSpec schema and dependency graph:
|
|
114
149
|
|
|
115
|
-
|
|
116
|
-
|
|
150
|
+
**OpenSpec status-driven artifact loop**:
|
|
151
|
+
|
|
152
|
+
1. Run `openspec status --change "<name>" --json` and parse the complete JSON.
|
|
153
|
+
2. Exit when every item in `applyRequires` is `done`; record `isComplete` as diagnostic only and do not use it as a phase blocker.
|
|
154
|
+
3. From unfinished `ready` artifacts, prioritize items that advance the `applyRequires` dependency closure and process them in CLI-returned order. Must not hard-code generation order or assume the schema contains only proposal/design/tasks.
|
|
155
|
+
4. Fetch current instructions for each ready `<artifact-id>`:
|
|
117
156
|
|
|
118
157
|
```bash
|
|
119
|
-
openspec instructions
|
|
120
|
-
openspec instructions design --change "<name>" --json
|
|
121
|
-
openspec instructions tasks --change "<name>" --json
|
|
158
|
+
openspec instructions <artifact-id> --change "<name>" --json
|
|
122
159
|
```
|
|
123
160
|
|
|
124
|
-
|
|
161
|
+
5. For the returned JSON instruction payload, you must:
|
|
125
162
|
- Read every completed dependency artifact listed in `dependencies`
|
|
126
163
|
- Use `template` as the artifact structure
|
|
127
164
|
- Follow `instruction` guidance
|
|
128
|
-
- Apply `context` and `rules` as constraints — **must not copy them into
|
|
129
|
-
- Write to `resolvedOutputPath
|
|
130
|
-
- Verify the output
|
|
131
|
-
|
|
165
|
+
- Apply `context` and `rules` as constraints — **must not copy them into artifact content**
|
|
166
|
+
- Write to `resolvedOutputPath`; for wildcard outputs, create each concrete file required by the instruction
|
|
167
|
+
- Verify the concrete output files returned by the CLI exist and are non-empty
|
|
168
|
+
6. Re-run status after creating each artifact and revalidate `changeRoot`, core ids, and `applyRequires`. Do not regenerate items that become `done`; process newly `ready` items in the next loop.
|
|
132
169
|
|
|
133
|
-
**
|
|
170
|
+
**Blocking and failure handling**: if `applyRequires` is incomplete and no ready artifact can advance its dependency closure, report `missingDeps` for the relevant `blocked` artifacts and stop. Do not guess order or skip dependencies. Also stop if status/instructions fails, returns invalid JSON, escapes the repository, or provides no usable `resolvedOutputPath`. Must not fall back to hard-coded artifact prose.
|
|
134
171
|
|
|
135
|
-
**Naming and scope guard**:
|
|
172
|
+
**Naming and scope guard**: Use the kebab-case English name resolved in Step 1b; never use a non-kebab-case name. Change scope must match the resolved brief and user request; do not expand or narrow it independently.
|
|
136
173
|
|
|
137
174
|
Confirm the following artifacts have been created:
|
|
138
175
|
|
|
@@ -145,43 +182,45 @@ openspec/changes/<name>/
|
|
|
145
182
|
└── tasks.md # Task checklist (checkboxes)
|
|
146
183
|
```
|
|
147
184
|
|
|
148
|
-
Create `.comet.yaml` state file:
|
|
149
|
-
|
|
150
|
-
First locate scripts via `comet/reference/scripts.md`, then initialize state:
|
|
151
|
-
|
|
152
|
-
```bash
|
|
153
|
-
node "$COMET_STATE" init <name> full
|
|
154
|
-
```
|
|
155
|
-
|
|
156
185
|
### 3. Entry State Verification
|
|
157
186
|
|
|
158
187
|
Verify state machine has been correctly initialized:
|
|
159
188
|
|
|
160
189
|
```bash
|
|
161
|
-
|
|
190
|
+
comet state check <name> open
|
|
162
191
|
```
|
|
163
192
|
|
|
164
193
|
Proceed to Step 4 after verification passes. The script outputs specific failure reasons when verification fails.
|
|
165
194
|
|
|
166
|
-
**
|
|
195
|
+
**Idempotent recovery algorithm**: all open phase operations can be safely re-executed. On recovery, process the status in this order:
|
|
196
|
+
|
|
197
|
+
1. If state is missing, run `comet state init <name> full`; if malformed, stop and repair it instead of overwriting it. Then select the change and run `comet state check <name> open`.
|
|
198
|
+
2. Run status and revalidate `changeRoot`, core ids, `applyRequires`, `artifacts`, and `missingDeps`.
|
|
199
|
+
3. `done`: keep the artifact unchanged and do not regenerate it.
|
|
200
|
+
4. `ready`: fetch its instructions, write the returned output, and immediately rerun status.
|
|
201
|
+
5. `blocked`: follow `missingDeps` and first complete dependencies in the `applyRequires` closure; never generate a blocked artifact directly.
|
|
202
|
+
6. Repeat until every item in `applyRequires` is `done`.
|
|
203
|
+
|
|
204
|
+
If the required dependency graph cannot advance, list the relevant blocked artifacts and `missingDeps`, then stop. Directory or fixed-file presence cannot replace the CLI decision; conversely, an optional artifact outside `applyRequires` must not block implementation solely because `isComplete` is false.
|
|
167
205
|
|
|
168
206
|
### 4. Content Completeness Check
|
|
169
207
|
|
|
170
|
-
Confirm
|
|
171
|
-
- **proposal.md**: problem background, goals, scope, non-goals
|
|
172
|
-
- **design.md**: high-level architecture decisions, approach selection, data flow
|
|
173
|
-
- **tasks.md**: task list, each task has a clear description
|
|
208
|
+
Run status again. Confirm core ids exist, every item in `applyRequires` is `done`, and concrete files in `artifactPaths.<id>.existingOutputPaths` for required artifacts exist and are non-empty. If any condition fails, do not enter Step 5 or execute the phase guard.
|
|
174
209
|
|
|
175
|
-
|
|
210
|
+
Then check key artifact content: proposal covers problem, goals, scope, and non-goals; design covers high-level decisions and data flow; tasks contains clear work items. If the schema returns specs or other artifacts, check their content against their instructions as well; the fixed three documents must not hide an incomplete schema artifact.
|
|
176
211
|
|
|
177
212
|
### 5. User Review and Confirmation (Blocking Point)
|
|
178
213
|
|
|
179
|
-
After
|
|
214
|
+
After all OpenSpec artifacts are complete and the content check passes, **must follow the `comet/reference/decision-point.md` protocol to pause and wait for user confirmation**. Must not execute the phase guard or auto-transition before user confirmation.
|
|
215
|
+
|
|
216
|
+
The final review confirms the change name, scope, and artifact content together. Do not skip it because Step 1b resolved the brief, and do not add another routine summary/name confirmation before it.
|
|
180
217
|
|
|
181
218
|
The user confirmation question must be presented as a single-select question with the following summary and options:
|
|
182
219
|
|
|
183
220
|
**Summary content**:
|
|
221
|
+
- **Change name and resolved brief**: final name, goal, non-goals, scope boundaries, and key unknowns
|
|
184
222
|
- **proposal.md**: problem background, goals, scope
|
|
223
|
+
- **specs and other schema artifacts**: capabilities, requirements, and key acceptance scenarios
|
|
185
224
|
- **design.md**: high-level architecture decisions, approach selection
|
|
186
225
|
- **tasks.md**: task count and key task descriptions
|
|
187
226
|
|
|
@@ -193,14 +232,14 @@ After user selects "Confirm", proceed to exit conditions. When user selects "Nee
|
|
|
193
232
|
|
|
194
233
|
## Exit Conditions
|
|
195
234
|
|
|
196
|
-
-
|
|
197
|
-
- **User has confirmed**
|
|
198
|
-
- **Phase guard**: Run `
|
|
235
|
+
- OpenSpec compatibility preflight passes, every `applyRequires` item is `done`, and required outputs are non-empty
|
|
236
|
+
- **User has confirmed** all OpenSpec artifact content meets expectations
|
|
237
|
+
- **Phase guard**: Run `comet guard <change-name> open --apply`; after all PASS, auto-transitions to next phase
|
|
199
238
|
|
|
200
239
|
Must use `--apply` before exit, otherwise `.comet.yaml` remains at `phase: open` and the next phase entry check will fail.
|
|
201
240
|
|
|
202
241
|
```bash
|
|
203
|
-
|
|
242
|
+
comet guard <change-name> open --apply
|
|
204
243
|
```
|
|
205
244
|
|
|
206
245
|
Full workflow auto-transitions to `phase: design`; hotfix/tweak presets auto-transition to `phase: build`.
|
|
@@ -210,11 +249,11 @@ Full workflow auto-transitions to `phase: design`; hotfix/tweak presets auto-tra
|
|
|
210
249
|
Follow `comet/reference/auto-transition.md`. Key command:
|
|
211
250
|
|
|
212
251
|
```bash
|
|
213
|
-
|
|
252
|
+
comet state next <change-name>
|
|
214
253
|
```
|
|
215
254
|
|
|
216
255
|
- `NEXT: auto` → invoke the skill pointed to by `SKILL` to enter the next phase
|
|
217
|
-
- `NEXT: manual` → do not invoke the next skill;
|
|
256
|
+
- `NEXT: manual` → do not invoke the next skill; return control with `HINT`, end the invocation, and do not create another confirmation point
|
|
218
257
|
- `NEXT: done` → workflow is complete, no further action needed
|
|
219
258
|
|
|
220
259
|
hotfix/tweak presets are controlled by their corresponding preset skill (phase goes directly to build); their `next` returns the corresponding preset skill.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: comet-tweak
|
|
3
|
-
description: "Use when
|
|
3
|
+
description: "Use only when explicitly invoked as /comet-tweak or routed by the root Comet skill/runtime to the tweak preset; handle a lightweight or medium change that fits one OpenSpec change."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Comet Preset Path: Tweak
|
|
@@ -23,7 +23,7 @@ Applicable for OpenSpec-chained lightweight changes, such as configuration adjus
|
|
|
23
23
|
|
|
24
24
|
### 0. Output Language Constraint
|
|
25
25
|
|
|
26
|
-
Streamlined OpenSpec artifacts must use the configured Comet artifact language. Before `.comet.yaml` exists, read `language` from project `.comet/config.yaml`, then fall back to global `~/.comet/config.yaml`; after initialization, use `
|
|
26
|
+
Streamlined OpenSpec artifacts must use the configured Comet artifact language. Before `.comet.yaml` exists, read `language` from project `.comet/config.yaml`, then fall back to global `~/.comet/config.yaml`; after initialization, use `comet state get <name> language`.
|
|
27
27
|
|
|
28
28
|
Execution chain: open → OpenSpec apply → verify → archive. Tweak provides default decisions for each phase: streamlined open, direct build through OpenSpec apply, scale- and delta-spec-driven verification weight, and final archive confirmation after verification passes.
|
|
29
29
|
|
|
@@ -46,19 +46,22 @@ After the skill loads, follow its guidance to create streamlined artifacts:
|
|
|
46
46
|
Initialize Comet state file:
|
|
47
47
|
|
|
48
48
|
```bash
|
|
49
|
-
|
|
49
|
+
comet state init <name> tweak
|
|
50
|
+
comet state select <name>
|
|
50
51
|
```
|
|
51
52
|
|
|
53
|
+
Tweak defaults to `isolation: current`, truthfully indicating execution in the current workspace. Change it to `branch` or `worktree` only after that workspace is actually created/selected.
|
|
54
|
+
|
|
52
55
|
Verify initialized state:
|
|
53
56
|
|
|
54
57
|
```bash
|
|
55
|
-
|
|
58
|
+
comet state check <name> open
|
|
56
59
|
```
|
|
57
60
|
|
|
58
61
|
Run phase guard to transition open → build:
|
|
59
62
|
|
|
60
63
|
```bash
|
|
61
|
-
|
|
64
|
+
comet guard <change-name> open --apply
|
|
62
65
|
```
|
|
63
66
|
|
|
64
67
|
### 2. OpenSpec Apply Build (tweak-only preset build)
|
|
@@ -95,7 +98,7 @@ For specific investigation, minimal failing test, fix verification, and keeping
|
|
|
95
98
|
7. Run phase guard to transition build → verify:
|
|
96
99
|
|
|
97
100
|
```bash
|
|
98
|
-
|
|
101
|
+
comet guard <change-name> build --apply
|
|
99
102
|
```
|
|
100
103
|
|
|
101
104
|
State automatically updates to `phase: verify`, `verify_result: pending`, then enter verification.
|
|
@@ -109,10 +112,10 @@ Reuse `/comet-verify`; let comet-verify's scale assessment decide lightweight or
|
|
|
109
112
|
**Delta-spec verification routing**: tweak accepts delta spec as a normal artifact. If this change created a delta spec, explicitly set full verification mode before entering comet-verify, to run OpenSpec-native verification (`openspec-verify-change`) covering delta-spec consistency:
|
|
110
113
|
|
|
111
114
|
```bash
|
|
112
|
-
|
|
115
|
+
comet state set <change-name> verify_mode full
|
|
113
116
|
```
|
|
114
117
|
|
|
115
|
-
A tweak without delta spec usually meets lightweight verification conditions (≤ 3 tasks, changed files below the scale threshold); comet-verify's scale assessment selects the lightweight verification path (6 quick checks). If the user wants to add review, run `
|
|
118
|
+
A tweak without delta spec usually meets lightweight verification conditions (≤ 3 tasks, changed files below the scale threshold); comet-verify's scale assessment selects the lightweight verification path (6 quick checks). If the user wants to add review, run `comet state set <name> review_mode standard` or `thorough` before verification.
|
|
116
119
|
|
|
117
120
|
After verification passes, record `.comet.yaml` `verify_result` as `pass` according to `/comet-verify` rules, must not skip this status before archiving. After verification passes, still enter `/comet-archive`'s final archive confirmation; do not automatically run the archive script.
|
|
118
121
|
|
|
@@ -129,13 +132,13 @@ Reuse `/comet-archive`. Must satisfy `verify_result: pass` in `.comet.yaml` befo
|
|
|
129
132
|
<IMPORTANT>
|
|
130
133
|
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.
|
|
131
134
|
|
|
132
|
-
Exception: when `.comet.yaml` has `auto_transition: false`,
|
|
135
|
+
Exception: when `.comet.yaml` has `auto_transition: false`, end the current invocation at each phase boundary and return control with `HINT`; the user may run the next phase later. This is a manual handoff, not a new confirmation point.
|
|
133
136
|
|
|
134
|
-
The following
|
|
137
|
+
The following genuine user decisions still pause:
|
|
135
138
|
|
|
136
139
|
1. Encountering an upgrade-assessment signal (see "Upgrade Assessment" section). **Must use the current platform's available user input/confirmation mechanism to pause and wait for the user to explicitly choose**: continue the tweak lightweight flow, or upgrade to the full `/comet` workflow
|
|
137
|
-
2.
|
|
138
|
-
3. Final archive confirmation
|
|
140
|
+
2. Verify-phase acceptance of WARNING/SUGGESTION deviations, Spec drift handling, or strategy after the automatic repair limit; the first 3 clearly repairable failures close automatically
|
|
141
|
+
3. Final archive confirmation and the branch-handling decision after the archive commit
|
|
139
142
|
|
|
140
143
|
Execution order: quick open → build (with upgrade assessment) → verification → archive → complete
|
|
141
144
|
|
|
@@ -146,7 +149,7 @@ After each phase completes, immediately enter next phase. Within each phase, mus
|
|
|
146
149
|
|
|
147
150
|
## Upgrade Assessment
|
|
148
151
|
|
|
149
|
-
Tweak upgrade assessment only decides whether to move from the lightweight preset to full; delta spec alone is not an upgrade reason, file count never upgrades automatically, and `comet
|
|
152
|
+
Tweak upgrade assessment only decides whether to move from the lightweight preset to full; delta spec alone is not an upgrade reason, file count never upgrades automatically, and `comet state scale` only decides verification weight.
|
|
150
153
|
|
|
151
154
|
If `/comet` passes an intent frame from the entry, tweak must recheck `risk_signal` and escalation signals only before build: new capability, public API, schema change, cross-module coordination, or deep architecture work. When any signal matches, enter the existing escalation decision point. Delta spec remains a normal tweak artifact and must not trigger escalation by itself; do not reimplement entry intent recognition.
|
|
152
155
|
|
|
@@ -159,10 +162,10 @@ When a qualitative-change signal or file-count tripwire is hit, **must pause und
|
|
|
159
162
|
After the user chooses upgrade (option B), use the legal state-machine upgrade channel, a single command that converts the preset workflow to full and rolls back to design:
|
|
160
163
|
|
|
161
164
|
```bash
|
|
162
|
-
|
|
165
|
+
comet state transition <name> preset-escalate
|
|
163
166
|
```
|
|
164
167
|
|
|
165
|
-
This command atomically sets `workflow`/`classic_profile` to `full`, rolls `phase` back to `design`, and clears `
|
|
168
|
+
This command atomically sets `workflow`/`classic_profile` to `full`, rolls `phase` back to `design`, clears `design_doc`, and clears preset-only `build_mode`, `tdd_mode`, `review_mode`, `isolation`, and `verify_mode`. Then add the Design Doc on the current change: **immediately use the Skill tool to load the `comet-design` skill**. On entering build, run the full joint workflow-configuration decision again.
|
|
166
169
|
|
|
167
170
|
When the user chooses continue (option A), continue the tweak workflow and record the user's reason for continuing.
|
|
168
171
|
|
|
@@ -173,16 +176,16 @@ When the user chooses continue (option A), continue the tweak workflow and recor
|
|
|
173
176
|
- Change completed, tests pass
|
|
174
177
|
- Change archived
|
|
175
178
|
- If spec changed, synced to main spec
|
|
176
|
-
- **Phase guard**: Before build → verify run `
|
|
179
|
+
- **Phase guard**: Before build → verify run `comet guard <change-name> build --apply`; before verify → archive follow `/comet-verify` and run `comet guard <change-name> verify --apply`
|
|
177
180
|
|
|
178
181
|
## Automatic Handoff to Next Phase
|
|
179
182
|
|
|
180
183
|
Follow `comet/reference/auto-transition.md`. Key command:
|
|
181
184
|
|
|
182
185
|
```bash
|
|
183
|
-
|
|
186
|
+
comet state next <name>
|
|
184
187
|
```
|
|
185
188
|
|
|
186
189
|
- `NEXT: auto` → invoke the skill pointed to by `SKILL` to continue tweak workflow (`phase: build` returns `comet-tweak`, `verify` returns `comet-verify`, `archive` returns `comet-archive`)
|
|
187
|
-
- `NEXT: manual` → do not invoke the next skill;
|
|
190
|
+
- `NEXT: manual` → do not invoke the next skill; return control with `HINT`, end the invocation, and do not create another confirmation point
|
|
188
191
|
- `NEXT: done` → workflow is complete, no further action needed
|