docs-corpus-audit

Audits an entire documentation corpus against source code and applies surgical fixes for stale claims.

3.7k|344|Updated Sep 18, 2025
One-click install
npx skills add https://github.com/microsoft/apm --skill docs-corpus-audit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docs-corpus-audit
Source: https://github.com/microsoft/apm/tree/main/.apm/skills/docs-corpus-audit
Command: npx skills add https://github.com/microsoft/apm --skill docs-corpus-audit

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and assets (resource) components.

What problem does it solve?

Documentation drifts silently between releases: CLI flags get renamed, nav links die after IA reshuffles, and deprecation banners outlive their version targets. Per-PR review only catches drift introduced by that PR, so accumulated staleness across the whole corpus goes unnoticed until users hit broken docs.

Core Features & Use Cases

  • Whole-corpus regrounding: Partitions the docs corpus into disjoint page scopes and dispatches parallel verifier subagents that extract every factual claim (CLI flags, file paths, symbols, nav links) and verify each against deterministic source such as uv run apm <verb> --help and grep over src/apm_cli/.
  • Surgical inline fixes: Applies 1-3 line voice-preserving patches per drift on a working branch, with a single-writer git interlock so only the orchestrator commits and pushes for maintainer PR review.
  • Cross-corpus drift scanning: Runs a deterministic shell script to catch patterns invisible to per-page agents, including dead IA-reshuffle links, stale deprecation version targets, absolute base links, and non-ASCII leaks.
  • Use Case: Before cutting release v0.16, ask for a pre-release docs sweep; the skill audits all ~112 pages in waves, verifies claims against code, fixes drift, and opens a PR with a per-wave summary in roughly 10 minutes.

Quick Start

Ask the agent to audit the entire docs corpus and reground every claim against the current source code on a working branch.

Frequently Asked Questions about docs-corpus-audit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I audit an entire documentation corpus for drift against source code?

Trigger a whole-corpus audit with a request like "audit the docs" or "reground the corpus". The skill partitions pages into disjoint scopes, dispatches parallel verifier subagents that check every factual claim against runnable source, and applies surgical fixes on a working branch.

What is the difference between docs-corpus-audit and docs-sync?

docs-sync is per-PR, triggered by a source diff to review that PR's documentation impact. docs-corpus-audit is per-corpus, triggered by a maintainer ask to reground every page at once, catching accumulated drift that per-PR review misses.

How are documentation claims verified against the CLI?

Each claim is verified deterministically: CLI claims via `uv run apm <verb> --help`, symbols via grep over src/apm_cli/, module shape via python imports, and nav links via file-existence checks. Nothing is asserted from LLM recall.

Does the docs audit commit or push changes automatically?

Subagents never run git or gh write commands. Only the orchestrator commits once per wave and pushes to a working branch, then opens a PR for maintainer review. It never auto-merges or pushes without review.

When should I not use a whole-corpus docs audit?

Skip it for per-PR doc-impact reviews (use docs-sync), single-page typo fixes (edit directly), or writing docs for a brand-new feature. It is designed only for whole-corpus regrounding passes, not scoped or authoring tasks.

How long does a full documentation corpus audit take?

A full ~110-page corpus runs as two medium waves of about 12 subagents with roughly 14 LLM dispatches, completing in about 10 minutes wall-time. Smaller scopes of ~30 pages finish in about 3 minutes.