Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

link

Link two Architecture Decision Records together.

Usage

adrs link [OPTIONS] <SOURCE> <LINK> <TARGET> <REVERSE_LINK>

Arguments

ArgumentDescription
<SOURCE>Source ADR number
<LINK>Link description from source to target
<TARGET>Target ADR number
<REVERSE_LINK>Reverse link description from target to source

Options

OptionDescription
--ngUse NextGen mode
-C, --cwd <DIR>Working directory
-h, --helpPrint help

Description

Creates bidirectional links between two ADRs. The link is added to the status section of both ADRs.

Examples

Amends Relationship

adrs link 3 "Amends" 1 "Amended by"

Result in ADR #3:

## Status

Proposed

Amends [1. Record architecture decisions](0001-record-architecture-decisions.md)

Result in ADR #1:

## Status

Accepted

Amended by [3. Clarify decision format](0003-clarify-decision-format.md)

Extends Relationship

adrs link 4 "Extends" 2 "Extended by"

Custom Relationship

adrs link 5 "Depends on" 3 "Dependency of"
Forward LinkReverse LinkUse Case
AmendsAmended byModifying a previous decision
ExtendsExtended byBuilding on a previous decision
SupersedesSuperseded byReplacing a decision
Relates toRelates toGeneral relationship
Depends onDependency ofDependencies

Superseding

For superseding relationships, prefer using adrs new --supersedes:

# Instead of:
adrs new "New approach"
adrs link 3 "Supersedes" 2 "Superseded by"

# Use:
adrs new --supersedes 2 "New approach"

The --supersedes option also updates the target ADR's status to "Superseded".

NextGen Mode

In NextGen mode (--ng), links are stored in YAML frontmatter:

---
status: proposed
date: 2024-01-15
links:
  - kind: Amends
    target: 1
---
  • new - Create ADRs with links
  • list - Find ADR numbers