docs-audit-v2
Use this skill to prove that a documentation rewrite preserved, moved,
paraphrased, generated, or intentionally removed source content. It is for docs
coverage audits, not repository code-quality audits.
Use When
- The user asks for a docs audit, preservation proof, migration map,
moved-section checklist, or line-by-line coverage review.
- A rewrite removes, shortens, reorganizes, or splits substantial Markdown/MDX
sections.
- Content moves across multiple destination docs or generated docs.
- Source docs contain behavior-sensitive facts: commands, config, defaults,
lifecycle behavior, permissions, safety rules, or troubleshooting steps.
For general codebase quality audits, use the regular audit skill instead.
Core Workflow
- Resolve the pre-rewrite source ref and the explicit source docs.
- Choose explicit destination docs from the refactor plan; do not audit every
changed Markdown file by default.
- Scaffold or refresh the JSON audit inventory with the CLI.
- Treat scaffolded or reindexed JSON as inventory-only until
mappings.length
is non-zero. Do not render a final viewer/report for a preservation review
until mappings have been authored and merged with map.
- Author mapping patches with one mapping object per source block and one
mapping[] row per material source line.
- Reindex destination docs after edits, then hydrate and validate the JSON.
- Fix every validation error. Accept warnings only when they are not
preservation gaps and have reviewer-facing justification.
- Render the Markdown report and self-contained HTML viewer from the validated
JSON.
- Handoff the JSON artifacts, rendered report/viewer, unresolved or accepted
warnings, and exact validation output.
References
Load only the reference needed for the current step:
./references/workflow.md: command sequence, artifacts, validation loop, and
handoff checklist.
./references/schema.md: JSON schema, stable IDs, enums, destination entry
shapes, validation findings, and invariants.
./references/refactor-integration.md: contract for docs refactor skills
that author mappings while rewriting docs.
./references/viewer.md: Markdown report and HTML viewer rendering contract.
CLI Contract
The first-version CLI commands are:
scaffold
add-dest
reindex-dest
map
hydrate
validate
render
The canonical artifact is JSON. Markdown reports and HTML viewers are render
outputs and must not be parsed back into JSON as source of truth.
Mapping Rules
- Use one stable mapping ID per source block.
scaffold, add-dest, and reindex-dest never create semantic mappings;
they only inventory source and destination docs.
- Manual comparison notes, grading notes, or chat summaries are not mappings
until they are written to a mapping patch and merged through
map.
- Account for every non-formatting source line with a line-level
mapping[]
row.
- Use
justification as the canonical explanation field. Do not invent
notes or detailed_reason aliases.
- Broad block fallback is not final proof for a material
covered line.
- Coverage may live in any explicit destination doc in scope, including
reference, troubleshooting, or generated pages. Do not mark a source line
missing only because it no longer appears on the rewritten main page.
- Destination entries with stale metadata cannot satisfy final coverage.
- Accepted warnings never hide errors and must not be used for unmapped source
material, stale destinations, missing justifications, or line mappings without
exact destination proof.
- Clean validation is structural proof, not semantic signoff. Manually review
low-confidence, broad, disputed, or surprising mappings before treating a
preservation audit as complete.
Bundled Files
Reference bundled files relative to this SKILL.md directory:
./references/...
./assets/audit-viewer.html
./scripts/...
Do not use machine-local absolute paths in skill instructions or generated
audit docs.
1---2name: docs-audit-v23description: Audit documentation rewrites with JSON-first, block-scoped, line-level coverage mappings. Use for moved-section checklists, preservation proofs, migration maps, or line-by-line coverage reviews of Markdown/MDX docs.4---56# docs-audit-v278Use this skill to prove that a documentation rewrite preserved, moved,9paraphrased, generated, or intentionally removed source content. It is for docs10coverage audits, not repository code-quality audits.1112## Use When1314- The user asks for a docs audit, preservation proof, migration map,15 moved-section checklist, or line-by-line coverage review.16- A rewrite removes, shortens, reorganizes, or splits substantial Markdown/MDX17 sections.18- Content moves across multiple destination docs or generated docs.19- Source docs contain behavior-sensitive facts: commands, config, defaults,20 lifecycle behavior, permissions, safety rules, or troubleshooting steps.2122For general codebase quality audits, use the regular `audit` skill instead.2324## Core Workflow25261. Resolve the pre-rewrite source ref and the explicit source docs.272. Choose explicit destination docs from the refactor plan; do not audit every28 changed Markdown file by default.293. Scaffold or refresh the JSON audit inventory with the CLI.304. Treat scaffolded or reindexed JSON as inventory-only until `mappings.length`31 is non-zero. Do not render a final viewer/report for a preservation review32 until mappings have been authored and merged with `map`.335. Author mapping patches with one mapping object per source block and one34 `mapping[]` row per material source line.356. Reindex destination docs after edits, then hydrate and validate the JSON.367. Fix every validation error. Accept warnings only when they are not37 preservation gaps and have reviewer-facing justification.388. Render the Markdown report and self-contained HTML viewer from the validated39 JSON.409. Handoff the JSON artifacts, rendered report/viewer, unresolved or accepted41 warnings, and exact validation output.4243## References4445Load only the reference needed for the current step:4647- `./references/workflow.md`: command sequence, artifacts, validation loop, and48 handoff checklist.49- `./references/schema.md`: JSON schema, stable IDs, enums, destination entry50 shapes, validation findings, and invariants.51- `./references/refactor-integration.md`: contract for docs refactor skills52 that author mappings while rewriting docs.53- `./references/viewer.md`: Markdown report and HTML viewer rendering contract.5455## CLI Contract5657The first-version CLI commands are:5859- `scaffold`60- `add-dest`61- `reindex-dest`62- `map`63- `hydrate`64- `validate`65- `render`6667The canonical artifact is JSON. Markdown reports and HTML viewers are render68outputs and must not be parsed back into JSON as source of truth.6970## Mapping Rules7172- Use one stable mapping ID per source block.73- `scaffold`, `add-dest`, and `reindex-dest` never create semantic mappings;74 they only inventory source and destination docs.75- Manual comparison notes, grading notes, or chat summaries are not mappings76 until they are written to a mapping patch and merged through `map`.77- Account for every non-formatting source line with a line-level `mapping[]`78 row.79- Use `justification` as the canonical explanation field. Do not invent80 `notes` or `detailed_reason` aliases.81- Broad block fallback is not final proof for a material `covered` line.82- Coverage may live in any explicit destination doc in scope, including83 reference, troubleshooting, or generated pages. Do not mark a source line84 missing only because it no longer appears on the rewritten main page.85- Destination entries with stale metadata cannot satisfy final coverage.86- Accepted warnings never hide errors and must not be used for unmapped source87 material, stale destinations, missing justifications, or line mappings without88 exact destination proof.89- Clean validation is structural proof, not semantic signoff. Manually review90 low-confidence, broad, disputed, or surprising mappings before treating a91 preservation audit as complete.9293## Bundled Files9495Reference bundled files relative to this `SKILL.md` directory:9697- `./references/...`98- `./assets/audit-viewer.html`99- `./scripts/...`100101Do not use machine-local absolute paths in skill instructions or generated102audit docs.