diff --git a/.adr-dir b/.adr-dir new file mode 100644 index 0000000..51c5f29 --- /dev/null +++ b/.adr-dir @@ -0,0 +1 @@ +docs/decisions diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5cb97ce --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +# MkDocs build output +site/ +# temporary files +tmp/ diff --git a/README.md b/README.md index b92a47b..519b4c5 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,3 @@ -# architecture -Technical architecture governance for SciLifeLab infrastructure - ensuring interoperability, standards, and sustainable design +# SciLifeLab Architecture + +Technical architecture governance for SciLifeLab infrastructure - ensuring interoperability, standards, and sustainable design diff --git a/docs/decisions/0001-record-architecture-decisions.md b/docs/decisions/0001-record-architecture-decisions.md new file mode 100644 index 0000000..09ca272 --- /dev/null +++ b/docs/decisions/0001-record-architecture-decisions.md @@ -0,0 +1,19 @@ +# ADR-0001. Record architecture decisions + +Date: 2025-11-25 + +## Status + +Accepted + +## Context + +We need to record the architectural decisions made on this project. + +## Decision + +We will use Architecture Decision Records, as [described by Michael Nygard](http://thinkrelevance.com/blog/2011/11/15/documenting-architecture-decisions). + +## Consequences + +See Michael Nygard's article, linked above. For a lightweight ADR toolset, see Nat Pryce's [adr-tools](https://github.com/npryce/adr-tools). diff --git a/docs/decisions/templates/template.md b/docs/decisions/templates/template.md new file mode 100644 index 0000000..1f7944b --- /dev/null +++ b/docs/decisions/templates/template.md @@ -0,0 +1,19 @@ +# ADR-NUMBER. TITLE + +Date: DATE + +## Status + +STATUS + +## Context + +The issue motivating this decision, and any context that influences or constrains the decision. + +## Decision + +The change that we're proposing or have agreed to implement. + +## Consequences + +What becomes easier or more difficult to do and any risks introduced by the change that will need to be mitigated. diff --git a/scripts/adr-new b/scripts/adr-new new file mode 100755 index 0000000..6e23629 --- /dev/null +++ b/scripts/adr-new @@ -0,0 +1,17 @@ +#!/bin/bash +# Wrapper for adr-new that formats ADR identifiers as ADR-0001, ADR-0002, etc. +set -e + +# Create the ADR using the standard tool +output=$(adr new "$@") + +if [ -n "$output" ] && [ -f "$output" ]; then + # Extract the number from filename (e.g., 0002 from 0002-some-title.md) + filename=$(basename "$output") + padded_num=$(echo "$filename" | grep -oE '^[0-9]+') + + # Replace "ADR-N." with "ADR-000N." in the file + sed -i -E "s/^# ADR-[0-9]+\./# ADR-${padded_num}./" "$output" + + echo "$output" +fi