| name | documentation-maintenance |
| description | Workflow skill for proactively updating stale docs and fixing docs path/layout drift. Use when: docs in README.md or docs/** are outdated, command usage has changed, or documentation file/folder placement changed. |
Documentation Maintenance Skill
Overview
This skill standardizes how to keep repository documentation accurate when command usage, setup steps, or file placement changes over time.
Primary goals:
- Detect stale command examples and outdated explanations
- Update references when docs files/folders move
- Keep
README.md, docs/**, .github guidance, and guidance assets aligned
- Prefer minimal, surgical edits; only reorganize structure when necessary to resolve path/layout drift or duplicated/conflicting instructions
Scope:
README.md
docs/**
.github/copilot-instructions.md
.github/prompts/review.prompt.md
docs/guidance/assets/**
Trigger Timing
Run this workflow when any of the following happens:
- PR creation or PR update
- Commands in setup/build/test flow changed
- Documentation file/folder placement changed
- Broken links or path resolution issues are reported
Workflow Phases
Phase 1: Drift Detection
Objective: Find where docs are stale or paths are invalid.
Checks:
- Compare documented commands with current executable sources:
package.json scripts
.devcontainer/postCreateCommand.sh
- CI or review checklists in
.github
- Verify docs links and relative paths from each markdown file location
- Detect folder placement drift (moved/renamed docs files)
- Identify duplicated instructions that should point to a shared source file
Output format:
Drift Report
- Command drift: [file + section + expected command]
- Path drift: [file + broken link + corrected link]
- Structure drift: [old path -> new path]
Phase 2: Scope Confirmation
Objective: Confirm update boundaries before editing.
Default inclusion:
README.md, docs/**, .github guidance docs, guidance assets
Default exclusion:
- Runtime source code behavior changes
- Dependency upgrades unrelated to doc accuracy
If uncertainty remains, ask focused clarification before editing.
Phase 3: Update Strategy
Objective: Decide how to update docs safely and consistently.
Rules:
- Prefer a single source of truth for examples (such as
docs/guidance/assets/*)
- In guides, prefer links to shared examples over duplicated code blocks
- Keep edits minimal where possible, but allow section reorganization when readability improves
- Preserve bilingual parity for paired docs when applicable
- When adding locale-specific docs with untranslated bodies, add a clear placeholder note near the top to avoid misleading readers
- Use native language labels in locale document headings where practical (for example,
हिन्दी, 한국어, 简体中文, 繁體中文)
Phase 4: Implementation
Objective: Apply changes and keep references coherent.
Execution checklist:
- Update stale command text and explanations
- Rewrite outdated file links using valid relative paths
- Move or add example files when needed (
docs/guidance/assets/**)
- Replace duplicated inline examples with links to shared example files
- Update cross-references in
.github docs if docs paths changed
Phase 5: Validation
Objective: Confirm documentation is internally consistent.
Validation checklist:
- Run production build check when docs mention Hugo workflows:
cd exampleSite && hugo --gc --minify
- Verify no broken internal links in edited docs
- Confirm referenced files actually exist
- Confirm no unintended files were modified (
git status)
Phase 6: PR Preparation
Objective: Present changes with clear reasoning.
Include in PR description:
- What drift was detected (commands/paths/structure)
- Which files were updated and why
- Whether sections were reorganized and rationale
- Any remaining manual follow-up tasks
Practical Patterns
Pattern A: Command usage drift
When a documented command differs from actual workflow:
- Update command in docs
- Update explanation text that depends on the old command
- Update troubleshooting guidance if symptoms changed
Pattern B: File placement drift
When docs path changes:
- Move/rename docs file
- Update all inbound references
- Update contributor guidance that cites old paths
Pattern C: Shared setup examples
When setup snippets repeat in multiple guides:
- Move canonical snippets to
docs/guidance/assets/*
- Link from each guide section to the canonical file
- Keep local guide text concise and task-oriented
Pattern D: Locale docs with placeholder content
When adding language-specific guide files before full translation is ready:
- Keep heading language label consistent with native naming conventions
- Add a short note near the top that the body is currently an English placeholder
- Reflect this status in
README.md documentation index if relevant
Example Run
User request:
"README.md and docs setup commands are outdated, and docs folders changed."
Skill output summary:
- Updated stale setup commands in README/docs
- Repointed broken links to new docs paths
- Consolidated devcontainer examples under docs/guidance/assets
- Replaced duplicate snippets with references in prerequisites sections
When This Skill Does NOT Apply
- Implementing runtime features unrelated to documentation
- Fixing application bugs without documentation impact
- Broad dependency migration not tied to docs accuracy
References