Skip to content

feat(docs): add --audit mode to the design-doc checker - #4

Merged
minglong51 merged 1 commit into
mainfrom
chore/checker-audit-mode
Aug 9, 2026
Merged

feat(docs): add --audit mode to the design-doc checker#4
minglong51 merged 1 commit into
mainfrom
chore/checker-audit-mode

Conversation

@minglong51

Copy link
Copy Markdown
Owner

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: paws described a scene.js canvas renderer for three weeks after it became the SVG-DOM wool.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 --audit does

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 isn't built to see.

python3 <checker> --audit

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__.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.

The first cut reported 27 "unnamed" in paws, nearly all __init__.py and alembic revisions. With the filters, current numbers across the fleet:

0 unnamed non-zero
agent-usage-manager, minglongpan-site, music-club-site, galaxy-drill, paws-ios, harness-engineering threadlang 1 · paws 3 · ai-learning-cockpit 8 · founder-agent-os 18 · finance-os 44

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 --check and ruff check clean (uvx ruff 0.16.2). Checker stays byte-identical across repos.

🤖 Generated with Claude Code

https://claude.ai/code/session_01VE91emzDnxCY2MWDmuuip7

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>
@minglong51
minglong51 merged commit 8a465a2 into main Aug 9, 2026
4 checks passed
@minglong51
minglong51 deleted the chore/checker-audit-mode branch August 22, 2026 23:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant