# TwinMind Core Workflow B: Action Items & Follow-ups
## Overview
Secondary workflow for extracting action items, automating follow-ups, and integrating with task management systems.
## Prerequisites
- Completed `twinmind-core-workflow-a` (transcription)
- Valid transcript or summary available
- Integration tokens for external services (optional)
## Instructions
### Step 1: Extract Action Items
```typescript
// src/workflows/action-items.ts
import { getTwinMindClient } from '../twinmind/client';
export interface ActionItem {
id: string;
text: string;
assignee?: string;
dueDate?: string;
priority?: 'high' | 'medium' | 'low';
context?: string;
status: 'pending' | 'completed';
}
export interface ActionItemExtractionOptions {
includeContext?: boolean;
assignFromSpeakers?: boolean;
inferDueDates?: boolean;
maxItems?: number;
}
export class ActionItemExtractor {
private client = getTwinMindClient();
async extractFromTranscript(
transcriptId: string,
options: ActionItemExtractionOptions = {}
): Promise
{
const response = await this.client.post('/extract/action-items', {
transcript_id: transcriptId,
include_context: options.includeContext ?? true,
assign_from_speakers: options.assignFromSpeakers ?? true,
infer_due_dates: options.inferDueDates ?? true,
max_items: options.maxItems || 20,
});
return response.data.action_items.map((item: any) => ({
id: item.id,
text: item.text,
assignee: item.assignee,
dueDate: item.due_date,
priority: this.inferPriority(item),
context: item.context,
status: 'pending',
}));
}
private inferPriority(item: any): 'high' | 'medium' | 'low' {
const text = item.text.toLowerCase();
if (text.includes('urgent') || text.includes('asap') || text.includes('critical')) {
return 'high';
}
if (text.includes('important') || text.includes('soon')) {
return 'medium';
}
return 'low';
}
async categorizeItems(items: ActionItem[]): Promise