Skip to content

Auto-generate architectures from Git

Understand ships automatic architecture plugins that build an architecture from your Git history and keep it up to date on every project open — no manual tagging. Three of them group your files by who works on them and by how often they change:

Plugin Groups files by Buckets
Git Owner The author(s) with the most commits to each file Owner (most commits), Major Contributor (≥5%), Minor Contributor (<5%)
Git Author A single author per file Creator (first author) or Most Recent (default)
Git Stability Commit activity (churn) Active (changed ≥2× in the last 30 days), Recurrently Active (active across multiple 30-day periods), Stable

Use Git Owner to see who owns the file you're looking at (or explore dependencies by owner), and Git Stability to surface high-churn code — recurrently active files often signal design trouble or risk hotspots. Like any architecture, the Git ones work everywhere architectures do — including as the basis for enforced dependency rules.

Install and generate

Git Author is enabled by default — it appears in the Architecture Browser as soon as the project has Git history (see built-in architectures). Git Owner and Git Stability are plugins, so enable those once, then create an instance:

  1. Tools → Plugin Manager — the Git architecture plugins ship with Understand, so find the one you want and enable it. (Plugins that aren't already listed, like your own .upy scripts, can be installed by dragging the file into the Understand window.)
  2. Architectures → New Automatic Architecture — pick the plugin (e.g. Git Owner) to create an instance. Some plugins expose options here — Git Author lets you choose Creator vs Most Recent; Git Stability lets you measure dates relative to Today or Most Recent Commit.
  3. Architectures → Browse Architectures — view the result in the Architecture Browser.

How it works

The plugins run git log in your project's directory (via a shared Git helper) to attribute files to authors and commit dates, so the repository must be present and be a Git checkout. More Git architectures and plugins live in the Arch and Solutions folders of your install and in the SciTools plugins repository.

Note

Automatic architectures regenerate when the project opens or analyzes. The first time a Git architecture is generated on a large project with a lot of history, expect a delay while the Git data is gathered — once cached, later regenerations are much quicker.

Prefer the command line? und arch generates an automatic architecture headlessly:

und arch -generate "Git Stability" myProject.und

Add -name to name the instance and -options to set the plugin's options, mirroring the GUI's New Automatic Architecture name/options dialog:

und arch -generate "Git Stability" -name "Test Stability" \
  -options "Date Relative to=Most Recent Commit" myProject.und
  • -name <name> — names the generated instance instead of using the architecture's default name. A name already in use is rejected, matching the GUI's unique-name check.
  • -options "name=value;…" — semicolon-separated pairs using the same option names shown in the GUI (case-insensitive, prefix-matched). Values may contain * (e.g. Excluded File Patterns=*.h). An invalid option name lists the architecture's available options.