Diff-driven doc-staleness sweep. Maps every changed path against the "Doc review — keeping docs true" table in AGENTS.md, runs the load-bearing generated-artifact checks (OpenAPI, AGENTS.md/CLAUDE.md symlinks, ADR index), and patches stale prose docs in the same change. Use when called by `implement-spec` / `review-implementation` at close-out, or when a human says "sync the docs" / "make sure the docs are still true after this change".
90
90%
Does it follow best practices?
Impact
93%
1.32xAverage score across 3 eval scenarios
Passed
No known issues
Docs go stale when code changes but the surrounding description doesn't. This
skill turns the AGENTS.md "Doc review — keeping docs true" table from a thing
you're supposed to remember into a deterministic sweep over the actual diff.
Use it:
implement-spec (replaces "eyeball the doc-review
table").review-implementation (report-only there).implement-spec or a human fixing
their own change): read the flagged docs and patch the stale parts in the
same change. Match each doc's existing style and density (Rule 3, Rule 8).review-implementation, or when the right
fix isn't obvious): list what's stale and what's missing; do not edit. Never
silently skip a flagged doc — an un-checked row is a Rule 9 failure.git diff --name-only (+ --staged).git diff main...HEAD --name-only.
Keep the full diff handy too — you need what changed, not just which file.AGENTS.md. That
table is the source of truth for "you changed X → check doc Y". Do not
hardcode a copy of it here — read it at run time so this skill can't drift
from it. (If you ever find the table missing a mapping that clearly should
exist, flag it; don't silently invent the rule.)These are deterministic — run the command, don't eyeball. Any failure here is a hard miss:
@travel-planner/shared wire schema or
any /api/v1/* request/response/error shape (or apps/web/scripts/ generate-openapi.ts): run pnpm openapi:check. If it fails, run
pnpm openapi:generate and stage docs/openapi/v1.yaml. New endpoints must
be wired into the generator's paths/registry (ADR 056 / SPEC-008). Report
mode: just report the openapi:check exit status.AGENTS.md,
verify a sibling CLAUDE.md symlink exists (ls -la <dir>/CLAUDE.md). If
not, create it: ln -s AGENTS.md CLAUDE.md in that directory.docs/decisions/*.md, verify docs/decisions/README.md has the matching
index row and that superseded ADRs' status lines were updated. (Writing a
new ADR is write-adr's job — here just confirm the index is consistent.)CHANGELOG.md has an
entry under ## [Unreleased].AGENTS.md "Signs a doc
is stale" heuristics:
Output the report using exactly this structure — these headings
verbatim, the real path count substituted into the ## heading, the diff
command you ran on the record, and no renamed/added/dropped sections:
## Doc sync — <N> paths changed
_Diff: `git diff --staged --name-only` (or `git diff main...HEAD --name-only`)_
### Generated artifacts
- OpenAPI: regenerated docs/openapi/v1.yaml | clean | n/a
- Symlinks: <result> | n/a
- ADR index: <result> | n/a
- CHANGELOG: <result> | n/a
### Prose docs
- <doc> — patched: <one line> | stale, needs <X> | clean
### Unresolved (couldn't fix safely)
- <doc> — <why, what's needed>If everything was already true, keep the headings and say so explicitly under each ("all matched rows already accurate") — silence reads as "didn't check".
docs/openapi/v1.yaml by hand — only via
pnpm openapi:generate.