# Route Editing Tour

> Tour editing, add/remove/replace legs, split/merge routes, undo/redo, avoid roads, exclusion zones, reroute around sections, and preserving analysis state across edited route versions. Use for any route manipulation after generation or import.

- Skill: `esemianczuk/route-editing-tour` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add esemianczuk/route-editing-tour`
- Raw SKILL.md: https://api.skillmd.com/api/skills/esemianczuk/route-editing-tour/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: Esemianczuk (https://skillmd.com/u/esemianczuk)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/esemianczuk/route-editing-tour

---


# Route Editing Tour

## Use when

Use after generation/import to add, remove, split, merge, reverse, avoid, reroute, extend, undo, or redo route/tour content.

## Do not use when

Do not use for a new independent route with no relationship to an existing route workspace.

Prefer the smallest edit that satisfies the request.

## Workflow

1. Identify the active route/tour and target span. In a provider-managed chat, call the matching edit/analysis tool directly with omitted identifiers so it can infer the visitor's persisted active route; do not list sessions. Only when a direct tool explicitly reports ambiguous continuity may you call `route.get_session` once and use its compact active-route/lineage result; never poll it.
2. For add-stop/road-avoid edits, isolate the span before changing it.
3. Use CH-less edits for short local reroutes and multi-point generation for long or ingredient-heavy edits.
4. After edits, summarize new route alias/id, distance delta, changed span, and available undo.
5. Use `route.undo_tour` and `route.redo_tour` exactly once and only for explicit undo/redo requests. A successful change or structured `status: no_op` with `changed: false` is terminal; report the returned active route and do not poll session state or repeat the mutation.

Use these exact mutation paths:

- Avoid a named road or distance span: `route.analyze_osrm_segments` -> `route.plan_avoidance_edit` -> `route.apply_avoidance_edit`.
- Add a generated conversational leg: `route.geocode_locations` when the destination is text, then `route.extend_tour`.
- Merge, split, keep/remove a window, append, or prepend stored routes: `route.edit_tour`.
- Reverse a route legally: `route.reverse_route`. Omit identifiers in a provider-managed chat so the tool resolves the persisted active/latest route. Cached engine routes use the engine's legal reverse; locally composed or imported routes rebuild the reversed stored shape through Route Intelligence. Both paths create a lineage revision, preserve attached POIs at reversed route positions, and must remain within the server's distance-drift safety envelope. If that invariant fails, report the failure and keep the source route active.
- Undo/redo: `route.undo_tour` or `route.redo_tour`.

Do not regenerate the entire route with `route.generate_routes` when a local revision tool can preserve the current route and lineage.

Keep generated tours as new versions with lineage rather than overwriting hidden state.

## Postconditions

- The new route version preserves lineage and reports changed spans and distance delta.
- The active route alias/id is explicit.
- Undo availability is reported without performing undo unless requested.
- A reverse never silently activates a route whose distance drifted beyond the legal-reverse safety envelope.

