Skip to content

feat(sutta-studio): Trimśikā (Vasubandhu's Thirty Verses) with named translation witnesses - #197

Open
anantham wants to merge 6 commits into
mainfrom
feat/codex-trimsika
Open

anantham wants to merge 6 commits into
mainfrom
feat/codex-trimsika

Conversation

@anantham

@anantham anantham commented Nov 9, 2026

Copy link
Copy Markdown
Owner

Adds Vasubandhu's Triṃśikā as a Sutta Studio packet, and the named-witness reader that it needs.

  • 43d2211: a named translation-witness contract and validator.
  • 0b912f0: reading the Sanskrit source and choosing a witness in the reader.
  • 59e205a: the Trimśikā packet.
  • 0620722 / 8cc17db: the /sutta/trimsika route, its library entry after MN10, and the registry test count.
  • 328cb8f: WORKLOG and tech-debt notes.

Licences: Lévi's 1925 Sanskrit edition is public domain. The Lapis Lazuli translation is CC0.

Known findings from review (not yet fixed)

  • Medium: SuttaStudioView.tsx:37-38 validates every witness at once, so one bad witness can block the others.
  • Low: one MN10 sentence was cut.

The branch was rebased onto main, and the build passes. The one vitest timeout also happens on main. Not yet checked in a browser.

🤖 Generated with Claude Code

anantham and others added 6 commits November 5, 2026 16:31
Context: an alternate lexical gloss is not another translator. Published
witnesses keep their own wording and numbering, so a separate contract
is needed rather than more senses.
Changes: packet-local translations catalog (types/suttaStudioWitness.ts)
with attribution/licence metadata, immutable passages and explicit
span alignments (half-open code-point offsets, contiguous source token
spans, relation/status/evidence/review). validateWitnesses checks
coverage-exactly-once, grapheme-safe boundaries, dangling anchors and
honest status/relation combinations. DeepLoomPacket gains optional
source.language ('pli' | 'sa'), title, 'local-edition' provider,
ghost layoutWordId and packet-specific provenance notes; all additive.
Tests: synthetic cross-verse, many-to-many, RTL, Unicode and failure cases.
ADR: docs/adr/SUTTA-015-named-translation-witnesses.md

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…the reader

Changes: Sanskrit packets (source.language 'sa') get a Devanagari/akshara
reading tooltip derived from IAST with an exact reverse-match guard
(unsupported spellings stay IAST), keyboard/tap disclosure instead of
sense cycling on source words, and wrapping for long compounds.
TranslationControls selects language and named witness for the whole
reading (per-language memory, attribution/licence disclosure, original
order view); WitnessReading places phrase mappings once at their display
anchor, links other covered groups, and only draws arrows for asserted
(aligned) mappings. Language labels in About/Lens/Legend follow the
packet instead of hard-coding Pali; MN10 copy is preserved behind its
workId. Removes a duplicate DOM id on the word wrapper.
Impact: legacy packets without translations render as before.
Tests: TranslationWitness.test.tsx, sanskritReading.test.ts.
ADR: SUTTA-015

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Context: all 30 verses of the Trimsika-vijnaptimatrata, following the
MN10 DeepLoom packet workflow.
Changes: data/trimsika holds the normalized IAST root verses (Levi 1925
edition, public domain; GRETIL compared only, not imported), original
unreviewed AI-assisted English glosses/notes, an original AI-assisted
Malayalam working translation (99 phrase mappings), and the Lapis
Lazuli Texts English-from-Chinese witness (publisher page marks it
CC0 1.0; text preserved verbatim, 109 provisional mappings).
scripts/build-trimsika.ts deterministically assembles
content/references/sutta/trimsika.json (307 words, 102 groups).
Provenance, emendation (v13) and open questions are disclosed in
data/trimsika/provenance.json and docs/sutta-studio/curation/trimsika.md.
Impact: content is explicitly unreviewed; scholarly review pending.
Tests: tests/data/trimsika*.test.ts, Trimsika*.test.tsx.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Changes: lazy local loader for the trimsika packet, tolerant trailing
slash on /sutta/<uid>, a built-in library entry, and NovelLibrary
routing for sutta-trimsika.
Tests: registryService.test.ts checks the entry and its review disclosure.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…debt

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Context: after rebasing onto main, the Trimsika built-in entry sat ahead
of MN10, breaking six count/index assertions in
tests/integration/registry.test.ts that expect MN10 first.
Changes: move the entry after MN10; update counts and indices to include
Trimsika alongside The Occasion; record the review in WORKLOG.
Tests: tests/integration/registry.test.ts, tests/services/registryService.test.ts pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
lexicon-forge Ready Ready Preview Nov 9, 2026 6:15am UTC

This branch was successfully deployed

1 active deployment
Preview — 8cc17dbb Deployed Nov 5, 2026 by vercel[bot]
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