Own ADRs live in docs/adr/local
accepted ADR-0005 local/ADR-0005-own-adrs-live-in-docs-adr-local
Status
Section titled “Status”Accepted
Context
Section titled “Context”ontrack imports the ADRs of each source into docs/adr/<alias>/ and refers
to an ADR as <alias>/<name>. The ADRs a repository writes for itself sat
directly in docs/adr/ and were referred to as local/<name>: a namespace
that existed in every reference and nowhere on disk.
Two numbering sequences shared one visual level. This repository has a
local/ADR-0001 and a trivoallan/ADR-0001, and nothing in the path of the
first said which it was. Tools that list docs/adr/ by directory, the
documentation site among them, showed the imported ADRs and left the
repository’s own out.
Decision
Section titled “Decision”A repository’s own ADRs live in docs/adr/local/. local is a namespace
like any other: one directory, one numbering sequence, and the reference
local/<name> is the path under docs/adr/.
Files directly in docs/adr/ are a historical layout. ontrack still reads
them, plan reports them as a migration, and apply moves them. Nothing
new is written there.
local cannot be the alias of a source.
Consequences
Section titled “Consequences”Positive
Section titled “Positive”- A reference is a path:
local/ADR-0002-…is found without knowing a rule. - Every tool that walks
docs/adr/by directory sees the repository’s own ADRs with no special case. - The next number is read from one directory.
Negative
Section titled “Negative”- Adopting repositories move their own ADRs once, and fix the links
applylists. - The URLs of own ADR pages on a documentation site change.
- A workflow pinned to an earlier version keeps writing at the root until
it is updated;
planreports the file again.
Neutral
Section titled “Neutral”supersedes:is unchanged: a bare name resolves in the ADR’s namespace.- This ADR was written at the root, under the layout it replaces, and moves with the others.
Alternatives Considered
Section titled “Alternatives Considered”- Keep the root and show
localin the documentation only. No file moves, but the namespace stays implicit for every other tool and reader. - Read both layouts forever. No migration, but two places to write and to number, and no reason for a repository ever to converge.
- Name the directory after the repository. Reads well in one
repository, but the reference of an own ADR would differ in each, and
local/…is already written insupersedes:lists.
References
Section titled “References”- OpenSpec change
local-adr-namespace-folder. - Record architecture decisions,
which says own ADRs live in
docs/adr/, outside the source’s directory.
