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.
Before you start
Section titled “Before you start”- The Workspace is in a git repo with at least one commit. See the Quick start.
1. Diff your working tree
Section titled “1. Diff your working tree”Give one point, and diff compares it with your uncommitted working tree. Run it before you commit:
archidocs diff HEADChanges 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:0001Each line is one Change: + added, - removed, ~ changed, with the fields that changed.
2. Diff two points in history
Section titled “2. Diff two points in history”Give two git refs to compare them, such as a pull request’s base and head:
archidocs diff origin/main HEADChanges from origin/main (83d7816) to HEAD (783c53a): 2 added, 0 removed, 0 changed
+ Element payments:payments-cache+ Relationship payments:payments-service -> payments:payments-cacheA 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:
archidocs diff 2026-01-01 2026-06-303. Format it for a pull request
Section titled “3. Format it for a pull request”--format markdown writes the same Changes as a table for a pull request comment:
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.
Check it worked
Section titled “Check it worked”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.
If it didn’t
Section titled “If it didn’t”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.
With an agent
Section titled “With an agent”get_changes returns the Changes between two Revisions. A published viewer’s Compare shows them on the diagram.
Related
Section titled “Related”Documents the beta branch at cd98671, ahead of the latest release, v1.4.0.