diff --git a/hooks/scripts/summarize-transcript.py b/hooks/scripts/summarize-transcript.py index 29e75ce..694f2c0 100755 --- a/hooks/scripts/summarize-transcript.py +++ b/hooks/scripts/summarize-transcript.py @@ -378,6 +378,29 @@ def main(): log(f"Summarization complete: {total_added} total items added") + # Reindex RAG if we added items + if total_added > 0: + log("Triggering RAG reindex...") + try: + reindex_result = subprocess.run( + [ + str(Path.home() / ".claude/skills/rag-search/venv/bin/python"), + str(Path.home() / ".claude/skills/rag-search/scripts/index_personal.py"), + "--quiet" + ], + capture_output=True, + text=True, + timeout=120 + ) + if reindex_result.returncode == 0: + log("RAG reindex completed successfully") + else: + log(f"RAG reindex failed: {reindex_result.stderr[:200]}") + except subprocess.TimeoutExpired: + log("RAG reindex timed out after 120s") + except Exception as e: + log(f"RAG reindex error: {e}") + if __name__ == "__main__": main()