← Back to list

documentation-parity-patterns
by CaptainPhantasy
⭐ 0🍴 0📅 Jan 25, 2026
SKILL.md
name: Documentation Parity Patterns description: Validates code-documentation parity using tree-sitter static analysis. Use when user asks about documentation validation, doc parity, checking if docs are up to date, or whether code matches documentation. version: 1.0.0
Documentation Parity Patterns
Validate that code and documentation stay synchronized using real static analysis, not just LLM reasoning.
When to Use
Trigger this skill when user asks:
- "validate docs", "check documentation", "doc parity"
- "are docs up to date", "documentation drift"
- "does this match the docs", "is this documented"
- "what's missing from documentation"
- "check code against docs"
Core Principles
- Code-based validation: Use tree-sitter or AST parsing, not prompts
- Tiered severity: Critical (API breaks), Warning (outdated info), Info (typos)
- Incremental checking: Check modified files, not entire codebase
- Non-blocking default: Alert but don't block unless configured
Validation Depth Levels
| Level | What It Checks | Speed |
|---|---|---|
| Shallow | Exported symbol names exist in docs | Fast |
| Medium | Function signatures match (params, types) | Moderate |
| Deep | Behavioral descriptions match actual behavior | Slow |
Common Issues Found
| Issue | Severity | Auto-Fix |
|---|---|---|
| Missing export in docs | Warning | Yes (placeholder) |
| Orphaned doc entry | Warning | Yes (remove) |
| Signature mismatch | Warning | Yes (update) |
| Path reference invalid | Info | No |
| Behavior description outdated | Critical | No (human review) |
Tree-Sitter Patterns
Extract exported symbols by language:
TypeScript:
tree-sitter parse file.ts | grep -E "export_statement|function_declaration"
Go:
tree-sitter parse file.go | grep -E "function_declaration.*^[A-Z]"
Python:
tree-sitter parse file.py | grep -E "function_definition|class_definition"
Validation Workflow
- Extract exported symbols from source files
- Search documentation for symbol references
- Compare signatures (at medium depth)
- Report mismatches with severity levels
- Offer auto-fixes where applicable
References
hooks/scripts/parity-check.sh- Main validation scriptcommands/check.md- Manual check commandcommands/fix.md- Auto-fix command
Examples
Validate specific file:
# Check if src/api/users.ts exports are documented
/doc-parity:check --files=src/api/users.ts
Full project scan:
# Check all source files against all docs
/doc-parity:check --severity=warning --depth=medium
Fix found issues:
# Preview and apply fixes
/doc-parity:fix --docs=docs/API.md
Score
Total Score
60/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
Reviews
💬
Reviews coming soon