Skip to main content
hotfix is one of Comet’s lightweight presets, for fixing a clear bug. It runs open -> build -> verify -> archive, skipping full brainstorming and full planning while still keeping OpenSpec state, root-cause elimination checks, verification, and archive. hotfix is not “no process”. It only lowers the up-front design cost; recovery, verification, and archive all still apply. tweak and hotfix are both lightweight presets and share mechanisms such as the escalation decision, continuous execution, and mandatory stops. For the differences, see tweak preset.

Xiaoyu repairs a bug at a hotfix desk, checks the root cause, applies the smallest patch, verifies, archives, and marks the scope as unchanged

hotfix is fast because the design overhead is lower; root-cause checks, verification, and archive still apply.

Normally you only need /comet. When the project configuration selects Classic, the internal /comet-classic detects an intent to fix existing broken, regressed, or misbehaving behavior, prefers hotfix, and auto-invokes /comet-hotfix. Type the preset command directly only when you want manual control. See How it gets triggered.

How it gets triggered

hotfix is generally not a command you type. When you call /comet and land in Classic, the internal /comet-classic runs preset detection first at Step 0: You can also type /comet-hotfix directly. To resume normally, keep using /comet; once the configuration enters Classic, the internal /comet-classic reads the workflow field of .comet.yaml and routes back to /comet-hotfix while the change is in phase: build.

When to use it

All of these must be true:
  • You are fixing a bug in existing functionality and not adding a capability.
  • No interface or architecture changes are involved.
  • The scope is predictable (file count is only a hint, not a hard escalation condition).
Not suitable for: cross-module redesign, database schema changes, a new capability or public API, or product design discussion. If a fix hits an escalation signal, Comet pauses and lets you choose between continuing hotfix and escalating to full.

Relationship to full and tweak

If you cannot classify the change, call /comet and describe its scope. When the routing evidence is insufficient or conflicts with a risk signal, Comet asks for confirmation.

What happens

Step 1: Fast open (preset open)

Load openspec-new-change (without the long openspec-explore exploration) and create slim artifacts: Initialize the hotfix state (the defaults init writes are listed below):
The open guard does not require design.md for hotfix (only full does), so open jumps straight to build and skips the design phase.

Hotfix init defaults

init <name> hotfix writes the following defaults to .comet.yaml (identical to tweak — both skip the design phase): hotfix pauses once at entry so you can explicitly keep the current branch, create a branch, or create a worktree; it never selects an isolation mode silently. After you confirm, isolation and bound_branch record the actual execution workspace, and later accidental branch switches are blocked. The remaining build fields use the preset values, and the guard waives the review_mode/tdd_mode selection check for preset workflows. build_mode: direct allows hotfix/tweak only by default; full must explicitly set direct_override: true.

Step 2: Direct build (preset build)

Use the defaults build_mode: direct, tdd_mode: direct, and review_mode: off, plus the isolation confirmed at entry. brainstorming and writing-plans are skipped. Work through the tasks one by one:
  1. Reproduce first, then fix: reproduce the bug and record failing evidence before touching code. When automation is possible, add a regression test that fails first. Do not modify code without reproduction evidence; when the bug cannot be reproduced automatically, record the manual reproduction steps and result in the proposal or the verification report.
  2. Read the unfinished tasks in tasks.md.
  3. Per task: change code → format → run tests → tick - [x] → commit (fix: <short fix description>).
  4. When all tasks are done, explicitly run the project’s test and build commands.
On a crash, test failure, or build failure, force-load systematic-debugging — do not fix source code before the root-cause investigation is complete. Add a minimal failing test to reproduce the issue first, then fix the source, and confirm with the relevant tests and builds. This is the debugging protocol shared by build/hotfix/tweak (decision points).
Task count alone never switches the execution mode: no matter how many tasks there are, work advances sequentially inside the current hotfix, and only a qualitative-change signal or the file-count threshold pauses to ask about escalation. When the fix changes an existing spec acceptance scenario, create a delta spec (## MODIFIED Requirements only).

Step 3: Root-cause elimination check (hotfix-specific)

This step exists only in hotfix (tweak does not have it). It runs before the build guard to make sure the fix actually removes the root cause:
  1. Read the bug description and root cause from proposal.md.
  2. Search and verify that the problem code no longer exists.
  3. If the root cause is not removed, go back to Step 2 and keep fixing (still in build; no state rollback is needed).
This step is also a source of escalation signals: if the root-cause check finds a deep architecture issue, or the fix needs extra interface changes, a qualitative signal hits and Comet pauses for your decision.

Step 4: Verification (preset verify)

Reuse /comet-verify; the scale assessment decides between light and full: To add review, set it manually before verifying:

Step 5: Archive (preset archive)

Reuse /comet-archive. It requires verify_result: pass and waits for the final confirmation before archiving. If there is a delta spec, sync it into the main spec.

The invoked skill

  • brainstorming and writing-plans are skipped by default: build_mode: direct implements directly without generating an implementation plan.
  • Step 4 / Step 5 reuse the verify and archive stage flows, so skill loading matches those stage pages; with the default review_mode: off, light verification dispatches no code review.

Escalation decision (three layers)

hotfix’s scope decision uses three layers so that a raw file count never becomes a hard escalation condition that wrongly stops normal bug fixes.

1. Qualitative signals (any hit pauses)

2. File-count threshold (you decide)

When the number of changed files crosses the hint threshold (for example more than 4), Comet pauses for your decision. File count is a tripwire for user choice, not a hard escalation condition — more files does not equal a qualitative change.

3. Verification level (decided by scale)

comet-state scale only sets verify_mode; it does not gate the flow or trigger escalation.

The escalation decision (a pause point)

When an escalation signal or the file-count threshold hits, Comet pauses and lets you choose between two options (you cannot escalate on your own, or decide on your own to continue): After choosing B, use the legal escalation channel (do not hand-edit .comet.yaml):
It sets workflow: full and classic_profile: full in one shot, rolls phase back to design, and clears design_doc; then it loads /comet-design to fill in the Design Doc. Completed code, tasks, and OpenSpec artifacts are all kept — you only add a Design Doc, you do not start over. preset-escalate can only fire from a hotfix/tweak in phase: build; any other situation reports an error.

Continuous execution and mandatory stops

hotfix executes continuously in one go by default — once invoked, it advances automatically and does not pause on its own. But regardless of auto_transition, the following situations must pause for your confirmation:
  1. An escalation signal or the file-count threshold hits.
  2. The verification phase reaches a verification-failure decision.
  3. Final archive and delivery confirmation (including the archive-locally-only option).
With auto_transition: false, execution degrades to manual per-phase advancement: it stops at every phase boundary and you run the next phase command yourself.
After an escalation, Comet never archives automatically — whether the handoff is automatic or manual, /comet-archive still asks for a final confirmation before archiving.

Exit conditions

  • The bug is fixed and tests pass.
  • The change is archived.
  • If the spec changed, it is synced into the main spec.
  • Phase guards: run comet-guard <name> build --apply before build → verify, and comet-guard <name> verify --apply before verify → archive.

Recovery

hotfix is idempotent. After an interruption, resume with /comet; once the configuration enters Classic, the internal /comet-classic reads the workflow field of .comet.yaml and routes back to /comet-hotfix while the change is in phase: build. comet-state check <name> build --recover prints recovery context, and work continues from the first unfinished task in tasks.md.

Next steps

Last modified on September 4, 2026