Doc Sync Skill
Verify that documentation matches the actual code implementation.
Areas to Check
1. Keyboard Shortcuts
Files to compare:
- •
README.md- Quick reference section - •
docs/KEYBOARD_REFERENCE.md- Complete reference - •
src/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 documentation - •
src/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 section - •
src/*/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
code
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:
bash
# 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