Skip to content

Review changes with diff

List what a change does to the architecture: which Elements, Relationships, Deployments, Views and ADRs were added, removed or changed, and which fields.

  • The Workspace is in a git repo with at least one commit. See the Quick start.

Give one point, and diff compares it with your uncommitted working tree. Run it before you commit:

Terminal window
archidocs diff HEAD
Changes from HEAD (b70fffd) to working tree: 5 added, 0 removed, 2 changed
+ Element sink:reports
~ Element sink:web
tags: [] → ["customer-facing"]
links: [] → [{"label":"Runbook","url":"https://wiki.sink.example/runbooks/web"}]
+ Relationship sink:reports -> sink:orders-db
~ Deployment sink:api in prod on sink:cluster
endpoints: [] → [{"name":"health","url":"https://api.sink.example/healthz"}]
+ Saved View sink:orders-db-outage
+ Saved View sink:place-order
+ ADR sink:0001

Each line is one Change: + added, - removed, ~ changed, with the fields that changed.

Give two git refs to compare them, such as a pull request’s base and head:

Terminal window
archidocs diff origin/main HEAD
Changes from origin/main (83d7816) to HEAD (783c53a): 2 added, 0 removed, 0 changed
+ Element payments:payments-cache
+ Relationship payments:payments-service -> payments:payments-cache

A point can also be a date or a time. It means the last Revision at or before that date, so a commit that changed no Workspace file is never picked. A time without a zone is UTC. A date before the first Revision names nothing:

Terminal window
archidocs diff 2026-01-01 2026-06-30

--format markdown writes the same Changes as a table for a pull request comment:

Terminal window
archidocs diff origin/main HEAD --format markdown
### Model changes `origin/main (83d7816)` → `HEAD (783c53a)`
2 added, 0 removed, 0 changed.
| Change | Kind | Id | Fields |
| --- | --- | --- | --- |
| added | Element | `payments:payments-cache` | |
| added | Relationship | `payments:payments-service -> payments:payments-cache` | |

--format json writes them for scripts. Preview pull requests has a workflow that posts the table on every pull request.

The first line names both points and their short commits, and counts the Changes. A diff with no Changes prints 0 added, 0 removed, 0 changed.

diff stops when a point isn’t a commit, tag, branch or date in the repo:

archidocs: Unknown ref or date "origin/develop"; a date names the last Revision at or before it.

Check the name. For a branch in CI, fetch it first, or check out with fetch-depth: 0.

get_changes returns the Changes between two Revisions. A published viewer’s Compare shows them on the diagram.

Documents the beta branch at cd98671, ahead of the latest release, v1.4.0.