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

doctor

Check the health of your ADR repository.

Usage

adrs doctor [OPTIONS]

Options

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

Description

Runs diagnostic checks on your ADR repository and reports any issues found.

Checks Performed

CheckDescription
File NamingADR files follow the NNNN-title.md pattern
Duplicate NumbersNo two ADRs have the same number
Numbering GapsSequential numbering without gaps
Broken LinksAll referenced ADRs exist
Superseded StatusSuperseded ADRs have corresponding links
Parse ErrorsAll ADRs can be parsed correctly

Examples

Healthy Repository

adrs doctor

Output:

Checking ADR repository health...

[OK] File naming: All 5 ADRs follow naming convention
[OK] Duplicate numbers: No duplicates found
[OK] Numbering gaps: Numbers are sequential
[OK] Broken links: All links are valid
[OK] Superseded status: All superseded ADRs have links
[OK] Parse errors: All ADRs parsed successfully

Health check passed!

Repository with Issues

adrs doctor

Output:

Checking ADR repository health...

[OK] File naming: All 5 ADRs follow naming convention
[WARN] Numbering gaps: Gap after ADR 3 (next is 5)
[ERROR] Broken links: ADR 4 links to non-existent ADR 99
[WARN] Superseded status: ADR 2 is superseded but has no "Superseded by" link

Health check found 3 issue(s)

Severity Levels

LevelDescription
OKCheck passed
WARNPotential issue, but not critical
ERRORProblem that should be fixed

Exit Codes

CodeDescription
0All checks passed
1One or more checks failed

This allows using doctor in CI pipelines:

- name: Check ADR health
  run: adrs doctor
  • list - List ADRs
  • link - Fix broken links