Skip to content

How to propose an architecture decision

This guide covers writing a new architecture decision record (ADR), getting it approved and merging it. It assumes the repository already keeps ADRs. If it doesn't, start with Start recording architecture decisions in a project. For why the process works this way, read the explanation of ADRs.

If in doubt, use the adr-writer skill

If you work with an AI coding agent, the adr-writer skill from our core agent skills follows this guide for you. It drafts the proposal, numbers and dates it once it is approved, and handles superseding and deprecating too.

Prerequisites

  • A repository with a decisions directory, usually docs/decisions/. The conventions reference lists where each kind of decision goes.
  • An idea of who the decision makers are. That is usually the team that owns the project, or a cross-team group for a decision that affects several teams.

Write the proposal

Create a branch, then copy one of the MADR templates into a new file named 0000-<short-title>.md:

git switch -c propose-pub-sub-for-notifications
$EDITOR docs/decisions/0000-use-pub-sub-for-notifications.md

Don't pick a number yet

Every proposal stays as 0000 until it is accepted, so open proposals never clash with each other. You give it a number just before merging, as described in Record the decision.

Fill in the frontmatter. Set status to "proposed" and leave date empty, because you set it when the decision is made. List the people or body that will decide under decision-makers.

Write the sections. The title should name the decision, not the problem. Keep the context to what a reader a year from now would need, and link to any issue or discussion that led to the proposal.

Usually you will have a preferred option. Put it in Decision Outcome, based on your best understanding, and let the pros and cons show why it is the strongest candidate. Describe the other options just as fairly, because the decision makers may choose one of them. If the choice is genuinely open and needs debating, you can leave Decision Outcome empty and say so in the context. It must be filled in before the ADR is accepted.

Open a merge request

Commit the file and open a merge request. Mark it as a draft while you are still writing. A Conventional Commits title works well, for example docs(adr): propose using Pub/Sub for notifications.

Ask the decision makers to review it. Discussion happens on the merge request, and changes you make in response are further commits on the branch.

If your team or group tracks work in issues, you can also open an issue that links to the merge request, for example to plan the proposal or put it on a meeting agenda. This is optional. The merge request is still where the ADR is reviewed.

Record the decision

Once the decision makers approve the proposal, prepare it for merging. Approval happens however your team or group normally agrees things, for example sign-off on the merge request or a decision recorded in an issue after a meeting.

  1. Update your branch from the default branch, then find the highest number in use:

    git fetch origin
    git rebase origin/main
    ls docs/decisions | grep -E '^[0-9]{4}-' | sort | tail -n 1
    
  2. Rename the file to the next number. If the highest is 0006, yours becomes 0007:

    git mv docs/decisions/0000-use-pub-sub-for-notifications.md \
        docs/decisions/0007-use-pub-sub-for-notifications.md
    

    Use git mv rather than renaming the file another way

    git mv stages the removal of the 0000 file and the addition of the numbered file in one step. If you rename it in your editor or file manager and only stage the new file, the 0000 file stays on the branch and is merged alongside the numbered ADR. Staged together, the change shows as a rename in the merge request, and git log --follow traces the ADR back through its time as a proposal.

  3. In the frontmatter, set status to "accepted" and date to today's date. Make sure decision-makers names the people or body that approved it.

  4. Make sure Decision Outcome names the option that was chosen and why. Fill it in if the proposal left it empty, and update it if the decision makers chose a different option.
  5. If the decision replaces an earlier one, update the earlier ADR in the same merge request, as described in Supersede or deprecate an architecture decision.
  6. Commit, mark the merge request as ready and merge it.

Check the number again just before you merge

Another ADR may have been accepted since you renamed yours. Git won't report a conflict, because the two files have different names, so you could end up with two ADRs sharing a number.

If the proposal is rejected

Usually, close the merge request with a comment giving the reason. The discussion stays on GitLab.

If the rejection is worth keeping in the log, for example because people are likely to suggest the same option again, record it instead. Number the file as above, set status to "rejected" and date to the day of the decision, and merge it.