npx skills add ...
npx skills add trkbt10/indexion-skills --skill indexion-documentation
Documentation analysis — assess coverage, detect code-to-doc drift with plan reconcile, visualize dependencies with doc graph. Answers "what needs docs?" and "are docs still accurate?
npx skills add trkbt10/indexion-skills --skill indexion-documentation
Assess documentation state and detect drift. This skill covers the
evaluation side of the documentation lifecycle: what exists, what's
missing, what's stale. For building READMEs, see indexion-readme.
Reports:
Output example:
For a detailed plan with prioritized action items:
For a quick per-file listing of undocumented items:
How detection works: Uses KGF tokenization to find visibility keywords
(pub, public, export) paired with declaration keywords (fn, struct,
enum, type, trait). Associates /// doc comments with declarations.
Language-agnostic — works for any KGF-supported language.
Caveat: ///| marker-only comments count as "documented" even without
descriptive text. Check doc_preview in the output for quality, not just coverage.
Detect drift between implementation code and documentation.
This compares code symbols against documentation and reports:
Read the report:
The Vocabulary Divergence table shows distance (0-100%) between code vocabulary and documentation. 90%+ distance means the README is essentially unrelated to the current code. Check the Gap Terms column for specific missing vocabulary.
Scoped checks:
Timestamp strategies:
Cache and drift:
plan reconcile maintains a cache at .indexion/cache/reconcile/. After schema
changes or indexion upgrades, the cache can become stale and cause deserialization
errors. Clear it:
Generate dependency diagrams for understanding module relationships.
"plan reconcile shows 90%+ divergence everywhere"
"plan documentation says 100% coverage but docs are wrong"
///| marker
counts as documented. Use plan reconcile to check content accuracy."plan reconcile crashes on startup"
rm -rf .indexion/cache/reconcile"plan reconcile detects drift I already fixed"
--git flag uses commit timestamps. If you fixed docs but haven't committed,
mtime-based detection (--mtime-only) will see the fix, but git-based won't.Reconcile only checks implementation -> docs direction. It detects code terms
missing from docs, but does NOT detect docs referencing nonexistent CLI options.
For that direction, compare each README against indexion <command> --help manually.
# Which pub declarations lack doc comments?
indexion grep --undocumented src/# Full reconcile report in markdown
indexion plan reconcile --format=md .# Check only package-level docs
indexion plan reconcile --scope=package-docs .
# Check only tree-level docs
indexion plan reconcile --scope=tree-docs .
# Check specific documents
indexion plan reconcile --doc='docs/**/*.md' .
indexion plan reconcile --doc-spec=markdown .# Use git commit timestamps (more accurate for collaborative projects)
indexion plan reconcile --git .
# Use file mtimes only (faster, no git dependency)
indexion plan reconcile --mtime-only .rm -rf .indexion/cache/reconcile# Mermaid diagram (default — embeddable in GitHub README)
indexion doc graph src/config/
# Other formats
indexion doc graph --format=dot src/ # Graphviz DOT
indexion doc graph --format=d2 src/ # D2
indexion doc graph --format=text src/ # ASCII text
indexion doc graph --format=json src/ # Machine-readable
# Custom title and output file
indexion doc graph --title="KGF Dependencies" --output=deps.mmd src/kgf/# 1. What's the current state?
indexion plan documentation --style=coverage .
# 2. What specific items lack docs?
indexion grep --undocumented src/
# 3. Has code drifted from existing docs?
indexion plan reconcile --format=md .
# 4. What does the dependency structure look like?
indexion doc graph --output=deps.mmd src/
# 5. Fix flagged docs, re-verify
indexion plan reconcile --format=md .