Skip to content

Add daily journal feature with FTS5 unified search#1

Open
Sean-Koval wants to merge 1 commit intomainfrom
feat/daily-journal
Open

Add daily journal feature with FTS5 unified search#1
Sean-Koval wants to merge 1 commit intomainfrom
feat/daily-journal

Conversation

@Sean-Koval
Copy link
Copy Markdown
Owner

Summary

  • Adds a freeform daily journal (Journal + JournalEntry models) for capturing thoughts, decisions, and ideas throughout the day
  • Implements FTS5 virtual table (content_fts) for unified full-text search across journal entries, notes, and work log entries
  • Adds 9 CLI subcommands (sb journal add/body/summary/show/list/edit/delete/search/stats) and 7 MCP tools

Changes

File What
tools/journal.py New — 7 MCP tool factories with Pydantic input models
db/models.py Journal + JournalEntry tables, FTS5 table in init_db
db/operations.py JournalOps (CRUD) + FTSOps (FTS5 search/backfill)
storage/markdown.py Journal markdown create/read/append/rebuild
storage/indexer.py Dual-storage coordination for journals + FTS5
config.py journals_dir property + ensure_directories()
mcp_server.py 7 journal tool registrations
cli.py journal Click group with 9 subcommands

Test plan

  • All 43 existing tests pass (no regressions)
  • sb journal add "test" --tags test creates entry in DB + markdown
  • sb journal show displays entries with timestamps
  • sb journal body/summary updates day-level metadata
  • sb journal list shows table of recent journals
  • sb journal edit/delete modifies/removes entries
  • sb journal search "query" returns FTS5 results across content types
  • sb journal stats shows tag frequency and project breakdown
  • Markdown file at data/journals/YYYY-MM-DD.md with proper frontmatter

🤖 Generated with Claude Code

Adds a freeform daily journal for capturing thoughts, decisions, and ideas
throughout the day, with full-text search across all content types.

New: tools/journal.py (7 MCP tools + Pydantic models)
Modified: models.py (Journal/JournalEntry tables + FTS5 virtual table),
operations.py (JournalOps + FTSOps), markdown.py (journal file ops),
indexer.py (dual-storage coordination), config.py (journals dir),
mcp_server.py (7 tool registrations), cli.py (9 subcommands)

CLI: sb journal add/body/summary/show/list/edit/delete/search/stats
MCP: create_journal_entry, update_journal, get_journal, get_journals,
     update_journal_entry, delete_journal_entry, search_all_content

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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