adrnum

command
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 9, 2026 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Command adrnum assigns a number to every architecture decision record that is still in flight, and makes the repository agree about it.

A record is written on a branch as docs/adr/draft-<slug>.md with no number, because "the next free number" has no stable answer on a branch — two branches asking at the same time get the same one. This command answers it where it does have one, on main: it renames each draft to NNNN-<slug>.md, rewrites its heading, appends its row to the ADR index, and rewrites every citation of the draft across the tree. See docs/adr/number.go for the full argument.

Usage:

go run ./docs/adr/cmd/adrnum [repo-root]    # or: make adr-number

It is idempotent: with no drafts present it changes nothing, which is what lets the workflow in .github/workflows/adr-number.yml run it on every push to main.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL