Climier
Concepts

State and storage

Understand the canonical project snapshot, revisions, and durable writes.

Climier keeps project metadata separate from the live coordination state. The project directory contains .climier.json, which identifies the project. The live state is stored in Climier's SQLite database so multiple checkouts can coordinate against the same project record.

Canonical state shape

init creates schema 1. A simplified snapshot looks like this:

{
  "version": 1,
  "revision": 4,
  "initiatives": {
    "publishing": {
      "desc": "Prepare the public documentation",
      "created_at": "2026-01-01T00:00:00.000Z"
    }
  },
  "nodes": {
    "publish-docs": {
      "id": "publish-docs",
      "kind": "resolvable",
      "subkind": "task",
      "title": "Publish documentation",
      "status": "open",
      "revision": 1
    }
  },
  "edges": [],
  "log": []
}

The schema-1 state shape contains version, revision, initiatives, nodes, edges, and log. SQLite is the canonical runtime store; JSON with this shape is used only by explicit migration, export, and snapshot-restore workflows. Nodes contain durable fields such as lifecycle status, acceptance criteria, claims, and resolutions. The graph and initiative collections are stored together.

Persisted versus derived data

The snapshot stores the task's lifecycle value (open, in_progress, submitted, done, canceled, or archived) and an optional backlog flag. It does not store ready or blocked as authoritative task states. Those values are derived from the current BLOCKS graph and blocker satisfaction. A task whose node says status: "open" can therefore be reported as ready or blocked without mutating the stored state.

For example, this open task with no incoming blockers derives as ready:

climier context publish-docs

The response includes the persisted node and a separate derived_status field. If a gate is later added as an unsatisfied blocker, the same persisted task can derive as blocked. See Edges and derived status for the calculation and Tasks for the lifecycle meanings.

Revisions and safe writes

The project revision advances with mutations. Nodes also carry revisions for focused optimistic checks; update --if-revision N refuses to overwrite a node changed since the caller read it. SQLite is the only runtime state store.

Mutations run in SQLite BEGIN IMMEDIATE transactions with busy_timeout. SQLite serializes writers, and the state change, project revision, and audit-log entry commit atomically. Read commands such as status, context, show, and state do not change the state.

Use the CLI as the write interface rather than editing the SQLite database. For a safe inspection of the state projection:

climier state
climier status --all

To import a complete legacy schema-1 JSON state, use climier state migrate --as <agent> --yes; the importer preserves a verified JSON backup. climier state export emits schema-1 JSON. If older or incomplete state is discovered, preserve the project files and restore a verified canonical backup or contact the maintainer. init --force is a destructive reset, not a conversion or recovery mechanism.

On this page