Skip to main content

/jaan-to:docs-update

Smart documentation auditing with git-based staleness detection.


What It Does

Default (no args): Uses git history to find docs that are out of sync with their source code. Compares when code changed vs when docs were last updated.

Full audit: Scans all docs for quality issues, checks frontmatter, structure, links, duplicates, and STYLE.md compliance.


Usage

/jaan-to:docs-update [path] [--full] [--fix] [--check-only] [--quick]
ArgumentEffect
(none)Smart default: staleness check
[path]Check specific path only
--fullSkip staleness, do full audit
--fixAuto-fix issues
--check-onlyReport only, no changes
--quickInventory only

How It Maps Code to Docs

Code PathRelated Doc
skills/{name}/docs/skills/{role}/{slug}.md
scripts/{name}.shdocs/hooks/{name}.md
jaan-to/context/config.mddocs/config/README.md
jaan-to/context/*.mddocs/config/context-system.md

What It Checks (Full Audit)

CheckDescription
FrontmatterValid YAML with required fields
StructureH1, tagline, separators
Line limitsUnder max for doc type
LinksInternal links valid
DuplicatesSimilar content detected
LocationFile in correct folder

Output: Staleness Report (Default)

# Documentation Staleness Report
**Code changes:** 5 files | **Docs checked:** 12

## Potentially Outdated
| Doc | Related Code | Delta |
|-----|--------------|-------|
| docs/skills/pm/prd-write.md | pm-prd-write/SKILL.md | 15d stale |

## Missing Documentation
| Code File | Expected Doc |
|-----------|--------------|
| new-skill/SKILL.md | docs/skills/?/new-skill.md |

[1] Review stale [2] Full audit [3] Quick fix [4] Exit

Output: Full Audit Report

# Documentation Audit Report
**Files:** 21 | **Issues:** 5

## Summary
| Category | Count |
|----------|-------|
| ✅ Healthy | 16 |
| ⚠️ Need Updates | 3 |
| 🔴 Deprecated | 1 |
| 📦 Duplicates | 1 |

## Priority Actions
1. **hooks/old-hook.md** - Deprecated - Archive
2. **config/settings.md** - Missing frontmatter - Fix

Example

Smart staleness check (default):

/jaan-to:docs-update

Full audit:

/jaan-to:docs-update --full

Full audit with auto-fix:

/jaan-to:docs-update --full --fix

Check specific path:

/jaan-to:docs-update docs/skills/ --check-only

Fixes Applied

IssueAuto-Fix
Missing frontmatterAdds with defaults
Missing datesAdds current date
Missing separatorsAdds ---
H4+ headingsConverts to H3
Deprecated docsArchives to docs/archive/
Broken linksReports with suggestions
DuplicatesSuggests consolidation

Tips

  • Run without args for smart staleness detection
  • Use --full when you want comprehensive quality checks
  • Staleness threshold is 7 days (code changed > 7d before doc)
  • Deprecated docs are archived, never deleted
  • Updates updated_date on all modified files