Skip to content

feat: Add persistent SQLite storage and searchable learnings#1

Merged
rohitg00 merged 3 commits intomainfrom
feat/persistent-storage-searchable-learnings
Feb 2, 2026
Merged

feat: Add persistent SQLite storage and searchable learnings#1
rohitg00 merged 3 commits intomainfrom
feat/persistent-storage-searchable-learnings

Conversation

@rohitg00
Copy link
Copy Markdown
Owner

@rohitg00 rohitg00 commented Feb 2, 2026

Summary

  • Add persistent SQLite database with FTS5 full-text search at ~/.pro-workflow/data.db
  • Implement stateless store factory pattern for database operations
  • Add BM25-powered search for learnings with prefix matching and phrase search
  • Update hooks to use database for session tracking
  • Add new commands: /learn, /search, /list
  • Graceful fallback to file-based storage when database unavailable

New Features

Persistent Storage

Learnings now survive reboots, stored in ~/.pro-workflow/data.db

Full-Text Search

/search testing           # Find testing-related learnings
/search "file paths"      # Exact phrase search

Session Analytics

Track edits, corrections, and prompts per session

New Commands

Command Purpose
/learn Save learning to SQLite database
/search <query> Search learnings by keyword
/list List all stored learnings

Files Changed

  • New: src/db/ - Database initialization, store factory, schema
  • New: src/search/fts.ts - BM25 search helpers
  • New: commands/learn.md, search.md, list.md
  • Updated: Hook scripts to use SQLite with file-based fallback
  • Updated: package.json with better-sqlite3 dependency

Test plan

  • Build passes: npm install && npm run build
  • Database initializes at ~/.pro-workflow/data.db
  • Session-start loads learnings from DB
  • Search returns ranked results with BM25
  • Fallback to file-based storage works when dist/ missing

- Add SQLite database with FTS5 full-text search at ~/.pro-workflow/data.db
- Implement stateless store factory pattern for database operations
- Add BM25-powered search for learnings with prefix matching and phrase search
- Update hooks to use database: session-start, session-end, quality-gate, prompt-submit
- Add new commands: /learn, /search, /list for database operations
- Track session analytics: edit count, corrections, prompts
- Add TypeScript source with better-sqlite3 dependency
- Graceful fallback to file-based storage when database unavailable
- Bump version to 1.1.0
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Feb 2, 2026

Warning

Rate limit exceeded

@rohitg00 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 33 minutes and 49 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/persistent-storage-searchable-learnings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

- Fix session update logic with proper fallback tracking
- Change INSERT OR REPLACE to INSERT OR IGNORE for sessions
- Add GitHub Actions workflows and Dependabot config
@rohitg00 rohitg00 merged commit 305fbb4 into main Feb 2, 2026
5 checks passed
@rohitg00 rohitg00 deleted the feat/persistent-storage-searchable-learnings branch February 2, 2026 23:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant