Travel & Retreat Planner (旅行与团建规划工作流)
Turn messy travel or team-building requests into evidence-verified, spacious, publication-grade Chinese A4 PDF proposals backed by real commute measurements, live target-date pricing and room inventory, honest pros/cons from recent guest reviews, and actionable pre-deposit inquiry checklists.
Dependencies
data-analysis-html-report: Mandatory downstream typography and HTML QA contract (enforcesSimSunfor Chinese + curly double quotes“”,Times New Romanfor English/digits, zero middle-dot connectors, anti-wall-of-text micro-blocks, andaudit_html_report.py).credentials: Safe credential verification and prompting protocol forAMAP_WEB_API_KEYstored in~/.env(never ask the user to paste keys in chat; never print key values).- External CLIs (optional but strongly recommended for first-hand Chinese platform data):
@jackwener/opencli(opencli doctorwith Chrome/Edge Browser Bridge connected to the user's logged-in session forctrip,xiaohongshu,dianping,12306).
Core Operating Principles
- No guessing on live prices, room stock, or commutes: Separate every claim cleanly into five reader-facing evidence tags:
页面查询价、高德实测、住客反馈、估算、待商家确认. Never label an unverified weekend quote as locked pricing. - Respect user account safety on Chinese platforms: When using
openclion logged-in sites (xiaohongshu,ctrip,dianping), obey strict anti-ban throttling (see references/opencli_safe_collection.md): serial per site, 5–7 s intervals, tiny limits (3–6 items), and immediate circuit breaker on any login wall, verification prompt, or unexpected error. Never attempt to bypass CAPTCHAs or anti-bot gates. - Budget stress-testing before deposit: Always model realistic room-allocation scenarios (e.g., full twin-sharing vs. PI/leader single occupancy + gender parity requiring extra rooms) and verify actual visible remaining inventory on the booking page rather than multiplying the cheapest 1-left promotional rate by N rooms.
- Pure reader-facing final PDF: Internal audit logs, AI model names, JSON file paths, and process revision chatter (such as "replaced venue X") must NEVER leak into the final deliverable PDF.
6-Stage End-to-End Workflow
Stage 1: Intake, Historical Context & Capability Check
- Inspect any historical plan documents in the workspace to extract group habits, departure origin, past venues, and implicit taste preferences.
- Confirm only decision-blocking constraints before broad screening:
- Exact dates (check weekday/weekend & holiday adjacency), departure origin, max acceptable commute;
- Headcount & room-allocation scenarios (e.g., 10p/5r vs. 10p/6r);
- Per-person budget cap and whether official VAT invoices (
发票) are required (no-invoice unlocks boutique private courtyards); - Hard exclusions (e.g., no skiing/high-risk sports, no kids/family, previously visited venues to skip).
- Silently check
~/.envforAMAP_WEB_API_KEY(using thecredentialssafe protocol — never print the value) and runopencli doctorto see which first-hand data channels are live.
Stage 2: Broad Candidate Screening & Amap Ground-Truthing
- Screen 6–10 diverse candidate venues across distinct styles matching season, distance, and budget (optionally delegating broad web search to a subagent/worker).
- Run the bundled rate-limited Amap script to measure exact driving distance, duration, tolls, public transit, phone numbers, and nearby dining POIs from the exact departure gate:
python scripts/amap_probe.py probe --origin "出发地点" --city "北京" --out data/amap_venues.json "场地A" "场地B" "场地C" - If suburban rail or nearby off-site dining is planned, measure exact last-mile station/restaurant transfers:
python scripts/amap_probe.py transfer --city "北京" --out data/amap_transfers.json "起始点->终点" - Eliminate venues that fail distance or transfer efficiency BEFORE spending any logged-in browser queries.
Stage 3: Ultra-Gentle First-Hand Verification (OpenCLI)
Follow references/opencli_safe_collection.md strictly on only the Top 4–6 finalists:
- 12306 (anonymous, no login): Query exact bidirectional weekend trains (
opencli 12306 trains) and verify whether arrival + last-mile transfer meets the return-time constraint. - Ctrip (
ctrip hotel-suggestanonymous →ctrip hotel→ targetedcheckIn/checkOutlive page): Capture exact room names, bed counts, visible remaining room counts, breakfast inclusions, free cancellation deadlines, conference/activity fees, and both recent positive and negative guest reviews. - Dianping (
dianping search): Check verified star rating, review volume, and average spend for venues and anchor restaurants (stop immediately if detail pages prompt App login). - Xiaohongshu (
xiaohongshu search→ 1–2 selectednote/comments): Read recent seasonal experience posts and comments specifically targeting heating, noise insulation, crowd levels, and water/facility quality. - Clean Visual Asset Curation: Download HD venue architecture/scenery photos from static official CDNs (e.g., Ctrip
dimg_W_1280_JPGs) rather than user portraits. Visually inspect every selected photo viaread_fileto guarantee zero strangers/portraits, zero watermarks, and crisp composition.
Stage 4: Programmatic Budget Modeling & Independent Cross-Audit
- Compute ALL line-item sums, totals, per-person costs, margins, and reserve ratios in a deterministic Python script (
verified_budgets.json) — never do mental table arithmetic. - Double-check every subtle budget trap:
- Unexpanded folded rates (never assume a folded price includes double breakfast or hot-spring tickets unless explicitly stated);
- Remaining inventory cliffs (if only 1 room remains at the lowest rate, sum the real multi-tier room prices);
- Separate pricing of off-site transfers, dining packages, evening gathering rooms, and mandatory insurance;
- Exact return-to-origin arrival time (station arrival + last-mile drive).
- For complex or high-stakes proposals, optionally run an independent read-only cross-audit against the raw JSON archive, then absorb all factual/arithmetic/timeline corrections silently into the dataset.
Stage 5: Spacious Editorial HTML + Inline SVG → A4 PDF Generation
Follow references/report_layout_spec.md strictly:
- Typography:
@font-faceunicode-rangesplitting SimSun (宋体) for CJK + curly double quotes (“”) and Times New Roman for English, digits, and units; apply the exact same font stack to PDF headers/footers and pure inline vector SVG charts. - Zero middle dots: Ban
·,•,・,●across titles, place names, lists, charts, headers, and footers (use spaces, colons, parentheses, or commas). - Spacious editorial pacing: 18 mm A4 margins, 10.5 pt body (
line-height: 1.72), micro-blocks ≤ 2 lines, vertical numbered checklists (never inline①②③walls), and 2 dedicated pages per Tier-1 plan (Page A: photos + 3 highlights + Day 1/Day 2 itinerary; Page B: clean budget table + pre-deposit verification checklist). - Actionable closing page: Put room-allocation & 6-point merchant inquiry checklist before deposit, followed by a dated execution timeline, safety rules, and quick-dial phone list.
Stage 6: Automated Gates & Visual Page-by-Page QA
Run the bundled verification & rasterization helper:
python scripts/audit_and_rasterize_pdf.py --html report.html --pdf report.pdf --qa-dir scratch/pdf_qa
- Confirm zero forbidden middle dots, zero leaked internal/audit tokens, and
data-analysis-html-report'saudit_html_report.pyPASS on all checks. - Visually inspect the generated contact sheets (and full-res spot checks) to catch any single-line page spillover, awkward title wrapping, chart label collision, or image cropping gap; iterate CSS/layout until every page is balanced and intentional.