Fast-moving products change monthly; the model's training lags. Keep the vendor's own docs in the repo as dated notes and re-check them weekly, so agents work from what is true now. Docs are evidence: when the installed binary or the live app disagrees, the running thing wins and the disagreement goes in the notes.
When to use
- "Grab the docs for X", "give the agent context on X", "keep these docs up to date"
- Weekly, or before relying on a vendor's API, CLI, limits, or pricing
Steps
- Set up once. Run
node scripts/check-docs.mjs --init(or download it fromhttps://uplift.page/tools/check-docs.mjs) to createdocs/context/. Insources.jsonlist official sources only: the changelog or release notes first, then the doc pages, API reference,llms.txt, GitHub README/releases, and--helpof any CLI. Run with--suggest: many doc sites serve clean markdown at<page>.md. - Check.
node scripts/check-docs.mjs --capture(--run-cmdfor CLI sources). Open each new capture once to confirm it holds the real content, not a sign-in or JS shell. - Reconcile. Read the changelog first. For each CHANGED or NEW source, diff the captures,
update the listed notes claim by claim, and set
verified:to today. Re-check any open items infindings.md; move fixed ones to "Fixed since". - Accept, then log. Only after the notes match:
--accept <ids>. Add alog.mdentry: checked, changed (with release dates), notes updated, errors. - Point agents at it. Add one line to the repo's agent instructions file: "Before
using
, read docs/context/notes/; ifverifiedis over 14 days old, run the doc check." Offer a weekly scheduled run that opens a PR and never merges.
Rules
- Never
--acceptbefore the notes are updated; the checker would then report all clear on stale notes. - An ERROR means a partial run. Say which sources failed; never call it all clear.
- Official sources only. Label anything third-party and date every claim.
- Captures in
raw/are never edited; a change gets a new dated file. - Sources behind a sign-in are
manualwith written re-harvest steps. Never store credentials.
Layout
docs/context/
sources.json what to watch (edit this)
baseline.json fingerprints accepted after the last reconcile (written by the script)
notes/ what agents read: one topic per file, under ~500 words
raw/ dated captures, never edited
log.md one entry per run, newest first
findings.md optional: open claims or recommendations re-checked every run
Source modes
| mode | for | changed when |
|---|---|---|
text |
an HTML doc page | the page's main text changes (digits kept, so limits and versions count) |
raw |
.md pages, llms.txt, JSON APIs (e.g. a GitHub commits URL) |
any byte changes |
head |
a build, download, or file you won't fetch | its ETag or Last-Modified moves |
cmd |
tool --help, npm view pkg version |
the output changes (needs --run-cmd) |
manual |
anything behind a sign-in | every_days pass since the last accept |
{ "id": "cli-reference", "url": "https://example.com/docs/cli.md", "mode": "raw",
"notes": ["notes/cli.md"], "why": "commands and flags" }
Exit codes: 0 nothing changed, 1 something to reconcile, 3 a source failed. Set
GITHUB_TOKEN to avoid GitHub API rate limits. A thin warning means the page renders
in the browser; switch to its .md version or llms.txt.
Note format
---
sources: [cli-reference, changelog]
verified: 2026-10-09 # last checked against the source, not last edited
status: ga # ga | beta | deprecated | source-missing
---
# CLI commands
- `tool deploy --dry-run` previews changes (cli-reference)
Keep notes to what an agent needs to act: commands, limits, auth, gotchas, what changed.
When a source 404s, keep the note, set status: source-missing, and find the new URL.
Scheduling
Run weekly from a clean checkout of the default branch, on a fresh branch. Open a PR
titled "Doc refresh