Documentation Update Skill
This skill updates existing code flow documents in docs/codeflow/ to match code changes.
When to Use This Skill
- Syncing docs after code changes
- Checking docs are current before PR
- Identifying and updating docs impacted by refactoring
Prerequisites
- Existing code flow docs are present in
docs/codeflow/ - Changes are tracked in a Git repository
Step-by-Step Workflows
Workflow: Diff-Based Documentation Update
Check diffs
- Review Git diffs (staged/unstaged) with
#changes - Get changed file list
- Review Git diffs (staged/unstaged) with
Classify changes
- Minor only (comments, formatting, type annotations) -> No update needed
- Logic changes (function add/remove, branch changes, call target changes) -> Update needed
Identify impact scope
- Use
#searchto find related docs indocs/codeflow/ - Use
#usagesto find callers of changed functions/classes - List impacted document files
- Use
Review existing docs
- Read impacted docs with
#readFile - Identify gaps between current docs and actual code
- Read impacted docs with
Update docs
- Update sequence diagrams with
#editFilesto match latest code - Update explanations (step descriptions, file names, function names)
- Update Markdown links for file paths/functions (rename/move/line changes)
- Record update date in docs
- Update sequence diagrams with
Report results
- Output summary of updated docs
- Use
#problemsto check for code issues
Criteria: Cases Requiring Updates
| Change Type | Update Required |
|---|---|
| Comment/JSDoc changes | ❌ |
| Formatting/indentation | ❌ |
| Added type annotations | ❌ |
| Variable rename | ⚠️ Only if function signature is affected |
| File name/path change | ✅ Link updates required |
| Function/method line number changes | ✅ Update link #Lline |
| Function add/remove | ✅ |
| Branching changes | ✅ |
| Call target changes | ✅ |
| Event/command additions | ✅ |
| Error handling changes | ✅ |
Update Timestamp Format
Add/update this line in the header area (before overview):
> Last Updated: YYYY-MM-DD - [summary of changes]
Troubleshooting
| Problem | Solution |
|---|---|
| Related docs not found | Full-text search under docs/codeflow/ by changed file names |
| Changes are too broad | Prioritize high-impact changes first, defer minor ones |
| Feature has no docs yet | Recommend creating new docs with document.codeflow.analyze |
Converted and distributed by TomeVault — claim your Tome and manage your conversions.