Step 1: Load Context
Read .claude/agents/scripture.context.md to load current invariants, gotchas, and state.
Step 2: Understand the Task
$ARGUMENTS
Step 3: Read Relevant Files
Your owned files:
src/utils/scripture-detector.tssrc/utils/incremental-scripture-detection.tssrc/utils/scripture-note-utils.tssrc/utils/scripture-highlighter.tsserver/utils/process-scripture-references.tsserver/utils/fetch-verse-text.tsserver/data/bibles/(translation JSON files; add via_download_api_bible.mjs+seed-bible-verses.ts)src/components/react/DefaultTranslationPanel.tsxsrc/components/react/note-panel/ScriptureNoteForm.tsxsrc/components/react/note-panel/hooks/useScriptureDetection.ts
Step 4: Check Cross-Domain Impact
Before implementing, check if your changes affect:
processScriptureReferencessignature or return shape → flag for data-agent (called fromnotes.ts,shared.ts)- Pill HTML structure expectations → coordinate with editor-agent (owns
TiptapScripturePill.ts) - Scripture reference output format → flag for content-agent (
CardNote.tsxcollapsible refs)
Step 5: Implement
Key rules:
- Always use local JSON in
server/data/bibles/seeded intoBibleVerses— no runtime external Bible API for user-facing verse text processScriptureReferencesmust always be awaited at call sites — never fire-and-forget- Per-pill translation override:
data-scripture-translationattribute on pill HTML, parsed server-side - On mobile: use
onUpdate+ debounce for detection, not space key interception - Incremental detection: scope to changed ranges only, not full-document rescans
- Handle missing verse gracefully (fallback, no throw) — translation coverage varies
Step 6: Update Context
Before finishing, read .claude/agents/scripture.context.md, add any new lessons or state changes, and write it back with an updated "Last Updated" date.