Migrate conversation search to use PERSONAL_SUPERPOWERS_DIR

Updates conversation indexing and search to use the new personal superpowers
directory structure with environment variable support.

Changes:
- Added src/paths.ts for centralized directory resolution
- Updated db.ts, indexer.ts, verify.ts to use paths.ts
- Created migrate-to-config.sh for data migration from ~/.clank
- Updated all documentation references from ~/.clank to ~/.config/superpowers
- Database paths automatically updated during migration

Migration tested with 5,017 conversations and 6,385 exchanges.
This commit is contained in:
Jesse Vincent
2025-10-10 17:14:40 -07:00
parent 6c0ab4cfec
commit a48a7e5b1b
8 changed files with 203 additions and 35 deletions

View File

@@ -25,7 +25,7 @@ Index, archive, and maintain conversations for search.
- **Semantic search** across all past conversations
- **AI summaries** (Claude Haiku with Sonnet fallback)
- **Recovery modes** (verify, repair, rebuild)
- **Permanent archive** at `~/.clank/conversation-archive/`
- **Permanent archive** at `~/.config/superpowers/conversation-archive/`
## Setup
@@ -89,7 +89,7 @@ Handles existing hooks gracefully (merge or replace). Runs in background after e
**Summaries failing:**
- Check API key: `echo $ANTHROPIC_API_KEY`
- Check logs in ~/.clank/conversation-index/
- Check logs in ~/.config/superpowers/conversation-index/
- Try manual: `./index-conversations --session <uuid>`
**Search not finding results:**
@@ -101,7 +101,7 @@ Handles existing hooks gracefully (merge or replace). Runs in background after e
To exclude specific projects from indexing (e.g., meta-conversations), create:
`~/.clank/conversation-index/exclude.txt`
`~/.config/superpowers/conversation-index/exclude.txt`
```
# One project name per line
# Lines starting with # are comments
@@ -115,10 +115,10 @@ export CONVERSATION_SEARCH_EXCLUDE_PROJECTS="project1,project2"
## Storage
- **Archive:** `~/.clank/conversation-archive/<project>/<uuid>.jsonl`
- **Summaries:** `~/.clank/conversation-archive/<project>/<uuid>-summary.txt`
- **Database:** `~/.clank/conversation-index/db.sqlite`
- **Exclusions:** `~/.clank/conversation-index/exclude.txt` (optional)
- **Archive:** `~/.config/superpowers/conversation-archive/<project>/<uuid>.jsonl`
- **Summaries:** `~/.config/superpowers/conversation-archive/<project>/<uuid>-summary.txt`
- **Database:** `~/.config/superpowers/conversation-index/db.sqlite`
- **Exclusions:** `~/.config/superpowers/conversation-index/exclude.txt` (optional)
## Technical Details