Validates documentation is synchronized with code changes. Integrates with RFC-37 doclinter for structure validation and pre-push hooks to enforce documentation updates...
This skill ensures documentation stays synchronized with code changes. It provides validation tools, pre-push checks, and integration with RFC-37 documentation standards.
📚 references/ - Detailed documentation
🔧 scripts/ - Automation scripts
# Via skills CLI
node .scripts/skills-cli.ts doc-sync validate
# Or directly
node -e "import('./.scripts/lib/skills/doc-sync.ts').then(m => m.validateDocs('.'))"
Add documentation validation to your pre-push hook:
# In .git-hooks/pre-push or hooks-checks.js
# Checks if docs need updating when architecture files change
| Check | What It Does | Severity |
|---|---|---|
| README presence | Verifies README.md exists | Error |
| Broken links | Checks internal markdown links | Warning |
| API docs | Looks for generated API documentation | Info |
| Freshness | Compares doc timestamps to code | Warning |
| RFC-37 structure | Validates docs/ folder structure |
Error |
For repositories following RFC-37 documentation standards:
# Install the linter
brew tap bitsoex/homebrew-bitso
brew install bitso-documentation-linter
# Run RFC-37 validation
doclinter --repo-path . --verbose
# Preview Confluence structure
doclinter tree --repo-path .
See the rfc-37-documentation skill for full RFC-37 compliance.
The system can verify documentation is updated when significant files change:
const ARCHITECTURE_FILES = [
'technology-hierarchy.json',
'repo-overrides.json',
'managed-paths.json',
'.scripts/convert-rules.ts',
'.scripts/targeting.ts',
'.scripts/safe-sync.ts',
'.scripts/ci-distribute.ts',
'.github/workflows/ci.yaml'
];
When architecture files change, update one of:
docs/ai-ide-management/concepts/architecture.mddocs/ai-ide-management/how-tos/targeting-and-inheritance.mddocs/ai-ide-management/overview.mdREADME.md# For a single commit (when docs truly aren't needed)
AI_AGENTS_SKIP_DOCS_CHECK=1 git commit -m "chore: minor config tweak"
# Or document why in commit message
git commit -m "fix: typo in config
No docs update needed - cosmetic change only"
The doc-sync module exports these functions:
import {
validateDocs, // Run all documentation checks
checkReadme, // Verify README presence
checkBrokenLinks, // Find broken internal links
checkApiDocs, // Look for API documentation
checkFreshness, // Compare doc/code timestamps
DOC_TOOLS // Recommended tools by project type
} from './.scripts/lib/skills/doc-sync.ts';
import { validateDocs } from './.scripts/lib/skills/doc-sync.ts';
const result = await validateDocs('.', { quiet: false });
console.log('Passed:', result.passed);
console.log('Issues:', result.issues);
console.log('Warnings:', result.warnings);
console.log('Recommendations:', result.recommendations);
| Project | Tools | Commands |
|---|---|---|
| Java/Gradle | Javadoc, Checkstyle | ./gradlew javadoc |
| Node.js | TypeDoc, JSDoc, markdownlint | npx typedoc, npx markdownlint "**/*.md" |
| Python | Sphinx, pydocstyle, MkDocs | sphinx-build, pydocstyle |
| Go | godoc, go doc | go doc -all |
Follow RFC-37 structure for consistency:
docs/
├── decisions/ # ADRs (Architecture Decision Records)
├── how-tos/ # Step-by-step guides
├── runbooks/ # Operational procedures
└── {service}/ # Service-specific docs
├── concepts/ # Architecture, design
└── getting-started/
Use relative links between documentation files. For example, link from one reference file to another using relative paths like ./other-file.md or ../other-folder/file.md.
| Reference | Description |
|---|---|
| references/java/javadoc-patterns.md | Java documentation patterns |
| references/typescript/jsdoc-patterns.md | TypeScript documentation patterns |
| references/python/docstring-patterns.md | Python documentation patterns |
| references/go/godoc-patterns.md | Go documentation patterns |
| Skill | Purpose |
|---|---|
| rfc-37-documentation | RFC-37 structure and Confluence mirroring |
| quality-gateway | Quality gate orchestration |
| git-hooks | Pre-commit/pre-push hook setup |
For ai-code-instructions documentation, see docs/ai-ide-management/:
catalogues/ - Catalogues of rules, commands, MCP, skillsconcepts/ - Architecture and design conceptshow-tos/ - Step-by-step guidesmcp/ - MCP configuration docsoverview.md - Main entry point