スキル一覧に戻る
laurigates

documentation-quality-analysis

by laurigates

Claude Code plugins for development workflows

2🍴 0📅 2026年1月24日
GitHubで見るManusで実行

SKILL.md


model: haiku name: Documentation Quality Analysis description: Analyze and validate documentation quality for PRDs, ADRs, PRPs, CLAUDE.md, and .claude/rules/ to ensure standards compliance and freshness allowed-tools: Bash, Read, Grep, Glob, TodoWrite created: 2026-01-08 modified: 2026-01-08 reviewed: 2026-01-08

Documentation Quality Analysis

Expert analysis of technical documentation quality, structure, and maintenance for codebases using Blueprint Development methodology and Claude Code conventions.

Core Expertise

Documentation quality is critical for:

  • AI Assistant Context: Well-structured docs enable better AI assistance
  • Knowledge Preservation: Captures architectural decisions and rationale
  • Onboarding: Accelerates new team member productivity
  • Maintenance: Prevents knowledge loss and technical debt

This skill provides systematic analysis of:

  • CLAUDE.md: Project-level AI assistant instructions
  • .claude/rules/: Modular rule definitions
  • ADRs: Architecture Decision Records
  • PRDs: Product Requirements Documents
  • PRPs: Product Requirement Prompts (Blueprint methodology)

Documentation Types & Standards

CLAUDE.md

Purpose: Guide AI assistants on working with the codebase

Required Elements:

---
created: YYYY-MM-DD
modified: YYYY-MM-DD
reviewed: YYYY-MM-DD
---

# Project Name

## Project Structure
[Directory layout and organization]

## Rules
[Key rules and conventions]

## Development Workflow
[Common tasks and patterns]

## Conventions
[Naming, structure, etc.]

Quality Indicators:

  • ✅ Clear project structure overview
  • ✅ References to .claude/rules/ files
  • ✅ Tables for quick reference
  • ✅ Focused and concise (not a full manual)
  • ✅ Updated within last 6 months

.claude/rules/

Purpose: Modular, reusable rule definitions

File Structure:

---
created: YYYY-MM-DD
modified: YYYY-MM-DD
reviewed: YYYY-MM-DD
---

# Rule Title

[Clear, specific guidance on a single concern]

Quality Indicators:

  • ✅ One concern per rule file
  • ✅ Descriptive file names (kebab-case)
  • ✅ Clear scope and applicability
  • ✅ Actionable guidance with examples
  • ✅ Cross-references to related rules

Common Rules:

  • plugin-structure.md - Plugin organization
  • release-please.md - Version management
  • skill-development.md - Skill creation patterns
  • agentic-optimization.md - CLI optimization for AI
  • command-naming.md - Command conventions

Architecture Decision Records (ADRs)

Purpose: Document significant architectural choices

Format: MADR (Markdown Architecture Decision Records)

Structure:

# ADR-NNNN: Title

**Date**: YYYY-MM
**Status**: Accepted | Superseded | Deprecated
**Deciders**: [who decided]

## Context
[Problem and constraints]

## Decision
[What was decided]

## Consequences
[Positive and negative outcomes]

Location: docs/adrs/ or docs/adr/

Naming: Sequential numbers, kebab-case titles

  • 0001-plugin-based-architecture.md
  • 0002-domain-driven-organization.md

Quality Indicators:

  • ✅ All major architectural decisions documented
  • ✅ Sequential numbering without gaps
  • ✅ Clear context and rationale
  • ✅ Consequences documented (both pros and cons)
  • ✅ Index file maintained
  • ✅ Status accurate (Accepted/Superseded/Deprecated)

Product Requirements Documents (PRDs)

Purpose: Define what needs to be built and why

Location: docs/prds/ or .claude/blueprints/prds/

Structure:

# Project/Feature Name - PRD

**Created**: YYYY-MM-DD
**Status**: Draft | Active | Implemented | Archived
**Version**: X.Y

## Executive Summary
- Problem Statement
- Proposed Solution
- Business Impact

## Stakeholders & Personas
[Who cares and who uses]

## Functional Requirements
[What the system must do]

## Non-Functional Requirements
[Performance, security, accessibility]

## Success Metrics
[How we measure success]

## Scope
- In Scope
- Out of Scope

## Technical Considerations
[Architecture, dependencies, integrations]

Quality Indicators:

  • ✅ Clear problem statement
  • ✅ User personas defined
  • ✅ Specific, measurable requirements
  • ✅ Success metrics defined
  • ✅ Scope explicitly bounded
  • ✅ Status field accurate
  • ✅ Updated when requirements change

Product Requirement Prompts (PRPs)

Purpose: AI-executable feature specifications (Blueprint methodology)

Location: docs/prps/

Structure:

# [Feature Name] PRP

## Goal & Why
[One sentence goal + business justification]

## Success Criteria
[Specific, testable acceptance criteria]

## Context
- **Documentation References**: [URLs with sections]
- **ai_docs References**: [Curated context]
- **Codebase Intelligence**: [Files, patterns, snippets]
- **Known Gotchas**: [Warnings and mitigations]

## Implementation Blueprint
[Architecture decision + task breakdown + pseudocode]

## TDD Requirements
[Test strategy + critical test cases]

## Validation Gates
[Executable commands for quality gates]

## Confidence Score: X/10
- Context Completeness: X/10
- Implementation Clarity: X/10
- Gotchas Documented: X/10
- Validation Coverage: X/10

Quality Indicators:

  • ✅ Explicit file paths and line numbers
  • ✅ Code snippets from actual codebase
  • ✅ Executable validation commands
  • ✅ Honest confidence scoring (≥7 for execution)
  • ✅ Known gotchas with mitigations
  • ✅ Test strategy defined

Quality Analysis Commands

Check for Frontmatter

# Check if file has required frontmatter
grep -A 5 "^---$" CLAUDE.md | grep -E "(created|modified|reviewed):"

# Find files missing frontmatter
for f in docs/adrs/*.md; do
  grep -q "^---$" "$f" || echo "Missing frontmatter: $f"
done

Validate ADR Naming

# Check ADR naming convention (NNNN-title.md)
find docs/adrs -name "*.md" ! -name "README.md" ! -name "[0-9][0-9][0-9][0-9]-*.md"

# Check for sequential numbering
ls docs/adrs/[0-9]*.md | sort

Check Documentation Freshness

# Find docs not modified in 6 months
find docs -name "*.md" -mtime +180

# Check git history for documentation
git log --since="6 months ago" --oneline -- docs/ .claude/ CLAUDE.md

# Last modification of specific doc
git log -1 --format="%ai %s" -- CLAUDE.md

Validate Sections

# Check if ADR has required sections
grep -E "^## (Context|Decision|Consequences)" docs/adrs/0001-*.md

# Check PRD completeness
grep -E "^## (Executive Summary|Functional Requirements|Success Metrics)" docs/prds/*.md

Count Documentation

# Documentation inventory
echo "CLAUDE.md: $(test -f CLAUDE.md && echo '✅' || echo '❌')"
echo "Rules: $(ls .claude/rules/*.md 2>/dev/null | wc -l) files"
echo "ADRs: $(ls docs/adrs/*.md 2>/dev/null | grep -v README | wc -l) files"
echo "PRDs: $(ls docs/prds/*.md 2>/dev/null | wc -l) files"
echo "PRPs: $(ls docs/prps/*.md 2>/dev/null | wc -l) files"

Quality Scoring Methodology

Overall Quality Score (0-10)

Calculate as average of five dimensions:

DimensionScore 9-10Score 7-8Score 5-6Score 3-4Score 0-2
StructurePerfect org, all conventionsMinor naming issuesSome disorganizationPoor structureMissing/chaotic
CompletenessAll sections present1-2 missing sectionsSeveral gapsMajor gapsSeverely incomplete
FreshnessUpdated <3moUpdated <6moUpdated <12moStale >12moAbandoned >24mo
StandardsPerfect complianceMinor deviationsSome non-compliancePoor complianceNo standards
Content QualityExcellent clarityGood with minor issuesAcceptableUnclear/vagueUnusable

Dimension-Specific Scoring

Structure (Organization & Naming):

  • File naming conventions followed
  • Directory structure logical
  • Sequential numbering (ADRs)
  • Proper categorization (.claude/rules/)

Completeness (Required Elements):

  • All required sections present
  • Frontmatter complete
  • Cross-references included
  • Examples provided where needed

Freshness (Currency):

  • modified dates recent
  • Git commits align with modified dates
  • Reflects current codebase state
  • Regular review cadence

Standards Compliance (Format Adherence):

  • Frontmatter present and correct
  • Template structure followed
  • Markdown formatting valid
  • Links and references work

Content Quality (Clarity & Usefulness):

  • Clear, specific language
  • Actionable guidance
  • Relevant examples
  • Appropriate detail level
  • No contradictions or confusion

Common Documentation Issues

Critical Issues (Must Fix)

IssueDetectionFix
Missing CLAUDE.md! -f CLAUDE.mdCreate using project template
No frontmatter! grep "^---$"Add YAML frontmatter with dates
Completely outdatedmodified >24moReview and update or archive
Broken structureMissing required sectionsFollow template structure
Invalid ADR namingNot NNNN-title.mdRename to follow convention

Warnings (Should Fix)

IssueDetectionFix
Stale docsmodified >6moReview and update modified date
Missing sectionsTemplate mismatchAdd missing sections
No ADR indexNo README in adrs/Create index file
Vague requirementsReview contentAdd specificity and examples
Low confidence PRPScore <7Research more context

Suggestions (Nice to Have)

IssueDetectionFix
Sparse rules<3 rule filesExtract common patterns to rules
No PRPsEmpty prps/ dirCreate PRPs for planned features
Missing examplesGrep for code blocksAdd code examples
Poor cross-refsFew markdown linksLink related documentation
No metricsPRD without success criteriaDefine measurable metrics

Analysis Workflow

1. Inventory Phase

Collect all documentation:

# List all documentation
find . -name "CLAUDE.md" -o -path "*/.claude/rules/*.md" -o -path "*/docs/adrs/*.md" -o -path "*/docs/prds/*.md" -o -path "*/docs/prps/*.md"

Create inventory:

  • Count files by type
  • Note missing standard docs
  • Check directory structure

2. Validation Phase

For each document type:

  • Read the file
  • Check frontmatter exists and is valid
  • Verify required sections present
  • Validate naming conventions
  • Assess content quality

3. Freshness Phase

Check currency:

# Git last modified
git log -1 --format="%ai" -- path/to/doc.md

# Compare frontmatter vs git
# (modified date should match recent git activity)

Flag stale documents:

  • 6mo: Warning

  • 12mo: Concern

  • 24mo: Critical

4. Scoring Phase

Calculate scores:

  1. Structure: File org, naming (0-10)
  2. Completeness: Sections present (0-10)
  3. Freshness: Currency (0-10)
  4. Standards: Format compliance (0-10)
  5. Content: Quality, clarity (0-10)

Overall = Average of 5 dimensions

5. Reporting Phase

Generate report:

  • Executive summary with overall score
  • Inventory table
  • Dimension scores
  • Critical issues (must fix)
  • Warnings (should fix)
  • Suggestions (nice to have)
  • Actionable recommendations with specific files/fixes

Agentic Optimizations

TaskOptimized Approach
List docsfind with multiple -name patterns, single command
Check frontmattergrep -l "^---$" *.md batch check
Validate namesShell globbing [0-9][0-9][0-9][0-9]-*.md
Count filesPipeline `ls
Git historygit log --since="6 months ago" --oneline
Batch validationfor loop over files, collect issues

Quick Reference

Frontmatter Template

---
created: 2026-01-08
modified: 2026-01-08
reviewed: 2026-01-08
---

ADR Quick Template

# ADR-NNNN: Title

**Date**: 2026-01
**Status**: Accepted

## Context
[Why this decision?]

## Decision
[What did we decide?]

## Consequences
✅ Pros: ...
❌ Cons: ...

Quality Score Guide

  • 9-10: Excellent - Reference quality
  • 7-8: Good - Minor improvements
  • 5-6: Fair - Several issues
  • 3-4: Poor - Major work needed
  • 0-2: Critical - Severe problems
  • /docs:quality-check - Run comprehensive analysis
  • /blueprint:init - Initialize Blueprint Development
  • /blueprint:prd - Generate PRD from project docs
  • /blueprint:adr - Generate ADRs from codebase
  • /blueprint:prp-create - Create PRP for feature

Best Practices

  1. Regular Reviews: Run quality checks monthly
  2. Update Modified Dates: When editing, update frontmatter
  3. Quarterly Reviews: Update reviewed date every 3 months
  4. Template Adherence: Use standard templates consistently
  5. Specificity: Prefer explicit over vague (file paths, metrics)
  6. Cross-Reference: Link related documentation
  7. Examples: Include code snippets and real examples
  8. Scope Management: One concern per document
  9. Git Sync: Commit docs with code changes
  10. AI-Friendly: Write for both humans and AI assistants

Error Handling

# Safe directory checks
test -d docs/adrs && ls docs/adrs || echo "ADRs directory not found"

# Safe file reads with fallback
cat CLAUDE.md 2>/dev/null || echo "CLAUDE.md not found"

# Git-aware freshness (works without git)
git log -1 --format="%ai" -- CLAUDE.md 2>/dev/null || echo "No git history"

# Glob with no-match handling
shopt -s nullglob
for f in docs/adrs/*.md; do
  echo "Processing $f"
done

References

  • MADR (Markdown ADR) - ADR template format
  • Michael Nygard ADR - Original ADR format
  • Blueprint Development methodology - PRP/PRD patterns
  • .claude/rules/ - Project-specific documentation standards

スコア

総合スコア

50/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です