AgentSkillsCN

docs-consistency

验证并修正文档内容,确保其与实际实现保持一致。适用于更新文档、发布新版本,或当用户提到“文档一致性”、“验证文档”、“文档更新”、“修复文档”时使用。

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 verify', 'ドキュメント更新', 'docsを直して'.
allowed-tools: [Read, Edit, Grep, Glob, Bash]

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/) and identify What, Why, constraints, and what users need to know.

Key design docs for breakdownprompt:

  • docs/design_pattern.md / docs/design_pattern.ja.md
  • docs/type_of_variables.ja.md / docs/variables.ja.md
  • docs/path_validation.md
  • docs/return_specification.ja.md

Phase 2: Survey Implementation

Identify implementation files, public API, defaults, and edge cases.

Key implementation files:

  • mod.ts - Public exports
  • src/core/prompt_manager.ts - Main API
  • src/types/ - Type definitions
  • src/validation/ - Validators
  • src/replacers/ - Variable replacers

Phase 3: Diff Against Current Docs

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

ItemDesign/ImplementationCurrent docsGap
Reserved variables4 typesDocumentedNone
Custom variablesHyphen supportMissingAdd

Phase 4: Fix Docs

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

PriorityTarget
1README.md
2docs/user_guide.md
3docs/api_reference.md

Phase 5: Verify

bash
# Check public exports match docs
grep "^export" mod.ts

# Check documented types exist
grep -r "PromptManager\|PromptResult\|PromptParams\|Variables" docs/ README.md

# Check code examples in docs
grep -A 5 "```typescript" README.md docs/user_guide.md

Phase 6: Language

PatternLanguage
*.mdEnglish (primary)
*.ja.mdJapanese (supplementary)

Checklist

code
Phase 1: - [ ] Read docs/, identified design intent
Phase 2: - [ ] Identified implementation files, surveyed public API
Phase 3: - [ ] Built diff table against current docs
Phase 4: - [ ] Updated README.md and relevant docs
Phase 5: - [ ] Verified consistency (exports, types, examples)

Related Skills

SkillPurposeWhen
docs-consistencyVerify & fixRelease prep, periodic review
update-docsCreate & updateFeature additions, changes
update-changelogCHANGELOG updateFeature completion