Files
osmWorkflow/.trellis/tasks/08-04-add-osm-turn-lane-arrows/implement.md
2026-08-05 10:17:34 +08:00

2.0 KiB

Implementation Plan: OSM turn-lane arrows

Steps

  1. Add the complete lane-icons arrow asset set, upstream revision metadata, CC0 license text, and a manifest with the five supported/tested entries and explicit untested status for all other entries.
  2. Add a small CommonJS helper for asset-manifest loading, source-SVG path and stroke conversion, maneuver parsing, road-local placement, and diagnostic skip records. Keep it dependency-free and separately testable.
  3. Wire the helper into the intermediates build so custom features are merged into laneArrows before the existing GeoJSON write and normalization path.
  4. Add Node tests for the five supported maneuvers, forward/backward endpoint choice, lane index placement, deterministic order/id, and every required skip reason. Assert that untested manifest entries cannot be selected.
  5. Generate right and through;right inspection samples from the exact local templates and request user confirmation. Do not enable custom output until this gate is met.
  6. Run the focused tests, syntax checks, the Nantaizi intermediates build, the full Nantaizi chain, and check:area. Compare against a turn-tag-removed control to prove an observable GeoJSON difference.

Validation

  • node --check for changed CommonJS scripts.
  • New pure Node test script(s), invoked directly or through a package script.
  • npm run build:area -- --config config/areas/nantaizi-lake-innovation-valley.json --stages intermediates
  • Full target-area pipeline after visual approval.
  • npm run check:area -- --config config/areas/nantaizi-lake-innovation-valley.json

Review Gates

  • No generated custom feature may use an asset whose manifest status is not both supported and tested.
  • Samples must show the same fill/outline treatment as the existing lane-arrow layer.
  • Keep the existing layer registry unchanged; this is a new source for an existing layer, not a new layer.
  • Do not commit without the user's explicit confirmation.