Skip to content

Commit a07d804

Browse files
committed
docs(adr): record schema version policy
1 parent fc42b9f commit a07d804

2 files changed

Lines changed: 64 additions & 0 deletions

File tree

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# 0001. Record architecture decisions in the code repository
2+
3+
Date: 2026-05-26
4+
5+
Status: Accepted
6+
7+
## Context
8+
9+
vanityURLs has product behavior, generated configuration, installer behavior, and deployment assumptions that are easier to understand when the reason for a decision is close to the code that implements it.
10+
11+
The public website should explain how to use vanityURLs, but it should not become a long internal design log. Maintainers still need a lightweight place to record why code-level contracts exist.
12+
13+
## Decision
14+
15+
Record architecture decision records as Markdown files under `docs/adr/` in the code repository.
16+
17+
Use a small structure:
18+
19+
- title, date, and status
20+
- context
21+
- decision
22+
- consequences
23+
24+
Number ADR files with a stable prefix, for example `0001-record-architecture-decisions.md`.
25+
26+
The website may link to an ADR or source file when the implementation detail matters, but ADRs are maintained in the code repository.
27+
28+
## Consequences
29+
30+
- Design history travels with the code
31+
- Website pages can stay short and user-focused
32+
- Changes to product contracts can reference a local ADR in the same pull request or commit
33+
- ADRs are not a replacement for user documentation, tests, or inline code comments
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# 0002. Treat site config schema version as a stored contract
2+
3+
Date: 2026-05-26
4+
5+
Status: Accepted
6+
7+
## Context
8+
9+
`defaults/v8s-site-config.json` and `custom/v8s-site-config.json` include `schema_version`. The value has stayed at `1.0` while new optional fields were added, such as link CLI defaults and installer-managed branding fields.
10+
11+
Additive fields do not currently require instance owners to migrate existing files because the build and installer merge defaults with custom values and tolerate missing optional fields.
12+
13+
## Decision
14+
15+
Keep `schema_version` at `1.0` for additive, backward-compatible changes.
16+
17+
Increment `schema_version` only when a stored `custom/v8s-site-config.json` file needs a migration or when existing field semantics change incompatibly.
18+
19+
When `schema_version` changes, the same change should include:
20+
21+
- the new default schema version in `defaults/v8s-site-config.json`
22+
- installer or upgrade behavior that handles older custom files
23+
- documentation in the related release notes or ADR
24+
- tests or checks for the migration behavior when practical
25+
26+
## Consequences
27+
28+
- Instance owners are not asked to interpret schema bumps for optional fields
29+
- Maintainers have a clear trigger for schema version changes
30+
- The current `schema_version` remains useful as a future migration marker even though it is not bumped for every new field
31+
- Source files remain the implementation contract for exact fields

0 commit comments

Comments
 (0)