Skip to content

feat(foundation): reference resolver with EN + ZH support #2

@MiaoDX

Description

@MiaoDX

Area: foundation Depends on: #1

What

Parse a free-form scripture reference into a canonical
(tradition, work, ref) tuple. Must handle the variants from plan.md §8.1.
Includes the full test suite — not split out — because the resolver is only
trustworthy if its tests cover the matrix.

Acceptance criteria

  • Parses Bible: John 3:16, Jn 3:16, 1 John 3:16, 约翰福音 3:16, 约翰一书 3:16
  • Parses Tao Te Ching: dao 11, daodejing chapter 11, 道德经 11, 道德经第十一章
  • Parses Heart Sutra: sutra heart, 心经, 般若波罗蜜多心经
  • Parses Quran: Quran 2:255, 2:255, Surah Al-Baqarah 255
  • Returns canonical Reference{Tradition, Work, Book?, Chapter, VerseStart, VerseEnd?}
  • Ambiguous input (e.g. bare 3:16 with no tradition context) returns a typed error listing candidates
  • Table-driven tests with ≥ 50 inputs across all 4 traditions, both languages, plus negatives

Notes

This is the hardest "small" module in the project. Don't over-engineer with
NLP — a per-tradition lookup table of aliases is enough.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions