Skip to main content

Knowledge > Runbooks > Content Ops > Generate Illustrations for a Scripture Passage

Generate Illustrations for a Scripture Passage

Generate new sermon illustrations targeted at a specific scripture passage. Use this when a pastor searches ITW for a passage and finds no results, or when filling gaps in scripture coverage.

Prerequisites

  • Access to sermon-illustrations/scripts/ directory
  • Claude CLI (claude -p) available in the shell
  • Supabase MCP or direct DB access (to verify gaps and insert results)
  • Target scripture reference (e.g., "John 3:16", "Romans 8", "Psalm 23")

Steps

  1. Check what already exists for the target passage:

    SELECT id, title, content, theological_lens_id, created_at
    FROM unified_rag_content
    WHERE category = 'illustration'
    AND scripture_reference ILIKE '%John 3:16%'
    AND is_public = true;

    Note which theological lenses are already covered — generate for the missing ones.

  2. Identify which lenses to target:

    SELECT id, name, tradition FROM sai_theological_lenses ORDER BY name;

    For a core passage (John 3:16, Psalm 23, Romans 8:28), aim for illustrations across at least 5–6 lenses including universal. For a more specific passage, universal plus 2–3 major traditions is sufficient.

  3. Navigate to the scripts directory:

    cd /c/dev/sermon-illustrations
  4. Unset Claude CLI env vars before spawning:

    unset CLAUDE_CODE_ENTRYPOINT
    unset CLAUDECODE
  5. Run the scripture generation script:

    node scripts/generate-by-scripture.mjs \
    --passage "John 3:16" \
    --lenses "universal,reformed,wesleyan,catholic" \
    --count 2

    This generates 2 illustrations per lens for the specified passage. Adjust --count based on coverage needs.

  6. Review the generated illustrations before inserting:

    • Verify the illustration actually relates to the specified passage.
    • Check that the quoted or referenced scripture text is accurate.
    • Confirm each lens interpretation is theologically consistent with that tradition.
    • Target length: 300–700 words per illustration.
  7. Insert approved illustrations:

    INSERT INTO unified_rag_content (
    category, title, content, scripture_reference,
    theological_lens_id, topic_tags, is_public, source, created_at, updated_at
    ) VALUES (
    'illustration',
    '[Generated Title]',
    '[Reviewed illustration text]',
    'John 3:16',
    [lens_id],
    ARRAY['love', 'salvation', 'eternal-life'],
    true,
    'generated',
    now(),
    now()
    );
  8. Verify the illustration appears in ITW search: Search for the passage on illustratetheword.com/illustrations and confirm the new illustrations appear in results.

Coverage Targets

Passage TypeMinimum Coverage
Core passages (John 3:16, Psalm 23, etc.)10+ illustrations across multiple lenses
Common sermon passages4–6 illustrations (universal + major traditions)
Specific epistles or prophetic passages2–3 illustrations (universal + 1–2 lenses)

Verification

SELECT theological_lens_id, COUNT(*) as count
FROM unified_rag_content
WHERE category = 'illustration'
AND scripture_reference ILIKE '%[passage]%'
AND is_public = true
GROUP BY theological_lens_id
ORDER BY count DESC;

At least one is_public = true illustration per targeted lens.

See Also