diff --git a/.ai-specs/PROJECT_CONTEXT.md b/.ai-specs/PROJECT_CONTEXT.md index d558f56..be4491b 100644 --- a/.ai-specs/PROJECT_CONTEXT.md +++ b/.ai-specs/PROJECT_CONTEXT.md @@ -16,6 +16,19 @@ - **Bundle system**: menaion-bundles, lives bundles (month-prefixed + misc split), service templates - **File routing**: CIds with `01`-`12` prefix → month files, else `misc/{first-digit}.json` +### Language Model (UI vs. Content) +- **UI strings**: en/ru/cu via `getTranslations()`; completeness checked by `validate-i18n.ts` +- **Service language** (`serviceLang` in `service-view.ts`): `en → en`, `cu → cu`, **`ru → cu`** — + a Russian interface intentionally renders services in Church Slavonic +- **Service content fallback chain**: `serviceLang → cu → shared` (texts, prayers, headers, + lives, octoechos, templates); `ru/services/` carries only `var/` +- **Scripture inside services** follows the service language: en → `en/bible/kjv`, + cu (and ru) → `cu/bible/elis` +- **Bible reader tab** is independent: 13 translations (incl. `ru/bible/synod`), any UI language +- **Fonts**: the Slavonic font setting applies to liturgical text for cu **and** ru + (`getFontClass()`) +- **Calendar authority**: `cu/menaion-bundle.json`; `{lang}-menaion-bundle.json` overrides + ### Core Scripts - `convert-services.ts` — Service XML to JSON conversion - `enrich-lives.ts` — Fuzzy matching and enrichment pipeline (Chetyi-Minei + Bulgakov) @@ -44,6 +57,9 @@ - **Bundle CIds must exist**: Menaion CIds require corresponding lives entries - **Static data is tracked**: `static/data/` in git (except `scripts/output/minei.json`) - **Validation must pass**: Changes must pass `tsc --noEmit`, `npm run build` +- **Content policies**: service/Bible texts are sourced (never translated), cu text is + verbatim (no normalisation/latinisation), service assembly follows the Typicon — see + `.ai-specs/WORKING_POLICIES.md` ("Liturgical Content Policies") ## Key Script Quick Reference diff --git a/.ai-specs/WORKING_POLICIES.md b/.ai-specs/WORKING_POLICIES.md index bc6ba6e..ff4e8cb 100644 --- a/.ai-specs/WORKING_POLICIES.md +++ b/.ai-specs/WORKING_POLICIES.md @@ -16,6 +16,27 @@ - **Forbidden**: Deleting or renaming CIds without proper validation - **Forbidden**: Changing JSON structure without updating related code +## Liturgical Content Policies + +### Never Translate Service or Bible Texts +- All liturgical and scriptural texts must be **sourced** through the data pipeline + (original-language conversions, Chetyi-Minei, Bulgakov, EPUB/PDF imports, etc.) +- Never machine-translate, paraphrase or invent text — not even "just one line" +- Missing text stays empty (the app falls back `serviceLang → cu → shared`) until its + source is converted + +### Church Slavonic Texts Are Presented Verbatim +- Never "normalise", latinise, transliterate or strip diacritics/accents/titla from cu texts +- Render the text exactly as stored in the source data; display-layer transformations + are forbidden +- Orthography fixes belong in the conversion pipeline and must preserve the source + +### Service Assembly Follows the Typicon +- Service-building logic (templates, ordering, conditional rules, canons) must reproduce + the Typicon +- Whenever service building logic is changed, check the expected structure against the + Typicon (and the pinned service data) before and after the change + ## Validation Requirements ### Pre-Commit Checklist diff --git a/DATA_EN.md b/DATA_EN.md index ae70fe4..2a348ab 100644 --- a/DATA_EN.md +++ b/DATA_EN.md @@ -51,8 +51,8 @@ static/data/ │ ├── menaion/ # Daily menaion entries (366 days) │ ├── calendar/ # Calendar metadata │ └── services/ # Service templates -├── cu/ # Church Slavonic (similar structure) -├── ru/ # Russian (lives, services) +├── cu/ # Church Slavonic (authoritative calendar + service texts) +├── ru/ # Russian (enriched lives; services fall back to cu) ├── el/ # Greek (includes mono/) ├── fr/ # French ├── zh/ # Chinese (includes Hans/, Hant/) diff --git a/DATA_RUS.md b/DATA_RUS.md index 8765664..3509050 100644 --- a/DATA_RUS.md +++ b/DATA_RUS.md @@ -51,8 +51,8 @@ static/data/ │ ├── menaion/ # Ежедневные записи минеи (366 дней) │ ├── calendar/ # Метаданные календаря │ └── services/ # Шаблоны богослужений -├── cu/ # Церковнославянский (аналогичная структура) -├── ru/ # Русский (жития, богослужения) +├── cu/ # Церковнославянский (авторитетный календарь и богослужебные тексты) +├── ru/ # Русский (обогащённые жития; богослужения берутся из cu) ├── el/ # Греческий (включает mono/) ├── fr/ # Французский ├── zh/ # Китайский (включает Hans/, Hant/)