maintain
Maintain
Keep the repository correct as the world underneath it moves, on both of its
axes: the dbt project and the semantic layer. Drift is measured against a
baseline, the .dex/snapshot.json fingerprint of the warehouse map and of
each project layer. Detection is read-only; only reconcile proposes edits, and
transform apply is the one door that writes them.
Procedure
Dex works in one loop: explore, transform, maintain. dex <command> below is
the dex CLI; where it is not installed, run the same command through the
skill's scripts/run.py wrapper. Each command prints one JSON envelope: read
it and decide the next step from it. Step 1 only reads. Steps 2 to 5 change the
project, so take them only when the task asks for a change; a question about the
data stops after step 1 and reports what it found. Explore and maintain report
findings and hand repair work to transform; only the transform workflow performs
the project edits, migrations and dev builds described below.