QA Docs Coverage (Jan 2026) - Discovery, Freshness, and Runbook Quality
Modern Best Practices (January 2026)
- Docs as QA: Treat docs as production artifacts with owners, review cadence, and CI quality gates (links/style/contracts/freshness)
- Contract-first: Validate OpenAPI/AsyncAPI/JSON Schema in CI; use coverage tools (Swagger Coverage / OpenAPI Coverage) to detect gaps
- Runbook testability: Every runbook must be executable in staging; validate with synthetic tests and incident exercises
- Automation + observability: Track coverage %, freshness, and drift via CI dashboards; prevent regressions via PR checklists
This skill provides operational workflows for auditing existing codebases, identifying documentation gaps, and systematically generating missing documentation. It complements docs-codebase by providing the discovery and analysis layer.
Key Principle: Templates exist in docs-codebase. This skill tells you what to document and how to find undocumented components.
Core references: Diataxis (doc structure), OpenAPI (REST), AsyncAPI (events).
When to use
- Auditing an existing repo for missing/outdated documentation
- Adding documentation quality gates (lint/link checks/contracts/freshness) to CI/CD
- Validating runbooks for incident readiness (MTTR reduction)
When to avoid
- Writing new documentation from scratch without a component inventory (use discovery first)
- Publishing AI-generated docs without human review and command/link verification
Quick start
Use progressive disclosure: load only the reference file you need.
- Discover components: references/discovery-patterns.md
- Measure coverage + gaps: references/audit-workflows.md (Phase 1-2) and assets/coverage-report-template.md
- Prioritize work: references/priority-framework.md
- Create an actionable backlog: assets/documentation-backlog-template.md and templates in docs-codebase
- Prevent regression: references/cicd-integration.md and references/freshness-tracking.md
Optional (recommended scripts; run from the repo being audited):
- Local link check:
python3 frameworks/shared-skills/skills/qa-docs-coverage/scripts/check_local_links.py docs/
- Freshness report:
python3 frameworks/shared-skills/skills/qa-docs-coverage/scripts/docs_freshness_report.py --docs-root docs/
Large Codebase Audit (100K-1M LOC)
For large codebases, the key principle is: LLMs don't need the entire codebase - they need the right context for the current task.
Phase 0: Context Extraction
Before starting an audit, extract codebase context using tools:
| Tool |
Command/URL |
Use Case |
| gitingest |
Replace "github.com" with "gitingest.com" |
Quick full-repo dump |
| repo2txt |
https://github.com/kirill-markin/repo2txt |
Selective file extraction |
| tree |
`tree -L 3 --dirsfirst -I 'node_modules |
.git |
Hierarchical Audit Strategy
For monorepos and large projects, audit hierarchically:
1. Root Level (Week 1)
├── AGENTS.md / CLAUDE.md exists?
├── README.md quality
├── ARCHITECTURE.md exists?
└── docs/ directory structure
2. Module Level (Week 2-3)
├── Each major directory has AGENTS.md?
├── API documentation complete?
└── Service boundaries documented?
3. Component Level (Week 4+)
├── Individual component READMEs
├── Code comments quality
└── Test documentation
Cross-Platform Documentation Audit
Check for multi-tool compatibility:
[ ] AGENTS.md exists (cross-platform standard)
[ ] CLAUDE.md exists or symlinked to AGENTS.md
[ ] GEMINI.md symlinked (if using Gemini)
[ ] File size under 300 lines (use @references for depth)
[ ] Subdirectory docs for each major module
Large Codebase Coverage Checklist
LARGE CODEBASE AUDIT CHECKLIST
Context Extraction:
[ ] Generated codebase dump (gitingest/repo2txt)
[ ] Created directory structure overview
[ ] Identified major modules/services
Root Documentation:
[ ] AGENTS.md / CLAUDE.md present and <300 lines
[ ] README.md with quick start
[ ] ARCHITECTURE.md with system overview
[ ] Symlinks configured for cross-platform
Module Documentation:
[ ] Each major directory has AGENTS.md
[ ] API endpoints documented
[ ] Database schemas documented
[ ] Event/message contracts documented
Maintenance:
[ ] Documentation ownership assigned
[ ] Freshness tracking enabled
[ ] CI/CD checks configured
Sources: Anthropic Claude Code Best Practices, OpenAI AGENTS.md Guide
Core QA (Default)
What "Docs as QA" Means
- Treat docs as production quality artifacts: they reduce MTTR, enable safe changes, and define expected behavior.
- REQUIRED doc types for reliability and debugging ergonomics:
- "How to run locally/CI" and "how to test"
- Operational runbooks (alerts, common failures, rollback)
- Service contracts (OpenAPI/AsyncAPI) and schema examples
- Known issues and limitations (with workarounds)
Coverage Model (Risk-Based)
- Prioritize docs by impact:
- P1: externally consumed contracts and failure behavior (OpenAPI/AsyncAPI, auth, error codes, SLOs).
- P2: internal integration and operational workflows (events, jobs, DB schema, runbooks).
- P3: developer reference (configs, utilities).
Freshness Checks (Prevent Stale Docs)
- Define owners, review cadence, and a "last verified" field for critical docs.
- CI economics:
- Block PRs only for missing/invalid P1 docs.
- Warn for P2/P3 gaps; track via backlog.
- Run link checks and linting as fast pre-merge steps.
Runbook Testability
- A runbook is "testable" if a new engineer can follow it and reach a measurable end state.
- Include: prerequisites, exact commands, expected outputs, rollback criteria, and escalation paths.
Do / Avoid
Do:
- Keep docs close to code (same repo) and version them with changes.
- Use contracts and examples as the source of truth for integrations.
Avoid:
- Large "doc-only" projects with no owners and no CI gates.
- Writing runbooks that cannot be executed in a sandbox/staging environment.
Quick Reference
| Audit Task |
Tool/Pattern |
Output |
Reference |
| Discover APIs |
**/*Controller.cs, **/routes/**/*.ts |
Component inventory |
discovery-patterns.md |
| Calculate Coverage |
Swagger Coverage, manual diff |
Coverage report |
coverage-report-template.md |
| Prioritize Gaps |
External → P1, Internal → P2, Config → P3 |
Documentation backlog |
priority-framework.md |
| Generate Docs |
AI-assisted + docs-codebase templates |
Documentation files |
audit-workflows.md Phase 3 |
| Validate Contracts |
Spectral, AsyncAPI CLI, OpenAPI diff |
Lint report |
cicd-integration.md |
| Track Freshness |
Git blame, last-modified metadata |
Staleness report |
freshness-tracking.md |
| Automate Checks |
GitHub Actions, GitLab CI, PR templates |
Continuous coverage |
cicd-integration.md |
Decision Tree: Documentation Audit Workflow
User needs: [Audit Type]
├─ Starting fresh audit?
│ ├─ Public-facing APIs? → Priority 1: External-Facing (OpenAPI, webhooks, error codes)
│ ├─ Internal services/events? → Priority 2: Internal Integration (endpoints, schemas, jobs)
│ └─ Configuration/utilities? → Priority 3: Developer Reference (options, helpers, constants)
│
├─ Found undocumented component?
│ ├─ API/Controller? → Scan endpoints → Use api-docs-template → Priority 1
│ ├─ Service/Handler? → List responsibilities → Document contracts → Priority 2
│ ├─ Database/Entity? → Generate ER diagram → Document entities → Priority 2
│ ├─ Event/Message? → Map producer/consumer → Schema + examples → Priority 2
│ └─ Config/Utility? → Extract options → Defaults + descriptions → Priority 3
│
├─ Large codebase with many gaps?
│ └─ Use phase-based approach:
│ 1. Discovery Scan → Coverage Analysis
│ 2. Prioritize by impact (P1 → P2 → P3)
│ 3. Generate docs incrementally (critical first)
│ 4. Set up maintenance (PR templates, quarterly audits)
│
└─ Maintaining existing docs?
└─ Check for:
├─ Outdated docs (code changed, docs didn't) → Update or archive
├─ Orphaned docs (references non-existent code) → Remove
└─ Missing coverage → Add to backlog → Prioritize
Navigation: Discovery & Analysis
Component Discovery
Resource: references/discovery-patterns.md
Language-specific patterns for discovering documentable components:
- .NET/C# codebase (Controllers, Services, DbContexts, Kafka handlers)
- Node.js/TypeScript codebase (Routes, Services, Models, Middleware)
- Python codebase (Views, Models, Tasks, Config)
- Go, Java/Spring, React/Frontend patterns
- Discovery commands (ripgrep, grep, find)
- Cross-reference discovery (Kafka topics, external APIs, webhooks)
Priority Framework
Resource: references/priority-framework.md
Framework for prioritizing documentation efforts:
- Priority 1: External-Facing (public APIs, webhooks, auth) - Must document
- Priority 2: Internal Integration (services, events, database) - Should document
- Priority 3: Developer Reference (config, utilities) - Nice to have
- Prioritization decision tree
- Documentation debt scoring (formula + interpretation)
- Compliance considerations (ISO 27001, GDPR, HIPAA)
Audit Workflows
Resource: references/audit-workflows.md
Systematic workflows for conducting audits:
- Phase 1: Discovery Scan (identify all components)
- Phase 2: Coverage Analysis (compare against existing docs)
- Phase 3: Generate Documentation (use templates)
- Phase 4: Maintain Coverage (PR templates, CI/CD checks)
- Audit types (full, incremental, targeted)
- Audit checklist (pre-audit, during, post-audit)
- Tools and automation
CI/CD Integration
Resource: references/cicd-integration.md
Automated documentation checks and enforcement:
- PR template documentation checklists
- CI/CD coverage gates (GitHub Actions, GitLab CI, Jenkins)
- Pre-commit hooks (Git, Husky)
- Documentation linters (markdownlint, Vale, link checkers)
- API contract validation (Spectral, AsyncAPI CLI)
- Coverage tools (Swagger Coverage, OpenAPI Coverage)
- Automated coverage reports
- Best practices and anti-patterns
Freshness Tracking
Resource: references/freshness-tracking.md
Track documentation staleness and drift from code:
- Freshness metadata standards (last_verified, owner, review_cadence)
- Git-based freshness analysis scripts
- Staleness thresholds by priority (P1: 30 days, P2: 60 days, P3: 90 days)
- CI/CD freshness gates (GitHub Actions, GitLab CI)
- Observability dashboards and metrics
- Automated doc reminder bots
Navigation: Templates
Coverage Report Template
Template: assets/coverage-report-template.md
Structured coverage report with:
- Executive summary (coverage %, key findings, recommendations)
- Coverage by category (API, Service, Data, Events, Infrastructure)
- Gap analysis (P1, P2, P3 with impact/effort)
- Outdated documentation tracking
- Documentation debt score
- Action plan (sprints + ongoing)
Documentation Backlog Template
Template: assets/documentation-backlog-template.md
Backlog tracking with:
- Status summary (In Progress, To Do P1/P2/P3, Blocked, Completed)
- Task organization by priority
- Templates reference (quick links)
- Effort estimates (Low < 2h, Medium 2-8h, High > 8h)
- Review cadence (weekly, bi-weekly, monthly, quarterly)
Output Artifacts
After running an audit, produce these artifacts:
Coverage Report - .codex/docs/audit/coverage-report.md
- Overall coverage percentage
- Detailed findings by category
- Gap analysis with priorities
- Recommendations and next audit date
Documentation Backlog - .codex/docs/audit/documentation-backlog.md
- In Progress items with owners
- To Do items by priority (P1, P2, P3)
- Blocked items with resolution path
- Completed items with dates
Generated Documentation - .codex/docs/ (organized by category)
- API reference (public/private)
- Event catalog (Kafka/messaging)
- Database schema (ER diagrams)
- Background jobs (runbooks)
Integration with Foundation Skills
This skill works closely with:
docs-codebase - Provides templates for:
Workflow:
- Use qa-docs-coverage to discover gaps
- Use docs-codebase templates to fill gaps
- Use qa-docs-coverage CI/CD integration to maintain coverage
Anti-Patterns to Avoid
- Documenting everything at once - Prioritize by impact, document incrementally
- Merging doc drafts without review - Drafts must be validated by owners and runnable in practice
- Ignoring outdated docs - Outdated docs are worse than no docs
- Documentation without ownership - Assign owners for each doc area
- Skipping the audit - Don't assume you know what's documented
- Blocking all PRs - Only block for P1 gaps, warn for P2/P3
Optional: AI / Automation
Do:
- Use AI to draft docs from code and tickets, then require human review and link/command verification.
- Use AI to propose "freshness diffs" and missing doc sections; validate by running the runbook steps.
Avoid:
- Publishing unverified drafts that include incorrect commands, unsafe advice, or hallucinated endpoints.
Success Criteria
Immediate (After Audit):
- Coverage report clearly shows gaps with priorities
- Documentation backlog is actionable and assigned
- Critical gaps (P1) identified with owners
Short-term (1-2 Sprints):
- All P1 gaps documented
- Documentation coverage > 80% for external-facing components
- Documentation backlog actively managed
Long-term (Ongoing):
- Quarterly audits show improving coverage (upward trend)
- PR documentation checklist compliance > 90%
- "How do I" questions in Slack decrease
- Onboarding time for new engineers decreases
Related Skills
Usage Notes
For Claude: When auditing a codebase:
- Start with discovery - Use references/discovery-patterns.md to find components
- Calculate coverage - Compare discovered components vs existing docs
- Prioritize gaps - Use references/priority-framework.md to assign P1/P2/P3
- Follow workflows - Use references/audit-workflows.md for systematic approach
- Use templates - Reference docs-codebase for documentation structure
- Set up automation - Use references/cicd-integration.md for ongoing maintenance
Remember: The goal is not 100% coverage, but useful coverage for the target audience. Document what developers, operators, and integrators actually need.
1---2name: qa-docs-coverage3description: Docs as QA: audit doc coverage and freshness, validate runbooks, and maintain documentation quality gates for APIs, services, events, and operational workflows. Includes AI-assisted audits, observability patterns, and automated coverage tracking.4---5
6# QA Docs Coverage (Jan 2026) - Discovery, Freshness, and Runbook Quality
7
8## Modern Best Practices (January 2026)
9
10- **Docs as QA**: Treat docs as production artifacts with owners, review cadence, and CI quality gates (links/style/contracts/freshness)
11- **Contract-first**: Validate OpenAPI/AsyncAPI/JSON Schema in CI; use coverage tools (Swagger Coverage / OpenAPI Coverage) to detect gaps
12- **Runbook testability**: Every runbook must be executable in staging; validate with synthetic tests and incident exercises
13- **Automation + observability**: Track coverage %, freshness, and drift via CI dashboards; prevent regressions via PR checklists
14
15This skill provides operational workflows for auditing existing codebases, identifying documentation gaps, and systematically generating missing documentation. It complements [docs-codebase](../docs-codebase/SKILL.md) by providing the **discovery and analysis** layer.
16
17**Key Principle**: Templates exist in docs-codebase. This skill tells you **what** to document and **how to find** undocumented components.
18
19Core references: [Diataxis](https://diataxis.fr/) (doc structure), [OpenAPI](https://spec.openapis.org/oas/latest.html) (REST), [AsyncAPI](https://www.asyncapi.com/) (events).
20
21## When to use
22
23- Auditing an existing repo for missing/outdated documentation
24- Adding documentation quality gates (lint/link checks/contracts/freshness) to CI/CD
25- Validating runbooks for incident readiness (MTTR reduction)
26
27## When to avoid
28
29- Writing new documentation from scratch without a component inventory (use discovery first)
30- Publishing AI-generated docs without human review and command/link verification
31
32## Quick start
33
34Use progressive disclosure: load only the reference file you need.
35
361. Discover components: [references/discovery-patterns.md](references/discovery-patterns.md)
372. Measure coverage + gaps: [references/audit-workflows.md](references/audit-workflows.md) (Phase 1-2) and [assets/coverage-report-template.md](assets/coverage-report-template.md)
383. Prioritize work: [references/priority-framework.md](references/priority-framework.md)
394. Create an actionable backlog: [assets/documentation-backlog-template.md](assets/documentation-backlog-template.md) and templates in [docs-codebase](../docs-codebase/SKILL.md)
405. Prevent regression: [references/cicd-integration.md](references/cicd-integration.md) and [references/freshness-tracking.md](references/freshness-tracking.md)
41
42Optional (recommended scripts; run from the repo being audited):
43
44- Local link check: `python3 frameworks/shared-skills/skills/qa-docs-coverage/scripts/check_local_links.py docs/`
45- Freshness report: `python3 frameworks/shared-skills/skills/qa-docs-coverage/scripts/docs_freshness_report.py --docs-root docs/`
46
47---
48
49## Large Codebase Audit (100K-1M LOC)
50
51For large codebases, the key principle is: **LLMs don't need the entire codebase - they need the right context for the current task**.
52
53### Phase 0: Context Extraction
54
55Before starting an audit, extract codebase context using tools:
56
57| Tool | Command/URL | Use Case |
58|------|-------------|----------|
59| **gitingest** | Replace "github.com" with "gitingest.com" | Quick full-repo dump |
60| **repo2txt** | https://github.com/kirill-markin/repo2txt | Selective file extraction |
61| **tree** | `tree -L 3 --dirsfirst -I 'node_modules|.git|dist'` | Structure overview |
62
63### Hierarchical Audit Strategy
64
65For monorepos and large projects, audit hierarchically:
66
67```text
681. Root Level (Week 1)
69 ├── AGENTS.md / CLAUDE.md exists?
70 ├── README.md quality
71 ├── ARCHITECTURE.md exists?
72 └── docs/ directory structure
73
742. Module Level (Week 2-3)
75 ├── Each major directory has AGENTS.md?
76 ├── API documentation complete?
77 └── Service boundaries documented?
78
793. Component Level (Week 4+)
80 ├── Individual component READMEs
81 ├── Code comments quality
82 └── Test documentation
83```
84
85### Cross-Platform Documentation Audit
86
87Check for multi-tool compatibility:
88
89```text
90[ ] AGENTS.md exists (cross-platform standard)
91[ ] CLAUDE.md exists or symlinked to AGENTS.md
92[ ] GEMINI.md symlinked (if using Gemini)
93[ ] File size under 300 lines (use @references for depth)
94[ ] Subdirectory docs for each major module
95```
96
97### Large Codebase Coverage Checklist
98
99```text
100LARGE CODEBASE AUDIT CHECKLIST
101
102Context Extraction:
103[ ] Generated codebase dump (gitingest/repo2txt)
104[ ] Created directory structure overview
105[ ] Identified major modules/services
106
107Root Documentation:
108[ ] AGENTS.md / CLAUDE.md present and <300 lines
109[ ] README.md with quick start
110[ ] ARCHITECTURE.md with system overview
111[ ] Symlinks configured for cross-platform
112
113Module Documentation:
114[ ] Each major directory has AGENTS.md
115[ ] API endpoints documented
116[ ] Database schemas documented
117[ ] Event/message contracts documented
118
119Maintenance:
120[ ] Documentation ownership assigned
121[ ] Freshness tracking enabled
122[ ] CI/CD checks configured
123```
124
125**Sources**: [Anthropic Claude Code Best Practices](https://www.anthropic.com/engineering/claude-code-best-practices), [OpenAI AGENTS.md Guide](https://developers.openai.com/codex/guides/agents-md)
126
127---
128
129## Core QA (Default)
130
131### What "Docs as QA" Means
132
133- Treat docs as production quality artifacts: they reduce MTTR, enable safe changes, and define expected behavior.
134- REQUIRED doc types for reliability and debugging ergonomics:
135 - "How to run locally/CI" and "how to test"
136 - Operational runbooks (alerts, common failures, rollback)
137 - Service contracts (OpenAPI/AsyncAPI) and schema examples
138 - Known issues and limitations (with workarounds)
139
140### Coverage Model (Risk-Based)
141
142- Prioritize docs by impact:
143 - P1: externally consumed contracts and failure behavior (OpenAPI/AsyncAPI, auth, error codes, SLOs).
144 - P2: internal integration and operational workflows (events, jobs, DB schema, runbooks).
145 - P3: developer reference (configs, utilities).
146
147### Freshness Checks (Prevent Stale Docs)
148
149- Define owners, review cadence, and a "last verified" field for critical docs.
150- CI economics:
151 - Block PRs only for missing/invalid P1 docs.
152 - Warn for P2/P3 gaps; track via backlog.
153- Run link checks and linting as fast pre-merge steps.
154
155### Runbook Testability
156
157- A runbook is "testable" if a new engineer can follow it and reach a measurable end state.
158- Include: prerequisites, exact commands, expected outputs, rollback criteria, and escalation paths.
159
160### Do / Avoid
161
162**Do**:
163
164- Keep docs close to code (same repo) and version them with changes.
165- Use contracts and examples as the source of truth for integrations.
166
167**Avoid**:
168
169- Large "doc-only" projects with no owners and no CI gates.
170- Writing runbooks that cannot be executed in a sandbox/staging environment.
171
172---
173
174## Quick Reference
175
176| Audit Task | Tool/Pattern | Output | Reference |
177| ---------- | ------------ | ------ | --------- |
178| **Discover APIs** | `**/*Controller.cs`, `**/routes/**/*.ts` | Component inventory | [discovery-patterns.md](references/discovery-patterns.md) |
179| **Calculate Coverage** | Swagger Coverage, manual diff | Coverage report | [coverage-report-template.md](assets/coverage-report-template.md) |
180| **Prioritize Gaps** | External → P1, Internal → P2, Config → P3 | Documentation backlog | [priority-framework.md](references/priority-framework.md) |
181| **Generate Docs** | AI-assisted + docs-codebase templates | Documentation files | [audit-workflows.md](references/audit-workflows.md) Phase 3 |
182| **Validate Contracts** | Spectral, AsyncAPI CLI, OpenAPI diff | Lint report | [cicd-integration.md](references/cicd-integration.md) |
183| **Track Freshness** | Git blame, last-modified metadata | Staleness report | [freshness-tracking.md](references/freshness-tracking.md) |
184| **Automate Checks** | GitHub Actions, GitLab CI, PR templates | Continuous coverage | [cicd-integration.md](references/cicd-integration.md) |
185
186---
187
188## Decision Tree: Documentation Audit Workflow
189
190```text
191User needs: [Audit Type]
192 ├─ Starting fresh audit?
193 │ ├─ Public-facing APIs? → Priority 1: External-Facing (OpenAPI, webhooks, error codes)
194 │ ├─ Internal services/events? → Priority 2: Internal Integration (endpoints, schemas, jobs)
195 │ └─ Configuration/utilities? → Priority 3: Developer Reference (options, helpers, constants)
196 │
197 ├─ Found undocumented component?
198 │ ├─ API/Controller? → Scan endpoints → Use api-docs-template → Priority 1
199 │ ├─ Service/Handler? → List responsibilities → Document contracts → Priority 2
200 │ ├─ Database/Entity? → Generate ER diagram → Document entities → Priority 2
201 │ ├─ Event/Message? → Map producer/consumer → Schema + examples → Priority 2
202 │ └─ Config/Utility? → Extract options → Defaults + descriptions → Priority 3
203 │
204 ├─ Large codebase with many gaps?
205 │ └─ Use phase-based approach:
206 │ 1. Discovery Scan → Coverage Analysis
207 │ 2. Prioritize by impact (P1 → P2 → P3)
208 │ 3. Generate docs incrementally (critical first)
209 │ 4. Set up maintenance (PR templates, quarterly audits)
210 │
211 └─ Maintaining existing docs?
212 └─ Check for:
213 ├─ Outdated docs (code changed, docs didn't) → Update or archive
214 ├─ Orphaned docs (references non-existent code) → Remove
215 └─ Missing coverage → Add to backlog → Prioritize
216```
217
218---
219
220## Navigation: Discovery & Analysis
221
222### Component Discovery
223
224**Resource**: [references/discovery-patterns.md](references/discovery-patterns.md)
225
226Language-specific patterns for discovering documentable components:
227
228- .NET/C# codebase (Controllers, Services, DbContexts, Kafka handlers)
229- Node.js/TypeScript codebase (Routes, Services, Models, Middleware)
230- Python codebase (Views, Models, Tasks, Config)
231- Go, Java/Spring, React/Frontend patterns
232- Discovery commands (ripgrep, grep, find)
233- Cross-reference discovery (Kafka topics, external APIs, webhooks)
234
235### Priority Framework
236
237**Resource**: [references/priority-framework.md](references/priority-framework.md)
238
239Framework for prioritizing documentation efforts:
240
241- Priority 1: External-Facing (public APIs, webhooks, auth) - Must document
242- Priority 2: Internal Integration (services, events, database) - Should document
243- Priority 3: Developer Reference (config, utilities) - Nice to have
244- Prioritization decision tree
245- Documentation debt scoring (formula + interpretation)
246- Compliance considerations (ISO 27001, GDPR, HIPAA)
247
248### Audit Workflows
249
250**Resource**: [references/audit-workflows.md](references/audit-workflows.md)
251
252Systematic workflows for conducting audits:
253
254- Phase 1: Discovery Scan (identify all components)
255- Phase 2: Coverage Analysis (compare against existing docs)
256- Phase 3: Generate Documentation (use templates)
257- Phase 4: Maintain Coverage (PR templates, CI/CD checks)
258- Audit types (full, incremental, targeted)
259- Audit checklist (pre-audit, during, post-audit)
260- Tools and automation
261
262### CI/CD Integration
263
264**Resource**: [references/cicd-integration.md](references/cicd-integration.md)
265
266Automated documentation checks and enforcement:
267
268- PR template documentation checklists
269- CI/CD coverage gates (GitHub Actions, GitLab CI, Jenkins)
270- Pre-commit hooks (Git, Husky)
271- Documentation linters (markdownlint, Vale, link checkers)
272- API contract validation (Spectral, AsyncAPI CLI)
273- Coverage tools (Swagger Coverage, OpenAPI Coverage)
274- Automated coverage reports
275- Best practices and anti-patterns
276
277### Freshness Tracking
278
279**Resource**: [references/freshness-tracking.md](references/freshness-tracking.md)
280
281Track documentation staleness and drift from code:
282
283- Freshness metadata standards (last_verified, owner, review_cadence)
284- Git-based freshness analysis scripts
285- Staleness thresholds by priority (P1: 30 days, P2: 60 days, P3: 90 days)
286- CI/CD freshness gates (GitHub Actions, GitLab CI)
287- Observability dashboards and metrics
288- Automated doc reminder bots
289
290---
291
292## Navigation: Templates
293
294### Coverage Report Template
295
296**Template**: [assets/coverage-report-template.md](assets/coverage-report-template.md)
297
298Structured coverage report with:
299
300- Executive summary (coverage %, key findings, recommendations)
301- Coverage by category (API, Service, Data, Events, Infrastructure)
302- Gap analysis (P1, P2, P3 with impact/effort)
303- Outdated documentation tracking
304- Documentation debt score
305- Action plan (sprints + ongoing)
306
307### Documentation Backlog Template
308
309**Template**: [assets/documentation-backlog-template.md](assets/documentation-backlog-template.md)
310
311Backlog tracking with:
312
313- Status summary (In Progress, To Do P1/P2/P3, Blocked, Completed)
314- Task organization by priority
315- Templates reference (quick links)
316- Effort estimates (Low < 2h, Medium 2-8h, High > 8h)
317- Review cadence (weekly, bi-weekly, monthly, quarterly)
318
319---
320
321## Output Artifacts
322
323After running an audit, produce these artifacts:
324
3251. **Coverage Report** - `.codex/docs/audit/coverage-report.md`
326 - Overall coverage percentage
327 - Detailed findings by category
328 - Gap analysis with priorities
329 - Recommendations and next audit date
330
3312. **Documentation Backlog** - `.codex/docs/audit/documentation-backlog.md`
332 - In Progress items with owners
333 - To Do items by priority (P1, P2, P3)
334 - Blocked items with resolution path
335 - Completed items with dates
336
3373. **Generated Documentation** - `.codex/docs/` (organized by category)
338 - API reference (public/private)
339 - Event catalog (Kafka/messaging)
340 - Database schema (ER diagrams)
341 - Background jobs (runbooks)
342
343---
344
345## Integration with Foundation Skills
346
347This skill works closely with:
348
349**[docs-codebase](../docs-codebase/SKILL.md)** - Provides templates for:
350
351- [api-docs-template.md](../docs-codebase/assets/api-reference/api-docs-template.md) - REST API documentation
352- [adr-template.md](../docs-codebase/assets/architecture/adr-template.md) - Architecture decisions
353- [readme-template.md](../docs-codebase/assets/project-management/readme-template.md) - Project overviews
354- [changelog-template.md](../docs-codebase/assets/project-management/changelog-template.md) - Release history
355
356**Workflow**:
357
3581. Use **qa-docs-coverage** to discover gaps
3592. Use **docs-codebase** templates to fill gaps
3603. Use **qa-docs-coverage** CI/CD integration to maintain coverage
361
362---
363
364## Anti-Patterns to Avoid
365
366- **Documenting everything at once** - Prioritize by impact, document incrementally
367- **Merging doc drafts without review** - Drafts must be validated by owners and runnable in practice
368- **Ignoring outdated docs** - Outdated docs are worse than no docs
369- **Documentation without ownership** - Assign owners for each doc area
370- **Skipping the audit** - Don't assume you know what's documented
371- **Blocking all PRs** - Only block for P1 gaps, warn for P2/P3
372
373---
374
375## Optional: AI / Automation
376
377**Do**:
378
379- Use AI to draft docs from code and tickets, then require human review and link/command verification.
380- Use AI to propose "freshness diffs" and missing doc sections; validate by running the runbook steps.
381
382**Avoid**:
383
384- Publishing unverified drafts that include incorrect commands, unsafe advice, or hallucinated endpoints.
385
386---
387
388## Success Criteria
389
390**Immediate (After Audit)**:
391
392- Coverage report clearly shows gaps with priorities
393- Documentation backlog is actionable and assigned
394- Critical gaps (P1) identified with owners
395
396**Short-term (1-2 Sprints)**:
397
398- All P1 gaps documented
399- Documentation coverage > 80% for external-facing components
400- Documentation backlog actively managed
401
402**Long-term (Ongoing)**:
403
404- Quarterly audits show improving coverage (upward trend)
405- PR documentation checklist compliance > 90%
406- "How do I" questions in Slack decrease
407- Onboarding time for new engineers decreases
408
409---
410
411## Related Skills
412
413- **[docs-codebase](../docs-codebase/SKILL.md)** - Templates for writing documentation (README, ADR, API docs, changelog)
414- **[docs-ai-prd](../docs-ai-prd/SKILL.md)** - PRD and tech spec templates for new features
415- **[software-code-review](../software-code-review/SKILL.md)** - Code review including documentation standards
416
417---
418
419## Usage Notes
420
421**For Claude**: When auditing a codebase:
422
4231. **Start with discovery** - Use [references/discovery-patterns.md](references/discovery-patterns.md) to find components
4242. **Calculate coverage** - Compare discovered components vs existing docs
4253. **Prioritize gaps** - Use [references/priority-framework.md](references/priority-framework.md) to assign P1/P2/P3
4264. **Follow workflows** - Use [references/audit-workflows.md](references/audit-workflows.md) for systematic approach
4275. **Use templates** - Reference docs-codebase for documentation structure
4286. **Set up automation** - Use [references/cicd-integration.md](references/cicd-integration.md) for ongoing maintenance
429
430**Remember**: The goal is not 100% coverage, but **useful coverage** for the target audience. Document what developers, operators, and integrators actually need.