Use case

Writing technical design documents.

The diagram in a design doc usually gets drawn last, badly, because everyone is tired of the document by then.

Download for macOS
v0.1.33 · .dmg · Apple Silicon & Intel
Signed & notarized by Apple · opens without a Gatekeeper warning
sha256 698955a0187bc039f4c74f5d05a9f10fbb27376a45788a0a241d1326b73873c7
Download for Windows instead
$curl -fsSL https://lucidtrain.com/install.sh | sh

The situation

A design document is mostly prose describing structure, which is the thing prose is worst at. The diagram that would carry it in one glance gets added at the end, drawn quickly in whatever tool is open, and is the first thing to become wrong when the design changes during review.

Draw first, write around it

Producing the diagram first and writing the document around it inverts the usual order and produces better documents, because the act of drawing forces the structural decisions to be made explicitly rather than left ambiguous in a sentence. The prose then explains the diagram instead of substituting for it.

Changing it during review is cheap

Design documents change during review, which is the point of review, and a hand-drawn diagram is where that change is expensive. With computed layout, restructuring is an edit to the graph, so the diagram tracks the discussion rather than lagging a week behind it.

Then it becomes the specification

Once the design is agreed, the same diagram converts into a markdown specification and starts a coding turn. That closes the usual gap where the document is approved and the implementation is written from someone's recollection of it.

Design first

shell
# Design the notification service: preferences, templating, channel routing,
# rate limiting per recipient, and a dead letter queue.
FAQ

Questions

What format do diagrams export in for a doc?

SVG, which stays sharp at any zoom, and PNG where a tool insists. SVG is the better choice for anything that might be read on a large screen.

Can it write the document too?

It writes a markdown specification from the diagram, which covers structure. The reasoning, the alternatives you rejected and why, is yours and is the part worth reading.

Does this replace an ADR?

No. An ADR records a decision and its context; a diagram records a structure. They are complementary and neither substitutes for the other.

Related