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

ADR009 - Filename Matches Number

For Nygard-format ADRs, the filename number should match the ADR number in the title.

Why This Rule Exists

Matching filename and title numbers:

  • Makes ADRs easy to find
  • Prevents confusion and mismatch
  • Enables consistent file organization

Format

The filename pattern NNNN-title.md should match the title # NNNN. Title:

FilenameTitle
0001-use-rust.md# 1. Use Rust
0042-database-choice.md# 42. Database Choice

Examples

Incorrect

File: 0005-use-rust.md

# 1. Use Rust

Number in filename (5) doesn't match title (1).

Correct

File: 0001-use-rust.md

# 1. Use Rust

File: 0042-database-choice.md

# 42. Choose PostgreSQL

Rule Details

  • Rule ID: ADR009
  • Name: adr-filename-matches-number
  • Category: Validation
  • Severity: Error
  • Automatic Fix: Not available
  • Applies to: Nygard format only