跳转到主要内容
hotfix preset 面向小型、聚焦且解决方案已经清晰的 bug fixes。它会跳过 brainstorming phase 以更快推进,提供一条从问题描述到 archived fix 的精简路径,避免 full workflow design 的开销。

何时使用 Hotfix

仅当满足以下所有条件时,才使用 /comet-hotfix
  • fix 面向现有 functionality,不引入 new capability
  • change scope 可预测:通常影响 少于 3 个文件
  • 不需要 interface changes 或 architecture adjustments
  • fix 不引入 new public API
  • fix scope 限定在 single function or module
  • 不涉及 database schema changes
当这些条件都成立时,hotfix 会提供从 bug description 到 archive 的最快路径。

Hotfix workflow

/comet-hotfix
  open → build → verify → archive
  (brainstorming skipped)
hotfix execution chain 是完整五阶段 workflow 的精简子集:
Phase会发生什么
Open精简 artifact creation:proposal.mddesign.mdtasks.md(无 multi-solution comparison;除非影响现有 acceptance scenarios,否则无 delta spec)
BuildDirect build(build_mode: direct):tasks 逐个执行,每个 task 运行 formatter 和 tests,commits 使用 fix: prefix
VerifyRoot cause elimination check,然后进行 comet-verify scale assessment(小型 hotfix 通常符合 lightweight verification:≤ 3 tasks、≤ 2 files)
Archive确认 verify_result: pass 后复用 /comet-archive

启动 Hotfix

在你的 AI 编程工具中,描述你想修复的 bug。Comet 会自动评估你的描述:
  • 如果满足 hotfix conditions,/cometauto-route/comet-hotfix,无需你直接调用。
  • 你也可以直接调用 /comet-hotfix,明确使用该 preset。
调用后,hotfix workflow 会连续运行,不会暂停等待输入,除非到达定义好的 decision points(upgrade conditions 和 verification failures)。

Build mode

Hotfix 默认使用 direct build mode。这意味着单个 agent 会顺序执行所有 tasks,不启动 sub-agents,也不生成完整 implementation plan。如果 task count 超过 3,agent 会转入 /comet-build 的 plan 和 execution method selection。

升级条件

如果在 hotfix 期间发现以下任一条件,Comet 会暂停并要求你确认是否升级到 full workflow。Agent 不能自动继续 hotfix,必须得到你的明确确认。
条件为什么触发升级
Change 涉及 3 个或更多文件超出 single-point fix scope
需要 architecture changes(new modules、interfaces 或 dependencies)需要 deep design
需要 database schema changes结构调整需要完整 planning
Fix 引入 new public API创建外部 interface,需要 design review
Fix scope 超出 single function or module需要协调式 changes
Upgrade 需要交互式确认。如果你拒绝,hotfix 会停止,Comet 会报告该 change 已超出 hotfix scope。

升级到 Full Workflow

当确认 hotfix 需要升级时,Comet 会遵循以下路径:
hotfix → full (upgrade)
  open → [supplement Design Doc] → design → build → verify → archive
你确认后,Comet 会:
  1. .comet.yaml 中的 workflow 字段更新为 full
  2. 加载 comet-design skill,在现有 hotfix artifacts 基础上补充完整 Design Doc
  3. 从 design phase 起正常进入 full workflow
这意味着 hotfix 的 proposal.mddesign.mdtasks.md 会被保留并继续扩展,你不需要从头开始。

Phase guards

Hotfix 会强制执行与 full workflow 相同的 phase guard transitions:
# Transition open → build
"$COMET_BASH" "$COMET_GUARD" <change-name> open --apply

# Transition build → verify (after root cause elimination check)
"$COMET_BASH" "$COMET_GUARD" <change-name> build --apply

# Transition verify → archive (handled by /comet-verify)
"$COMET_BASH" "$COMET_GUARD" <change-name> verify --apply
Guards 会在推进前验证 exit conditions。没有设置 isolationbuild_mode 时,hotfix 不能进入 verify;没有 verify_result: pass 时,不能 archive。