Files
longhikes/.claude/skills/refresh-trails/briefs/apply.md
T
swaitsandClaude Fable 5.2 a46338afd5
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
Add the monthly refresh process as a project skill, with its tool
`/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>
2026-11-16 14:08:39 -07:00

3.7 KiB

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.