| name | check-doc |
| description | Verify documentation and CLAUDE instructions are updated alongside code changes |
| disable-model-invocation | true |
| context | fork |
| agent | Explore |
| allowed-tools | Bash(git diff*), Bash(git show*), Read, Grep, Glob |
Documentation Review
Ensure documentation stays synchronized with code changes.
Scope
Review changes from: !git diff --name-only HEAD~1 or files specified in $ARGUMENTS
Documentation Files
| File | Purpose | Update When |
|---|
CLAUDE.md | Main project guide | Architecture changes |
.claude/CLAUDE-API.md | API instructions | Backend changes |
.claude/CLAUDE-APP-PARTNERS.md | Partners app guide | Frontend changes |
.claude/CLAUDE-OBSERVATORY.md | Observatory guide | Observatory changes |
.claude/CLAUDE-DATALAKE.md | Datalake (dbt) guide | Data pipeline changes |
README.md | Project overview | Major changes |
api/justfile | Command reference | New commands |
Documentation Checklist
1. CLAUDE Instructions
2. Code Comments
3. Type Documentation
4. API Documentation
5. Configuration
6. Database
7. Datalake
Analysis Steps
-
Identify changed components:
git diff --name-only HEAD~1 | grep -E '\.(ts|tsx|sql|py)$'
-
Check for documentation changes:
git diff --name-only HEAD~1 | grep -E '(\.md|CLAUDE)'
-
Cross-reference: Ensure code changes have corresponding doc updates
Output Format
## Documentation Review Summary
**Status**: [UP TO DATE | NEEDS UPDATE | OUTDATED]
**Code Files Changed**: X
**Doc Files Changed**: Y
### Missing Documentation
#### [PRIORITY] Missing Doc for Feature/Change
- **Code change**: path/to/file.ts - description of change
- **Documentation needed**: Which file(s) need updates
- **Suggested content**: Brief outline of what to document
### Stale Documentation
- Documentation that no longer matches the code
### Documentation Updates Included
- Doc changes that correctly reflect code changes
### Required Actions
- [ ] Update specific documentation files
- [ ] Add inline comments for complex logic
- [ ] Update CLAUDE instructions for new patterns
Suggested Documentation Updates
When suggesting updates, provide specific text that can be added:
### Suggested Addition to .claude/CLAUDE-API.md
Add to "Service Modules" section:
| `new-service` | Description of what it does |
Add to "Action Pattern" section:
New decorator option `newOption` controls...
Invocation
/check-doc # Review uncommitted changes
/check-doc src/pdc/services/ # Check docs for specific directory
/check-doc --suggest # Generate documentation suggestions