Compare an architecture diagram with its git HEAD version #6

Closed
opened 2026-10-04 10:54:18 -07:00 by root-at-skic · 0 comments
Owner

Add a command, Archify: Compare with HEAD, that shows what changed in an architecture diagram between the git HEAD version and the working copy.

Why: .archify files live in git. Today a reviewer reads a YAML text diff and has to picture the diagram. The bundled CLI already produces a visual diff:

archify compare architecture <base.json> <head.json> [output.html] [--json]

On upstream's examples/checkout-platform.{base,head}.architecture.json it reports components, connections and boundaries as added / removed / changed / moved / rerouted, plus an HTML page.

How:

  • Read the HEAD version via the git extension API (or git show HEAD:<path>).
  • Convert both versions from YAML to JSON into temp files (same path as readDiagramSource().json).
  • Run compare, open the HTML in the existing webview, and show the --json summary as a short headline.

Limits:

  • Architecture diagrams only. Hide or disable the command for other diagram_types.
  • Untracked file or no git repo: show a clear message.

Done when: the command works from the diagram editor and editor title, and has an integration test using the two upstream example files.

Add a command, **Archify: Compare with HEAD**, that shows what changed in an architecture diagram between the git HEAD version and the working copy. **Why:** `.archify` files live in git. Today a reviewer reads a YAML text diff and has to picture the diagram. The bundled CLI already produces a visual diff: ``` archify compare architecture <base.json> <head.json> [output.html] [--json] ``` On upstream's `examples/checkout-platform.{base,head}.architecture.json` it reports components, connections and boundaries as added / removed / changed / moved / rerouted, plus an HTML page. **How:** - Read the HEAD version via the git extension API (or `git show HEAD:<path>`). - Convert both versions from YAML to JSON into temp files (same path as `readDiagramSource().json`). - Run `compare`, open the HTML in the existing webview, and show the `--json` summary as a short headline. **Limits:** - Architecture diagrams only. Hide or disable the command for other `diagram_type`s. - Untracked file or no git repo: show a clear message. **Done when:** the command works from the diagram editor and editor title, and has an integration test using the two upstream example files.
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: vscode-extensions/archify-vscode-ext#6