summaryrefslogtreecommitdiff
path: root/docs/superpowers/specs
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-07-27 20:01:50 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-07-27 20:01:50 +0200
commit0dd76139abf2e9a0f1ec362424d68ba8ae5d8c8f (patch)
tree7831da3872dd71af8f9fdac6a418a1140624ea70 /docs/superpowers/specs
parent0e82fa3e5544ac6c534acc297491a87a361ccd97 (diff)
downloadlectio-0dd76139abf2e9a0f1ec362424d68ba8ae5d8c8f.tar.gz
lectio-0dd76139abf2e9a0f1ec362424d68ba8ae5d8c8f.zip
docs: tighten national-bibles spec (defer psalm_system application)
psalm_system becomes stored+validated metadata only; per-corpus psalm numbering application is deferred to the future psalm-readings work (offline lectionary has no psalm parts yet, so wiring now would be dead code). Testing updated for reading_lang + the deferred psalter.
Diffstat (limited to 'docs/superpowers/specs')
-rw-r--r--docs/superpowers/specs/2026-07-27-lectio-national-bibles-design.md9
1 files changed, 4 insertions, 5 deletions
diff --git a/docs/superpowers/specs/2026-07-27-lectio-national-bibles-design.md b/docs/superpowers/specs/2026-07-27-lectio-national-bibles-design.md
index daad3aa..96b61f9 100644
--- a/docs/superpowers/specs/2026-07-27-lectio-national-bibles-design.md
+++ b/docs/superpowers/specs/2026-07-27-lectio-national-bibles-design.md
@@ -74,9 +74,9 @@ Built-in corpora gain their own sidecars (`vul.ini`, `drb.ini`, `grb.ini`, `wuj.
- The existing `latinFallback = "vul"` mechanism in `readingLine` is unchanged and still covers per-verse gaps in whatever corpus is chosen.
- **Behaviour:** `reading_lang = fr` auto-selects a `lang = fr` corpus — any language, not just pl/en. Leaving `reading_lang` empty makes the reading language follow `ui_language`. A dropped-in corpus declaring `lang = pl` (e.g. a corrected Wujek) auto-serves Polish users with **zero config** as soon as `reading_lang` or `ui_language` is `pl`, superseding the `vul` fallback. `traditional_lang` is never consulted.
-### 5. Psalm versification
+### 5. Psalm versification (metadata now; application deferred)
-`internal/psalter` already maps psalm citations for `vulgate`/`drb` systems (used today via a hard-coded per-version switch). Change: the reading-render path passes the *selected corpus's* `psalm_system` (from its metadata) into the psalter mapping instead of a hard-coded table, and `hebrew` is added as the identity (no-shift) case. This fixes Vulgate-vs-Hebrew mismatches generically (the concrete `wuj` psalm-numbering problem), and lets a user corpus declare its own system.
+Each corpus declares `psalm_system` in its sidecar, and the validator checks the value is one of `vulgate`/`hebrew`/`drb`. Actual *application* — mapping a psalm citation's numbering to the corpus's system at render time — is **deferred**: the offline lectionary currently carries only Epistle + Gospel (no psalm/gradual/tract parts), the offline render path (`readingLine` → `bible.Lookup`) does not run the `convert.go` psalm mapping at all, so building per-corpus psalm mapping now would be dead code (YAGNI). The metadata is captured so corpora are fully described and the hazard is recorded; the numbering application lands with the future psalm-readings work, which revisits `internal/bible/convert.go`'s `psalmRef` system switch (today `vulgate`/`drb`, to gain `hebrew`). This is where the concrete `wuj` Hebrew-vs-Vulgate mismatch gets resolved.
### 6. Validation — `lectio --corpus-check <code>`
@@ -104,9 +104,8 @@ Runs against a code resolvable from either the embed or the user dir (also accep
## Testing Approach
- `internal/bible`: table tests for glob-embed loading, user-dir override precedence, metadata parsing (valid/missing/malformed sidecar), and `ReadingCorpus` resolution order.
-- `internal/config`: `reading_version` round-trips through INI read/render; resolver defaults.
-- `internal/cli`: `--corpus-check` on fixtures — a clean corpus, one with an unknown book, one with a verse gap, one missing a sidecar — asserting messages and exit codes; `--json` shape.
-- `internal/psalter`: `hebrew` identity mapping; per-corpus system selection.
+- `internal/config`: `reading_lang` and `reading_version` round-trip through INI read/render; `ReadingCorpus()` resolution order (explicit version, reading_lang match, ui_language match, empty).
+- `internal/cli`: `--corpus-check` on fixtures — a clean corpus, one with an unknown book, one with a verse gap, one missing a sidecar, one with a bad `psalm_system` value — asserting messages and exit codes; `--json` shape.
- Makefile: `check-corpora` passes for all shipped corpora (guards regressions in the built-in sidecars).
- Fixtures live under `internal/bible/testdata/corpora/`, tiny (a few books), not full bibles.