Skip to main content
Comet’s recovery model comes from file-based state. Understanding user-readable state, machine-managed runtime evidence, and project defaults helps you recover interrupted work without relying on chat memory. This page uses <classic-root> for the configured Classic OpenSpec root: docs/openspec/ for new projects and openspec/ for projects that retain the legacy layout. The location is selected by classic.artifact_layout; see Project file structure.

Where to look first

Current change selection

.comet/current-change.json stores the explicitly selected workflow and change. It removes write ambiguity when multiple active changes exist; it does not replace Classic .comet.yaml or Native comet-state.yaml.
A single active change may be attributed automatically. Multiple active changes require explicit selection. An archived target, invalid selection, or workflow mismatch fails closed. Once isolation is current, branch, or worktree, a Classic change is also pinned to the branch recorded in bound_branch. On drift, switch back to the original branch; run comet state rebind <change-name> only after explicitly confirming that the current branch should take over. Do not hand-edit the selection file.

Project defaults: .comet/config.yaml

Native and Classic share one project-level file. Shared entry fields remain at the top level, while Native and Classic defaults live under separate native: and classic: blocks. With both workflows enabled, an English installation can generate:
Comet no longer reads a repository-root .comet.yaml or comet.yaml. Project defaults live only in .comet/config.yaml; workflow state lives only in <classic-root>/changes/<name>/.comet.yaml.

Shared and Classic fields

The following classic.* fields belong only to Classic. artifact_layout is a project-level directory selection; the other four fields are snapshotted into new Classic changes:
Changing default_workflow changes only the /comet entry and never migrates a change. Classic defaults are snapshotted into new changes; later edits do not rewrite existing changes.
Editing classic.artifact_layout changes where Comet reads artifacts but does not move existing files. To switch an existing project, run comet classic root move docs —dry-run to inspect current state, conflicts, and blockers, then run comet classic root move docs —apply. The dry run does not issue a plan ID.
See Native configuration for native.artifact_root, native.language, native.clarification_mode, migration commands, and complete examples. Native does not read Classic context_compression, review_mode, or auto_transition.
Legacy flat Classic configuration still lets /comet enter Classic through the legacy fallback, but Classic Runtime reads project defaults only from the classic: block. Run comet init or comet update to migrate old values into the new block and fill missing managed Native and Classic fields.

Artifact language versus Skill language

The Skill language selected by comet init determines which localized Skills are installed. Classic artifact language is stored in classic.language; Native artifact language is stored in native.language: When a new Classic change is created, Comet snapshots project-level classic.language into <classic-root>/changes/<name>/.comet.yaml. OpenSpec proposal, design, tasks, Superpowers design/plan artifacts, verification reports, and archive notes follow this configured language instead of guessing from whichever request triggered the workflow. If you continue the same change in a mixed English/Chinese session, Comet reads the change-level language and keeps artifacts stable. To switch an existing change’s artifact language, change the change-level field:
Global comet init and comet update persist the selected artifact language in ~/.comet/config.yaml. New Classic changes prefer project classic.language and fall back to the global default only when it is absent. Native uses its separate native.language and does not read this Classic global fallback.
Project-level and change-level language values only accept en or zh-CN. zh is only a comet init —language zh CLI selection value; it is not valid inside .comet/config.yaml.
Comet guard checks the dominant language of key workflow artifacts. If the configured value is en but proposal.md, tasks.md, or design.md are clearly Chinese-dominant, guard blocks phase advancement. The reverse is also true for zh-CN. Fenced code blocks are ignored, so commands, paths, hashes, or logs do not skew the check.

Configuration precedence

The following precedence applies only to Classic language, context_compression, review_mode, and auto_transition. Shared entry fields and native.* do not use Classic change-level overrides:

Change state: .comet.yaml

Each active OpenSpec change has one:
Important user-visible fields include:
build_command and verify_command have been removed. The build guard detects npm, Maven, or Cargo commands. When it cannot infer an entrypoint, run the real command and record it withcomet state record-check <change> <build|verify> —command ”…” —exit-code 0. Recorded evidence cannot replace actual execution.

State-machine constraints

Comet does not treat phase as a free-form note. Transitions must follow allowed events such as proposal approval, design approval, build completion, verify failure, or archive completion. Before build can advance, isolation must be current, branch, or worktree, and the current Git branch must match bound_branch. If an entry check reports drift, prefer switching back. Only after explicitly deciding that the current branch should take over should you run:
Rebinding appends an audit event and is rejected before the first binding or on a detached HEAD. verify-pass requires an existing verification_report, advances to Archive, and leaves branch_status: pending. After archive confirmation and the archive operation, Comet writes branch_status: handled, runs the archive guard, and includes both handled and archived: true in the same commit before pushing.

Boundary between workflow state and run state

.comet.yaml should stay readable and useful to humans. Detailed checkpoint data belongs in run state, where the runtime can manage it without polluting the main workflow file.

Environment overrides

How to configure

Edit .comet/config.yaml:
For a temporary override:
Last modified on July 30, 2026