feat: internal calendar, RAG scoping, and project summarization #9

Merged
bvandeusen merged 0 commits from dev into main 2026-03-25 18:45:43 -04:00
bvandeusen commented 2026-03-25 18:23:59 -04:00 (Migrated from git.fabledsword.com)

Summary

  • Internal calendar storeevents table with full CRUD, AI tools, /calendar view (FullCalendar v6), EventSlideOver component reused in chat tool cards and HomeView dashboard widget
  • RAG scopingconversations.rag_project_id three-value system (NULL=orphan-only default, -1=all, positive=project); orphan-only is now the default for all conversations so project notes don't pollute general chat
  • LLM scope toolssearch_projects (SequenceMatcher scoring on title+description+auto_summary) and set_rag_scope (persists to DB mid-conversation, SSE done event notifies frontend); scope chip above chat input pulses on model-driven change
  • Project summarization background jobgenerate_project_summary() via Ollama stored in projects.auto_summary; backfill at startup; triggered on project updates and note saves (debounced 1h)
  • Briefing pipeline — includes today's internal events alongside CalDAV events
  • Documentationdocs/architecture.md and docs/features.md updated for calendar, RAG scoping, and all new data model columns

Migrations

  • 0029caldav_uid, color on events table
  • 0030conversations.rag_project_id, projects.auto_summary, projects.summary_updated_at

Test plan

  • Run alembic upgrade head — both migrations apply cleanly
  • Chat with orphan notes (no project) — RAG auto-injects correctly
  • Chat scoped to a project — only that project's notes appear in context
  • Scope chip shows correct label on load; updates on selection
  • set_rag_scope tool call mid-conversation — chip pulses, scope persists on reload
  • /calendar — create, edit, delete events; month/week/day views
  • Event tool call cards in chat are clickable and open EventSlideOver
  • HomeView upcoming events widget shows today + 7 days
## Summary - **Internal calendar store** — `events` table with full CRUD, AI tools, `/calendar` view (FullCalendar v6), `EventSlideOver` component reused in chat tool cards and HomeView dashboard widget - **RAG scoping** — `conversations.rag_project_id` three-value system (NULL=orphan-only default, -1=all, positive=project); orphan-only is now the default for all conversations so project notes don't pollute general chat - **LLM scope tools** — `search_projects` (SequenceMatcher scoring on title+description+auto_summary) and `set_rag_scope` (persists to DB mid-conversation, SSE done event notifies frontend); scope chip above chat input pulses on model-driven change - **Project summarization background job** — `generate_project_summary()` via Ollama stored in `projects.auto_summary`; backfill at startup; triggered on project updates and note saves (debounced 1h) - **Briefing pipeline** — includes today's internal events alongside CalDAV events - **Documentation** — `docs/architecture.md` and `docs/features.md` updated for calendar, RAG scoping, and all new data model columns ## Migrations - `0029` — `caldav_uid`, `color` on events table - `0030` — `conversations.rag_project_id`, `projects.auto_summary`, `projects.summary_updated_at` ## Test plan - [ ] Run `alembic upgrade head` — both migrations apply cleanly - [ ] Chat with orphan notes (no project) — RAG auto-injects correctly - [ ] Chat scoped to a project — only that project's notes appear in context - [ ] Scope chip shows correct label on load; updates on selection - [ ] `set_rag_scope` tool call mid-conversation — chip pulses, scope persists on reload - [ ] `/calendar` — create, edit, delete events; month/week/day views - [ ] Event tool call cards in chat are clickable and open EventSlideOver - [ ] HomeView upcoming events widget shows today + 7 days
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bvandeusen/FabledScribe#9