# Assistive Writing Workflow

## Visual Workflow

```
1. ENABLE ASSISTIVE WRITING
   ┌─────────────────────────┐
   │ Toggle "Assistive       │
   │ Writing" ON (blue)      │
   └─────────────────────────┘
              │
              ▼

2. START WRITING
   ┌─────────────────────────┐
   │ Type at least 5 words   │
   │ in the text area        │
   └─────────────────────────┘
              │
              ▼

3. WAIT FOR AI ANALYSIS
   ┌─────────────────────────┐
   │ Wait 5 seconds          │
   │ AI analyzes your text   │
   └─────────────────────────┘
              │
              ▼

4. RECEIVE FIRST SUGGESTION
   ┌─────────────────────────┐
   │ Suggestion card appears │
   │ near your cursor        │
   │                         │
   │ [Accept] [Dismiss]      │
   └─────────────────────────┘
              │
              ▼

5. AFTER FIRST SUGGESTION
   ┌─────────────────────────┐
   │ "Continue writing"      │
   │ prompt appears          │
   │                         │
   │ [Continue writing]      │
   │ [Dismiss]               │
   └─────────────────────────┘
              │
              ▼

6. MANUAL SUGGESTIONS
   ┌─────────────────────────┐
   │ Click "Continue writing"│
   │ to get more suggestions │
   │ (saves costs)           │
   └─────────────────────────┘
```

## Step-by-Step Process

### Phase 1: Initial Setup
1. **Enable Feature** → Toggle switch turns blue
2. **Start Writing** → Type 5+ words
3. **Wait** → 5-second delay for AI processing

### Phase 2: First Suggestion
4. **Receive Suggestion** → Card appears with:
   - Suggested text
   - Confidence score
   - Source links
   - Accept/Dismiss buttons

### Phase 3: Ongoing Usage
5. **Accept or Dismiss** → Choose your action
6. **Continue Writing** → Manual trigger for more suggestions
7. **Repeat** → Use "Continue writing" as needed

## Key Points

### Automatic vs Manual
- **Automatic:** Only the first suggestion (after 5 words + 5 seconds)
- **Manual:** All subsequent suggestions (click "Continue writing")

### Cost Control
- Prevents excessive API calls
- Gives you control over when to get suggestions
- Respects daily limits (50 suggestions/day)

### User Experience
- Suggestions appear near your cursor
- Clear accept/dismiss options
- Source verification available
- Professional LinkedIn-style content

## Error Handling

```
If you see an error:
┌─────────────────────────┐
│ Check the error message │
│                         │
│ Common errors:          │
│ • "API quota exceeded"  │
│ • "No relevant sources" │
│ • "Service not available"│
└─────────────────────────┘
              │
              ▼
┌─────────────────────────┐
│ Follow troubleshooting  │
│ steps in user guide     │
└─────────────────────────┘
```

## Success Indicators

✅ **Working Correctly:**
- Toggle is blue when enabled
- Suggestions appear after 5 words + 5 seconds
- Source links are clickable
- "Continue writing" button appears after first suggestion

❌ **Needs Attention:**
- No suggestions after 10+ words
- Error messages in suggestion cards
- Toggle not staying blue
- Suggestions not appearing near cursor

---

*This workflow ensures cost-effective, user-controlled AI assistance for LinkedIn content creation.*
