Run when you need to evaluate documentation structure, navigation, and coverage against the OAT docs app contract. Produces a severity-rated analysis artifact for oat-docs-apply.
Scan a repository's documentation surface, evaluate it against the OAT docs contract, and write an actionable analysis artifact.
docs/ tree, or root-level Markdown docs.jq available in PATH for tracking updates.OAT MODE: Docs Analysis
Purpose: Evaluate documentation quality, coverage, navigation, and index.md contract conformance.
BLOCKED Activities:
mkdocs.yml or navigation.ALLOWED Activities:
.oat/repo/analysis/.oat-docs-analyze owns discovery, evaluation, evidence gathering, and recommendation shaping.
The analysis artifact must be detailed enough that oat-docs-apply can execute approved
recommendations without rediscovering docs conventions from scratch.
oat-docs-apply may verify that cited files still exist and may read those same cited
sources while generating output, but it must not invent unsupported docs conventions,
create new recommendations, or fill in missing evidence gaps on its own.
Self-Correction Protocol: If you catch yourself:
Recovery:
When executing this skill, provide lightweight progress feedback so the user can tell what’s happening.
Print a phase banner once at start:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ OAT ▸ DOCS ANALYSIS ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Use step indicators:
[1/9] Resolving docs target + mode…[2/9] Inventorying docs files…[3/9] Evaluating index contract…[4/9] Assessing quality + coverage…[5/9] Verifying substantive claims…[6/9] Finding content opportunities…[7/9] Checking nav and drift…[8/9] Writing analysis artifact…[9/9] Updating tracking + summary…Determine the documentation root using the first matching surface:
apps/*/mkdocs.ymlmkdocs.yml at repo rootdocs/README.md, CONTRIBUTING.md, etc.) when no docs app existsPrefer the OAT docs app when multiple MkDocs apps exist and one is clearly the active repo docs surface.
Resolve tracking and analysis mode using the shared helper:
TRACKING_SCRIPT=".oat/scripts/resolve-tracking.sh"
TRACKING=$(bash "$TRACKING_SCRIPT" read docs 2>/dev/null || true)
delta mode and scope drift checks to changed docs directories.full mode.Build a complete inventory of:
index.md filesoverview.md filesmkdocs.yml nav entries when presentRecord the docs surface type:
mkdocs-appdocs-treeroot-markdownCapture the evidence sources that will justify later findings and recommendations. Prefer:
mkdocs.yml and generated nav structuredocs/contributing.md, contributor guides, and setup docspackage.json scripts, requirements.txt, and docs bootstrap scriptsindex.md trees and repeated directory patternsDo not infer docs structure conventions from a tiny sample of pages when the broader tree or config disagrees.
index.md ContractUse references/quality-checklist.md and references/directory-assessment-criteria.md.
For every documentation directory:
index.md exists.index.md includes a ## Contents section.## Contents section maps sibling pages and immediate child directories.overview.md usage as a migration finding.index.md entrypoint.Evaluate each docs page for:
Evidence standard:
For each evaluated page or directory:
inlinelink_onlyomitask_userlink_only recommendation is used.In delta mode, always evaluate changed docs files plus the nearest parent index.md pages.
In full mode, evaluate the whole docs surface.
Add a dedicated accuracy verification pass between page-quality assessment and nav/drift checks.
Only verify claims that are checkable from within the repository. This includes:
Do not attempt to verify:
For any docs page that references code paths, commands, routes, config keys, field names, or other repo-checkable implementation details:
verifiedunverified when the source cannot be found or is too ambiguouscontradicted when the repo source disagrees with the docs claimHigh or CriticalHighMediumLow findings with a note that the source could not be confirmed.Evidence standard for this step:
unverified rather than guessing.Add a coverage-gap pass after accuracy verification.
Build a lightweight inventory of the repo's documentable capability surface using in-repo sources only. Prefer:
app/routers/, src/routers/, or equivalent route/controller modulesapp/services/, src/services/, or equivalent business-logic modulesDo not speculate about future roadmap items or undocumented external integrations.
For each significant feature or API capability found in the codebase:
High if the missing docs would block a typical integratorMedium if it is useful but not core to first successLow if it is edge-case, admin-only, or internal-onlyFor stub pages that already exist in the docs tree or nav:
oat-docs-apply has a concrete scope to work from.The goal is not just to say "this page is thin," but to say what capability surface is missing, where the docs should live, and what specific subtopics the codebase shows should be documented.
If mkdocs.yml exists:
index.md ## Contents section appears inconsistent with nav structure.If no mkdocs.yml exists, record whether the repo should be migrated to an OAT docs app.
Use these defaults:
Critical: misleading docs that could cause destructive or unsafe actionsHigh: missing docs app/index coverage for important areas, broken nav, or stale commands that block reliable usageMedium: incomplete ## Contents, overview.md still in use, plugin/contributor guidance gaps, moderate duplicationLow: polish, wording, or organization improvementsUse references/analysis-artifact-template.md.
TIMESTAMP=$(date -u +"%Y-%m-%d-%H%M")
ARTIFACT_PATH=".oat/repo/analysis/docs-${TIMESTAMP}.md"
Populate the artifact with:
inline, link_only, omit, ask_user)Update docs tracking using the shared helper:
TRACKING_SCRIPT=".oat/scripts/resolve-tracking.sh"
ROOT_TARGET=$(bash "$TRACKING_SCRIPT" root)
ROOT_HASH=$(echo "$ROOT_TARGET" | jq -r '.commitHash')
ROOT_BRANCH=$(echo "$ROOT_TARGET" | jq -r '.baseBranch')
bash "$TRACKING_SCRIPT" write \
docs \
"$ROOT_HASH" \
"$ROOT_BRANCH" \
"{mode}" \
--artifact-path "$ARTIFACT_PATH"
Output a summary:
Analysis complete.
Docs target: {path}
Surface type: {mkdocs-app|docs-tree|root-markdown}
Files evaluated: {N}
Mode: {full|delta}
Findings:
Critical: {N}
High: {N}
Medium: {N}
Low: {N}
Artifact: {artifact_path}
Next step: Run oat-docs-apply to act on these findings.
references/analysis-artifact-template.mdreferences/quality-checklist.mdreferences/directory-assessment-criteria.md.oat/scripts/resolve-tracking.sh