Knowledge > Runbooks > Content Operations
Content Operations Runbooks
Procedures for managing IllustrateTheWord (ITW) illustration content and the product_knowledge table that is injected into all AI agent prompts at runtime.
Architecture Summary
All content is stored in unified_rag_content (327K rows). ITW illustrations use category='illustration'. Church-specific FAQ content uses category='church_kb'. The dir_illustrations Supabase view is a read-only snapshot — never write to it directly.
- Codebase:
C:\dev\sermon-illustrations\ - Scripts:
sermon-illustrations/scripts/ - Content generation: Always use
claude -pCLI, never the Anthropic API directly - External APIs: TMDB (
$TMDB_API_KEY), Unsplash ($UNSPLASH_ACCESS_KEY) - Theological lenses: 18 rows in
sai_theological_lenses(17 traditions + universal)
Critical Rule: Claude CLI for Batch Generation
All batch content generation scripts MUST use claude -p (Claude CLI). The founder pays $200/mo for Claude Max — using the Anthropic API directly for batch jobs wastes money and duplicates cost.
Before running any script that spawns Claude CLI internally, delete these env vars:
unset CLAUDE_CODE_ENTRYPOINT
unset CLAUDECODE
Runbooks
| Runbook | When to Use |
|---|---|
| add-illustrations.md | Add new illustrations to the ITW database |
| regenerate-stubs.md | Regenerate incomplete or stub illustrations |
| generate-by-scripture.md | Generate illustrations for a scripture passage |
| generate-by-topic.md | Generate illustrations by topic or theme |
| generate-lens-content.md | Generate content for a specific theological lens |
| illustration-images.md | Add or update illustration images |
| audit-content.md | Audit content quality and identify gaps |
| update-product-knowledge.md | Update runtime knowledge injected into agent prompts |
Key Tables
| Table | Purpose |
|---|---|
unified_rag_content | All content (327K rows). NEVER bulk delete. |
sai_theological_lenses | 18 theological traditions used for lens filtering |
product_knowledge | Runtime agent knowledge — changes take effect immediately |
dir_illustrations | Read-only view of illustrations (do NOT write here) |
Safety Rules
- NEVER bulk-delete from
unified_rag_content— setis_public=falseto hide instead. - Always paginate with
.range()— Supabase has a 1000-row default limit. - ONE production Supabase — there is no staging database. All writes are live.