archgate adr
archgate adr create
Section titled “archgate adr create”Create a new ADR interactively or via flags.
archgate adr create [options]When run without --title and --domain, the command prompts interactively for the domain, title, and optional file patterns. When both --title and --domain are provided, it runs non-interactively.
The ADR ID is auto-generated with the domain prefix and the next available sequence number (e.g., ARCH-002, BE-001).
Options
Section titled “Options”| Option | Description |
|---|---|
--title <title> | ADR title (skip interactive prompt) |
--domain <domain> | ADR domain. Built-ins: backend, frontend, data, architecture, general. Custom domains must first be registered via archgate adr domain add. |
--files <patterns> | File patterns, comma-separated |
--body <markdown> | Full ADR body markdown (skip template) |
--rules | Set rules: true in frontmatter |
--json | Output as JSON |
Examples
Section titled “Examples”Interactive mode:
archgate adr createNon-interactive mode:
archgate adr create \ --title "API Response Envelope" \ --domain backend \ --files "src/api/**/*.ts" \ --rulesarchgate adr list
Section titled “archgate adr list”List all ADRs in the project.
archgate adr list [options]Options
Section titled “Options”| Option | Description |
|---|---|
--json | Output as JSON |
--domain <domain> | Filter by domain |
Examples
Section titled “Examples”List all ADRs in table format:
archgate adr listID Domain Rules Title────────────────────────────────────────────────────────ARCH-001 architecture true Command StructureARCH-002 architecture true Error HandlingBE-001 backend true API Response EnvelopeList ADRs as JSON:
archgate adr list --jsonFilter by domain:
archgate adr list --domain backendarchgate adr show
Section titled “archgate adr show”Print a specific ADR by ID.
archgate adr show <id>Prints the full ADR content (frontmatter and body) to stdout.
Arguments
Section titled “Arguments”| Argument | Description |
|---|---|
<id> | ADR ID (e.g., ARCH-001, BE-003) |
Example
Section titled “Example”archgate adr show ARCH-001archgate adr update
Section titled “archgate adr update”Update an existing ADR by ID.
archgate adr update --id <id> --body <markdown> [options]Replaces the ADR body with the provided markdown. Frontmatter fields (--title, --domain, --files, --rules) are updated only when explicitly passed; otherwise the existing values are preserved.
Options
Section titled “Options”| Option | Required | Description |
|---|---|---|
--id <id> | Yes | ADR ID to update (e.g., ARCH-001) |
--body <markdown> | Yes | Full replacement ADR body markdown |
--title <title> | No | New ADR title (preserves existing if omitted) |
--domain <domain> | No | New domain. Built-ins: backend, frontend, data, architecture, general. Custom domains must first be registered via archgate adr domain add. |
--files <patterns> | No | New file patterns, comma-separated (preserves existing if omitted) |
--rules | No | Set rules: true in frontmatter |
--json | No | Output as JSON |
Example
Section titled “Example”archgate adr update \ --id ARCH-001 \ --title "Updated Command Structure" \ --body "## Context\n\nUpdated context..."archgate adr domain
Section titled “archgate adr domain”Manage custom ADR domains. Custom domains are name → ID-prefix mappings persisted in .archgate/config.json and merged with the five built-ins (backend, frontend, data, architecture, general) at read time.
Use this command when a decision doesn’t cleanly fit any built-in domain. Before registering a new one, check whether the decision can be folded under an existing domain — built-ins are the default and a custom domain should only be introduced when no built-in is a genuine fit.
archgate adr domain <subcommand> [options]Subcommands
Section titled “Subcommands”| Subcommand | Description |
|---|---|
archgate adr domain list | Show all merged (built-in + custom) domains and their prefixes |
archgate adr domain add <name> <prefix> | Register a custom domain |
archgate adr domain remove <name> | Unregister a custom domain (built-ins cannot be removed) |
Naming rules
Section titled “Naming rules”<name>— lowercase kebab-case, 2–32 chars (e.g.,security,ml-ops)<prefix>— uppercase letters, digits, or underscores, 2–10 chars (e.g.,SEC,MLOPS)- Custom names and prefixes cannot collide with built-ins or with any other custom entry.
Options
Section titled “Options”| Option | Applies to | Description |
|---|---|---|
--json | all subcommands | Output as JSON |
Examples
Section titled “Examples”List built-in and custom domains:
archgate adr domain listDomain Prefix Source────────────────────────────────architecture ARCH defaultbackend BE defaultdata DATA defaultfrontend FE defaultgeneral GEN defaultsecurity SEC customRegister a custom domain:
archgate adr domain add security SECRemove a custom domain:
archgate adr domain remove security