Skip to content

Importing ADRs

An ADR pack is a curated collection of Architecture Decision Records bundled together under a shared theme. Each pack includes:

  • An archgate-pack.yaml manifest with metadata (name, version, maintainers, tags)
  • One or more ADR markdown files in an adrs/ directory
  • Optional companion .rules.ts files that enforce each decision automatically

Packs let you bootstrap a project with proven architectural conventions instead of writing everything from scratch.

The Archgate awesome-adrs registry hosts community-maintained packs. Import one with:

Terminal window
archgate adr import packs/typescript-strict

This clones the registry, copies the ADRs into your .archgate/adrs/ directory, and remaps IDs to fit your project’s numbering scheme.

Append @<ref> to lock to a specific git tag or branch:

Terminal window
archgate adr import packs/[email protected]

You don’t have to import an entire pack. Point to a specific ADR file within a pack:

Terminal window
archgate adr import packs/security/adrs/SEC-001-no-secrets-in-code

Only that single ADR (and its companion rules file, if present) will be imported.

Any GitHub repository with ADR files works as a source. Use the three-segment org/repo/path syntax:

Terminal window
archgate adr import acme/company-adrs/packs/api-standards

This clones https://github.com/acme/company-adrs.git and imports from the specified subpath.

For non-GitHub repositories or when you need full control, pass a complete URL:

Terminal window
archgate adr import https://github.com/org/repo/tree/main/packs/my-pack

The CLI parses the GitHub /tree/<ref>/<path> format automatically. For other hosts, you can pass any git-cloneable URL:

Terminal window
archgate adr import https://gitlab.com/team/repo.git

See what would be imported without writing anything:

Terminal window
archgate adr import packs/typescript-strict --dry-run

Output shows the original IDs, remapped IDs, and titles in a table.

Check what has been imported previously:

Terminal window
archgate adr import --list

This reads .archgate/imports.json and displays each source, version, and the ADR IDs it produced.

When you import ADRs, the original IDs (e.g., TS-001) are remapped to fit your project’s ID sequence. For example, if your project already has ARCH-001 through ARCH-005, the imported ADRs will receive ARCH-006, ARCH-007, etc.

You can override the prefix with --prefix:

Terminal window
archgate adr import packs/security --prefix SEC

The remapping ensures:

  1. No ID collisions with existing ADRs
  2. A single consistent numbering scheme across your project
  3. Imported rules files work immediately without manual edits

Every import is recorded in .archgate/imports.json:

{
"imports": [
{
"source": "packs/typescript-strict",
"version": "0.3.0",
"importedAt": "2026-05-10T14:32:00.000Z",
"adrIds": ["ARCH-006", "ARCH-007", "ARCH-008"]
}
]
}

This manifest lets you track provenance — where each imported ADR came from and when. Commit it to version control alongside your ADRs.

OptionDescription
--yesSkip the confirmation prompt
--jsonOutput results as JSON
--dry-runPreview changes without writing files
--prefix <prefix>Override the ID prefix for imported ADRs
--listList previously imported ADRs