快速判断
- 01这个 Skill 是干嘛的
- 用任务分解、工具调用和反馈循环组织可迁移的 Agent 执行方式。
- 02它能解决什么问题
- 解决通用 Agent 面对复杂目标时不会拆解、调用工具随意和结果缺少闭环的问题。
- 03它适合谁来用
- 适合构建或研究通用 Agent 工作流的开发者与实验团队。
<p align="center"> <a href="https://github.com/rpamis/comet/blob/master/img/title-log.png"> <picture> <source srcset="https://github.com/rpamis/comet/blob/master/img/title-log.png"> <img src="https://github.com/rpamis/comet/blob/master/img/title-log.png" alt="Comet logo"> </picture> </a> </p>
<p align="center"> <a href="https://github.com/rpamis/comet/actions/workflows/ci.yml"><img alt="CI" src="https://img.shields.io/github/actions/workflow/status/rpamis/comet/ci.yml?branch=master&style=flat-square&label=CI" /></a> <a href="https://app.codecov.io/gh/rpamis/comet/tree/master"><img alt="codecov" src="https://img.shields.io/codecov/c/github/rpamis/comet/master?style=flat-square&label=coverage&color=%23E61A7A" /></a> <a href="https://deepwiki.com/rpamis/comet"><img alt="DeepWiki" src="https://img.shields.io/badge/DeepWiki-rpamis%2Fcomet-blue?style=flat-square" /></a> <a href="https://www.npmjs.com/package/@rpamis/comet"><img alt="npm version" src="https://img.shields.io/npm/v/@rpamis/comet?style=flat-square" /></a> <a href="https://www.npmjs.com/package/@rpamis/comet"><img alt="npm download count" src="https://img.shields.io/npm/dm/@rpamis/comet?style=flat-square&label=Downloads/mo" /></a> <a href="https://www.npmjs.com/package/@rpamis/comet"><img alt="npm weekly download count" src="https://img.shields.io/npm/dw/@rpamis/comet?style=flat-square&label=Downloads/wk" /></a> <a href="https://docs.comet.rpamis.com/"><img alt="Comet Docs" src="https://img.shields.io/badge/Docs-docs.comet.rpamis.com-FFD700?style=flat-square" /></a> <a href="./LICENSE"><img alt="License: MIT" src="https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square" /></a> </p>
<p align="center"> <a href="https://trendshift.io/repositories/38989?utm_source=repository-badge&utm_medium=badge&utm_campaign=badge-repository-38989" target="_blank" rel="noopener noreferrer"><img src="https://trendshift.io/api/badge/repositories/38989" alt="rpamis%2Fcomet | Trendshift" width="250" height="55"/></a> </p>
什么是Comet ?
██████╗ ██████╗ ███╗ ███╗███████╗████████╗
██╔════╝██╔═══██╗████╗ ████║██╔════╝╚══██╔══╝
██║ ██║ ██║██╔████╔██║█████╗ ██║
██║ ██║ ██║██║╚██╔╝██║██╔══╝ ██║
╚██████╗╚██████╔╝██║ ╚═╝ ██║███████╗ ██║
╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝ ╚═╝
English version: README.md Bilibili video 抖音
Comet 是一个面向Coding的可恢复长程任务工作流与 Skill 平台。
它用统一的跨平台运行时把 OpenSpec 产物、Superpowers 执行方法论、Skill 创建、评估与发布串成一条工作闭环
让你可以用一个工具链处理需求到归档、中断后恢复,将任意Skill组合得像Comet一样,基于科学的Rubric、Pass@k、Pass^k评分演进你的Skill
[!IMPORTANT] 0.4.0-beta.1 — Comet 升级为纯 Node runtime(不再依赖 Bash/WSL),并带来三大核心能力:用
/comet-any把任意 Skill 组合成自定义工作流、用comet eval评估任意Skill, 并接入到LangSmith系统中、用comet dashboard在浏览器里可视化每一个 change。 0.3.9 —review_mode: off|standard|thorough控制 Build/Verify 自动代码审查并支持项目级默认;init/update 改为可选依赖安装,补齐 CLI 国际化、阶段守护加固和 macOS 可执行权限。 0.3.8 — 新增 Kimi Code 支持、安全的多平台comet uninstall、子代理调度扩展、按需加载共享参考、版本更新检查和 pre-commit 格式化。 0.3.7 — 新增 CodeGraph 语义索引、Beta 上下文压缩、主动式上下文压缩、Token 优化、auto_transition、阶段守护、可选 TDD 和更稳的归档/验证流程。 详见 NEWS.md。
组合OpenSpec+Superpowers不是Comet的最终目的,我们希望能够追踪类似这样的长程任务Skill找到能够让长链路Skill稳定执行的Harness能力,如果你也感兴趣,欢迎参与我们的项目贡献,或通过我们的源码进行学习
为什么需要 Comet
- 长程任务稳定的核心— Comet的经典Spec模式结合了OpenSpec和Superpowers,用状态机、Gate守卫、脚本串联整个链路,Agent只能够在特定阶段做特定事情,只有在完成阶段任务后才能够退出。支持自动推进机制,核心流程全自动推进,只在必要时刻进入HITL与你交互确认。
- 可恢复工作流&智能路由 — Comet采用意图识别技术,能够路由你当前任务最需要走向的路径。
/comet会记住一个 change 停在什么阶段,长任务恢复时不需要让 Agent 重新猜上下文,支持跨设备0上下文断点恢复。你不在需要记忆冗长的Skill命令,无论何时何地,只需要/comet推进或恢复你的所有任务。 - Skill 平台 — Comet能够编写可复用 Skill 包,并通过
/comet-any把它们整理成可分发 Bundle,你制作的Skill可以像如comet init一样一键分发到所有Coding平台。 - Eval 平台— Comet基于科学的Rubric、Pass@k、Pass^k评分评估你的Skill,让Skill演进是基于科学依据,而不是依靠感觉,支持接入LangSmith评估,让评估真实走进企业级生产环境。基于双Agent架构自动化在你的生产环境完成评估工作
极低的记忆门槛
使用Comet你只需要记忆2个Skill和1条命令,用极低的使用门槛覆盖Coding、创建与评估
- 用
/comet进行任何Coding任务 - 用
/comet-any组合任意Skill - 用comet eval评估任意Skill
Comet 0.4.0 基线对比
以下图表来自 16 个 Comet workflow 任务,每个 treatment 5 次样本,对比无 Comet、Comet 0.3.9 与 Comet 0.4.0。
核心观察了Pass@5、Pass^5以及Rubric评分的差异,无 Comet Skill的基线只验证业务行为
<p align="center"> <img src="https://github.com/rpamis/comet/blob/master/img/comet-eval-pass5.png" alt="Comet pass@5 与 pass^5 基线对比" width="920"> </p>
<p align="center"> <img src="https://github.com/rpamis/comet/blob/master/img/comet-eval-rubric-core.png" alt="Comet 核心 rubric 与 LLM-as-judge 基线对比" width="920"> </p>
从业界前沿技术出发
Comet的许多能力都能够在海内外大厂实践中找到相似之处,想进一步了解Comet与业界实践的对照
详见 Comet Docs
你能学到什么
- 如何稳定触发嵌套 Skill — 不是让 Agent 依靠文档描述做了“看起来像触发了 Skill”的操作(比如根据 Skill 描述写了文件),而是真正触发 Skill(核心特征:Claude Code CLI 上有 Skill 触发的打印)。Comet 中会触发大量来自 OpenSpec 和 Superpowers 的能力,稳定触发的 Prompt 经过大规模实践打磨
- 如何让组合 Skill 多阶段自动流转 — 不是靠人工介入。Comet 的 5 阶段流程,除必要的用户选择项外,核心流程能够自动进行 Skill 触发,同时状态机机制也能保障状态扭转的可靠性。
- 如何把 Spec 生命周期做成可恢复流程 — Comet 会把 OpenSpec 的 change/spec 制品与 Superpowers 的设计、计划文档关联起来,并通过每个 change 的
.comet.yaml记录阶段、执行模式、验证结果和归档状态,让 Agent 中断后能够继续,而不是重新翻文档猜进度。 - 如何把文档同步从“用户提醒”变成自动化 — Comet 将 handoff、状态更新、校验和归档同步放进脚本化流程,减少“记得更新 design doc”“记得同步 spec”“记得归档 change”这类反复提示。
- 如何设计 Agent 可执行的守护条件 — Comet 的阶段退出不是简单相信 Agent 说“完成了”,而是通过
comet-guard.mjs、comet-yaml-validate.mjs、comet-state.mjs等脚本检查任务、状态字段、验证证据和归档条件,满足条件后才允许推进。 - 如何做跨平台 Skill 分发和安装 — Comet 支持多种 AI 编码平台、项目级/全局安装、中文/英文 Skill 选择,以及平台差异化目录(例如 Antigravity 的项目级和全局路径不同),可以作为 CLI 安装器和 Skill 打包结构的参考。
- 如何把脚本写成 Agent 工作流基础设施 — Comet 的脚本处理 hash、YAML 字段、状态机和归档流程。它展示了如何把原本容易写散在 Prompt 里的流程控制,沉淀成可测试、可复用的工具。
- 如何基于科学的评估驱动演进Skill— Comet Eval支持Rubric结构化评分,并支持Pass@k、Pass^k指标,用最科学的方式演进Skill,而不是靠人工感觉和评估,支持Local和Langsmith评估,让Eval真正走进企业生产环境
- 如何智能的创建Comet一样的Skill— /comet-any支持组合任意Skill,你只需要告诉Agent你的Skill偏好,其余所有稳定性相关的hook,rule,脚本,Skill引用文件全程都由Agent搞定,帮助你创建出Comet一样好用的Skill
安装
前置要求:
- Node.js 20+
- npm/npx
- Git
npm install -g @rpamis/comet
快速开始
cd your-project
comet init
对OpenClaw和Hermes、或其他AI平台的支持
对于直接使用通用 skills CLI 的平台,可以用下面的方式安装 Comet skill 包:
npx skills add rpamis/comet
运行截图
经典Spec Skill
<p align="center"> <img src="https://github.com/rpamis/comet/blob/master/img/runner.png" alt="runner"> </p> <p align="center">自动安装 OpenSpec、Superpowers,一键配置开发环境</p> <p align="center">多阶段 Skill 入口,自动识别当前 Spec 阶段,核心流程自动触发,关键节点人工审核</p>
与LangSmith/LangFuse的集成
Comet Eval的自动化双Agent架构能够在线上与LangSmith/LangFuse环境集成,让实验可追溯、Skill可演进
<p align="center"> <img src="https://github.com/rpamis/comet/blob/master/img/langsmith-dataset.png" alt="runner"> </p> <p align="center">在LangSmith中管理你的Skill基线,查看详细的评估指标,延迟及Token消耗</p>
<p align="center"> <img src="https://github.com/rpamis/comet/blob/master/img/langsmith-trace.png" alt="runner"> </p> <p align="center">在LangSmith中追踪你的Claude Code全链路</p>
<p align="center"> <img src="https://github.com/rpamis/comet/blob/master/img/langsmith-baseline-detail.png" alt="runner"> </p> <p align="center">在LangSmith通过Pytest跟踪自定义Rubric指标</p>
CLI命令
<details> <summary><code>comet init [path]</code> — 初始化 Comet 工作流</summary>
为选定的 AI 编码平台初始化 OpenSpec、Superpowers 和 Comet 技能。
| 选项 | 描述 |
|---|---|
--yes | 非交互模式,自动选择已检测平台(未检测到则选择全部) |
--scope <scope> | 安装范围:project 或 global |
--language <lang> | 技能语言:en 或 zh(跳过交互式语言选择) |
--skip-existing | 跳过已安装的组件 |
--overwrite | 覆盖已安装的组件 |
--json | 输出结构化 JSON |
当同一平台检测到多个已安装组件时,交互式 init 会先提供一次批量选择:全部覆盖、全部跳过,或逐项选择。
</details>
<details> <summary><code>comet status [path]</code> — 显示活跃更改和下一步命令</summary>
显示活跃更改、任务进度、推荐的下一步 Comet 工作流命令,以及当前 step、runtime mode 和针对畸形状态或缺失证据的 diagnostic 恢复提示。
| 选项 | 描述 |
|---|---|
--json | 输出活跃更改,并包含 nextCommand、currentStep 和运行时数据 |
</details>
<details> <summary><code>comet resume-probe [path]</code> — 判断是否应恢复活跃 Comet workflow</summary>
只读检查 active change、.comet.yaml、当前 phase 和用户请求,输出 auto_resume、ask_user、out_of_scope 或 none。 comet init/update 会把 <comet-ambient-resume> managed block 合并进 AGENTS.md 和 CLAUDE.md,保留用户已有规则。
</details>
<details> <summary><code>comet dashboard [path]</code> — 启动本地只读仪表盘服务</summary>
启动本地 HTTP 服务器,展示包含活跃更改、阶段状态、任务进度和归档历史的可视化仪表盘。默认自动在浏览器中打开。
<p align="center"> <img src="https://github.com/rpamis/comet/blob/master/img/dashboard-light.png" alt="Comet 仪表盘-Light" width="800"> </p> <p align="center"> <img src="https://github.com/rpamis/comet/blob/master/img/dashboard-dark.png" alt="Comet 仪表盘-Dark" width="800"> </p> <p align="center">活跃更改概览,包含阶段指示器、任务进度和归档历史</p>
| 选项 | 描述 |
|---|---|
--port | 服务器端口(默认:自动选择可用端口) |
--no-open | 不自动在浏览器中打开仪表盘 |
--json | 收集单次快照并以 JSON 格式输出到标准输出(用于脚本编写/检查) |
</details>
<details> <summary><code>comet doctor [path]</code> — 诊断 Comet 安装健康状态</summary>
检查项目级/全局安装、工作目录、已安装技能、脚本,以及活跃 change 的诊断信息。comet doctor 会对畸形 .comet.yaml 报告 diagnostic 状态,对有效 change 报告 current step / runtime mode,并指出哪些运行时证据缺失导致无法安全恢复。
| 选项 | 描述 |
|---|---|
--json | 输出结构化诊断结果 |
--scope <scope> | 诊断 auto、project 或 global 范围(默认:auto) |
</details>
<details> <summary><code>comet update [path]</code> — 更新 Comet 包和技能</summary>
更新 npm 包,并刷新已检测到的项目级/全局 Comet 技能。
| 选项 | 描述 |
|---|---|
--json | 以 JSON 输出 npm 和 skill 更新结果 |
--language <lang> | 覆盖自动检测到的 skill 语言 (en, zh) |
--scope <scope> | 仅更新 global 或 project 范围 |
</details>
<details> <summary><code>comet uninstall [path]</code> — 卸载 Comet 技能、规则和钩子</summary>
安全移除 Comet 分发的技能、规则和钩子,保留用户自定义的钩子和非 Comet 配置。
| 选项 | 描述 |
|---|---|
--force | 跳过确认提示 |
--scope <scope> | 仅卸载 global 或 project 范围 |
--json | 以 JSON 输出卸载结果 |
comet uninstall # 交互式 — 显示已安装目标,确认后卸载
comet uninstall --force # 非交互式 — 直接移除所有内容
comet uninstall --scope project # 仅移除项目级安装
</details>
<details> <summary><code>comet eval [target]</code> — 通过共享 eval harness 运行 Skill Eval</summary>
comet eval 用来回答一个很朴素的问题:这个 Skill 真的能在标准任务里稳定工作吗?
最常见的是评估 /comet-any 生成的 Skill。生成物里通常会有 comet/eval.yaml,优先把这个文件交给 comet eval:
comet eval ./generated-skill/comet/eval.yaml --collect
comet eval ./generated-skill/comet/eval.yaml --html
第一条命令只做发现和预检查,用来确认 manifest、任务和依赖路径能被识别,不会先跑高成本评估。 第二条命令执行本地评估并生成可浏览报告,适合作为发布前证据。报告路径会在命令输出里显示,通常位于 eval/local/logs/experiments/<experiment-id>/summary.html。
如果你还没有 comet/eval.yaml,只有一个本地 Skill 目录,可以先跑低成本冒烟:
comet eval ./my-skill --quick --html
这个路径适合早期验证 Skill 目录能否被读取、能否注入到 eval harness,以及通用 smoke task 能否跑起来。 准备发布时,仍推荐通过 /comet-any 生成 comet/eval.yaml,再走 manifest 评估。
Local 评估怎么看
本地评估适合日常开发和发布前自检。优先看 HTML 报告里的几件事:
- pass/fail 和 rubric 分数是否符合预期
- 失败归因是 Skill、workflow、task、model,还是环境/harness
- 是否缺少预期 artifact
- token、成本和耗时是否异常
- 当前结果是否足够干净,还是需要重跑某个 task/treatment
如果报告提示 Insufficient clean data 或 Inconclusive due to data quality,先检查认证、限额、Docker/容器和网络等环境问题,不要直接把这次结果当成 Skill 质量结论。
LangSmith 评估怎么用
当你需要把评估结果同步到 LangSmith,或想在团队里查看 run、rubric feedback、成本和 Claude Code 轨迹时,再使用 LangSmith 套件。它复用同一套任务、treatment、rubric 和 comet/eval.yaml,只是把结果上报到 LangSmith。
先准备一次依赖和环境变量:
cd eval
uv sync --extra langsmith
LANGSMITH_API_KEY=lsv2_pt_...
LANGSMITH_PROJECT=comet-skill-eval
LANGSMITH_TRACING=true
然后运行同一个 manifest:
cd eval
uv run pytest langsmith/tests/tasks/test_tasks.py \
--eval-manifest=/absolute/path/to/generated-skill/comet/eval.yaml -v
PowerShell 中可以用 $env:LANGSMITH_API_KEY、$env:LANGSMITH_PROJECT 和 $env:LANGSMITH_TRACING 设置变量;也可以把它们放进 eval/.env。完整插件缓存和轨迹追踪说明见 eval/langsmith/README.md。
什么时候用哪个
- 日常开发:
comet eval ./my-skill --quick --html /comet-any生成物:comet eval ./generated-skill/comet/eval.yaml --collect,再跑--html- 发布前证据:优先使用
comet/eval.yaml的本地 HTML 报告 - 团队追踪和横向对比:用同一个
comet/eval.yaml跑 LangSmith 套件
更完整的任务、treatment、报告口径和排障说明见 Eval 使用文档。
</details>
<details> <summary><code>/comet-any</code> / <code>comet creator</code> / <code>comet publish</code> — 创建、评估和发布 Skill</summary>
/comet-any 是普通用户主路径:创建或优化可复用 Skill → comet eval 验证 → 审核与分发,直到形成稳定组合 Skill。 需要恢复或发布时,使用 comet creator、comet creator status / comet creator next、comet publish 和 comet publish distribute --preview。README 不展开后端命令清单;高级 Bundle 后端和高级 Engine Run(例如 comet skill run / comet skill continue)见 Skill 创建文档。
</details>
<details> <summary><code>comet --help</code> / <code>comet --version</code> — 基础信息</summary>
| 命令 | 描述 |
|---|---|
comet --help | 显示帮助 |
comet --version | 显示版本 |
</details>
支持平台
comet init 支持 33 个 AI 编码平台:
<details> <summary>查看完整平台列表</summary>
| 平台 | 技能目录 | 平台 | 技能目录 |
|---|---|---|---|
| Claude Code | .claude/ | Cursor | .cursor/ |
| Codex | .codex/ | OpenCode | .opencode/ |
| Windsurf | .windsurf/ | Cline | .cline/ |
| RooCode | .roo/ | Continue | .continue/ |
| GitHub Copilot | .github/ | Gemini CLI | .gemini/ |
| Amazon Q Developer | .amazonq/ | Qwen Code | .qwen/ |
| Kilo Code | .kilocode/ | Auggie | .augment/ |
| Kimi Code | .kimi-code/ | Kiro | .kiro/ |
| Lingma | .lingma/ | Junie | .junie/ |
| CodeBuddy | .codebuddy/ | CoStrict | .cospec/ |
| Crush | .crush/ | Factory Droid | .factory/ |
| iFlow | .iflow/ | Pi | .pi/ |
| Qoder | .qoder/ | Antigravity | .agents/ |
| Antigravity 2.0 | .agents/ | Bob Shell | .bob/ |
| ForgeCode | .forge/ | Trae | .trae/ |
| Trae CN | .trae-cn/ | ZCode | .zcode/ |
| MimoCode | .mimocode/ |
</details>
技能
comet init 完成后,三组技能将被安装到所选平台的 skills/ 目录:
Comet 技能
<details> <summary>查看 Comet 技能列表</summary>
| 技能 | 描述 |
|---|---|
/comet | 主入口 — 自动检测阶段并分派到子命令 |
/comet-open | 阶段 1:打开变更(提案、设计、任务分解) |
/comet-design | 阶段 2:深度设计(头脑风暴、设计文档) |
/comet-build | 阶段 3:规划与构建(实现计划、代码提交) |
/comet-verify | 阶段 4:验证与完成(测试、验证报告) |
/comet-archive | 阶段 5:归档(delta spec 同步、状态标注) |
/comet-hotfix | 快捷路径:快速 bug 修复(跳过头脑风暴,不需要能力设计) |
/comet-tweak | 轻量预设路径:串联 OpenSpec 的中等改动(delta spec 为一等公民,跳过头脑风暴和完整计划) |
/comet-any | Comet Skill Creator:创建或优化可复用 Skill |
</details>
守护与自动化脚本
<details> <summary>查看脚本列表</summary>
| 脚本 | 用途 |
|---|---|
comet-env.mjs | 脚本发现助手 — 打印内置脚本所在目录,供 skill 解析同级命令脚本路径 |
comet-guard.mjs | 阶段转换守护 — 验证退出条件,--apply 自动更新 .comet.yaml |
comet-handoff.mjs | 设计交接 — 从 OpenSpec 制品生成带 SHA256 追踪的确定性上下文包 |
comet-archive.mjs | 一键归档 — 验证状态、同步 specs、移至归档、更新状态 |
comet-yaml-validate.mjs | 模式校验器 — 校验 .comet.yaml 结构和字段值 |
comet-state.mjs | 统一状态管理 — init/set/get/check/scale,agent 的专属 YAML 接口 |
comet-hook-guard.mjs | 阶段写入守护 — PreToolUse hook,在 open/design/archive 阶段拦截文件写入 |
Classic 自动化以 TypeScript 生成的独立 Node.js 命令脚本分发,通过 node 在所有平台运行,因此 Comet 只依赖Node.js,无需 Bash、Git Bash 或 WSL。
</details>
工作流
/comet
↓ auto-detect
/comet-open --> /comet-design --> /comet-build --> /comet-verify --> /comet-archive
(OpenSpec) (Superpowers) (Superpowers) (Both) (OpenSpec)
/comet-hotfix(快捷路径,跳过头脑风暴)
open --> build --> verify --> archive
/comet-tweak(轻量预设路径,串联 OpenSpec)
open --> build --> verify --> archive
五个阶段
| 阶段 | 命令 | 归属 | 产出物 |
|---|---|---|---|
| 1. Open | /comet-open | OpenSpec | proposal.md、design.md、tasks.md |
| 2. Deep Design | /comet-design | Superpowers | Design Doc、delta spec |
| 3. Plan & Build | /comet-build | Superpowers | 实现计划、代码提交 |
| 4. Verify & Finish | /comet-verify | Both | 验证报告、分支处理 |
| 5. Archive | /comet-archive | OpenSpec | delta→main spec 同步、归档 |
状态管理
Comet 使用解耦状态架构,文件独立管理
<details> <summary>查看状态管理</summary>
| 文件 | 归属 | 用途 |
|---|---|---|
.openspec.yaml | OpenSpec | Spec 生命周期、变更元数据 |
openspec/changes/<name>/.comet.yaml | Comet | 工作流阶段、执行模式、验证状态 |
.comet/run-state.json | Engine | Run 身份和执行状态(机器所有) |
.comet/state-events.jsonl | Comet | 追加式状态转移审计日志 |
每个 change 目录下的 .comet.yaml 保存 Classic 工作流状态,只保留 run_id 指向 Engine Run。Engine 的机器状态放在 该 change 的 .comet/run-state.json,使用 currentStep、status、iteration 等 camelCase 字段;旧 YAML 中残留的 Run 字段会在兼容读取后迁移出去,skill 不再是当前 .comet.yaml 的合法字段。项目级默认配置只放在 .comet/config.yaml。
阶段推进由 TypeScript transition table、comet-state transition、comet-guard --apply 和归档命令统一处理。 每次成功推进都会向 .comet/state-events.jsonl 追加一条审计事件,记录来源、前后状态和实际字段变化。
这样 Skill 文本只负责指导 Agent,状态读写、阶段校验、审计和断点恢复都交给脚本;Agent 通过 Comet 命令即可知道当前 Spec 处于哪个阶段。
</details>
<details> <summary>查看 change .comet.yaml 关键字段</summary>
change .comet.yaml 关键字段:
workflow: full # 工作流类型:full | tweak | hotfix
phase: build # 当前阶段:open | design | build | verify | archive
context_compression: off # 上下文压缩:off | beta
auto_transition: true # 阶段完成后是否自动触发下一个 Skill
base_ref: <git-sha-or-null> # 初始化时记录的基线提交;可为 null
created_at: YYYY-MM-DD # comet-state.mjs init 写入的创建日期
run_id: <uuid> # 仅链接到 .comet/run-state.json;Run 详情不写在 YAML
review_mode: standard # 自动代码审查强度:off | standard | thorough
build_mode: subagent-driven-development # 构建方式:subagent-driven-development | executing-plans | direct
build_pause: null # `build_pause` 记录 build 阶段内部暂停点:null 无暂停,`plan-ready` 表示 plan 已生成
subagent_dispatch: null # subagent 分派确认;进入 verify 前需 confirmed
tdd_mode: null # full workflow 的 build 选择:tdd | direct
isolation: branch # 隔离方式:branch | worktree
verify_mode: null # 验证模式:light | full
design_doc: docs/superpowers/specs/<design-doc>.md # 设计文档路径
plan: docs/superpowers/plans/YYYY-MM-DD-feature.md # 实现计划路径
verify_result: pending # 验证结果:pending | pass | fail
verification_report: null # 验证报告路径;verify-pass 前必须存在
branch_status: pending # 分支处理状态:pending | handled
verified_at: null # 验证通过时间;验证前为 null
archived: false # 是否已归档;归档后阻止继续修改
direct_override: null # full workflow 选择 direct build 时必须显式 true
handoff_context: null # comet-handoff.mjs 写入的设计交接上下文路径
handoff_hash: null # handoff_context 对应 SHA256;存在时必须是 64 位 hex
classic_profile: full # 脚本维护的 Classic profile(机器字段)
classic_migration: 1 # 脚本维护的迁移版本(机器字段)
</details>
可靠性特性
Comet 通过自动化状态转换确保 agent 执行可靠性:
<details> <summary>查看可靠性特性</summary>
- 入口验证 — 每个阶段在执行前验证前置条件
- 检查文件存在、状态一致性、阶段转换 - 验证失败时输出 [HARD STOP] 及可操作建议
- 自动化状态转换 —
comet-guard.mjs --apply自动更新.comet.yaml
- 所有阶段转换(open → design/build → verify → archive)使用 guard --apply - 无需手动状态编辑 — 消除写入验证错误 - comet-state.mjs 是 agent 对状态操作的专属接口 - Guard 和 archive 脚本内部使用 comet-state.mjs 进行状态管理
- 模式校验 —
comet-yaml-validate.mjs确保数据完整性
- 校验必填字段和可选字段 - 校验枚举值(包括 direct_override) - 校验 design_doc、plan、handoff_context 路径存在,并校验 handoff_hash 格式 - 检测未知/拼写错误字段
- Build 决策强制 — Guard 和状态转换同时拦截跳过关键选择
- isolation 必须是 branch 或 worktree - build_mode 必须已选择 - build_pause: plan-ready 是 plan 生成后的可恢复暂停点,不是 build_mode - full workflow 的 build_mode: direct 必须有 direct_override: true
- 验证证据强制 — Guard 在阶段流转前强制要求验证凭证
- verify-pass 转换要求 verification_report 指向已存在的验证报告文件 - branch_status 必须为 handled 才能通过验证 - Guard 检查 verification_report exists 和 branch_status=handled 作为硬性前提 - 防止验证或分支处理被跳过时产生虚假的阶段推进
- 归档自动化 —
comet-archive.mjs一键处理完整归档流程
- 验证入口状态、通过 OpenSpec 将 delta specs 合并到 main specs - 标注设计文档和计划文档的 frontmatter - 将变更移至归档目录并更新 archived: true - 支持 --dry-run 预览
- 防漂移阶段守护 — 长上下文会话中的阶段意识保障
- Rule 层:comet-phase-guard.md 每轮注入阶段感知、Skill 调用规范和上下文恢复指令(所有平台通用) - Hook 层:comet-hook-guard.mjs 在 open/design/archive 阶段硬拦截文件写入(Claude Code 等支持 hook 的平台) - 白名单路径:openspec/*、docs/superpowers/*、.superpowers/*、.claude/*、.comet/*
</details>
经典Spec模式项目结构
your-project/
├── .comet/
│ └── config.yaml # 项目级全局配置(context_compression、review_mode、auto_transition)
├── .claude/skills/ # 平台技能目录(Comet + OpenSpec + Superpowers)
│ ├── comet/SKILL.md
│ │ └── scripts/
│ │ ├── comet-guard.mjs # 阶段转换守护(--apply 自动更新状态)
│ │ ├── comet-env.mjs # 脚本发现助手
│ │ ├── comet-handoff.mjs # 设计交接(OpenSpec → Superpowers 上下文追踪)
│ │ ├── comet-archive.mjs # 一键归档自动化
│ │ ├── comet-yaml-validate.mjs # 模式校验器
│ │ ├── comet-hook-guard.mjs # 阶段写入守护(PreToolUse hook)
│ │ └── comet-state.mjs # 统一状态管理(init/set/get/check/scale)
│ ├── comet-*/SKILL.md
│ ├── openspec-*/SKILL.md
│ └── brainstorming/SKILL.md
├── openspec/ # OpenSpec — WHAT
│ ├── config.yaml
│ └── changes/
│ └── <name>/
│ ├── .openspec.yaml # OpenSpec 状态
│ ├── .comet.yaml # Comet 工作流状态(Classic 字段 + run_id 关联)
│ ├── .comet/
│ │ ├── run-state.json # Engine Run 状态(机器所有,自动迁移)
│ │ └── state-events.jsonl # 状态转移审计日志(追加式)
│ ├── proposal.md
│ ├── design.md
│ ├── specs/<capability>/spec.md
│ └── tasks.md
└── docs/superpowers/ # Superpowers — HOW
├── specs/ # 设计文档
└── plans/ # 实现计划
<details> <summary>上下文压缩(Beta)</summary>
Comet 支持在 Design → Build 阶段交接时进行上下文压缩。启用后,comet-handoff.mjs 会生成精简的上下文包,在不影响实现正确性的前提下,将 Build 阶段的输入 token 降低 25–30%。
| 模式 | 行为 | Token 节省 |
|---|---|---|
off | handoff context 包含完整 Spec 摘录 | 基线 |
beta | 仅保留 Design Doc + SHA256 hash 引用 | ~25–30% |
Benchmark 核心结论:
- 测试通过率:所有档位均为 100%(压缩不影响实现正确性)
- Spec 覆盖率:off 100% vs beta 95%(压缩可能丢失少量边缘需求细节)
- 规模效应:任务越大,绝对节省量越高(large 档位节省可达 15,000 tokens)
启用方式:在 .comet/config.yaml 中设置 context_compression: beta
详见 CONTEXT-COMPRESSION.md 获取完整 Benchmark 报告、压缩原理和复现步骤。
</details>
<details> <summary>自动流转(Auto Transition)</summary>
auto_transition 控制阶段完成后是否自动调用下一个 Skill,还是暂停等待用户手动触发。阶段推进本身始终执行,该配置仅影响 Skill 调用。
| 值 | 行为 |
|---|---|
true | 阶段完成后自动调用下一个 Skill(默认) |
false | 阶段完成后暂停,用户手动触发下一个 Skill |
三层配置与优先级:COMET_AUTO_TRANSITION 环境变量 > .comet/config.yaml(项目级)> change .comet.yaml。
详见 AUTO-TRANSITION.md 获取配置详情、工作流映射和常见问题。
</details>
开发
贡献流程、提交规范、PR 流程、分支工作流,以及新增平台、Skill、脚本或 changelog 的说明见 CONTRIBUTING-zh.md | English。
详见 CHANGELOG.md 了解版本历史与更新。
路线图
在 Comet Roadmap 查看开发进展与即将推出的功能。
Star历史
Contributors
<a href="https://github.com/rpamis/comet/graphs/contributors"> <img src="https://contrib.rocks/image?repo=rpamis/comet&max=999&columns=12&anon=1" /> </a>
License
社区交流
<table align="center"> <tr> <td align="center" width="180"> <img src="https://github.com/rpamis/comet/blob/master/img/douyin.png" width="120" height="120"><br> <b>抖音群(推荐)</b> </td> <td align="center" width="180"> <img src="https://github.com/rpamis/comet/blob/master/img/wechat.jpg" width="120" height="120"><br> <b>微信群</b> </td> <td align="center" width="180"> <img src="https://github.com/rpamis/comet/blob/master/img/qq.jpg" width="120" height="120"><br> <b>QQ群</b> </td> </tr> </table>
友情链接
<p align="center"> <a href="https://github.com/rpamis/comet/blob/master/img/title-log.png"> <picture> <source srcset="https://github.com/rpamis/comet/blob/master/img/title-log.png"> <img src="https://github.com/rpamis/comet/blob/master/img/title-log.png" alt="Comet logo"> </picture> </a> </p>
<p align="center"> <a href="https://github.com/rpamis/comet/actions/workflows/ci.yml"><img alt="CI" src="https://img.shields.io/github/actions/workflow/status/rpamis/comet/ci.yml?branch=master&style=flat-square&label=CI" /></a> <a href="https://app.codecov.io/gh/rpamis/comet/tree/master"><img alt="codecov" src="https://img.shields.io/codecov/c/github/rpamis/comet/master?style=flat-square&label=coverage&color=%23E61A7A" /></a> <a href="https://deepwiki.com/rpamis/comet"><img alt="DeepWiki" src="https://img.shields.io/badge/DeepWiki-rpamis%2Fcomet-blue?style=flat-square" /></a> <a href="https://www.npmjs.com/package/@rpamis/comet"><img alt="npm version" src="https://img.shields.io/npm/v/@rpamis/comet?style=flat-square" /></a> <a href="https://www.npmjs.com/package/@rpamis/comet"><img alt="npm download count" src="https://img.shields.io/npm/dm/@rpamis/comet?style=flat-square&label=Downloads/mo" /></a> <a href="https://www.npmjs.com/package/@rpamis/comet"><img alt="npm weekly download count" src="https://img.shields.io/npm/dw/@rpamis/comet?style=flat-square&label=Downloads/wk" /></a> <a href="https://docs.comet.rpamis.com/"><img alt="Comet Docs" src="https://img.shields.io/badge/Docs-docs.comet.rpamis.com-FFD700?style=flat-square" /></a> <a href="./LICENSE"><img alt="License: MIT" src="https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square" /></a> </p>
<p align="center"> <a href="https://trendshift.io/repositories/38989?utm_source=repository-badge&utm_medium=badge&utm_campaign=badge-repository-38989" target="_blank" rel="noopener noreferrer"><img src="https://trendshift.io/api/badge/repositories/38989" alt="rpamis%2Fcomet | Trendshift" width="250" height="55"/></a> </p>
What is Comet ?
██████╗ ██████╗ ███╗ ███╗███████╗████████╗
██╔════╝██╔═══██╗████╗ ████║██╔════╝╚══██╔══╝
██║ ██║ ██║██╔████╔██║█████╗ ██║
██║ ██║ ██║██║╚██╔╝██║██╔══╝ ██║
╚██████╗╚██████╔╝██║ ╚═╝ ██║███████╗ ██║
╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝ ╚═╝
Comet is a resumable long-running task workflow and Skill platform for coding.
It uses a unified cross-platform runtime to connect OpenSpec artifacts, Superpowers execution methodology, Skill creation, evaluation, and release into a closed-loop workflow.
It allows you to use a toolchain to handle everything from requirements to archiving, combine any skill to make it like Comet, evolving your skills based on scientific Rubric, Pass@k, and Pass^k scoring.
[!IMPORTANT] 0.4.0-beta.1 — Comet has been upgraded to a pure Node runtime (no longer dependent on Bash/WSL) and brings three core capabilities: use
/comet-anyto combine any skill into a custom workflow, usecomet evalto evaluate any skill and integrate it into the LangSmith system, and usecomet dashboardto visualize each change in the browser. 0.3.9 — Review mode (off|standard|thorough) controls Build/Verify code review with project defaults; init/update now use optional dependency prompts, broader CLI i18n, stronger phase guards, and macOS executable bits. 0.3.8 — Adds Kimi Code support, safe multi-platformcomet uninstall, extended subagent dispatch, shared progressive-loading references, update checks, and pre-commit formatting. 0.3.7 — Adds CodeGraph semantic indexing, Beta context compression, active context compression, token optimizations,auto_transition, phase guards, optional TDD, and safer archive/verification flow. See NEWS.md for details.
Combining OpenSpec and Superpowers is not Comet's ultimate goal. We hope to track long-running skills like these and find the Harness capabilities that enable stable execution of long-running skills. If you are interested in participating, you are welcome to contribute to our project or learn from our source code.
Why Comet
- The stable core for long-running tasks — Comet's Classic Spec mode combines OpenSpec and Superpowers with a state
machine, phase guards, and scripts that connect the full lifecycle. Agents can only do the work allowed in the current phase and can only exit after the phase work is complete. The core flow can advance automatically, with HITL only at moments that need your confirmation.
- Resumable workflow and intelligent routing — Comet uses intent recognition to route each task toward the path it
needs. /comet remembers where a change stopped, supports zero-context recovery across devices, and removes the need to memorize long Skill command names: use /comet to advance or resume your work.
- Skill platform — Comet can author reusable Skill packages and use
/comet-anyto organize them into distributable
Bundles, so Skills you create can be distributed to coding platforms with one command, much like comet init.
- Eval platform — Comet assesses your skills using scientific Rubric, Pass@k, and Pass^k scoring, ensuring skill evolution is based on scientific evidence rather than intuition. It supports integration with LangSmith assessments, bringing evaluation to real-world enterprise production environments. Its dual-agent architecture automates the assessment process in your production environment.
Extremely low memory threshold
With Comet, you only need to remember two skills and one command, covering coding, creation, and evaluation with an extremely low barrier to entry:
- Use
/cometfor coding tasks - Use
/comet-anyto compose any Skills - Use
comet evalto evaluate any Skill
Comet 0.4.0 Baseline Comparison
The following charts are from 16 Comet workflow tasks, with 5 samples per treatment, comparing no Comet, Comet 0.3.9, and Comet 0.4.0.
The core observations were the differences in Pass@5, Pass^5, and Rubric scores. The baseline without Comet Skills only validated business behavior.
<p align="center"> <img src="https://github.com/rpamis/comet/blob/master/img/comet-eval-pass5.png" alt="Comet pass@5 and pass^5 baseline comparison" width="920"> </p>
<p align="center"> <img src="https://github.com/rpamis/comet/blob/master/img/comet-eval-rubric-core.png" alt="Comet core rubric and LLM-as-judge baseline comparison" width="920"> </p>
From Industry-Frontier Practice
Many Comet capabilities have parallels in current industry practice.
To compare Comet with those patterns, see Comet Docs.
What You Can Learn
- How to reliably trigger nested Skills — not by making an agent perform something that merely looks like a Skill
trigger, such as writing files based on a Skill description, but by actually triggering the Skill. Comet invokes many OpenSpec and Superpowers capabilities, with trigger prompts refined through broad real-world practice.
- How to make composed Skills advance through multiple phases automatically — not through manual intervention. Aside
from necessary user choices, Comet's five-phase flow can trigger core Skills automatically while the state machine keeps transitions reliable.
- How to make a Spec lifecycle resumable — Comet links OpenSpec change/spec artifacts with Superpowers design and
plan documents, then records phase, execution mode, verification result, and archive status in each change's .comet.yaml, so an agent can continue after interruption instead of rereading documents and guessing progress.
- How to turn doc synchronization from reminders into automation — Comet scripts handoff, state updates, validation,
and archive sync, reducing repeated prompts such as "remember to update the design doc" or "remember to archive the change."
- How to design guard conditions that agents can execute — phase exits do not rely on an agent saying "done." Scripts
such as comet-guard.mjs, comet-yaml-validate.mjs, and comet-state.mjs check tasks, state fields, verification evidence, and archive conditions before the workflow advances.
- How to distribute and install Skills across platforms — Comet supports many AI coding platforms, project/global
install scopes, Chinese/English Skill variants, and platform-specific directories such as Antigravity's different project/global paths.
- How to turn scripts into agent workflow infrastructure — Comet scripts handle hashes, YAML fields, state machines,
and archive flow, showing how workflow control that is easy to scatter across prompts can become testable, reusable tooling.
- How to evolve Skills through scientific evaluation — Comet Eval supports structured rubric scoring plus Pass@k and
Pass^k metrics, with both local and LangSmith evaluation paths for production use.
- How to create Comet-like Skills intelligently —
/comet-anycomposes arbitrary Skills. You describe your Skill
preferences, and the agent handles stability-related hooks, rules, scripts, and referenced Skill files for you.
Install
Requirements:
- Node.js 20+
- npm/npx
- Git
npm install -g @rpamis/comet
Quick Start
cd your-project
comet init
Support for OpenClaw and Hermes, and other AI platforms
For platforms that use the generic skills CLI directly, you can install the Comet skill package with:
npx skills add rpamis/comet
Screenshots
Classic Spec Skill
<p align="center"> <img src="https://github.com/rpamis/comet/blob/master/img/runner.png" alt="runner"> </p>
<p align="center">Auto-install OpenSpec & Superpowers, one-click dev environment setup</p> <p align="center">Multi-phase Skill entry, auto-detects current Spec stage, auto-triggers core flow, manual review at key nodes</p>
Integration with LangSmith/LangFuse
Comet Eval's automated dual-agent architecture can integrate online with LangSmith/LangFuse environments, making experiments traceable and skills evolvable.
<p align="center"> <img src="https://github.com/rpamis/comet/blob/master/img/langsmith-dataset.png" alt="runner"> </p> <p align="center">Manage your Skill baseline in LangSmith and view detailed performance metrics, latency, and token consumption</p>
<p align="center"> <img src="https://github.com/rpamis/comet/blob/master/img/langsmith-trace.png" alt="runner"> </p> <p align="center">Trace your Claude Code in LangSmith</p>
<p align="center"> <img src="https://github.com/rpamis/comet/blob/master/img/langsmith-baseline-detail.png" alt="runner"> </p> <p align="center">Trace custom Rubric metrics with Pytest in LangSmith</p>
Commands
<details> <summary><code>comet init [path]</code> — Initialize Comet workflow</summary>
Initializes OpenSpec, Superpowers, and Comet skills for selected AI coding platforms.
| Option | Description |
|---|---|
--yes | Non-interactive mode, auto-select detected platforms (or all if none detected) |
--scope <scope> | Install scope: project or global |
--language <lang> | Skill language: en or zh (skips interactive language prompt) |
--skip-existing | Skip already installed components |
--overwrite | Overwrite already installed components |
--json | Output structured JSON |
When multiple existing components are found on the same platform, interactive init offers one bulk choice: overwrite all, skip all, or choose per component.
</details>
<details> <summary><code>comet status [path]</code> — Show active changes and next workflow command</summary>
Displays active changes, task progress, the recommended next Comet workflow command, the current step, runtime mode, and diagnostic recovery hints when a change is malformed or missing required evidence.
| Option | Description |
|---|---|
--json | Output active changes with nextCommand, currentStep, and runtime data |
</details>
<details> <summary><code>comet resume-probe [path]</code> — Decide whether an active Comet workflow should resume</summary>
Read-only probe for active changes, .comet.yaml, current phase, and the user request. It returns auto_resume, ask_user, out_of_scope, or none. comet init/update merges a <comet-ambient-resume> managed block into AGENTS.md and CLAUDE.md while preserving user-authored rules.
</details>
<details> <summary><code>comet dashboard [path]</code> — Launch local read-only dashboard server</summary>
Starts a local HTTP server that displays a visual dashboard with active changes, phase status, task progress, and archive history. Auto-opens in your browser by default.
<p align="center"> <img src="https://github.com/rpamis/comet/blob/master/img/dashboard-light.png" alt="Comet Dashboard Light" width="800"> </p> <p align="center"> <img src="https://github.com/rpamis/comet/blob/master/img/dashboard-dark.png" alt="Comet Dashboard Dark" width="800"> </p> <p align="center">Active change overview with phase indicators, task progress, and archive history</p>
| Option | Description |
|---|---|
--port | Server port (default: auto-selects available port) |
--no-open | Don't auto-open the dashboard in browser |
--json | Collect single snapshot and print JSON to stdout (for scripting/inspection) |
</details>
<details> <summary><code>comet doctor [path]</code> — Diagnose Comet installation health</summary>
Checks project/global installation health, working directories, installed skills, scripts, and active change diagnostics. comet doctor reports diagnostic status for malformed .comet.yaml files, current step / runtime mode for valid changes, and runtime evidence gaps that block safe resume.
| Option | Description |
|---|---|
--json | Output structured diagnostic results |
--scope <scope> | Diagnose auto, project, or global scope (default: auto) |
</details>
<details> <summary><code>comet update [path]</code> — Update Comet package and skills</summary>
Updates the npm package and refreshes installed Comet skills in detected project/global targets.
| Option | Description |
|---|---|
--json | Output npm and skill update results as JSON |
--language <lang> | Override detected skill language (en, zh) |
--scope <scope> | Update only global or project scope |
</details>
<details> <summary><code>comet uninstall [path]</code> — Remove Comet skills, rules, and hooks</summary>
Safely removes Comet-distributed skills, rules, and hooks from all detected platforms. Preserves user-defined hooks and non-Comet configuration.
| Option | Description |
|---|---|
--force | Skip confirmation prompt |
--scope <scope> | Uninstall only global or project scope |
--json | Output removal results as JSON |
comet uninstall # Interactive — shows targets, asks for confirmation
comet uninstall --force # Non-interactive — removes everything immediately
comet uninstall --scope project # Only remove project-level installations
</details>
<details> <summary><code>comet eval [target]</code> — Evaluate Skills through the shared eval harness</summary>
comet eval answers a simple question: does this Skill actually work reliably on standard tasks?
The most common case is evaluating a Skill generated by /comet-any. Generated packages usually include comet/eval.yaml; pass that file to comet eval first:
comet eval ./generated-skill/comet/eval.yaml --collect
comet eval ./generated-skill/comet/eval.yaml --html
The first command only performs discovery and preflight checks, confirming that the manifest, tasks, and dependency paths can be found before any expensive evaluation work runs. The second command runs local evaluation and writes a browsable report suitable for publish-readiness evidence. The report path is printed by the command and is usually under eval/local/logs/experiments/<experiment-id>/summary.html.
If you do not have comet/eval.yaml yet and only have a local Skill directory, start with a low-cost smoke run:
comet eval ./my-skill --quick --html
That path is useful early on: it checks that the Skill directory can be read, injected into the eval harness, and run against the generic smoke task. For release evidence, prefer generating comet/eval.yaml through /comet-any and using the manifest path.
Reading Local Eval
Local eval is the normal path for day-to-day development and pre-release checks. In the HTML report, look first at:
- whether pass/fail and rubric scores match expectations
- whether failures are attributed to the Skill, workflow, task, model, or environment/harness
- whether expected artifacts are missing
- whether token use, cost, or duration look unusual
- whether the result is clean enough, or a specific task/treatment should be rerun
If the report says Insufficient clean data or Inconclusive due to data quality, check auth, rate limits, Docker/container setup, network, and other environment issues before treating the run as a Skill-quality verdict.
LangSmith Eval
Use the LangSmith suite when you want to sync eval results to LangSmith, or when your team wants to inspect runs, rubric feedback, costs, and Claude Code trajectories together. It reuses the same tasks, treatments, rubric, and comet/eval.yaml; the difference is that results are uploaded to LangSmith.
Prepare dependencies and environment variables once:
cd eval
uv sync --extra langsmith
LANGSMITH_API_KEY=lsv2_pt_...
LANGSMITH_PROJECT=comet-skill-eval
LANGSMITH_TRACING=true
Then run the same manifest:
cd eval
uv run pytest langsmith/tests/tasks/test_tasks.py \
--eval-manifest=/absolute/path/to/generated-skill/comet/eval.yaml -v
In PowerShell, set $env:LANGSMITH_API_KEY, $env:LANGSMITH_PROJECT, and $env:LANGSMITH_TRACING, or place them in eval/.env. See eval/langsmith/README.md for plugin cache and trajectory tracing details.
Which Path To Use
- Day-to-day development:
comet eval ./my-skill --quick --html /comet-anyoutput:comet eval ./generated-skill/comet/eval.yaml --collect, then rerun with--html- Publish evidence: prefer the local HTML report from
comet/eval.yaml - Team tracing and side-by-side comparison: run the same
comet/eval.yamlthrough the LangSmith suite
For full task, treatment, report, and troubleshooting details, see the Eval usage guide.
</details>
<details> <summary><code>/comet-any</code> / <code>comet creator</code> / <code>comet publish</code> — Create, evaluate, and publish Skills</summary>
/comet-any is the main user path: Create or optimize a reusable Skill → validate it with comet eval → review and distribute it, until it becomes a stable composed Skill. For resume and release, use comet creator, comet creator status / comet creator next, comet publish, and comet publish distribute --preview. The README does not expand the backend command list; see the Skill creation guide for Advanced Bundle backend and Advanced Engine Run details, including comet skill run / comet skill continue.
</details>
<details> <summary><code>comet --help</code> / <code>comet --version</code> — Basic information</summary>
| Command | Description |
|---|---|
comet --help | Show help |
comet --version | Show version |
</details>
Supported Platforms
comet init supports 33 AI coding platforms:
<details> <summary>View full platform list</summary>
| Platform | Skills Dir | Platform | Skills Dir |
|---|---|---|---|
| Claude Code | .claude/ | Cursor | .cursor/ |
| Codex | .codex/ | OpenCode | .opencode/ |
| Windsurf | .windsurf/ | Cline | .cline/ |
| RooCode | .roo/ | Continue | .continue/ |
| GitHub Copilot | .github/ | Gemini CLI | .gemini/ |
| Amazon Q Developer | .amazonq/ | Qwen Code | .qwen/ |
| Kilo Code | .kilocode/ | Auggie | .augment/ |
| Kimi Code | .kimi-code/ | Kiro | .kiro/ |
| Lingma | .lingma/ | Junie | .junie/ |
| CodeBuddy | .codebuddy/ | CoStrict | .cospec/ |
| Crush | .crush/ | Factory Droid | .factory/ |
| iFlow | .iflow/ | Pi | .pi/ |
| Qoder | .qoder/ | Antigravity | .agents/ |
| Antigravity 2.0 | .agents/ | Bob Shell | .bob/ |
| ForgeCode | .forge/ | Trae | .trae/ |
| Trae CN | .trae-cn/ | ZCode | .zcode/ |
| MimoCode | .mimocode/ |
</details>
Skills
After comet init, three groups of skills are installed to the selected platform's skills/ directory:
Comet Skills
<details> <summary>View Comet skills</summary>
| Skill | Description |
|---|---|
/comet | Main entry — auto-detects phase and dispatches to sub-commands |
/comet-open | Phase 1: Open a change (proposal, design, task breakdown) |
/comet-design | Phase 2: Deep design (brainstorming, Design Doc) |
/comet-build | Phase 3: Plan and build (implementation plan, code commits) |
/comet-verify | Phase 4: Verify and finish (testing, verification report) |
/comet-archive | Phase 5: Archive (delta spec sync, status annotation) |
/comet-hotfix | Preset: Quick bug fix (skips brainstorming) |
/comet-tweak | Preset: OpenSpec-chained medium change (delta spec is first-class, skips brainstorming and full plan) |
/comet-any | Comet Skill Creator — Create or optimize a reusable Skill |
</details>
Guard & Automation Scripts
<details> <summary>View script list</summary>
| Script | Purpose |
|---|---|
comet-env.mjs | Script discovery helper — prints the bundled scripts directory so skills can resolve sibling command paths |
comet-guard.mjs | Phase transition guard — validates exit conditions, --apply auto-updates .comet.yaml |
comet-handoff.mjs | Design handoff — generates deterministic context packages from OpenSpec artifacts with SHA256 tracing |
comet-archive.mjs | One-command archive — validates state, syncs specs, moves to archive, updates status |
comet-yaml-validate.mjs | Schema validator — validates .comet.yaml structure and field values |
comet-state.mjs | Unified state management — init/set/get/check/scale, agents' exclusive YAML interface |
comet-hook-guard.mjs | Phase write guard — PreToolUse hook, blocks file writes during open/design/archive phases |
Classic automation ships as independent Node.js command scripts generated from TypeScript. They run through node on every platform, so Comet requires only Node.js — no Bash, Git Bash, or WSL.
</details>
Workflow
/comet
↓ auto-detect
/comet-open --> /comet-design --> /comet-build --> /comet-verify --> /comet-archive
(OpenSpec) (Superpowers) (Superpowers) (Both) (OpenSpec)
/comet-hotfix (preset path, skips brainstorming)
open --> build --> verify --> archive
/comet-tweak (lightweight preset, chains OpenSpec)
open --> build --> verify --> archive
Five Phases
| Phase | Command | Owner | Artifacts |
|---|---|---|---|
| 1. Open | /comet-open | OpenSpec | proposal.md, design.md, tasks.md |
| 2. Deep Design | /comet-design | Superpowers | Design Doc, delta spec |
| 3. Plan & Build | /comet-build | Superpowers | Implementation plan, code commits |
| 4. Verify & Finish | /comet-verify | Both | Verification report, branch handling |
| 5. Archive | /comet-archive | OpenSpec | delta→main spec sync, archive |
State Management
Comet uses a decoupled state architecture with separate files
<details> <summary>View State Management</summary>
| File | Owner | Purpose |
|---|---|---|
.openspec.yaml | OpenSpec | Spec lifecycle, change metadata |
openspec/changes/<name>/.comet.yaml | Comet | Workflow phase, execution mode, verification status |
.comet/run-state.json | Engine | Run identity and execution state (machine-owned) |
.comet/state-events.jsonl | Comet | Append-only state transition audit log |
Each change-level .comet.yaml stores Classic workflow state and only keeps run_id as the link to the Engine Run. Machine-owned Engine state lives in the change's .comet/run-state.json with camelCase fields such as currentStep, status, and iteration. Legacy Run fields left in YAML are migrated after compatibility reads, and skill is no longer a valid current .comet.yaml field. Project defaults live in .comet/config.yaml.
Phase progression is handled consistently by the TypeScript transition table, comet-state transition, comet-guard --apply, and archive commands. Each successful progression appends an audit event to .comet/state-events.jsonl with the source, before/after state, and actual field changes.
This keeps Skill text focused on guiding the agent while scripts own state writes, phase checks, auditability, and breakpoint recovery. Agents can use Comet commands to know which phase the current Spec is in.
</details>
<details> <summary>View key change .comet.yaml fields</summary>
Key Fields in change .comet.yaml:
workflow: full # Workflow type: full | tweak | hotfix
phase: build # Current phase: open | design | build | verify | archive
context_compression: off # Context compression: off | beta
auto_transition: true # Auto-invoke the next Skill after phase completion
base_ref: <git-sha-or-null> # Baseline commit captured at init; may be null
created_at: YYYY-MM-DD # Creation date written by comet-state.mjs init
run_id: <uuid> # Links to .comet/run-state.json only; Run details stay out of YAML
review_mode: standard # Automatic review strength: off | standard | thorough
build_mode: subagent-driven-development # Build mode: subagent-driven-development | executing-plans | direct
build_pause: null # `build_pause` records an internal build-phase pause point: null none, `plan-ready` means the plan has been generated
subagent_dispatch: null # Dispatch confirmation; confirm before verify
tdd_mode: null # Full-workflow build choice: tdd | direct
isolation: branch # Isolation mode: branch | worktree
verify_mode: null # Verification mode: light | full
design_doc: docs/superpowers/specs/<design-doc>.md # Design doc path
plan: docs/superpowers/plans/YYYY-MM-DD-feature.md # Implementation plan path
verify_result: pending # Verification result: pending | pass | fail
verification_report: null # Verification report path; must exist before verify-pass
branch_status: pending # Branch handling status: pending | handled
verified_at: null # Verification timestamp; null before verification passes
archived: false # Archived changes are blocked from further mutation
direct_override: null # Must be true when a full workflow chooses direct build
handoff_context: null # Design handoff context path written by comet-handoff.mjs
handoff_hash: null # SHA256 for handoff_context; 64 hex chars when present
classic_profile: full # Machine-maintained Classic profile
classic_migration: 1 # Machine-maintained migration version
Current change .comet.yaml no longer contains skill; legacy Run fields in YAML are migrated to .comet/run-state.json.
</details>
Reliability Features
Comet ensures agent execution reliability through automated state transitions:
<details> <summary>View reliability features</summary>
- Entry Verification — Each phase validates preconditions before execution
- Checks file existence, state consistency, and phase transitions - Outputs [HARD STOP] with actionable suggestions if validation fails
- Automated State Transitions —
comet-guard.mjs --applyupdates.comet.yamlautomatically
- All phase transitions (open → design/build → verify → archive) use guard --apply - No manual state editing required — eliminates write-verification errors - comet-state.mjs is the agents' exclusive interface for state operations - Guard and archive scripts use comet-state.mjs internally for state management
- Schema Validation —
comet-yaml-validate.mjsensures data integrity
- Validates required and optional fields - Validates enum values, including direct_override - Validates design_doc, plan, and handoff_context paths exist, plus handoff_hash format - Detects unknown/typos fields
- Build Decision Enforcement — Guard and state transitions both block skipped build choices
- isolation must be branch or worktree - build_mode must be selected before leaving build - build_pause: plan-ready is a recoverable pause after plan generation, not a build_mode - Full workflow build_mode: direct requires direct_override: true
- Verification Evidence — Guard enforces proof before phase advance
- verify-pass transition requires verification_report pointing to an existing report file - branch_status must be handled before verify can pass - Guard checks verification_report exists and branch_status=handled as hard prerequisites - Prevents false phase advances when verification or branch handling was skipped
- Archive Automation —
comet-archive.mjshandles the full archive flow in one command
- Validates entry state, merges delta specs into main specs through OpenSpec - Annotates design doc and plan frontmatter - Moves change to archive directory and updates archived: true - Supports --dry-run for preview
- Anti-drift Phase Guards — Phase awareness for long-context sessions
- Rule layer: comet-phase-guard.md injects phase awareness, Skill invocation rules, and context recovery guidance each turn across platforms - Hook layer: comet-hook-guard.mjs hard-blocks file writes during open/design/archive phases on platforms that support hooks, such as Claude Code - Allowlisted paths: openspec/*, docs/superpowers/*, .superpowers/*, .claude/*, and .comet/*
</details>
Classic Spec Mode Project Structure
your-project/
├── .comet/
│ └── config.yaml # Project-level global config (context_compression, review_mode, auto_transition)
├── .claude/skills/ # Platform skills dir (Comet + OpenSpec + Superpowers)
│ ├── comet/SKILL.md
│ │ └── scripts/
│ │ ├── comet-guard.mjs # Phase transition guard (--apply auto-updates state)
│ │ ├── comet-env.mjs # Script discovery helper
│ │ ├── comet-handoff.mjs # Design handoff (OpenSpec → Superpowers context tracing)
│ │ ├── comet-archive.mjs # One-command archive automation
│ │ ├── comet-yaml-validate.mjs # Schema validator
│ │ ├── comet-hook-guard.mjs # Phase write guard (PreToolUse hook)
│ │ └── comet-state.mjs # Unified state management (init/set/get/check/scale)
│ ├── comet-*/SKILL.md
│ ├── openspec-*/SKILL.md
│ └── brainstorming/SKILL.md
├── openspec/ # OpenSpec — WHAT
│ ├── config.yaml
│ └── changes/
│ └── <name>/
│ ├── .openspec.yaml # OpenSpec state
│ ├── .comet.yaml # Comet workflow state (Classic fields + run_id link)
│ ├── .comet/
│ │ ├── run-state.json # Engine Run state (machine-owned, auto-migrated)
│ │ └── state-events.jsonl # State transition audit log (append-only)
│ ├── proposal.md
│ ├── design.md
│ ├── specs/<capability>/spec.md
│ └── tasks.md
└── docs/superpowers/ # Superpowers — HOW
├── specs/ # Design documents
└── plans/ # Implementation plans
<details> <summary>Context Compression (Beta)</summary>
Comet supports context compression at the Design → Build handoff. When enabled, comet-handoff.mjs generates a compact context package that reduces Build-phase input tokens by 25–30% without affecting implementation correctness.
| Mode | Behavior | Token Savings |
|---|---|---|
off | Full Spec excerpts in handoff context | Baseline |
beta | Design Doc + SHA256 hash references only | ~25–30% |
Key findings from benchmark testing:
- Test pass rate: 100% across all tiers (compression does not affect correctness)
- Spec coverage: 100% (off) vs 95% (beta) — minor edge-case detail loss
- Scaling: Larger tasks yield higher absolute savings (up to 15,000 tokens for large-tier tasks)
Enable in .comet/config.yaml: context_compression: beta
See CONTEXT-COMPRESSION.md for the full benchmark report, compression principles, and reproduction steps.
</details>
<details> <summary>Auto Transition</summary>
auto_transition controls whether Comet automatically invokes the next skill after a phase completes, or pauses for manual handoff. Phase advancement itself always happens — this setting only affects skill invocation.
| Value | Behavior |
|---|---|
true | Auto-invoke the next skill after each phase (default) |
false | Pause after each phase; user manually triggers the next skill |
Three-layer configuration with precedence: COMET_AUTO_TRANSITION env var > .comet/config.yaml (project) > change .comet.yaml.
See AUTO-TRANSITION.md for configuration details, workflow mapping, and FAQ.
</details>
Development
See CONTRIBUTING.md | 中文版 for development setup, commit conventions, PR process, branch workflow, and guidance for adding platforms, skills, scripts, or changelog entries.
See CHANGELOG.md for version history and updates.
Roadmap
Track our development progress and upcoming features on the Comet Roadmap.
Star History
Contributors
<a href="https://github.com/rpamis/comet/graphs/contributors"> <img src="https://contrib.rocks/image?repo=rpamis/comet&columns=12&anon=1" /> </a>
License
Community
<table align="center"> <tr> <td align="center" width="180"> <img src="https://github.com/rpamis/comet/blob/master/img/douyin.png" width="120" height="120"><br> <b>DouYin (Recommended)</b> </td> <td align="center" width="180"> <img src="https://github.com/rpamis/comet/blob/master/img/wechat.jpg" width="120" height="120"><br> <b>WeChat</b> </td> <td align="center" width="180"> <img src="https://github.com/rpamis/comet/blob/master/img/qq.jpg" width="120" height="120"><br> <b>QQ</b> </td> </tr> </table>