Run a full Section 508 + WCAG 2.2 Level AA accessibility audit on a federal / .gov / public-sector website or ICT product. Triggers: "Section 508", "508 audit", "WCAG", "VPAT", "ACR".
日本語の概要は準備中です。原文の説明を表示しています。
Generate a production-grade Vehicle Routing Problem (VRP) solver using Google OR-Tools — supports CVRP (capacity), VRPTW (time windows), VRPPD (pickup + delivery), multi-depot, multi-trip, heterogeneous fleet, driver hours-of-service (HOS) compliance.
インストールする前に、エージェントに与えられる指示の中身を確認できます。
You generate a working route optimization pipeline. Last-mile delivery costs > 50% of total shipping in 2026 — squeezing it is where the savings live. The solver of choice is Google OR-Tools because it handles CVRP/VRPTW/VRPPD natively, is open-source, and scales to thousands of stops with disciplined heuristics.
Verify:
Recovery:
route-opt/
├── README.md
├── pyproject.toml # ortools, numpy, pandas, requests, geojson
├── data/
│ ├── stops.csv # id, lat, lng, demand, time_window_start, time_window_end, service_time_min
│ ├── vehicles.csv # id, capacity, start_depot, end_depot, shift_start, shift_end, cost_per_km
│ └── depots.csv # id, lat, lng
├── src/
│ ├── matrix.py # build distance/duration matrix (OSRM/Mapbox/Google)
│ ├── solver.py # OR-Tools routing model
│ ├── constraints.py # time windows, capacity, HOS
│ ├── output.py # GeoJSON, KPI report, turn-by-turn
│ └── cli.py # python -m src.cli --stops data/stops.csv --vehicles ...
├── tests/
│ ├── test_cvrp.py # textbook 16-stop example, known optimum
│ └── test_vrptw.py # Solomon C101 benchmark
└── examples/
├── small_cvrp.ipynb # 20 stops, single depot
└── large_vrptw.ipynb # 200 stops, 8 vehicles, time windows
VALIDATION: Test against the OR-Tools CVRP example (16 stops, capacity 15) → solution matches published optimum within 1%.
Generate matrix.py that supports:
OSRM (preferred for self-hosting):
/table/v1/driving/{coordinates} → returns distance + duration in seconds.Mapbox Matrix API:
traffic_profile (real-time vs typical).Google Distance Matrix:
departure_time for traffic-aware estimates.Haversine fallback:
R = 6371 km, standard great-circle formula. Multiply by 1.3 for road-network estimate. Use only for prototyping.VALIDATION: Matrix cache populated and re-used on subsequent runs. Falls back gracefully if API quota exhausted.
Generate solver.py using ortools.constraint_solver.pywrapcp:
from ortools.constraint_solver import pywrapcp, routing_enums_pb2
manager = pywrapcp.RoutingIndexManager(num_locations, num_vehicles, starts, ends)
routing = pywrapcp.RoutingModel(manager)
# Distance callback
def distance_callback(from_idx, to_idx):
return distance_matrix[manager.IndexToNode(from_idx)][manager.IndexToNode(to_idx)]
transit_idx = routing.RegisterTransitCallback(distance_callback)
routing.SetArcCostEvaluatorOfAllVehicles(transit_idx)
# Capacity constraint
def demand_callback(idx):
return demands[manager.IndexToNode(idx)]
demand_idx = routing.RegisterUnaryTransitCallback(demand_callback)
routing.AddDimensionWithVehicleCapacity(demand_idx, 0, vehicle_capacities, True, 'Capacity')
# Time window constraint
def time_callback(from_idx, to_idx):
travel = duration_matrix[manager.IndexToNode(from_idx)][manager.IndexToNode(to_idx)]
service = service_times[manager.IndexToNode(from_idx)]
return travel + service
time_idx = routing.RegisterTransitCallback(time_callback)
routing.AddDimension(time_idx, slack_max, horizon_max, False, 'Time')
time_dim = routing.GetDimensionOrDie('Time')
for loc_idx, (start, end) in enumerate(time_windows):
index = manager.NodeToIndex(loc_idx)
time_dim.CumulVar(index).SetRange(start, end)
# Search
search_params = pywrapcp.DefaultRoutingSearchParameters()
search_params.first_solution_strategy = routing_enums_pb2.FirstSolutionStrategy.PATH_CHEAPEST_ARC
search_params.local_search_metaheuristic = routing_enums_pb2.LocalSearchMetaheuristic.GUIDED_LOCAL_SEARCH
search_params.time_limit.FromSeconds(60)
search_params.log_search = False
solution = routing.SolveWithParameters(search_params)
VALIDATION: Solver returns a feasible solution OR a clear "infeasible: {reason}" diagnostic, never an empty result.
US DOT FMCSA rules for property-carrying drivers (49 CFR § 395.3):
Model HOS as additional Time-dimension constraints with break activities. For long-haul, multi-day routes, split into legs with mandatory rest periods.
Soft time windows: instead of hard infeasibility, add a penalty cost per minute outside the window. Useful for VRPTW where some lateness is acceptable at a cost. Implement via Dimension.SetSoftUpperBound(index, soft_max, penalty_per_unit).
VALIDATION: HOS-enabled run produces routes with explicit break activities and ≤ 11 hours of drive per shift.
Generate output.py producing three artifacts:
1. routes.geojson — FeatureCollection where each Feature is one vehicle's route (LineString) + stop Points with properties (sequence, arrival_time, service_time, demand_delivered). Renderable in Mapbox GL JS, Leaflet, kepler.gl.
2. kpi_report.md:
Total routes: N
Total stops: M
Total distance: X km (avg per route: Y km)
Total duration: X hr (avg per route: Y hr)
Vehicle utilization: (sum of capacity used) / (sum of capacity available) = X%
On-time stops: N/M = X%
Avg stops per route: X
Cost estimate: $X (at $Y/km)
3. turn-by-turn URLs — for each route, one URL the driver can open in Google Maps or Apple Maps with all stops pre-loaded. Mapbox Directions API for production navigation.
VALIDATION: GeoJSON validates against geojson.io. KPI numbers reconcile (sum of route distances = total).
For ops teams running this daily, generate a dispatch.py CLI:
python -m src.dispatch \
--stops today.csv \
--vehicles fleet.csv \
--depots depots.csv \
--time-limit 120 \
--output runs/$(date +%F)/
Pipeline:
VALIDATION: Full pipeline runs end-to-end in < 5 minutes for 200 stops × 10 vehicles.
Score 1–5:
Common gap: ignoring service time at each stop → routes time out 30 min late. Verify service_time is in the time callback.
Append to ~/.claude/skills/route-optimizer/LEARNINGS.md:
まだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
Run a full Section 508 + WCAG 2.2 Level AA accessibility audit on a federal / .gov / public-sector website or ICT product. Triggers: "Section 508", "508 audit", "WCAG", "VPAT", "ACR".
日本語の概要は準備中です。原文の説明を表示しています。
Analyzes actuarial modeling systems for loss reserving accuracy, premium pricing methodology, mortality/morbidity tables, stochastic modeling, and capital adequacy per SOA and Solvency II standards..
日本語の概要は準備中です。原文の説明を表示しています。
Analyzes advertising yield across programmatic and direct-sold inventory including CPM/CPC/CPA performance, header bidding efficiency, fill rate optimization, inventory monetization strategies, and compliance with IAB standards and OpenRTB protocols..
日本語の概要は準備中です。原文の説明を表示しています。
Create and manage Architecture Decision Records using the Michael Nygard format. Triggers: you need to document architecture decisions, record technical choices, explain why a technology was chosen.
日本語の概要は準備中です。原文の説明を表示しています。
Analyzes affordable housing management software for unit allocation algorithms, waitlist management, income verification workflows, Fair Housing compliance, LIHTC and Section 8 program tracking, inspection scheduling, and tenant reporting..
日本語の概要は準備中です。原文の説明を表示しています。
Rewrites existing landing pages, blog posts, and documentation so AI search engines (Google AI Overviews, ChatGPT, Perplexity, Claude, Gemini) cite them. Triggers: an existing page underperforms in AI answers despite ranking well in classic SERPs.
日本語の概要は準備中です。原文の説明を表示しています。