Skip to content

(docs): record when each doc was last verified and list the stalest (#1354) - #1398

Merged
devsuitup merged 1 commit into
mainfrom
docs/1354-doc-staleness
Nov 29, 2026
Merged

devsuitup merged 1 commit into
mainfrom
docs/1354-doc-staleness

Conversation

@devsuitup

Copy link
Copy Markdown
Owner

Closes #1354

Summary

  • Coverage docs may carry verified: <sha> <YYYY-MM-DD> in front matter. scripts/check-docs.js validates its shape without resolving the SHA (CI checkouts may be shallow); every other key is still rejected, and moving a stamp never counts as a body change for the PR gate.
  • scripts/doc-staleness.js lists coverage docs by the number of commits that touched their covered files since the stamp. Unstamped docs and unresolvable SHAs rank first with an unknown count, never 0. --json, --limit N, --repo-root. Advisory: exit 0 when docs are stale.
  • Initial stamps only where a verification happened: the 18 .ai/contexts files rewritten under (docs): cut .ai/contexts down to current behaviour and invariants #1355, at their merge commits. The other 44 coverage docs stay unstamped.
  • .ai/agent-practices.md "Doc verification audit": the weekly procedure (stalest 3, inventory, one issue per wrong statement, stamp-moving PR, cross-review).
  • .ai/contexts/fast-check.md documents the stamp and the report; its covers: now uses scripts/*doc*.js.

Tests

  • test/check-docs.test.js: valid stamp, bad shapes, unknown key still rejected, stamp-only change is not a body change. RED before the change: 18 assertion failures (front matter must contain only covers).
  • test/doc-staleness.test.js: real temporary git repo (covered/uncovered commits, stamped, unstamped, unknown SHA, glob cover).
  • Three mutations caught and restored.

Developer tooling only: no user-visible change.

…st (#1354)

Coverage docs may carry verified: <sha> <date>; check-docs validates its
shape without resolving the SHA. scripts/doc-staleness.js ranks docs by the
commits that touched their covered files since that stamp, unstamped docs
first. The 18 contexts rewritten under #1355 are stamped at their merge
commits; the others stay unstamped. The weekly audit is documented in
.ai/agent-practices.md.
@devsuitup devsuitup added the no-changelog The PR changes nothing a user sees; the CHANGELOG.md check is waived label Nov 29, 2026
@devsuitup
devsuitup merged commit b52533d into main Nov 29, 2026
15 checks passed
@devsuitup
devsuitup deleted the docs/1354-doc-staleness branch November 29, 2026 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog The PR changes nothing a user sees; the CHANGELOG.md check is waived

Projects

None yet

Development

Successfully merging this pull request may close these issues.

(docs): record when each doc was last verified and audit the stalest ones every week

1 participant