Skip to content

Releases: oxforge/diago

v0.8.0

Choose a tag to compare

@github-actions github-actions released this 23 Oct 14:32

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 id of its own never raises it (edge-without-id covers that case).
    check never raises it, since it needs both versions. When the thing really was replaced and
    keeps its label, add id-drift to the new spec's ignore.

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, then diago 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 no id-drift.
  • A diagram in chat runs diago itself. scripts/diago-render handles 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's id-drift as a lint line, and --strict fails on
    it.
  • The diagramming skill has a section on showing a change, and its cheatsheet documents the
    class fields stereotype, type_params, static, abstract, directed and
    legend_labels, the top-level theme key, and every advisory.

v0.7.1

Choose a tag to compare

@github-actions github-actions released this 19 Oct 21:47

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-render point to the install page
    (https://diago.dev/docs/#install) instead of prescribing go 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, and irm https://diago.dev/install.ps1 | iex in Windows PowerShell. Each
    installs the latest release, or DIAGO_VERSION's, checked against the release's
    checksums.txt.

v0.7.0

Choose a tag to compare

@github-actions github-actions released this 10 Oct 22:56

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: UNDEFINED is rejected (exit 1, field direction): write AUTO or leave the
    direction out. This holds for a -previous spec and for an old version read from git too.
  • A spec's top-level format and store keys are unknown fields: check reports them as
    unknown-field, render and diff warn, and check -strict and scripts/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's start and
    end keys match in any case, like every other key, and a null bound 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's theme, exit 2 for -theme). Text art draws no theme, but a theme it is given must still
    load, and check validates the theme too.
  • render and diff stop after 10 seconds, exit 2, with a message naming the limit. The limit
    starts once the spec and the -previous file 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 drawio or -format excalidraw is 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.
  • 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 are root and layer); 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 __removed id is named once, by
    its own ends, and flat-edge-ranked names the right before.edges[i].
  • edge-without-id (under diff and render -previous) fires on an edge or class relation
    without an id that 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. check does not change.

Errors and messages:

  • render -previous checks the spec first. A field error, an unknown -format, or
    -format drawio|excalidraw on 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 nope is the
    field's (exit 1). A -previous file 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 -json print <, > 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, -help and --help print a usage on stdout with exit 0 wherever they stand:
    alone, after help, and after version, --version or -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, and DIAGO_RESVG_PATH naming 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

Choose a tag to compare

@github-actions github-actions released this 08 Oct 23:33
  • 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].

v0.5.0

Choose a tag to compare

@github-actions github-actions released this 08 Oct 13:41

First release