---
feature_id: FTR-40
title: Email Topic Discovery
category: Legal
optional: true
depends_on: [FTR-39]
source: Not from Project_Kickoff_Seed_Prompt_v2.3.md — supplied directly by the user, drafted from real production use in the Cascades UOA (CUOA) Offboarding Response project, 2026-09-19. No corresponding item in Bootstrap_Function_Registry.md. See coverage_report.md Section 10.
registry_refs: []
---

# Email Topic Discovery

Depends on: [FTR-39 — EML Archiver (Base Capability)](../items/eml-archiver.md)

## What this is
A repeatable process for **topic-scoped email discovery**: given a scope — a search term, one or more domains, or a specific person — find every matching email across one or more mailboxes, capture each message's ID, and hand off to FTR-39's own retrieval/archive mechanics for the actual fetch and filing. This feature nests under FTR-39's section on install rather than duplicating its retrieval methods.

Typical triggers: a dispute or transition where "what did we actually send/receive" needs to be provable; a quick topic/keyword discovery across a mailbox; building an evidentiary record that has to survive being handed to an outside party.

The core deliverable of a run is: a folder of numbered, chronologically-ordered `.eml` files (via FTR-39), a folder of companion text sidecars plus extracted attachments, and one descriptor file for the run itself recording the scope, method, and sources.

## Assess first
- Confirm FTR-39 (EML Archiver) is installed — this feature nests under it, not beside it.
- Get the scope written down in plain language before starting: search term, domain(s), person, and which source mailbox(es).
- Check for an existing archive to reconcile against, by Internet Message-ID, so re-running a scope never produces duplicates.

## Ask, only if needed
- If the scope isn't already stated precisely: "What's the scope — a search term, a domain, a specific person, or some combination? And which mailbox(es) should be searched?"
- If more than one mailbox is in play, confirm whether results should be merged into one archive or kept per-mailbox.

## Write

### Defining a "scope"
A scope is whatever bounds the discovery — always one or a combination of: search term (keyword/phrase, subject/body match), domain(s) (everything to/from a given domain), person (everything to/from a specific address), source mailbox(es) (which mailbox(es) are being searched — there can be more than one, with results merged). Write the scope down in plain language before starting — this becomes the descriptor's Scope field.

### The process pipeline
1. **Search** each source mailbox for messages matching the scope.
2. **Capture the ID** of every match — prefer the mail system's durable, cross-tool identifier (for Office 365/Outlook this is the RFC822 Internet Message-ID header, stable across Graph, OWA, and raw MIME; don't rely on a provider-internal item ID alone).
3. **Reconcile** against anything already archived (dedupe by Internet Message-ID) so re-running a scope, or combining multiple mailboxes/searches, never produces duplicate archive entries.
4. **Fetch** each new match as a byte-authentic `.eml` — via FTR-39's Method A or Method B.
5. **Archive**: copy the `.eml` files into a numbered, chronological sequence (oldest → newest by the email's own Date header); generate a text sidecar + extracted attachments per email, sharing the same ID number, per FTR-39's naming conventions.
6. **Describe the run**: write one descriptor file recording the scope, method, sources, and counts (see below).

### The run descriptor
Every run of this process gets **one descriptor file**, alongside its archive output, recording: Scope (the search term/domain(s)/person that defined this run, in plain language), Sources (which mailbox(es) were searched), Method(s) used (which of FTR-39's Method A/B/C, per source), Date range covered, Counts (messages found, archived, errors/skips), and Run date.

A template plus a worked example is included as this feature's own supporting asset — see "Accompanying reference package" below.

**Status: the descriptor generator script is deferred** — build on a future pass. The template is filled in by hand in the meantime.

### Accompanying reference package — email-topic-discovery-descriptor-template.md
This feature ships with the run-descriptor template (blank fields plus a genericized worked example, structure preserved from real production use) as a small downloadable asset. On installation:

1. Downloaded from the feature site alongside this spec.
2. Placed in the host project's tracking/reference location, one copy per run, named to match that run's archive output.
3. Filled in by hand at the end of each run, per the fields above.

Download: [data/items/email-topic-discovery-descriptor-template.md](data/items/email-topic-discovery-descriptor-template.md)

## What this doesn't cover
- The actual retrieval/archive mechanics (device-code auth, byte-authentic MIME fetch, backup/verification discipline) — that's FTR-39, which this feature depends on and nests under.
- The descriptor generator script — deferred; fill the template in by hand for now.

## Confirm
Confirm: Email Topic Discovery is installed, nested under FTR-39's section — scope definition, the search/capture/reconcile/fetch/archive/describe pipeline, and the run-descriptor template are all in place. Want to install another, or is that everything for now?