# Role Pack: Executive Assistant

CLI-based office assistance: email triage, calendar management, meeting prep, and document handling.

## Overview

The EA role handles communication and scheduling from the terminal. Two approaches:

- **Mature Linux stack** — `msmtp`/`notmuch`/`mbsync`/`vdirsyncer`. 20+ years of proven email on Linux. No vendor lock-in, no API costs, works with any IMAP/SMTP server. The real, reliable path.
- **Managed API stack** — `nylas` CLI. Convenience: single tool for email+calendar+contacts, OAuth built-in. Trade-off: account required, free-tier limits, dependency on their service.

For calendar, Google Calendar API via `xh`/`curl` with a service account is most pragmatic for G Suite users. For open-source sync, `vdirsyncer` + `calcurse`.

## Tools

### Mature Linux Email (recommended)

| Tool           | Install                  | Purpose                                             | Link                                                                     |
| -------------- | ------------------------ | --------------------------------------------------- | ------------------------------------------------------------------------ |
| **msmtp**      | `apt install msmtp`      | SMTP client, send via any server                    | [github.com/mjml-io/msmtp](https://github.com/mjml-io/msmtp)             |
| **notmuch**    | `apt install notmuch`    | Index + search + tag email, fast on large mailboxes | [notmuchmail.org](https://notmuchmail.org)                               |
| **mbsync**     | `apt install isync`      | IMAP sync (offlineimap replacement)                 | [isync.github.io](https://isync.github.io)                               |
| **vdirsyncer** | `pip install vdirsyncer` | CalDAV/CardDAV sync                                 | [github.com/pimutils/vdirsyncer](https://github.com/pimutils/vdirsyncer) |
| **mu**         | `apt install mu`         | Maildir indexer + search (notmuch alternative)      | [diego.net/@ext/mu](https://diego.net/@ext/mu)                           |

### Managed API

| Tool      | Install                              | Purpose                             | Link                                                                           |
| --------- | ------------------------------------ | ----------------------------------- | ------------------------------------------------------------------------------ |
| **nylas** | `brew install nylas/nylas-cli/nylas` | Unified email+calendar+contacts CLI | [nylas.com/docs/overview/nylas-cli](https://nylas.com/docs/overview/nylas-cli) |

> **Critical:** Nylas CLI is a thin wrapper around the Nylas API. Free tier = 2 accounts. CLI changes frequently. For production, the mature stack is more reliable.

### Document Processing

| Tool        | Install               | Purpose                               | Link                                                                   |
| ----------- | --------------------- | ------------------------------------- | ---------------------------------------------------------------------- |
| **pandoc**  | `apt install pandoc`  | Convert docx/pdf/html/md/epub/latex   | [pandoc.org](https://pandoc.org)                                       |
| **docling** | `pip install docling` | Parse complex PDFs (tables, formulas) | [ds4sd.github.io/docling](https://ds4sd.github.io/docling)             |
| **glow**    | `brew install glow`   | Markdown in terminal                  | [github.com/charmbracelet/glow](https://github.com/charmbracelet/glow) |
| **gum**     | `brew install gum`    | Confirmation prompts                  | [github.com/charmbracelet/gum](https://github.com/charmbracelet/gum)   |
| **age**     | `apt install age`     | File encryption                       | [github.com/FiloSottile/age](https://github.com/FiloSottile/age)       |
| **jq**      | `apt install jq`      | JSON parsing                          | —                                                                      |

## Workflows

### Inbox Triage

```bash
# Mature stack
notmuch search tag:unread --output=files | head -20
notmuch show id:<message-id>
notmuch tag -unread +read +filed id:<message-id>

# Nylas
nylas email list --unread --limit 20 --json | jq '[.[] | {from: .from[0].email, subject: .subject, date: .date}]'
```

### Draft + Send

```bash
# Mature stack (msmtp)
cat << EOF | msmtp --tls on recipient@example.com
From: me@example.com
To: recipient@example.com
Subject: Re: Project update

Body here.
EOF

# Nylas
cat /tmp/draft.md | nylas email send --to recipient@example.com --subject "Subject" --body - --yes
```

### Calendar

```bash
# Nylas
nylas calendar events list --days 7 --json
nylas calendar freebusy --participants "alice@co.com" --days 7 --json

# Google Calendar API (use gcloud auth or a service account)
# gcloud auth application-default print-access-token | xh GET -h "Authorization: Bearer AUTH_TOKEN" "https://www.googleapis.com/calendar/v3/calendars/primary/events" | jq '.items[]'
```

### Documents

```bash
pandoc input.docx -t markdown -o output.md
docling input.pdf -o output.md --format markdown
glow output.md
age -r public.key sensitive.docx
```

## SKILL.md

```yaml
---
name: executive-assistant
description: >
  Executive assistant: email triage, calendar management, meeting prep,
  document handling. Activate for inbox, email, calendar, schedule, meeting,
  draft, briefing, follow-up, admin tasks.
version: "2.0.0"
---

# Executive Assistant

Manage the user's communication, schedule, and documents from the terminal.

## Behavior

- Never send email without explicit confirmation
- Write in the user's voice (see ~/ea/voice-guide.md if it exists)
- Show context before acting (the email thread, the calendar conflict)
- Flag sensitive content (salary, legal, personal data) before processing
- On auth failure, tell the user how to re-auth

## Workflows

- **Inbox triage** — List unread, classify by urgency, propose responses for urgent items
- **Draft reply** — Read thread → draft /tmp/draft-<id>.md → glow preview → confirm → send
- **Calendar** — List events → check freebusy → present options → create event (confirm timezone)
- **Meeting prep** — Get event details → look up attendees → search recent email threads → generate briefing
- **Daily briefing** — Overnight unread + today's calendar + extracted deadlines → one-page markdown

## Safety

- No email sent without user confirmation
- No deletions without explicit approval
- Flag: salary, legal, credentials, personal data
```

## Market Context

What's actually established:

| Solution                     | Status            | Link                                                                                                       |
| ---------------------------- | ----------------- | ---------------------------------------------------------------------------------------------------------- |
| **Amazon Quick**             | Shipping (AWS)    | Slack/Teams/Outlook integration, cross-tool search. [aws.amazon.com/quick](https://aws.amazon.com/quick/)  |
| **Gemini Agent**             | Shipping (Google) | Web browsing + Google apps. [gemini.google](https://gemini.google/us/overview/agent/)                      |
| **ChatGPT Workspace Agents** | Shipping (OpenAI) | Shared cloud agents. [openai.com](https://openai.com/so-DJ/index/introducing-workspace-agents-in-chatgpt/) |
| **Box AI Agents**            | Shipping (Box)    | Enterprise document review. [box.com/agents](https://www.box.com/agents)                                   |
| **Nerova Marketplace**       | Shipping          | Agent marketplace (support, sales, ops). [nerova.ai/marketplace](https://nerova.ai/marketplace)            |

Most agent marketplace "email/calendar skills" are thin SKILL.md files wrapping the same APIs these CLIs access. The real differentiator is toolchain maturity, not the skill file.

## Composition

- → **Researcher** for meeting prep context
- → **Developer** for technical documents or data visualization

## Setup

```bash
# Mature stack
apt install msmtp notmuch isync
pip install vdirsyncer

# Or nylas
curl -fsSL https://cli.nylas.com/install.sh | bash && nylas init

# Document tools (both stacks)
brew install gum glow pandoc age
pip install docling
```
