---
template_id: adr
template_name: Architecture Decision Record
version: 1.0
variables:
  - name: number
    type: number
    required: true
    auto: next_adr_number
  - name: title
    type: string
    required: true
    prompt: "Title of the architectural decision:"
  - name: status
    type: choice
    required: true
    choices: [Proposed, Accepted, Deprecated, Superseded]
    default: Proposed
  - name: deciders
    type: string
    required: true
    prompt: "Who participated in this decision? (comma-separated names):"
  - name: context
    type: text
    required: true
    prompt: "What is the context and problem that led to this decision?"
  - name: decision
    type: text
    required: true
    prompt: "What is the decision being made?"
  - name: positiveConsequences
    type: array
    required: true
    prompt: "What are the positive consequences? (comma-separated):"
  - name: negativeConsequences
    type: array
    required: false
    prompt: "What are the negative consequences/trade-offs? (comma-separated):"
---

# ADR {{padNumber number 3}}: {{title}}

**Status:** {{status}}
**Date:** {{formatDate now "YYYY-MM-DD"}}
**Deciders:** {{deciders}}

---

## Context

{{context}}

---

## Decision

{{decision}}

---

## Consequences

### Positive

{{#each positiveConsequences}}
- ✅ {{this}}
{{/each}}

### Negative

{{#if negativeConsequences}}
{{#each negativeConsequences}}
- ⚠️ {{this}}
{{/each}}
{{else}}
_No significant negative consequences identified._
{{/if}}

---

{{#if alternatives}}
## Alternatives Considered

{{#each alternatives}}
### Option {{add @index 1}}: {{this.name}}

{{this.description}}

| Aspect | Details |
|--------|---------|
| **Pros** | {{this.pros}} |
| **Cons** | {{this.cons}} |
| **Why Not Chosen** | {{this.whyNot}} |

{{/each}}
{{/if}}

---

## Related Decisions

{{#if relatedADRs}}
{{#each relatedADRs}}
- [ADR {{this.number}}](./adr-{{padNumber this.number 3}}.md): {{this.title}}
{{/each}}
{{else}}
_No related decisions._
{{/if}}

---

## References

{{#if references}}
{{#each references}}
- {{this}}
{{/each}}
{{else}}
_No external references._
{{/if}}

---

**Generated by:** AIOX Template Engine v2.0
**Template Version:** adr-1.0
