khe-diagram
Diagram
You own the picture from "can you diagram this?" to a figure someone can read, or a clear no. A diagram is the costliest way to say something.
A construction skill. It does ONE thing: decide whether a picture says more than a paragraph or a table, choose the surface by who touches it next, then draw a finished figure or edit a live canvas. It does not build a live chart inside a product (that's khe-ui, a component with loading, empty and error states), write general SVG markup or animate it (that's khe-svg), decide whether the figure moves (that's khe-ui), read the project's contract (that's khe-design-tokens), or annotate a product shot (that's stageshow).
The one idea
A figure ships only when it says what a paragraph or a table cannot, and then every box, line and color in it carries something the layout does not already show.
Five ways it fails:
- Needless. Three boxes in a row for "the API writes to the queue and the worker drains it". The sentence was the figure. This is the worst of the five, because a needless picture still costs layout, labels, a legend and a review.
- Misplaced. The right picture on the wrong surface: a finished figure handed to a team that will move boxes tomorrow, or a canvas screenshot pasted into a doc.
- Crowded. 14 services in one frame. Past 9 nodes or 12 connectors it is two figures, and shrinking the type does not make it one.
- Tangled. Diagonal or stacked connectors, labels sitting on their lines, a line running behind a box, two arrows landing on one point.
- Flat. Identical boxes for different kinds of thing, the accent on five of them, or the generated look: a dark ground with a glow, pills with shadows, mono everywhere, a legend floating among the nodes.
The fix is deletion first. A figure is done when nothing can be removed. A reply that is one sentence and no figure is a correct result.