# Use Architecture Decision Records (ADR) for Cristal?

**URL:** <https://forum.xwiki.org/t/use-architecture-decision-records-adr-for-cristal/14061>\
**Category:** Cristal\
**Tags:** proposal\
**Created:** [February 13, 2024, 12:23pm UTC](https://forum.xwiki.org/t/use-architecture-decision-records-adr-for-cristal/14061 "2024-02-13T12:23:43Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![vmassol](https://forum.xwiki.org/user_avatar/forum.xwiki.org/vmassol/32/6_2.png) [@vmassol](https://forum.xwiki.org/u/vmassol)\
**Post date:** [February 13, 2024, 12:23pm UTC](https://forum.xwiki.org/t/use-architecture-decision-records-adr-for-cristal/14061/1 "2024-02-13T12:23:44Z")

</div>

Hi devs,

I’d like to propose that we try to record our architecture decisions using an ADR for Cristal.

The rationale is that after some it’s hard to remember why we took some decision and while we can try to search for it in the past mailing lists/forum posts/matrix or IRC chats, it’s not easy. So the idea would be to:

- For any architecture decision we propose it on the forum (our current practice)
- When agreed, we add one or several ADRs (an ADR is supposed to contain only 1 item).

Example:

- Decision to code Cristal using type script

For more info about ADRs, see:

- [GitHub - joelparkerhenderson/architecture-decision-record: Architecture decision record (ADR) examples for software planning, IT leadership, and template documentation](https://github.com/joelparkerhenderson/architecture-decision-record)
- [Documenting Architecture Decisions](https://cognitect.com/blog/2011/11/15/documenting-architecture-decisions)
- [Architecture Decision Record : on commence aujourd’hui - OCTO Talks !](https://blog.octo.com/architecture-decision-record) (French)

Furthermore, I’m proposing that we use [xwiki.org](http://xwiki.org) to hold the Cristal ADRs, using a custom XClass/XSheet/LD (we could make it an app on contrib), with the following xproperties:

- Title: this is the doc title, not an xproperty
- Decision: the decision taken
- Context: Explains the context in which the decision was taken
- Pros/Cons: List of alternatives with pros and cons
- Decision date
- Links: links to related URLs, including the forum link where the decision was taken
- Consequences: what are the consequences of that decision. This is to be amended across time, the rest should not be touched anymore once the decision has been taken.

WDYT?

Thanks

PS1: We could test that for Cristal and it works well, we could also propose it for XS dev.  
PS2: It feels a bit like [design.xwiki.org](http://design.xwiki.org) but it’s not the same scope and size ([design.xwiki.org](http://design.xwiki.org) is more geared towards implementation and ADR are smaller and focused more on architecture decisions). [Design.xwiki.org](http://Design.xwiki.org) entries could link to ADR decisions though, where needed.

---

<div class="post-metadata">

**Author:** ![mleduc](https://forum.xwiki.org/user_avatar/forum.xwiki.org/mleduc/32/2328_2.png) [@mleduc](https://forum.xwiki.org/u/mleduc)\
**Post date:** [February 13, 2024, 1:44pm UTC](https://forum.xwiki.org/t/use-architecture-decision-records-adr-for-cristal/14061/2 "2024-02-13T13:44:50Z")

</div>

+1 thanks

---

<div class="post-metadata">

**Author:** ![vmassol](https://forum.xwiki.org/user_avatar/forum.xwiki.org/vmassol/32/6_2.png) [@vmassol](https://forum.xwiki.org/u/vmassol)\
**Post date:** [February 26, 2024, 5:21pm UTC](https://forum.xwiki.org/t/use-architecture-decision-records-adr-for-cristal/14061/3 "2024-02-26T17:21:31Z")

</div>

First implementation done, see [https://cristal.xwiki.org/xwiki/bin/view/ADR/Coding%20is%20done%20in%20Typescript/](https://cristal.xwiki.org/xwiki/bin/view/ADR/Coding%20is%20done%20in%20Typescript/) and [https://cristal.xwiki.org/xwiki/bin/view/ADR/](https://cristal.xwiki.org/xwiki/bin/view/ADR/)

Implemented in [Loading...](https://jira.xwiki.org/browse/CRISTAL-158)

---

<div class="post-metadata">

**Author:** ![vmassol](https://forum.xwiki.org/user_avatar/forum.xwiki.org/vmassol/32/6_2.png) [@vmassol](https://forum.xwiki.org/u/vmassol)\
**Post date:** [February 29, 2024, 4:10pm UTC](https://forum.xwiki.org/t/use-architecture-decision-records-adr-for-cristal/14061/4 "2024-02-29T16:10:59Z")

</div>

> [@vmassol](#):
>
> PS2: It feels a bit like [design.xwiki.org](http://design.xwiki.org) but it’s not the same scope and size ([design.xwiki.org](http://design.xwiki.org) is more geared towards implementation and ADR are smaller and focused more on architecture decisions). [Design.xwiki.org](http://Design.xwiki.org) entries could link to ADR decisions though, where needed.

I’ve been wondering more about this because we need to answer the following questions:

1. When do we create an ADR? Do we do it for all decisions (cumbersome) or only for large decisions?
2. Do we link from ADR to [design.xwiki.org](http://design.xwiki.org) or from [design.xwiki.org](http://design.xwiki.org) to ADR? Which one is the source of truth?

For 1), I think that one easy rule is that any forum thread tagged with `proposal` should lead to an ADR.

For 2), I’ve started to review if there’s really a difference between ADR and [design.xwiki.org](http://design.xwiki.org). Let’s look at the XClass for design.xwiki.or (i.e. `ProposalCode.ProposalClass`):

- Product: needed in the ADR too if we want to use it for different products (and we have it already)
- Name: same as ADR’s title
- Type (Design, Requirements, Feature, Implementation, etc): not in our current ADR impl but could be. Not sure we really need this field and not sure we’ve ever really used it.
- Status: there’s a difference here. An ADR is something that was agreed on while [design.xwiki.org](http://design.xwiki.org) currently contains work in progress, or stuff that were dropped. However, it’s not a problem to have this concept for an ADR and only focus on the “Completed” ones.
- Participants: would be ok for an ADR. Not sure we need it, anyone replying on the forum is actually a participant, yet we often don’t update the participants field. I think I’d change that field to be “Proposers” instead (ie the list of people who are proposing it).
- Issues/Mails/Other URLs: this could all be merged in a single Links field (which we have in our current ADR impl)
- Description: We don’t really have it in our ADR. We have a Decision and a Alternatives with pros/cons. The way I see it, we could rename Description into Proposal, and it would list the alternatives with pros/cons, and have another Decision xproperty which would be used to explicitly list the decided/agreed decision (something we’re lacking on [design.xwiki.org](http://design.xwiki.org) ATM as we never know if the entries have been updated after the discussion on the forum or not).
- Then we could add a Consequences field, which we have in our ADR for registering future consequences of the decision taken.
- We should also add a decision date as we have in the ADR impl.
- Last, we could add a Context field to define what the proposal is about and the context of the proposal (why is it proposed).

So, all in all, I think an [design.xwiki.org](http://design.xwiki.org) is an ADR and we just need to massage it a bit.

What we could imagine:

- Create the next version of design.xwiki.or and export it as ADR app on contrib.
- Make the changes mentioned above.
- Create [https://adr.xwiki.org](https://adr.xwiki.org) and use the ADR app
- Make [design.xwiki.org](http://design.xwiki.org) read only and direct users to [adr.xwiki.org](http://adr.xwiki.org) for creating new entries
- Migrate active proposals on [design.xwiki.org](http://design.xwiki.org) to [adr.xwiki.org](http://adr.xwiki.org)

The general process would be:

- Make a proposal on the forum (with the full proposal in the forum post or by pre-creating an entry on [adr.xwiki.org](http://adr.xwiki.org) and linking to it)
- Once the proposal is agreed on the forum, create or update [adr.xwiki.org](http://adr.xwiki.org) to record the decision and the decision date (and make sure the Proposal xproperty is also up to date), set the status to Closed/Completed/Agreed.
- Close the forum post as solved, with a link to [adr.xwiki.org](http://adr.xwiki.org)

WDYT? Should I send a proposal on the [https://forum.xwiki.org/c/dev/13](https://forum.xwiki.org/c/dev/13) category to propose this for all and not just for Cristal?

---

<div class="post-metadata">

**Author:** ![mleduc](https://forum.xwiki.org/user_avatar/forum.xwiki.org/mleduc/32/2328_2.png) [@mleduc](https://forum.xwiki.org/u/mleduc)\
**Post date:** [March 7, 2024, 1:29pm UTC](https://forum.xwiki.org/t/use-architecture-decision-records-adr-for-cristal/14061/5 "2024-03-07T13:29:53Z")

</div>

From my understanding, ADRs and design pages focus on two different aspects:

- ADRs aims at explaining the **why** behind architectural decisions
- design pages aims at documenting the **how** (e.g., implementation details, diagrams, etc.)

Therefore, it feels like the best option for me, it to keep both separate, and to possibly use ADRs as justification for design choices.

But, if we consider that what we are currently doing is close to ADRs, then +1 to migrate design to ADR.

---

<div class="post-metadata">

**Author:** ![vmassol](https://forum.xwiki.org/user_avatar/forum.xwiki.org/vmassol/32/6_2.png) [@vmassol](https://forum.xwiki.org/u/vmassol)\
**Post date:** [March 7, 2024, 3:39pm UTC](https://forum.xwiki.org/t/use-architecture-decision-records-adr-for-cristal/14061/6 "2024-03-07T15:39:44Z")

</div>

Thanks for the feedback.

> [@mleduc](#):
>
> Therefore, it feels like the best option for me, it to keep both separate, and to possibly use ADRs as justification for design choices.

Could you be more specific and tell me what fields listed above wouldn’t work for our current design pages? I don’t see any on my side.

For me, the whole goal of this discussion is to see if we could use the same tool for everything. We can name the tool the way we want (ADR or something else), it doesn’t matter much.

In the proposal above, I mentioned:

> Type (Design, Requirements, Feature, Implementation, etc):

This was to account for the potentially different usages of the tool.

Since the concept of ADR already exists, I’d be in favor of using its name rather than inventing a new one. It feels good to reuse that name since people seeing [adr.xwiki.org](http://adr.xwiki.org) will understand what it’s about more easily than [design.xwiki.org](http://design.xwiki.org) (BTW talking about design for implementation is not better than talking about the architecture of the implementation, for me design and architecture can be considered synonyms in our context).

An alternative is to name it an IDR (Important Decision Records), IPR (Important Proposal Records), or something like this, but I’d prefer to not reinvent the wheel and call it an ADR. Especially since I believe everything we currently have on [design.xwiki.org](http://design.xwiki.org) is about architecture/design. It contains architecture decisions, whether they’re about requirements, about the UI, about a feature to add or remove, about some important implementation details (Deciding to use such framework or such implementation pattern, for ex, is an architecture decision).

WDYT? Was I able to convince you? 🙂

PS: BTW I like what is at [ADR process - AWS Prescriptive Guidance](https://docs.aws.amazon.com/prescriptive-guidance/latest/architectural-decision-records/adr-process.html) I think we could re-use a lot from it.

PPS: that doc says:

> When the team accepts an ADR, it becomes immutable. If new insights require a different decision, the team proposes a new ADR. When the team accepts the new ADR, it supersedes the previous ADR.

I think we need a field for that, at least a “state” for it: “Superseded”.

---

<div class="post-metadata">

**Author:** ![mleduc](https://forum.xwiki.org/user_avatar/forum.xwiki.org/mleduc/32/2328_2.png) [@mleduc](https://forum.xwiki.org/u/mleduc)\
**Post date:** [March 11, 2024, 9:53am UTC](https://forum.xwiki.org/t/use-architecture-decision-records-adr-for-cristal/14061/7 "2024-03-11T09:53:41Z")

</div>

> [@vmassol](#):
>
> WDYT? Should I send a proposal on the [https://forum.xwiki.org/c/dev/13](https://forum.xwiki.org/c/dev/13) category to propose this for all and not just for Cristal?

+1

Also, after more discussions, we concluded that:

- it’s ok to merge the concepts of design page and ADR (under the [adr.xwiki.org](http://adr.xwiki.org) domain) and migrate existing design pages
- forum proposals impacting the design should lead to an ADR
- documentation pages should point to ADRs for traceability (e.g., to justify a coding style rule)

---

<div class="post-metadata">

**Author:** ![vmassol](https://forum.xwiki.org/user_avatar/forum.xwiki.org/vmassol/32/6_2.png) [@vmassol](https://forum.xwiki.org/u/vmassol)\
**Post date:** [March 11, 2024, 4:22pm UTC](https://forum.xwiki.org/t/use-architecture-decision-records-adr-for-cristal/14061/8 "2024-03-11T16:22:46Z")

</div>

> [@mleduc](#):
>
> documentation pages should point to ADRs for traceability (e.g., to justify a coding style rule)

I think we said the opposite actually:

- ADR pages should link to reference documentation
- Reference documentation should NOT link to ADR pages since reference doc are not about the dev process.

---

<div class="post-metadata">

**Author:** ![vmassol](https://forum.xwiki.org/user_avatar/forum.xwiki.org/vmassol/32/6_2.png) [@vmassol](https://forum.xwiki.org/u/vmassol)\
**Post date:** [March 11, 2024, 4:45pm UTC](https://forum.xwiki.org/t/use-architecture-decision-records-adr-for-cristal/14061/9 "2024-03-11T16:45:24Z")

</div>

> [@mleduc](#):
>
> forum proposals impacting the design should lead to an ADR

To be more precise we agreed that it should include proposals **about the product or development processes**. It doesn’t include other proposals (e.g. roadmap proposals, or [Clean up of xwiki.org recycle bins](https://forum.xwiki.org/t/clean-up-of-xwiki-org-recycle-bins/14152))

---

<div class="post-metadata">

**Author:** ![vmassol](https://forum.xwiki.org/user_avatar/forum.xwiki.org/vmassol/32/6_2.png) [@vmassol](https://forum.xwiki.org/u/vmassol)\
**Post date:** [March 11, 2024, 4:46pm UTC](https://forum.xwiki.org/t/use-architecture-decision-records-adr-for-cristal/14061/10 "2024-03-11T16:46:35Z")

</div>

General proposal for all product sent at [Refactor design.xwiki.org into adr.xwiki.org + best practice to use it](https://forum.xwiki.org/t/refactor-design-xwiki-org-into-adr-xwiki-org-best-practice-to-use-it/14231)
