| name | docs-updater |
| description | Detect documentation drift and patch affected docs โ via git diff (hooks, manual) or structured detect JSON from an external caller. Keeps references, links, tables, and nav entries accurate. Use when syncing docs after code changes, before PRs, on doc sync requests, or when automation reports documentation drift. Default is survey only; edit documentation files only when the user explicitly requests a fix or caller constraints allow edits. Not for new document creation (use docs-creator) or markdown linting (use markdown-validation). |
| license | Apache-2.0 |
| metadata | {"author":"y-miyazaki","version":"3.4.0"} |
UTILITY SKILL โ automated diff-sync and drift repair, not content authoring.
Input
Output Specification
Report per common-output-format.md. On the automation path, also follow common-output-format-automation.md and category-automation-envelope.md. Stay within category-scope.md.
Execution Scope
Target: root *.md, docs/**/*.md, nested **/README.md (excluding generated directories), and mkdocs.yml (nav section) when present.
USE FOR:
DO NOT USE FOR:
- New document creation or content improvement (use docs-creator)
- Non-documentation file edits
- Markdown linting (use markdown-validation)
- Run detection scripts for other skills or manage caller state
Reference Files Guide
Workflow
Resolve whether to edit documentation files before patching:
| Source | Edit docs |
|---|
| Interactive / hook โ default | No โ survey only |
| Interactive / hook โ fix language in the same request | Yes โ examples: fix, sync, update docs, ไฟฎๆญฃใใฆ |
| Interactive / hook โ follow-up after a prior survey in the session | Yes when the user asks to fix, apply, or patch documentation |
Automation โ ## Constraints | Per may_edit in category-automation-envelope.md |
Interactive / hook path
- Run this skill's detect script with
--scope <scope>. On non-zero exit, read stdout and stop. On exit 0, parse success JSON.
- If
skip is true, report skip and exit.
- Triage
affected_docs per common-impact-map.md; grep before full read.
- When edits are not requested, emit survey shape per common-output-format.md; stop โ do not edit documentation files or run
git add.
- When edits are requested, apply minimal patches per common-checklist.md; regenerate
docs/index.md when docs/ files created/deleted/renamed; stage with git add; emit apply shape per common-output-format.md.
Automation path
When detect JSON and ## Constraints are present: follow category-automation-envelope.md for edit gate, report shape, and synthesis. Triage and patch per common-checklist.md and category-documentation-maintenance.md. Do not manage caller state.
Error Handling
| Condition | Severity | Action |
|---|
Detect script non-zero exit or status: "error" | Fatal | Read stdout; stop โ do not treat as success-path detect JSON |
| No git repository | Fatal | Stop |
| Empty diff / no documentation impact | Info | Report skip, exit |
| Affected doc file missing | Recoverable | Skip file; note in report |
| Exceeds scope (>3 H2, etc.) | Recoverable | Stop for file; recommend docs-creator |
mkdocs.yml missing | Recoverable | Skip nav update |
| Fix requested but edits not allowed | Info | Survey only; note that edits require an explicit fix request or caller permission |
Automation write_target mismatch | Recoverable | Survey only per category-automation-envelope.md |