From 8687ae28a23659b76bd12a72e7ac6f30eb4a9dde Mon Sep 17 00:00:00 2001 From: Do Siki Date: Tue, 29 Sep 2026 12:14:53 +0200 Subject: [PATCH] docs(openspec): archive MITHOME-112/113 English content change Sync localized legal pages, English translation status, non-destructive AI draft import, validated English legal pages and the admin validation prompt into content-management, and the approved-English-only gate into public-site. Co-Authored-By: Claude Opus 5.5 --- .../.openspec.yaml | 0 .../design.md | 0 .../proposal.md | 0 .../specs/content-management/spec.md | 0 .../specs/public-site/spec.md | 0 .../tasks.md | 0 openspec/specs/content-management/spec.md | 107 ++++++++++++++++++ openspec/specs/public-site/spec.md | 20 ++++ 8 files changed, 127 insertions(+) rename openspec/changes/{english-content-mithome-112-113 => archive/2026-09-29-english-content-mithome-112-113}/.openspec.yaml (100%) rename openspec/changes/{english-content-mithome-112-113 => archive/2026-09-29-english-content-mithome-112-113}/design.md (100%) rename openspec/changes/{english-content-mithome-112-113 => archive/2026-09-29-english-content-mithome-112-113}/proposal.md (100%) rename openspec/changes/{english-content-mithome-112-113 => archive/2026-09-29-english-content-mithome-112-113}/specs/content-management/spec.md (100%) rename openspec/changes/{english-content-mithome-112-113 => archive/2026-09-29-english-content-mithome-112-113}/specs/public-site/spec.md (100%) rename openspec/changes/{english-content-mithome-112-113 => archive/2026-09-29-english-content-mithome-112-113}/tasks.md (100%) diff --git a/openspec/changes/english-content-mithome-112-113/.openspec.yaml b/openspec/changes/archive/2026-09-29-english-content-mithome-112-113/.openspec.yaml similarity index 100% rename from openspec/changes/english-content-mithome-112-113/.openspec.yaml rename to openspec/changes/archive/2026-09-29-english-content-mithome-112-113/.openspec.yaml diff --git a/openspec/changes/english-content-mithome-112-113/design.md b/openspec/changes/archive/2026-09-29-english-content-mithome-112-113/design.md similarity index 100% rename from openspec/changes/english-content-mithome-112-113/design.md rename to openspec/changes/archive/2026-09-29-english-content-mithome-112-113/design.md diff --git a/openspec/changes/english-content-mithome-112-113/proposal.md b/openspec/changes/archive/2026-09-29-english-content-mithome-112-113/proposal.md similarity index 100% rename from openspec/changes/english-content-mithome-112-113/proposal.md rename to openspec/changes/archive/2026-09-29-english-content-mithome-112-113/proposal.md diff --git a/openspec/changes/english-content-mithome-112-113/specs/content-management/spec.md b/openspec/changes/archive/2026-09-29-english-content-mithome-112-113/specs/content-management/spec.md similarity index 100% rename from openspec/changes/english-content-mithome-112-113/specs/content-management/spec.md rename to openspec/changes/archive/2026-09-29-english-content-mithome-112-113/specs/content-management/spec.md diff --git a/openspec/changes/english-content-mithome-112-113/specs/public-site/spec.md b/openspec/changes/archive/2026-09-29-english-content-mithome-112-113/specs/public-site/spec.md similarity index 100% rename from openspec/changes/english-content-mithome-112-113/specs/public-site/spec.md rename to openspec/changes/archive/2026-09-29-english-content-mithome-112-113/specs/public-site/spec.md diff --git a/openspec/changes/english-content-mithome-112-113/tasks.md b/openspec/changes/archive/2026-09-29-english-content-mithome-112-113/tasks.md similarity index 100% rename from openspec/changes/english-content-mithome-112-113/tasks.md rename to openspec/changes/archive/2026-09-29-english-content-mithome-112-113/tasks.md diff --git a/openspec/specs/content-management/spec.md b/openspec/specs/content-management/spec.md index 5ec75fc..64d57ab 100644 --- a/openspec/specs/content-management/spec.md +++ b/openspec/specs/content-management/spec.md @@ -134,6 +134,113 @@ without a manual step. - **WHEN** the migration is executed on already migrated data - **THEN** stored values SHALL remain unchanged +### Requirement: Localized legal pages + +Legal pages SHALL store their title, last-updated text, and section titles and +contents separately per locale. The slug and section identifiers SHALL be shared across +locales. Existing Hungarian legal content SHALL be preserved as the Hungarian value, +including published content and version history. + +#### Scenario: An administrator adds an English privacy policy + +- **WHEN** an administrator edits a legal page in the `en` locale +- **THEN** the Hungarian legal page content SHALL remain unchanged + +#### Scenario: Existing legal page after migration + +- **WHEN** the localized legal page configuration is deployed onto existing data +- **THEN** the Hungarian legal pages SHALL render the same content as before + +### Requirement: English translation status + +Every page global and legal page SHALL carry an English translation status with the +values "no translation", "AI draft awaiting review", and "approved", visible to +administrators with a warning that AI drafts require review. Only an administrator +action SHALL set the status to "approved". + +#### Scenario: AI draft is imported + +- **WHEN** machine-translated English content is imported for a page +- **THEN** that page's status SHALL be "AI draft awaiting review" + +#### Scenario: An administrator approves a translation + +- **WHEN** an administrator sets the status to "approved" and publishes +- **THEN** the page SHALL be marked as having an approved English translation + +### Requirement: Non-destructive AI draft import + +Importing AI-draft English content SHALL only fill English values that are empty and +whose current Hungarian source text is identical to the text that was translated. It +SHALL NOT change Hungarian values, shared values, or existing English values, SHALL +keep placeholders such as `{year}`, `{min}` and `{privacyHref}` intact, and SHALL be +safe to run more than once. + +#### Scenario: Hungarian text changed after translation + +- **WHEN** a Hungarian value differs from the source text in the translation memory +- **THEN** its English value SHALL stay empty and the import SHALL report it + +#### Scenario: An English value was already edited by a person + +- **WHEN** a field already has an English value +- **THEN** the import SHALL leave it unchanged + +### Requirement: Validated English legal pages + +The English translation of a legal page SHALL NOT be set to "approved" unless at least +two distinct language models have reviewed it and their reviews are recorded in the CMS. +Each review record SHALL contain the model name, the review date, the verdict (approve, +approve with changes, reject), and the model's pasted answer. For each model only its +latest review SHALL count, and a model whose latest verdict is "reject" SHALL NOT count. +Reviews SHALL be run with the admin validation prompt, which covers meaning equivalence +with the Hungarian text, data-protection terminology, omissions or additions, and +preserved placeholders. + +#### Scenario: Approving an unvalidated legal translation + +- **WHEN** an administrator sets a legal page's English status to "approved" while fewer + than two distinct models have a complete, non-rejecting latest review +- **THEN** the CMS SHALL reject the save with a validation error + +#### Scenario: Approving a validated legal translation + +- **WHEN** two distinct models each have a complete latest review that does not reject + the translation +- **THEN** the CMS SHALL allow the status to be set to "approved" + +#### Scenario: A rejection is superseded + +- **WHEN** a model rejected the translation and, after corrections, a newer review by the + same model approves it +- **THEN** that model SHALL count towards the required reviews + +#### Scenario: Page globals are not affected + +- **WHEN** an administrator approves the English translation of a page global +- **THEN** no legal validation record SHALL be required + +### Requirement: Legal validation prompt in the admin + +The legal page editor SHALL offer administrators a ready-to-use validation prompt for +the English translation. The prompt SHALL contain the review criteria, the requested +structured output format, and the current Hungarian and English text of every section +of that page, and SHALL be copyable with a single action. The prompt SHALL be generated +from the same template that is used for the project's own model validation. + +#### Scenario: An administrator copies the validation prompt + +- **WHEN** an administrator opens a legal page that has English content and uses the + copy action of the validation prompt panel +- **THEN** the clipboard SHALL contain a prompt with the review criteria and the + Hungarian and English text of each section of the current version + +#### Scenario: No English text yet + +- **WHEN** a legal page has no English content +- **THEN** the panel SHALL state that there is nothing to validate instead of offering + a prompt + ### Requirement: Public partner media The CMS SHALL allow authenticated administrators to manage partner records and image diff --git a/openspec/specs/public-site/spec.md b/openspec/specs/public-site/spec.md index 0ecfdf4..dc4920e 100644 --- a/openspec/specs/public-site/spec.md +++ b/openspec/specs/public-site/spec.md @@ -63,3 +63,23 @@ metadata for the requested locale where page metadata is available. - **WHEN** metadata is generated for a supported page and locale - **THEN** its title and description SHALL use that locale's page content or configured localized fallback text + +### Requirement: Approved English content only + +An English public page SHALL render its English content only when that page's English +translation status is "approved". Otherwise it SHALL render the Hungarian content of the +same page. Routing, navigation labels, and shared values SHALL be unaffected by the +status. + +#### Scenario: English translation is an unapproved AI draft + +- **WHEN** a visitor opens an English page whose translation status is "AI draft + awaiting review" +- **THEN** the page SHALL render the Hungarian content + +#### Scenario: English translation is approved + +- **WHEN** a visitor opens an English page whose translation status is "approved" and + the page is published +- **THEN** the page SHALL render the English values, falling back to Hungarian for any + field without an English value