Features
Calendar & Planning — Commitments Made Intelligent
Not just a calendar view. The Calendar Agent understands commitments, links them to tasks/clients, and powers the “What should I do now?” engine.
Calendar as Intelligence, Not Just View
Beginner: Calendar vs Commitment
Traditional calendar shows “Meeting at 4pm”. DLRS shows: “Meeting at 4pm for Website Redesign — 2 unfinished tasks, 1 waiting approval, pricing doc linked. Review before call.” It's context, not just time.
UI: /w/[workspace]/calendar — month/week/day view + Today briefing. Data: calendar_events table per workspace.
Sync — OAuth & Fetch
Connect
Settings → Integrations → Calendar → OAuth (Google). Redirect /api/integrations/calendar/callback saves encrypted token in vault.
Initial Sync
Route: POST /api/integrations/calendar/sync
- Fetch events via Google Calendar API (next 30 days)
- Store calendar_events { id, workspace_id, title, starts_at, ends_at, attendees, location, description }Incremental
Job every 15m: fetch delta via syncToken. Also creates automation_rules trigger calendar.event_created.
Commitment Graph
Event: "Client call — Website Redesign" at 2025-12-03 16:00
Linked:
- Project: Website Redesign (via title/client map)
- Tasks: 3 outstanding (Update pricing, Review copy, Fix SEO)
- Waiting: 1 (client approval on pricing.pdf)
- Files: Drive folder "Website-Redesign"
Assistant says before meeting: "You have 3 tasks for this client. Review pricing.pdf."
Keywords: commitment graph = event ↔ project ↔ task ↔ fileDaily Planning & Briefing
Cron: 0 8 * * 1-5 → Reminder Agent:
"Good morning! Today:
🔴 Due today: GB reel (export pending), XYZ pricing
🟠 Due soon: Tanniaqua post (Friday)
🟡 Waiting: GB — waiting for photos (3 days)
🟢 Completed: 2 tasks yesterday
What's your focus today?"Generates via lib/agents/orchestrator.ts analyzing tasks where due_date = today + calendar_events today.
Next-Best-Action Scoring
Ask “What should I do now?” in Assistant (/w/[workspace]/assistant):
Scoring same as Task priority + time:
- Due today + assets available + 45m estimate + no blocks → score 88 → recommend "Do GB Reel now"
Explanation: "Why? Due today, client waiting, assets ready, 45m, no dependencies."
Implementation: lib/domain/planning.ts → nextBestAction(workspaceId)Database & Tips
calendar_events {
id, workspace_id, external_id, title, description,
starts_at, ends_at, all_day, attendees: json, location, status
}
Indexes: workspace_id, starts_atBeginner Tips
- Add client name to calendar titles: “GB Banquet — call” links better.
- Keep one calendar per workspace for simplicity; multi-calendar sync supported via multiple integrations.