AgentSkillsCN

docs-consistency

验证并修正文档内容,使其与实现保持一致。在更新文档、发布新版本,或当用户提及“文档一致性”“文档更新”“文档验证”“ドキュメント更新”“最新にして”“docsを直して”时使用此功能。先提炼设计意图,深入探究实现细节,再据此更新文档。

SKILL.md
--- frontmatter
name: docs-consistency
description: Verify and fix documentation to match implementation. Use when updating docs, releasing versions, or when user mentions 'docs consistency', 'docs update', 'docs verify', 'ドキュメント更新', '最新にして', 'docsを直して'. Extracts design intent, investigates implementation, then updates docs accordingly.
allowed-tools: [Read, Edit, Grep, Glob, Bash, Write]

Docs Consistency

Docs explain implementation; they do not rewrite design. Flow: design intent (What/Why) → implementation survey (How) → docs update (explanation).

Phase 1: Extract Design Intent

Read design docs (docs/internal/) and write tmp/docs-review/{feature}-intent.md capturing What, Why, constraints, and what users need to know.

Phase 2: Survey Implementation

Identify implementation files, public API, defaults, and edge cases. Write tmp/docs-review/{feature}-implementation.md.

Phase 3: Diff Against Current Docs

Compare intent + implementation memos against current docs. Build a diff table:

ItemDesign/ImplementationCurrent docsGap
Install commanddx jsr:...DocumentedNone
3 output modespreserve/flatten/singleMissingAdd
Default output dir./climpt-docsMissingAdd

Phase 4: Fix Docs

Do not change design docs — only update implementation-facing docs.

PriorityTarget
1README.md
2README.ja.md (sync required)
3docs/guides/
4--help output

Use intent/implementation memos as source material for writing.

Memo disposition after fix

SituationAction
Low value (simple fix)Delete tmp/docs-review/
Useful for PR descriptionQuote in PR
Worth preserving as design recordPromote to docs/internal/changes/

Phase 5: Format Check

bash
deno task verify-docs          # all checks
deno task verify-docs readme   # README.md/ja sync
deno task verify-docs manifest # manifest.json version

When docs files are added or removed: deno task generate-docs-manifest.

Phase 6: Language

PatternLanguage
*.mdEnglish (required)
*.ja.mdJapanese (optional, not distributed via JSR)

Japanese-only files: rename to .ja.md, create English .md translation, then regenerate manifest.

Distribution Scope

IncludedExcluded
docs/guides/en/, docs/internal/, top-level docs/*.mddocs/guides/ja/, docs/reference/, *.ja.md

File Classification

File typeRoleEditable?
docs/internal/Design intent recordNo (read only)
docs/reference/External referenceNo (not distributed)
README.md, docs/guides/, --helpImplementation explanationYes
tmp/docs-review/Working memoDelete or promote after use

Checklist

code
Phase 1: - [ ] Read docs/internal/, wrote {feature}-intent.md
Phase 2: - [ ] Identified impl files, wrote {feature}-implementation.md
Phase 3: - [ ] Built diff table against current docs
Phase 4: - [ ] Updated README.md, synced README.ja.md
Phase 5: - [ ] deno task verify-docs passed, manifest updated if needed
Phase 6: - [ ] No Japanese-only .md files remain
Memo:    - [ ] tmp/docs-review/ deleted or promoted

References

  • SEMANTIC-CHECK.md — Semantic consistency details
  • IMPLEMENTATION-CHECK.md — Formal checks (supplementary)
  • scripts/verify-docs.ts — Automated checks (supplementary)
  • refactoring skill — Docs grep after structural code changes (Phase 4 Step 12)
  • operational-guide.md in this skill's directory — Concrete example (docs-distribution), bash commands, distribution scope, memo lifecycle, language rules