--- name: trip-email-html-itinerary description: > Extract trip logistics from pasted travel emails, booking confirmations, forwarded messages, reservation notes, or raw itinerary text, research useful restaurant and activity suggestions for each destination, and generate one polished, self-contained offline HTML itinerary file for sharing with family or other travelers. Trigger when the user asks to turn trip emails into an HTML itinerary, travel handoff page, shareable trip page, family trip summary, booking-reference page, destination recommendation page, or offline travel document. version: 2.10.0 --- # Trip Email HTML Itinerary ## Intent Turn a batch of travel-related emails into a complete, shareable HTML trip document. The final file should help the traveler and a spouse, family member, or travel companion quickly understand flights, lodging, rental cars, events, booking references, contact details, open issues, day-by-day logistics, and worthwhile places to eat and things to do at each destination. Primary viewing target is Apple Notes on iPhone while traveling. Assume the user will drop the `.html` file into Apple Notes for quick access. Favor clarity and larger section labels over dense desktop styling when there is a tradeoff. Use this skill for email-derived travel organization and offline HTML output. If the user wants a planning Markdown file instead, use the travel-itinerary skill. ## Trigger When - The user asks to create an HTML itinerary from emails, confirmations, or forwarded trip details. - The user asks for a shareable trip page, family travel handoff, offline travel document, or complete travel summary from bookings. - The user asks for an itinerary they can save into Apple Notes for quick mobile retrieval. - The user says they will drop the HTML file into Apple Notes for quick travel access. - The input includes travel emails for flights, hotels, car rentals, tours, events, restaurants, insurance, visas, or logistics. - The user wants restaurant or activity ideas added to an email-derived itinerary. - The user asks for a fake, sample, synthetic, portfolio, or public demonstration itinerary that can be shared as social-media images. - The user wants a single `.html` file that works locally without a server or internet access. ## Do Not Use When - The user wants live booking, price comparison, broad destination comparison, or current visa/legal advice. - The user only wants a plain text summary or Obsidian Markdown itinerary. - The user asks to preserve confidential PINs, full payment card numbers, passwords, account login links, or private access codes in the output. --- ## Workflow ### 1. Ingest The Emails Accept pasted emails, exported email text, copied booking confirmations, screenshots transcribed by the user, or structured trip notes. If the user provides multiple emails, treat the newest or most explicit confirmation as authoritative unless it is clearly a cancellation or change notice. Extract and normalize: - trip title, date range, traveler names, route stops, destination cities - flights: airline, flight number, airports, dates, departure and arrival times, confirmation codes, ticketing notes, baggage notes, terminal notes, cancellation/change status - lodging: property name, city, dates, address, phone, email, booking number, room type, check-in/out windows, parking, meals, arrival instructions, cancellation status - ground transport: rental car, train, ferry, bus, shuttle, ride reservation, pickup/drop-off locations and times, reservation numbers - events and tours: names, dates, times, meeting points, ticket references, warnings, and schedule-sensitive notes - offline locations: full street addresses for lodging, restaurants, attractions, transport pickup/drop-off points, and tour meeting points when verified - stated food interests, dietary needs, activity preferences, mobility limits, budget clues, and must-do experiences - travel admin: passport, visa, Global Entry/TSA PreCheck, insurance, pending bookings, canceled items, documents to carry - open questions, gaps, conflicts, or items still needing user action ### 2. Reconcile And Protect The Data - Prefer confirmed bookings over draft plans. - Treat cancellation emails as warnings and mark related items canceled unless a later email re-confirms them. - Preserve confirmation and booking numbers when useful. - Never include Booking.com PINs, door/keypad/access codes, passwords, full payment card details, CVV codes, bank details, or sensitive login URLs. - Redact sensitive values as `[redacted]` when the surrounding context is still useful. - If dates or times conflict, include the most likely value in the main itinerary and add a short conflict note in pending items. - Do not invent addresses, phone numbers, confirmation codes, or exact times. Use `TBD` or `Pending` when unknown. ### 3. Research Each Destination Research current restaurant and activity options for every overnight destination. Skip airport-only connections unless the schedule allows a realistic layover outing. - Browse current sources. Prefer official attraction, restaurant, tourism-board, and venue pages. Use reputable local guides or current map/listing results only to fill gaps. - Check that each suggestion appears open and operating for the trip period. Verify hours, seasonal closures, reservation rules, ticket requirements, and location when they affect the plan. - Choose four restaurant suggestions per destination when credible options exist: **Quick Meal**, **Local Specialty**, **Nice Dinner**, and **Near Hotel**. Do not force separate cards when one place legitimately fills two categories; label both uses and add another distinct option only when useful. - Choose four activity suggestions per destination when credible options exist: **Main Attraction**, **Outdoor Activity**, **Cultural Activity**, and **Bad-Weather Backup**. - Match suggestions to the traveler's stated interests, dietary needs, budget, mobility, available time, hotel area, and existing bookings. If preferences are unknown, provide a useful mix instead of asking first. - Favor local specialties and independent local places. Include one convenient option near the lodging or planned route when possible. - State restaurant category, cuisine, neighborhood, price level, why it fits, and reservation urgency. - State activity category, expected duration, area, booking need, weather suitability, and the best itinerary window. - Account for travel time and opening hours. Do not place suggestions into a day when they conflict with a confirmed booking or create unrealistic backtracking. - Keep researched suggestions visually and verbally distinct from confirmed reservations. Label them `SUGGESTED`, never `CONFIRMED`. - Include a direct source link for each suggestion when internet use is allowed. Add a short `Verify hours and availability` note because operating details can change. - If current research is unavailable or the user prohibits browsing, include only options supported by the supplied material and label them `UNVERIFIED SUGGESTION`. Do not rely on memory for current business status. - Do not invent ratings, prices, addresses, hours, availability, or claims such as "best" or "local favorite." ### Offline Address Support Include a readable plain-text location for every place the traveler may need to reach. Do not make the traveler depend on a map link. - Prefer the full verified street address from the booking confirmation or the venue's official current page. - Include venue/property name, street address, locality, postal code when available, and country when cross-border ambiguity is possible. - For airports and stations, include terminal, concourse, platform, entrance, or pickup zone when confirmed and operationally useful. - For tours and events, distinguish the venue address from the actual meeting or pickup point. - For restaurants and activities, place the address directly in the recommendation card beneath the summary. - For the current or next travel day, repeat critical lodging, meeting-point, pickup, and departure addresses in Today's Critical Details. - Add both Apple Maps and Google Maps links after every verified plain-text address when internet links are allowed. - Build Apple Maps links as `https://maps.apple.com/?q=[URL-encoded full address]`. - Build Google Maps links as `https://www.google.com/maps/search/?api=1&query=[URL-encoded full address]`. - URL-encode the complete verified address. Do not use URL shorteners, tracking redirects, API keys, or guessed coordinates. - Keep official-site links as separate optional conveniences. Map and official links supplement the plain-text address and may require internet access. - If a precise address cannot be verified, write `Address pending — verify before travel` and add it to Action Items when the location is schedule-critical. - Never guess an address from a venue name, neighborhood, postal code, or search snippet. Assign one evidence-based urgency label to every restaurant and activity suggestion: - `BOOK NOW` — limited capacity, fixed entry, known sellout risk, or a schedule-critical option that requires advance booking - `BOOK SOON` — advance booking is advisable but the option is not yet schedule-critical - `WALK-IN LIKELY` — current sources support walk-in use or no advance ticket is normally required - `VERIFY BEFORE VISITING` — hours, access, seasonal operation, or booking expectations remain uncertain Do not infer availability from the label. Explain the reason briefly and link the source used. Use existing badge classes so urgency remains consistent with the established format: - `BOOK NOW` → `.badge-book` - `BOOK SOON` → `.badge-verify` - `WALK-IN LIKELY` → `.badge-confirmed` - `VERIFY BEFORE VISITING` → `.badge-verify` ### 4. Build A Working Trip Model Use this internal shape while drafting. It does not have to be shown to the user: ```json { "tripTitle": "", "dateRange": "", "travelerNames": [], "routeStops": [{"code": "", "city": ""}], "statusPills": [], "keyTripCards": [], "contacts": [], "flights": [], "lodging": [], "groundTransport": [], "events": [], "restaurantSuggestions": [], "activitySuggestions": [], "todayCriticalDetails": {}, "travelTimeBlocks": [], "dailyPacing": [], "offlineAddresses": [], "emergencyReplacement": {}, "emergencyContactsSheet": {}, "dayByDay": [], "bookingReferences": [], "travelAdmin": [], "pendingItems": [], "canceledItems": [] } ``` ### 5. Start From The Reference Template Read `assets/itinerary-template.html` before generating the itinerary. Use it as the required visual and structural starting point. - Copy the template into the requested output `.html` file and replace its `{{PLACEHOLDER}}` values with reconciled trip data. - Preserve the template's section order, class names, dark-theme styling, spacing, responsive behavior, and 18–20px major section labels. - Duplicate destination cards, destination sections, flight rows, day rows, booking rows, checklist cards, and admin cards as needed. - Remove unused example blocks and optional sections instead of leaving empty cards. - Keep the template CSS unless destination palette values or destination-specific tag/card classes need adjustment. - Apply the research, redaction, reconciliation, and validation rules in this file when filling the template. - Never copy traveler data from another itinerary into the output. The bundled template is intentionally sanitized and is the only reusable layout source. ### Public Demo Mode When the user requests an example that can be shown publicly, generate the social-media carousel with `scripts/New-PublicDemoItinerary.ps1` or follow the same deterministic rules. A ready-made validated example is bundled at `examples/public-demo-social/`. ```powershell ./scripts/New-PublicDemoItinerary.ps1 ` -OutputDirectory ./public-demo-social ` -BrowserChannel msedge ``` - Produce ten numbered 1080 x 1350 JPEG files in deterministic carousel order: cover, trip overview, flights, hotels and transport, restaurants, activities, day plan, bookings, travel admin, and emergency replacement. - Treat the generated HTML as a temporary render source. Delete it after a successful export unless `-KeepHtml` is explicitly requested for debugging. - Require Microsoft Edge and `npx` with Playwright available on the generation computer. The exported JPG files are standalone and need no browser or internet connection. - Display `PUBLIC DEMO · FICTIONAL DATA · NOT VALID FOR TRAVEL OR BOOKING` in a fixed bottom watermark on every JPG. - Use synthetic travelers, destinations, countries, airlines, hotels, venues, addresses, routes, schedules, prices, and booking references. - Make fictional names unmistakable with labels such as `(Fictional)`, `Example`, `Sample`, or `Demo`. - Display `PUBLIC DEMO · FICTIONAL DATA · NOT VALID FOR TRAVEL OR BOOKING` prominently at the top, in the footer, and in the fixed JPG watermark. - Include `PUBLIC DEMO` in the HTML `