Add the monthly refresh process as a project skill, with its tool
Mirror to forge / mirror (push) Canceled after 0s
Validate / validate (push) Canceled after 0s
Validate / history (push) Canceled after 0s
Validate / site (push) Canceled after 0s
Validate / deploy (push) Canceled after 0s

`/refresh-trails` starts a runbook an agent follows to check every record
against the pages it cites, re-check the trails that were left out, search
for missing trails and routes, update tracks and emblems, have every
proposal reviewed independently, and apply what the owner accepts.
`/refresh-trails light` verifies and re-checks only.

- Runbook, shared rules, eight worker briefs and the staged proposal
  format in `.claude/skills/refresh-trails/`.
- `tools/refresh.py`: preflight, slices, a polite link check, collect and
  apply, with tests. Workers stage proposals in `refresh/<date>/`, which
  git ignores; only the apply step edits records.
- `CONTRIBUTING.md` describes the refresh.

No trail record and nothing on the site changes.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
swaitsandClaude Fable 5.2 committed 2026-11-16 14:08:39 -07:00
1 parent 24bfbb2fa8
commit a46338afd5
18 files changed
+3446

No files matched your search

@@ -0,0 +1,29 @@
# Apply the accepted proposals and rebuild
Read `../rules.md` and `../proposal-format.md` first. You do this task yourself and start no subagents. This is the one brief that changes the repository: it is the only worker allowed to, and only one runs at a time.
You receive a staging directory `<staging>`, on a branch the orchestrator has checked out, and a clean tree. You do not commit, push or switch branches.
## What this is for
Everything staged so far was written without touching the repository, so that many workers could run at once. This step brings the accepted proposals in, in one place, one by one, and leaves the repository in a state the orchestrator can commit: records changed, shared files rebuilt, every check green. Done means all accepted proposals are applied or reported as refused with the reason, the validator, all test suites and the history check pass, and `CHANGELOG.md` has an entry for the work.
## Steps
1. `python3 tools/refresh.py collect`, then read `<staging>/summary.md`. The count of proposals with status `accepted` must match what the orchestrator told you. Anything with the status `proposed`, `held`, `rejected` or `invalid` is not applied.
2. `python3 tools/refresh.py apply --dry-run`. Read what would be refused. A refusal means the record no longer says what the proposal expects (someone changed it, or two proposals touch the same field), and it is reported, not worked around. Never edit a record by hand to make a proposal fit.
3. `python3 tools/refresh.py apply`. It changes the named lines and adds the history entries.
4. For each new track (a proposal with a track file), `python3 tools/elevation.py <id>`: it writes `elevation.json` from the track. For a replaced track, `--force`.
5. Add the rows named in `sources_md` fields to `SOURCES.md`, by hand, in the existing form and place. Where a record was removed or a track dropped, take the row's counts and lists with it.
6. `python3 tools/build_index.py` rebuilds `trails.csv`, `index.geojson` and the counts in `README.md`. Do not edit those files by hand.
7. `python3 tools/validate.py` must end `OK <n> trails`. `python3 tools/check_history.py` must end `OK history`. A failure that names a record you changed is yours: find the cause, and if it is a proposal that was wrong, say so in your report and revert that record from git (`git checkout -- <id>`, then apply the rest without it, by `--only`). A failure in a record you did not touch is reported.
8. Run all the test suites: `python3 -m unittest discover tools/tests` and `python3 -m unittest discover -s web/tests`. The web tests hold counts of trails, tracks and emblems; if one fails only because a count moved with the change, update that count. Any other failure is a real failure: stop and report it.
9. Write the entry at the top of `CHANGELOG.md`, in the voice of the entries already there (read the top two): a dated heading with a short title, then plain bullets saying what changed for contributors and, where a visitor can see it, what a visitor will see. State the counts that changed (trails, tracks, emblems). Say what was checked and left unchanged only where it matters. The orchestrator reads and edits it.
## The hard part
Order and exactness. A proposal applied against a record that changed in the meantime is the way a good record gets damaged, which is why `apply` refuses it; do not defeat that check. Rebuild the shared files after the last apply, not before. And the history check compares your work with the base branch, so run it with the base the orchestrator names (`--base REV`), not by guess.
## Report
Reply with under 200 words: the counts (applied, refused with reasons, already applied), the ids with a new or replaced track, the validator and test tails, and anything you did that the proposals did not say.
@@ -0,0 +1,53 @@
# Find the trail's own emblem
Read `../rules.md`, `../proposal-format.md` and `../records.md` first. You do this task yourself and start no subagents.
You receive a staging directory `<staging>`, a worker name (for example `emblems-1`) and a slice file `<staging>/slices/<worker>.txt` of trail ids, one per line, normally records whose `shield.status` is `logo-not-found`. Stage your work in `<staging>/staged/<worker>/`.
## What this is for
The site shows each trail's own emblem beside its name, and most long trails have a single crest-style marker. A record that says "emblem not found" is a gap the site shows to the reader. Earlier "not found" and "no emblem" verdicts were often reached without a real search, so do not trust them: search again. Done means that for every id there is either a clean emblem file that came from an allowed source, or a note that says exactly which pages were looked at and what marks were seen.
## What counts as the emblem
The trail's own crest, shield, badge, roundel, blaze-shaped marker or trail-sign symbol, alone. For a US National Scenic Trail, the official rounded-triangle trail marker; for a club trail, its blaze badge or roundel; for an author's route, the emblem the author uses for it, if there is one.
Not wanted: the holding organisation's lockup (an emblem with the organisation's name set beside it as type), a wordmark alone, a banner, a photo, a map, or an agency's logo standing in for the trail (the Forest Service shield, the National Park Service arrowhead, the Parks Canada beaver, a state parks logo). If the emblem inside an organisation's lockup is the trail's crest, crop it out. If the only mark is the organisation's and it does not stand for the trail, the trail has no emblem of its own. Text that is part of the emblem (the trail's name around a roundel) is fine; a tagline or organisation name outside it is cropped off.
## Where it may come from, in order
1. The holder's or author's own site: page header, footer, about page, media or press kit, brand page, map PDFs. Look at the page source for the largest version: an SVG first, then the biggest PNG (check `srcset`, the media library path, linked "logo" or "brand" files). Photos of a trail marker on a tree are not acceptable; artwork files are. A favicon or touch icon is a last resort, and only if it is the emblem at 180 px or more.
2. The managing agency's official page for the trail.
3. Wikimedia Commons, only when the file's page identifies it as the trail's official emblem and gives its origin, and it matches what the holder's own site shows. Record the Commons page as the source.
Never: social media, shops, apps (AllTrails, FarOut), fan redraws, stock sites, image-search thumbnails, or anything you cannot trace to the holder.
## Making the file
One file per trail, `shield.svg` (an SVG of the emblem alone, or one that can be reduced to it by deleting extra elements) or `shield.png`. Crop tight to the emblem with a small even margin. Trimming a uniform border is allowed; nothing else: no redrawing, recolouring, upscaling, sharpening, AI editing or background removal. Keep transparency if the source has it. Never enlarge; take the largest original and leave it at its size (reduce only if it is over 1024 px on the long side). ImageMagick (`magick`) is installed. After making the file, open it and look at it: one emblem, whole, legible, and not blank on a white page or on a dark page. If it is white-on-transparent or black-on-transparent, say so in the note. Aim for at least 256 px on the long side; smaller only when nothing larger exists at an allowed source, and the note says so.
## For each id
Read the record (name, holder or author, official site, the `[shield]` table and its note) and look at any existing file. Then decide:
- `kept`: the existing file is already the emblem alone at 256 px or more. Stage nothing but a report row.
- `replaced`: you found the emblem alone, or a larger or cleaner version.
- `cropped`: the best art is a composite and you cropped the emblem out.
- `new`: the trail had no file and you found its emblem.
- `none-exists`: you looked at the holder's or author's site and the agency page, and the trail has no emblem of its own. Say what marks you did see and why they do not count.
- `logo-not-found`, reported as `not-found`: an emblem seems to exist (seen on a sign in a photo, mentioned in text) but no usable artwork is at an allowed source. Say where it was seen.
- `refused`: every allowed source refused automated reads.
Staged, for every outcome except `kept`: the untouched download as `original.<ext>` in `<staging>/staged/<worker>/<id>/`, the logo file for `replaced`, `cropped` and `new`, and a `change` proposal with edits for `shield.status` (`use-real-logo`, `no-logo-exists` or `logo-not-found`), `shield.logo_source` (the exact address the artwork was downloaded from), `shield.contact`, `shield.logo_file`, `shield.logo_owner` and `shield.note`, a `[[proposal.file]]` for the logo (with `old_sha256` when replacing an existing one), and `[proposal.history]`. The note says, in short plain sentences, what the emblem is, which page shows it in use, what was done to the file ("Cropped from the association's header logo; the wordmark beside the crest was cut off."), any terms the holder states about its logo, and for a trail with no file, every address you looked at.
## The hard part
Deciding what counts as the trail's own emblem when the holder shows only its organisation's mark, and finding the largest original rather than the page's thumbnail. When you are torn, say so in the report and describe both candidates; the owner decides. Do not take the quick answer from the first page: look at the page source and the media library for a larger file, and at the holder's map and brochure PDFs for the emblem in artwork form.
## Time
About 10 minutes per id; at most 90 minutes for a slice. Stop at the budget plus a third and mark the rest `not-reached`.
## Report
`report.csv` with a row per id: outcome, the file, its width and height in `remark`, the source address. Reply with under 120 words: staging path, counts by outcome, and any trail where you were torn.
@@ -0,0 +1,40 @@
# Search for trails the dataset is missing, by region
Read `../rules.md`, `../proposal-format.md` and `../records.md` first. You do this task yourself and start no subagents.
You receive a staging directory `<staging>`, a worker name (for example `region-us-west`) and a region: a group of states or provinces. Stage your work in `<staging>/staged/<worker>/`. Your task may also say it is a second pass and give you the list of places the first pass searched.
## What this is for
The dataset should hold every trail that meets its inclusion rule. It was built from other sites' lists, and every earlier search by list missed trails that a plain look at a state agency's pages found. One such search for a whole country once reported nothing missing, and a second worker with a different approach found seven. Done means that for your region you have searched widely and deeply, every candidate is confirmed on its holder's page, and every place you looked is listed, including the places that gave nothing.
## The inclusion rule, short
A named long-distance walking trail or route in the US or Canada, 50 miles (80 km) or longer as one continuous walk. Loops count. A trail that is partly built counts if its holder publishes it as one trail and it can be walked through, with road links allowed. A trail has a holder (agency, association or club) that names it and states its length. A route was worked out by an author, and counts only if the author has a page or book of their own that describes it as a route with a stated length; one person's trip report is not a route. The full rule is in `README.md`. Left out on purpose: gravel rail trails and canal towpaths, paved greenways, trails mainly for horses, bikes, motor vehicles or paddling, mainly driving historic trails, networks that are not one continuous trail, trails closed for good, proposed trails with nothing on the ground. Everything already decided against is in `left-out.toml` with the reason: do not propose it again unless the page now shows that the deciding fact has changed. Trails between 40 and 50 miles are not candidates.
## How to search
- Go wide first. Use many varied words: "long trail", "long-distance trail", "thru-hike", "backpacking trail", "backpacking route", "multi-day", "100-mile", "end to end", "traverse", "high route", "loop", "wilderness trail", "footpath", "state trail", and in French "sentier de longue randonnée" where it applies. Combine each with every state or province, mountain range, national forest, national park, large state park or forest, river, lake shore, coast and desert in your region.
- Then go deep on the places that list trails officially: each state or provincial agency's trail pages and trail lists, the National Recreation Trails database, trail associations and hiking clubs, guidebook publishers' catalogues, regional hiking magazines, and articles on the best long trails of a place.
- Whole-country lists were already swept and are leads only for a single trail: Wikipedia's long-distance trail lists, ALDHA-West, The Trek, thru-hiking.com, Backpacking Routes, HikeBikeTravel and LongTrailsWiki.
- For every name, check the dataset before spending time: search `trails.csv`, the `name` and any other-name fields of `*/trail.toml`, and `left-out.toml`. Many trails are in under another spelling or inside a longer trail.
- A candidate counts only after you read its holder's or author's own page and saw the length stated there (or, failing that, a government page). Apps, forums, Reddit and wikis are leads, never evidence.
## The hard part
Searching is where cheap, quick attempts fail: a few queries, a page or two per state, and "nothing found". Do the dull part: walk each state's agency trail list to the end, not just the first search page. When a state seems empty, check it from a second direction (the national forests in it, its long-distance hiking club, its National Recreation Trails) before you say so. If this is a second pass, the places listed as already searched are not a reason to skip a state; use different questions and different sources, and treat a quiet first pass as a reason to look harder, not as evidence.
## What to stage
- For a candidate that clearly meets the rule: a `new-record` proposal, with the complete record staged as `staged/<worker>/<id>/trail.toml` written as `../records.md` says. A new official trail gets no track now: write the honest absent reason ("No track has been added yet" in substance). Do not fetch any track and do not call Overpass: a later serial pass does that. If you can find the trail's OpenStreetMap route relation number through the openstreetmap.org search page or Nominatim (one light request per trail), put it in the record's `[osm]` note and in your report.
- For a candidate that is doubtful (length near the floor, partly built, a network or a loop of linked trails, a route with a thin author page, an owner who might dispute it): a `candidate` proposal with `borderline = true`, the length as stated, the page, and a recommendation (`add`, `owner` or `decline`) with the specific doubt in `summary`.
- Trails of 40 to 50 miles that are well known: a `candidate` proposal with `recommendation = "decline"` and `reason = "below-floor"`, so the owner can see them.
- `report.csv` with one row per state or province in your region: `found` (with the ids), or `not-found`, with `pages` listing every place you looked for that state: the agency pages, the lists, the queries by kind. "Not found" without where you looked is not accepted.
## Time
About 60 minutes for a region of 5 to 8 states or provinces. Stop at 80.
## Report
Reply with under 150 words: staging path, number of new records and candidates, the two or three strongest, and the states or provinces where you found nothing and how sure you are.
@@ -0,0 +1,35 @@
# Search for routes published by their authors
Read `../rules.md`, `../proposal-format.md` and `../records.md` first. You do this task yourself and start no subagents.
You receive a staging directory `<staging>`, a worker name (for example `routes-1`) and optionally a part of the country. Stage your work in `<staging>/staged/<worker>/`.
## What this is for
Some of the best long walks are not designated trails. A hiker or a guidebook author worked a high route, a traverse or a loop of linked trails out and published it with a stated length. The dataset lists these as routes when the author has a page or book of their own that describes the route with a length. They are missed by agency searches, because no agency holds them, and they are easy to over-count, because a trip report looks like a route. Done means you have searched the places routes are published, and each route you found is confirmed on its author's page.
## The rule, short
A route counts when its author has their own page or a published book that describes it as a route and states its length, and the length is 50 miles (80 km) or more as one continuous walk (loops count). A trip report of one person's walk is not a route. The author's name is the author the page names. Check `trails.csv`, the `name` fields of the records (`kind = "route"` ones especially) and `left-out.toml` first: the dataset already holds many routes and has decided against others, and the same route often goes under two names or sits inside a longer one.
## How to search
Search for the kinds of things authors publish: "high route", "traverse", "alternate route", "thru-hiking route", "loop", "off-trail route", "link-up", "cross-country route", with each mountain range, wilderness area, national park, desert, island, coast and territory in the US and Canada (or in your part). Look at guidebook publishers (the regional mountaineering and outdoor presses), the authors' own sites, hiker association pages that link to routes, and regional hiking magazines. A guidebook's own publisher page counts as the author's page for a book route. Routes already in the dataset have their author, year and `[[guide]]` in the record: read two to see how they are described.
## The hard part
Telling a route from a trip report, and telling the author's page from someone's summary of it. Read the author's own page, find the stated length and the sentence that calls it a route, and note whether the track is free, sold, withheld or unsettled (the record needs `[route]` and `line_policy`). Never include a track for a route. If the author's page states terms that allow passing a track on, quote them; otherwise there is no track, and the record says so. A route whose length is only given in someone else's article is a lead, not a candidate.
As with other searches, a quiet result needs a second look from another direction before you call a region empty, and "not found" must say where you looked.
## What to stage
The same as `find-missing-trails.md`: a `new-record` proposal with a staged `trail.toml` for each route that clearly meets the rule, `candidate` proposals for doubtful ones and for well-known routes under 50 miles, and a `report.csv`. Its rows are the mountain ranges, regions or sources you covered, each `found` (with ids) or `not-found` with the places looked. For a new route record, `kind = "route"`, `[route]` with the author and `line_policy`, at least one `[[guide]]`, and no track.
## Time
About 60 minutes. Stop at 80.
## Report
Reply with under 150 words: staging path, number of new records and candidates, the strongest, and where you found nothing.
@@ -0,0 +1,37 @@
# Re-check the trails that were left out
Read `../rules.md`, `../proposal-format.md` and `../records.md` first. You do this task yourself and start no subagents.
You receive a staging directory `<staging>`, a worker name (for example `left-out-01`) and a slice file `<staging>/slices/<worker>.txt` listing ids of entries in `left-out.toml`, one per line. Stage your work in `<staging>/staged/<worker>/`.
## What this is for
`left-out.toml` lists trails that were looked at and left out, each with the specific fact that decided it. It is shown to the public as "Considered and left out", so that a trail is not suggested and argued over again from nothing. A decision can go stale: a trail that was too short gains miles, a proposed trail gets built, a National Scenic Trail is designated, a closed trail reopens, a page the decision rests on moves. Done means that for every entry in your slice you know whether the deciding fact still holds on the page, and every entry that has changed has a proposal.
## What to do for each entry
1. Read the entry (`left-out.toml`, found by `id`), and `docs/schema.md`, section "left-out.toml", for the reasons. Note `reason`, `note`, `source_url`, `decided`, and for `waiting` entries `waiting_for`.
2. Open `source_url`. Then open the holder's or author's current page for the trail, and one government page where there is one. Check that the deciding fact is still what the entry says it is: the length against the 50 mile floor, the surface, the owner or purpose, the state of construction, whether it can be walked through.
3. For an entry whose `reason` is `waiting`, `waiting_for` is the one condition that would change the decision. Look specifically for whether that has happened: a designation made, a length settled, a gap closed, a route published. Say what you found and where, even when nothing has changed.
4. A trail the dataset now lists (look in `trails.csv` by id and name) must not stay in this file. Report it.
5. Decide:
- Still holds: stage a `verified` proposal for the entry (`target = "left-out"`) with the pages opened. Nothing is applied for it; it records that the check happened.
- The page says something different but the decision stands: a `change` proposal with `target = "left-out"` and edits to `note`, `length_mi` and `length_km` (they must agree), `source_url`. `decided` is left alone because the decision has not changed.
- The fact that decided it no longer holds, or the `waiting_for` has happened: a `candidate` proposal with your recommendation (`add` if it now clearly meets the inclusion rule, otherwise `owner`) and the sentence that changed. Do not write the record and do not remove the entry. That is the owner's decision.
- The entry's page is gone and no other page shows the fact: `could-not-check`.
## The hard part
For `waiting` entries a quick look at the trail's home page is not enough. "Waiting for designation" is answered by the agency's page, not by the advocacy group's. "Waiting for a settled length" is answered by the holder's current length, which may be in a map, a PDF or a news release. Read the whole page and say where on it the fact sits. Treat a hopeful announcement (a bill introduced, a section planned, a ribbon cutting scheduled) as not yet meeting the condition, and quote it so the owner can judge.
## What to stage
Per entry, `<staging>/staged/<worker>/<id>/proposal.toml`. For the slice, `<staging>/staged/<worker>/report.csv` with a row for every id: `verified`, `changed`, `could-not-check`, `refused` or `not-reached`, with the pages opened. Entries you recommend to the owner have outcome `changed` and a `candidate` proposal.
## Time
About 5 minutes per entry; at most 90 minutes for a slice. Stop at the budget plus a third and mark the rest `not-reached`.
## Report
Reply with under 120 words: staging path, counts, and every entry where the deciding fact has changed.
@@ -0,0 +1,44 @@
# Review proposals and new records against their pages
Read `../rules.md`, `../proposal-format.md` and `../records.md` first. You do this task yourself and start no subagents.
You receive a staging directory `<staging>`, a reviewer name (for example `review-1`) and a list of proposal ids (`pid`) from `<staging>/summary.md`, or the name of a worker whose proposals you review. Your work is read-only: change nothing in the repository or in anyone's staged files. You write two files, `<staging>/review/<reviewer>.md` and `<staging>/review/<reviewer>.csv`.
## What this is for
The workers who wrote the proposals meant well and are sometimes wrong. A review of freshly written records by a second reader, opening the cited pages, once found seven must-fix defects in twenty-three records: facts that the cited page did not support, a wrong start point, allowed uses left out. A record goes to the public only after someone who did not write it has opened its pages. You are that reader, and a different one from the writer, ideally from a different model family. Done means every proposal you were given has a decision and the reasons are written down.
## What to do
For each proposal, read it in `summary.md` and in its `proposal.toml`, and for a new record read the whole staged `trail.toml`. Do not read the writer's conclusions first and then look for support. Open the pages and read them. For each edit or fact:
1. Open the page named. Find the quote. Is it there, word for word, and does it say what the proposal says it does?
2. Is the page the right source? The holder's or author's own page beats everything else. If another page disagrees, which one is current?
3. Does the record, after the change, say anything the pages do not? Read every sentence of a new record's `summary`, `designation`, `length_note`, `caution` and `[route]` text for claims such as "the Forest Service describes it as" or "the association maintains it" that no cited page makes. The summary is our wording but not our invention.
4. The facts that hikers act on: the start and end (is the length the one that belongs to those ends?), allowed uses (every use the page lists is in the record), permits and fees, season, closures that affect walking through.
5. Is a cited address a page that opens and says what the record claims (not a redirect to a general page that never mentions the trail)?
6. Is the length source right: which figure belongs to which definition (built or planned, with or without side trails)?
7. Words: "track" and not "line", "author" and not "creator" in text, miles first, plain sentences, no dashes as punctuation, no private person's name, no marketing words.
8. History: is `[proposal.history]` present for every changed fact, with a role in `asked_by`, a basis and an address that does open? Was an earlier `declined` entry about the same field passed over?
9. Is the proposal narrower or wider than its summary says? Did the writer quietly drop a part of the task?
10. For a track: does the licence in `source.licence` match the terms on the page, is a route's track (`kind = "route"`) included without the author's stated terms?
## The hard part
Agreeing is easy and wrong. When a quote is there, check that the sentence is about this trail and this fact (a nearby trail, an older edition, a segment and not the whole). When the page cannot be opened, say it is unchecked; do not accept on trust and do not reject for it. Where you cannot tell which of two pages is right, say so and let the owner rule.
## What to write
`<staging>/review/<reviewer>.csv`, header `pid,digest,decision,note`, one row for every proposal you were given. `digest` is the one in `summary.md`. `decision` is `accept` (every fact supported, nothing to fix), `reject` (not supported, or wrong, with the fix described in the report), or `hold` (needs the owner: the holder might dispute it, the sources conflict, or it is a matter of what belongs). A proposal with a small fix is a `reject` and the fix is written out, so it comes back as a new proposal and is read again. `note` is the reason, with the page and the sentence.
`<staging>/review/<reviewer>.md`, compact, no preamble, in this order:
1. `## Must fix`: numbered; each names the trail id and the fields, what is wrong, the page and the sentence that shows it, and the exact replacement text.
2. `## Should fix`: the same for lesser defects.
3. `## Answers`: for each question you were asked, the evidence and the conclusion.
4. `## Checked and sound`: one line per proposal, saying what you confirmed (for example: "ends, 54.7 mi, uses, archive copy read").
5. `## Could not check`: what you could not open or read, and why.
## Report
Reply with under 120 words: the two file paths, the number of accepts, rejects and holds, and the most serious defect.
@@ -0,0 +1,43 @@
# Tracks: trails that have none, and tracks whose source has changed
Read `../rules.md`, `../proposal-format.md` and `../records.md` first. You do this task yourself and start no subagents.
You receive a staging directory `<staging>`, a worker name (for example `tracks-1`) and a list of trail ids in two groups: A, records that have no track, and B, records whose track source may have changed. Stage your work in `<staging>/staged/<worker>/`. If your task has you using Overpass, you are the only worker that does.
## What this is for
A track is what lets a hiker see where a trail goes. A record without one says why (`source.line_absent_reason`), and often the reason has passed: a relation has since been added to OpenStreetMap, or the holder has published open data. A track that came from a source goes stale when the source is edited. Done means that for each id you either have a staged track with the figures that go with it, or an honest statement of why none can be included.
## Group A: records with no track
1. Read the record: `source.line_absent_reason`, `[osm]`, `kind`. A route worked out by an author (`kind = "route"`) never gets a track unless the author's own page states terms that allow passing it on; quote them if they exist, and otherwise move on.
2. Look for a track that may lawfully be included, in this order: the holder's own open data under a stated open licence (or a US federal government work), the holder's written permission (the holder's statement in the public issue tracker counts, quoted with its address), then an OpenStreetMap route relation (ODbL). Read the data source's terms. If they forbid redistribution or commercial use, do not use it, and say so.
3. For an OpenStreetMap relation, first run `python3 tools/osm_track.py --id <id> <relation> --dry` and read the figures: the number of ways, the measured length, the parts. Compare with the published `length_km`. If it is within 15% and the ways are the trail (no other trail's name among them), run it again without `--dry`, with `--out <staging>/staged/<worker>`, so the files land beside your proposal. A way that carries another trail's name is excluded with `--exclude-name`, and the exclusion is said in the record.
4. Beyond 15%, find out why before staging anything: sum the length by way name, look at which parts are missing or extra, and write `source.length_gap_note` with facts. If the track is mostly another trail, or mostly unbuilt, do not stage it and say why.
## Group B: tracks whose source has changed
`source.discovery` says how to tell whether the source has a newer release. For an OpenStreetMap relation, read the relation's version and timestamp (`rel(ID); out meta;`) and compare with `release.txt` and `[osm]`. If it has not changed, stage a `verified` proposal. If it has, fetch it with `osm_track.py --force --out <staging>/staged/<worker>`, compare the new figures with the old (`verification.measured_km`, `parts`), and look at what moved: a track that has doubled or lost a third is more often an editing accident than a change in the trail. Stage a change only where the new track is the better description of the same trail. For a track from a holder, check that the holder's page and its terms still say what the record says.
## What to stage
For each track you propose, a `change` proposal for the record (or a `new-record` if it is staged with a new record) that has:
- `[[proposal.file]]` entries for `line.geojson`, `alternates.geojson` where the tool wrote it, and `release.txt`, with `source_url` and, for a file that already exists, `old_sha256` (`sha256sum <id>/line.geojson`). Do not stage `elevation.json`: it is computed from the track in the apply phase.
- edits for the fields the track changes: `source.status`, `source.licence`, `source.licence_text`, `source.attribution`, `source.osm_only`, `source.line_source`, `source.line_file`, `source.source_checked`, `source.redistributable`, `source.length_gap_note` where needed, `source.line_absent_reason` removed where a track now exists, `osm.relation` and `osm.note`, and the `[verification]` figures (`verified`, `date`, `measured_km`, `difference_percent`, `parts`, `note`) as the tool printed them. For a field the tool computes, `page` is the relation or data page and `quote` is the line of tool output.
- `[proposal.history]`, because a track change is a change to `source.line_file`.
- `sources_md`: the row `SOURCES.md` needs.
Records are copied for form from existing ones with the same kind of track (`../records.md`). Report with `report.csv`: for each id `new` (a track is staged), `replaced` (a changed track), `verified`, `none-exists` (no lawful track is available, with the pages looked at), `refused`, `could-not-check` or `not-reached`.
## The hard part
Overpass overloads easily. `osm_track.py` tries several endpoints by itself, one request at a time. Never run two fetches at once, and do not start another tool that calls Overpass while one runs. If all endpoints are down, say so and stop the track work. Do not build a track by hand and do not trace one from an app or a map. A track you cannot source is a record with an honest absent reason, which is a perfectly good record.
## Time
About 10 minutes per id. Stop at the budget plus a third.
## Report
Reply with under 150 words: staging path, counts by outcome, any track beyond 15% of the published length and what explains it, and whether Overpass was down.
@@ -0,0 +1,49 @@
# Verify records against the pages they cite
Read `../rules.md`, `../proposal-format.md` and `../records.md` first. You do this task yourself and start no subagents.
You receive a staging directory `<staging>`, a worker name (the slice name, for example `trails-03`) and a slice file `<staging>/slices/<worker>.txt` listing trail ids, one per line. Stage your work in `<staging>/staged/<worker>/`.
## What this is for
Trail pages change: a holder renames a trail, a section closes, a length is revised, a permit rule changes, a page moves. A record that was right when it was written drifts out of date, and a hiker who relies on it is the one who pays. Once a month every record is checked again against the pages it cites and against the holder's current site, so that what the dataset says is what the holder says today. Done means that for every id in your slice the record is either marked verified, with the pages you opened, or has proposals that say exactly what changed and where that is written.
## What to do for each id
1. Read `<id>/trail.toml` whole, including its `[[history]]`. Note every earlier `declined` entry and every entry asked for by someone other than the dataset's own check: those are decisions you must not quietly reverse.
2. Open every page the record cites: each `[[hike.source]]` url, `hike.official_url`, `source.publisher_url`, `source.url` and `source.permission_url` where present, the `[[guide]]` pages, and the pages named in `short_name_url` and `length_note`. Then open the holder's or author's current official site for the trail, even if the record does not cite its current address, and follow a moved page to where it went. `links.csv` in the staging directory says which of the record's addresses are dead, redirected or refused; use it to find where to start, and still read the page itself.
3. Check each of these against what the pages say now:
- the name, and the holder or author
- the length, and what it counts (built or planned, with or without side trails)
- both ends (and for a loop the usual trailhead), by place name
- allowed uses: hiking, bicycles, horses, dogs, motor vehicles
- permits, reservations and fees for walking the whole trail
- the season and the usual time to walk it
- closures or reroutes that affect walking through (a loss of access the holder has reported in writing may be recorded; day to day conditions may not)
- the official links: do the record's addresses still reach the right page
- the track's source: is the source page still there, does it still state its terms, has the relation or layer been replaced? You do not fetch tracks here. Record only whether the source and its terms still say what the record says.
- `short_name`, if present: is it still the holder's own or established use?
4. Decide:
- Nothing changed: stage a `verified` proposal naming every page you opened.
- Something changed: stage a `change` proposal with one `[[proposal.edit]]` per field, each with the `page` and the `quote` that support it, a `[proposal.history]`, and also a `verified` proposal for what you checked and found unchanged.
- Pages disagree with each other, or with the record, and you cannot tell which is right: do not edit. Write a `could-not-check` proposal that says what disagrees and which pages say what.
- A request recorded in the history is contradicted by the holder's page: a `declined` proposal, not a change.
- The pages say the trail no longer exists, has been merged into another, or can no longer be walked through: never propose removing it. Stage a `could-not-check` proposal with the pages and sentences, because whether a trail still belongs is the owner's decision.
## The hard part
A cheap read finds nothing wrong. One page per trail, a glance at the length, and a verdict of "unchanged" is how drift survives. The checks above are meant to be done on pages you actually read to the end: the length is often in a paragraph, a table or a PDF, and the permit rule is often on a separate page from the trail page. When a page offers more than one figure, say which one you used and why in `quote`. Equally, never "fix" a record from a third-party page when the holder's own page disagrees. A hiking site, a map or an app that gives a different length is a lead. The holder's page decides. If the holder's page is missing or refuses automated reads, that is `could-not-check` for that fact, not a reason to take the third-party figure.
The second trap is changing wording that is merely different. The record's wording is ours. Propose an edit only where a fact is different, not where the page words the same fact differently.
## What to stage
For each id: `<staging>/staged/<worker>/<id>/proposal.toml` in the format of `../proposal-format.md`. For your slice: `<staging>/staged/<worker>/report.csv` with a row for every id: `verified`, `changed`, `declined`, `could-not-check`, `refused` or `not-reached`, and in `pages` every address you opened. Do not touch the record.
## Time
About 6 to 8 minutes per record on average, and no more than an hour and a half for a slice of about 35. Stop at the budget plus a third and mark what is left `not-reached`.
## Report
Reply with under 150 words: your staging path, the count of each outcome, the three most important changes you propose, and any site that refused.