query
Search the RAG database
Workflow
- Load config via shared/config-loader.md
- Determine database:
- If --book given → look for config.default_output_dir/{slug}/rag/book.db
- Without --book → use config.unified_db (~/.reading-assistant/library.db)
- If DB not found → ERROR: "No RAG database found. Run /read:index first."
- Run query:
python ${CLAUDE_PLUGIN_ROOT}/scripts/rag_index.py query "<db_path>" "<question>" <top_k> - Display results formatted as:
- Book title, chapter, text snippet (150 chars), relevance score