/

November 14, 2024

Why Every Tech Team Needs ADRs

Visual representation of the BOSS Criteria for tracking Architectural Decision Records (ADR). Four ADR statuses are shown under a label titled "ADR (Architectural Decision Records)": PROPOSED – ADR-001 (Blue) ACCEPTED – ADR-002 (Green) REJECTED – ADR-003 (Red) IMPLEMENTED – ADR-004 (White with blue border) Below the statuses is a caption that reads: "The BOSS Criteria"

Introduction

Documentation is fundamental in software development, especially for capturing software architectures and the rationale behind key decisions. 

Recording both what was decided and why it was decided, fosters a product-focused mindset that supports system design and provides a framework to validate implemented choices. 

At Indexnine, a product engineering services company, we have effectively leveraged Architectural Decision Records (ADRs) to enhance the development process for our enterprise clients, which has been instrumental in helping their products go live smoothly, without issues. 

Here, we’ll highlight our refined approach for documenting these essential system design and architecture best practices, enabling a structured and reliable process for “go-to-market” of your software products.

 
What is an ADR?

An Architectural Decision Record (ADR) is a record to capture any requirement or a decision that qualifies as an ASR (Architecturally Significant Requirement). 

But then, what is an ASR ( Architecturally Significant Requirement ) ?

Answer : An ASR is any requirement that has at least 1 of the below points : 

          1. Technical Risk – ( Impact on components in a tech stack used by the product incl. Non-functional Requirements[NFR] )
          2. Business Impact – ( Change of functionality aka Functional Requirement [FR])
          3. Optimisation of Cost – ( Cost / Budgeting impact )
          4. Security Risk – ( Vulnerabilities, Privacy, etc. )
          5. Stakeholder Involvement – (E.g. Client’s involvement or other required from stakeholders )

Below are important links for further reading about ADR :

    1. Github ADR
    2. AWS – ADR Process
    3. Creating ADRs
    4. ADRs
 
Why should I use an ADR ? Benefits?
    1. Organized Decisions – ADRs are maintained hand in hand with code changes.
    2. Developer-friendly – ADRs are stored in git making it friendly for the development team.
    3. Team-aligned Workflow – ADRs save separate change management process / tool. 
    4. Evidence-based Process – ADRs contain the context, justification and deliverables which serves as evidence in the decision making process.
    5. Vetted Solution – ADRs help in linking the decisions to action items which validates the feasibility using a proof-of-concept.
    6. Learning Enablement – ADR process helps in knowledge sharing between all team members
    7. Product Mindset – ADRs help developers cultivate the “product mindset” by focusing on the “why” of the decision taken instead of the “how” of the decision taken.
 
How to decide if a decision should go in an ADR or not ?

The BOSS Criteria

The BOSS Criteria serves as a decision guide for developers to decide when a decision goes in an ADR and when it should not go.

We evaluated every decision against these criteria to understand why a decision should be recorded as an ADR. 

Any decision/requirement that has at least 1 of the below 5 reasons qualifies as an ADR :

Technical Risk ( One major component impacting other minor/major components )
Business Impact ( incl. End-user perspective )
Optimisation of Cost / Efforts ( Cost saving, Cost Optimization, Saving Time/Efforts)
Stakeholder Impact ( involvement of buy-in required from stakeholders )
Security Impact ( Vulnerability, Privacy, etc. )
 
How should I implement an ADR process ? Implementation ?

As part of Architect’s Forum at Indexnine, we implemented the ADR process for our enterprise clients in 3 key phases as below :

 
Phase 1 – ADR Proposal : Use tools to meet & propose decisions in an ADR.

lowchart of the ADR (Architectural Decision Record) process. Starts at 'Phase 1', followed by 'ADR Identified', then 'Create ADR PROPOSED'. A dotted line from this box points to 'Markdown Created'. The main flow continues with 'Send ADR for review to the team' and ends at 'Phase 2'. Blue boxes indicate phases and steps, with the proposed ADR in orange.

 
Phase 2 – ADR Approval : Use tools to meet, review & accept/reject ADRs from the previous stage.

Flowchart beginning with 'Phase 2'. The first decision diamond asks 'ADR accepted by Team?'. If 'Yes', the flow moves to a green box labeled 'ADR Accepted' and then to 'Phase 3'. If 'No', it leads to another diamond, 'ADR rejected by Team?'. If 'Yes', the flow moves to a red box labeled 'ADR Rejected'. If 'No', the process continues to 'ADR Improvements', from which it loops back with the label 'Send revised ADR to the team'.

 
Phase 3 – ADR Implementation : Use tools to meet, review implementation/deployment & if needed supersede ADRs from the previous stage.
Flowchart starting with "Phase 3". First step: "Implement the change as per ADR". Next, a diamond asks, "Review if change implemented as per ADR?". If "Violates ADR", arrow leads to "Comment and link to ADR", then loops back to "Implement the change as per ADR". If "Yes", it moves to "ADR Implemented", followed by "Is Enhancing old ADR?". If "Yes", the flow goes to "Create new ADR for enhancement and mark old as SUPERSEDED", then loops to "Phase 1". If "No", the flow ends.
Finally, should I use it or not?
The Good

In summary, if you want to achieve any of the below points then we strongly recommend to use it :

      • Makes you think from the end-user perspective ( Product Mindset )
      • Helps you to identify the process of taking a decision for architectural changes.
      • Makes you focus on the “Why” of the decision instead of only the “How” of the decision. 
      • Forces you to think about options that you were not considering.
The Challenges

In our experience, we found the below 2 challenges for using ADRs :

  1. Active Maintenance
    • The whole ADR implementation makes sense only if it is proactively maintained (ADRs should be updated from time to time as part of the incorporated JAD/Architectural review process). 
    • Along with the ADR files, the referenced/linked documentation should be updated as the architectural / code changes are being done. This is needed because the documentation should reflect the latest updated changes.
  2. Education
    • Implementing the ADRs need an additional step of maintaining and validating the decisions taken however that comes with all the benefits as below :
      1. ADR results in a crisp version of reviewed architecture.
      2. ADR helps in making the foundation of architecture stronger.
      3. ADR firms up the system design and the related decisions regarding the same.
    • However, the team members should be educated that the purpose of ADR is to not block/slow down the development process but to document “whatever” the decision was taken and move ahead further to implementing the same.
    • This way, the choices made as part of the decision get recorded and their implementation status gets tracked.
 
Appendix – What does an ADR look like ?
A structured document titled "Sample - Architectural Decision Record (ADR)" with the ID [ADR-0001] Replace PrismaORM with TypeORM, dated 2024-05-16 and marked as "Status: PROPOSED". Context: Mentions that the NodeJS project currently uses PrismaORM, a paid service, and there's a need to reduce costs. Decision: Recommends replacing PrismaORM with TypeORM, a free alternative. Justified by the cost-saving benefits and TypeORM’s support of core ORM features. Deliverables: Action item to migrate from PrismaORM to TypeORM using layered architecture. References: Includes three clickable links to TypeORM’s documentation, details, and GitHub repository.
Scenario

The above ADR sample is created by the Development team for replacing the current ORM in the product (PrismaORM) with a new ORM (TypeORM).

Author

Shubham Aher

Lead Software Engineer