Skip to content

This directory contains Architectural Decision Records (ADRs) for the Keystone Core project.

What is an ADR?

An Architectural Decision Record (ADR) is a document that captures an important architectural decision made along with its context and consequences.

ADRs help us:

  • Document the reasoning behind significant decisions
  • Communicate decisions to the team and stakeholders
  • Provide historical context for future developers
  • Track the evolution of the architecture over time

When to Write an ADR

Write an ADR when making decisions that:

  • Affect the overall system architecture
  • Are difficult to reverse or have long-lasting impact
  • Involve trade-offs between competing concerns
  • Affect security, performance, or scalability
  • Change fundamental assumptions or patterns
  • Introduce new dependencies or remove existing ones
  • Affect the public API or user experience significantly

Examples:

  • Choosing a database technology
  • Adopting a new messaging pattern
  • Changing authentication mechanisms
  • Selecting a framework or major library
  • Defining API versioning strategy

ADR Status

StatusDescription
ProposedUnder discussion, not yet accepted
AcceptedDecision has been made and is in effect
DeprecatedDecision is being phased out
SupersededReplaced by a newer ADR
RejectedProposal was considered but not accepted

ADR Index

ADRTitleStatusDate
ADR-0000ADR Template (Full)Accepted2024-01-01
ADR-0001ADR Template (Short)Accepted2024-01-01

Creating a New ADR

  1. Copy the template:

    cp docs/adr/0000-adr-template.md docs/adr/NNNN-short-title.md
  2. Use the next sequential number (NNNN)

  3. Fill in all sections of the template

  4. Submit as a pull request for review

  5. Update this index after the ADR is accepted

ADR Lifecycle

┌──────────┐     Review      ┌──────────┐
│ Proposed │ ─────────────→  │ Accepted │
└──────────┘                 └──────────┘
     │                            │
     │ Reject                     │ Supersede
     ▼                            ▼
┌──────────┐                 ┌────────────┐
│ Rejected │                 │ Superseded │
└──────────┘                 └────────────┘
                                  │
                                  │ or Deprecate
                                  ▼
                             ┌────────────┐
                             │ Deprecated │
                             └────────────┘

Best Practices

  1. Be concise but complete: Include enough context for future readers
  2. Focus on the “why”: Explain the reasoning, not just the decision
  3. Document alternatives: Show what was considered and why it was rejected
  4. Keep it current: Update status when decisions change
  5. Link to related ADRs: Reference related decisions
  6. Include examples: Show how the decision applies in practice

References