## Context Meeting Assistant already supports manual recording starts through hotkeys, HTTP endpoints, and the tray menu. It also reads the current Outlook Classic Teams appointment when a recording starts so meeting artifacts can be enriched with title, attendees, agenda, and scheduled end. This change adds an optional proactive prompt before Teams meetings. The app must not depend on Teams APIs for the primary meeting flow, and Outlook integration remains Windows-only because it uses Outlook Classic COM. ## Goals / Non-Goals **Goals:** - Sync today's Outlook Classic Teams appointments when enabled. - Avoid frequent Outlook COM polling by caching all Teams appointments for the current local day. - Schedule prompt checks from the in-memory cache so back-to-back short meetings can prompt without another Outlook sync. - Reuse the existing native Windows app notification pattern with affirmative and negative actions. - Start recording on acceptance, stopping any active recording through the normal stop path first. **Non-Goals:** - Join, inspect, or control Teams meetings through Teams APIs. - Detect Zoom, Webex, or other meeting providers in this change. - Persist the daily prompt cache across application restarts. - Prompt for meetings from non-Windows builds. ## Decisions ### Use a day cache instead of per-minute Outlook polling Meeting Assistant syncs all Teams appointments for the current local day into memory on a configurable interval, defaulting to 30 minutes. Prompt checks then operate on that cached list. This avoids using Outlook COM as a high-frequency scheduler and supports multiple short meetings close together without requiring a sync between them. The alternative was checking Outlook every minute for due meetings, which is simpler but unnecessarily noisy and risks Outlook responsiveness issues. ### Keep prompt scheduling independent from Outlook sync The hosted scheduler separates `SyncOnceAsync` from due prompt checks. Its runtime loop wakes for the earlier of the next sync or the next cached meeting start. This keeps Outlook interaction slow and bounded while preserving timely prompts. The alternative was a fixed timer that checks both cache and Outlook on the same cadence, which either polls Outlook too often or risks late prompts. ### Use a recording controller adapter over direct coordinator coupling Prompt acceptance is handled through a small adapter over `MeetingRecordingCoordinator`. The adapter exposes current status, normal start, and normal stop. This keeps the prompt scheduler focused on calendar prompt behavior and leaves minimum-duration cleanup, transcription drain, speaker recognition, and summary continuation in the existing coordinator. The alternative was embedding handoff logic in the scheduler, which would duplicate recording lifecycle policy. ### Use Windows-specific adapters for COM and notifications The Outlook calendar provider and meeting-start prompt service are Windows-only implementations behind platform-neutral interfaces. Non-Windows builds register no-op implementations. This preserves cross-target builds and keeps platform-specific packages and COM usage isolated. The alternative was spreading `#if WINDOWS` checks into scheduler logic, which would make the core behavior harder to test. ## Risks / Trade-offs [Missed updates between syncs] -> A meeting created or changed after the last sync may not prompt until the next sync. The default 30-minute sync interval balances freshness against Outlook COM overhead and can be configured lower if needed. [App restart loses prompt memory] -> Prompted appointment keys are in memory only. A restart during the day may allow a meeting to prompt again if it is still in the prompt window. This is acceptable for the first version and avoids persistence complexity. [Outlook COM availability] -> Outlook Classic may be unavailable or slow. Sync failures are logged and retried on the next sync interval without blocking recording controls. [Notification ignored] -> Ignored prompts do not block later prompt checks, but the appointment is marked prompted for the day so the app does not spam repeated notifications. ## Migration Plan The feature is disabled by default. Existing installations keep current manual recording behavior until `CalendarRecordingPrompts:Enabled` is set to `true`. Rollback is disabling `CalendarRecordingPrompts:Enabled` or reverting the change. No data migration is required because the cache is in-memory only. ## Open Questions - Should the prompt cache become persistent if duplicate prompts after app restarts become annoying? - Should future provider detection include Zoom or other meeting links from the same Outlook appointment sync?