@rpamis/comet 0.4.0-beta.4 → 0.4.0-beta.6
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 +11 -4
- 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 +8 -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 +682 -309
- 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 +33 -13
- package/assets/skills/comet-build/SKILL.md +37 -29
- package/assets/skills/comet-design/SKILL.md +23 -22
- package/assets/skills/comet-hotfix/SKILL.md +46 -31
- package/assets/skills/comet-open/SKILL.md +97 -58
- package/assets/skills/comet-tweak/SKILL.md +34 -19
- package/assets/skills/comet-verify/SKILL.md +37 -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 +8 -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 +33 -13
- package/assets/skills-zh/comet-build/SKILL.md +37 -29
- package/assets/skills-zh/comet-design/SKILL.md +23 -22
- package/assets/skills-zh/comet-hotfix/SKILL.md +45 -30
- package/assets/skills-zh/comet-open/SKILL.md +96 -57
- package/assets/skills-zh/comet-tweak/SKILL.md +33 -18
- package/assets/skills-zh/comet-verify/SKILL.md +37 -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/status.d.ts +1 -0
- package/dist/app/commands/status.d.ts.map +1 -1
- package/dist/app/commands/status.js +10 -0
- package/dist/app/commands/status.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-branch-binding.d.ts +51 -0
- package/dist/domains/comet-classic/classic-branch-binding.d.ts.map +1 -0
- package/dist/domains/comet-classic/classic-branch-binding.js +107 -0
- package/dist/domains/comet-classic/classic-branch-binding.js.map +1 -0
- package/dist/domains/comet-classic/classic-current-change.d.ts.map +1 -1
- package/dist/domains/comet-classic/classic-current-change.js +37 -20
- package/dist/domains/comet-classic/classic-current-change.js.map +1 -1
- package/dist/domains/comet-classic/classic-guard.d.ts.map +1 -1
- package/dist/domains/comet-classic/classic-guard.js +50 -16
- 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 +138 -21
- 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 +113 -14
- package/dist/domains/comet-classic/classic-state-command.js.map +1 -1
- package/dist/domains/comet-classic/classic-state-events.d.ts +1 -1
- package/dist/domains/comet-classic/classic-state-events.d.ts.map +1 -1
- package/dist/domains/comet-classic/classic-state.d.ts +4 -2
- package/dist/domains/comet-classic/classic-state.d.ts.map +1 -1
- package/dist/domains/comet-classic/classic-state.js +16 -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 +17 -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 +13 -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/find.d.ts.map +1 -1
- package/dist/domains/skill/find.js +7 -1
- package/dist/domains/skill/find.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-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,24 +46,39 @@ 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
|
|
|
52
53
|
Verify initialized state:
|
|
53
54
|
|
|
54
55
|
```bash
|
|
55
|
-
|
|
56
|
+
comet state check <name> open
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
If the `select` / `check` output is `BLOCKED` because `bound_branch` does not match the current branch, immediately pause under `comet/reference/decision-point.md` and let the user choose one option: switch back to the bound branch and rerun entry verification, or run `comet state rebind <change-name>` after the user explicitly confirms the current branch should take over this change, then rerun entry verification. Do not switch branches or rebind on your own.
|
|
60
|
+
|
|
61
|
+
Entry workspace isolation is a user decision point; do not use `current` as the default isolation mode. Pause under `comet/reference/decision-point.md` and let the user choose one option:
|
|
62
|
+
|
|
63
|
+
- A. Work directly on the current branch: run `comet state set <name> isolation current` to truthfully bind the current branch
|
|
64
|
+
- B. Create a branch: create and switch to `tweak/YYYYMMDD/<change-name>`, then run `comet state set <name> isolation branch`
|
|
65
|
+
- C. Create a worktree: first use the Skill tool to load Superpowers `using-git-worktrees`; let that skill create the isolated workspace, then run `comet state set <name> isolation worktree` inside the worktree
|
|
66
|
+
|
|
67
|
+
After B/C, rerun this in the actual execution branch or worktree:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
comet state select <name>
|
|
56
71
|
```
|
|
57
72
|
|
|
58
73
|
Run phase guard to transition open → build:
|
|
59
74
|
|
|
60
75
|
```bash
|
|
61
|
-
|
|
76
|
+
comet guard <change-name> open --apply
|
|
62
77
|
```
|
|
63
78
|
|
|
64
79
|
### 2. OpenSpec Apply Build (tweak-only preset build)
|
|
65
80
|
|
|
66
|
-
Use tweak defaults: `build_mode: direct`. Skip Superpowers `brainstorming` and `writing-plans`, and let OpenSpec's apply action execute the current change's tasks.
|
|
81
|
+
Use tweak defaults: `build_mode: direct`. `isolation` must keep the entry workspace isolation the user confirmed in Step 1; do not change it back to `current` on your own. Skip Superpowers `brainstorming` and `writing-plans`, and let OpenSpec's apply action execute the current change's tasks.
|
|
67
82
|
|
|
68
83
|
<IMPORTANT>
|
|
69
84
|
This apply path belongs only to tweak. Full `/comet` or `workflow: full` must not use tweak's `openspec-apply-change` build path; full must still generate a Design Doc through `/comet-design`, then let `/comet-build` use Superpowers `writing-plans`, execution-method selection, and the corresponding execution skill to build.
|
|
@@ -95,7 +110,7 @@ For specific investigation, minimal failing test, fix verification, and keeping
|
|
|
95
110
|
7. Run phase guard to transition build → verify:
|
|
96
111
|
|
|
97
112
|
```bash
|
|
98
|
-
|
|
113
|
+
comet guard <change-name> build --apply
|
|
99
114
|
```
|
|
100
115
|
|
|
101
116
|
State automatically updates to `phase: verify`, `verify_result: pending`, then enter verification.
|
|
@@ -109,10 +124,10 @@ Reuse `/comet-verify`; let comet-verify's scale assessment decide lightweight or
|
|
|
109
124
|
**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
125
|
|
|
111
126
|
```bash
|
|
112
|
-
|
|
127
|
+
comet state set <change-name> verify_mode full
|
|
113
128
|
```
|
|
114
129
|
|
|
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 `
|
|
130
|
+
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
131
|
|
|
117
132
|
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
133
|
|
|
@@ -129,13 +144,13 @@ Reuse `/comet-archive`. Must satisfy `verify_result: pass` in `.comet.yaml` befo
|
|
|
129
144
|
<IMPORTANT>
|
|
130
145
|
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
146
|
|
|
132
|
-
Exception: when `.comet.yaml` has `auto_transition: false`,
|
|
147
|
+
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
148
|
|
|
134
|
-
The following
|
|
149
|
+
The following genuine user decisions still pause:
|
|
135
150
|
|
|
136
151
|
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
|
|
152
|
+
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
|
|
153
|
+
3. Final archive confirmation and the branch-handling decision after the archive commit
|
|
139
154
|
|
|
140
155
|
Execution order: quick open → build (with upgrade assessment) → verification → archive → complete
|
|
141
156
|
|
|
@@ -146,7 +161,7 @@ After each phase completes, immediately enter next phase. Within each phase, mus
|
|
|
146
161
|
|
|
147
162
|
## Upgrade Assessment
|
|
148
163
|
|
|
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
|
|
164
|
+
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
165
|
|
|
151
166
|
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
167
|
|
|
@@ -159,10 +174,10 @@ When a qualitative-change signal or file-count tripwire is hit, **must pause und
|
|
|
159
174
|
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
175
|
|
|
161
176
|
```bash
|
|
162
|
-
|
|
177
|
+
comet state transition <name> preset-escalate
|
|
163
178
|
```
|
|
164
179
|
|
|
165
|
-
This command atomically sets `workflow`/`classic_profile` to `full`, rolls `phase` back to `design`, and clears `
|
|
180
|
+
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
181
|
|
|
167
182
|
When the user chooses continue (option A), continue the tweak workflow and record the user's reason for continuing.
|
|
168
183
|
|
|
@@ -173,16 +188,16 @@ When the user chooses continue (option A), continue the tweak workflow and recor
|
|
|
173
188
|
- Change completed, tests pass
|
|
174
189
|
- Change archived
|
|
175
190
|
- If spec changed, synced to main spec
|
|
176
|
-
- **Phase guard**: Before build → verify run `
|
|
191
|
+
- **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
192
|
|
|
178
193
|
## Automatic Handoff to Next Phase
|
|
179
194
|
|
|
180
195
|
Follow `comet/reference/auto-transition.md`. Key command:
|
|
181
196
|
|
|
182
197
|
```bash
|
|
183
|
-
|
|
198
|
+
comet state next <name>
|
|
184
199
|
```
|
|
185
200
|
|
|
186
201
|
- `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;
|
|
202
|
+
- `NEXT: manual` → do not invoke the next skill; return control with `HINT`, end the invocation, and do not create another confirmation point
|
|
188
203
|
- `NEXT: done` → workflow is complete, no further action needed
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: comet-verify
|
|
3
|
-
description: "Use when
|
|
3
|
+
description: "Use only when explicitly invoked as /comet-verify or routed by the root Comet skill/runtime to the verify phase; verify a Comet change, record evidence, and manage repair loops."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Comet Phase 4: Verify
|
|
6
|
+
# Comet Phase 4: Verify
|
|
7
7
|
|
|
8
8
|
## Prerequisites
|
|
9
9
|
|
|
@@ -14,7 +14,7 @@ description: "Use when a Comet change has completed build and needs implementati
|
|
|
14
14
|
|
|
15
15
|
### 0a. Output Language Constraint
|
|
16
16
|
|
|
17
|
-
Verification reports
|
|
17
|
+
Verification reports must use the configured Comet artifact language from `comet state get <name> language`.
|
|
18
18
|
|
|
19
19
|
### 0b. Entry State Verification (Entry Check)
|
|
20
20
|
|
|
@@ -27,7 +27,9 @@ comet state check <change-name> verify
|
|
|
27
27
|
|
|
28
28
|
Proceed to Step 1 after verification passes. The script outputs specific failure reasons when verification fails.
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
If the `select` / `check` output is `BLOCKED` because `bound_branch` does not match the current branch, immediately pause under `comet/reference/decision-point.md` and let the user choose one option: switch back to the bound branch and rerun entry verification, or run `comet state rebind <change-name>` after the user explicitly confirms the current branch should take over this change, then rerun entry verification. Do not switch branches or rebind on your own.
|
|
31
|
+
|
|
32
|
+
**Idempotency**: All verify checks are safe to repeat. If `verify_result` is already `pass`, verification is complete and archive should continue; keep `branch_status: pending` until archive changes are committed and final branch handling finishes. If `verify_result` is `pending`, start verification from the beginning.
|
|
31
33
|
|
|
32
34
|
### 1. Scale Assessment
|
|
33
35
|
|
|
@@ -41,27 +43,26 @@ The script automatically counts tasks, delta spec count, changed file count, det
|
|
|
41
43
|
|
|
42
44
|
Before verification begins, handle uncommitted changes through `comet/reference/dirty-worktree.md` protocol. Verify phase special handling:
|
|
43
45
|
|
|
44
|
-
1. If dirty diff belongs to current change
|
|
45
|
-
2. If dirty diff is only verify phase
|
|
46
|
-
3. If dirty diff shows implementation but tasks.md
|
|
46
|
+
1. If dirty diff clearly belongs to the current change, it is verification input. Continue verification, but do not modify or commit implementation, tests, tasks, delta specs, or the Design Doc in verify
|
|
47
|
+
2. If dirty diff is only a verify phase artifact such as a verification report draft, may continue and record state in verify phase
|
|
48
|
+
3. If dirty diff shows implementation but tasks.md remains unchecked, treat it as lagging build state. This has one valid next action: run `verify-fail`, return to build, verify evidence, and update task state without asking whether to accept incomplete tasks
|
|
49
|
+
4. If dirty diff cannot be attributed or belongs to another change, report a stop condition through the dirty-worktree protocol. Do not disguise attribution failure as a continue/ignore choice
|
|
47
50
|
|
|
48
|
-
|
|
51
|
+
When repair or state reconciliation must return to build, run:
|
|
49
52
|
|
|
50
53
|
```bash
|
|
51
|
-
# Execute only after user confirms fix
|
|
52
54
|
comet state transition <change-name> verify-fail
|
|
53
55
|
```
|
|
54
56
|
|
|
55
|
-
Note: When verify-fail rolls back to build, `branch_status` is not reset. If branch handling was already completed during the first verify attempt, skip the branch handling step on re-verify and keep the existing `branch_status: handled`.
|
|
56
|
-
|
|
57
57
|
Note: If every task in build phase was committed, the script's file count based on working tree diff may underestimate change scale. In this case, must read plan file header `base-ref` and verify with commit range:
|
|
58
58
|
|
|
59
59
|
```bash
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
git diff --stat "$BASE_REF"...HEAD
|
|
60
|
+
comet state get <change-name> plan
|
|
61
|
+
git diff --stat <base-ref read from plan frontmatter>...HEAD
|
|
63
62
|
```
|
|
64
63
|
|
|
64
|
+
The first command returns the plan path. Use the host's file reader to parse the single `base-ref` frontmatter field, validate it as a commit, then substitute it into the second command. Do not depend on POSIX text pipelines.
|
|
65
|
+
|
|
65
66
|
If commit range shows changes exceed lightweight threshold (> 8 files, cross-module coordination, or delta spec spans more than 1 capability), manually set to full verification:
|
|
66
67
|
|
|
67
68
|
```bash
|
|
@@ -70,33 +71,34 @@ comet state set <change-name> verify_mode full
|
|
|
70
71
|
|
|
71
72
|
**Override mechanism**: If the agent or user believes the automated assessment is inappropriate, override at any time with `comet state set <change-name> verify_mode <light|full>`.
|
|
72
73
|
|
|
73
|
-
### 1b. Verification
|
|
74
|
+
### 1b. Automatic Verification Repair and Exception Decisions
|
|
74
75
|
|
|
75
|
-
|
|
76
|
+
Run `comet state get <change-name> verify_failures` first to read the persisted consecutive failure count. Automatically return to build for the first 3 repairable failures: report the failures, run `comet state transition <change-name> verify-fail`, then invoke `/comet-build` without asking for confirmation.
|
|
76
77
|
|
|
77
|
-
|
|
78
|
+
The report must list:
|
|
78
79
|
- Failed items
|
|
79
80
|
- Whether CRITICAL or IMPORTANT (build failure, test failure, security issues, core acceptance scenario failure, lightweight code review correctness/security/edge-case issue)
|
|
80
81
|
- Recommended handling approach
|
|
81
82
|
|
|
82
|
-
**Uncertainty principle**:
|
|
83
|
+
**Uncertainty principle**: Use a lower severity when evidence is unclear. Reserve CRITICAL for build failures, test failures, and security issues; use IMPORTANT for confirmed core-acceptance or correctness failures; mark ambiguous findings WARNING or SUGGESTION.
|
|
83
84
|
|
|
84
|
-
|
|
85
|
-
- **
|
|
86
|
-
- **
|
|
85
|
+
Handle failures as follows:
|
|
86
|
+
- **CRITICAL/IMPORTANT or objectively repairable in-scope issues**: automatically return to build below the retry limit. Do not manufacture a "whether to fix" decision, and never accept these as deviations
|
|
87
|
+
- **WARNING/SUGGESTION whose fix introduces a behavior, scope, or risk tradeoff**: use `comet/reference/decision-point.md` to ask whether to fix or accept. Record the reason and impact scope when accepted
|
|
88
|
+
- **WARNING/SUGGESTION with a safe, local, tradeoff-free fix**: repair automatically below the retry limit; low severity alone does not justify a pause
|
|
87
89
|
|
|
88
|
-
|
|
90
|
+
Only accepting WARNING/SUGGESTION deviations or choosing a strategy after the 4th failure is a user decision point. When `verify_failures >= 3`, do not automatically execute another `verify-fail`. Offer only "Continue fixing" or "Stop this workflow and seek an external decision" under the decision protocol. Record the next failure and return to build only after the user chooses continue. CRITICAL/IMPORTANT findings are never waivable.
|
|
89
91
|
|
|
90
92
|
### 2. Artifact Context Loading (Hash On-Demand Read)
|
|
91
93
|
|
|
92
94
|
When verification needs to read OpenSpec artifacts, first check whether they have changed since the design phase:
|
|
93
95
|
|
|
94
96
|
```bash
|
|
95
|
-
|
|
96
|
-
|
|
97
|
+
comet state get <change-name> handoff_hash
|
|
98
|
+
comet handoff <change-name> --hash-only
|
|
97
99
|
```
|
|
98
100
|
|
|
99
|
-
- If
|
|
101
|
+
- Read the two standard outputs separately. If they match and both are non-empty and non-`null`, OpenSpec artifacts are unchanged. **tasks.md does not need to be re-read in full**; parse its checkboxes to confirm none remain unchecked. proposal.md, design.md, and delta specs must still be read for comparison checks.
|
|
100
102
|
- If `RECORDED_HASH` is empty, is `null`, or differs from `CURRENT_HASH`: artifacts have changed or hash was never recorded. Read all required files in full normally.
|
|
101
103
|
|
|
102
104
|
This optimization only skips re-reading tasks.md in full. proposal.md and design.md contain the full context needed for verification checks and must not be skipped due to hash match.
|
|
@@ -116,7 +118,7 @@ Run these 6 checks:
|
|
|
116
118
|
5. No obvious security issues (no hardcoded keys, no new unsafe operations)
|
|
117
119
|
6. Code review strategy: when `review_mode: standard` or `thorough`, use the Skill tool to load the Superpowers `requesting-code-review` skill and request a lightweight review that checks only correctness, security, and edge cases; when `review_mode: off`, skip automatic code review and record the skip reason in the verification report
|
|
118
120
|
|
|
119
|
-
The lightweight code review input should be limited to this change's diff, tasks.md, and necessary test results; the review scope covers implementation correctness, security risk, and edge cases only, and does not perform spec coverage, Design Doc consistency, or drift checks. If the review finds CRITICAL or IMPORTANT issues,
|
|
121
|
+
The lightweight code review input should be limited to this change's diff, tasks.md, and necessary test results; the review scope covers implementation correctness, security risk, and edge cases only, and does not perform spec coverage, Design Doc consistency, or drift checks. If the review finds CRITICAL or IMPORTANT issues, follow Step 1b automatic repair and retry handling. `review_mode: off` only skips automatic code review, not build, test, security checks, or debug gate protocol.
|
|
120
122
|
|
|
121
123
|
If the project has no automatically inferred verification command, the user or Agent must run the real verification command first, then record its evidence separately:
|
|
122
124
|
|
|
@@ -130,10 +132,9 @@ comet state record-check <change-name> verify --command "<actual verification co
|
|
|
130
132
|
|
|
131
133
|
**Pass criteria**: All 6 items OK, no CRITICAL or IMPORTANT issues.
|
|
132
134
|
|
|
133
|
-
**When not passing**: Report failures
|
|
135
|
+
**When not passing**: Report failures and classify them under Step 1b. Below the automatic retry limit, when an issue must or should be repaired, run the following command directly and invoke `/comet-build`:
|
|
134
136
|
|
|
135
137
|
```bash
|
|
136
|
-
# Execute only after user confirms fix
|
|
137
138
|
comet state transition <change-name> verify-fail
|
|
138
139
|
```
|
|
139
140
|
|
|
@@ -160,10 +161,9 @@ After the skill loads, follow its guidance to verify. Check items:
|
|
|
160
161
|
6. No contradictions between delta spec and design doc (if Build phase had incremental spec modifications, check if design doc has corresponding records)
|
|
161
162
|
7. Associated design documents under `docs/superpowers/specs/` are locatable (file exists and is related to current change)
|
|
162
163
|
|
|
163
|
-
When verification does not pass
|
|
164
|
+
When verification does not pass, report missing items and classify them under Step 1b. Below the automatic retry limit, when the current change can supply the missing evidence, run the following command directly and invoke `/comet-build`:
|
|
164
165
|
|
|
165
166
|
```bash
|
|
166
|
-
# Execute only after user confirms fix
|
|
167
167
|
comet state transition <change-name> verify-fail
|
|
168
168
|
```
|
|
169
169
|
|
|
@@ -173,46 +173,24 @@ comet state transition <change-name> verify-fail
|
|
|
173
173
|
- Option B: After user selects B, run `comet state transition <change-name> verify-fail`, then invoke `/comet-build`; `/comet-build`'s Spec Incremental Update rules will load the Superpowers `brainstorming` skill to update Design Doc + delta spec
|
|
174
174
|
- Option C: Confirm deviation is acceptable, continue verification (design doc will be marked as `superseded-by-main-spec` during archiving)
|
|
175
175
|
|
|
176
|
-
### 3.
|
|
177
|
-
|
|
178
|
-
**Immediately execute:** Use the Skill tool to load the Superpowers `finishing-a-development-branch` skill. Skipping this step is prohibited.
|
|
179
|
-
|
|
180
|
-
If the Superpowers `finishing-a-development-branch` skill is unavailable, stop the process and prompt to install or enable Superpowers skills. Do not substitute this step with normal conversation.
|
|
181
|
-
|
|
182
|
-
After the skill loads, follow its guidance to finish. Branch handling options:
|
|
183
|
-
1. Merge to main branch locally
|
|
184
|
-
2. Push and create PR
|
|
185
|
-
3. Keep branch (handle later)
|
|
186
|
-
4. Discard work
|
|
176
|
+
### 3. Record Verification Evidence
|
|
187
177
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
**Confirmation items**:
|
|
191
|
-
- All tests pass
|
|
192
|
-
- No hardcoded keys or security issues
|
|
193
|
-
|
|
194
|
-
### 4. Record Verification Evidence
|
|
195
|
-
|
|
196
|
-
Verification report must be saved to disk and recorded in `.comet.yaml`; after branch handling completes, state fields must also be written. Do not manually set `verify_result: pass`; use guard for auto-transition.
|
|
178
|
+
Save the verification report and record it in `.comet.yaml`. Do not handle, merge, or discard branches in verify and do not write `branch_status: handled`: archive creates spec and metadata changes that belong in the final commit, so `/comet-archive` owns branch finishing after that commit. Do not set `verify_result: pass` manually; use the phase guard.
|
|
197
179
|
|
|
198
180
|
```bash
|
|
199
|
-
mkdir -p docs/superpowers/reports
|
|
200
|
-
# Write verification conclusions to report file, e.g.:
|
|
201
|
-
# docs/superpowers/reports/YYYY-MM-DD-<change-name>-verify.md
|
|
202
|
-
|
|
203
181
|
comet state set <change-name> verification_report docs/superpowers/reports/YYYY-MM-DD-<change-name>-verify.md
|
|
204
|
-
comet state set <change-name> branch_status handled
|
|
205
182
|
```
|
|
206
183
|
|
|
184
|
+
Use the host's file API to create `docs/superpowers/reports/` and the report file; do not depend on a POSIX-only directory command.
|
|
185
|
+
|
|
207
186
|
## Exit Conditions
|
|
208
187
|
|
|
209
188
|
- Verification report passed
|
|
210
|
-
- Branch handled
|
|
211
189
|
- `verification_report` in `.comet.yaml` points to an existing verification report file
|
|
212
|
-
- `branch_status
|
|
190
|
+
- `branch_status` remains `pending`
|
|
213
191
|
- **Phase guard**: Run `comet guard <change-name> verify --apply`; after all PASS, auto-transitions to `phase: archive` through `comet state transition verify-pass`
|
|
214
192
|
|
|
215
|
-
After
|
|
193
|
+
After verification evidence is complete, run guard for auto-transition:
|
|
216
194
|
|
|
217
195
|
```bash
|
|
218
196
|
comet guard <change-name> verify --apply
|
|
@@ -233,7 +211,7 @@ comet state next <change-name>
|
|
|
233
211
|
```
|
|
234
212
|
|
|
235
213
|
- `NEXT: auto` → invoke the skill pointed to by `SKILL` to enter the next phase
|
|
236
|
-
- `NEXT: manual` → do not invoke the next skill;
|
|
214
|
+
- `NEXT: manual` → do not invoke the next skill; return control with `HINT`, end the invocation, and do not create another confirmation point
|
|
237
215
|
- `NEXT: done` → workflow is complete, no further action needed
|
|
238
216
|
|
|
239
217
|
Note: after `comet-archive` starts, it must first execute the final archive confirmation blocking point and wait for the user to explicitly choose "Confirm archive" before running the archive script. Must not automatically archive just because verification passed.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: comet
|
|
3
|
-
description: "
|
|
3
|
+
description: "用于用户明确调用 /comet、要求启动或恢复 Comet 托管工作流,或仓库中存在可无歧义恢复的 active Comet change;负责通过 intent runtime 和 .comet.yaml 路由阶段。"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Comet — OpenSpec + Superpowers 双星开发流程
|
|
@@ -22,7 +22,7 @@ agent 做决策只需读本节,参考附录按需查阅。
|
|
|
22
22
|
|
|
23
23
|
### 输出语言规则
|
|
24
24
|
|
|
25
|
-
所有 OpenSpec 和 Superpowers 产物都必须使用 Comet 配置的产物语言。配置值是规范化语言 ID,`en` 或 `zh-CN`。已有 change 优先通过 `
|
|
25
|
+
所有 OpenSpec 和 Superpowers 产物都必须使用 Comet 配置的产物语言。配置值是规范化语言 ID,`en` 或 `zh-CN`。已有 change 优先通过 `comet state get <name> language` 读取 `openspec/changes/<name>/.comet.yaml` 中的 `language`;`.comet.yaml` 尚不存在时依次读取项目 `.comet/config.yaml` 和全局 `~/.comet/config.yaml` 的 `language`;都不存在时才回退到当前用户请求语言。调用外部 OpenSpec/Superpowers skill 时,必须把解析后的语言显式写入 prompt 或 ARGUMENTS。
|
|
26
26
|
|
|
27
27
|
### 阶段自动检测
|
|
28
28
|
|
|
@@ -126,22 +126,22 @@ node "$COMET_RESUME_PROBE" probe --stdin
|
|
|
126
126
|
- 每次恢复上下文时,先重新执行 Step 0 和 Step 1,不依赖对话历史判断阶段
|
|
127
127
|
- 只要存在 active change 且工作区有未提交改动,必须按 `comet/reference/dirty-worktree.md` 协议处理。该协议定义了检查步骤、归因分类和禁令,本文件不重复
|
|
128
128
|
- 若 `phase: build`,先检查 `build_pause`、`plan`、`isolation`、`build_mode`、`tdd_mode` 和 `review_mode`(详见下方):
|
|
129
|
-
- 若 `build_pause: plan-ready` 但 `isolation`、`build_mode`、`tdd_mode` 和 `review_mode` 都已经设置,则视为 stale pause:先输出 `[COMET] 检测到 stale pause(build_pause=plan-ready 但 isolation/build_mode/tdd_mode/review_mode 已设置),自动清除并继续`,再运行 `
|
|
129
|
+
- 若 `build_pause: plan-ready` 但 `isolation`、`build_mode`、`tdd_mode` 和 `review_mode` 都已经设置,则视为 stale pause:先输出 `[COMET] 检测到 stale pause(build_pause=plan-ready 但 isolation/build_mode/tdd_mode/review_mode 已设置),自动清除并继续`,再运行 `comet state set <name> build_pause null`,然后读取 tasks.md 的下一个未勾选任务并按 `build_mode` 恢复执行
|
|
130
130
|
- 若 `build_pause: plan-ready` 且 plan 文件存在,但 `isolation`、`build_mode`、`tdd_mode` 或 `review_mode` 尚未设置,回到 `/comet-build` 的 plan-ready 恢复点,提示用户继续补齐/确认工作区隔离、执行方式、TDD 模式和代码审查模式,不重新生成 plan
|
|
131
131
|
- 若 `build_pause: plan-ready` 但 plan 文件缺失,回到 `/comet-build` 处理状态损坏或重新生成 plan
|
|
132
132
|
- 若 `isolation`、`build_mode`、`tdd_mode` 或 `review_mode` 未设置,回到 `/comet-build` 对应步骤补充后再执行
|
|
133
133
|
- 若均已设置,读取 tasks.md 的下一个未勾选任务,并按 `build_mode` 恢复执行:
|
|
134
134
|
- 若 `build_mode: subagent-driven-development`,不得在主窗口直接执行任务;必须回到 `/comet-build` 的后台 subagent 调度规则,由主窗口只做协调
|
|
135
135
|
- 其他执行方式按 `/comet-build` 的对应规则继续
|
|
136
|
-
- 若 `
|
|
137
|
-
- 若 `phase: open` 但
|
|
138
|
-
- 若 `phase: archive`,只允许调用 `/comet-archive
|
|
136
|
+
- 若 `verify_result: fail`,读取 `verify_failures`:未超过 3 次时直接调用 `/comet-build` 继续已记录的修复循环,不重复询问;超过自动修复上限时回到 `/comet-verify` 的例外决策点。只有接受 WARNING/SUGGESTION 偏差或超限后的继续/停止策略需要用户选择
|
|
137
|
+
- 若 `phase: open` 但 OpenSpec `applyRequires` 已完整,先运行 `comet guard <change-name> open --apply` 修正状态,再继续判定
|
|
138
|
+
- 若 `phase: archive`,只允许调用 `/comet-archive`;归档前先等待最终确认,归档后精确提交归档改动,再处理分支并运行 archive guard
|
|
139
139
|
|
|
140
140
|
**Step 2: 阶段判定**(按顺序,命中即停)
|
|
141
141
|
|
|
142
142
|
1. `archived: true` 或 change 已移入 archive → 流程已完成
|
|
143
143
|
2. `verify_result: pass` 且 `archived` 不是 `true` → `/comet-archive`(先进行归档前最终确认)
|
|
144
|
-
3. `verify_result: fail` →
|
|
144
|
+
3. `verify_result: fail` → 自动调用 `/comet-build` 继续修复;若 `verify_failures` 已超过自动修复上限,则进入 `/comet-verify` 的超限策略决策点
|
|
145
145
|
4. `phase: verify` 或 tasks.md 全部勾选 → `/comet-verify`
|
|
146
146
|
5. `phase: build` 或已有 Design Doc 但计划/执行未完成 → 优先按 workflow 路由:`hotfix` → `/comet-hotfix`,`tweak` → `/comet-tweak`,`full` → `/comet-build`
|
|
147
147
|
6. `phase: design` 或有 change 但无 Design Doc → `/comet-design`
|
|
@@ -156,11 +156,11 @@ hotfix/tweak 的范围判定采用三层分工,避免「用纯文件数当硬
|
|
|
156
156
|
|
|
157
157
|
1. **质变信号**(agent 语义识别,命中任一即暂停交用户二选一):跨模块协调修改、需要新增 capability、数据库 schema 变更、引入新的 public API、触及深层架构问题(各预设沿用这套核心信号,并可追加自身语境的特有信号,如 tweak 的「需要拆分为多个 OpenSpec changes」)
|
|
158
158
|
2. **文件数 tripwire**(用户拍板,非自动升级):改动文件数超提示阈值时,暂停交用户决定继续预设流程还是升级 full,不自动踢
|
|
159
|
-
3. **验证级别**(scale 脚本判定):`comet
|
|
159
|
+
3. **验证级别**(scale 脚本判定):`comet state scale` 仅决定 `verify_mode`(验证轻重),不卡流程、不触发升级
|
|
160
160
|
|
|
161
161
|
**升级决策点(用户二选一)**:
|
|
162
162
|
- 继续预设轻量流程(用户确认范围可控)
|
|
163
|
-
- 升级为完整 `/comet`(使用 `
|
|
163
|
+
- 升级为完整 `/comet`(使用 `comet state transition <name> preset-escalate` 合法回退到 design 阶段,同时清除预设专属的 build 配置;补 Design Doc 后重新联合选择完整工作方式)
|
|
164
164
|
|
|
165
165
|
详细判定规则见 `comet-hotfix` / `comet-tweak` 各自的「升级判定」章节。
|
|
166
166
|
|
|
@@ -170,7 +170,8 @@ hotfix/tweak 的范围判定采用三层分工,避免「用纯文件数当硬
|
|
|
170
170
|
|------|---------|
|
|
171
171
|
| `openspec list --json` 失败 | 检查 openspec 是否已安装,提示 `openspec init` |
|
|
172
172
|
| 子 skill 不可用 | 停止流程,提示安装或启用对应 skill |
|
|
173
|
-
| `.comet.yaml`
|
|
173
|
+
| `.comet.yaml` 缺失 | 进入对应 preset 的 `/comet-open` 初始化状态,再运行 `comet state select`;不得跳过初始化 |
|
|
174
|
+
| `.comet.yaml` 格式异常 | 停止并报告解析错误;从版本控制、备份或可验证产物人工修复,不能用 `comet state set` 覆盖损坏文件 |
|
|
174
175
|
| 构建/测试失败 | 返回 build 阶段修复,不进入 verify |
|
|
175
176
|
| change 目录结构不完整 | 按 `comet-open` 产物要求补齐 |
|
|
176
177
|
|
|
@@ -183,20 +184,21 @@ hotfix/tweak 的范围判定采用三层分工,避免「用纯文件数当硬
|
|
|
183
184
|
|
|
184
185
|
**连续执行要求**:从检测到的阶段开始,agent 自动推进后续阶段。但**自动推进仅适用于没有用户决策的衔接点**。遇到用户决策点时,**必须使用当前平台可用的用户输入/确认机制暂停并等待用户明确回复**,不得用推荐规则、默认值或历史偏好代替用户确认,也不得仅输出文字提示后继续执行。
|
|
185
186
|
|
|
186
|
-
**阶段推进与自动衔接的区分**:每个子 skill 退出前都会运行阶段守卫 `--apply` 推进 `.comet.yaml` 的 `phase` 字段——这一步**始终发生**,与 `auto_transition` 无关。之后子 skill 运行 `
|
|
187
|
+
**阶段推进与自动衔接的区分**:每个子 skill 退出前都会运行阶段守卫 `--apply` 推进 `.comet.yaml` 的 `phase` 字段——这一步**始终发生**,与 `auto_transition` 无关。之后子 skill 运行 `comet state next <name>` 解析下一步:`auto_transition` 不为 `false` 时输出 `NEXT: auto`(自动调用下一 skill),为 `false` 时输出 `NEXT: manual`(不调用下一 skill,按 `HINT` 交还控制权)。`NEXT: manual` 不是用户决策点,不得再询问“是否继续”。因此 `auto_transition` **只控制是否自动调用下一个 skill,不影响 phase 推进**。无论 `auto_transition` 取何值,下方真正的用户决策点都必须阻塞等待。
|
|
187
188
|
|
|
188
189
|
**决策点是阻塞点**:只要到达下列任一节点,当前 `/comet` 调用必须停住,并按 `comet/reference/decision-point.md` 的协议获取用户明确选择。用户明确选择后才能写入对应状态字段、执行对应操作,随后再继续自动流转。
|
|
189
190
|
|
|
190
191
|
需要用户参与的节点(仅在这些节点暂停):
|
|
191
|
-
1.
|
|
192
|
-
2.
|
|
193
|
-
3.
|
|
194
|
-
4.
|
|
195
|
-
5.
|
|
192
|
+
1. workflow 目标选择:多个 active changes、继续现有 change/创建新 change、或批量拆分完成后选择先启动哪一个
|
|
193
|
+
2. open 阶段 proposal/design/tasks 最终审视确认(同时确认 change 名称与范围;清晰请求不做前置摘要/命名确认)
|
|
194
|
+
3. brainstorming 确认设计方案
|
|
195
|
+
4. build 阶段一次性联合选择 plan-ready 暂停或完整工作方式(可用的工作区隔离 + 执行方式 + TDD 模式 + 代码审查模式;选择 branch 时同时确认分支名)
|
|
196
|
+
5. verify 阶段接受 WARNING/SUGGESTION 偏差、处理 Spec 漂移,或第 4 次失败后选择继续修复/停止;前 3 次明确可修复失败自动闭环
|
|
196
197
|
6. archive 阶段执行归档脚本前的最终确认
|
|
197
|
-
7.
|
|
198
|
-
8.
|
|
199
|
-
9.
|
|
198
|
+
7. 归档改动精确提交后选择 finishing-branch 分支处理方式
|
|
199
|
+
8. 遇到升级判定信号(hotfix/tweak → 用户二选一:继续预设流程 / 升级完整流程)
|
|
200
|
+
9. build 阶段范围扩张需重新设计或拆分新 change
|
|
201
|
+
10. open 阶段大型 PRD 是否拆分为多个 changes
|
|
200
202
|
|
|
201
203
|
agent 不应跳过这些决策点;其他明确无歧义的阶段衔接必须自动继续推进,不得中途退出。到达决策点时,**禁止跳过用户确认或自动选择——必须通过当前平台可用的用户输入/确认机制明确获取用户选择后才能继续**。
|
|
202
204
|
|
|
@@ -220,8 +222,8 @@ agent 不应跳过这些决策点;其他明确无歧义的阶段衔接必须
|
|
|
220
222
|
| `/comet-open` | 1. 开启 | OpenSpec | proposal.md、design.md、tasks.md |
|
|
221
223
|
| `/comet-design` | 2. 深度设计 | Superpowers | Design Doc、delta spec |
|
|
222
224
|
| `/comet-build` | 3. 计划与构建 | Superpowers | 实施计划、代码提交 |
|
|
223
|
-
| `/comet-verify` | 4.
|
|
224
|
-
| `/comet-archive` | 5.
|
|
225
|
+
| `/comet-verify` | 4. 验证 | Both | 验证报告 |
|
|
226
|
+
| `/comet-archive` | 5. 归档与收尾 | OpenSpec | delta→main spec 同步、design doc 标注、归档提交、分支处理 |
|
|
225
227
|
| `/comet-hotfix` | 预设路径 | Both | 快速修复(跳过 brainstorming) |
|
|
226
228
|
| `/comet-tweak` | 预设路径 | Both | 串联 OpenSpec 的中等改动(delta spec 为一等公民,跳过 brainstorming 和完整 plan) |
|
|
227
229
|
|
|
@@ -254,24 +256,24 @@ agent 不应跳过这些决策点;其他明确无歧义的阶段衔接必须
|
|
|
254
256
|
|
|
255
257
|
### 状态机硬约束
|
|
256
258
|
|
|
257
|
-
- `build → verify` 前,`isolation` 必须是 `branch` 或 `worktree`
|
|
259
|
+
- `build → verify` 前,`isolation` 必须是 `current`、`branch` 或 `worktree`;`current` 只能来自用户显式选择并绑定当前分支
|
|
258
260
|
- `build → verify` 前,`build_mode` 必须已选择
|
|
259
261
|
- `build_mode: subagent-driven-development` 必须同时有 `subagent_dispatch: confirmed`
|
|
260
262
|
- full workflow 离开 build 阶段前 `tdd_mode` 必须已选择为 `tdd` 或 `direct`
|
|
261
263
|
- full workflow 离开 build 阶段前 `review_mode` 必须已选择为 `off`、`standard` 或 `thorough`
|
|
262
264
|
- `build_mode: direct` 默认只允许 `hotfix` / `tweak`;full workflow 需要 `direct_override: true`
|
|
263
265
|
- `build_pause` 不是执行方式,不得写入 `build_mode`
|
|
264
|
-
-
|
|
266
|
+
- 这些约束同时由 `comet guard <name> build --apply` 和 `comet state transition <name> build-complete` 执行
|
|
265
267
|
|
|
266
268
|
### 脚本定位
|
|
267
269
|
|
|
268
|
-
|
|
270
|
+
面向 workflow 的状态、守卫、handoff 和 archive 操作统一使用稳定 `comet` CLI;只有尚无公开子命令的 intent/resume probe 才按 `comet/reference/scripts.md` 定位内部 launcher。关键入口:
|
|
269
271
|
|
|
270
272
|
```bash
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
273
|
+
comet guard <change-name> <phase> --apply # 阶段守卫 + 自动状态更新
|
|
274
|
+
comet state transition <change-name> <event> # open-complete | design-complete | build-complete | verify-pass | verify-fail
|
|
275
|
+
comet state next <change-name> # NEXT: auto|manual|done + SKILL: <skill-name>
|
|
276
|
+
comet archive <change-name> # 一键完成归档
|
|
275
277
|
```
|
|
276
278
|
|
|
277
279
|
### 文件结构
|
|
@@ -20,8 +20,10 @@ tdd_mode: tdd
|
|
|
20
20
|
review_mode: standard
|
|
21
21
|
auto_transition: true
|
|
22
22
|
isolation: branch
|
|
23
|
+
bound_branch: null
|
|
23
24
|
verify_mode: light
|
|
24
25
|
verify_result: pending
|
|
26
|
+
verify_failures: 0
|
|
25
27
|
verification_report: null
|
|
26
28
|
branch_status: pending
|
|
27
29
|
created_at: 2026-05-26
|
|
@@ -43,14 +45,16 @@ archived: false
|
|
|
43
45
|
| `build_mode` | 已选择的执行方式,可为空。取值:`subagent-driven-development`(隔离后台 subagent 逐任务实现并审查)、`executing-plans`(主会话按计划顺序执行)、`direct`(主会话直接编码,默认仅 hotfix/tweak 允许,full workflow 需 `direct_override: true`) |
|
|
44
46
|
| `build_pause` | build 阶段内部暂停点。`null` 表示无暂停,`plan-ready` 表示 plan 已生成,用户选择切换模型后暂停 |
|
|
45
47
|
| `subagent_dispatch` | `null` 或 `confirmed`。仅当已确认当前平台存在真实后台 subagent / Task / multi-agent 调度能力时,`build_mode: subagent-driven-development` 才能写入并用于离开 build 阶段 |
|
|
46
|
-
| `tdd_mode` | `tdd` 或 `direct`。full workflow 离开 build 阶段前必须已选择。`tdd` 强制每个任务先写失败测试再实现;`direct`
|
|
48
|
+
| `tdd_mode` | `tdd` 或 `direct`。full workflow 离开 build 阶段前必须已选择。`tdd` 强制每个任务先写失败测试再实现;`direct` 不强制逐任务 TDD,但仍需相关测试与 bug 回归证据。hotfix/tweak 默认 `direct` |
|
|
47
49
|
| `review_mode` | `off`、`standard` 或 `thorough`。full workflow 离开 build 阶段前必须已选择;hotfix/tweak 默认 `off` |
|
|
48
|
-
| `isolation` | `branch` 或 `worktree
|
|
50
|
+
| `isolation` | `current`、`branch` 或 `worktree`。full 初始化可为 `null`,离开 build 前必须由用户显式选择 `current`、实际创建/选择 `branch`,或实际创建/选择 `worktree`;hotfix/tweak 在入口用户决策点后也可如实使用三种模式,不得在未创建分支时虚构为 `branch` |
|
|
51
|
+
| `bound_branch` | 工作区分支绑定记录,可为空。`isolation: current` / `branch` / `worktree` 首次设置或入口检查时记录命令执行目录所在的当前 Git 分支(worktree 模式请在对应工作区内执行 set/check/guard,否则会绑定/比对错误的分支);在不同工作区模式之间切换 `isolation` 会重新绑定到当前分支,重复设置同一模式保持原绑定。后续 `comet state select` / `comet state check` 必须确认绑定分支与当前分支一致;漂移时 `select` 直接拒绝、检查进入 `BLOCKED`,按决策点协议让用户选择切回绑定分支或明确确认后运行 `comet state rebind <change-name>`。清空 `isolation` 时会清空该字段 |
|
|
49
52
|
| `verify_mode` | `light` 或 `full`,可为空 |
|
|
50
53
|
| `auto_transition` | `true` 或 `false`。只控制阶段守卫推进 phase 后是否自动调用下一个 skill;`false` 时由 `comet-state next` 输出 `manual`,暂停下一 skill 调用,但不阻止 phase 字段更新 |
|
|
51
54
|
| `verify_result` | `pending`、`pass` 或 `fail` |
|
|
55
|
+
| `verify_failures` | 机器维护的连续验证失败次数;`verify-fail` 自动加一,`verify-pass` 或 `archive-reopen` 重置为 `0`。达到 `3` 后下一次失败必须进入超限策略决策 |
|
|
52
56
|
| `verification_report` | 验证报告文件路径,verify 通过前必须指向已存在文件 |
|
|
53
|
-
| `branch_status` | `pending` 或 `handled
|
|
57
|
+
| `branch_status` | `pending` 或 `handled`。verify 和 archive 执行期间保持 `pending`;归档改动提交且用户选择的分支处理完成后设为 `handled` |
|
|
54
58
|
| `created_at` | change 创建日期(init 时自动写入),格式 `YYYY-MM-DD` |
|
|
55
59
|
| `verified_at` | 验证通过时间,可为空 |
|
|
56
60
|
| `archive_confirmation` | `null`、`pending` 或 `confirmed`。`verify-pass` 进入 archive 阶段时写入 `pending`;用户在 `/comet-archive` 最终确认选择「确认归档」后,`archive-confirm` transition 写入 `confirmed`;`archive-reopen` 会清空该字段,防止复用旧确认 |
|
|
@@ -64,7 +68,7 @@ archived: false
|
|
|
64
68
|
|
|
65
69
|
## 状态机硬约束
|
|
66
70
|
|
|
67
|
-
- `build → verify` 前,`isolation` 必须是 `branch` 或 `worktree`
|
|
71
|
+
- `build → verify` 前,`isolation` 必须是 `current`、`branch` 或 `worktree`
|
|
68
72
|
- `build → verify` 前,`build_mode` 必须已选择
|
|
69
73
|
- `build_mode: subagent-driven-development` 必须同时有 `subagent_dispatch: confirmed`
|
|
70
74
|
- full workflow 离开 build 阶段前 `tdd_mode` 必须已选择为 `tdd` 或 `direct`
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
用户可能直接从 `/comet-open`、`/comet-design`、`/comet-build`、`/comet-verify`、`/comet-archive`、`/comet-hotfix` 或 `/comet-tweak` 回到流程。进入任意子 Skill 时,都先按 `comet/reference/scripts.md` 定位脚本,再用当前子 Skill 对应 phase 运行入口检查或恢复检查。不得依赖对话历史判断阶段。
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
|
-
|
|
12
|
+
comet state check <change-name> <phase> --recover
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
若检查结果显示实际 phase、workflow 或 evidence 应由其他 Skill 处理,按脚本输出和 `/comet` 路由规则切换;不要在错误阶段继续补写状态。若存在未提交改动,先按 `comet/reference/dirty-worktree.md` 归因。
|
|
@@ -27,7 +27,7 @@ node "$COMET_RESUME_PROBE" probe --stdin
|
|
|
27
27
|
## 恢复步骤
|
|
28
28
|
|
|
29
29
|
```bash
|
|
30
|
-
|
|
30
|
+
comet state check <change-name> <phase> --recover
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
脚本输出结构化恢复上下文(phase、已完成字段、待完成字段、恢复动作)。按 **Recovery action** 决定下一步。
|