Check if documentation (README.md, AGENTS.md, docs/) is up to date with recent code changes. Use when code has been modified and docs may be stale.
Install
npx skillscat add go-to-k/cdkd/check-docs Install via the SkillsCat registry.
Documentation Consistency Check
You are checking whether documentation is up to date with recent code changes in
this repository.
Steps
Identify what changed:
git diff main...HEAD --name-only(orgit diff HEAD~5 --name-onlyif on main).Decide whether a deep review is needed (short-circuit). Most internal
refactors and bug fixes do not affect anything the docs describe. A deep
review IS required if the diff touches any of:src/index.ts— public exports.src/cli/options.ts,src/cli/commands/**— the CLI surface described indocs/getting-started.mdand the per-command pages underdocs/.src/types/**— public type definitions.src/state/**— bucket name, key layout, lock layout, schema version, all
documented verbatim indocs/state-management.md,docs/troubleshooting.md,docs/stack-outputs.mdand.claude/rules/state-schema.md. A path-layout change invalidates dozens of
shell snippets across them.- Any NEW file under
src/**— it must be reachable from the key-file index
in.claude/rules/code-layout.mdand itslayout-*.mdsatellites. package.json— dependency changes described in.claude/rules/package-and-release.md.README.md,AGENTS.md,docs/**,.claude/rules/**,plugins/**— the
docs themselves.plugins/**is a TRIGGER, not only a step-3 target: a
plugins-only diff matches nothing else, and step 3 reads changed SOURCE
files.- Any
src/**file matched by apaths:glob in a.claude/rules/
satellite — in practice nearly every src file. A comment-only or
message-only edit does NOT exempt it: those files assert DECISIONS about the
code, and a reworded message is exactly what invalidates one.
If none apply, write "no docs-visible surface touched" and stop.
For each changed source file, determine what documentation is affected:
- Any
src/**change → the.claude/rules/satellites whosepaths:glob
matches it. DERIVE them —for f in .claude/rules/*.md; do echo "$f"; sed -n '/^paths:/,/^---$/p' "$f"; done,
or the per-area row in.claude/rules/code-layout.md— never recall them,
and use thesedrange rather thangrep -A<n>, which truncates a file
declaring several globs. Then read what each SAYS about the code you
changed, not just whether it names your new files: nothing mechanical
watches a rule file that asserts a decision. src/cli/→ CLI options/commands indocs/getting-started.mdand the
per-command pages.src/synthesis/,src/assets/,src/deployment/,src/analyzer/→ the
matching section ofdocs/architecture.md.src/provisioning/→docs/provider-development.mdanddocs/provider-rules.md, plus.claude/rules/providers.md. For a NEW SDK
provider alsodocs/supported-resources.md+docs/import.md. If the
provider gates a stabilization wait onprocess.env['CDKD_NO_WAIT'], its
resource type MUST appear in the per-type wait-semantics table indocs/cli-deploy.mdand in thenoWaitOptionhelp + JSDoc insrc/cli/options.ts(enforced bytests/unit/provisioning/no-wait-doc-coverage.test.ts).src/state/→docs/state-management.md.- New exports in
src/index.ts→ public API docs. package.jsondependency changes →.claude/rules/package-and-release.md.- New integration tests →
docs/testing.mdanddocs/integ-fixture-conventions.md. - Any behaviour change →
plugins/cdkd-skills/skills/cdkd/SKILL.md, the
DISTRIBUTED plugin surface, written for an audience that never reads this
repo. Grep it for the subject you changed. If you edit it, bump theversionin BOTHplugins/cdkd-skills/.claude-plugin/plugin.jsonand.claude-plugin/marketplace.jsonin the same PR — nothing enforces that,
and an un-bumped edit ships to nobody.
- Any
Read the relevant documentation sections and compare with the code, for:
missing mentions of new files / features / options; outdated descriptions;
stale lists (provider lists, context-provider lists); hardcoded lists that
should reference the source directory instead.Report findings as a checklist: each discrepancy with its file and
section, and the suggested fix. If none, confirm the docs are consistent.Fix the issues, then re-run this check.
When to run this
Before committing, and again before opening the PR if anything changed since. It
only needs re-running when one of src/**, docs/**, README.md, AGENTS.md
or .claude/rules/** is edited. If issues remain unfixed, fix them and re-run —
do not report the docs consistent.
Important
- Do NOT create new doc files; check consistency, not completeness.
- Check the changelog entries for stale content. First ask whether this change
writes a changelog entry AT ALL:
only a user-visible behavior delta does — what the shipped binary does. Agent
instructions, tests, CI, hooks and behavior-describing docs write none. A
required entry is ONE file underchangelog.d/entries/<YYYY-MM-DD>-<issue>-<slug>.mdcarrying the bullet and no
dated heading, capped at 2000 characters
(tests/unit/scripts/changelog-entry-size.test.ts); a design decision goes todocs/design/<issue>-<slug>.mdinstead. - Prefer referencing source directories over hardcoded lists in docs.