Repository navigation
Releases: oxforge/diago
Release list
v0.8.0
diago diff warns when an edit gave something a new id, and the plugin draws a change diagram by
one procedure. Nothing v0.7.1 accepts is rejected and nothing draws differently. The one new
failure is scripts/diago-render --strict on a revision that raises the new warning.
Diffs:
-
A new advisory,
id-drift. diago diff raises it when it adds an element while it removes
another of the same kind that reads the same, under another id: a node, group, class, package
or actor with the same label, or an edge or relation with the same ends and label. That is
most likely one thing whose id changed between the versions, which the diff draws twice, once
removed and once added. The warning is on the added element and names the old id to give back:warning: id-drift after.nodes[0]: node "API" is added and a node with the same label removed under the id "api": if it is the same node, keep the id "api"
An edge without an
idof its own never raises it (edge-without-idcovers that case).
checknever raises it, since it needs both versions. When the thing really was replaced and
keeps its label, addid-driftto the new spec'signore.
Plugin:
- A change diagram is made one way: the before state written as
<slug>.v1.json, copied to
<slug>.v2.json, the copy edited keeping the id of everything that stays, thendiago diff.
The illustrating skill spells out the procedure and the shortcuts that break it (writing v2
from scratch, marking changes in a single spec), and the SessionStart hook states it in
every session. - A diff is shown however much changed. The one exception is a rewrite: more than half of the
old version's nodes and edges removed, with noid-drift. - A diagram in chat runs
diagoitself.scripts/diago-renderhandles a review document's
diagrams; it is a plugin file and not a command on PATH, so the skills and the hook name it
by its full path. It relays a revision'sid-driftas a lint line, and--strictfails on
it. - The diagramming skill has a section on showing a change, and its cheatsheet documents the
class fieldsstereotype,type_params,static,abstract,directedand
legend_labels, the top-levelthemekey, and every advisory.
v0.7.1
A patch release: diffs place nodes the way the two versions do, a layout fix for edges that fan
into a group, and plugin updates. Nothing v0.7.0 accepts is rejected and no exit code changes,
but some renders and diffs draw differently, so a saved SVG of one may change.
Diffs:
- A flow or class diff lays the new spec out too, and places the nodes as both versions do: the
nodes both specs keep stay in the old layout's order, a removed node stays beside its old
neighbours, and an added node sits beside its neighbours in the new layout. An added node used
to take its slot from the spec's order, and untangling it could move nodes away from where
either version had them.
What a render draws:
- When a node's edges fan into a group, its ports are evenly spaced and its middle edge runs
straight. One port could slide out of line to straighten that edge, leaving the others
unevenly spaced.
Plugin:
- The plugin has an icon and names its homepage, repository and license, and its SessionStart
hook runs its script by its path, as the Claude plugin directory asks. - The hook, both skills and
scripts/diago-renderpoint to the install page
(https://diago.dev/docs/#install) instead of prescribinggo install, which needs Go 1.26+.
Install:
- The README installs with diago.dev's scripts:
curl -fsSL https://diago.dev/install.sh | sh
on macOS and Linux, andirm https://diago.dev/install.ps1 | iexin Windows PowerShell. Each
installs the latest release, orDIAGO_VERSION's, checked against the release's
checksums.txt.
v0.7.0
This release comes out of a review of the whole codebase. Several changes reject input that v0.6.0
accepted, change exit codes, or change what a render draws: read the breaking changes before you
upgrade a script that calls diago.
Breaking changes:
- Every invalid spec exits 1 in every verb (render, diff, check, import), with a structured error
naming the field: input that is not JSON, empty input (exit 2 before), a missing or unknown type,
a field of the wrong JSON type, or a validation error. - Ids are stricter. A node, group, class or package id may not contain
->or end in@and
digits (db@2), which read as derived edge ids and layout slots, and no id may hold a control
character, U+FFFE or U+FFFF. direction: UNDEFINEDis rejected (exit 1, fielddirection): writeAUTOor leave the
direction out. This holds for a-previousspec and for an old version read from git too.- A spec's top-level
formatandstorekeys are unknown fields:checkreports them as
unknown-field,renderanddiffwarn, andcheck -strictandscripts/diago-render --strict
fail on them. Delete the keys, or add"ignore": ["unknown-field"]to the spec. - Sequence fragments: a fragment's sections run in order without overlapping, and two fragments
either nest or stay apart; ranges that cross are a validation error. A section'sstartand
endkeys match in any case, like every other key, and anullbound is an error ("must be
given") instead of reading as 0. - Themes: a theme name is a plain file name, and a name with a path is rejected (exit 1 on the
spec'stheme, exit 2 for-theme). Text art draws no theme, but a theme it is given must still
load, andcheckvalidates the theme too. renderanddiffstop after 10 seconds, exit 2, with a message naming the limit. The limit
starts once the spec and the-previousfile are read.- A failed write to stdout (a full disk, a closed pipe) exits 2 with
error: write output
instead of exit 0 with a truncated file. diago diff -format drawioor-format excalidrawis a usage error (exit 2), not a
validation error.- A Windows drive path (
C:\specs\arch.json,c:/specs/arch.json) is a path on every system,
never REV:PATH, so a missing one reports the missing file. A one-letter git revision followed by
an absolute path (v:/abs/arch.json) is read as a file too: use a relative path, or another
spelling of the revision (v~0:...).
What a render draws:
- Hops (SVG and PNG): every hop bulges up off a horizontal wire and left off a vertical one,
whichever way the wire runs; a wire running left bulged down, and one running down bulged right.
Crossings whose hops would overlap share one hop, a half ellipse no higher than a lone hop. The
sketch theme draws hops too. - Every element id in a flow or class SVG is unique: an element whose id would repeat another's
gets-2,-3. A spec without such a collision keeps every id. - Text art:
- Sequence frame headers sit on the frame line (
╔══ alt [guard] ══╗,╟╌╌ [guard] ╌╌╢),
frame sides keep two blank columns from every lifeline, and a frame leaves six blank columns
before its first lifeline. - A message across several actors gets room for its label instead of writing over its wire.
- A dashed, dotted or thick vertical wire keeps its style where it crosses another wire.
- An edge label the layout could not place beside a vertical wire is tried in its own row first.
- Sequence frame headers sit on the frame line (
- A newline, tab or other control character in a single-line text field prints as its escape
(\n) instead of tearing text art or breaking the SVG. A flow node's label still breaks into
lines at\n. - A back edge straightens onto its pinned side column past other wires instead of jogging.
- Exports (beta): every id the exporter makes has a kind prefix, so it never collides with a
spec's id (draw.io's root and layer cells arerootandlayer); a self-loop binds its shape
once; and draw.io and Excalidraw files end in a newline.
Diffs and anchoring:
- A sequence diff keeps the new spec's message order.
- An id that changes kind (a node that becomes a group) is named in the change list by each
side's own label. - A removed edge whose generated name collides with a spec's own
__removedid is named once, by
its own ends, andflat-edge-rankednames the rightbefore.edges[i]. edge-without-id(underdiffandrender -previous) fires on an edge or class relation
without anidthat shares both its ends with another, labelled or not, since only then can an
edit hand its derived id (from->to#n) to another edge. It no longer fires on a lone labelled
edge or a lone relation, and its message says why.checkdoes not change.
Errors and messages:
render -previouschecks the spec first. A field error, an unknown-format, or
-format drawio|excalidrawon a class or sequence diagram is reported as it is without
-previous(exit 1 for a field, 2 for a format), and a field error beside-theme nopeis the
field's (exit 1). A-previousfile that is missing, or a Mermaid one that does not translate,
is still reported first.- Text art reports a spec's field error before its theme, as every other format does.
- Group nesting errors name the group's own field (
groups[i]) and come in spec order. - Validation errors and
check -jsonprint<,>and&as written. - A diff's unknown theme reads
error: diff: theme "x" not found. - A custom theme with a wrongly typed key names it as
Theme.<key>. -h,--h,-helpand--helpprint a usage on stdout with exit 0 wherever they stand:
alone, afterhelp, and afterversion,--versionor-version.
PNG:
- Works with resvg 0.26 to 0.41. Those versions printed a warning ahead of the image, so every
PNG they made was corrupt (exit 0). PNG output needs resvg 0.26 or newer. - A failed resvg run reports resvg's error alone, a run stopped by the 10-second limit reports the
limit, andDIAGO_RESVG_PATHnaming a directory says so.
Mermaid import:
- An
@inside an edge label,%%inside a quoted label, nested generics (List~List~int~~)
and generics of non-identifiers (Result~[]User~) import correctly, and the import's JSON keeps
<,>and&as written.
Plugin:
- The SessionStart hook prints valid JSON when the plugin's path holds a tab, a newline or
another control character. - The diagramming skill and its cheatsheet state the new exit codes, id rules, theme check and
fragment rules.
v0.6.0
- Mermaid flowcharts keep their edge ids. An id written before an arrow, as Mermaid 11 allows (A e1@--> B, also with |label| or -- label
-->), becomes the edge's id. diago diff then matches the edges of two versions of a .mmd file by id rather than by their two ends. On an & fan-out the id goes to one edge, as in
Mermaid. A repeated id stays with its first edge, and the import reports it.- Mermaid edge properties (e1@{ animate: true }, curve) no longer fail the import. diago draws no edge animation or curve, so they are dropped with an import report line.
- diago diff prints a warning once when both versions raise it alike (same rule, field and message), under after. Before, a diff of a spec without edge ids printed every
edge-without-id warning twice, once as before.edges[i] and once as after.edges[i].