Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@rpamis/comet

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rpamis/comet - npm Package Compare versions

Comparing version
0.3.0
to
0.3.1
+1
-1
assets/manifest.json
{
"version": "0.2.6",
"version": "0.3.1",
"skills": [

@@ -4,0 +4,0 @@ "comet/SKILL.md",

@@ -61,6 +61,8 @@ ---

### 3. 工作区隔离
### 3. 选择工作方式
计划已写入当前分支。在开始执行前,选择工作区隔离方式:
计划已写入当前分支。在开始执行前,**一次性询问用户**选择工作区隔离方式和执行方式:
**工作区隔离**:
| 选项 | 方式 | 说明 |

@@ -75,27 +77,4 @@ |------|------|------|

用户选择后,更新 `isolation` 字段。`isolation` 只允许以下值之一:
**执行方式**:
```bash
bash "$COMET_STATE" set <name> isolation <value>
```
- `branch`
- `worktree`
<IMPORTANT>
这是脚本级硬约束,不是建议。full workflow 初始化时 `isolation` 可以暂时为 `null`,但只允许存在到本步骤之前。
进入实现前必须停下来询问用户并写入 `branch` 或 `worktree`。若保持 `null`,`build → verify` 的 guard 和 `comet-state transition build-complete` 都会失败。
</IMPORTANT>
**执行隔离**:
- **branch**:执行 `git checkout -b <change-name>`,后续工作在新分支上进行
- **worktree**:调用 `superpowers:using-git-worktrees` 技能或使用原生 `EnterWorktree` 工具创建隔离工作区
创建隔离后,确认计划文件可访问(分支方式天然可访问;worktree 方式需确认计划已提交)。
### 4. 选择执行方式
向用户展示计划摘要(任务数、涉及模块),然后询问执行方式:
| 选项 | 技能 | 适用场景 |

@@ -106,3 +85,3 @@ |------|------|---------|

**推荐规则**:
**执行方式推荐规则**:
- 任务数 ≥ 3 → 推荐 A

@@ -112,13 +91,14 @@ - 任务数 ≤ 2 且无跨模块依赖 → 推荐 B

用户选择后,更新 `build_mode` 字段。`build_mode` 只允许以下值之一:
这是用户决策点。必须暂停并等待用户明确选择隔离方式和执行方式,**不得根据推荐规则自行选择 `branch` 或 `worktree`**,也**不得根据推荐规则自行选择执行方式**。推荐规则只能用于说明建议,不能替代用户确认。
用户选择后,更新 `isolation` 和 `build_mode` 字段:
```bash
bash "$COMET_STATE" set <name> build_mode <value>
bash "$COMET_STATE" set <name> isolation <branch|worktree>
bash "$COMET_STATE" set <name> build_mode <subagent-driven-development|executing-plans|direct>
```
- `subagent-driven-development`
- `executing-plans`
- `direct`(默认仅 hotfix/tweak preset 使用)
`isolation` 是脚本级硬约束。full workflow 初始化时可以为 `null`,但只允许存在到本步骤之前。若保持 `null`,`build → verify` 的 guard 和 `comet-state transition build-complete` 都会失败。
full workflow 不得默认使用 `direct`。只有用户明确要求跳过计划执行技能,且你已记录显式 override 时,才允许:
`build_mode` 默认仅 hotfix/tweak preset 使用 `direct`。full workflow 不得默认使用 `direct`。只有用户明确要求跳过计划执行技能,且你已记录显式 override 时,才允许:

@@ -132,4 +112,11 @@ ```bash

然后,**立即执行:** 使用 Skill 工具加载对应技能。禁止跳过此步骤。
**执行隔离**:
- **branch**:执行 `git checkout -b <change-name>`,后续工作在新分支上进行
- **worktree**:必须使用 Skill 工具加载 `superpowers:using-git-worktrees` 技能创建隔离工作区。禁止用普通 shell 命令或原生工具绕过该技能;如该技能不可用,停止流程并提示安装或启用 Superpowers 技能。
创建隔离后,确认计划文件可访问(分支方式天然可访问;worktree 方式需确认计划已提交)。
**加载执行技能**:使用 Skill 工具加载对应技能。禁止跳过此步骤。
如所选 Superpowers 技能不可用,停止流程并提示安装或启用对应技能,不要用普通对话替代该步骤。

@@ -142,3 +129,3 @@

### 5. Spec 增量更新
### 4. Spec 增量更新

@@ -150,7 +137,9 @@ 实施过程中发现初版 spec 不完整时,按变更规模分级处理:

| 小 | 遗漏验收场景、边界条件 | 直接编辑 delta spec + design.md,追加 tasks.md 任务 |
| 中 | 接口变更、新增组件、数据流变化 | 重新 `superpowers:brainstorming` 更新 Design Doc + delta spec |
| 大 | 全新 capability 需求 | `/opsx:new` 创建独立 change |
| 中 | 接口变更、新增组件、数据流变化 | 暂停并等待用户确认后,必须使用 Skill 工具加载 `superpowers:brainstorming` 更新 Design Doc + delta spec |
| 大 | 全新 capability 需求 | 必须暂停并等待用户确认拆分;用户确认后,通过 `/comet-open` 创建独立 change |
**50% 阈值判定**:以 tasks.md 初始任务总数为基准,若新增任务数超过该总数的一半,视为超出原计划范围,应考虑拆分为新 change。
**50% 阈值判定**:以 tasks.md 初始任务总数为基准,若新增任务数超过该总数的一半,视为超出原计划范围,必须暂停并等待用户决定是否拆分为新 change。
创建独立 change 时必须调用 `/comet-open`,不得直接调用 `/opsx:new`。`/comet-open` 会同时创建 OpenSpec 产物和 `.comet.yaml`,避免新 change 脱离 Comet 状态机。
**原则**:

@@ -162,3 +151,3 @@ - delta spec 是活文档,本阶段期间随时可修改

### 6. 上下文管理
### 5. 上下文管理

@@ -170,3 +159,3 @@ Build 是最长阶段,可能跨越大量任务。为支持上下文压缩后断点恢复:

- **用户手动修改恢复**:按 `comet/reference/dirty-worktree.md` 协议处理未提交改动。该协议定义了检查步骤、归因分类和禁令。build 阶段的特殊处理:
1. 归因后,若 diff 暗示计划或 spec 已变化,按 Step 5「Spec 增量更新」分级处理
1. 归因后,若 diff 暗示计划或 spec 已变化,按 Step 4「Spec 增量更新」分级处理
- **长任务拆分**:单任务超过 200 行代码变更时,考虑拆分为多个子任务分别提交

@@ -173,0 +162,0 @@

@@ -95,9 +95,24 @@ ---

技能加载后,按其指引产出:
- `docs/superpowers/specs/YYYY-MM-DD-<topic>-design.md` — 设计文档(技术 RFC)
- 如需补充验收场景,回写 `openspec/changes/<name>/specs/<capability>/spec.md` — OpenSpec delta 能力规格
技能加载后,按其指引产出设计方案(以对话形式呈现):
- 技术方案:架构、数据流、关键技术选型与风险
- 测试策略
- 如需补充验收场景,标明将回写的 delta spec 变更
brainstorming 阶段不写入 Design Doc 文件,仅产出设计方案供 Step 1c 用户确认。确认后才创建 `docs/superpowers/specs/YYYY-MM-DD-<topic>-design.md` 并回写 delta spec。
### 1c. 用户确认设计方案(阻塞点)
brainstorming 产出设计方案后,**必须暂停并等待用户明确确认设计方案**。不得在用户确认前创建最终 Design Doc、写入 `design_doc`、运行 design guard,或进入 `/comet-build`。
暂停时只展示必要摘要:
- 采用的技术方案
- 关键取舍与风险
- 测试策略
- 如有 Spec Patch,列出将回写的 delta spec 变更
用户明确确认后,才继续 Step 2。若用户要求调整,继续 brainstorming 迭代,直到用户确认。
### 2. 更新 Comet 状态
先记录 design_doc 路径,再运行 guard 自动流转:
先记录 design_doc 路径。如果 Step 1c 回写了 delta spec(新增或修改了 `specs/*/spec.md`),必须重新生成 handoff 以更新 hash:

@@ -108,2 +123,5 @@ ```bash

# 如有 delta spec 变更,重新生成 handoff(更新 hash)
bash "$COMET_HANDOFF" <change-name> design --write
# 自动流转到下一阶段

@@ -113,3 +131,3 @@ bash "$COMET_GUARD" <change-name> design --apply

状态文件自动更新,无需手动编辑其他字段。
如果没有 delta spec 变更,跳过 handoff 重新生成步骤。状态文件自动更新,无需手动编辑其他字段。

@@ -116,0 +134,0 @@ ## 退出条件

@@ -78,10 +78,3 @@ ---

3. 全部任务完成后,显式运行项目相关测试和构建命令
4. 运行阶段守卫完成 build → verify 过渡:
```bash
bash "$COMET_GUARD" <change-name> build --apply
```
状态文件自动更新为 `phase: verify`、`verify_result: pending`,然后进入验证。
**如修复影响已有 spec 验收场景**:

@@ -91,18 +84,26 @@ - 在 `openspec/changes/<name>/specs/<capability>/spec.md` 创建 delta spec

### 3a. Hotfix 专属检查:根因消除
### 3. 根因消除检查
**在加载 comet-verify 之前执行**,确保修复确实消除了问题根因:
**在运行 build guard 之前执行**,确保修复确实消除了问题根因:
1. 读取 proposal.md 中的 bug 描述和根因
2. 搜索验证问题代码不再存在
3. 如根因未消除,返回 Step 2 继续修复
3. 如根因未消除,回到 Step 2 继续修复(此时仍在 build 阶段,无需状态回退)
**升级条件**:
- 根因消除检查发现深层架构问题 → 停止 hotfix,升级为 `/comet`
- 修复需要额外接口变更 → 停止 hotfix,升级为 `/comet`
- 根因消除检查发现深层架构问题 → 停止 hotfix,按升级条件阻塞确认处理
- 修复需要额外接口变更 → 停止 hotfix,按升级条件阻塞确认处理
### 3b. 验证(preset verify)
根因确认消除后,运行阶段守卫完成 build → verify 过渡:
根因消除检查通过后,复用 `/comet-verify`,由 comet-verify 的规模评估决定轻量或完整验证。
```bash
bash "$COMET_GUARD" <change-name> build --apply
```
状态文件自动更新为 `phase: verify`、`verify_result: pending`,然后进入验证。
### 4. 验证(preset verify)
复用 `/comet-verify`,由 comet-verify 的规模评估决定轻量或完整验证。
**立即执行:** 使用 Skill 工具加载 `comet-verify` 技能。禁止跳过此步骤。

@@ -126,7 +127,11 @@

<IMPORTANT>
Hotfix 流程为 **一次性连续执行**。调用 `/comet-hotfix` 后,agent 必须自动走完全部 4 个阶段,中间不停顿等待用户输入(除非遇到升级条件需要用户确认)。
Hotfix 流程为 **一次性连续执行**。调用 `/comet-hotfix` 后,agent 在 hotfix 自有步骤间自动推进,不主动停顿。但以下情况必须暂停等待用户确认:
1. 遇到升级条件(见"升级条件"章节)
2. 任务超过 3 个转入 `/comet-build` 时的工作区隔离和执行方式选择
3. 验证阶段(comet-verify)的验证失败决策和分支处理决策
执行顺序:快速开启 → 直接构建 → 验证 → 归档 → 完成
每个阶段完成后立即进入下一阶段,无需用户再次输入。阶段内部仍必须按上文要求调用对应 Comet/OpenSpec/Superpowers skill。
每个阶段完成后立即进入下一阶段。阶段内部仍必须按上文要求调用对应 Comet/OpenSpec/Superpowers skill,被调用的 skill 如有自己的用户决策点,按该 skill 规则执行。
</IMPORTANT>

@@ -148,4 +153,12 @@

升级方式:在当前 change 基础上补充 Design Doc(执行 `/comet-design`),后续正常走完整流程。
满足升级条件时必须暂停并等待用户明确确认升级为完整 `/comet` 流程。不得直接进入 `/comet-design`,不得自动补充 Design Doc。
用户确认升级后,**必须先更新 workflow 字段**再进入完整流程:
```bash
bash "$COMET_STATE" set <name> workflow full
```
然后在当前 change 基础上补充 Design Doc:**立即使用 Skill 工具加载 `comet-design` skill**,后续正常走完整流程。若用户不确认升级,停止 hotfix 并报告当前变更已超出 hotfix 适用范围。
---

@@ -152,0 +165,0 @@

@@ -84,2 +84,4 @@ ---

> **REQUIRED NEXT SKILL:** 调用 `comet-design` skill 进入深度设计阶段。
> **REQUIRED NEXT SKILL(完整流程):** 调用 `comet-design` skill 进入深度设计阶段。
>
> hotfix/tweak preset 由对应 preset skill 控制后续流转(phase 直接进入 build),不经过本节。

@@ -95,3 +95,3 @@ ---

如规模评估进入完整验证路径,停止 tweak,升级为完整 `/comet`。
如规模评估进入完整验证路径,停止 tweak,按升级条件阻塞确认处理。

@@ -111,7 +111,10 @@ 验证通过后,按 `/comet-verify` 的规则将 `.comet.yaml` 的 `verify_result` 记录为 `pass`,归档前不得跳过该状态。

<IMPORTANT>
Tweak 流程为 **一次性连续执行**。调用 `/comet-tweak` 后,agent 必须自动走完全部 4 个阶段,中间不停顿等待用户输入(除非遇到升级条件需要用户确认)。
Tweak 流程为 **一次性连续执行**。调用 `/comet-tweak` 后,agent 在 tweak 自有步骤间自动推进,不主动停顿。但以下情况必须暂停等待用户确认:
1. 遇到升级条件(见"升级条件"章节)
2. 验证阶段(comet-verify)的验证失败决策和分支处理决策
执行顺序:快速开启 → 轻量构建 → 轻量验证 → 归档 → 完成
每个阶段完成后立即进入下一阶段,无需用户再次输入。阶段内部仍必须按上文要求调用对应 Comet/OpenSpec/Superpowers skill。
每个阶段完成后立即进入下一阶段。阶段内部仍必须按上文要求调用对应 Comet/OpenSpec/Superpowers skill,被调用的 skill 如有自己的用户决策点,按该 skill 规则执行。
</IMPORTANT>

@@ -134,4 +137,12 @@

升级方式:在当前 change 基础上补充 Design Doc(执行 `/comet-design`),后续正常走完整流程。
满足升级条件时必须暂停并等待用户明确确认升级为完整 `/comet` 流程。不得直接进入 `/comet-design`,不得自动补充 Design Doc。
用户确认升级后,**必须先更新 workflow 字段**再进入完整流程:
```bash
bash "$COMET_STATE" set <name> workflow full
```
然后在当前 change 基础上补充 Design Doc:**立即使用 Skill 工具加载 `comet-design` skill**,后续正常走完整流程。若用户不确认升级,停止 tweak 并报告当前变更已超出 tweak 适用范围。
---

@@ -138,0 +149,0 @@

@@ -40,9 +40,10 @@ ---

1. 若 dirty diff 属于当前 change 且涉及实现、测试、tasks、delta spec 或 design doc 变更,不在 verify 阶段直接修复或提交;先记录失败并回退到 build 阶段
1. 若 dirty diff 属于当前 change 且涉及实现、测试、tasks、delta spec 或 design doc 变更,不在 verify 阶段直接修复或提交;报告失败项并进入 Step 1b 的验证失败决策阻塞点
2. 若 dirty diff 只是 verify 本阶段产物(例如验证报告草稿、分支处理记录),可继续在 verify 阶段完成并记录状态
3. 若 dirty diff 已实现但 tasks.md 未勾选,视为 build 状态滞后;先记录失败并回退到 build 阶段,由 `/comet-build` 验证实现、补勾任务并提交
3. 若 dirty diff 已实现但 tasks.md 未勾选,视为 build 状态滞后;报告失败项并进入 Step 1b,由用户决定回退修复或接受偏差
回退到 build 阶段:
用户选择修复后,才允许回退到 build 阶段:
```bash
# 仅在用户确认修复后执行
bash "$COMET_STATE" transition <change-name> verify-fail

@@ -59,3 +60,3 @@ ```

若提交区间显示改动超过轻量阈值(> 5 个文件、跨模块协调、或 delta spec 超过 1 个 capability),手动设置为完整验证:
若提交区间显示改动超过轻量阈值(> 4 个文件、跨模块协调、或 delta spec 超过 1 个 capability),手动设置为完整验证:

@@ -66,2 +67,15 @@ ```bash

### 1b. 验证失败决策(阻塞点)
验证不通过时必须暂停并等待用户决定修复或接受偏差。不得自动运行 `bash "$COMET_STATE" transition <change-name> verify-fail`,也不得自动调用 `/comet-build`。
暂停时必须列出:
- 失败项
- 是否属于 CRITICAL(构建失败、测试失败、安全问题、核心验收场景失败)
- 推荐处理方式
用户选择后按以下方式继续:
- **全部修复**:运行 `bash "$COMET_STATE" transition <change-name> verify-fail`,然后调用 `/comet-build` 修复
- **逐项处理**:CRITICAL 失败项必须修复;非 CRITICAL 失败项可选择接受偏差,但必须在验证报告中记录接受原因和影响范围。若存在任何 CRITICAL 失败项,不允许跳过修复直接全部接受
### 2a. 轻量验证(小改动)

@@ -79,5 +93,6 @@

**不通过时**:报告失败项,记录失败并回退到 build 阶段,然后调用 `/comet-build` 修复。
**不通过时**:报告失败项,进入 Step 1b 的验证失败决策阻塞点。用户选择修复后,才执行以下命令记录失败并回退到 build 阶段,然后调用 `/comet-build` 修复:
```bash
# 仅在用户确认修复后执行
bash "$COMET_STATE" transition <change-name> verify-fail

@@ -102,4 +117,4 @@ ```

1. tasks.md 全部任务已完成(`[x]`)
2. 实现符合 design.md 设计决策
3. 实现符合 brainstorming 设计文档
2. 实现符合 `openspec/changes/<name>/design.md` 高层设计决策
3. 实现符合 Design Doc(`docs/superpowers/specs/` 下的技术设计文档)
4. 能力规格场景全部通过

@@ -110,12 +125,13 @@ 5. proposal.md 目标已满足

验证不通过时:报告缺失项,记录失败并回退到 build 阶段,然后调用 `/comet-build` 补充。
验证不通过时:报告缺失项,进入 Step 1b 的验证失败决策阻塞点。用户选择修复后,才执行以下命令记录失败并回退到 build 阶段,然后调用 `/comet-build` 补充:
```bash
# 仅在用户确认修复后执行
bash "$COMET_STATE" transition <change-name> verify-fail
```
**Spec 漂移处理**:
- 若检查项 6 发现矛盾(delta spec 有内容但 design doc 未体现),提示用户:
- 选项 A:在 design doc 追加 "Implementation Divergence" 节记录偏差原因
- 选项 B:回退到 Build 阶段,补充 brainstorming 更新 design doc
**Spec 漂移处理**(用户决策点):
- 若检查项 6 发现矛盾(delta spec 有内容但 design doc 未体现),**必须暂停并等待用户选择处理方式**,不得自动选择。选项:
- 选项 A:在 design doc 追加 "Implementation Divergence" 节记录偏差原因。选项 A 属于 verify 阶段允许产物;写入后不得因该 design doc 变更再次触发 Step 1b dirty-worktree 决策
- 选项 B:用户选择 B 后,运行 `bash "$COMET_STATE" transition <change-name> verify-fail`,然后调用 `/comet-build`;由 `/comet-build` 的 Spec 增量更新规则加载 `superpowers:brainstorming` 更新 Design Doc + delta spec
- 选项 C:确认偏差可接受,继续验证(归档时 design doc 将标记为 `superseded-by-main-spec`)

@@ -135,2 +151,4 @@

这是用户决策点。**必须暂停并等待用户选择分支处理方式**,不得根据推荐、默认值或当前分支状态自行选择。只有在用户完成选择且对应操作完成后,才允许写入 `branch_status: handled`。
**确认项**:

@@ -137,0 +155,0 @@ - 全部测试通过

@@ -56,4 +56,4 @@ ---

- 只要存在 active change 且工作区有未提交改动,必须按 `comet/reference/dirty-worktree.md` 协议处理。该协议定义了检查步骤、归因分类和禁令,本文件不重复
- 若 `phase: build`,读取 tasks.md 的下一个未勾选任务继续
- 若 `phase: verify` 且 `verify_result: fail`,先运行 `bash "$COMET_STATE" transition <name> verify-fail`,再调用 `/comet-build`
- 若 `phase: build`,先检查 `build_mode` 和 `isolation` 是否已设置;若有未设置的字段,回到 `/comet-build` 对应步骤补充后再执行;若均已设置,读取 tasks.md 的下一个未勾选任务继续
- 若 `phase: verify` 且 `verify_result: fail`,进入验证失败决策阻塞点:暂停并询问用户修复或接受偏差;用户选择修复后才运行 `bash "$COMET_STATE" transition <name> verify-fail` 并调用 `/comet-build`
- 若 `phase: open` 但 proposal/design/tasks 已完整,先运行 `bash "$COMET_GUARD" <change-name> open --apply` 修正状态,再继续判定

@@ -66,5 +66,5 @@ - 若 `phase: archive`,只允许调用 `/comet-archive`;归档成功后 change 会移动到 archive 目录,不再对原活跃目录运行 guard

2. `verify_result: pass` 且 `archived` 不是 `true` → `/comet-archive`
3. `verify_result: fail` → `bash "$COMET_STATE" transition <name> verify-fail` 后 `/comet-build`
3. `verify_result: fail` → 进入验证失败决策阻塞点(暂停询问修复或接受偏差;用户选择修复后才 `verify-fail` 并 `/comet-build`)
4. `phase: verify` 或 tasks.md 全部勾选 → `/comet-verify`
5. `phase: build` 或已有 Design Doc 但计划/执行未完成 → `/comet-build`
5. `phase: build` 或已有 Design Doc 但计划/执行未完成 → 优先按 workflow 路由:`hotfix` → `/comet-hotfix`,`tweak` → `/comet-tweak`,`full` → `/comet-build`
6. `phase: design` 或有 change 但无 Design Doc → `/comet-design`

@@ -108,10 +108,13 @@ 7. `phase: open` 或有活跃 change 但 `.comet.yaml` 缺失 → `/comet-open`

**连续执行要求**:从检测到的阶段开始,agent 必须自动走完后续所有阶段,中间不停顿等待用户输入(除非遇到需要用户决策的节点)。每个阶段完成后立即进入下一阶段,无需用户再次输入。
**连续执行要求**:从检测到的阶段开始,agent 必须自动推进后续阶段;自动推进只适用于没有用户决策的衔接点。遇到用户决策点时必须暂停并等待用户明确回复,不得用推荐规则、默认值或历史偏好代替用户确认。
**决策点是阻塞点**:只要到达下列任一节点,当前 `/comet` 调用必须停住。用户明确选择后才能写入对应状态字段、执行对应操作,随后再继续自动流转。
需要用户参与的节点(仅在这些节点暂停):
1. brainstorming 确认设计方案
2. build 阶段选择执行方式
3. verify 不通过时决定修复或接受偏差
2. build 阶段选择工作方式(隔离方式 + 执行方式,一次交互完成)
4. verify 不通过时决定修复或接受偏差(含 Spec 漂移处理方式选择)
4. finishing-branch 选择分支处理方式
5. 遇到升级条件(hotfix/tweak → 完整流程)
6. build 阶段范围扩张需重新设计或拆分新 change

@@ -143,7 +146,7 @@ agent 不应跳过这些决策点;其他明确无歧义的阶段衔接必须自动继续推进,不得中途退出。

open ──→ build ──→ verify ──→ archive
↑ 如触发升级条件 → 补充 Design Doc → 回到完整流程
↑ 如触发升级条件 → 阻塞确认升级 → 补充 Design Doc → 回到完整流程
/comet-tweak(预设路径,跳过 brainstorming 和完整 plan)
open ──→ lightweight build ──→ light verify ──→ archive
↑ 如触发升级条件 → 补充 Design Doc → 回到完整流程
↑ 如触发升级条件 → 阻塞确认升级 → 补充 Design Doc → 回到完整流程
```

@@ -162,2 +165,3 @@

plan: docs/superpowers/plans/YYYY-MM-DD-feature.md
base_ref: a1b2c3d4e5f6...
build_mode: subagent-driven-development

@@ -169,2 +173,3 @@ isolation: branch

branch_status: pending
created_at: 2026-05-26
verified_at: null

@@ -180,2 +185,3 @@ archived: false

| `plan` | 关联的 Superpowers Plan 路径,可为空 |
| `base_ref` | init 时记录的 git commit SHA,用于 scale 评估。无 plan 时作为改动文件数统计基准 |
| `build_mode` | 已选择的执行方式,可为空 |

@@ -187,2 +193,3 @@ | `isolation` | `branch` 或 `worktree`,工作区隔离方式。full 初始化可为 `null`,但只允许持续到 `/comet-build` Step 3 前;hotfix/tweak 默认 `branch` |

| `branch_status` | `pending` 或 `handled`,分支处理完成后设为 `handled` |
| `created_at` | change 创建日期(init 时自动写入),格式 `YYYY-MM-DD` |
| `verified_at` | 验证通过时间,可为空 |

@@ -189,0 +196,0 @@ | `archived` | change 是否已归档 |

@@ -48,3 +48,3 @@ ---

When a delta spec differs from an existing main spec, the script prints a unified diff before overwrite so the archive sync content is visible.
When a delta spec differs from an existing main spec, the script prints a unified diff preview before overwrite to help confirm archive sync content.

@@ -66,3 +66,3 @@ Use `--dry-run` flag to preview without executing.

The archive script moves `openspec/changes/<name>/` to `openspec/changes/archive/YYYY-MM-DD-<name>/`. After successful archive, do not run `bash "$COMET_GUARD" <change-name> archive` against the old active change name; the active directory no longer exists. Archive completeness is determined by the script exit code and archived directory state.
The archive script moves `openspec/changes/<name>/` to `openspec/changes/archive/YYYY-MM-DD-<name>/`. After successful archive, **do not run** `bash "$COMET_GUARD" <change-name> archive` against the old active change name; the active directory no longer exists. Archive completeness is determined by script exit code and archived directory state.

@@ -69,0 +69,0 @@ ## Complete

---
name: comet-build
description: "Comet Phase 3: Plan and Build. Invoke with /comet-build. Create plans and choose execution method (subagent or direct) for implementation."
description: "Comet Phase 3: Plan and Build. Invoke with /comet-build. Create plans and select execution method (subagent or direct) for implementation."
---

@@ -61,6 +61,8 @@

### 3. Workspace Isolation
### 3. Select Workflow Configuration
Plan has been written to the current branch. Before starting execution, choose workspace isolation method:
Plan has been written to the current branch. Before starting execution, **ask the user to choose both workspace isolation and execution method in a single interaction**:
**Workspace Isolation**:
| Option | Method | Description |

@@ -75,27 +77,4 @@ |--------|--------|-------------|

After user selection, update `isolation` field. `isolation` only allows one of the following values:
**Execution Method**:
```bash
bash "$COMET_STATE" set <name> isolation <value>
```
- `branch`
- `worktree`
<IMPORTANT>
This is a script-enforced hard constraint, not a suggestion. Full workflow init may temporarily leave `isolation` as `null`, but only before this step.
Before implementation starts, stop and ask the user, then write either `branch` or `worktree`. If it remains `null`, both the `build → verify` guard and `comet-state transition build-complete` will fail.
</IMPORTANT>
**Execute isolation**:
- **branch**: Run `git checkout -b <change-name>`, subsequent work on the new branch
- **worktree**: Invoke `superpowers:using-git-worktrees` skill or use native `EnterWorktree` tool to create isolated workspace
After creating isolation, confirm plan file is accessible (naturally accessible with branch method; for worktree method, confirm plan has been committed).
### 4. Select Execution Method
Present plan summary to user (task count, involved modules), then ask for execution method:
| Option | Skill | Applicable Scenario |

@@ -106,3 +85,3 @@ |------|------|-------------------|

**Recommendation rules**:
**Execution method recommendation rules**:
- Task count ≥ 3 → Recommend A

@@ -112,13 +91,14 @@ - Task count ≤ 2 and no cross-module dependencies → Recommend B

After user selection, update `build_mode` field. `build_mode` only allows one of the following values:
This is a user decision point. Must pause and wait for the user to explicitly choose both isolation method and execution method. **Must not select based on recommendation rules**. Recommendation rules are for suggestion only, not a substitute for user confirmation.
After user selection, update `isolation` and `build_mode` fields:
```bash
bash "$COMET_STATE" set <name> build_mode <value>
bash "$COMET_STATE" set <name> isolation <branch|worktree>
bash "$COMET_STATE" set <name> build_mode <subagent-driven-development|executing-plans|direct>
```
- `subagent-driven-development`
- `executing-plans`
- `direct` (default only for hotfix/tweak preset use)
`isolation` is a script-enforced hard constraint. Full workflow init may temporarily leave it as `null`, but only before this step. If it remains `null`, both the `build → verify` guard and `comet-state transition build-complete` will fail.
Full workflow must not default to `direct`. Use it only when the user explicitly asks to bypass the plan execution skills and you record an explicit override:
`build_mode` defaults to `direct` only for hotfix/tweak presets. Full workflow must not default to `direct`. Use it only when the user explicitly asks to bypass the plan execution skills and you record an explicit override:

@@ -132,4 +112,11 @@ ```bash

Then, **immediately execute:** Use the Skill tool to load the corresponding skill. Skipping this step is prohibited.
**Execute isolation**:
- **branch**: Run `git checkout -b <change-name>`, subsequent work on the new branch
- **worktree**: Must use the Skill tool to load `superpowers:using-git-worktrees` skill to create isolated workspace. Do not bypass this skill with plain shell commands or native tools; if the skill is unavailable, stop the process and prompt to install or enable Superpowers skills.
After creating isolation, confirm plan file is accessible (naturally accessible with branch method; for worktree method, confirm plan has been committed).
**Load execution skill**: Use the Skill tool to load the corresponding skill. Skipping this step is prohibited.
If the selected Superpowers skill is unavailable, stop the process and prompt to install or enable the corresponding skill. Do not substitute this step with normal conversation.

@@ -142,3 +129,3 @@

### 5. Spec Incremental Updates
### 4. Spec Incremental Updates

@@ -150,7 +137,9 @@ When the initial spec is found incomplete during implementation, handle by scale:

| Small | Missing acceptance scenarios, edge cases | Directly edit delta spec + design.md, append tasks.md tasks |
| Medium | Interface changes, new components, data flow changes | Re-run `superpowers:brainstorming` to update Design Doc + delta spec |
| Large | Brand-new capability requirements | `/opsx:new` to create independent change |
| Medium | Interface changes, new components, data flow changes | Pause and wait for user confirmation, then must use Skill tool to load `superpowers:brainstorming` to update Design Doc + delta spec |
| Large | Brand-new capability requirements | Must pause and wait for user confirmation to split; after user confirms, create independent change through `/comet-open` |
**50% Threshold Determination**: Using initial task count in tasks.md as baseline, if new tasks exceed half of that total, it's considered outside original plan scope, should consider splitting into new change.
**50% Threshold Determination**: Using initial task count in tasks.md as baseline, if new tasks exceed half of that total, it's considered outside original plan scope, must pause and wait for the user to decide whether to split into new change.
When creating an independent change, must invoke `/comet-open`, not `/opsx:new` directly. `/comet-open` creates both OpenSpec artifacts and `.comet.yaml`, preventing the new change from leaving the Comet state machine.
**Principles**:

@@ -162,3 +151,3 @@ - Delta spec is a living document, can be modified at any time during this phase

### 6. Context Management
### 5. Context Management

@@ -170,3 +159,3 @@ Build is the longest phase and may span many tasks. To support resume after context compaction:

- **User manual-change resume**: handle uncommitted changes through `comet/reference/dirty-worktree.md`. That protocol defines checks, attribution, and prohibitions. Build-specific handling:
1. After attribution, if the diff implies plan or spec changes, handle it through Step 5 "Spec Incremental Updates"
1. After attribution, if the diff implies plan or spec changes, handle it through Step 4 "Spec Incremental Updates"
- **Long task split**: if a single task exceeds 200 lines of code changes, consider splitting it into multiple subtasks and commits

@@ -173,0 +162,0 @@

@@ -23,2 +23,3 @@ ---

COMET_GUARD="${COMET_GUARD:-$(find "${COMET_SEARCH_ROOTS[@]}" -path '*/comet/scripts/comet-guard.sh' -type f -print -quit 2>/dev/null)}"
COMET_HANDOFF="${COMET_HANDOFF:-$(find "${COMET_SEARCH_ROOTS[@]}" -path '*/comet/scripts/comet-handoff.sh' -type f -print -quit 2>/dev/null)}"
bash "$COMET_STATE" check <name> design

@@ -29,30 +30,90 @@ ```

### 1a. Read Existing Context
### 1a. Generate OpenSpec → Superpowers Handoff Package
Read `proposal.md` and `design.md` under the active change, organize core content into summaries:
- **Proposal summary**: goals, motivation, scope
- **Design summary**: architectural decisions, high-level design
**Must be generated by script. Agent writing summaries on the fly is not allowed.**
### 1b. Execute Brainstorming (With Context)
```bash
bash "$COMET_HANDOFF" <change-name> design --write
```
**Immediately execute:** Use the Skill tool to load the `superpowers:brainstorming` skill, ARGUMENTS contains:
The script generates and records:
```
openspec/changes/<name>/.comet/handoff/design-context.json
openspec/changes/<name>/.comet/handoff/design-context.md
```
And writes to `.comet.yaml`:
```yaml
handoff_context: openspec/changes/<name>/.comet/handoff/design-context.json
handoff_hash: <sha256>
```
The default handoff package is a **compact traceable excerpt**, not an agent summary:
- `design-context.json`: machine index containing change, phase, canonical spec, source paths, hash
- `design-context.md`: context for Superpowers to read, containing script markers, source path, line range, sha256, deterministic excerpts
- When exceeding excerpt budget, marks `[TRUNCATED]` and retains Full source path
If full context is genuinely needed, explicitly run:
```bash
bash "$COMET_HANDOFF" <change-name> design --write --full
```
Handoff package sources come from OpenSpec open phase artifacts:
- `proposal.md`: goals, motivation, scope, non-goals
- `design.md`: high-level architecture decisions, approach constraints
- `tasks.md`: initial task boundaries
- `specs/*/spec.md`: delta capability specs
### 1b. Execute Brainstorming (with Context)
**Immediately execute:** Use the Skill tool to load the `superpowers:brainstorming` skill, ARGUMENTS containing:
```
Change: <change-name>
Proposal summary: <proposal core content>
Design summary: <design.md architectural decisions>
Skip context exploration, proceed directly to design questioning.
OpenSpec Context Pack: openspec/changes/<name>/.comet/handoff/design-context.md
Machine handoff: openspec/changes/<name>/.comet/handoff/design-context.json
OpenSpec artifacts are the upstream source of truth. Do not redefine requirements, do not rewrite proposal/spec.
Your task is to perform deep technical design based on the handoff package: implementation approach, technical risks, testing strategy, boundary conditions.
If you find OpenSpec delta spec missing acceptance scenarios, you may only propose Spec Patches and write them back to OpenSpec delta spec; do not create a second requirements spec in the Design Doc.
Design Doc frontmatter must be minimal, containing only:
---
comet_change: <change-name>
role: technical-design
canonical_spec: openspec
---
Skip redundant context exploration, proceed directly to design questions.
```
Skipping this step is prohibited, and continuing without loading this skill is prohibited.
Skipping this step is prohibited. Proceeding without loading this skill is prohibited.
If `superpowers:brainstorming` is unavailable, stop the process and prompt to install or enable Superpowers skills. Do not substitute this step with normal conversation.
After the skill loads, follow its guidance to produce:
- `docs/superpowers/specs/YYYY-MM-DD-<topic>-design.md` — design document (technical RFC)
- `openspec/changes/<name>/specs/<capability>/spec.md` — capability specification (delta)
After the skill loads, follow its guidance to produce design proposals (presented as conversation):
- Technical approach: architecture, data flow, key technology choices and risks
- Testing strategy
- If acceptance scenarios need supplementing, indicate delta spec changes to be written back
The brainstorming phase does not write to the Design Doc file; it only produces design proposals for Step 1c user confirmation. Only after confirmation should `docs/superpowers/specs/YYYY-MM-DD-<topic>-design.md` be created and delta spec written back.
### 1c. User Confirms Design Proposal (Blocking Point)
After brainstorming produces a design proposal, **must pause and wait for the user to explicitly confirm the design proposal**. Must not create the final Design Doc, write `design_doc`, run design guard, or enter `/comet-build` before user confirmation.
When pausing, only present essential summary:
- Technical approach adopted
- Key trade-offs and risks
- Testing strategy
- If there are Spec Patches, list the delta spec changes to be written back
Only after the user explicitly confirms, proceed to Step 2. If the user requests adjustments, continue brainstorming iteration until the user confirms.
### 2. Update Comet State
Record design_doc path, then run guard to auto-transition:
First record the design_doc path. If Step 1c wrote back delta spec (added or modified `specs/*/spec.md`), must regenerate handoff to update hash:

@@ -63,2 +124,5 @@ ```bash

# If delta spec changes exist, regenerate handoff (update hash)
bash "$COMET_HANDOFF" <change-name> design --write
# Auto-transition to next phase

@@ -68,12 +132,16 @@ bash "$COMET_GUARD" <change-name> design --apply

State file is updated automatically. No manual editing of other fields required.
If there are no delta spec changes, skip the handoff regeneration step. The state file updates automatically; no manual editing of other fields needed.
## Exit Conditions
- Design Doc has been created and saved
- Delta spec has been created if there are new capabilities
- Design Doc created and saved
- Design Doc frontmatter contains `comet_change`, `role: technical-design`, `canonical_spec: openspec`
- `handoff_context` and `handoff_hash` written to `.comet.yaml` (enforced by guard)
- `handoff_hash` matches current OpenSpec open phase artifacts (enforced by guard)
- `design-context.md` must be script-generated and contain source path, mode, sha256 traceability markers (enforced by guard)
- If new capabilities or supplementary acceptance scenarios exist, OpenSpec delta spec has been created/updated
- `design_doc` written to `.comet.yaml`
- **Phase guard**: Run `bash "$COMET_GUARD" <change-name> design --apply`; after all PASS, state advances to `phase: build`
- **Phase guard**: Run `bash "$COMET_GUARD" <change-name> design --apply`; after all PASS, auto-transitions to `phase: build`
You must use `--apply` before exiting:
Must use `--apply` before exit:

@@ -88,2 +156,2 @@ ```bash

> **REQUIRED NEXT SKILL:** Invoke `comet-build` skill to enter the planning and build phase.
> **REQUIRED NEXT SKILL:** Invoke `comet-build` skill to enter the plan and build phase.

@@ -19,5 +19,5 @@ ---

## Process (preset workflow, 4 phases)
## Process (preset workflow, 5 steps)
Execution chain: open → build → verify → archive. Hotfix provides default decisions for each phase: streamlined open, direct build, scale-based verification, archive after verification passes.
Execution chain: open → build → root cause check → verify → archive. Hotfix provides default decisions for each phase: streamlined open, direct build, root cause confirmation, scale-based verification, archive after verification passes.

@@ -79,10 +79,3 @@ Locate Comet scripts before starting:

3. After all tasks complete, explicitly run relevant project tests and build commands
4. Run phase guard to transition build → verify:
```bash
bash "$COMET_GUARD" <change-name> build --apply
```
State automatically updates to `phase: verify`, `verify_result: pending`, then enter verification.
**If fix affects existing spec acceptance scenarios**:

@@ -92,18 +85,26 @@ - Create delta spec in `openspec/changes/<name>/specs/<capability>/spec.md`

### 3a. Hotfix-Exclusive Check: Root Cause Elimination
### 3. Root Cause Elimination Check
**Execute before loading comet-verify**, ensuring the fix actually eliminates the root cause:
**Execute before running build guard**, ensuring the fix actually eliminates the root cause:
1. Read bug description and root cause in proposal.md
2. Search and verify problem code no longer exists
3. If root cause not eliminated, return to Step 2 to continue fix
3. If root cause not eliminated, return to Step 2 to continue fix (still in build phase, no state transition needed)
**Upgrade conditions**:
- Root cause check reveals deep architecture issues → Stop hotfix, upgrade to `/comet`
- Fix requires additional interface changes → Stop hotfix, upgrade to `/comet`
- Root cause check reveals deep architecture issues → Stop hotfix, handle per "Upgrade Conditions" section
- Fix requires additional interface changes → Stop hotfix, handle per "Upgrade Conditions" section
### 3b. Verification (preset verify)
After root cause is confirmed eliminated, run phase guard to transition build → verify:
After root cause elimination check passes, reuse `/comet-verify`, with comet-verify's scale assessment deciding lightweight or full verification.
```bash
bash "$COMET_GUARD" <change-name> build --apply
```
State automatically updates to `phase: verify`, `verify_result: pending`, then enter verification.
### 4. Verification (preset verify)
Reuse `/comet-verify`, with comet-verify's scale assessment deciding lightweight or full verification.
**Immediately execute:** Use the Skill tool to load the `comet-verify` skill. Skipping this step is prohibited.

@@ -115,3 +116,3 @@

### 4. Archive (preset archive)
### 5. Archive (preset archive)

@@ -128,7 +129,11 @@ Reuse `/comet-archive`. Must satisfy `verify_result: pass` in `.comet.yaml` before archiving.

<IMPORTANT>
Hotfix workflow is **one-time continuous execution**. After invoking `/comet-hotfix`, agent must automatically complete all 4 phases, without pausing to wait for user input mid-way (unless encountering upgrade conditions requiring user confirmation).
Hotfix workflow is **one-time continuous execution**. After invoking `/comet-hotfix`, agent must automatically advance through hotfix steps, without pausing to wait for user input mid-way. But the following situations must pause and wait for user confirmation:
Execution order: quick open → direct build → verification → archive → complete
1. Encountering upgrade conditions (see "Upgrade Conditions" section)
2. When tasks exceed 3 and transfer to `/comet-build` for workspace isolation and execution method selection
3. Verification phase (comet-verify) verification failure decision and branch handling decision
After each phase completes, immediately enter next phase, no need for user input again. Within each phase, must still call corresponding Comet/OpenSpec/Superpowers skill according to above requirements.
Execution order: quick open → direct build → root cause check → verification → archive → complete
After each step completes, immediately enter next step. Within each phase, must still call corresponding Comet/OpenSpec/Superpowers skill according to above requirements; if the called skill has its own user decision points, follow that skill's rules.
</IMPORTANT>

@@ -150,4 +155,12 @@

Upgrade method: On current change basis, supplement Design Doc (execute `/comet-design`), then proceed normally with full workflow.
When upgrade conditions are met, must pause and wait for user to explicitly confirm upgrade to full `/comet` workflow. Must not directly enter `/comet-design`, must not automatically supplement Design Doc.
After user confirms upgrade, **must first update the workflow field** before entering full flow:
```bash
bash "$COMET_STATE" set <name> workflow full
```
Then on current change basis, supplement Design Doc: **immediately use Skill tool to load `comet-design` skill**, proceed normally with full workflow. If user does not confirm upgrade, stop hotfix and report that current change has exceeded hotfix scope.
---

@@ -154,0 +167,0 @@

---
name: comet-open
description: "Comet Phase 1: Open. Invoke with /comet-open. Explore ideas through OpenSpec and create change structure (proposal + design + tasks)."
description: "Comet Phase 1: Open. Invoke with /comet-open. Explore ideas through OpenSpec, create change structure (proposal + design + tasks)."
---

@@ -10,23 +10,8 @@

- No active change, or user wishes to create a new change
- No active change, or user wants to create a new change
## Steps
### 0. Locate Comet Scripts
### 1. Explore Ideas
Locate scripts before creating state:
```bash
COMET_SEARCH_ROOTS=("." "$HOME/.claude/skills" "$HOME/.codex/skills" "$HOME/.cursor/skills")
COMET_STATE="${COMET_STATE:-$(find "${COMET_SEARCH_ROOTS[@]}" -path '*/comet/scripts/comet-state.sh' -type f -print -quit 2>/dev/null)}"
COMET_GUARD="${COMET_GUARD:-$(find "${COMET_SEARCH_ROOTS[@]}" -path '*/comet/scripts/comet-guard.sh' -type f -print -quit 2>/dev/null)}"
if [ -z "$COMET_STATE" ] || [ -z "$COMET_GUARD" ]; then
echo "ERROR: Comet scripts not found. Ensure the comet skill is installed." >&2
return 1
fi
```
### 1. Explore Idea
**Immediately execute:** Use the Skill tool to load the `openspec-explore` skill. Skipping this step is prohibited.

@@ -36,5 +21,5 @@

### 2. Create Change Structure
### 2. Create Change Structure + Initialize State
**Immediately execute:** Use the Skill tool to load the `openspec-new-change` skill. If user intent is unclear and needs to form a proposal first, load `openspec-propose` instead. Skipping this step is prohibited.
**Immediately execute:** Use the Skill tool to load the `openspec-new-change` skill. If the user's intent is unclear and needs proposal formation first, load `openspec-propose` instead. Skipping this step is prohibited.

@@ -48,14 +33,31 @@ Confirm the following artifacts have been created:

├── proposal.md # Why + What: problem, goals, scope
├── design.md # How (high-level): architectural decisions, solution selection
├── design.md # How (high-level): architecture decisions, approach selection
└── tasks.md # Task checklist (checkboxes)
```
### 3. Initialize Comet State
Create `.comet.yaml` state file:
Initialize Comet state file:
```bash
COMET_SEARCH_ROOTS=("." "$HOME/.claude/skills" "$HOME/.codex/skills" "$HOME/.cursor/skills")
COMET_STATE="${COMET_STATE:-$(find "${COMET_SEARCH_ROOTS[@]}" -path '*/comet/scripts/comet-state.sh' -type f -print -quit 2>/dev/null)}"
COMET_GUARD="${COMET_GUARD:-$(find "${COMET_SEARCH_ROOTS[@]}" -path '*/comet/scripts/comet-guard.sh' -type f -print -quit 2>/dev/null)}"
```bash
if [ -z "$COMET_STATE" ] || [ -z "$COMET_GUARD" ]; then
echo "ERROR: Comet scripts not found. Ensure the comet skill is installed." >&2
return 1
fi
bash "$COMET_STATE" init <name> full
```
### 3. Entry State Verification
Verify state machine has been correctly initialized:
```bash
bash "$COMET_STATE" check <name> open
```
Proceed to Step 4 after verification passes. The script outputs specific failure reasons when verification fails.
### 4. Content Completeness Check

@@ -65,3 +67,3 @@

- **proposal.md**: problem background, goals, scope, non-goals
- **design.md**: high-level architectural decisions, solution selection, data flow
- **design.md**: high-level architecture decisions, approach selection, data flow
- **tasks.md**: task list, each task has a clear description

@@ -71,6 +73,6 @@

- proposal.md, design.md, and tasks.md are all created with complete content
- **Phase guard**: Run `bash "$COMET_GUARD" <change-name> open --apply`; after all PASS, state automatically advances to the next phase
- proposal.md, design.md, tasks.md all created with complete content
- **Phase guard**: Run `bash "$COMET_GUARD" <change-name> open --apply`; after all PASS, auto-transitions to next phase
You must use `--apply` before exiting. Otherwise `.comet.yaml` stays at `phase: open`, and the next phase entry check will fail.
Must use `--apply` before exit, otherwise `.comet.yaml` remains at `phase: open` and the next phase entry check will fail.

@@ -81,3 +83,3 @@ ```bash

Full workflow advances to `phase: design`; hotfix/tweak presets advance to `phase: build`.
Full workflow auto-transitions to `phase: design`; hotfix/tweak presets auto-transition to `phase: build`.

@@ -88,2 +90,4 @@ ## Automatic Transition

> **REQUIRED NEXT SKILL:** Invoke `comet-design` skill to enter the deep design phase.
> **REQUIRED NEXT SKILL (full workflow):** Invoke `comet-design` skill to enter the deep design phase.
>
> Hotfix/tweak presets are controlled by their corresponding preset skill for subsequent transitions (phase goes directly to build), and do not go through this section.

@@ -8,5 +8,5 @@ ---

Tweak is a preset workflow of Comet's five-phase capabilities, not a separate parallel process. It reuses open, build, verify, archive capabilities, only skipping brainstorming and full plan.
Tweak is a preset workflow of Comet's five-phase capabilities, not an independent parallel process. It reuses open, build, verify, archive capabilities, only skipping brainstorming and full plan.
Applicable for small-scale non-bug changes, such as copy adjustments, configuration adjustments, documentation or prompt local optimization.
Applicable for non-bug small scope changes, such as copy adjustment, configuration adjustment, documentation or prompt local optimization.

@@ -16,6 +16,6 @@ **Applicable conditions** (all must be met):

2. No architecture changes
3. No interface changes involved
4. Usually not exceeding 3 tasks, 4 files
3. No interface changes
4. Typically no more than 3 tasks, 4 files
**Not applicable**: If change process discovers need for capability, architecture, or interface adjustments, should upgrade to full `/comet` workflow.
**Not applicable**: If change process discovers need for capability, architecture or interface adjustments, should upgrade to full `/comet` workflow.

@@ -46,4 +46,4 @@ ---

- `design.md` — brief implementation description (no solution comparison needed)
- `tasks.md` — not exceeding 3 tasks
- **No delta spec needed** (unless change changes existing spec acceptance scenarios; once delta spec needed, upgrade to full `/comet`)
- `tasks.md` — no more than 3 tasks
- **No delta spec needed** (unless change modifies existing spec acceptance scenarios; once delta spec is needed, upgrade to full `/comet`)

@@ -72,3 +72,3 @@ Initialize Comet state file:

Before continuing or starting changes, handle uncommitted changes through `comet/reference/dirty-worktree.md`. If attribution shows the scope exceeds tweak, handle it through this file's "Upgrade Conditions".
Before continuing or starting changes, handle uncommitted changes through `comet/reference/dirty-worktree.md`. If attribution shows scope exceeds tweak, handle it through this file's "Upgrade Conditions".

@@ -79,3 +79,3 @@ **Immediately execute:** Execute tasks one by one according to tasks.md:

2. For each incomplete task:
- Modify target file according to task description
- Modify target files according to task description
- Run project formatter (e.g., `mvn spotless:apply`, `npm run format`)

@@ -100,3 +100,3 @@ - Run related tests to confirm pass

If scale assessment enters full verification path, stop tweak, upgrade to full `/comet`.
If scale assessment enters full verification path, stop tweak, handle per upgrade conditions blocking confirmation.

@@ -116,7 +116,10 @@ After verification passes, record `.comet.yaml` `verify_result` as `pass` according to `/comet-verify` rules, must not skip this status before archiving.

<IMPORTANT>
Tweak workflow is **one-time continuous execution**. After invoking `/comet-tweak`, agent must automatically complete all 4 phases, without pausing to wait for user input mid-way (unless encountering upgrade conditions requiring user confirmation).
Tweak workflow is **one-time continuous execution**. After invoking `/comet-tweak`, agent must automatically advance through tweak steps, without pausing to wait for user input mid-way. But the following situations must pause and wait for user confirmation:
1. Encountering upgrade conditions (see "Upgrade Conditions" section)
2. Verification phase (comet-verify) verification failure decision and branch handling decision
Execution order: quick open → lightweight build → lightweight verification → archive → complete
After each phase completes, immediately enter next phase, no need for user input again. Within each phase, must still call corresponding Comet/OpenSpec/Superpowers skill according to above requirements.
After each phase completes, immediately enter next phase. Within each phase, must still call corresponding Comet/OpenSpec/Superpowers skill according to above requirements; if the called skill has its own user decision points, follow that skill's rules.
</IMPORTANT>

@@ -133,10 +136,18 @@

| Change involves **5+ files** | Exceeds small change scope |
| Cross-module coordination required | Needs coordination across components |
| **5+** new test cases needed | Change complexity increasing |
| Config item additions or deletions | Non-value config changes |
| Cross-module coordination required | Requires cross-component coordination |
| **5+** new test cases needed | Change complexity rising |
| Config item additions or deletions | Config changes beyond value modifications |
| New capability needed | Exceeds local optimization |
| Delta spec needed | Affects existing specifications |
| Delta spec needed | Affects existing specs |
Upgrade method: On current change basis, supplement Design Doc (execute `/comet-design`), then proceed normally with full workflow.
When upgrade conditions are met, must pause and wait for user to explicitly confirm upgrade to full `/comet` workflow. Must not directly enter `/comet-design`, must not automatically supplement Design Doc.
After user confirms upgrade, **must first update the workflow field** before entering full flow:
```bash
bash "$COMET_STATE" set <name> workflow full
```
Then on current change basis, supplement Design Doc: **immediately use Skill tool to load `comet-design` skill**, proceed normally with full workflow. If user does not confirm upgrade, stop tweak and report that current change has exceeded tweak scope.
---

@@ -148,3 +159,3 @@

- Change archived
- No new capability, architecture adjustments, or interface changes
- No new capability, architecture adjustments or interface changes
- **Phase guard**: Before build → verify run `bash "$COMET_GUARD" <change-name> build --apply`; before verify → archive follow `/comet-verify` and run `bash "$COMET_GUARD" <change-name> verify --apply`
---
name: comet-verify
description: "Comet Phase 4: Verify and Complete. Invoke with /comet-verify. Verify implementation matches design, handle development branch."
description: "Comet Phase 4: Verify and Close. Invoke with /comet-verify. Verify implementation matches design, handle development branch."
---
# Comet Phase 4: Verify and Complete (Verify)
# Comet Phase 4: Verify and Close (Verify)
## Prerequisites
- Code has been committed (Phase 3 complete)
- All tasks in tasks.md are complete
- Code committed (Phase 3 complete)
- All tasks.md tasks completed

@@ -28,3 +28,3 @@ ## Steps

### 1. Change Scale Assessment
### 1. Scale Assessment

@@ -37,17 +37,18 @@ Execute scale assessment:

Script automatically counts tasks, delta specs, and changed files to determine whether to use light or full verification mode, and sets the verify_mode field.
The script automatically counts tasks, delta spec count, changed file count, determines light or full verification mode, and sets the verify_mode field.
Before verification starts, inspect and handle uncommitted changes through `comet/reference/dirty-worktree.md`. Verify-specific handling:
Before verification begins, handle uncommitted changes through `comet/reference/dirty-worktree.md` protocol. Verify phase special handling:
1. If dirty diff belongs to the current change and involves implementation, tests, tasks, delta spec, or design doc changes, do not fix or commit directly in verify; record failure and return to build
2. If dirty diff is only a verify-phase artifact, such as a verification report draft or branch-handling record, continue in verify and record state
3. If dirty diff has implemented work but tasks.md is unchecked, treat it as stale build state; record failure and return to build so `/comet-build` verifies the implementation, checks off tasks, and commits
1. If dirty diff belongs to current change and involves implementation, tests, tasks, delta spec, or design doc changes, do not fix or commit directly in verify phase; report failures and enter Step 1b verification failure decision blocking point
2. If dirty diff is only verify phase artifacts (e.g., verification report draft, branch handling records), may continue and record state in verify phase
3. If dirty diff shows implementation but tasks.md not checked, treat as build state lag; report failures and enter Step 1b, let user decide to roll back for fix or accept deviation
Return to build:
Only after user chooses fix, allow rollback to build phase:
```bash
# Execute only after user confirms fix
bash "$COMET_STATE" transition <change-name> verify-fail
```
Note: if the build phase committed after each task, worktree diff can underestimate change size. In that case, read the plan header `base-ref` and re-check the full commit range:
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:

@@ -60,3 +61,3 @@ ```bash

If the commit range exceeds lightweight thresholds (> 5 files, cross-module coordination, or more than 1 delta spec capability), manually switch to full verification:
If commit range shows changes exceed lightweight threshold (> 4 files, cross-module coordination, or delta spec spans more than 1 capability), manually set to full verification:

@@ -67,17 +68,31 @@ ```bash

### 1b. Verification Failure Decision (Blocking Point)
When verification does not pass, must pause and wait for the user to decide fix or accept deviation. Must not automatically run `bash "$COMET_STATE" transition <change-name> verify-fail`, nor automatically invoke `/comet-build`.
When pausing, must list:
- Failed items
- Whether CRITICAL (build failure, test failure, security issues, core acceptance scenario failure)
- Recommended handling approach
After user selection, continue as follows:
- **Fix all**: Run `bash "$COMET_STATE" transition <change-name> verify-fail`, then invoke `/comet-build` to fix
- **Handle item by item**: CRITICAL failures must be fixed; non-CRITICAL failures may choose to accept deviation, but must record acceptance reason and impact scope in verification report. If any CRITICAL failure exists, skipping fix to accept all is not allowed
### 2a. Lightweight Verification (Small Changes)
When scale assessment result is "small", skip `openspec-verify-change`, directly execute the following checks:
When scale assessment result is "small", skip `openspec-verify-change` and directly execute these checks:
1. All tasks in tasks.md completed `[x]`
2. Changed files consistent with tasks.md description (compare `git diff --stat` / `git diff --cached --stat` / `git diff --stat <base-ref>...HEAD` against task content)
3. Build passes (run project-appropriate build command, e.g., `npm run build`, `mvn compile`, `cargo build`)
1. All tasks.md tasks completed `[x]`
2. Changed files match tasks.md descriptions (`git diff --stat` / `git diff --cached --stat` / `git diff --stat <base-ref>...HEAD` compared against tasks content)
3. Build passes (run project-specific build command, e.g., `npm run build`, `mvn compile`, `cargo build`, etc.)
4. Related tests pass
5. No obvious security issues (no hardcoded secrets, no new unsafe operations)
5. No obvious security issues (no hardcoded keys, no new unsafe operations)
**Pass standard**: All 5 items OK, no CRITICAL issues.
**Pass criteria**: All 5 items OK, no CRITICAL issues.
**When failing**: report failed items, record failure, move back to build, then invoke `/comet-build`.
**When not passing**: Report failures, enter Step 1b verification failure decision blocking point. Only after user confirms fix, execute the following command to record failure and roll back to build phase, then invoke `/comet-build` to fix:
```bash
# Execute only after user confirms fix
bash "$COMET_STATE" transition <change-name> verify-fail

@@ -91,3 +106,3 @@ ```

- design doc consistency deep comparison
- code pattern consistency recommendations
- code pattern consistency suggestions
- delta spec and design doc drift detection

@@ -102,23 +117,24 @@

After the skill loads, follow its guidance to verify. Check items:
1. All tasks in tasks.md completed (`[x]`)
2. Implementation matches design.md design decisions
3. Implementation matches brainstorming design document
4. All capability specification scenarios pass
5. proposal.md goals satisfied
6. No contradiction between delta spec and design doc (if Build phase had incremental spec modifications, check if design doc has corresponding records)
7. `docs/superpowers/specs/` associated design document can be located (file exists and relates to current change)
1. All tasks.md tasks completed (`[x]`)
2. Implementation matches `openspec/changes/<name>/design.md` high-level design decisions
3. Implementation matches Design Doc (technical design documents under `docs/superpowers/specs/`)
4. All capability spec scenarios pass
5. proposal.md goals are satisfied
6. No contradictions between delta spec and design doc (if Build phase had incremental spec modifications, check if design doc has corresponding records)
7. Associated design documents under `docs/superpowers/specs/` are locatable (file exists and is related to current change)
When verification fails: report missing items, record failure, move back to build, then invoke `/comet-build`.
When verification does not pass: report missing items, enter Step 1b verification failure decision blocking point. Only after user confirms fix, execute the following command to record failure and roll back to build phase, then invoke `/comet-build` to supplement:
```bash
# Execute only after user confirms fix
bash "$COMET_STATE" transition <change-name> verify-fail
```
**Spec drift handling**:
- If check item 6 finds contradiction (delta spec has content but design doc doesn't reflect it), prompt user:
- Option A: Append "Implementation Divergence" section to design doc recording deviation reason
- Option B: Roll back to Build phase, supplement brainstorming to update design doc
- Option C: Confirm deviation acceptable, continue verification (design doc will be marked as `superseded-by-main-spec` during archiving)
**Spec Drift Handling** (user decision point):
- If check item 6 finds contradictions (delta spec has content but design doc does not reflect it), **must pause and wait for user to choose handling method**; must not select automatically. Options:
- Option A: Append "Implementation Divergence" section to design doc recording deviation reason. Option A is a verify phase allowed artifact; after writing, must not re-trigger Step 1b dirty-worktree decision due to that design doc change
- Option B: After user selects B, run `bash "$COMET_STATE" transition <change-name> verify-fail`, then invoke `/comet-build`; `/comet-build`'s Spec Incremental Update rules will load `superpowers:brainstorming` to update Design Doc + delta spec
- Option C: Confirm deviation is acceptable, continue verification (design doc will be marked as `superseded-by-main-spec` during archiving)
### 3. Completion (Superpowers)
### 3. Finishing (Superpowers)

@@ -129,4 +145,4 @@ **Immediately execute:** Use the Skill tool to load the `superpowers:finishing-a-development-branch` skill. Skipping this step is prohibited.

After the skill loads, follow its guidance to complete. Branch handling options:
1. Local merge to main branch
After the skill loads, follow its guidance to finish. Branch handling options:
1. Merge to main branch locally
2. Push and create PR

@@ -136,13 +152,15 @@ 3. Keep branch (handle later)

This is a user decision point. **Must pause and wait for user to choose branch handling method**. Must not select based on recommendations, defaults, or current branch status. Only after the user completes selection and the corresponding operation finishes, may `branch_status: handled` be written.
**Confirmation items**:
- All tests pass
- No hardcoded secrets or security issues
- No hardcoded keys or security issues
### 4. Record Verification Evidence
The verification report must be written to disk and recorded in `.comet.yaml`; branch handling must also be written to state after it completes. Do not manually set `verify_result: pass`; guard performs the transition.
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.
```bash
mkdir -p docs/superpowers/reports
# Write this verification result to a report file, for example:
# Write verification conclusions to report file, e.g.:
# docs/superpowers/reports/YYYY-MM-DD-<change-name>-verify.md

@@ -158,7 +176,7 @@

- Branch handled
- `.comet.yaml` `verification_report` points to an existing verification report file
- `.comet.yaml` has `branch_status: handled`
- **Phase guard**: Run `bash "$COMET_GUARD" <change-name> verify --apply`; after all PASS, it uses `comet-state transition verify-pass` to advance to `phase: archive`
- `verification_report` in `.comet.yaml` points to an existing verification report file
- `branch_status: handled` in `.comet.yaml`
- **Phase guard**: Run `bash "$COMET_GUARD" <change-name> verify --apply`; after all PASS, auto-transitions to `phase: archive` through `comet-state transition verify-pass`
After verification and branch handling are complete, run guard to auto-transition:
After both verification and branch handling are complete, run guard for auto-transition:

@@ -169,3 +187,3 @@ ```bash

State file is automatically updated to `phase: archive`, `verify_result: pass`, `verified_at: YYYY-MM-DD`.
State file auto-updates to `phase: archive`, `verify_result: pass`, `verified_at: YYYY-MM-DD`.

@@ -176,2 +194,2 @@ ## Automatic Transition

> **REQUIRED NEXT SKILL:** Invoke `comet-archive` skill to enter the archiving phase.
> **REQUIRED NEXT SKILL:** Invoke `comet-archive` skill to enter the archive phase.

@@ -197,2 +197,8 @@ #!/bin/bash

# Write .comet.yaml
# Record current HEAD as base_ref for scale assessment fallback
local base_ref="null"
if git rev-parse --verify HEAD >/dev/null 2>&1; then
base_ref=$(git rev-parse HEAD 2>/dev/null || echo "null")
fi
cat > "$yaml_file" <<EOF

@@ -204,2 +210,3 @@ workflow: $workflow

verify_mode: $verify_mode
base_ref: $base_ref
design_doc: null

@@ -210,2 +217,3 @@ plan: null

branch_status: pending
created_at: $(date +%Y-%m-%d)
verified_at: null

@@ -257,3 +265,7 @@ archived: false

case "$field" in
workflow|phase|build_mode|isolation|verify_mode|verify_result|verification_report|branch_status|archived|design_doc|plan|verified_at|direct_override|build_command|verify_command|handoff_context|handoff_hash)
phase)
yellow "WARNING: Setting 'phase' directly bypasses state machine constraints." >&2
yellow " Consider using: comet-state.sh transition <change-name> <event>" >&2
;;
workflow|build_mode|isolation|verify_mode|verify_result|verification_report|branch_status|archived|design_doc|plan|verified_at|created_at|direct_override|build_command|verify_command|handoff_context|handoff_hash|base_ref)
# Valid field

@@ -301,3 +313,3 @@ ;;

;;
design_doc|plan|verification_report|verified_at|build_command|verify_command|handoff_context|handoff_hash)
design_doc|plan|verification_report|verified_at|created_at|build_command|verify_command|handoff_context|handoff_hash)
# No validation for path fields, date fields, or project command strings

@@ -613,6 +625,6 @@ ;;

# 3. Changed files: prefer plan base-ref, fall back to worktree diff
# 3. Changed files: prefer plan base-ref, then .comet.yaml base_ref, fall back to worktree diff
local changed_files=0
if git rev-parse --git-dir > /dev/null 2>&1; then
local plan_file base_ref
local plan_file base_ref=""
plan_file=$(cmd_get "$change_name" "plan" 2>/dev/null || true)

@@ -622,4 +634,8 @@ if [ -n "$plan_file" ] && [ "$plan_file" != "null" ] && [ -f "$plan_file" ]; then

fi
# Fallback to base_ref stored in .comet.yaml (set during init)
if [ -z "$base_ref" ] || [ "$base_ref" = "null" ]; then
base_ref=$(cmd_get "$change_name" "base_ref" 2>/dev/null || true)
fi
if [ -n "${base_ref:-}" ] && git rev-parse --verify "$base_ref" >/dev/null 2>&1; then
if [ -n "${base_ref:-}" ] && [ "$base_ref" != "null" ] && git rev-parse --verify "$base_ref" >/dev/null 2>&1; then
changed_files=$(git diff --name-only "$base_ref"...HEAD 2>/dev/null | wc -l | tr -d ' ')

@@ -633,3 +649,3 @@ else

local result="light"
if [ "$task_count" -gt 3 ] || [ "$delta_spec_count" -gt 1 ] || [ "$changed_files" -gt 5 ]; then
if [ "$task_count" -gt 3 ] || [ "$delta_spec_count" -gt 1 ] || [ "$changed_files" -gt 4 ]; then
result="full"

@@ -642,3 +658,3 @@ fi

echo " Delta specs: $delta_spec_count capabilities (threshold: 1)" >&2
echo " Changed files: $changed_files (threshold: 5)" >&2
echo " Changed files: $changed_files (threshold: 4)" >&2
echo " → Result: $result" >&2

@@ -645,0 +661,0 @@

@@ -177,3 +177,3 @@ #!/bin/bash

# --- Unknown keys check ---
KNOWN_KEYS="workflow phase design_doc plan build_mode isolation verify_mode verify_result verification_report branch_status verified_at archived direct_override build_command verify_command handoff_context handoff_hash"
KNOWN_KEYS="workflow phase design_doc plan build_mode isolation verify_mode verify_result verification_report branch_status verified_at created_at archived direct_override build_command verify_command handoff_context handoff_hash base_ref"
while IFS=: read -r key _; do

@@ -180,0 +180,0 @@ key="${key// /}"

@@ -8,3 +8,3 @@ ---

OpenSpec and Superpowers orbit the same goal like a binary star system. OpenSpec handles WHAT, Superpowers handles HOW.
OpenSpec and Superpowers orbit the same goal like a binary star system.

@@ -46,3 +46,3 @@ ```

When the user chooses "create a new change", **must invoke `/comet-open`**. Do not call `/opsx:new` directly.
`/comet-open` performs dual initialization: OpenSpec artifacts plus `.comet.yaml` state.
`/comet-open` performs dual initialization: OpenSpec artifacts (created by internal `/opsx:new`) plus `.comet.yaml` state file.
Calling `/opsx:new` directly leaves `.comet.yaml` missing and breaks later phase detection.

@@ -58,5 +58,5 @@ </IMPORTANT>

- If there is an active change and the worktree has uncommitted changes, handle them through `comet/reference/dirty-worktree.md`. That protocol defines checks, attribution, and prohibitions; this file does not repeat them
- If `phase: build`, read the next unchecked task from tasks.md and continue
- If `phase: verify` and `verify_result: fail`, first run `bash "$COMET_STATE" transition <name> verify-fail`, then invoke `/comet-build`
- If `phase: open` but proposal/design/tasks are complete, run `bash "$COMET_GUARD" <change-name> open --apply` to repair state, then continue detection
- If `phase: build`, first check whether `build_mode` and `isolation` are set; if any fields are unset, return to `/comet-build` corresponding step to supplement before executing; if both are set, read the next unchecked task from tasks.md and continue
- If `phase: verify` and `verify_result: fail`, enter the verification failure decision blocking point: pause and ask the user to fix or accept deviation; only after the user chooses fix, run `bash "$COMET_STATE" transition <name> verify-fail` and invoke `/comet-build`
- If `phase: open` but proposal/design/tasks are complete, first run `bash "$COMET_GUARD" <change-name> open --apply` to repair state, then continue detection
- If `phase: archive`, only invoke `/comet-archive`; after archive succeeds, the change moves to the archive directory, so do not run guard against the old active directory

@@ -68,5 +68,5 @@

2. `verify_result: pass` and `archived` is not `true` → Invoke `/comet-archive`
3. `verify_result: fail` → run `bash "$COMET_STATE" transition <name> verify-fail`, then invoke `/comet-build`
3. `verify_result: fail` → Enter verification failure decision blocking point (pause and ask fix or accept deviation; only after user chooses fix, run `verify-fail` then `/comet-build`)
4. `phase: verify` or tasks.md all checked → Invoke `/comet-verify`
5. `phase: build` or has Design Doc but plan/execution incomplete → Invoke `/comet-build`
5. `phase: build` or has Design Doc but plan/execution incomplete → Route by workflow: `hotfix` → `/comet-hotfix`, `tweak` → `/comet-tweak`, `full` → `/comet-build`
6. `phase: design` or has change but no Design Doc → Invoke `/comet-design`

@@ -110,12 +110,15 @@ 7. `phase: open` or active change exists but `.comet.yaml` is missing → Invoke `/comet-open`

**Continuous execution requirement**: starting from the detected phase, the agent must automatically continue through all later phases without waiting for another user command, except at explicit decision points. After a phase completes, immediately enter the next phase.
**Continuous execution requirement**: starting from the detected phase, the agent must automatically continue through all later phases. Auto-advancing only applies at transition points without user decisions. When encountering user decision points, must pause and wait for the user's explicit response. Must not use recommendation rules, defaults, or historical preferences to substitute for user confirmation.
Nodes requiring user participation:
**Decision points are blocking points**: whenever reaching any of the following nodes, the current `/comet` invocation must stop. Only after the user explicitly chooses can the corresponding state fields be written and operations executed, then auto-advance resumes.
Nodes requiring user participation (pause only at these nodes):
1. Confirm design approach during brainstorming
2. Select execution mode during build phase
3. Decide to fix or accept deviation when verify fails
2. Select workflow configuration during build phase (isolation + execution method, single interaction)
3. Decide to fix or accept deviation when verify fails (including Spec drift handling)
4. Choose branch handling method for finishing-branch
5. Encounter upgrade conditions (hotfix/tweak → full workflow)
6. Build phase scope expansion requiring redesign or new change split
Agents should not skip these decision points; other unambiguous phase transitions can proceed automatically.
Agents should not skip these decision points; other unambiguous phase transitions must proceed automatically, must not exit midway.
</IMPORTANT>

@@ -145,7 +148,7 @@

open ──→ build ──→ verify ──→ archive
↑ If upgrade triggered → supplement Design Doc → return to full workflow
↑ If upgrade triggered → block for confirmation → supplement Design Doc → return to full workflow
/comet-tweak (preset, skip brainstorming and full plan)
open ──→ lightweight build ──→ light verify ──→ archive
↑ If upgrade triggered → supplement Design Doc → return to full workflow
↑ If upgrade triggered → block for confirmation → supplement Design Doc → return to full workflow
```

@@ -164,2 +167,3 @@

plan: docs/superpowers/plans/YYYY-MM-DD-feature.md
base_ref: a1b2c3d4e5f6...
build_mode: subagent-driven-development

@@ -171,2 +175,3 @@ isolation: branch

branch_status: pending
created_at: 2026-05-26
verified_at: null

@@ -179,6 +184,7 @@ archived: false

| `workflow` | `full`, `hotfix`, or `tweak` |
| `phase` | Current phase: `open`, `design`, `build`, `verify`, `archive` |
| `phase` | Current phase: `open`, `design`, `build`, `verify`, `archive` (init sets to `open` uniformly, guard handles transitions) |
| `design_doc` | Associated Superpowers Design Doc path, can be empty |
| `plan` | Associated Superpowers Plan path, can be empty |
| `build_mode` | Selected execution mode, can be empty |
| `base_ref` | Git commit SHA recorded at init, used for scale assessment. Serves as fallback when no plan exists |
| `build_mode` | Selected execution method, can be empty |
| `isolation` | `branch` or `worktree`, workspace isolation method. Full workflow init may leave this as `null`, but only until `/comet-build` Step 3; hotfix/tweak default to `branch` |

@@ -189,2 +195,3 @@ | `verify_mode` | `light` or `full`, can be empty |

| `branch_status` | `pending` or `handled`; set to `handled` after branch handling completes |
| `created_at` | Change creation date (auto-set at init), format `YYYY-MM-DD` |
| `verified_at` | Verification pass time, can be empty |

@@ -215,5 +222,7 @@ | `archived` | Whether change is archived |

COMET_STATE="${COMET_STATE:-$(find "${COMET_SEARCH_ROOTS[@]}" -path '*/comet/scripts/comet-state.sh' -type f -print -quit 2>/dev/null)}"
COMET_HANDOFF="${COMET_HANDOFF:-$(find "${COMET_SEARCH_ROOTS[@]}" -path '*/comet/scripts/comet-handoff.sh' -type f -print -quit 2>/dev/null)}"
COMET_ARCHIVE="${COMET_ARCHIVE:-$(find "${COMET_SEARCH_ROOTS[@]}" -path '*/comet/scripts/comet-archive.sh' -type f -print -quit 2>/dev/null)}"
if [ -z "$COMET_GUARD" ] || [ -z "$COMET_STATE" ] || [ -z "$COMET_ARCHIVE" ]; then
# Stop workflow when script location fails
if [ -z "$COMET_GUARD" ] || [ -z "$COMET_STATE" ] || [ -z "$COMET_HANDOFF" ] || [ -z "$COMET_ARCHIVE" ]; then
echo "ERROR: Comet scripts not found. Ensure the comet skill is installed." >&2

@@ -248,3 +257,3 @@ echo "Expected path pattern: */comet/scripts/comet-*.sh under project or platform skill directories" >&2

After loading comet, agents should run the three variable assignments above once, then reuse `$COMET_GUARD`, `$COMET_STATE`, `$COMET_ARCHIVE` throughout the session.
After loading comet, agents should run the variable assignments above once, then reuse `$COMET_GUARD`, `$COMET_STATE`, `$COMET_HANDOFF`, `$COMET_ARCHIVE` throughout the session.

@@ -263,2 +272,3 @@ ### File Structure

│ │ ├── specs/<capability>/spec.md # Delta capability spec
│ │ ├── .comet/handoff/ # Script-generated phase handoff packages
│ │ └── tasks.md # Task checklist

@@ -277,9 +287,10 @@ │ └── archive/YYYY-MM-DD-<name>/ # Archived

2. **delta spec is a living document** — Freely modify during phase 3, sync at archive
3. **Keep tasks.md in sync** — Check off each completed task
4. **Commit frequently** — One commit per task, message reflects design intent
5. **Verify before archive** — Execute `/comet-archive` only after `/comet-verify` passes
6. **Classify incremental updates** — Small edits, medium brainstorming, large new changes
7. **Plan must associate with change** — File header contains `change:` and `design-doc:` metadata
8. **Archive closure** — design doc and plan must mark `archived-with` status
9. **Modifying existing features** — Just open a new change
10. **Preset has limits** — Switch to full workflow promptly when hotfix/tweak meet upgrade conditions
3. **Handoff packages are generated by scripts** — OpenSpec → Superpowers context must be generated through `comet-handoff.sh` as compact traceable excerpts (use `--full` when needed), and validated by guard for source/hash/mode
4. **Keep tasks.md in sync** — Check off each completed task
5. **Commit frequently** — One commit per task, message reflects design intent
6. **Verify before archive** — Execute `/comet-archive` only after `/comet-verify` passes
7. **Classify incremental updates** — Small edits, medium brainstorming, large new changes
8. **Plan must associate with change** — File header contains `change:` and `design-doc:` metadata
9. **Archive closure** — design doc and plan must mark `archived-with` status
10. **Modifying existing features** — Just open a new change
11. **Preset has limits** — Switch to full workflow promptly when hotfix/tweak meet upgrade conditions

@@ -102,3 +102,3 @@ import path from 'path';

return new Promise((resolve) => {
const child = spawn(getNpmExecutable(), args, { cwd, stdio: 'inherit' });
const child = spawn(getNpmExecutable(), args, { cwd, stdio: 'inherit', shell: true });
child.on('error', () => resolve(false));

@@ -105,0 +105,0 @@ child.on('exit', (code) => resolve(code === 0));

@@ -1,1 +0,1 @@

{"version":3,"file":"update.js","sourceRoot":"","sources":["../../src/commands/update.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,IAAI,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,M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A,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C,QAAA,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA6B5C,CAAC;AAKF,iBAAS,8BAA8B,CACrC,YAAY,EAAE,MAAM,EACpB,KAAK,EAAE,YAAY,EACnB,WAAW,EAAE,MAAM,EAAE,EACrB,QAAQ,GAAE,MAAM,CAAC,QAA2B,GAC3C,MAAM,CAeR;AAED,iBAAe,8BAA8B,CAC3C,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,YAAY,EACnB,WAAW,EAAE,MAAM,EAAE,GACpB,OAAO,CAAC,WAAW,GAAG,QAAQ,GAAG,SAAS,CAAC,CAc7C;AAED,OAAO,EAAE,8BAA8B,EAAE,8BAA8B,EAAE,gBAAgB,EAAE,CAAC"}
{"version":3,"file":"superpowers.d.ts","sourceRoot":"","sources":["../../src/core/superpowers.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C,QAAA,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA6B5C,CAAC;AAMF,iBAAS,8BAA8B,CACrC,YAAY,EAAE,MAAM,EACpB,KAAK,EAAE,YAAY,EACnB,WAAW,EAAE,MAAM,EAAE,EACrB,QAAQ,GAAE,MAAM,CAAC,QAA2B,GAC3C,MAAM,CAeR;AAED,iBAAe,8BAA8B,CAC3C,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,YAAY,EACnB,WAAW,EAAE,MAAM,EAAE,GACpB,OAAO,CAAC,WAAW,GAAG,QAAQ,GAAG,SAAS,CAAC,CA6B7C;AAED,OAAO,EAAE,8BAA8B,EAAE,8BAA8B,EAAE,gBAAgB,EAAE,CAAC"}

@@ -34,2 +34,3 @@ import { execSync } from 'child_process';

const VALID_PLATFORM_IDS = new Set(Object.keys(SKILLS_AGENT_MAP));
const ANSI_ESCAPE_PATTERN = new RegExp(`${String.fromCharCode(27)}\\[[0-9;]*[a-zA-Z]`, 'g');
const SUPERPOWERS_INSTALL_TIMEOUT_MS = 300_000;

@@ -60,3 +61,18 @@ function buildSuperpowersInstallCommand(_projectPath, scope, platformIds, platform = process.platform) {

catch (error) {
console.error(` Superpowers install failed: ${error.message}`);
const execError = error;
console.error(` Superpowers install failed: ${execError.message}`);
const stderr = execError.stderr?.toString()?.trim();
if (stderr) {
const cleaned = stderr
.replace(ANSI_ESCAPE_PATTERN, '')
.replace(/\[999D\[J/g, '')
.replace(/\[\?25[hl]/g, '')
.split('\n')
.filter((line) => line.trim() && !/^(│|├|╮|╯|●|◇|◒|◐|◓|◑|■)/.test(line.trim()))
.join('\n')
.trim();
if (cleaned) {
console.error(` ${cleaned.split('\n').join('\n ')}`);
}
}
return 'failed';

@@ -63,0 +79,0 @@ }

@@ -1,1 +0,1 @@

{"version":3,"file":"superpowers.js","sourceRoot":"","sources":["../../src/core/superpowers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAG9C,MAAM,gBAAgB,GAA2B;IAC/C,MAAM,EAAE,aAAa;IACrB,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,OAAO;IACd,QAAQ,EAAE,UAAU;IACpB,QAAQ,EAAE,UAAU;IACpB,KAAK,EAAE,OAAO;IACd,OAAO,EAAE,KAAK;IACd,QAAQ,EAAE,UAAU;IACpB,gBAAgB,EAAE,gBAAgB;IAClC,MAAM,EAAE,YAAY;IACpB,UAAU,EAAE,WAAW;IACvB,IAAI,EAAE,WAAW;IACjB,QAAQ,EAAE,MAAM;IAChB,MAAM,EAAE,SAAS;IACjB,IAAI,EAAE,UAAU;IAChB,MAAM,EAAE,WAAW;IACnB,KAAK,EAAE,OAAO;IACd,SAAS,EAAE,WAAW;IACtB,QAAQ,EAAE,WAAW;IACrB,KAAK,EAAE,OAAO;IACd,OAAO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