name: doc-sync description: > Verify documentation matches code implementation. Compare documentation with code to check keyboard shortcuts, config options, and module descriptions for consistency.
Doc Sync Skill
Verify that documentation matches the actual code implementation.
Areas to Check
1. Keyboard Shortcuts
Files to compare:
README.md- Quick reference sectiondocs/KEYBOARD_REFERENCE.md- Complete referencesrc/input/normal/*.rs- Actual implementations
Verification:
- Extract shortcuts from README.md keyboard tables
- Extract shortcuts from KEYBOARD_REFERENCE.md
- Search for
KeyCode::Char('x')patterns in input handlers - Report any discrepancies
Common issues:
- README shows
'a'for adding projects, but code uses'n' - Missing shortcuts in documentation
- Deprecated shortcuts still documented
2. Configuration Options
Files to compare:
docs/CONFIG_GUIDE.md- Config documentationsrc/config.rs- Config struct and defaults
Verification:
- Extract config fields from
Configstruct - Check each field is documented in CONFIG_GUIDE.md
- Verify default values match
- Check for undocumented fields
3. Module Descriptions
Files to compare:
CLAUDE.md- Module responsibilities sectionsrc/*/mod.rs- Module doc comments
Verification:
- List all modules in CLAUDE.md
- Check each module exists
- Compare descriptions with module
//!comments - Report missing or outdated entries
4. Key Types
Files to compare:
CLAUDE.md- Key Types section- Source files with type definitions
Verification:
- List types in CLAUDE.md
- Verify each type exists in the codebase
- Check descriptions are accurate
- Report missing important types
Example Report
Documentation Sync Report:
README.md vs KEYBOARD_REFERENCE.md:
[MISMATCH] README: 'a' = Add project
REFERENCE: 'n' = Add project
[OK] All other shortcuts match
CONFIG_GUIDE.md vs config.rs:
[OK] All 12 config options documented
[OK] Default values match
CLAUDE.md vs codebase:
[MISSING] hooks/mod.rs HookEventType not documented in Key Types
[OK] Module responsibilities up to date
Quick Checks
Run these to spot-check documentation:
# Find all KeyCode patterns in input handlers
grep -r "KeyCode::Char" src/input/ | grep -v test
# List config fields
grep "pub " src/config.rs | head -20
# Check module doc comments
head -5 src/*/mod.rs
Fixes Applied
After running this skill, fix discrepancies by:
- Updating README.md for quick fixes
- Updating KEYBOARD_REFERENCE.md for complete changes
- Updating CLAUDE.md for architecture documentation
- Adding missing types to Key Types section