Archive completed meeting assistant changes
PR and Push Build/Test / build-and-test (push) Successful in 9m19s

This commit is contained in:
2026-06-26 13:15:47 +02:00
parent 7d16b0cad7
commit aecef30627
72 changed files with 2914 additions and 406 deletions
@@ -0,0 +1,14 @@
## Why
When several Teams meetings are plausible in Outlook, a standalone "current meeting" lookup can pick the wrong appointment or no appointment. The recording-start notification already represents one specific cached calendar meeting, so accepting that notification should start the recording with that meeting's metadata.
## What Changes
- Carry meeting title, attendees, agenda, and scheduled end in cached calendar prompt candidates.
- Start recordings accepted from a meeting-start notification with the accepted candidate's metadata instead of running a separate Outlook current-meeting lookup.
- Preserve the normal workflow lifecycle events and rules for prompted starts.
- Exclude canceled Outlook appointments from prompt candidates and standalone current-meeting metadata lookup.
## Impact
- Updates the calendar prompt scheduler and recording controller seam.
- Extends Windows Outlook calendar prompt extraction to include metadata already used by meeting notes.
- Filters canceled Outlook appointments before prompting or selecting metadata.
- Adds tests for prompt-supplied metadata and workflow rule execution.
@@ -0,0 +1,120 @@
## MODIFIED Requirements
### Requirement: Outlook Teams meetings can prompt recording start
Meeting Assistant SHALL enable scheduled Outlook Classic calendar checks for recording-start prompts by default.
When scheduled recording prompts are enabled on Windows, Meeting Assistant SHALL periodically read the user's Outlook Classic calendar appointments for the current local day through COM into an in-memory cache.
Meeting Assistant SHALL default the Outlook calendar sync interval to 30 minutes when scheduled recording prompts are enabled.
Meeting Assistant SHALL schedule recording-start prompts from the cached calendar appointments rather than querying Outlook for each prompt.
Meeting Assistant SHALL consider Teams appointments from Outlook calendar data as initial prompt candidates. The detection MAY be extended later for other meeting providers.
Meeting Assistant SHALL exclude canceled Outlook appointments from recording-start prompt candidates.
When a Teams appointment reaches its scheduled start window, Meeting Assistant SHALL show a native Windows app notification asking whether to record the meeting, with affirmative and negative actions.
On Windows, the recording-start notification SHALL request reminder-style toast behavior and remain actionable for 5 minutes.
Meeting Assistant SHALL prompt at most once per calendar appointment during a local day, regardless of whether the user accepts, declines, or ignores the notification.
If the user accepts the recording prompt while no recording is active, Meeting Assistant SHALL start a new recording normally.
If the user accepts the recording prompt while another recording is active, Meeting Assistant SHALL stop the active recording normally and then start the prompted meeting recording.
When stopping an active recording for an accepted prompt, Meeting Assistant SHALL use the normal stop path so empty or too-short recordings are removed according to existing settings and other completed recordings continue normal transcription, speaker recognition, and summary processing.
When the user accepts a recording prompt, Meeting Assistant SHALL start the recording with the accepted cached appointment's metadata and SHALL NOT perform a separate current-meeting metadata lookup for that prompted start.
Prompted-start metadata SHALL include the accepted appointment title, attendees, agenda, and scheduled end when those values are available from the cached appointment.
Prompted starts SHALL run the normal meeting workflow `created` rules before applying the accepted appointment metadata.
After `created` rules run, prompted starts SHALL apply the accepted appointment metadata and then run the normal `collecting metadata` to `transcribing` state-transition workflow rules with that metadata available in the meeting note.
#### Scenario: Teams meeting start prompts the user
- **GIVEN** scheduled Outlook recording prompts are enabled
- **AND** Meeting Assistant has synced Outlook Classic Teams appointments for today
- **WHEN** the appointment reaches its scheduled start window
- **THEN** Meeting Assistant shows a native Windows app notification asking whether to record the meeting
- **AND** the notification remains actionable for 5 minutes
- **AND** marks that appointment as prompted for the day
#### Scenario: Canceled Teams meeting does not prompt recording
- **GIVEN** scheduled Outlook recording prompts are enabled
- **AND** Meeting Assistant has synced a canceled Outlook Classic Teams appointment for today
- **WHEN** the canceled appointment reaches its scheduled start window
- **THEN** Meeting Assistant does not show a recording prompt for that appointment
#### Scenario: Back-to-back cached Teams meetings prompt without another Outlook sync
- **GIVEN** scheduled Outlook recording prompts are enabled
- **AND** Meeting Assistant has synced two Teams appointments for today that start ten minutes apart
- **WHEN** each appointment reaches its scheduled start window
- **THEN** Meeting Assistant shows a recording prompt for each appointment
- **AND** does not require another Outlook calendar sync between the prompts
#### Scenario: User accepts prompt while idle
- **GIVEN** scheduled Outlook recording prompts are enabled
- **AND** no meeting recording is active
- **WHEN** the user accepts a Teams meeting recording prompt
- **THEN** Meeting Assistant starts recording normally
#### Scenario: User accepts prompt while already recording
- **GIVEN** scheduled Outlook recording prompts are enabled
- **AND** a meeting recording is active
- **WHEN** the user accepts a Teams meeting recording prompt
- **THEN** Meeting Assistant stops the active recording normally
- **AND** starts a new recording normally after the stop request
#### Scenario: Accepted prompt supplies meeting metadata
- **GIVEN** scheduled Outlook recording prompts are enabled
- **AND** Meeting Assistant has cached two current Teams appointments with different metadata
- **WHEN** the user accepts the recording prompt for one appointment
- **THEN** Meeting Assistant starts the recording with the accepted appointment's metadata
- **AND** does not perform a standalone current-meeting metadata lookup for that recording
- **AND** runs `created` workflow rules before writing the cached appointment metadata
- **AND** runs `collecting metadata` to `transcribing` workflow rules after writing the cached appointment metadata
#### Scenario: Prompt is disabled
- **GIVEN** scheduled Outlook recording prompts are disabled
- **WHEN** a Teams appointment reaches its scheduled start
- **THEN** Meeting Assistant does not query Outlook for recording prompt candidates
- **AND** does not show a recording prompt
### Requirement: Windows Outlook enrichment is optional
Meeting Assistant SHALL gate Outlook Classic COM enrichment behind the Windows compilation target.
When the Windows build starts a meeting and Outlook Classic has exactly one current Teams appointment, Meeting Assistant SHALL copy the appointment title to the meeting note and copy the appointment agenda and scheduled end time to the assistant-context frontmatter.
Meeting Assistant SHALL exclude canceled Outlook appointments from current Teams appointment metadata lookup.
Meeting Assistant SHALL copy the appointment attendees to the meeting note only when the raw appointment attendee count is less than or equal to the configured `Recording:MaxMetadataAttendeeImportCount`. The default maximum SHALL be 30 attendees.
The agenda SHALL be extracted from the appointment body content before the Teams join separator or Teams join text.
#### Scenario: Current Teams appointment enriches meeting artifacts
- **WHEN** a Windows build starts a meeting while Outlook Classic exposes exactly one current Teams appointment
- **THEN** Meeting Assistant uses the appointment subject as the meeting title
- **AND** writes the appointment attendees into meeting note frontmatter when the raw attendee count is within the configured import limit
- **AND** writes the appointment agenda into assistant-context frontmatter
- **AND** writes the appointment end time as `scheduled_end` into assistant-context frontmatter
#### Scenario: Canceled appointment is ignored during metadata lookup
- **GIVEN** Outlook Classic exposes one canceled current Teams appointment
- **AND** Outlook Classic exposes one active current Teams appointment at the same time
- **WHEN** a Windows build starts a meeting
- **THEN** Meeting Assistant selects the active appointment metadata
#### Scenario: Oversized attendee list is not imported
- **GIVEN** the configured metadata attendee import limit is 30
- **WHEN** a Windows build starts a meeting while Outlook Classic exposes exactly one current Teams appointment with 31 attendees
- **THEN** Meeting Assistant uses the appointment subject as the meeting title
- **AND** does not write the appointment attendees into meeting note frontmatter
- **AND** writes the appointment agenda into assistant-context frontmatter
- **AND** writes the appointment end time as `scheduled_end` into assistant-context frontmatter
#### Scenario: Outlook is unavailable or ambiguous
- **WHEN** Outlook Classic is unavailable or more than one current Teams appointment is found
- **THEN** Meeting Assistant starts the recording with the default generated meeting title and empty agenda
- **AND** omits `scheduled_end` from assistant-context frontmatter
@@ -0,0 +1,6 @@
- [x] 1. Add OpenSpec scenario for prompt-accepted metadata.
- [x] 2. Add failing behavior coverage for prompted metadata starts.
- [x] 3. Pass prompted metadata through the scheduler/controller/coordinator start path.
- [x] 4. Populate cached Outlook prompt candidates with metadata.
- [x] 5. Exclude canceled Outlook appointments from recording prompts and metadata lookup.
- [x] 6. Run focused tests, full tests, and `openspec validate use-prompted-calendar-metadata --strict`.