Skip to main content
Version: 0.4.1

kq dissolve

Folds a plateau into the one before it or the one after it, and removes it. The model has one point in time fewer.

kq dissolve --into previous|next [options] <plateau> [<path>]

Arguments

ArgumentIs
<plateau>The Code of the plateau to dissolve.
[<path>]A file or folder of the model. Default: the current directory.

Options

OptionDoes
--into <direction>The neighbor that takes the dissolved plateau: next takes its changes, previous takes its state. One of previous, next.
--dry-runShow the plan and write nothing.
--applyDissolve without showing the plan or asking.

Environment

VariableDoes
KANONIQ_TELEMETRYoff, 0 or false stops kq reporting the run; so does DO_NOT_TRACK=1.

Exit codes

CodeMeans
0Done
1Failed: the model has an error, a check found a change, or a file could not be read or written
2Usage error: an unknown command or option, a missing or extra argument, a path that does not exist, or an output folder kq will not clear
kq dissolve as-is --into next models/shop
  • --into next: the next plateau takes the dissolved one's changes before its own. The dissolved plateau's state is lost.
  • --into previous: the plateau before takes the dissolved one's state, and keeps its own Code, name and date. Its own state is lost.
  • The first plateau dissolves only into next, and the last only into previous.

Whatever existed only in the state that is lost leaves the model, Id and all. Everything else keeps its Id. Each statement stays in its file, and an arranged model is arranged again. A view tile in a page file under portal/ whose at or to names the dissolved plateau is rewritten to the one that survives, the value alone, so the page keeps its layout and comments; where to would equal at, to is removed (see Views in tiles). Data migrations move to the plateau that survives; where it becomes the first plateau, there is nothing before it to migrate from, and the migrations of both plateaus are deleted, which the plan lists. Two declared data migrations that would meet at one path are refused. In a git repository, tracked files are renamed and deleted through git.

It shows what it will do before doing it: the state lost, what leaves the model, and the files it changes, page files included. Then it asks you to type the plateau's Code. With --dry-run it only shows; with --apply it acts without showing or asking. With neither and no terminal to ask on, as in a script, it refuses. There is no way back but git, so commit first.

It refuses a model with a before block: run kq arrange first (KB064). The path is any file or folder of the model, the current directory by default.

In VS Code, put the cursor on a plateau line and choose Dissolve plateau… from the refactorings. Save your files first.

© 2026 Extenza Works. All rights reserved.