> ## Documentation Index
> Fetch the complete documentation index at: https://docs.comet.rpamis.com/llms.txt
> Use this file to discover all available pages before exploring further.

# comet state

> Select the current change, read and transition Classic state, record custom command evidence, and resolve the next Skill.

`comet state` is the stable public interface for Classic workflow state.

## Select the current change

When multiple active changes exist, bind source work to the intended change:

```bash theme={null}
comet state select <change-name>
comet state current
comet state clear-selection
```

The selection is tied to the current branch/worktree. Switching branches or worktrees, archiving the selected change, or damaging the selection makes it stale and requires a new `select`. A single active change may be attributed automatically; multiple changes are never guessed.

## Common transitions

```bash theme={null}
comet state transition <change-name> open-complete
comet state transition <change-name> design-complete
comet state transition <change-name> build-complete
comet state transition <change-name> verify-pass
comet state transition <change-name> verify-fail
comet state next <change-name>
```

`next` returns `NEXT: auto`, `NEXT: manual`, or `NEXT: done` based on phase, workflow, and `auto_transition`.

## Record custom project command evidence

If Comet cannot infer a command from npm, Maven, or Cargo, run the project command and record the real result:

```bash theme={null}
comet state record-check <change-name> build --command "make release" --exit-code 0
comet state record-check <change-name> verify --command "./scripts/verify" --exit-code 0 --cwd packages/api
```

The record is bound to the current Run, command, working directory, and exit code. It is auditable evidence, not a way to skip build or verification, and must not describe a command that was not executed.

State rejects illegal transitions and protects machine-owned Run fields from direct edits. The packaged `comet-state.mjs` launcher remains for compatibility, but normal use should prefer `comet state`.
