Route Researcher
Research mountain peaks across North America and generate comprehensive route beta reports combining data from multiple sources including PeakBagger, SummitPost, WTA, AllTrails, weather forecasts, avalanche conditions, and trip reports.
Data Sources: This skill aggregates information from specialized mountaineering websites (PeakBagger, SummitPost, Washington Trails Association, AllTrails, The Mountaineers, and regional avalanche centers). The quality of the generated report depends on the availability of information on these sources. If your target peak lacks coverage on these websites, the report may contain limited details. The skill works best for well-documented peaks in North America.
When to Use This Skill
Use this skill when the user requests:
- Research on a specific mountain peak
- Route beta or climbing information
- Trip planning information for peaks
- Current conditions for mountaineering objectives
Examples:
- "Research Mt Baker"
- "I'm planning to climb Sahale Peak next month, can you research the route?"
- "Generate route beta for Forbidden Peak"
Progress Checklist
Research Progress:
Orchestration Workflow
Phase 1: Peak Identification
Goal: Identify and validate the specific peak to research.
Extract Peak Name from user message
- Look for peak names, mountain names, or climbing objectives
- Common patterns: "Mt Baker", "Mount Rainier", "Sahale Peak", etc.
Search PeakBagger using peakbagger-cli:
uvx --from "git+https://github.com/dreamiurg/peakbagger-cli.git@v1.10.0" peakbagger peak search "{peak_name}" --format json
- Parse JSON output to extract peak matches
- Each result includes: peak_id, name, elevation (feet/meters), location, url
Handle Multiple Matches:
Extract Peak ID:
- From search results JSON, extract the
peak_id field
- Store for use in subsequent peakbagger-cli commands
- Also store the PeakBagger URL for reference links
Phase 2: Peak Information Retrieval
Goal: Get detailed peak information and coordinates needed for location-based data gathering.
This phase must complete before Phase 3, as coordinates are required for weather, daylight, and avalanche data.
Retrieve detailed peak information using the peak ID from Phase 1:
uvx --from "git+https://github.com/dreamiurg/peakbagger-cli.git@v1.10.0" peakbagger peak show {peak_id} --format json
This returns structured JSON with:
- Peak name and alternate names
- Elevation (feet and meters)
- Prominence (feet and meters)
- Isolation (miles and kilometers)
- Coordinates (latitude, longitude in decimal degrees)
- Location (county, state, country)
- Routes (if available): trailhead, distance, vertical gain
- Peak list memberships and rankings
- Standard route description (if available in routes data)
Error Handling:
- If peakbagger-cli fails: Fall back to WebSearch/WebFetch and note in "Information Gaps"
- If specific fields missing in JSON: Mark as "Not available" in gaps section
- Rate limiting: Built into peakbagger-cli (default 2 second delay)
Once coordinates are obtained from this step, immediately proceed to Phase 3.
Phase 3: Data Gathering
Goal: Gather comprehensive route information from all available sources.
Execution Strategy: Run Python script for deterministic API data + dispatch specialized agents in parallel for web research. This hybrid approach minimizes token usage while maximizing parallelism.
Step 3A: Fetch Conditions Data (Python Script)
Run the conditions fetcher script to gather all API-based data:
cd "{repo_root}/skills/route-researcher/tools"
uv run python fetch_conditions.py \
--coordinates "{latitude},{longitude}" \
--elevation {elevation_m} \
--peak-name "{peak_name}" \
--peak-id {peak_id} \
--trailhead "{trailhead_lat},{trailhead_lon}" \
--distance-mi {round_trip_distance_mi} \
--gain-ft {total_gain_ft} \
--start-time "{HH:MM}" \
--waypoint "{lat1},{lon1}" --waypoint "{lat2},{lon2}"
Optional args: --trailhead enables multi-county path sampling (trailhead→summit); hospital/ranger lookups always run from the summit regardless; --distance-mi/--gain-ft enable time_estimates; --start-time (with distance + gain) enables itinerary; --waypoint (2+) enables bearings.
This returns JSON with:
- weather: 7-day forecast with temperatures, precipitation, freezing levels; each day includes
snow_line_note (human-readable framing of freezing level as snow line) and near_summit (bool: true when freezing level within 2000 ft of summit)
- air_quality: AQI ratings and any concerns
- daylight: Full twilight table —
astronomical_dawn, nautical_dawn, civil_twilight (dawn), sunrise, sunset, civil_dusk, nautical_dusk, astronomical_dusk; values are null at high latitudes when sun doesn't reach threshold (white nights); daylight_hours, timezone
- time_estimates: Roped/unroped + 3-tier pacing (
roped_hr, unroped_hr, fast_hr, moderate_hr, leisurely_hr) — only present when --distance-mi and --gain-ft CLI args are provided
- itinerary: Trip schedule with safety signals (
start_time, summit_eta, turnaround_by, return_eta, total_hr, after_dark bool, dusk_cutoff, note) — only present when --start-time, --distance-mi, AND --gain-ft are all provided; after_dark: true is a safety warning that must be prominently surfaced; total_hr is the full round-trip duration in hours
- bearings: Navigation bearings between waypoints (
segments[] with bearing_deg, distance_mi, cumulative_distance_mi; total_distance_mi) — only present when 2 or more --waypoint "lat,lon" args are provided
- avalanche: NWAC region and URL for manual check
- peakbagger: Ascent statistics and recent ascents (if peak_id provided)
- counties: Counties traversed trailhead→summit (
counties[] with county_name, county_fips, state_name, state_code); sampled bool and sample_points int indicate whether path sampling ran (requires --trailhead); without --trailhead only the summit county is returned
- nearest_hospital: Nearest hospitals/ERs (
hospitals[] with name, lat, lon, distance_miles, emergency, and phone/website/address when OSM has them); sorted emergency-first then by distance; max 3
- ranger_station: Nearest ranger stations (
stations[] with name, lat, lon, distance_miles, and phone/website/address when present) + optional admin_district (district_name, forest_name, region) when the summit coordinates intersect a USFS ranger district
- campgrounds: Established campgrounds within ~12 mi (20 km) (
campgrounds[] with name, lat, lon, distance_miles, camp_type, backcountry, operator, and website when present); backcountry/high camps are NOT included — extract those from trip reports
- gaps: Any API failures noted for report
Run this in parallel with Step 3B — include both the Bash command for fetch_conditions.py and all 3 Task calls in the same response turn to maximize parallelism.
Step 3B: Dispatch Researcher Agents (Parallel)
Dispatch 3 Researcher agents in a single message (all Task calls together). Each agent researches assigned sources and fetches trip report content directly.
Agent 1: PeakBagger + SummitPost
Task(
subagent_type="general-purpose",
model="sonnet",
prompt="""You are a route researcher gathering mountaineering data for {peak_name}.
## Your Assignment
Research from these sources: PeakBagger, SummitPost
## PeakBagger Research
1. Search: "{peak_name} site:peakbagger.com"
2. Extract route descriptions from peak page
3. List recent ascents with trip reports:
```bash
uvx --from "git+https://github.com/dreamiurg/peakbagger-cli.git@v1.10.0" peakbagger peak ascents {peak_id} --format json --with-tr --limit 20
Identify trip reports with content (word_count > 0)
Fetch content for up to 5 recent trip reports using:
uvx --from "git+https://github.com/dreamiurg/peakbagger-cli.git@v1.10.0" peakbagger ascent show {ascent_id} --format json
SummitPost Research
Search: "{peak_name} site:summitpost.org"
Use WebFetch to extract: route name, difficulty, approach, description, hazards
If WebFetch fails, use the fetching ladder:
# Fast path (httpx with browser-like headers, no browser)
uv run python {repo_root}/skills/route-researcher/tools/cloudscrape.py "{url}"
# If the above returns {"error": ...} or content is blocked/JS-rendered:
uv run python {repo_root}/skills/route-researcher/tools/cloudscrape.py --render "{url}"
Trip Report Extraction
For each report fetched, extract:
- date, author, route conditions, gear mentioned
- Hazards (extract explicitly and separately):
- Rockfall zones: location on route, conditions, timing guidance mentioned
- Icefall/serac hazard: location, stability, pre-dawn/timing advice
- Cornice hazard: location, buildup direction, avoidance notes
- Terrain detail (extract if mentioned):
- Downclimb sections: location, difficulty, rappel anchors if any
- River/stream crossings: location, flow conditions, ford difficulty
- Water sources: named locations, seasonal availability
- Named camps or bivy sites: name/location, exposure notes
Output Format (return EXACTLY this JSON)
{
"sources": ["PeakBagger", "SummitPost"],
"route_info": [
{"source": "...", "name": "...", "difficulty": "...", "description": "...", "hazards": [...]}
],
"trip_reports": [
{"source": "...", "date": "...", "author": "...", "url": "...", "summary": "...", "conditions": "...", "has_gpx": false,
"rockfall": "...", "icefall": "...", "cornices": "...",
"downclimbs": "...", "crossings": "...", "water_sources": "...", "camps": "..."}
],
"gaps": ["what couldn't be fetched and why"]
}
```"""
)
Agent 2: WTA + Mountaineers + Regional Sources
Task(
subagent_type="general-purpose",
model="sonnet",
prompt="""You are a route researcher gathering mountaineering data for {peak_name}.
## Your Assignment
Research from these sources: WTA, Mountaineers.org, northwesthikers.net, hikeoftheweek.com, Oregon Hikers Field Guide (oregonhikers.org), Cascade Climbers (cascadeclimbers.com), Mountain Project
## WTA Research
1. Search: "{peak_name} site:wta.org"
2. Find the hike page and extract: trail name, difficulty, distance, elevation gain, hazards
3. Get trip reports from AJAX endpoint: {wta_url}/@@related_tripreport_listing
4. Fetch content for up to 5 recent trip reports using the fetching ladder:
```bash
# Fast path first
uv run python {repo_root}/skills/route-researcher/tools/cloudscrape.py "{trip_report_url}"
# If output contains {"error": ...} or content is blocked/JS-rendered:
uv run python {repo_root}/skills/route-researcher/tools/cloudscrape.py --render "{trip_report_url}"
Mountaineers Research
- Search: "{peak_name} site:mountaineers.org route"
- Extract route beta, technical requirements, hazards
NWHikers Research (northwesthikers.net / nwhikers.net)
- Search: "{peak_name} site:nwhikers.net OR site:northwesthikers.net"
- Use WebFetch to extract first-person trip reports, GPS track notes, conditions
- If WebFetch fails, use
cloudscrape.py "{url}" (fast path usually sufficient)
Hike of the Week (hikeoftheweek.com — REQUIRES --render)
Search: "{peak_name} site:hikeoftheweek.com"
MUST use --render flag — site is Cloudflare-protected and blocks WebFetch:
uv run python {repo_root}/skills/route-researcher/tools/cloudscrape.py --render "{url}"
Extract: logistics, route narrative, access notes, trailhead directions
Oregon Hikers Field Guide (oregonhikers.org — Oregon objectives only)
- Search: "{peak_name} site:oregonhikers.org"
- Use WebFetch — site is static MediaWiki HTML, WebFetch-friendly
- Extract: route description, access, permits, conditions notes
Cascade Climbers (cascadeclimbers.com)
- Search: "{peak_name} site:cascadeclimbers.com"
- Use WebFetch; if blocked use
cloudscrape.py "{url}"
- Extract: technical route beta, gear lists, trip reports, conditions
Mountain Project (for technical/rock sections)
- Search: "{peak_name} site:mountainproject.com"
- Use WebFetch to extract: route name, grade, gear, description, rock quality
- If WebFetch fails, use
cloudscrape.py "{url}"
Fallback
If WebFetch fails for any page, use the fetching ladder: cloudscrape.py "{url}" (fast) → cloudscrape.py --render "{url}" for JS-rendered or Cloudflare-protected pages.
Trip Report Extraction
For each report fetched, extract:
- date, author, route conditions, gear mentioned
- Hazards (extract explicitly and separately):
- Rockfall zones: location on route, conditions, timing guidance mentioned
- Icefall/serac hazard: location, stability, pre-dawn/timing advice
- Cornice hazard: location, buildup direction, avoidance notes
- Terrain detail (extract if mentioned):
- Downclimb sections: location, difficulty, rappel anchors if any
- River/stream crossings: location, flow conditions, ford difficulty
- Water sources: named locations, seasonal availability
- Named camps or bivy sites: name/location, exposure notes
Output Format (return EXACTLY this JSON)
{
"sources": ["WTA", "Mountaineers", "NWHikers", "HikeOfTheWeek", "OregonHikers", "CascadeClimbers", "MountainProject"],
"route_info": [
{"source": "...", "name": "...", "difficulty": "...", "description": "...", "hazards": [...]}
],
"trip_reports": [
{"source": "...", "date": "...", "author": "...", "url": "...", "summary": "...", "conditions": "...", "has_gpx": false,
"rockfall": "...", "icefall": "...", "cornices": "...",
"downclimbs": "...", "crossings": "...", "water_sources": "...", "camps": "..."}
],
"gaps": ["what couldn't be fetched and why"]
}
```"""
)
Agent 3: AllTrails
Task(
subagent_type="general-purpose",
model="sonnet",
prompt="""You are a route researcher gathering mountaineering data for {peak_name}.
## Your Assignment
Research from AllTrails
## AllTrails Research
1. Search: "{peak_name} site:alltrails.com"
2. Use WebFetch to extract: trail name, difficulty, distance, elevation gain, route type, best season, hazards
3. If WebFetch fails, use:
```bash
uv run python {repo_root}/skills/route-researcher/tools/cloudscrape.py "{url}"
- From route description and any visible reviews/comments, extract if present:
- Rockfall zones, icefall/serac hazard, cornice hazard
- Downclimb sections, river/stream crossings, water sources, named camps
Output Format (return EXACTLY this JSON)
{
"sources": ["AllTrails"],
"route_info": [
{"source": "...", "name": "...", "difficulty": "...", "distance_miles": N, "elevation_gain_ft": N, "description": "...", "hazards": [...],
"rockfall": "...", "icefall": "...", "cornices": "...",
"downclimbs": "...", "crossings": "...", "water_sources": "...", "camps": "..."}
],
"trip_reports": [],
"gaps": ["what couldn't be fetched and why"]
}
```"""
)
Execute all 3 agents in parallel by including all Task calls in a single response.
Step 3C: Aggregate Results
After Python script and all agents return, aggregate into unified data structure:
{
"conditions": { /* from fetch_conditions.py */ },
"route_data": {
"sources": [ /* merged from all 3 agents */ ],
"trip_reports": [ /* merged from all agents */ ]
},
"gaps": [ /* merged gaps from all sources */ ]
}
Partial Failure Handling:
- If any agent fails entirely, proceed with data from successful agents
- Note failed sources in the gaps array
- Minimum viable: conditions data + at least one route source
Step 3D: Access, Permits, and Road/Gate Status (Inline)
Determine permits AND the current road/gate status to the trailhead — do not just tell the user to go check. Actively research and report the actual status with a source and date.
Permits:
WebSearch: "{peak_name} trailhead access" ; "{peak_name} permit requirements"
Road / gate status workflow (identify the access highway + forest road + managing agency first, then check sources in order; capture each source URL for the report):
- State DOT pass report (WA → WSDOT): fetch the relevant pass page, e.g.
https://wsdot.com/travel/real-time/mountainpasses/mt.-baker (SR-542) or .../north-cascades (SR-20). Read RoadCondition / TravelAdvisoryActive / restrictions. Other states: WebSearch "{state} DOT mountain pass report {highway}".
- USFS forest alerts/conditions: fetch
https://www.fs.usda.gov/{region}/{forest-shortname}/alerts (e.g. r06/mbs/alerts) and /conditions; search the page for the road number / trailhead name → closure milepost, reason, seasonal gate. Also WebSearch "{forest name} {road or trailhead} road open {year}" for seasonal-opening press releases.
- NPS road conditions (if in/through a national park): fetch
https://www.nps.gov/{park-code}/planyourvisit/road-conditions.htm (e.g. noca, mora, olym) → per-road OPEN/CLOSED + milepost.
- WTA ground truth (PNW):
WebSearch "site:wta.org {trail} gate road open closed {year}" or fetch the hike page; scan the 3-5 most recent trip reports for "gate"/"road open/closed"/"drove to" (use cloudscrape.py --render if WTA 403s).
- InciWeb fire closures (Jul-Oct):
WebSearch "inciweb {area} closure {trailhead} {year}"; if an active incident is near the trailhead, read its closure page.
Synthesize into a dated status statement for the report's Road Conditions section:
"Gate/road status (as of {date}): {road} is {OPEN/CLOSED/SEASONAL GATE/UNKNOWN} per source. {If closed: gate at {milepost}, adds ~{N} mi each way.}"
If no source confirms it, say so explicitly and include the managing ranger station phone as the fallback. Add trailhead names, permits, the status statement, and all source URLs to route_data.
Phase 4: Route Analysis
Goal: Analyze gathered data to determine route characteristics and synthesize information.
Step 4A: Determine Route Type
Based on route descriptions, elevation, and gear mentions, classify as:
- Glacier: Crevasses mentioned, glacier travel, typically >8000ft
- Rock: Technical climbing, YDS ratings (5.x), protection mentioned
- Scramble: Class 2-4, exposed but non-technical
- Hike: Class 1-2, trail-based, minimal exposure
Step 4B: Synthesize Route Information from Multiple Sources
Goal: Combine trip reports and route descriptions from Step 3B researcher agents, plus conditions data from Step 3A, into comprehensive route beta.
Source Priority:
- Trip reports (Step 3B agents) - first-hand experiences
- Route descriptions (Step 3B agents) - published beta baseline
- PeakBagger/ascent data (Step 3A Python script) - basic info, patterns
Synthesis Pattern for Route, Crux, and Hazards:
- Start with baseline from route descriptions (standard route name, published difficulty)
- Enrich with trip report details (landmarks, specific conditions, actual experiences)
- Note conflicts when trip reports disagree with published info
- Highlight consensus ("Multiple reports mention...")
- Include specifics (elevations, locations, quotes)
- Link every specific-report attribution to its source. Whenever a detail is drawn from a particular trip/climb report (a date, a quote, "one party found…", "a recent report noted…"), the attribution MUST be a Markdown hyperlink to that report's URL — never plain text. Carry each trip report's
url (and date/author) through synthesis so it can be linked; use the date/author as the link text. For consensus phrasing ("multiple reports mention…"), link 2-3 of the contributing reports inline. Only general/published beta with no specific source stays unlinked.
Example (Route Description):
"The standard route follows the East Ridge (Class 3). A Sep 2025 party found a well-cairned use trail branching right at 4,800 ft—the correct turn—through talus they called 'tedious' and 'ankle-rolling'. An Oct 2025 report noted the section was snow-covered, requiring microspikes."
Apply this pattern to:
- Route: Use baseline structure, add landmarks/navigation from trip reports, include actual times
- Crux: Describe location/difficulty, add trip report assessments, note conditions-dependent variations
- Hazards: Extract ALL hazards from trip reports. Organize by type with explicit, SEPARATE sub-sections — do NOT bury rockfall or icefall under generic "exposure":
- Rockfall: tag location, trigger (other parties / freeze-thaw / sun hitting the face), timing mitigation (pre-dawn passage, move quickly through zone)
- Icefall/Serac: tag location, stability assessment, timing mitigation (avoid afternoon, pre-dawn passage)
- Cornice: tag location, avoidance line, conditions (buildup direction, season)
- Other hazards (crevasses, exposure, route-finding, seasonal) as separate bullets
- Be comprehensive — safety-critical; include specific locations and mitigation strategies
- Terrain detail: Surface the following in the report when found in trip reports/beta:
- Downclimbs: location, difficulty, whether rappel anchors exist
- River/stream crossings: location, seasonal flow, ford difficulty
- Water sources: named locations and per-day availability by season
- Named camps/bivy sites: name, location, exposure; note these come from trip reports, not the campground database
Extract Key Information:
From all synthesized data, identify:
- Difficulty Rating: YDS class, scramble grade, or general difficulty (validated by trip reports)
- Crux: Hardest/most technical section of route (synthesized above)
- Hazards: All identified hazards (synthesized above)
- Notable Gear: Any unusual or important gear mentioned in trip reports or beta (to be included in relevant sections, not as standalone section)
- Trailhead: Name and approximate location
- Distance/Gain: Round-trip distance and elevation gain (compare published vs actual trip report data)
- Time Estimates: Use
conditions.time_estimates (keys: fast_hr, moderate_hr, leisurely_hr, roped_hr, unroped_hr) from fetch_conditions.py output — present only when it was called with --distance-mi and --gain-ft. If time_estimates is absent from the conditions data, note it in Information Gaps. To populate it: re-invoke fetch_conditions.py with --distance-mi {distance} and --gain-ft {gain} once route distance/gain are known from Step 3B research. At the same time, add --start-time HH:MM to get itinerary and --waypoint args to get bearings — these optional outputs only activate when the args are supplied.
- Freezing Level Analysis: Compare peak elevation with forecasted freezing levels:
- Include Freezing Level Alert if: Any day in forecast has freezing level within 2000 ft of peak elevation
- Omit if: Freezing level stays >2000 ft above peak throughout forecast (typical summer conditions)
- Example: 5,469 ft peak with 5,000-8,000 ft freezing levels → Include alert (marginal conditions)
- Example: 4,000 ft peak with 10,000+ ft freezing levels → Omit alert (well above summit)
Step 4C: Surface Geodata in Report
Include these geodata fields when available. Every place named in the report must be a link — see the link patterns below.
Place / map link patterns (build from a place's lat/lon and name):
- Google Maps place (named entity):
https://www.google.com/maps/search/?api=1&query={URL-encoded name + address} — use this (not bare coordinates) for hospitals, ranger stations, campgrounds, and any named place, so the link resolves to the actual entity. When only coordinates are meaningful, query={lat},{lon}.
- Gaia GPS:
https://www.gaiagps.com/map/?loc=14/{lon}/{lat} (zoom/lon/lat).
- CalTopo:
https://caltopo.com/map.html#ll={lat},{lon}&z=14&b=mbt.
Surfacing rules:
- Counties: list
county_name + state_name from conditions.counties.counties[] in the Overview. Empty/error → Information Gaps.
- Emergency contacts: build the table from
conditions.nearest_hospital.hospitals[] and conditions.ranger_station (stations + admin_district). Link each name to its website if present, else a Google Maps place search by name + address. Always include phone AND address columns — each entry now carries phone/website/address/lat/lon when OSM has them; if phone or address is missing, make a best effort to find the entity's real phone/address (its official site or Google Maps listing) before writing "—". Missing/error → note in Information Gaps.
- Campgrounds: build the Camping table from
conditions.campgrounds.campgrounds[]; link the name (website or Google Maps place) and add Google Maps + Gaia map links from each entry's lat/lon.
- Any named location report-wide (campsite, bivy, high camp, named feature, trailhead): accompany with at least Google Maps + Gaia links, per the patterns above. For trip-report-named camps without coordinates, use a Google Maps place search by name and do your best to locate it; if it cannot be located, say so explicitly. Backcountry/high camps come from trip reports, not the campground DB.
Step 4D: Identify Information Gaps
Explicitly document what data was not found or unreliable:
- Missing trip reports
- No GPS tracks available
- Script failures (weather, avalanche, daylight)
- Conflicting information between sources
- Limited seasonal data
Phase 5: Report Generation
Goal: Create comprehensive Markdown document by dispatching Report Writer agent.
Step 5A: Prepare Data Package
Organize all gathered and analyzed data into structured JSON:
{
"peak": {
"name": "{peak_name}",
"id": {peak_id},
"elevation_ft": {elevation},
"coordinates": [{latitude}, {longitude}],
"location": "{location}",
"peakbagger_url": "{url}"
},
"conditions": {
// From fetch_conditions.py output
"weather": {"forecast": [{"date": "...", "snow_line_note": "...", "near_summit": bool, "freezing_level_ft": N, ...}], ...},
"air_quality": {...},
"daylight": {"astronomical_dawn": "...", "nautical_dawn": "...", "civil_twilight": "...", "sunrise": "...", "sunset": "...", "civil_dusk": "...", "nautical_dusk": "...", "astronomical_dusk": "...", "daylight_hours": N},
"avalanche": {...},
"peakbagger": {...},
"counties": {"counties": [{"county_name": "...", "county_fips": "...", "state_name": "...", "state_code": "..."}], "sampled": bool, "sample_points": N}, // sampled + sample_points only present when --trailhead was given
"nearest_hospital": {"hospitals": [{"name": "...", "lat": N, "lon": N, "distance_miles": N, "emergency": "yes|null", "phone": "...", "website": "...", "address": "..." /* phone/website/address optional */}]},
"ranger_station": {"stations": [{"name": "...", "lat": N, "lon": N, "distance_miles": N, "phone": "...", "website": "...", "address": "..." /* optional */}], "admin_district": {"district_name": "...", "forest_name": "...", "region": "..."}},
"campgrounds": {"campgrounds": [{"name": "...", "lat": N, "lon": N, "distance_miles": N, "camp_type": "...", "operator": "...", "website": "..." /* optional */}], "note": "..."},
"time_estimates": {"roped_hr": N, "unroped_hr": N, "fast_hr": N, "moderate_hr": N, "leisurely_hr": N, "note": "..."},
"itinerary": {"start_time": "HH:MM", "summit_eta": "HH:MM", "turnaround_by": "HH:MM", "return_eta": "HH:MM", "total_hr": N, "after_dark": false, "dusk_cutoff": "9:15 PM" /* 12-hr AM/PM format, unlike other time fields */, "note": "..."},
"bearings": {"segments": [{"from": 0, "to": 1, "bearing_deg": N, "distance_mi": N, "cumulative_distance_mi": N}], "total_distance_mi": N}
},
"route_data": {
// Merged from all Researcher agents
"sources": [...],
"trip_reports": [...]
},
"analysis": {
// From Phase 4
"route_type": "{hike|scramble|technical|glacier}",
"difficulty": "{rating}",
"crux": "{description}",
"hazards": [...],
"access": {...}
},
"gaps": [...]
}
Step 5B: Dispatch Report Writer Agent
Task(
subagent_type="general-purpose",
model="sonnet",
prompt="""You are a Report Writer generating a mountaineering route report.
## Instructions
1. **Read the report template:**
Use the Read tool to read: {repo_root}/skills/route-researcher/assets/report-template.md
2. **Generate report following template structure exactly:**
- Header with peak name, elevation, location, date
- AI disclaimer (prominent safety warning)
- Overview: route type, difficulty, distance/gain, time estimates
- Route Description: synthesized from sources, include landmarks
- Crux: describe hardest section with specifics
- Known Hazards: comprehensive list
- Current Conditions: weather forecast, freezing levels, air quality, daylight
- Trip Reports: links organized by source with dates
- Information Gaps: explicitly list missing data
- Data Sources: links to all sources used
3. **Markdown Formatting Rules:**
- ALWAYS add blank line before lists
- ALWAYS add blank line after section headers
- Use `-` for bullets (not `*` or `+`)
- Use `**text**` for bold emphasis
- Break paragraphs >4 sentences
- **Link specific-report attributions.** Any statement attributed to a particular trip/climb report (a date, a quote, "one party…", "a recent report…") MUST be a Markdown link `[date/author](report_url)` to that report's source URL — never plain-text attribution. Pull the URL from the matching `trip_reports[].url` in the data package. Leave only generic/published beta (no specific source) unlinked.
4. **Save the report:**
Use the Write tool to save to the user's current working directory: {date}-{peak-name-slug}.md
## Data Package
{data_package_json}
## Output Format (return EXACTLY this JSON)
```json
{
"status": "SUCCESS",
"file_path": "/absolute/path/to/report.md",
"filename": "YYYY-MM-DD-peak-name.md",
"sections_generated": N
}
```"""
)
Step 5C: Capture Report File Path
Extract file_path from agent's JSON response for use in Phase 6.
Phase 6: Report Review & Validation
Goal: Validate report quality by dispatching Report Reviewer agent.
Step 6A: Dispatch Report Reviewer Agent
Task(
subagent_type="general-purpose",
model="opus",
prompt="""You are a Report Reviewer validating a mountaineering route report.
## Instructions
1. **Read the report:**
Use the Read tool to read: {report_file_path}
2. **Perform systematic quality checks:**
**Factual Consistency:**
- Dates match their stated day-of-week (e.g., "Thu Nov 6, 2025" is actually Thursday)
- Coordinates, elevations, distances consistent across all mentions
- Weather forecasts align logically (freezing levels match precipitation types)
**Mathematical Accuracy:**
- Elevation gains add up correctly
- Time estimates reasonable given distance and elevation gain
- Unit conversions correct (feet to meters, etc.)
**Internal Logic:**
- Hazard warnings align with route descriptions
- Recommendations match current conditions
- Crux descriptions match overall difficulty rating
**Completeness:**
- No placeholder texts like {{peak_name}} or {{YYYY-MM-DD}}
- All referenced links actually provided
- Mandatory sections present: Overview, Route, Current Conditions, Trip Reports, Information Gaps, Data Sources
**Formatting:**
- Markdown headers properly structured
- Lists have blank lines before them
- Tables properly formatted
**Safety & Responsibility:**
- AI disclaimer present and prominent
- Critical hazards properly emphasized
- Users directed to verify information from primary sources
**Emergency contacts & location links (verify INDEPENDENTLY):**
- Each emergency contact (hospital, ranger station) has a working name link (website or a Google Maps place link to the actual entity — NOT bare coordinates), a phone, and an address. Independently confirm the phone/address look right for that named entity (e.g. via its official site / Google Maps); fix or flag mismatches and fill blanks you can confirm.
- Road/gate status is a dated statement with a cited source, not a "go check it yourself" punt.
- Every named place in the report (campsite, bivy, high camp, trailhead, named feature) carries map links (Google Maps + Gaia GPS). Flag any named location missing links.
- Specific trip-report attributions are hyperlinks to their source, not plain text.
3. **Fix issues:**
- **Critical** (safety errors, factual errors, missing disclaimers): MUST fix using Edit tool
- **Important** (completeness, consistency): SHOULD fix
- **Minor** (formatting, polish): FIX if quick
## Output Format (return EXACTLY this JSON)
```json
{
"status": "PASS" | "PASS_WITH_FIXES" | "FAIL",
"issues_found": N,
"fixes_applied": ["description of fix 1", "description of fix 2"],
"remaining_issues": ["issues that couldn't be fixed"],
"report_path": "/absolute/path/to/report.md"
}
```"""
)
Step 6B: Process Validation Results
Handle the reviewer agent's response:
- PASS or PASS_WITH_FIXES: Proceed to Phase 7 with the
report_path
- FAIL: Present
remaining_issues to user and ask for guidance
The Report Reviewer automatically fixes issues and returns the corrected file path.
Phase 7: Completion
Goal: Inform user of completion and next steps.
Report to user:
- Success message: "Route research complete for {Peak Name}"
- File location: Full absolute path to generated report
- Summary: Brief 2-3 sentence overview:
- Route type and difficulty
- Key hazards or considerations
- Any significant information gaps
- Next steps: Encourage user to:
- Review the report
- Verify critical information from primary sources
- Check current conditions before attempting route
- Itinerary and navigation: If the user wants a start-time schedule and/or compass bearings, re-run
fetch_conditions.py with --start-time HH:MM (adds itinerary key) and/or --waypoint lat,lon flags (2+ waypoints add bearings key). Surface after_dark: true as a prominent safety warning.
- Post-climb trip report: After the climb, offer the trip-report template at
skills/route-researcher/assets/trip-report-template.md as a starting point for filing a trip report.
Example completion message:
Route research complete for Mount Baker!
Report saved to: 2025-10-20-mount-baker.md
Summary: Mount Baker via Coleman-Deming route is a moderate glacier climb (Class 3) with significant crevasse hazards. The route involves 5,000+ ft elevation gain and typically requires an alpine start. Weather and avalanche forecasts are included.
Next steps: Review the report and verify current conditions before your climb. Remember that mountain conditions change rapidly - check recent trip reports and weather forecasts immediately before your trip.
Error Handling Principles
Throughout execution, follow these error handling guidelines:
Script Failures
- Don't block: If a Python script fails, note in "Information Gaps" and continue
- Provide alternatives: Include manual check links (Mountain-Forecast.com, NWAC.us)
- One retry: Retry once on network timeouts, then continue
Missing Data
- Be explicit: Always document what wasn't found
- Be helpful: Provide links for manual checking
- Don't guess: Never fabricate data to fill gaps
Search Failures
- Try variations: If peak not found, try alternate names (Mt vs Mount)
- Ask user: If still not found, ask user for clarification or direct URL
- Provide guidance: Suggest how to search PeakBagger manually
WebFetch/WebSearch Issues
- Fetching ladder: WebFetch first →
cloudscrape.py "{url}" (fast httpx, no browser) → cloudscrape.py --render "{url}" (Patchright stealth browser, for JS-rendered or Cloudflare-protected pages)
- When to use
--render: hikeoftheweek.com and any site where the default path returns {"error": ...} on stdout or where content is blocked/JS-rendered
- Graceful degradation: Missing one source shouldn't stop entire research; cloudscrape.py exits 0 on failure
- Document gaps: Note which sources were unavailable (WebFetch AND both cloudscrape.py paths failed)
- Prioritize safety: If critical safety info (avalanche, hazards) unavailable, emphasize in gaps section
Execution Timeouts
- Individual Python scripts: 30s for API calls; up to 120s when --peak-id is provided (peakbagger-cli)
- WebFetch operations: Use default timeout
- WebSearch operations: Use default timeout
- Total skill execution: Target 3-5 minutes, acceptable up to 10 minutes for comprehensive research
Quality Principles
Every generated report must:
- ✅ Include safety disclaimer prominently at top
- ✅ Document all information gaps explicitly
- ✅ Cite sources with links
- ✅ Use current date in filename and metadata
- ✅ Follow template structure exactly
- ✅ Provide actionable information (distances, times, gear)
- ✅ Emphasize verification - this is research, not gospel
Implementation Notes
See `skills/route-researcher/docs/architecture.md
…(truncated)
1---2name: route-researcher3description: Research North American mountain peaks and generate comprehensive route beta reports Use when this capability is needed.4---56# Route Researcher78Research mountain peaks across North America and generate comprehensive route beta reports combining data from multiple sources including PeakBagger, SummitPost, WTA, AllTrails, weather forecasts, avalanche conditions, and trip reports.910**Data Sources:** This skill aggregates information from specialized mountaineering websites (PeakBagger, SummitPost, Washington Trails Association, AllTrails, The Mountaineers, and regional avalanche centers). The quality of the generated report depends on the availability of information on these sources. If your target peak lacks coverage on these websites, the report may contain limited details. The skill works best for well-documented peaks in North America.1112## When to Use This Skill1314Use this skill when the user requests:1516- Research on a specific mountain peak17- Route beta or climbing information18- Trip planning information for peaks19- Current conditions for mountaineering objectives2021Examples:2223- "Research Mt Baker"24- "I'm planning to climb Sahale Peak next month, can you research the route?"25- "Generate route beta for Forbidden Peak"2627## Progress Checklist2829Research Progress:3031- [ ] Phase 1: Peak Identification (peak validated, ID obtained)32- [ ] Phase 2: Peak Information Retrieval (coordinates and details obtained)33- [ ] Phase 3: Data Gathering (parallel execution)34 - [ ] Phase 3a: Python conditions fetch (weather, air quality, daylight, avalanche, peakbagger stats/ascents)35 - [ ] Phase 3b: Researcher agents (3 in parallel - web sources + trip reports)36 - [ ] Phase 3c: Results aggregated37 - [ ] Phase 3d: Access/permits (inline WebSearch)38- [ ] Phase 4: Route Analysis (synthesize route, crux, hazards)39- [ ] Phase 5: Report Generation (Report Writer agent)40- [ ] Phase 6: Report Review & Validation (Report Reviewer agent)41- [ ] Phase 7: Completion (user notified, next steps provided)4243## Orchestration Workflow4445### Phase 1: Peak Identification4647**Goal:** Identify and validate the specific peak to research.48491. **Extract Peak Name** from user message50 - Look for peak names, mountain names, or climbing objectives51 - Common patterns: "Mt Baker", "Mount Rainier", "Sahale Peak", etc.52532. **Search PeakBagger** using peakbagger-cli:5455 ```bash56 uvx --from "git+https://github.com/dreamiurg/peakbagger-cli.git@v1.10.0" peakbagger peak search "{peak_name}" --format json57 ```5859 - Parse JSON output to extract peak matches60 - Each result includes: peak_id, name, elevation (feet/meters), location, url61623. **Handle Multiple Matches:**63 - If **multiple peaks** found: Use AskUserQuestion to present options64 - For each option, show: peak name, elevation, location, AND PeakBagger URL65 - Format each option description as: "[Peak Name] ([Elevation], [Location]) - [PeakBagger URL]"66 - This allows user to click through and verify the correct peak67 - Let user select the correct peak68 - Provide "Other" option if none match6970 - If **single match** found: Confirm with user71 - Present confirmation message with peak details and PeakBagger link72 - Show: "Found: [Peak Name] ([Elevation], [Location])"73 - Include PeakBagger URL in the message so user can verify: "[PeakBagger URL]"74 - Use AskUserQuestion: "Is this the correct peak? You can verify at [PeakBagger URL]"7576 - If **no matches** found:77 - Try peak name variations systematically (see "Peak Name Variations" section):78 - **Word order reversal:** "Mountain Pratt" → "Pratt Mountain"79 - **Title variations:** Mt/Mount, St/Saint80 - **Add location:** Include state or range name81 - **Remove titles:** Try just the core name82 - Run multiple searches in parallel with different variations83 - Combine results and present best matches to user84 - If still no results, use AskUserQuestion to ask for:85 - A different peak name variation86 - Direct PeakBagger peak ID or URL87 - General PeakBagger search88894. **Extract Peak ID:**90 - From search results JSON, extract the `peak_id` field91 - Store for use in subsequent peakbagger-cli commands92 - Also store the PeakBagger URL for reference links9394### Phase 2: Peak Information Retrieval9596**Goal:** Get detailed peak information and coordinates needed for location-based data gathering.9798This phase must complete before Phase 3, as coordinates are required for weather, daylight, and avalanche data.99100Retrieve detailed peak information using the peak ID from Phase 1:101102```bash103uvx --from "git+https://github.com/dreamiurg/peakbagger-cli.git@v1.10.0" peakbagger peak show {peak_id} --format json104```105106This returns structured JSON with:107108- Peak name and alternate names109- Elevation (feet and meters)110- Prominence (feet and meters)111- Isolation (miles and kilometers)112- Coordinates (latitude, longitude in decimal degrees)113- Location (county, state, country)114- Routes (if available): trailhead, distance, vertical gain115- Peak list memberships and rankings116- Standard route description (if available in routes data)117118**Error Handling:**119120- If peakbagger-cli fails: Fall back to WebSearch/WebFetch and note in "Information Gaps"121- If specific fields missing in JSON: Mark as "Not available" in gaps section122- Rate limiting: Built into peakbagger-cli (default 2 second delay)123124**Once coordinates are obtained from this step, immediately proceed to Phase 3.**125126### Phase 3: Data Gathering127128**Goal:** Gather comprehensive route information from all available sources.129130**Execution Strategy:** Run Python script for deterministic API data + dispatch specialized agents in parallel for web research. This hybrid approach minimizes token usage while maximizing parallelism.131132#### Step 3A: Fetch Conditions Data (Python Script)133134Run the conditions fetcher script to gather all API-based data:135136```bash137cd "{repo_root}/skills/route-researcher/tools"138uv run python fetch_conditions.py \139 --coordinates "{latitude},{longitude}" \140 --elevation {elevation_m} \141 --peak-name "{peak_name}" \142 --peak-id {peak_id} \143 --trailhead "{trailhead_lat},{trailhead_lon}" \144 --distance-mi {round_trip_distance_mi} \145 --gain-ft {total_gain_ft} \146 --start-time "{HH:MM}" \147 --waypoint "{lat1},{lon1}" --waypoint "{lat2},{lon2}"148```149150Optional args: `--trailhead` enables multi-county path sampling (trailhead→summit); hospital/ranger lookups always run from the summit regardless; `--distance-mi`/`--gain-ft` enable `time_estimates`; `--start-time` (with distance + gain) enables `itinerary`; `--waypoint` (2+) enables `bearings`.151152This returns JSON with:153154- **weather**: 7-day forecast with temperatures, precipitation, freezing levels; each day includes `snow_line_note` (human-readable framing of freezing level as snow line) and `near_summit` (bool: true when freezing level within 2000 ft of summit)155- **air_quality**: AQI ratings and any concerns156- **daylight**: Full twilight table — `astronomical_dawn`, `nautical_dawn`, `civil_twilight` (dawn), `sunrise`, `sunset`, `civil_dusk`, `nautical_dusk`, `astronomical_dusk`; values are `null` at high latitudes when sun doesn't reach threshold (white nights); `daylight_hours`, `timezone`157- **time_estimates**: Roped/unroped + 3-tier pacing (`roped_hr`, `unroped_hr`, `fast_hr`, `moderate_hr`, `leisurely_hr`) — only present when `--distance-mi` and `--gain-ft` CLI args are provided158- **itinerary**: Trip schedule with safety signals (`start_time`, `summit_eta`, `turnaround_by`, `return_eta`, `total_hr`, `after_dark` bool, `dusk_cutoff`, `note`) — only present when `--start-time`, `--distance-mi`, AND `--gain-ft` are all provided; `after_dark: true` is a safety warning that must be prominently surfaced; `total_hr` is the full round-trip duration in hours159- **bearings**: Navigation bearings between waypoints (`segments[]` with `bearing_deg`, `distance_mi`, `cumulative_distance_mi`; `total_distance_mi`) — only present when 2 or more `--waypoint "lat,lon"` args are provided160- **avalanche**: NWAC region and URL for manual check161- **peakbagger**: Ascent statistics and recent ascents (if peak_id provided)162- **counties**: Counties traversed trailhead→summit (`counties[]` with `county_name`, `county_fips`, `state_name`, `state_code`); `sampled` bool and `sample_points` int indicate whether path sampling ran (requires `--trailhead`); without `--trailhead` only the summit county is returned163- **nearest_hospital**: Nearest hospitals/ERs (`hospitals[]` with `name`, `lat`, `lon`, `distance_miles`, `emergency`, and `phone`/`website`/`address` when OSM has them); sorted emergency-first then by distance; max 3164- **ranger_station**: Nearest ranger stations (`stations[]` with `name`, `lat`, `lon`, `distance_miles`, and `phone`/`website`/`address` when present) + optional `admin_district` (`district_name`, `forest_name`, `region`) when the summit coordinates intersect a USFS ranger district165- **campgrounds**: Established campgrounds within ~12 mi (20 km) (`campgrounds[]` with `name`, `lat`, `lon`, `distance_miles`, `camp_type`, `backcountry`, `operator`, and `website` when present); backcountry/high camps are NOT included — extract those from trip reports166- **gaps**: Any API failures noted for report167168**Run this in parallel with Step 3B** — include both the Bash command for fetch_conditions.py and all 3 Task calls in the same response turn to maximize parallelism.169170#### Step 3B: Dispatch Researcher Agents (Parallel)171172Dispatch 3 Researcher agents in a single message (all Task calls together). Each agent researches assigned sources and fetches trip report content directly.173174**Agent 1: PeakBagger + SummitPost**175176```177Task(178 subagent_type="general-purpose",179 model="sonnet",180 prompt="""You are a route researcher gathering mountaineering data for {peak_name}.181182## Your Assignment183Research from these sources: PeakBagger, SummitPost184185## PeakBagger Research1861. Search: "{peak_name} site:peakbagger.com"1872. Extract route descriptions from peak page1883. List recent ascents with trip reports:189 ```bash190 uvx --from "git+https://github.com/dreamiurg/peakbagger-cli.git@v1.10.0" peakbagger peak ascents {peak_id} --format json --with-tr --limit 20191 ```1921934. Identify trip reports with content (word_count > 0)1945. Fetch content for up to 5 recent trip reports using:195196 ```bash197 uvx --from "git+https://github.com/dreamiurg/peakbagger-cli.git@v1.10.0" peakbagger ascent show {ascent_id} --format json198 ```199200## SummitPost Research2012021. Search: "{peak_name} site:summitpost.org"2032. Use WebFetch to extract: route name, difficulty, approach, description, hazards2043. If WebFetch fails, use the fetching ladder:205206 ```bash207 # Fast path (httpx with browser-like headers, no browser)208 uv run python {repo_root}/skills/route-researcher/tools/cloudscrape.py "{url}"209210 # If the above returns {"error": ...} or content is blocked/JS-rendered:211 uv run python {repo_root}/skills/route-researcher/tools/cloudscrape.py --render "{url}"212 ```213214## Trip Report Extraction215216For each report fetched, extract:217- date, author, route conditions, gear mentioned218- **Hazards (extract explicitly and separately):**219 - Rockfall zones: location on route, conditions, timing guidance mentioned220 - Icefall/serac hazard: location, stability, pre-dawn/timing advice221 - Cornice hazard: location, buildup direction, avoidance notes222- **Terrain detail (extract if mentioned):**223 - Downclimb sections: location, difficulty, rappel anchors if any224 - River/stream crossings: location, flow conditions, ford difficulty225 - Water sources: named locations, seasonal availability226 - Named camps or bivy sites: name/location, exposure notes227228## Output Format (return EXACTLY this JSON)229230```json231{232 "sources": ["PeakBagger", "SummitPost"],233 "route_info": [234 {"source": "...", "name": "...", "difficulty": "...", "description": "...", "hazards": [...]}235 ],236 "trip_reports": [237 {"source": "...", "date": "...", "author": "...", "url": "...", "summary": "...", "conditions": "...", "has_gpx": false,238 "rockfall": "...", "icefall": "...", "cornices": "...",239 "downclimbs": "...", "crossings": "...", "water_sources": "...", "camps": "..."}240 ],241 "gaps": ["what couldn't be fetched and why"]242}243```"""244)245```246247**Agent 2: WTA + Mountaineers + Regional Sources**248249```250Task(251 subagent_type="general-purpose",252 model="sonnet",253 prompt="""You are a route researcher gathering mountaineering data for {peak_name}.254255## Your Assignment256Research from these sources: WTA, Mountaineers.org, northwesthikers.net, hikeoftheweek.com, Oregon Hikers Field Guide (oregonhikers.org), Cascade Climbers (cascadeclimbers.com), Mountain Project257258## WTA Research2591. Search: "{peak_name} site:wta.org"2602. Find the hike page and extract: trail name, difficulty, distance, elevation gain, hazards2613. Get trip reports from AJAX endpoint: {wta_url}/@@related_tripreport_listing2624. Fetch content for up to 5 recent trip reports using the fetching ladder:263 ```bash264 # Fast path first265 uv run python {repo_root}/skills/route-researcher/tools/cloudscrape.py "{trip_report_url}"266267 # If output contains {"error": ...} or content is blocked/JS-rendered:268 uv run python {repo_root}/skills/route-researcher/tools/cloudscrape.py --render "{trip_report_url}"269 ```270271## Mountaineers Research2722731. Search: "{peak_name} site:mountaineers.org route"2742. Extract route beta, technical requirements, hazards275276## NWHikers Research (northwesthikers.net / nwhikers.net)2772781. Search: "{peak_name} site:nwhikers.net OR site:northwesthikers.net"2792. Use WebFetch to extract first-person trip reports, GPS track notes, conditions2803. If WebFetch fails, use `cloudscrape.py "{url}"` (fast path usually sufficient)281282## Hike of the Week (hikeoftheweek.com — REQUIRES --render)2832841. Search: "{peak_name} site:hikeoftheweek.com"2852. **MUST use `--render` flag** — site is Cloudflare-protected and blocks WebFetch:286287 ```bash288 uv run python {repo_root}/skills/route-researcher/tools/cloudscrape.py --render "{url}"289 ```2902913. Extract: logistics, route narrative, access notes, trailhead directions292293## Oregon Hikers Field Guide (oregonhikers.org — Oregon objectives only)2942951. Search: "{peak_name} site:oregonhikers.org"2962. Use WebFetch — site is static MediaWiki HTML, WebFetch-friendly2973. Extract: route description, access, permits, conditions notes298299## Cascade Climbers (cascadeclimbers.com)3003011. Search: "{peak_name} site:cascadeclimbers.com"3022. Use WebFetch; if blocked use `cloudscrape.py "{url}"`3033. Extract: technical route beta, gear lists, trip reports, conditions304305## Mountain Project (for technical/rock sections)3063071. Search: "{peak_name} site:mountainproject.com"3082. Use WebFetch to extract: route name, grade, gear, description, rock quality3093. If WebFetch fails, use `cloudscrape.py "{url}"`310311## Fallback312313If WebFetch fails for any page, use the fetching ladder: `cloudscrape.py "{url}"` (fast) → `cloudscrape.py --render "{url}"` for JS-rendered or Cloudflare-protected pages.314315## Trip Report Extraction316317For each report fetched, extract:318- date, author, route conditions, gear mentioned319- **Hazards (extract explicitly and separately):**320 - Rockfall zones: location on route, conditions, timing guidance mentioned321 - Icefall/serac hazard: location, stability, pre-dawn/timing advice322 - Cornice hazard: location, buildup direction, avoidance notes323- **Terrain detail (extract if mentioned):**324 - Downclimb sections: location, difficulty, rappel anchors if any325 - River/stream crossings: location, flow conditions, ford difficulty326 - Water sources: named locations, seasonal availability327 - Named camps or bivy sites: name/location, exposure notes328329## Output Format (return EXACTLY this JSON)330331```json332{333 "sources": ["WTA", "Mountaineers", "NWHikers", "HikeOfTheWeek", "OregonHikers", "CascadeClimbers", "MountainProject"],334 "route_info": [335 {"source": "...", "name": "...", "difficulty": "...", "description": "...", "hazards": [...]}336 ],337 "trip_reports": [338 {"source": "...", "date": "...", "author": "...", "url": "...", "summary": "...", "conditions": "...", "has_gpx": false,339 "rockfall": "...", "icefall": "...", "cornices": "...",340 "downclimbs": "...", "crossings": "...", "water_sources": "...", "camps": "..."}341 ],342 "gaps": ["what couldn't be fetched and why"]343}344```"""345)346```347348**Agent 3: AllTrails**349350```351Task(352 subagent_type="general-purpose",353 model="sonnet",354 prompt="""You are a route researcher gathering mountaineering data for {peak_name}.355356## Your Assignment357Research from AllTrails358359## AllTrails Research3601. Search: "{peak_name} site:alltrails.com"3612. Use WebFetch to extract: trail name, difficulty, distance, elevation gain, route type, best season, hazards3623. If WebFetch fails, use:363 ```bash364 uv run python {repo_root}/skills/route-researcher/tools/cloudscrape.py "{url}"365 ```3663674. From route description and any visible reviews/comments, extract if present:368 - Rockfall zones, icefall/serac hazard, cornice hazard369 - Downclimb sections, river/stream crossings, water sources, named camps370371## Output Format (return EXACTLY this JSON)372373```json374{375 "sources": ["AllTrails"],376 "route_info": [377 {"source": "...", "name": "...", "difficulty": "...", "distance_miles": N, "elevation_gain_ft": N, "description": "...", "hazards": [...],378 "rockfall": "...", "icefall": "...", "cornices": "...",379 "downclimbs": "...", "crossings": "...", "water_sources": "...", "camps": "..."}380 ],381 "trip_reports": [],382 "gaps": ["what couldn't be fetched and why"]383}384```"""385)386```387388**Execute all 3 agents in parallel by including all Task calls in a single response.**389390#### Step 3C: Aggregate Results391392After Python script and all agents return, aggregate into unified data structure:393394```json395{396 "conditions": { /* from fetch_conditions.py */ },397 "route_data": {398 "sources": [ /* merged from all 3 agents */ ],399 "trip_reports": [ /* merged from all agents */ ]400 },401 "gaps": [ /* merged gaps from all sources */ ]402}403```404405**Partial Failure Handling:**406407- If any agent fails entirely, proceed with data from successful agents408- Note failed sources in the gaps array409- Minimum viable: conditions data + at least one route source410411#### Step 3D: Access, Permits, and Road/Gate Status (Inline)412413Determine permits AND the **current road/gate status** to the trailhead — do not just tell the user to go check. Actively research and report the actual status with a source and date.414415**Permits:**416417```418WebSearch: "{peak_name} trailhead access" ; "{peak_name} permit requirements"419```420421**Road / gate status workflow** (identify the access highway + forest road + managing agency first, then check sources in order; capture each source URL for the report):4224231. **State DOT pass report** (WA → WSDOT): fetch the relevant pass page, e.g. `https://wsdot.com/travel/real-time/mountainpasses/mt.-baker` (SR-542) or `.../north-cascades` (SR-20). Read `RoadCondition` / `TravelAdvisoryActive` / restrictions. Other states: `WebSearch "{state} DOT mountain pass report {highway}"`.4242. **USFS forest alerts/conditions**: fetch `https://www.fs.usda.gov/{region}/{forest-shortname}/alerts` (e.g. `r06/mbs/alerts`) and `/conditions`; search the page for the road number / trailhead name → closure milepost, reason, seasonal gate. Also `WebSearch "{forest name} {road or trailhead} road open {year}"` for seasonal-opening press releases.4253. **NPS road conditions** (if in/through a national park): fetch `https://www.nps.gov/{park-code}/planyourvisit/road-conditions.htm` (e.g. `noca`, `mora`, `olym`) → per-road OPEN/CLOSED + milepost.4264. **WTA ground truth** (PNW): `WebSearch "site:wta.org {trail} gate road open closed {year}"` or fetch the hike page; scan the 3-5 most recent trip reports for "gate"/"road open/closed"/"drove to" (use `cloudscrape.py --render` if WTA 403s).4275. **InciWeb fire closures** (Jul-Oct): `WebSearch "inciweb {area} closure {trailhead} {year}"`; if an active incident is near the trailhead, read its closure page.428429**Synthesize** into a dated status statement for the report's Road Conditions section:430> "Gate/road status (as of {date}): {road} is {OPEN/CLOSED/SEASONAL GATE/UNKNOWN} per [source](url). {If closed: gate at {milepost}, adds ~{N} mi each way.}"431432If no source confirms it, say so explicitly and include the managing ranger station phone as the fallback. Add trailhead names, permits, the status statement, and all source URLs to route_data.433434### Phase 4: Route Analysis435436**Goal:** Analyze gathered data to determine route characteristics and synthesize information.437438#### Step 4A: Determine Route Type439440Based on route descriptions, elevation, and gear mentions, classify as:441442- **Glacier:** Crevasses mentioned, glacier travel, typically >8000ft443- **Rock:** Technical climbing, YDS ratings (5.x), protection mentioned444- **Scramble:** Class 2-4, exposed but non-technical445- **Hike:** Class 1-2, trail-based, minimal exposure446447#### Step 4B: Synthesize Route Information from Multiple Sources448449**Goal:** Combine trip reports and route descriptions from Step 3B researcher agents, plus conditions data from Step 3A, into comprehensive route beta.450451**Source Priority:**4524531. Trip reports (Step 3B agents) - first-hand experiences4542. Route descriptions (Step 3B agents) - published beta baseline4553. PeakBagger/ascent data (Step 3A Python script) - basic info, patterns456457**Synthesis Pattern for Route, Crux, and Hazards:**4584591. **Start with baseline** from route descriptions (standard route name, published difficulty)4602. **Enrich with trip report details** (landmarks, specific conditions, actual experiences)4613. **Note conflicts** when trip reports disagree with published info4624. **Highlight consensus** ("Multiple reports mention...")4635. **Include specifics** (elevations, locations, quotes)4646. **Link every specific-report attribution to its source.** Whenever a detail is drawn from a *particular* trip/climb report (a date, a quote, "one party found…", "a recent report noted…"), the attribution MUST be a Markdown hyperlink to that report's URL — never plain text. Carry each trip report's `url` (and date/author) through synthesis so it can be linked; use the date/author as the link text. For consensus phrasing ("multiple reports mention…"), link 2-3 of the contributing reports inline. Only general/published beta with no specific source stays unlinked.465466**Example (Route Description):**467> "The standard route follows the East Ridge (Class 3). A [Sep 2025 party](https://www.peakbagger.com/climber/ascent.aspx?aid=12345) found a well-cairned use trail branching right at 4,800 ft—the correct turn—through talus they called 'tedious' and 'ankle-rolling'. An [Oct 2025 report](https://www.wta.org/go-hiking/trip-reports/trip_report.123) noted the section was snow-covered, requiring microspikes."468469**Apply this pattern to:**470471- **Route:** Use baseline structure, add landmarks/navigation from trip reports, include actual times472- **Crux:** Describe location/difficulty, add trip report assessments, note conditions-dependent variations473- **Hazards:** Extract ALL hazards from trip reports. Organize by type with explicit, SEPARATE sub-sections — do NOT bury rockfall or icefall under generic "exposure":474 - **Rockfall:** tag location, trigger (other parties / freeze-thaw / sun hitting the face), timing mitigation (pre-dawn passage, move quickly through zone)475 - **Icefall/Serac:** tag location, stability assessment, timing mitigation (avoid afternoon, pre-dawn passage)476 - **Cornice:** tag location, avoidance line, conditions (buildup direction, season)477 - Other hazards (crevasses, exposure, route-finding, seasonal) as separate bullets478 - Be comprehensive — safety-critical; include specific locations and mitigation strategies479- **Terrain detail:** Surface the following in the report when found in trip reports/beta:480 - Downclimbs: location, difficulty, whether rappel anchors exist481 - River/stream crossings: location, seasonal flow, ford difficulty482 - Water sources: named locations and per-day availability by season483 - Named camps/bivy sites: name, location, exposure; note these come from trip reports, not the campground database484485**Extract Key Information:**486487From all synthesized data, identify:488489- **Difficulty Rating:** YDS class, scramble grade, or general difficulty (validated by trip reports)490- **Crux:** Hardest/most technical section of route (synthesized above)491- **Hazards:** All identified hazards (synthesized above)492- **Notable Gear:** Any unusual or important gear mentioned in trip reports or beta (to be included in relevant sections, not as standalone section)493- **Trailhead:** Name and approximate location494- **Distance/Gain:** Round-trip distance and elevation gain (compare published vs actual trip report data)495- **Time Estimates:** Use `conditions.time_estimates` (keys: `fast_hr`, `moderate_hr`, `leisurely_hr`, `roped_hr`, `unroped_hr`) from fetch_conditions.py output — present only when it was called with `--distance-mi` and `--gain-ft`. If `time_estimates` is absent from the conditions data, note it in Information Gaps. **To populate it:** re-invoke fetch_conditions.py with `--distance-mi {distance}` and `--gain-ft {gain}` once route distance/gain are known from Step 3B research. At the same time, add `--start-time HH:MM` to get `itinerary` and `--waypoint` args to get `bearings` — these optional outputs only activate when the args are supplied.496- **Freezing Level Analysis:** Compare peak elevation with forecasted freezing levels:497 - **Include Freezing Level Alert if:** Any day in forecast has freezing level within 2000 ft of peak elevation498 - **Omit if:** Freezing level stays >2000 ft above peak throughout forecast (typical summer conditions)499 - Example: 5,469 ft peak with 5,000-8,000 ft freezing levels → Include alert (marginal conditions)500 - Example: 4,000 ft peak with 10,000+ ft freezing levels → Omit alert (well above summit)501502#### Step 4C: Surface Geodata in Report503504Include these geodata fields when available. **Every place named in the report must be a link** — see the link patterns below.505506**Place / map link patterns** (build from a place's `lat`/`lon` and `name`):507508- Google Maps **place** (named entity): `https://www.google.com/maps/search/?api=1&query={URL-encoded name + address}` — use this (not bare coordinates) for hospitals, ranger stations, campgrounds, and any named place, so the link resolves to the actual entity. When only coordinates are meaningful, `query={lat},{lon}`.509- Gaia GPS: `https://www.gaiagps.com/map/?loc=14/{lon}/{lat}` (zoom/lon/lat).510- CalTopo: `https://caltopo.com/map.html#ll={lat},{lon}&z=14&b=mbt`.511512Surfacing rules:513514- **Counties:** list `county_name + state_name` from `conditions.counties.counties[]` in the Overview. Empty/`error` → Information Gaps.515- **Emergency contacts:** build the table from `conditions.nearest_hospital.hospitals[]` and `conditions.ranger_station` (stations + admin_district). **Link each name** to its `website` if present, else a Google Maps place search by `name + address`. **Always include phone AND address columns** — each entry now carries `phone`/`website`/`address`/`lat`/`lon` when OSM has them; if `phone` or `address` is missing, make a best effort to find the entity's real phone/address (its official site or Google Maps listing) before writing "—". Missing/`error` → note in Information Gaps.516- **Campgrounds:** build the Camping table from `conditions.campgrounds.campgrounds[]`; link the name (website or Google Maps place) and add Google Maps + Gaia map links from each entry's `lat`/`lon`.517- **Any named location report-wide** (campsite, bivy, high camp, named feature, trailhead): accompany with at least Google Maps + Gaia links, per the patterns above. For trip-report-named camps without coordinates, use a Google Maps place search by name and do your best to locate it; if it cannot be located, say so explicitly. Backcountry/high camps come from trip reports, not the campground DB.518519#### Step 4D: Identify Information Gaps520521Explicitly document what data was **not found or unreliable:**522523- Missing trip reports524- No GPS tracks available525- Script failures (weather, avalanche, daylight)526- Conflicting information between sources527- Limited seasonal data528529### Phase 5: Report Generation530531**Goal:** Create comprehensive Markdown document by dispatching Report Writer agent.532533#### Step 5A: Prepare Data Package534535Organize all gathered and analyzed data into structured JSON:536537```json538{539 "peak": {540 "name": "{peak_name}",541 "id": {peak_id},542 "elevation_ft": {elevation},543 "coordinates": [{latitude}, {longitude}],544 "location": "{location}",545 "peakbagger_url": "{url}"546 },547 "conditions": {548 // From fetch_conditions.py output549 "weather": {"forecast": [{"date": "...", "snow_line_note": "...", "near_summit": bool, "freezing_level_ft": N, ...}], ...},550 "air_quality": {...},551 "daylight": {"astronomical_dawn": "...", "nautical_dawn": "...", "civil_twilight": "...", "sunrise": "...", "sunset": "...", "civil_dusk": "...", "nautical_dusk": "...", "astronomical_dusk": "...", "daylight_hours": N},552 "avalanche": {...},553 "peakbagger": {...},554 "counties": {"counties": [{"county_name": "...", "county_fips": "...", "state_name": "...", "state_code": "..."}], "sampled": bool, "sample_points": N}, // sampled + sample_points only present when --trailhead was given555 "nearest_hospital": {"hospitals": [{"name": "...", "lat": N, "lon": N, "distance_miles": N, "emergency": "yes|null", "phone": "...", "website": "...", "address": "..." /* phone/website/address optional */}]},556 "ranger_station": {"stations": [{"name": "...", "lat": N, "lon": N, "distance_miles": N, "phone": "...", "website": "...", "address": "..." /* optional */}], "admin_district": {"district_name": "...", "forest_name": "...", "region": "..."}},557 "campgrounds": {"campgrounds": [{"name": "...", "lat": N, "lon": N, "distance_miles": N, "camp_type": "...", "operator": "...", "website": "..." /* optional */}], "note": "..."},558 "time_estimates": {"roped_hr": N, "unroped_hr": N, "fast_hr": N, "moderate_hr": N, "leisurely_hr": N, "note": "..."},559 "itinerary": {"start_time": "HH:MM", "summit_eta": "HH:MM", "turnaround_by": "HH:MM", "return_eta": "HH:MM", "total_hr": N, "after_dark": false, "dusk_cutoff": "9:15 PM" /* 12-hr AM/PM format, unlike other time fields */, "note": "..."},560 "bearings": {"segments": [{"from": 0, "to": 1, "bearing_deg": N, "distance_mi": N, "cumulative_distance_mi": N}], "total_distance_mi": N}561 },562 "route_data": {563 // Merged from all Researcher agents564 "sources": [...],565 "trip_reports": [...]566 },567 "analysis": {568 // From Phase 4569 "route_type": "{hike|scramble|technical|glacier}",570 "difficulty": "{rating}",571 "crux": "{description}",572 "hazards": [...],573 "access": {...}574 },575 "gaps": [...]576}577```578579#### Step 5B: Dispatch Report Writer Agent580581```582Task(583 subagent_type="general-purpose",584 model="sonnet",585 prompt="""You are a Report Writer generating a mountaineering route report.586587## Instructions5885891. **Read the report template:**590 Use the Read tool to read: {repo_root}/skills/route-researcher/assets/report-template.md5915922. **Generate report following template structure exactly:**593 - Header with peak name, elevation, location, date594 - AI disclaimer (prominent safety warning)595 - Overview: route type, difficulty, distance/gain, time estimates596 - Route Description: synthesized from sources, include landmarks597 - Crux: describe hardest section with specifics598 - Known Hazards: comprehensive list599 - Current Conditions: weather forecast, freezing levels, air quality, daylight600 - Trip Reports: links organized by source with dates601 - Information Gaps: explicitly list missing data602 - Data Sources: links to all sources used6036043. **Markdown Formatting Rules:**605 - ALWAYS add blank line before lists606 - ALWAYS add blank line after section headers607 - Use `-` for bullets (not `*` or `+`)608 - Use `**text**` for bold emphasis609 - Break paragraphs >4 sentences610 - **Link specific-report attributions.** Any statement attributed to a particular trip/climb report (a date, a quote, "one party…", "a recent report…") MUST be a Markdown link `[date/author](report_url)` to that report's source URL — never plain-text attribution. Pull the URL from the matching `trip_reports[].url` in the data package. Leave only generic/published beta (no specific source) unlinked.6116124. **Save the report:**613 Use the Write tool to save to the user's current working directory: {date}-{peak-name-slug}.md614615## Data Package616617{data_package_json}618619## Output Format (return EXACTLY this JSON)620```json621{622 "status": "SUCCESS",623 "file_path": "/absolute/path/to/report.md",624 "filename": "YYYY-MM-DD-peak-name.md",625 "sections_generated": N626}627```"""628)629```630631#### Step 5C: Capture Report File Path632633Extract `file_path` from agent's JSON response for use in Phase 6.634635### Phase 6: Report Review & Validation636637**Goal:** Validate report quality by dispatching Report Reviewer agent.638639#### Step 6A: Dispatch Report Reviewer Agent640641```642Task(643 subagent_type="general-purpose",644 model="opus",645 prompt="""You are a Report Reviewer validating a mountaineering route report.646647## Instructions6486491. **Read the report:**650 Use the Read tool to read: {report_file_path}6516522. **Perform systematic quality checks:**653654 **Factual Consistency:**655 - Dates match their stated day-of-week (e.g., "Thu Nov 6, 2025" is actually Thursday)656 - Coordinates, elevations, distances consistent across all mentions657 - Weather forecasts align logically (freezing levels match precipitation types)658659 **Mathematical Accuracy:**660 - Elevation gains add up correctly661 - Time estimates reasonable given distance and elevation gain662 - Unit conversions correct (feet to meters, etc.)663664 **Internal Logic:**665 - Hazard warnings align with route descriptions666 - Recommendations match current conditions667 - Crux descriptions match overall difficulty rating668669 **Completeness:**670 - No placeholder texts like {{peak_name}} or {{YYYY-MM-DD}}671 - All referenced links actually provided672 - Mandatory sections present: Overview, Route, Current Conditions, Trip Reports, Information Gaps, Data Sources673674 **Formatting:**675 - Markdown headers properly structured676 - Lists have blank lines before them677 - Tables properly formatted678679 **Safety & Responsibility:**680 - AI disclaimer present and prominent681 - Critical hazards properly emphasized682 - Users directed to verify information from primary sources683684 **Emergency contacts & location links (verify INDEPENDENTLY):**685 - Each emergency contact (hospital, ranger station) has a working name link (website or a Google Maps place link to the actual entity — NOT bare coordinates), a phone, and an address. Independently confirm the phone/address look right for that named entity (e.g. via its official site / Google Maps); fix or flag mismatches and fill blanks you can confirm.686 - Road/gate status is a dated statement with a cited source, not a "go check it yourself" punt.687 - Every named place in the report (campsite, bivy, high camp, trailhead, named feature) carries map links (Google Maps + Gaia GPS). Flag any named location missing links.688 - Specific trip-report attributions are hyperlinks to their source, not plain text.6896903. **Fix issues:**691 - **Critical** (safety errors, factual errors, missing disclaimers): MUST fix using Edit tool692 - **Important** (completeness, consistency): SHOULD fix693 - **Minor** (formatting, polish): FIX if quick694695## Output Format (return EXACTLY this JSON)696```json697{698 "status": "PASS" | "PASS_WITH_FIXES" | "FAIL",699 "issues_found": N,700 "fixes_applied": ["description of fix 1", "description of fix 2"],701 "remaining_issues": ["issues that couldn't be fixed"],702 "report_path": "/absolute/path/to/report.md"703}704```"""705)706```707708#### Step 6B: Process Validation Results709710Handle the reviewer agent's response:711712- **PASS or PASS_WITH_FIXES:** Proceed to Phase 7 with the `report_path`713- **FAIL:** Present `remaining_issues` to user and ask for guidance714715The Report Reviewer automatically fixes issues and returns the corrected file path.716717### Phase 7: Completion718719**Goal:** Inform user of completion and next steps.720721Report to user:7227231. **Success message:** "Route research complete for {Peak Name}"7242. **File location:** Full absolute path to generated report7253. **Summary:** Brief 2-3 sentence overview:726 - Route type and difficulty727 - Key hazards or considerations728 - Any significant information gaps7294. **Next steps:** Encourage user to:730 - Review the report731 - Verify critical information from primary sources732 - Check current conditions before attempting route733 - **Itinerary and navigation**: If the user wants a start-time schedule and/or compass bearings, re-run `fetch_conditions.py` with `--start-time HH:MM` (adds `itinerary` key) and/or `--waypoint lat,lon` flags (2+ waypoints add `bearings` key). Surface `after_dark: true` as a prominent safety warning.734 - **Post-climb trip report**: After the climb, offer the trip-report template at `skills/route-researcher/assets/trip-report-template.md` as a starting point for filing a trip report.735736**Example completion message:**737738```739Route research complete for Mount Baker!740741Report saved to: 2025-10-20-mount-baker.md742743Summary: Mount Baker via Coleman-Deming route is a moderate glacier climb (Class 3) with significant crevasse hazards. The route involves 5,000+ ft elevation gain and typically requires an alpine start. Weather and avalanche forecasts are included.744745Next steps: Review the report and verify current conditions before your climb. Remember that mountain conditions change rapidly - check recent trip reports and weather forecasts immediately before your trip.746```747748## Error Handling Principles749750Throughout execution, follow these error handling guidelines:751752### Script Failures753754- **Don't block:** If a Python script fails, note in "Information Gaps" and continue755- **Provide alternatives:** Include manual check links (Mountain-Forecast.com, NWAC.us)756- **One retry:** Retry once on network timeouts, then continue757758### Missing Data759760- **Be explicit:** Always document what wasn't found761- **Be helpful:** Provide links for manual checking762- **Don't guess:** Never fabricate data to fill gaps763764### Search Failures765766- **Try variations:** If peak not found, try alternate names (Mt vs Mount)767- **Ask user:** If still not found, ask user for clarification or direct URL768- **Provide guidance:** Suggest how to search PeakBagger manually769770### WebFetch/WebSearch Issues771772- **Fetching ladder:** WebFetch first → `cloudscrape.py "{url}"` (fast httpx, no browser) → `cloudscrape.py --render "{url}"` (Patchright stealth browser, for JS-rendered or Cloudflare-protected pages)773- **When to use `--render`:** hikeoftheweek.com and any site where the default path returns `{"error": ...}` on stdout or where content is blocked/JS-rendered774- **Graceful degradation:** Missing one source shouldn't stop entire research; cloudscrape.py exits 0 on failure775- **Document gaps:** Note which sources were unavailable (WebFetch AND both cloudscrape.py paths failed)776- **Prioritize safety:** If critical safety info (avalanche, hazards) unavailable, emphasize in gaps section777778## Execution Timeouts779780- **Individual Python scripts:** 30s for API calls; up to 120s when --peak-id is provided (peakbagger-cli)781- **WebFetch operations:** Use default timeout782- **WebSearch operations:** Use default timeout783- **Total skill execution:** Target 3-5 minutes, acceptable up to 10 minutes for comprehensive research784785## Quality Principles786787Every generated report must:7887891. ✅ **Include safety disclaimer** prominently at top7902. ✅ **Document all information gaps** explicitly7913. ✅ **Cite sources** with links7924. ✅ **Use current date** in filename and metadata7935. ✅ **Follow template structure** exactly7946. ✅ **Provide actionable information** (distances, times, gear)7957. ✅ **Emphasize verification** - this is research, not gospel796797## Implementation Notes798799See `skills/route-researcher/docs/architecture.md800801…(truncated)