Skip to content

feat: 規約の本文と同意の版の比較を @lumorphia/legal に足す - #17

Merged
t1nyb0x merged 2 commits into
developfrom
feat/legal
Oct 9, 2026
Merged

t1nyb0x merged 2 commits into
developfrom
feat/legal

Conversation

@t1nyb0x

@t1nyb0x t1nyb0x commented Oct 9, 2026

Copy link
Copy Markdown
Member

lumorphia/scenote の ADR-0006 の順番の 5 番目 (ADR-0008)。

  • parseLegalDocument: 本文の frontmatter から版 (メジャー.マイナー) と改定日を読む
  • renderLegalMarkdown: Markdown を HTML に (marked、生の HTML はエスケープ)
  • formatUpdatedAt: 改定日を「2026 年 10 月 9 日」に
  • needsReconsent(accepted, current): 同意した版と今の版のメジャー番号が違えば再同意。同意した版は組 ({ terms, privacy } か null) で受け取る。accounts のように 2 列で持つサービスでも使える
  • formatConsentVersion / parseConsentVersion: prismtone の 1 列の形 ("terms=1.0;privacy=1.0")
  • 画面でも本文を表示するので Node API を使わない (ESLint で縛り、tooling のテストで確かめる)。ファイルの読み込みと同意の記録はサービスが持つ

中身は prismtone の packages/shared/src/constants/legal-version.ts と apps/app/web/lib/legal.ts から移した。prismtone の載せ替えは公開後に別の PR で。accounts は、再同意を作るときに載せ替える。

テスト 17 件 (版の比較・本文・tooling) を先に書いて落ちるのを確かめた。lint・format・typecheck・test:coverage (241 passed)・build。

パッケージを足したので、develop → main で manifest がコンフリクトする (AGENTS.md の release ブランチの手順で解く)。

🤖 Generated with Claude Code

t1nyb0x and others added 2 commits October 9, 2026 23:23
lumorphia/prismtone の docs/legal の読み取りと表示 (frontmatter、marked で生の HTML を通さない)、
改定日の表記、同意した版と今の版の比較 (メジャー番号が違えば再同意) を移す。同意した版は組で
受け取り、記録の形はサービスが決める。画面でも動くよう Node API を使わない。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@t1nyb0x
t1nyb0x merged commit 10b3267 into develop Oct 9, 2026
3 checks passed
@t1nyb0x
t1nyb0x deleted the feat/legal branch October 9, 2026 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant