Skip to content

Verse checks: verify every Scripture reference before an answer shows - #4

Merged
EricCJaffe merged 1 commit into
mainfrom
feat/verse-checks
Nov 24, 2026
Merged

EricCJaffe merged 1 commit into
mainfrom
feat/verse-checks

Conversation

@EricCJaffe

Copy link
Copy Markdown
Owner

Approved item 1 of 5 (gospelandai burst, Eric 2026-11-24 10:39 "Approve all").

What

  • lib/verses.js: parses chapter:verse references (bible-passage-reference-parser, MIT) and checks them against real versification.
    • Real refs → verses: [{ref, osis, url}] on the meta line (Bible Gateway link).
    • Non-existent refs (John 3:99, Psalm 151:1) → flagged inline: "(reference not found; please check it)".
    • Case-sensitive book names and chapter:verse only, so "mark 2 points" / "is 70 years" / "5:30 pm" are untouched.
  • api/chat.js: answer streams a paragraph at a time through a gate; nothing reaches the reader unchecked. Cached answers re-checked on serve (idempotent). Prompt asks for Book Chapter:Verse citations.
  • Meta gains verses (additive; existing clients ignore it). UI rendering of the verse list is not in this PR.

Tests

npm test: 27 pass (6 new).

Background-job checklist

Not applicable: no job, timer, poller or script; request-path code only.

🤖 Generated with Claude Code

https://claude.ai/code/session_014chyvEAoEJdmVTcdhLm3Hk

Answers now stream a paragraph at a time; each paragraph is checked against
real Bible versification (bible-passage-reference-parser) before release.
References that exist go to the meta line with a Bible Gateway link; ones that
do not (John 3:99, Psalm 151:1) are flagged inline. Cached answers are
re-checked on serve. Prompt asks for Book Chapter:Verse citations.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014chyvEAoEJdmVTcdhLm3Hk
@EricCJaffe
EricCJaffe merged commit 1e801fe into main Nov 24, 2026
1 check passed
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