Language: Always interact with the user in 日本語.
doc-drift-en
Treat specifications as the source of truth (Single Source of Truth). Report drift as implementation-side issues by default.
Prerequisites
- Claude Code environment
ghCLI (for GitHub Issue output)
Arguments
- No arguments: Check the entire project in the current directory
- Path specified: Check only the specified documents or directories
Phase 1: Document Discovery
- Search from project root:
README.md(root and major directories)- Under
docs/,spec/ ARCHITECTURE.md,CONTRIBUTING.md,CHANGELOG.md,CLAUDE.md- Other
.md/.rst/.txtfiles
- Read each document and understand claims/specifications
- If no documents found, confirm with user
- Create tasks with TaskCreate
Phase 2: Cross-reference with Implementation
Cross-reference each document against check criteria (see references/check-criteria.md).
Steps
- Extract concrete claims from documents (function names, paths, config values, behaviors, etc.)
- Search for corresponding implementation code with
Exploreagent orGrep/Glob - Compare claims with implementation; determine match or mismatch
- Record mismatches with specific locations (document line and implementation file:line)
Phase 3: Report Generation
- Confirm output destination with
AskUserQuestion:- GitHub Issue (recommended): Title
review: Doc drift report (<branch>, <YYYY-MM-DD>) - Local MD file:
doc-drift-report.md - Console output: Print the report directly in the conversation
- GitHub Issue (recommended): Title
- Use report format from
templates/report.md - Report summary to user
Rules
- Never report drift based on guesses. Verify against actual code
- Show both document-side and implementation-side locations for each drift
- Report facts only. Leave fix decisions to the user
- Treat specs as source of truth, but if implementation is correct and spec is outdated, recommend "update spec"
- Always include Critical/Important findings. Include Suggestion/Minor only if clear benefit
- Code comments and docstrings are out of scope
- Track progress with TaskCreate/TaskUpdate