Add Docs to a New Repo
Use this path when you want to add an OAT-managed docs app and the docs analyze/apply workflow to a repository.
If you are developing inside the OAT repo itself, replace oat ... with
pnpm run cli -- ....
What this gives you
- a docs app scaffolded with OAT defaults (Fumadocs or MkDocs)
index.md-driven navigation- docs analysis and apply skills installed via the docs pack
- a repeatable workflow for finding gaps, verifying claims, and applying docs changes
1. Initialize OAT in the repo
oat init --scope projectThis sets up the base OAT structure used by the CLI and installed tool packs.
2. Install the docs workflow skills
Preferred direct path:
oat tools install docsInteractive path:
oat tools installLegacy pack-specific path:
oat init tools docsThe docs pack installs oat-docs-analyze, oat-docs-apply,
oat-agent-instructions-analyze, and oat-agent-instructions-apply. For this
quickstart, the docs pair is the part you need immediately.
3. Scaffold the docs app
oat docs init --app-name my-docsIn interactive mode, you'll be prompted to choose a framework:
- Fumadocs — Next.js-based static site with FlexSearch, Mermaid diagrams, dark/light mode, and code copy buttons
- MkDocs — MkDocs Material with the OAT contributor contract
Default placement:
- monorepo:
apps/my-docs - single-package repo:
my-docs/at repo root
You can override the target and framework explicitly:
# Fumadocs (non-interactive)
oat docs init --app-name my-docs --framework fumadocs --yes
# MkDocs (non-interactive)
oat docs init --app-name my-docs --framework mkdocs --yes3a. Migrating from MkDocs (optional)
If you have an existing MkDocs site and want to switch to Fumadocs, use the migration command after scaffolding:
oat docs migrate --docs-dir docs --config mkdocs.yml --applyThis converts MkDocs admonitions to GFM callouts and injects frontmatter
metadata. Run without --apply first to preview changes.
4. Start authoring docs with the OAT contract
Core rules:
- every docs directory should have an
index.md - every
index.mdshould include a## Contentssection - the
## Contentssection should map sibling pages and immediate child directories
For MkDocs apps, regenerate navigation after adding or moving pages:
oat docs nav sync --target-dir apps/my-docsFor Fumadocs apps, the docs index is generated automatically via
predev/prebuild hooks. You can also run it manually:
oat docs generate-index --docs-dir docs5. Analyze the docs surface
Use the skill, not the CLI stub, for the real analysis workflow.
If your host supports slash-skill invocation:
/oat-docs-analyzeOtherwise invoke the skill by name in your agent host.
What oat-docs-analyze checks:
- index contract coverage
- nav drift
- stale or contradicted repo-checkable claims
- missing or thin content coverage based on repo features
- contributor/setup guidance gaps
6. Review the artifact and apply approved changes
Run the apply skill after analysis:
/oat-docs-applyoat-docs-apply consumes the analysis artifact, asks for approval, and applies
only the approved, evidence-backed recommendations.
Important:
oat docs analyzeandoat docs applyare CLI guidance entrypoints- the actual analysis/apply workflow runs through the skills
Typical loop
oat init --scope projectoat tools install docsoat docs init --app-name my-docs- (optional)
oat docs migrate --docs-dir docs --config mkdocs.yml --apply - Author docs with
index.md+## Contents oat docs nav sync --target-dir apps/my-docs(MkDocs) oroat docs generate-index(Fumadocs)/oat-docs-analyze/oat-docs-apply- Repeat as the codebase changes