/bitwarden-doc-parity:verifying-doc-parityfrom bitwarden-doc-parity
Detects documentation drift by comparing code changes against README, CLAUDE.md, docs/, and source-embedded docs. Runs in agent sessions and PR reviews.
Ships in bitwarden-doc-parity. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
This skill is the judgment that code has drifted away from the documentation which describes it. It enforces the base obligations of the documentation standard: docs and diagrams update in the same change as the code they describe, and a change that invalidates documentation the repo does not contain gets called out at review.
The skill runs in two contexts where change source and relevant document discovery differ.
git diff HEAD plus untracked files). Verification is in-repo only.Collect the full set of changed files and read the diff, not just the file list, because judging drift requires knowing what the change does. In a session, use git diff HEAD and git ls-files --others --exclude-standard. In a review, use the PR diff and read the PR description for intent.
Before walking the tree, consider whether the change qualifies as a tripwire false positive: a formatting-only diff, generated output, or a doc-comment-only edit that the Stop hook classified as code. When it does, dismiss the check with a one-line reason naming the false-positive class and end the skill.
For each changed file, walk its directory chain from the file's own directory up to and including the repo root. A directory is a documented scope when it contains a README.md, a CLAUDE.md, a docs/ directory, or diagram sources (.mmd, .mermaid). Below component scope, the documentation surface is source-embedded: Rust //! module docs, C# XML doc comments, JSDoc/TSDoc on public symbols. When the changed area of a source file carries such doc comments, treat that file as its own documented surface. Collect the union of documented scopes and surfaces across all changed files.
Check every documented ancestor, not just the nearest one, since documentation layers by altitude: higher views sand off detail while still describing the changed behavior. A change can be current in its component README yet drift a root-level guide or a container diagram two scopes up.
A change can also drift text outside its ancestor chain that restates what the change altered: a value, name, flag, or default copied into another file's doc comments, a schema description, or CLI help text. Search the repo for the distinctive literals and identifiers the diff changed or removed, and treat each hit that describes them in prose as a documented surface.
For each documented scope or surface, exactly one of two outcomes:
Never token-edit. Do not make a cosmetic or token documentation edit to satisfy the check, including when the user asks for one. When nothing drifted, Attest and explain why the edit is unnecessary.
The Step 3 walk covers every documented scope and surface. The user-facing report's shape is determined by the outcomes, never by how many scopes you checked. Per-scope reasoning belongs in internal thinking, not in the user-facing output. Finish every Step 3 judgment before choosing a report shape; the one-line report is the result of an all-Attest walk, not a reason to Attest. In a review, out-of-repo callouts are always reported in addition to the shape below, and the attested scopes are listed inside a collapsed <details> block so the posted summary stays auditable after the fact; the "do not name attested scopes" rule in the shapes below is session guidance and does not apply inside that block.
All Attest, no Updates — the common case. The entire report is one line:
Documentation parity: verified current, no changes required.
Do not name the attested scopes anywhere in the response, in a list or in prose. A sentence such as "I checked util/Seeder/README.md and CLAUDE.md, and neither describes this logic" is the same enumeration as a bulleted list, so leave it out. When the skill declined a user request, such as a token edit, the response can explain the refusal, but the explanation does not list scopes. The walk's rigor is in Step 3, not in the report.
Any Updates. List each Update with a one-line reason. In a review, where no edit is applied, each Update is reported as a callout naming the in-repo doc and what it must say. Do not name the scopes that attested, in a list or in prose; the user can ask if they want to know what else was checked. When the user already edited documentation as part of the change, one sentence confirming those edits are accurate is fine.
Documentation parity:
- util/Seeder/Data (README.md) — updated: generator table gained the new distribution.
- crates/bitwarden-crypto/src/lib.rs (module docs) — updated: added the new `derive_` variant to the naming invariants.
Dismiss. One line naming the false-positive class.
Documentation parity: dismissed — formatting-only diff, no documentation obligation.
Never token-edit to produce a reportable Update.
Out-of-repo documentation cannot be found by walking the tree, so derive search angles from the change itself:
bitwarden/contributing-docs) from those angles.What SKILL.md sets; muted values are Claude Code's defaults
general-purpose), waits for its resultnpx claudepluginhub bitwarden/ai-plugins --plugin bitwarden-doc-parityOther plugins' skills for the same job