Audit Documentation Workflow in DocsFab
audit-documentation is a read-only DocsFab runtime workflow that checks
every documentation page in scope against its governed template. The workflow
name matches the audit-documentation catalog skill, but the workflow does
not run that skill’s model judgment. Its one step is a host operation, and it
never calls a model. For more information, refer to Workflow Contracts in
DocsFab.
Contract at a Glance
The following table summarizes the contract.
Workflow Sequence
The fixed workflow has one read-only host step, audit-template-conformance. To invoke it, follow Audit Pages Against Templates.
Map Pages to Templates
The step maps each page to one governed template from the template catalog before it checks the page. It applies the first rule that matches, and the report records which rule decided:
frontmatter: atemplate:key always decides, such astemplate: quickstart. Without one, apage_typeorcontent_typekey decides only when its value names a catalog template; a generic value such asconceptleaves the page to the path rules.filename: a filename equal to a template keyword, such asinstallation.mdorarchitecture.md.filename-suffix: a filename that ends with a page-genre keyword, such asrunner-quickstart.mdorsetup-troubleshooting.md. Only genre keywords (quickstart, installation, prerequisites, troubleshooting, release notes, glossary, environment variables, Helm parameters) count as suffixes. Subject keywords such asarchitecturedo not, solens-architecture.mdstays unmapped.directory: atroubleshooting/orrelease-notes/directory, because each holds one kind of template.
The step never guesses. It reports a page as unmapped, with one of the
following reasons, when no rule gives exactly one template.
To audit an unmapped page, declare its template with a template: frontmatter
key. Most pages in a typical documentation tree carry no template signal, so
expect many unmapped pages until model-assisted mapping is available. A page
with MyST syntax, such as a directive fence, a role, or a (label)= target,
maps to the MyST variant of its template.
Check Structure
For every mapped page, the step runs the following structural template rules
under the docsfab:template-structural-blocking policy.
A page fails when it has at least one error. The step reads the heading
structure that a reader sees. It ignores frontmatter lines, and when the page
has no Markdown H1, the frontmatter title counts as the H1, as Fern and
similar renderers display it.
Read the Result
docsfab runs show <run-id> prints the coverage counts under PRODUCT and the
findings under REVIEW FINDINGS. Each finding has a template: code, the page
path, the template, and how the template was chosen. The --json output
lists the findings in reviewFindings, up to the review findings projection
limit of 256 findings and 128 KiB. A larger result names the omitted count as a
review-findings-omitted limitation, and the run record keeps every page’s
result.
The coverage line counts pages enumerated, checked, passed, failed, unmapped, and refused. Each refused page has its own line with the reason and the next action, using one of the following codes.
When the repository inventory cannot present every tracked entry as an auditable page, the result says how many entries could not be audited and why. For example, the workflow does not follow a tracked symbolic link. Text and navigation indexing gaps do not hide a regular page, so they do not affect the audit.
The product disposition follows host coverage, not a model claim, as the following table shows.
The audit does not repair pages. Fix the failed pages or declare templates for unmapped pages, then run the audit again.