# Globetrotter — flight import spec for agents

Globetrotter draws a person's flight history as glowing arcs on a quiet 3D globe.
If you are running this prompt, your goal is to produce a **CSV of the user's
flights** that they can import into their globe.

You are acting on the user's behalf. Use whatever email or document tools you have
access to. Don't ask the user to do work you can do yourself.

## 1. Find the flights

Search the user's connected inbox (Gmail, Outlook, etc.) for evidence of flights:

- airline booking confirmations and e-tickets
- itinerary / "your trip" emails (Delta, United, American, BA, Lufthansa, Emirates…)
- online check-in and boarding-pass emails
- travel-agency / aggregator confirmations (Expedia, Google Travel, Kayak…)

Cover the whole history you can reach, oldest to newest. De-duplicate: the same leg
often shows up in a confirmation, a check-in email, and a boarding pass — keep it
once.

## 2. Extract one row per leg

For every individual flight leg, record three fields:

| field  | meaning                     | format                                        |
|--------|-----------------------------|-----------------------------------------------|
| `date` | departure date of that leg  | `YYYY-MM-DD` (or `YYYY-MM` if the day is unknown) |
| `from` | origin airport              | 3-letter **IATA** code, e.g. `JFK`            |
| `to`   | destination airport         | 3-letter **IATA** code, e.g. `LHR`            |

Rules:

- One row **per leg**. A round trip is **two** rows. A connection (JFK→FRA→BOM) is
  **one row per segment**.
- IATA codes only — never city or airport names. Resolve "New York JFK" → `JFK`,
  "London Heathrow" → `LHR`.
- `from` and `to` must differ.
- If you can't resolve a leg to real IATA codes and a date, **skip it** — don't guess.

## 3. Output

Return a CSV with exactly this header, and the rows below it:

```csv
date,from,to
2023-04-12,JFK,LHR
2023-04-19,LHR,JFK
2023-09-02,BOS,SFO
```

Then give the CSV text to the user so they can copy it.

## 4. Hand-off

The user imports it here:

> https://globe.phreshplastic.com/?add=1 → **Ask your agent** → paste the CSV

That's the whole loop: copy the prompt, run it against the inbox, paste the result.

---

Notes for the agent:

- The CSV never includes coordinates — Globetrotter resolves IATA codes to locations
  itself, so latitude/longitude are not needed.
- Unknown or invalid rows are skipped on import and reported back by line number, so
  it's safe to include your best effort; bad rows won't block the good ones.
- Things only a human can answer: which inbox to search, and how far back to go.
