Turn the user's travel ideas intoa mileage-verified itinerary, and produce a mobile-openableroadbook webpage link(one-click open in Amap + weather + day-by-day roadbook + ticket costs + clothing suggestions + notes).
Workflow
1. Clarify requirements (ask everything at once)
Use interaction.ask to ask everything at once: departure place/destination and specific dates and number of days, mode of travel (self-driving/high-speed rail or flight + car rental/public transport; for self-driving ask vehicle type, number of drivers, acceptable daily mileage), number and composition of people (elderly and children, whether going to high altitude), purpose preferences and places explicitly not wanted, budget and accommodation level. See references/roadbook-spec.md Section 1 for the checklist and how to ask. If the user has already uploaded an itinerary, read the table completely first and do not ask again.
2. Verify and question (core value, cannot be skipped)
- Use Amap tools to measure mileage and duration segment by segment,do not trust the mileage or straight-line distance in the user's table; underestimation in actual measurement is common (a user's table was once found to underestimate by as much as 112%).
- Check item by item according to
references/planning-rules.md: daily driving duration, overnight midpoint, high-altitude elevation ladder, holiday dates and off-peak timing, whether "not wanting to go to place X" means passing through or bypassing (calculate the mileage of both routes for the user), loop route and sightseeing density. - If statutory holidays are involved, use general_search to verify that year's holiday arrangements (based on government websites) and calculate the annual leave days clearly.
- If unreasonable points are found: clearly point out the problem, provide alternatives and mileage comparisons, and let the user make the final call on key trade-offs (such as whether to detour) before finalizing.
3. Collect information
- Coordinates, mileage, weather, POI, itinerary map: call the Amap MCP tools in the order of
references/amap-tools.md(before calling, if the schema is not in context, firsttool_searchretrieve it). - Weather only has a forecast for about the next 4 days: for dates not covered, refer to the climate of the same period and note the query date on the page.
- Scenic spots/food/tickets: mainly Amap POI; verify ticket prices and reservation rules (especially 5A/flow-limited scenic areas, shuttle buses and cable cars with secondary spending) with general_search, and mark the timeliness of prices.
- Clothing suggestions: provide layered outfits according to the lowest nighttime temperature along the route and the scenario (high altitude/hiking/rain/sun exposure).
4. Generate the Amap itinerary map
Use maps_schema_personal_map(orgName + lineList, nodes include name/lon/lat/poiId, sorted by itinerary time) to get the amapuri:// link. This link can only be written into the roadbook webpage button and cannot be delivered directly (delivery tools do not accept non-http(s) links).
5. Build the roadbook webpage
- Copy
assets/roadbook.sample.jsonas the data file for this trip, and fill in all modules according to the field specification inreferences/roadbook-spec.md(weather, stop-by-stop roadbook, tickets and costs, clothing suggestions, notes). - Run
python3 scripts/build_roadbook.py <data.json> <输出.html>to generate a self-contained mobile page. - Use the html skill
scripts/shot.pySelf-check (focus on mobile: consoleErrors, horizontal overflow, timeline alignment).
6. Publishing and delivery
- According to
references/roadbook-spec.mdSection 4, uselark-cli apps +deployto publish (record app_id for the first release; for iterations include--app-id), poll release until finished, and verify 200 with curl. - When the user needs to scan a QR code, use
scripts/make_qr.pyto generate a QR code for the published https link (do not encode amapuri). - Use
present_filesto deliver the https link (and QR code); the final reply must be ≤300 characters, stating the modules and data query date, and reminding to re-verify long-range weather/prices before departure.
Reference files (read as needed)
references/roadbook-spec.md: requirements inquiry checklist, roadbook JSON fields, content standards, and the full self-check/publish/QR code/delivery workflow.Required reading for every output.references/planning-rules.md: rules for questioning itinerary reasonableness (mileage thresholds, high altitude, holidays, detour trade-offs, non-self-driving variants). Required reading during the planning stage.references/amap-tools.md: Amap MCP tool parameters, call order, lineList structure, and tested pitfalls. Required reading before calling Amap tools.
Assets and scripts
assets/roadbook.sample.json: roadbook data template (including field examples, directly copy and modify).scripts/build_roadbook.py: JSON → self-contained roadbook HTML (with built-in styles, copy link button, weather grid, timeline, ticket table, and clothing cards).scripts/make_qr.py: published link → QR code PNG.