feat(docs): add --audit mode to the design-doc checker - #4
Merged
Conversation
The drift report has a structural blind spot: it diffs FORWARD from a doc's own last change. Staleness that predates an incomplete refresh is invisible to it permanently — paws described a scene.js canvas renderer for three weeks after it became the SVG-DOM wool.js, and no number of drift runs could ever have said so, because the 07-30 doc pass moved the baseline past the 07-17 removal. --audit asks the orthogonal question: which tracked modules are named in NO design doc at all. Independent of when anything changed, so it catches inherited staleness and thin coverage the drift report is not built to see. Kept out of the default report deliberately — it is coarser and answers a different question, and mixing the two would blur what a clean run means. Filters chosen by measuring the false-positive rate, not by guessing: tests, __init__.py package markers, vendored code, .d.ts/.min.js, generated migration revisions (migrations|alembic/versions — the tool writes one file per schema change; the schema is what a doc documents, not each revision), and anything under a `-> none` path. With those, 6 of 11 repos report zero, which is what makes a non-zero number worth reading. X-Review-Waive: shared non-blocking test file plus the paragraph documenting it; no product code touched. Verified across all 11 live checkouts: 5 pytests pass everywhere, ruff format + ruff check clean (uvx ruff 0.16.2). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The drift report has a structural blind spot, and this adds the check that covers it.
The gap
The report diffs forward from a doc's own last change. Staleness that predates an incomplete refresh is invisible to it permanently.
Concretely:
pawsdescribed ascene.jscanvas renderer for three weeks after it became the SVG-DOMwool.js. No number of drift runs could ever have flagged it — the 07-30 doc pass moved the baseline past the 07-17 removal, so the removal sits outside every future diff.What
--auditdoesAsks the orthogonal question: which tracked modules are named in no design doc at all. Independent of when anything changed, so it catches inherited staleness and thin coverage the drift report isn't built to see.
Deliberately not part of the default report — it's coarser and answers a different question, and mixing the two would blur what a clean run means.
Filters were measured, not guessed
Skips tests,
__init__.pypackage markers, vendored code,.d.ts/.min.js, generated migration revisions (migrations|alembic/versions— the tool writes one file per schema change; the schema is what a doc documents, not each revision), and anything under a-> nonepath.The first cut reported 27 "unnamed" in paws, nearly all
__init__.pyand alembic revisions. With the filters, current numbers across the fleet:6 of 11 at zero is what makes a non-zero number worth reading. A check that flags everything gets ignored exactly like one that flags nothing.
Verification
All 11 live checkouts: 5 pytests pass,
ruff format --checkandruff checkclean (uvx ruff 0.16.2). Checker stays byte-identical across repos.🤖 Generated with Claude Code
https://claude.ai/code/session_01VE91emzDnxCY2MWDmuuip7