How AI Email Context retrieves structured knowledge at runtime to produce context-aware drafts


The Design Problem

General-purpose AI can write emails, but it doesn't know who you're writing to, what you agreed on last week, or how you usually sign off. The result: drafts that are technically correct but require heavy editing — often more work than writing from scratch.

The brute-force solution — pasting all your context into every prompt — is expensive, slow, and doesn't scale past a handful of contacts. AI Email Context solves this with a structured retrieval layer: instead of the user providing context, the system pulls the right data from Notion at runtime based on what it's doing and who it's writing to.


System Overview

The system is a Cowork skill — a structured prompt harness running inside Claude's desktop client — connected to two external services via MCP (Model Context Protocol) connectors:

Five operational modes run against the same context layer, each scoped to a specific task: Draft (contextual reply generation), Inbox Scan (triage and prioritization), Daily Briefing (morning summary), Decision Extraction (logging commitments from threads), and Resource Scanner (indexing new files and links into the knowledge base).


The Five Context Sources

Each mode retrieves only the context it needs. The context layer consists of five Notion-backed data sources:

Contacts Database — One record per person. Fields include contact type (client, vendor, internal), communication history, relationship notes, and associated projects. This is the primary routing layer — the system uses it to determine who an email is from, what context to load, and whether to draft a reply.

Tone Profile — A written style guide describing how I actually write, not a set of formatting rules. Personality descriptors ("writes like someone who knows what they're talking about but doesn't need to prove it") produce noticeably different output than the embedded six-line summary used for non-drafting modes. Only loaded for Draft mode.

Decision Log — A structured database of key decisions across projects. Entries include decision text, date, client, confidence level, and source. The system references these so drafts can mention what was agreed without the user restating it.

Email Examples — Real sent emails used as few-shot style references. These anchor the AI's understanding of voice beyond the Tone Profile's descriptive text.

Skill Log — A record of every run: which mode, which contacts were processed, which context sources were used, and any errors or warnings. This creates an audit trail for iteration and debugging.