Skip to content
AI Dev Toolkit.
Esc
  • Loading…

Prompt template · Git and docs

Architecture decision record (ADR) prompt

A good architecture decision record prompt gives the model the raw discussion and the decision in one line, then asks for context, every option seriously considered, the decision and its consequences, including the downsides accepted. This template writes “Not recorded” wherever the notes give no reason or cost, so nothing invented becomes the official record.

Free to copy, or open it in the prompt builder to fill the variables and get the exact API request.

183 tokens unfilled · 320 with the example below · o200k_base (GPT-4o and later)

Template

The ADR prompt template (copy it)

Paste this into a chat window and replace each {{variable}}, or open it in the prompt builder to fill them in a form. Sections are marked with XML tags, which every major model reads well.

Prompt (one message, plain text)
You are a staff engineer who writes short, honest architecture decision records.

<context>
Notes, chat logs or meeting minutes from the discussion:
<discussion>
{{discussion}}
</discussion>
</context>

<constraints>
- Keep to what the discussion says. Where the notes don’t give a reason or a cost, write “Not recorded” rather than inventing one.
- List every option that was seriously considered, with the main reason it was or wasn’t chosen.
- Consequences must include the downsides the team accepted, not only the benefits.
- Plain language, no marketing tone. Aim for one page.
</constraints>

<output_format>
Markdown:
# ADR {{number}}: <short title>
Status: Accepted
## Context
## Options considered
## Decision
## Consequences
</output_format>

<task>
Write an architecture decision record for the decision: {{decision}}.
</task>
For an API call: system prompt and user message

With a system prompt, the role, constraints and output format stay fixed across calls (and can be cached), while the context and task go in the user message.

System prompt
You are a staff engineer who writes short, honest architecture decision records.

<constraints>
- Keep to what the discussion says. Where the notes don’t give a reason or a cost, write “Not recorded” rather than inventing one.
- List every option that was seriously considered, with the main reason it was or wasn’t chosen.
- Consequences must include the downsides the team accepted, not only the benefits.
- Plain language, no marketing tone. Aim for one page.
</constraints>

<output_format>
Markdown:
# ADR {{number}}: <short title>
Status: Accepted
## Context
## Options considered
## Decision
## Consequences
</output_format>
User message
<context>
Notes, chat logs or meeting minutes from the discussion:
<discussion>
{{discussion}}
</discussion>
</context>

<task>
Write an architecture decision record for the decision: {{decision}}.
</task>

Variables

What do the variables mean?

{{discussion}}
The raw material: meeting notes, a Slack thread, a design doc’s comments. Messy is fine; the template is meant to distil it.
{{decision}}
The decision in one line, such as “use Postgres LISTEN/NOTIFY instead of adding Redis for job notifications”.
{{number}}
The ADR number in your log, such as 0017.

Use

When should I use this ADR prompt?

Use it straight after a design discussion, while the notes are fresh, to capture a decision that future engineers will otherwise question. The format follows the widely used context, decision and consequences shape, which keeps a log of decisions consistent and easy to scan.

It is a summary, not a decision-maker. If the discussion didn’t reach a decision, the ADR will be full of “Not recorded”, which tells you the meeting needs a follow-up.

Structure

Why is the prompt structured this way?

The decision is a separate variable so the model doesn’t have to infer it from a long thread, which is where summaries most often go wrong. With the decision fixed, the job becomes finding the context, alternatives and costs that support it.

“Not recorded” instead of invention is the key constraint. ADRs are read as the official reason a choice was made; a plausible but invented reason is worse than an admitted gap, because people will rely on it.

Requiring the accepted downsides keeps the record honest. Most decisions trade something away, and the consequences section is the part future readers need when they wonder whether the trade-off still holds.

Example

Example: a filled-in ADR prompt

{{discussion}}
Backend lead: job workers poll the jobs table every second, ~2k queries/min at idle.
SRE: could add Redis pub/sub, but that's a new service to run and monitor.
Backend lead: Postgres LISTEN/NOTIFY does this; payload limit is 8000 bytes, we only need the job id.
SRE: what if a worker is down when NOTIFY fires? Backend lead: keep a slow poll (30s) as a fallback.
Agreed: go with LISTEN/NOTIFY + 30s poll. Revisit if we move off Postgres.
{{decision}}
Use Postgres LISTEN/NOTIFY with a 30-second fallback poll for job notifications instead of adding Redis
{{number}}
0017

What to look for. A faithful ADR lists Redis pub/sub as the rejected option (a new service to operate), records the 30-second fallback as a consequence (missed notifications are picked up late, not lost) and the tie to Postgres as an accepted downside. It shouldn’t add benchmarks nobody ran.

The complete filled-in prompt (320 tokens)
Filled-in prompt
You are a staff engineer who writes short, honest architecture decision records.

<context>
Notes, chat logs or meeting minutes from the discussion:
<discussion>
Backend lead: job workers poll the jobs table every second, ~2k queries/min at idle.
SRE: could add Redis pub/sub, but that's a new service to run and monitor.
Backend lead: Postgres LISTEN/NOTIFY does this; payload limit is 8000 bytes, we only need the job id.
SRE: what if a worker is down when NOTIFY fires? Backend lead: keep a slow poll (30s) as a fallback.
Agreed: go with LISTEN/NOTIFY + 30s poll. Revisit if we move off Postgres.
</discussion>
</context>

<constraints>
- Keep to what the discussion says. Where the notes don’t give a reason or a cost, write “Not recorded” rather than inventing one.
- List every option that was seriously considered, with the main reason it was or wasn’t chosen.
- Consequences must include the downsides the team accepted, not only the benefits.
- Plain language, no marketing tone. Aim for one page.
</constraints>

<output_format>
Markdown:
# ADR 0017: <short title>
Status: Accepted
## Context
## Options considered
## Decision
## Consequences
</output_format>

<task>
Write an architecture decision record for the decision: Use Postgres LISTEN/NOTIFY with a 30-second fallback poll for job notifications instead of adding Redis.
</task>

Models

Does it work the same in ChatGPT, Claude and Gemini?

Yes, the structure works in all three: tagged sections that keep your material apart from the instructions, and an explicit output format. The tips below cover where the providers’ own guides differ for this ADR prompt.

  • Claude

    For a long discussion, Anthropic suggests asking Claude to pull out the relevant quotes first and then work from them. Add “first list the quotes that support each section in <quotes> tags” if you want an audit trail.

  • Gemini

    With a long pasted thread, Google suggests putting the material first and the request last, linked by a phrase such as “Based on the discussion above”. The builder already places the context before the task.

  • All models

    Keep ADRs in the repository next to the code, so the prompt diff and normal code review work on them like any other file.

FAQ

Questions people ask

What is an architecture decision record?

A short document that records one significant design decision: the context, the choice made and its consequences. Teams keep a numbered log of them in the repository, so a later engineer can see why something was built that way before changing it. This template writes one from meeting notes or a chat thread.

Nygard or MADR: which ADR format should I use?

Either works. Michael Nygard’s original format has a title, status, context, decision and consequences. MADR adds a list of considered options with their pros and cons. This template sits between them: Nygard’s sections plus an options section, which is the part later readers most often need. Change the headings to match your existing log.

How do I make the model record rejected options honestly?

Keep it to the discussion. The template asks for every option that was seriously considered, with the main reason it was or wasn’t chosen, and for “Not recorded” where the notes give no reason. In the worked example, Redis pub/sub appears as rejected because it is a new service to run, which is what the thread said.

Related

Also useful with this prompt: Technical writer system prompt.

Edited the template? Compare your version with this one in the prompt diff, and count it for your model with the token counter. Browse all 29 prompt templates.

Keep exploring