| name | cui-documentation |
| description | General documentation standards for README, AsciiDoc, and technical documentation |
| allowed-tools | Read, Edit, Write, Bash, Grep, Glob |
CUI Documentation Skill
Standards for writing clear, maintainable technical documentation in CUI projects.
Note: This skill covers general documentation. For code documentation, use:
cui-javadocfor Java code documentationcui-frontend-development/jsdoc-standards.mdfor JavaScript documentation
Workflow
Step 1: Load Applicable Documentation Standards
CRITICAL: Load current documentation standards based on context.
Always load core documentation standards:
Read: standards/documentation-core.mdConditional loading based on context:
If creating or editing README files:
Read: standards/readme-structure.mdIf working with AsciiDoc files:
Read: standards/asciidoc-formatting.md
Extract key requirements from all loaded standards
Store in working memory for use during task execution
Step 2: Analyze Existing Documentation
When to Execute: After loading standards
What to Analyze:
General Documentation Quality:
- Check tone and style (see documentation-core.md for requirements)
- Verify no marketing language or promotional wording
- Validate factual descriptions with sources
- Review technical precision
- Check for conciseness and clarity
AsciiDoc Format (if .adoc files):
- Verify document header with required attributes
- Check cross-reference syntax (
xref:format) - CRITICAL: Validate blank lines before all lists
- Review code block formatting with language specification
- Check section hierarchy and numbering
README Structure (if README files):
- Verify title and description
- Check Maven coordinates placement
- Review core concepts section
- Validate usage examples completeness
- Check configuration documentation
- Review best practices section
Content Quality:
- Only existing code/features documented
- All references verified to exist
- RFC references must be relevant (see documentation-core.md for verification requirements)
- Consistent terminology used
- Code examples from unit tests
- All public APIs documented
Step 3: Apply Documentation Standards
When to Execute: During documentation creation or review
What to Apply:
Core Documentation Principles:
- Professional, neutral, objective tone
- No marketing or promotional language
- Technical precision with verifiable sources
- Concise, clear language
- Document only existing features
- Use linking instead of duplication
AsciiDoc Formatting (if .adoc files):
README Files (README.adoc, */README.adoc):
- Use
:toc: macro(NOT:toc: left) - Place
toc::[]manually where TOC should appear - Example header:
= Module Name :toc: macro :toclevels: 3 :sectnums: :source-highlighter: highlight.js Brief module description. toc::[] == Core Concepts
General Documentation Files (not READMEs):
- Use
:toc: leftfor automatic left sidebar TOC - Do NOT use
:toc: macro - Example header:
= Document Title :toc: left :toclevels: 3 :toc-title: Table of Contents :sectnums: :source-highlighter: highlight.js
All AsciiDoc Files:
- Use
xref:path/to/file.adoc[Link Text]for cross-references - ALWAYS add blank line before lists
- Specify language in code blocks
- Follow proper section hierarchy
- Use
README Structure (if README files):
- Title and brief description
- Maven coordinates immediately after description
- Core Concepts section
- Detailed Component Documentation with links to source
- Usage Examples (complete, working code)
- Configuration section
- Best Practices
- Technical Details
- Related Documentation
Code Examples:
- Must be complete and compilable (see documentation-core.md for requirements)
- Include all necessary imports
- Show proper error handling
- Follow project coding standards
- Be verified by unit tests
- Use clear variable names
- Include comments for complex steps
- Configuration placeholders must be clearly identified
Step 4: Verify Documentation Quality
When to Execute: After creating or updating documentation
Quality Checks:
Tone and Style Verification:
- Professional, neutral tone
- No marketing language
- Factual descriptions
- Technical precision
- Concise language
AsciiDoc Format Verification (if .adoc):
- Document header complete
- Cross-references use
xref:syntax - Blank lines before all lists
- Code blocks have language specification
- Section hierarchy correct
README Structure Verification (if README):
- Title and description present
- Maven coordinates included
- Core concepts documented
- Usage examples complete
- Configuration documented
- Best practices included
Content Quality Verification:
- Only existing features documented
- All references verified
- Consistent terminology
- Code examples from tests
- All public APIs documented
Build Verification (if applicable):
# Verify documentation builds successfully mvn clean install -DskipTests
Step 5: Automated Validation (AsciiDoc)
When to Execute: After creating or updating AsciiDoc files
Available Validation Scripts:
This skill includes two validation scripts in the scripts/ directory:
asciidoc-validator.sh- Format validation script- Validates AsciiDoc format compliance
- Checks for blank lines before lists
- Verifies section header formatting
- Detects list syntax issues
Usage:
# Validate a single file scripts/asciidoc-validator.sh path/to/file.adoc # Validate all files in a directory scripts/asciidoc-validator.sh directory/verify-adoc-links.py- Link verification script- Validates cross-reference links
- Checks for broken file references
- Verifies anchor existence
- Detects deprecated syntax
Usage:
# Verify links in a single file python3 scripts/verify-adoc-links.py --file path/to/file.adoc --report target/links.md # Verify links in directory (non-recursive) python3 scripts/verify-adoc-links.py --directory directory/ --report target/links.md # Verify links recursively python3 scripts/verify-adoc-links.py --directory directory/ --recursive --report target/links.md
Validation Workflow:
Run format validation:
scripts/asciidoc-validator.sh target_file_or_directory 2>&1Run link verification:
mkdir -p target/asciidoc-reviewer python3 scripts/verify-adoc-links.py --file target.adoc --report target/asciidoc-reviewer/links.md 2>&1Distinguish link validation results:
- Syntax Valid + Target Exists: ✅ Link is correct
- Syntax Valid + Target Missing: ❌ Reference to non-existent file
- Common cause: Documentation for planned/future features
- Action: Either create the target document or remove the reference
- Do NOT leave references to non-existent files
- Syntax Invalid: ❌ Malformed cross-reference
- Fix syntax to use proper
xref:path[text]format
- Fix syntax to use proper
Review validation output and fix issues
Re-run validation to confirm fixes
Script Paths:
- Scripts are located in the skill directory at:
scripts/asciidoc-validator.shandscripts/verify-adoc-links.py - When running from project root, use relative path from current working directory
- Scripts require execution from a location where relative paths to AsciiDoc files are correct
Step 6: Document Changes and Commit
When to Execute: After verification passes
Commit Standards:
- Follow standard commit message format
- Reference related issues
- Document significant documentation changes
- Add co-authored-by line for Claude Code
Common Documentation Patterns
AsciiDoc Document Header
= Document Title
:toc: left
:toclevels: 3
:toc-title: Table of Contents
:sectnums:
:source-highlighter: highlight.js
== Purpose
Brief description of the document's purpose.
== Related Documentation
* xref:other-document.adoc[Other Document]
* xref:../category/document.adoc[Category Document]
README Structure Example
= Module Name
Concise description of the module's purpose and key features.
== Maven Coordinates
[source, xml]
----
<dependency>
<groupId>group.id</groupId>
<artifactId>artifact-id</artifactId>
</dependency>
----
== Core Concepts
=== Feature One
* Capability details
* Integration points
* Key benefits
== Usage Examples
=== Basic Usage
[source,java]
----
// Complete code example
----
== Configuration
=== Property Configuration
[source,properties]
----
# Configuration examples
----
Code Block with Language
[source,java]
----
@Test
void shouldValidateToken() {
// Test implementation
}
----
Error Prevention
Common Documentation Issues
- Missing Blank Line Before List: AsciiDoc grammar requires blank line
- Wrong Cross-Reference Syntax: Use
xref:notlink: - Missing Language Specification: Always specify language in code blocks
- Marketing Language: Use neutral, factual descriptions
- Incomplete Code Examples: Provide complete, compilable examples
Quality Violations
- Promotional Tone: "Our amazing feature" → "Feature X provides..."
- Incomplete Header: Missing required document attributes
- Invalid References: Links to non-existent files
- Speculative Documentation: Documenting planned features
- Duplicate Content: Copy-paste instead of cross-reference
Quality Verification
All documentation must pass:
- Professional, neutral tone
- Proper AsciiDoc formatting
- Complete code examples
- Verified references
- Consistent terminology
- No marketing language
- Documents only existing features
References
All documentation standards are located in the standards/ directory:
- Core documentation principles: standards/documentation-core.md
- AsciiDoc formatting guidelines: standards/asciidoc-formatting.md
- README structure patterns: standards/readme-structure.md