index
Manage and query the documentation dependency index. Use this to identify which documents need to be updated when code changes.
When & Why to Use This Skill
The Documentation Index Skill is a specialized developer tool designed to bridge the gap between source code and technical documentation. By maintaining a robust dependency index, it enables precise impact analysis, ensuring that documentation remains accurate and synchronized as the codebase evolves. This skill helps engineering teams prevent 'documentation rot' and streamlines the maintenance of complex project wikis, architecture guides, and READMEs.
Use Cases
- Impact Analysis: Before refactoring or modifying code, identify exactly which documentation files (e.g., API specs, architecture guides) are affected and require updates.
- Documentation Integrity: Automatically verify that all indexed documentation paths and code references exist, preventing broken links and outdated references in project manuals.
- Visualizing Architecture: Generate Mermaid-based topology graphs to visualize the relationships between different system components and their supporting documentation for better knowledge sharing.
- Workflow Automation: Integrate documentation tracking into the development lifecycle to ensure new files are indexed and deprecated files are removed systematically during the PR process.
| name | index |
|---|---|
| description | Manage and query the documentation dependency index. Use this to identify which documents need to be updated when code changes. |
Documentation Index Skill
This skill allows you to track relationships between code and documentation, enabling "Impact Analysis". Before making changes to code, you should check which documents describe that code. After making changes, you should update the relevant documents and the index itself.
Commands
Check Impact
Find out which documents are affected by a change to a specific file.
Command: ./scripts/index impact <filepath> [--format json]
Use this before editing any code.
List Index
View all indexed relationships.
Command: ./scripts/index list [--format json]
Add/Update Entry
Register a relationship between a document and code files, or between documents.
Command: ./scripts/index add <doc_path> [--related "src/file1.py,src/file2.py"] [--depends "docs/other.md"] [--force]
doc_path: The documentation file (e.g.,docs/architecture/auth.md).--related: Comma-separated list of files (code or other) thatdoc_pathdescribes.--depends: Comma-separated list of other documents thatdoc_pathdepends on.
Remove Entry
Remove a document from the index or specific items from it.
Command: ./scripts/index remove <doc_path> [--item "src/file1.py"] [--section related|depends_on]
Check Integrity
Verify that all paths in the index actually exist.
Command: ./scripts/index check [--format json]
Visualize
Generate a Mermaid graph of the documentation topology.
Command: ./scripts/index graph
Workflow
- Before Coding: Run
./scripts/index impact src/target_file.pyto see what docs need attention. - After Coding:
- Update the identified docs.
- If you created new files, add them to the index using
./scripts/index add. - If you deprecated files, remove them using
./scripts/index remove.
- Validation: Run
./scripts/index checkto ensure the index is healthy.