CW-301f · Module 3
Documentation-as-Code Pipelines
3 min read
Documentation-as-code treats documentation with the same rigor as source code: version controlled, reviewed via pull requests, tested by CI, and deployed automatically. Claude integrates into this pipeline at the authoring stage — generating drafts, updating pages from source changes, and running quality checks before merge.
The CI integration: on every pull request that modifies documentation, run a Claude-powered quality check: "Review this documentation change. Check for: broken links, inconsistent terminology, missing code examples, unclear instructions (any step that requires the reader to guess), and conformance to the style guide [paste rules]." The quality check catches issues before merge, not after a reader files a bug report.
# .github/workflows/doc-check.yml
name: Documentation Quality
on:
pull_request:
paths: ['docs/**']
jobs:
quality:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check links
run: npx markdown-link-check docs/**/*.md
- name: Check style
run: npx markdownlint docs/**/*.md
- name: Spell check
run: npx cspell docs/**/*.md