Skip to content

Revisions and history

The Model lives in git, so its history is git’s history. Archidocs tells that history in Revisions: commits on the Workspace’s default branch that changed the Model. A commit that only touched code or the README isn’t one.

A Workspace Bundle is the combined Model of the Workspace at one commit, as one JSON file. The viewer and the MCP server read Bundles, never the YAML, and a Bundle can be rebuilt for any past commit from git.

archidocs build writes the latest Bundle, workspace.bundle.json, beside the viewer, and one Bundle per past Revision in bundles/, with an index in bundles/index.json. It keeps the latest 200 Revisions and every tagged one; --keep changes how many.

Building a past Bundle means checking that commit’s Model, so Archidocs keeps the ones it has built in .archidocs/cache/ at the repo root, which archidocs init adds to .gitignore. In CI, keep that folder in the CI cache: a lost cache only costs build time, because any Revision missing from it is rebuilt from git. archidocs history build fills the cache ahead of time. CI also needs the full git history: check out with fetch-depth: 0.

A Change is one item of the Model added, removed or changed between two points: an Element renamed, a Relationship added, a Deployment’s URL changed. archidocs diff lists them between two git refs or dates:

Terminal window
archidocs diff v1.0.0 main

With one point, it compares against the working tree, so you can see what an edit changes before you commit. A date means the last default-branch commit at or before it. See Review changes with diff.

A published viewer shows the Model at any kept Revision: pick one from the history, and every View, Lens and panel shows the architecture as it was. Compare shows what changed between two Revisions on the diagram itself, with added, removed and changed Elements marked. The URL holds both points (at and vs), so a comparison can be shared as a link.

A PR preview built with archidocs build --preview opens on Compare, from the base branch to the pull request. See PR previews.

Over MCP, list_history lists the Revisions and get_changes lists the Changes between two.