# 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:** 1\
**Showing post:** 4

<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?

---

_[View the full topic](https://forum.xwiki.org/t/use-architecture-decision-records-adr-for-cristal/14061)._
