Skip to content
OpenAgentSkill
Browsing is open · Catalog captured 2026-11-21 · Automatic updates and account services are paused.
Search & research

comet-classic

Comet Classic 工作流(OpenSpec + Superpowers)。当用户明确调用 /comet-classic、要求启动或恢复 Comet Classic,或 resume-probe 返回可无歧义恢复的 active Classic change 时使用。

rpamis · AI review on file

Installation

Read the source and dependencies before running a command. Copying does not install or execute anything.

npx skills add rpamis/comet --skill comet-classic

About this skill


name: comet-classic description: "Comet Classic 工作流(OpenSpec + Superpowers)。当用户明确调用 /comet-classic、要求启动或恢复 Comet Classic,或 resume-probe 返回可无歧义恢复的 active Classic change 时使用。"

Comet Classic — OpenSpec + Superpowers 双星开发流程

开始或恢复前必须先读取并执行 comet-classic/reference/classic-layout.md;本文件中的 OpenSpec CLI 调用必须使用 adapter,文件路径必须使用该协议绑定的 <classic-*> 逻辑根。

OpenSpec 与 Superpowers 如双星系统围绕同一目标运转。

OpenSpec 负责 WHAT  — 大纲、提案、spec 生命周期、归档
Superpowers 负责 HOW — 技术设计、计划、执行、收尾

核心原则:brainstorming 必不可跳过。每次变更都必须经过深度设计(hotfix 和 tweak 预设除外)。


决策核心(Decision Core)

agent 做决策只需读本节,参考附录按需查阅。

输出语言规则

所有 OpenSpec 和 Superpowers 产物都必须使用 Comet 配置的产物语言。配置值是规范化语言 ID,en 或 zh-CN。已有 change 优先通过 comet state get <name> language 读取 <classic-change-dir>/.comet.yaml 中的 language;.comet.yaml 尚不存在时依次读取项目 .comet/config.yaml 和全局 ~/.comet/config.yaml 的 classic.language;都不存在时才回退到当前用户请求语言。调用外部 OpenSpec/Superpowers skill 时,必须把解析后的语言显式写入 prompt 或 ARGUMENTS。

阶段自动检测

Step 0: 活跃 Change 发现与意图判定

  1. 先按 comet-classic/reference/scripts.md 直接运行公开 Comet CLI 命令。
  2. 运行 comet classic openspec -- list --json 获取所有活跃 change。
  3. 根据用户请求、active change 列表和必要仓库状态填写 CometIntentFrame。
  4. 优先用 comet classic intent route --stdin 传入 frame JSON,获取 runtime 规范化路由。CometIntentFrame + runtime scorer 是事实源;本节自然语言规则只用于意图识别槽位提取。
  5. 按 runtime route 处理:
    • hotfix → 直接调用 /comet-hotfix
    • tweak → 直接调用 /comet-tweak
    • full → 按活跃 change 表决定 /comet-open 或用户确认
    • resume → 进入 Step 1 读取对应 change 的 .comet.yaml
    • ask_user → 按 comet-classic/reference/decision-point.md 暂停并等待用户选择
    • out_of_scope → 说明本次输入不是 Comet workflow 启动/恢复请求,不初始化 change

当 runtime route、Ambient Resume 或用户选择已经解析出明确 change 后,进入对应阶段 Skill 前必须先绑定当前执行上下文:

comet classic workspace resolve <change-name> --json
# 进入返回的 projectRoot;state select 会在该工作区写入选择
comet state select <change-name>

新 change 的 workspace 决策在 /comet-open 完成,并遵循 comet-classic/reference/workspace.md:用户明确表达并行、同时处理或多个会话时,在绑定前准备 Worktree;未指定隔离方式时,需要决策就把 current、branch、worktree 作为单选项展示,推荐只作说明。准备和恢复都会扫描已登记 Worktree,优先复用分支匹配的工作区;当分支已重命名、被用户接管或无法确认归属时请求 rebind。

多个 active change 且用户尚未明确选择时,不得提前绑定;继续按 ask_user 决策点等待选择。

记忆接入

绑定 Classic 工作区并读取 .comet.yaml 当前 phase 后,Agent 自动运行 comet task <project-root> --task "<用户原始请求>" --phase "<phase>" --session "<本次任务稳定标识>" --json。只注入返回的 text;Context Manifest(manifest / <context_manifest>)只包含摘要、应用原因和稳定 ID,需要正文、来源或验证方式时运行同一命令并增加 --expand-context "<id>"。路径、操作或阶段变化时以同一 --session 和新的 --path、--operation、--phase 重新选择。若 <active_policies> 中包含 <verification command="...">,把这些命令加入当前 Verify 的实际检查并记录真实结果;只有成功执行过的命令才能让对应策略进入强制执行状态。用户明确要求长期记住偏好或项目约定时调用 comet memory remember ... --scope global|project;仅对未明确要求但可跨任务复用的稳定协作方式调用 comet memory observe,两者都不得写任务摘要、进展、命令输出或测试结果。实际采用某条内容且结果明确后,用返回的 applications[].applicationId(Hook 文本中的 application_id)运行 comet task <project-root> --task "<用户原始请求>" --application "<application-id>" --outcome used-successfully|ignored|overridden|corrected|contributed-to-failure --json;不得为未使用条目回写成功。任务结束仍运行带 --complete --workflow <workflow> --change <change-id> 的 comet task 记录检查点。没有 Hook 时由 Skill 调用相同接口,comet memory context 只作为兼容入口;插件无结果或失败不阻断工作流。

Comet Ambient Resume

当用户未显式输入 /comet-classic,但当前仓库可能已有 active Comet change 时,开始处理需要改动或调查的任务前先运行只读探针:

comet resume-probe . --stdin --json

探针只读仓库状态,不修改文件。按返回值处理:

  • auto_resume:输出一行 [COMET] 检测到 active change <name>,按 <nextCommand> 恢复。,然后进入 nextCommand。
  • ask_user:只问一个短问题并等待用户回复。
  • out_of_scope 或 none:不要进入 Comet workflow。

原则:不把无关任务挂到 active Comet change,尤其不能只因为存在 .comet.yaml 就这样做。

CometIntentFrame 最小骨架:

{
  "schema_version": "comet.intent.v1",
  "utterance": "<用户原话>",
  "intent": { "name": "start_change", "confidence": 0.8 },
  "slots": {
    "requested_action": "start",
    "workflow_candidate": "full",
    "user_explicit_workflow": null,
    "change_id": null,
    "existing_behavior": null,
    "new_capability": null,
    "public_api_change": null,
    "schema_change": null,
    "cross_module_change": null
  },
  "context": {
    "active_changes_count": 0,
    "active_change_names": []
  },
  "evidence": [],
  "proposed_route": {
    "name": "ask_user",
    "confidence": 0.5
  }
}

意图识别槽位提取: 字段完整含义见 comet-classic/reference/intent-frame.md;正常路由只需按上方最小骨架填写。

  • fix_bug + existing_behavior: true + 无新增 capability/public API/schema/cross-module 信号 → 倾向 hotfix
  • 用户明确描述为可收敛为单一 OpenSpec change 的轻量/中等变更,需通过 OpenSpec apply 执行,且不需要完整 /comet-classic 深度设计/plan → 倾向 tweak
  • 文案、配置、文档、prompt 或单一 OpenSpec change 的轻中量修改 → 倾向 tweak
  • 新增 capability、public API、schema 变更、跨模块协调或架构调整 → 倾向 full
  • 多个 active change 且用户未明确 change → ask_user
  • 置信度不足、关键 evidence 缺失或用户显式 workflow 与风险信号冲突 → ask_user
活跃 change用户输入行为
无full 路由→ 调用 /comet-open
恰好 1 个/comet-classic <描述>→ 询问:继续该变更 or 创建新变更
多个/comet-classic <描述>→ 询问:继续现有变更 or 创建新变更;若选继续 → 列出清单让用户选择
恰好 1 个/comet-classic(无描述)→ 自动选中,进入 Step 1
多个/comet-classic(无描述)→ 列出清单让用户选择

Step 1: 读取 .comet.yaml 状态元数据

优先读取 <classic-change-dir>/.comet.yaml。不存在时回退到 comet classic openspec -- status --change "<name>" --json、<classic-change-dir>/tasks.md 和 <classic-superpowers-root>/ 文件检查。

断点恢复规则:

  • 每次恢复上下文时,先重新执行 Step 0 和 Step 1,不依赖对话历史判断阶段
  • 只要存在 active change 且工作区有未提交改动,必须按 comet-classic/reference/dirty-worktree.md 协议处理。该协议定义了检查步骤、归因分类和禁令,本文件不重复
  • 若 phase: build,先检查 build_pause、plan、isolation、build_mode、subagent_dispatch、tdd_mode 和 review_mode:
    • 若 build_pause: plan-ready 且 plan 文件存在,回到 /comet-build,重新发起同一个联合决策;只有用户给出完整配置后才清除暂停。不重新生成 plan
    • 若 build_pause: plan-ready 但 pla
Read the complete source ↗