audit-doc-drift
Skill2 starsChanged 14 days agoMITView on GitHub
Where markdown or inline docs no longer match the code
In this repository81 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- templates/CLAUDE.mdCLAUDE.md
- add-languageSkill
- audit-a11ySkill
- audit-archSkill
- audit-ciSkill
- audit-debtSkill
- audit-flagsSkill
- audit-infraSkill
- audit-perfSkill
- audit-readinessSkill
- audit-securitySkill
- audit-slopSkill
- audit-testsSkill
- audit-tokensSkill
- audit-verifySkill
- backup-patternsSkill
- bash-patternsSkill
- claude-code-mods-patternsSkill
- code-challengeSkill
- code-contractSkill
- code-deep-reviewSkill
- code-evaluateSkill
- code-from-designSkill
- code-historySkill
- code-host-patternsSkill
- code-impactSkill
- code-migrateSkill
- code-tourSkill
- code-visualSkill
- depsSkill
- django-patternsSkill
- docker-patternsSkill
- drf-patternsSkill
- engineering-fundamentalsSkill
- fastapi-patternsSkill
- git-patternsSkill
- go-patternsSkill
- graphql-patternsSkill
- investigateSkill
- javascript-patternsSkill
- kit-rulesSkill
- logging-patternsSkill
- meta-conventionsSkill
- meta-promptSkill
- meta-refreshSkill
- meta-retroSkill
- meta-skillSkill
- monitoring-patternsSkill
- next-app-router-patternsSkill
- nuxt-patternsSkill
- opentofu-patternsSkill
- pr-descriptionSkill
- pr-publishSkill
- pr-queueSkill
- pr-replySkill
- pr-reviewSkill
- python-patternsSkill
- react-patternsSkill
- report-formatSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 4 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 26
Read the code at $ARGUMENTS.
- Distinctive: line 72
Do not edit documentation during the audit.
- Distinctive: line 73
Do not flag "missing documentation" as drift.
- Distinctive: line 74
If nothing drifted, the report says "No drift detected" and lists what was checked so the user knows the scope covered.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
/audit-doc-drift
Detect drift between code and markdown or inline documentation.
Run
With no target in the arguments, ask for one first, since the auditor can't ask. Resolve a linked ticket or doc as skills/investigate step 0 describes, then dispatch the auditor agent (subagent_type: kit:auditor, foreground) with this file's procedure and the resolved arguments. It writes the report. Then run the report-format skill's Runtime checks yourself, and reply per skills/kit-rules/reference/output.md section 3.
Prerequisites
$ARGUMENTS should point to the code surface to check. Required.
Procedure
- Stack is in the injected
<repo-context>block. - Read the code at $ARGUMENTS.
- Find relevant docs. Prefer targeted over exhaustive:
README.mdat the project root if $ARGUMENTS is insrc/or equivalentdocs/folder, but only files whose name or first heading mentions the target area- JSDoc, docstrings, and inline comments in the target files
CHANGELOG.mdonly if the task involves a version boundary
- If
<root>/.claude/rules/conventions/*.mdexists, check everypath:linecitation in it, whatever $ARGUMENTS names. Read the cited line with a few lines of context and confirm it still shows the convention its bullet states. Moved within the file:warning, with the new line. Gone, or now showing the opposite:failureagainst the rule file's line, since the rule now misleads. - Skip the dirs
skills/kit-rules/reference/tooling.mdsection 1 lists, andLICENSE.md. - Accepted decisions:
kit adrs <target>lists the ADRs that cite the target, and an accepted RFC or design doc in the project's design folder that names it counts too. Read each one's Decision, and check the code at the target still follows it.kit adrsfailing means the project keeps no ADRs. - Compare.
What counts as drift
- Inline comments or JSDoc that describe code no longer present or that has changed behavior
- Parameter descriptions that no longer match the signature
- Return type docs that conflict with the code's declared types
- External markdown with usage examples that would fail if run
- Configuration instructions that reference renamed or removed options
- Documented features that have been removed or renamed
- Feature documented but no longer exists
- Code that contradicts an accepted ADR, RFC, or design doc with nothing superseding it:
failureagainst the code'sfile:line. The fix is the code, or a new ADR that supersedes the old one (/write-adr). - Requirements documented in README, CLAUDE.md, or design docs that no longer match the implementation. Examples: a "supports X" claim with no code implementing X; a "must validate Y" rule with no validation in the relevant handler; a documented invariant that the code violates.
What does not count as drift
- Missing documentation for new features (that is a docs gap, not drift)
- Stylistic differences (tone, format)
- Out of date links to external sites, unless the target area depends on them
Proof
Each finding quotes both sides with file:line: the doc's claim and the code that contradicts it. For an example that would fail, name the line of code that makes it fail; never run it.
Output per finding
- What it is, with the documentation's
file:line - Evidence: what the documentation says (a short quote) and what the code does, with its
file:line - Severity:
failurewhen it actively misleads,warningwhen it's partly outdated,infofor a cosmetic gap - Fix: the correction, noted and never applied
Output file
Load the report-format skill and use its format. Write to the path kit scratch-dir doc-drift <target-slug> prints.
Scope rules
- Do not edit documentation during the audit.
- Do not flag "missing documentation" as drift. Only flag documented claims that no longer hold.
- If nothing drifted, the report says "No drift detected" and lists what was checked so the user knows the scope covered.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

