trails/docs/legal-archive/README.md
Ullrich Schäfer d52828543a
Seed docs/legal-archive with Terms / Privacy / Imprint snapshots
Adds a simple legal-archive folder that preserves the full text of the
Terms, Privacy Policy, and Impressum at each version, plus a small
renderer script so future snapshots are mechanical:

    python3 scripts/render-legal.py terms > docs/legal-archive/terms-YYYY-MM-DD.md

Why:
- Terms are per-user contract. users.terms_version maps each user to a
  file in this folder so we can always tell what text they agreed to.
- Privacy is informational but GDPR Art. 13/14 still expects us to be
  able to say what the policy disclosed on a given date.
- Impressum archived for symmetry; cheap.

How it works:
- scripts/render-legal.py reads the TSX source, resolves operator.*
  placeholders from operator.ts and TERMS_VERSION / PRIVACY_LAST_UPDATED
  from legal.ts, strips JSX tags, and prints clean markdown to stdout.
- A README in the folder explains when to bump and when to add a
  snapshot (material change only, not typo fixes).

Seeded entries:
- terms-2026-04-19.md
- privacy-2026-04-19.md
- imprint-2026-04-19.md

No automation / CI check yet — trust-based process documented in the
folder's README. Revisit if discipline slips.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 07:51:41 +02:00

53 lines
2 KiB
Markdown

# Legal archive
Frozen snapshots of the Terms of Service, Privacy Policy, and Impressum at
each version. Kept so we can always answer "what did the Terms / Privacy
text say on a given date" without digging through git blame.
## Why
- **Terms**: users accept a specific version at registration
(`users.terms_accepted_at` + `users.terms_version`). The version string
is the date in this folder — so there is always a file here matching
every value that exists in that column.
- **Privacy**: users don't "accept" a privacy policy, but GDPR Art. 13/14
requires us to tell users how their data is processed *at the time* it's
processed. If a regulator or user asks what the policy said on
YYYY-MM-DD, this folder answers.
- **Impressum**: less legally critical, but free to snapshot for symmetry.
## When to add a file
Whenever any of these three texts change materially, run the snapshot step
as part of the change:
1. Bump `TERMS_VERSION` / `PRIVACY_LAST_UPDATED` in
[`apps/journal/app/lib/legal.ts`](../../apps/journal/app/lib/legal.ts)
to today's date.
2. Re-render the affected page(s) into this folder as
`<doc>-YYYY-MM-DD.md`.
3. Commit the bump **and** the new snapshot in the same PR.
A trivial wording tweak or typo fix does not need a new snapshot; only
changes that affect meaning / behaviour / purposes / third parties / legal
basis / retention / etc.
## File naming
`<doc>-YYYY-MM-DD.md` where `<doc>` is one of `terms`, `privacy`,
`imprint`, and the date matches the `Last updated` line in the
corresponding legal page on the day the snapshot was taken.
## How to render
The snapshots are plain markdown extracted from the TSX source by
stripping JSX tags / attributes and resolving the `operator.*`
placeholders. Same approach as the pbcopy export used during legal
reviews. One-liner (from repo root):
```bash
python3 scripts/render-legal.py <doc> > docs/legal-archive/<doc>-YYYY-MM-DD.md
```
(If `scripts/render-legal.py` doesn't exist yet, the extraction logic is
in the commit that seeded this directory — see PR history.)