Public Access
Add transcript line workflow rules
PR and Push Build/Test / build-and-test (push) Failing after 13m27s
PR and Push Build/Test / build-and-test (push) Failing after 13m27s
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
schema: spec-driven
|
||||
created: 2026-06-03
|
||||
@@ -0,0 +1,23 @@
|
||||
# Design: Transcript write workflow rules
|
||||
|
||||
## Approach
|
||||
Meeting Assistant should keep transcript redaction policy in the local workflow rules file instead of hard-coding it in the Azure Speech provider. The provider still emits the text it receives from Azure, and the persistence path asks the workflow engine to transform the formatted transcript line before writing it.
|
||||
|
||||
The workflow engine will add a `transcript_line` trigger. The event carries the formatted line without a trailing newline and the effective speaker name used in that line. Conditions receive `transcript.line` and `transcript.speaker`; Razor templates receive `Model.Transcript.Line` and `Model.Transcript.Speaker`.
|
||||
|
||||
The existing `set_property` step is extended with `transcript.line`. This keeps the action surface small while enabling replacements such as:
|
||||
|
||||
```yaml
|
||||
steps:
|
||||
- uses: set_property
|
||||
property: transcript.line
|
||||
value: '@Model.Transcript.Line.Replace("*****", "[redacted]")'
|
||||
```
|
||||
|
||||
## Write Path
|
||||
Live transcript appends and finished transcript rewrites both format `TranscriptionSegment` values into single transcript lines, pass each line through the workflow engine, and then write the transformed lines. This prevents a final diarization rewrite from reintroducing untransformed masked text.
|
||||
|
||||
## Constraints
|
||||
- Transcript line rules do not mutate meeting-note frontmatter unless they also include existing meeting-note steps.
|
||||
- The transcript line model represents one formatted line, not the whole transcript file.
|
||||
- The local rules file remains ignored by git; repository documentation covers the rule shape, while the user-specific redaction rule lives in `meeting-rules.local.yaml`.
|
||||
@@ -0,0 +1,15 @@
|
||||
# Change: Add transcript write workflow rules
|
||||
|
||||
## Why
|
||||
Azure Speech can emit masked profanity as `*****`. In markdown transcript files, that token can be interpreted as formatting instead of normal transcript text, which makes the generated transcript harder to read and summarize.
|
||||
|
||||
## What Changes
|
||||
- Add a workflow trigger for transcript line writes.
|
||||
- Expose the formatted transcript line and speaker name to workflow conditions and Razor step templates.
|
||||
- Allow workflow rules to set the transcript line before it is appended or rewritten.
|
||||
- Add a default local rule that replaces `*****` with `[redacted]`.
|
||||
|
||||
## Impact
|
||||
- Extends the meeting workflow engine event model.
|
||||
- Routes live transcript appends and finished transcript rewrites through the workflow engine before writing lines.
|
||||
- Updates workflow documentation and rule validation.
|
||||
+81
@@ -0,0 +1,81 @@
|
||||
## MODIFIED Requirements
|
||||
|
||||
### Requirement: Meeting automation rules support lifecycle triggers
|
||||
Meeting Assistant SHALL support rule triggers for `created`, `state_transition`, `speaker_identified`, and `transcript_line`.
|
||||
|
||||
A `state_transition` trigger MAY filter by `from`, `to`, or both state values.
|
||||
|
||||
A `speaker_identified` trigger MAY filter by speaker name.
|
||||
|
||||
A `transcript_line` trigger MAY filter by speaker name.
|
||||
|
||||
#### Scenario: State transition rule matches from and to
|
||||
- **GIVEN** a configured rule that triggers on a state transition from `collecting metadata` to `transcribing`
|
||||
- **WHEN** Meeting Assistant transitions that meeting from `collecting metadata` to `transcribing`
|
||||
- **THEN** it applies the rule steps
|
||||
|
||||
#### Scenario: Speaker identified rule filters by name
|
||||
- **GIVEN** a configured rule that triggers when speaker `Ada` is identified
|
||||
- **WHEN** Meeting Assistant identifies speaker `Grace`
|
||||
- **THEN** it does not apply the rule
|
||||
- **WHEN** Meeting Assistant identifies speaker `Ada`
|
||||
- **THEN** it applies the rule steps
|
||||
|
||||
#### Scenario: Transcript line rule rewrites masked profanity before persistence
|
||||
- **GIVEN** a configured rule that triggers on transcript line writes and sets `transcript.line` by replacing `*****` with `[redacted]`
|
||||
- **WHEN** Meeting Assistant writes a transcript line for speaker `Guest-1` containing `*****`
|
||||
- **THEN** the written transcript line contains `[redacted]`
|
||||
- **AND** the written transcript line does not contain `*****`
|
||||
|
||||
### Requirement: Meeting automation rules support conditions and steps
|
||||
Meeting Assistant SHALL support rule conditions using an expression engine.
|
||||
|
||||
Rules SHALL support nested `and`, `or`, and `not` condition groups.
|
||||
|
||||
Step values SHALL support Razor syntax against the current meeting event model.
|
||||
|
||||
Step values SHALL treat `@` characters inside valid email address tokens as literal text rather than Razor transitions.
|
||||
|
||||
Meeting Assistant SHALL expose the formatted transcript line and transcript speaker to `transcript_line` rule conditions and Razor step templates.
|
||||
|
||||
Meeting Assistant SHALL support these initial rule steps:
|
||||
|
||||
- `add_attendee`
|
||||
- `remove_attendee`
|
||||
- `set_property`
|
||||
- `add_context`
|
||||
- `add_project`
|
||||
|
||||
The `set_property` step SHALL support setting `transcript.line` during `transcript_line` events.
|
||||
|
||||
#### Scenario: Nested conditions choose a matching rule
|
||||
- **GIVEN** a configured rule with nested `and`, `or`, and `not` conditions over meeting title, attendees, and event data
|
||||
- **WHEN** the condition evaluates to true
|
||||
- **THEN** Meeting Assistant applies the rule
|
||||
- **WHEN** the condition evaluates to false
|
||||
- **THEN** Meeting Assistant skips the rule
|
||||
|
||||
#### Scenario: Templated context mentions identified speaker
|
||||
- **GIVEN** a configured `speaker_identified` rule with an `add_context` step using Razor syntax
|
||||
- **WHEN** Meeting Assistant identifies matching speaker `Ada`
|
||||
- **THEN** it appends rendered context text containing `Ada` to the assistant context note
|
||||
|
||||
#### Scenario: Email addresses do not trigger Razor templating
|
||||
- **GIVEN** a configured rule step value containing `Support@contoso.com`
|
||||
- **WHEN** the rule runs
|
||||
- **THEN** Meeting Assistant preserves the email address as literal text
|
||||
|
||||
#### Scenario: Email addresses can appear beside Razor templating
|
||||
- **GIVEN** a configured rule step value containing both `Support@contoso.com` and a Razor expression
|
||||
- **WHEN** the rule runs
|
||||
- **THEN** Meeting Assistant renders the Razor expression and preserves the email address as literal text
|
||||
|
||||
#### Scenario: Rule can clean a meeting title
|
||||
- **GIVEN** a configured state-transition rule that matches a title containing a configured marker
|
||||
- **WHEN** the rule runs
|
||||
- **THEN** Meeting Assistant can update the meeting title through `set_property`
|
||||
|
||||
#### Scenario: Transcript line conditions can use the written line and speaker
|
||||
- **GIVEN** a configured `transcript_line` rule with conditions over `transcript.line` and `transcript.speaker`
|
||||
- **WHEN** Meeting Assistant writes a transcript line that matches both conditions
|
||||
- **THEN** it applies the rule steps before the line is persisted
|
||||
@@ -0,0 +1,11 @@
|
||||
## 1. Implementation
|
||||
- [x] 1.1 Add OpenSpec delta requirements for transcript line workflow rules.
|
||||
- [x] 1.2 Extend workflow triggers, condition parameters, template model, and `set_property` support for transcript lines.
|
||||
- [x] 1.3 Route live transcript appends and finished transcript rewrites through transcript line workflow transformation.
|
||||
- [x] 1.4 Add the local profanity redaction rule.
|
||||
- [x] 1.5 Update workflow engine documentation and configuration docs.
|
||||
|
||||
## 2. Verification
|
||||
- [x] 2.1 Add behavior coverage for transcript line trigger matching, conditions, templating, and line mutation.
|
||||
- [x] 2.2 Run focused workflow/recording tests.
|
||||
- [x] 2.3 Run `openspec validate add-transcript-write-workflow-rules --strict`.
|
||||
@@ -179,12 +179,14 @@ Meeting Assistant SHALL expose a diagnostic endpoint that reloads application co
|
||||
- **AND** future workflow events use the reloaded workflow automation configuration
|
||||
|
||||
### Requirement: Meeting automation rules support lifecycle triggers
|
||||
Meeting Assistant SHALL support rule triggers for `created`, `state_transition`, and `speaker_identified`.
|
||||
Meeting Assistant SHALL support rule triggers for `created`, `state_transition`, `speaker_identified`, and `transcript_line`.
|
||||
|
||||
A `state_transition` trigger MAY filter by `from`, `to`, or both state values.
|
||||
|
||||
A `speaker_identified` trigger MAY filter by speaker name.
|
||||
|
||||
A `transcript_line` trigger MAY filter by speaker name.
|
||||
|
||||
#### Scenario: State transition rule matches from and to
|
||||
- **GIVEN** a configured rule that triggers on a state transition from `collecting metadata` to `transcribing`
|
||||
- **WHEN** Meeting Assistant transitions that meeting from `collecting metadata` to `transcribing`
|
||||
@@ -197,6 +199,12 @@ A `speaker_identified` trigger MAY filter by speaker name.
|
||||
- **WHEN** Meeting Assistant identifies speaker `Ada`
|
||||
- **THEN** it applies the rule steps
|
||||
|
||||
#### Scenario: Transcript line rule rewrites masked profanity before persistence
|
||||
- **GIVEN** a configured rule that triggers on transcript line writes and sets `transcript.line` by replacing `*****` with `[redacted]`
|
||||
- **WHEN** Meeting Assistant writes a transcript line for speaker `Guest-1` containing `*****`
|
||||
- **THEN** the written transcript line contains `[redacted]`
|
||||
- **AND** the written transcript line does not contain `*****`
|
||||
|
||||
### Requirement: Meeting automation rules support conditions and steps
|
||||
Meeting Assistant SHALL support rule conditions using an expression engine.
|
||||
|
||||
@@ -206,6 +214,8 @@ Step values SHALL support Razor syntax against the current meeting event model.
|
||||
|
||||
Step values SHALL treat `@` characters inside valid email address tokens as literal text rather than Razor transitions.
|
||||
|
||||
Meeting Assistant SHALL expose the formatted transcript line and transcript speaker to `transcript_line` rule conditions and Razor step templates.
|
||||
|
||||
Meeting Assistant SHALL support these initial rule steps:
|
||||
|
||||
- `add_attendee`
|
||||
@@ -214,6 +224,8 @@ Meeting Assistant SHALL support these initial rule steps:
|
||||
- `add_context`
|
||||
- `add_project`
|
||||
|
||||
The `set_property` step SHALL support setting `transcript.line` during `transcript_line` events.
|
||||
|
||||
#### Scenario: Nested conditions choose a matching rule
|
||||
- **GIVEN** a configured rule with nested `and`, `or`, and `not` conditions over meeting title, attendees, and event data
|
||||
- **WHEN** the condition evaluates to true
|
||||
@@ -241,6 +253,11 @@ Meeting Assistant SHALL support these initial rule steps:
|
||||
- **WHEN** the rule runs
|
||||
- **THEN** Meeting Assistant can update the meeting title through `set_property`
|
||||
|
||||
#### Scenario: Transcript line conditions can use the written line and speaker
|
||||
- **GIVEN** a configured `transcript_line` rule with conditions over `transcript.line` and `transcript.speaker`
|
||||
- **WHEN** Meeting Assistant writes a transcript line that matches both conditions
|
||||
- **THEN** it applies the rule steps before the line is persisted
|
||||
|
||||
### Requirement: Workflow rules and speaker identities can be edited through a tray-launched assistant
|
||||
Meeting Assistant SHALL expose an `Edit rules and identities` item from the tray icon menu.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user