@open-agent-toolkit/cli 0.3.26 → 0.3.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. package/README.md +12 -0
  2. package/assets/bundle-metadata.json +1 -1
  3. package/assets/docs/contributing/documentation.md +48 -6
  4. package/assets/docs/contributing/markdown-features.md +14 -2
  5. package/assets/docs/docs-tooling/add-docs-to-a-repo.md +22 -9
  6. package/assets/docs/docs-tooling/check.md +154 -0
  7. package/assets/docs/docs-tooling/commands.md +15 -10
  8. package/assets/docs/docs-tooling/index.md +1 -0
  9. package/assets/docs/docs-tooling/meta.json +7 -1
  10. package/assets/docs/docs-tooling/workflows.md +18 -10
  11. package/assets/docs/getting-started/tool-packs.md +5 -3
  12. package/assets/docs/reference/cli-reference.md +2 -0
  13. package/assets/docs/reference/configuration.md +1 -0
  14. package/assets/docs/skills/index.md +8 -8
  15. package/assets/public-package-versions.json +4 -4
  16. package/assets/skills/oat-docs-analyze/SKILL.md +14 -3
  17. package/assets/skills/oat-docs-analyze/references/legacy-scaffold-checks.md +4 -0
  18. package/assets/skills/oat-docs-authoring/SKILL.md +1 -1
  19. package/assets/skills/oat-docs-authoring/references/validation.md +4 -0
  20. package/assets/skills/oat-docs-bootstrap/SKILL.md +92 -61
  21. package/assets/skills/oat-docs-bootstrap/references/pr-ci.md +89 -0
  22. package/assets/templates/docs-app-fuma/AGENTS.md +57 -0
  23. package/assets/templates/docs-app-fuma/app/[[...slug]]/page.tsx +7 -3
  24. package/assets/templates/docs-app-fuma/app/llms/[...slug]/route.ts +15 -0
  25. package/assets/templates/docs-app-fuma/app/llms-full.txt/route.ts +7 -0
  26. package/assets/templates/docs-app-fuma/app/llms.txt/route.ts +7 -0
  27. package/assets/templates/docs-app-fuma/docs/contributing/docs-toolchain.md +85 -0
  28. package/assets/templates/docs-app-fuma/docs/contributing/index.md +13 -0
  29. package/assets/templates/docs-app-fuma/docs/contributing.md +83 -41
  30. package/assets/templates/docs-app-fuma/docs/getting-started.md +3 -33
  31. package/assets/templates/docs-app-fuma/docs/index.md +3 -3
  32. package/assets/templates/docs-app-fuma/gitignore.template +12 -0
  33. package/assets/templates/docs-app-fuma/lib/source.ts +5 -0
  34. package/assets/templates/docs-app-fuma/package.json.template +2 -1
  35. package/assets/templates/docs-app-fuma/pnpm-workspace.yaml +5 -0
  36. package/assets/templates/docs-app-mkdocs/AGENTS.md +48 -0
  37. package/assets/templates/docs-app-mkdocs/docs/contributing/docs-toolchain.md +46 -0
  38. package/assets/templates/docs-app-mkdocs/docs/contributing/index.md +13 -0
  39. package/assets/templates/docs-app-mkdocs/docs/contributing.md +111 -21
  40. package/assets/templates/docs-app-mkdocs/docs/getting-started.md +7 -25
  41. package/assets/templates/docs-app-mkdocs/docs/index.md +7 -2
  42. package/assets/templates/docs-app-mkdocs/gitignore.template +8 -0
  43. package/assets/templates/docs-app-mkdocs/mkdocs.yml +1 -0
  44. package/assets/templates/docs-app-mkdocs/package.json.template +3 -2
  45. package/dist/commands/config/index.d.ts.map +1 -1
  46. package/dist/commands/config/index.js +35 -3
  47. package/dist/commands/docs/check/check.d.ts +3 -0
  48. package/dist/commands/docs/check/check.d.ts.map +1 -0
  49. package/dist/commands/docs/check/check.js +48 -0
  50. package/dist/commands/docs/check/check.types.d.ts +17 -0
  51. package/dist/commands/docs/check/check.types.d.ts.map +1 -0
  52. package/dist/commands/docs/check/check.types.js +1 -0
  53. package/dist/commands/docs/check/checker.d.ts +8 -0
  54. package/dist/commands/docs/check/checker.d.ts.map +1 -0
  55. package/dist/commands/docs/check/checker.js +82 -0
  56. package/dist/commands/docs/check/commands.d.ts +5 -0
  57. package/dist/commands/docs/check/commands.d.ts.map +1 -0
  58. package/dist/commands/docs/check/commands.js +232 -0
  59. package/dist/commands/docs/check/diagrams.d.ts +5 -0
  60. package/dist/commands/docs/check/diagrams.d.ts.map +1 -0
  61. package/dist/commands/docs/check/diagrams.js +197 -0
  62. package/dist/commands/docs/check/files.d.ts +21 -0
  63. package/dist/commands/docs/check/files.d.ts.map +1 -0
  64. package/dist/commands/docs/check/files.js +121 -0
  65. package/dist/commands/docs/check/markdown.d.ts +60 -0
  66. package/dist/commands/docs/check/markdown.d.ts.map +1 -0
  67. package/dist/commands/docs/check/markdown.js +125 -0
  68. package/dist/commands/docs/check/mermaid-runtime.d.ts +3 -0
  69. package/dist/commands/docs/check/mermaid-runtime.d.ts.map +1 -0
  70. package/dist/commands/docs/check/mermaid-runtime.js +57 -0
  71. package/dist/commands/docs/check/navigation.d.ts +4 -0
  72. package/dist/commands/docs/check/navigation.d.ts.map +1 -0
  73. package/dist/commands/docs/check/navigation.js +104 -0
  74. package/dist/commands/docs/check/reader-rules.d.ts +6 -0
  75. package/dist/commands/docs/check/reader-rules.d.ts.map +1 -0
  76. package/dist/commands/docs/check/reader-rules.js +214 -0
  77. package/dist/commands/docs/index.d.ts.map +1 -1
  78. package/dist/commands/docs/index.js +2 -0
  79. package/dist/commands/docs/init/docs-commands.d.ts +1 -0
  80. package/dist/commands/docs/init/docs-commands.d.ts.map +1 -1
  81. package/dist/commands/docs/init/docs-commands.js +8 -3
  82. package/dist/commands/docs/init/index.d.ts +1 -0
  83. package/dist/commands/docs/init/index.d.ts.map +1 -1
  84. package/dist/commands/docs/init/index.js +8 -0
  85. package/dist/commands/docs/init/scaffold.d.ts +1 -0
  86. package/dist/commands/docs/init/scaffold.d.ts.map +1 -1
  87. package/dist/commands/docs/init/scaffold.js +61 -13
  88. package/dist/commands/docs/nav/contents.d.ts +4 -0
  89. package/dist/commands/docs/nav/contents.d.ts.map +1 -1
  90. package/dist/commands/docs/nav/contents.js +10 -0
  91. package/dist/commands/docs/nav/fumadocs.d.ts.map +1 -1
  92. package/dist/commands/docs/nav/fumadocs.js +32 -10
  93. package/dist/config/documentation-check.d.ts +38 -0
  94. package/dist/config/documentation-check.d.ts.map +1 -0
  95. package/dist/config/documentation-check.js +132 -0
  96. package/dist/config/oat-config.d.ts +2 -0
  97. package/dist/config/oat-config.d.ts.map +1 -1
  98. package/dist/config/oat-config.js +4 -0
  99. package/dist/config/resolve.d.ts.map +1 -1
  100. package/dist/config/resolve.js +1 -0
  101. package/dist/release/public-package-contract.d.ts.map +1 -1
  102. package/dist/release/public-package-contract.js +3 -0
  103. package/package.json +11 -2
  104. package/assets/skills/oat-docs-bootstrap/assets/AGENTS.md.template +0 -64
package/README.md CHANGED
@@ -41,6 +41,18 @@ Additional useful entry points:
41
41
  - `oat repo archive sync`
42
42
  - `oat doctor`
43
43
 
44
+ ## Docs scaffolding
45
+
46
+ `oat docs init --framework fumadocs --app-name my-docs` creates a docs app with app-root `AGENTS.md`, a reader-first Getting Started stub and contributor/toolchain guides. The CLI owns these templates for both Fumadocs and legacy MkDocs; the bootstrap skill guides inspection and setup. Existing files and plain Markdown adoption are preserved.
47
+
48
+ Fumadocs static exports include `llms.txt`, `llms-full.txt` and `llms/<page-slugs>/content.md` (root `llms/content.md`) for loaded `.md` readers. These retain authored Markdown and source-relative-link guidance; configured non-readers and MDX are excluded. Use authored Contents maps and `oat docs nav sync`, followed by `--check`, for navigation changes.
49
+
50
+ `oat docs check [--target-dir <dir>] [--rule <id>...] [--json]` performs read-only reader, navigation, contributor-command and Mermaid/SVG checks without a site build. Errors exit 1; warnings exit 0. Configure validated severities, numeric thresholds and reason-bearing exceptions under `documentation.check`. Mermaid syntax parsing lazily uses a real DOM with strict sanitization and no script/resource execution; Node 22.17 remains the minimum. See [checker rules and configuration](../../apps/oat-docs/docs/docs-tooling/check.md).
51
+
52
+ Fumadocs starters constrain `mdast-util-to-markdown` to 2.1.2 for the current upstream handler compatibility defect. New independent install roots get `pnpm-workspace.yaml`; workspace members get manual setup advice for the existing root YAML, with approval/conflict preservation in bootstrap. No member-local boundary or root dependency-policy merge is performed; `--no-root-patch` still controls build scripts only. Keep the effective policy and lockfile and verify actual resolution before building.
53
+
54
+ Framework starters expose `docs:check` and run it before build; MkDocs `test` is a real check. Bootstrap proposes approved PR CI edits with explicit generated-manifest freshness. Markdown needs neither an app build nor a default manifest.
55
+
44
56
  ## Update Notifications
45
57
 
46
58
  On ordinary interactive command runs, OAT may print a passive notice when npm's stable `latest` CLI version is newer than the installed version. The cache normally limits checks to once every 24 hours and same-version notices to once every 72 hours; overlapping CLI processes can each perform a check or print a notice.
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "oatVersion": "0.3.26"
3
+ "oatVersion": "0.3.28"
4
4
  }
@@ -15,9 +15,43 @@ Documentation should ship with the code it explains. This page covers the core d
15
15
  - Use `.md`-suffixed relative links in `## Contents`: `[Page](page.md)` for leaf pages and `[Section](subdir/index.md)` for child directories.
16
16
  - Fumadocs and MkDocs share this authored contract, but they regenerate different artifacts.
17
17
 
18
+ Within Contents, use dash-only link bullets with optional descriptions. A `### Label` introduces a group containing at least one authored entry; entries before the first group stay ungrouped. `*`/`+` link bullets and empty groups produce file/line errors. The map ends at the next level-two heading, and fenced examples are ignored. A self-index link retains landing-page behavior. Missing Contents retains deterministic manifest fallback, while strict nav still requires maps and reports unlisted reader pages.
19
+
20
+ ```markdown
21
+ ## Contents
22
+
23
+ - [Reader guide](guide.md) - Reach a useful result.
24
+
25
+ ### More detail
26
+
27
+ - [Reference](reference/index.md) - Local reference map.
28
+ ```
29
+
30
+ | Surface | Authored or generated |
31
+ | -------------------------------------------------- | ----------------------------------------------------------- |
32
+ | `docs/**/*.md`, including directory indexes | Authored reader content and local maps |
33
+ | App `AGENTS.md`, config, source loader and scripts | Authored working rules and tooling |
34
+ | `docs/**/meta.json` | Committed derived sidebar; regenerate with nav sync |
35
+ | App-root `index.md` | Generated Markdown inventory; predev/prebuild regenerate it |
36
+ | `.source/`, `.next/`, `out/` | Generated collection/build/export; never edit |
37
+
38
+ `documentation.navOwner: nav-sync` authorizes navigation generation. Agree ownership before changing hand-authored or undeclared navigation. `documentation.nonReaderPaths` excludes non-reader content from nav, manifests and the Fumadocs collection; explicit Contents links do not override it. `documentation.excludes` affects only the manifest. Do not use exclusions to conceal an unlisted reader page.
39
+
40
+ To add a page, choose its scope from the nearest map, add title/description frontmatter and one H1, then update Contents. To move or rename, update both maps and inbound links in the same commit, and agree how old published URLs will resolve (redirect or static recovery page). Add a child `index.md` when adding a directory. Use `.md`-suffixed source links; the link transform produces rendered routes.
41
+
42
+ ## Supported features and diagrams
43
+
44
+ Use **Markdown → existing transform → MDX** in that order. Tables, task lists, fenced code, callouts, nested tabs and Mermaid are configured. MDX is for actual JSX/component needs and is excluded from the Markdown manifest and agent endpoints. See [Markdown Features](markdown-features.md) for paired Syntax/Rendered examples.
45
+
46
+ Not configured: executable notebooks, API playgrounds, screenshot testing. The portable checker validates Mermaid syntax with the installed parser; a successful build alone does not prove diagram validity or visual correctness. Keep language labels on code fences and use `bash` for shell commands.
47
+
48
+ Mermaid is diagram source; include `accTitle` and `accDescr`. Important or phone-sized diagrams also get matching light/dark SVGs under `public/diagrams/`, linked as `/diagrams/name-light.svg` and `/diagrams/name-dark.svg`; the theme adds the base path, selects the theme and supports zoom. Update source and both SVGs in the same commit. Use descriptive SVG `<title>`/`<desc>` with `role="img"` and `aria-labelledby`, readable labels and concise meaningful image alt text (about 155 characters or less).
49
+
18
50
  ## Local workflow
19
51
 
20
- 1. Start the dev server from the repo root:
52
+ All commands below run from the **repository root**. Contributor setup is in [Code Contributions](code.md).
53
+
54
+ 1. Start the dev server:
21
55
 
22
56
  ```bash
23
57
  pnpm dev:docs
@@ -47,8 +81,18 @@ Documentation should ship with the code it explains. This page covers the core d
47
81
 
48
82
  ```bash
49
83
  pnpm --filter oat-docs docs:format
84
+ pnpm --filter oat-docs docs:format:check
50
85
  ```
51
86
 
87
+ Run portable validation from the repository root before committing:
88
+
89
+ ```bash
90
+ pnpm --filter oat-docs docs:check
91
+ pnpm docs:validate
92
+ ```
93
+
94
+ The first command checks reader structure/metadata/links, contributor commands, navigation and diagrams without a build. Errors fail; warnings prompt review. The second retains flagship hosted README/catalog/live-consumer checks too. See [Check Documentation](../docs-tooling/check.md) for policy, counting and repair guidance.
95
+
52
96
  ## Authoring Expectations
53
97
 
54
98
  - Keep docs aligned with the current repo behavior and current command surface.
@@ -70,16 +114,14 @@ Documentation should ship with the code it explains. This page covers the core d
70
114
 
71
115
  ```bash
72
116
  pnpm -w run cli:source -- docs nav sync --target-dir apps/oat-docs
117
+ pnpm -w run cli:source -- docs nav sync --target-dir apps/oat-docs --check
118
+ pnpm docs:validate
73
119
  ```
74
120
 
75
121
  - In MkDocs apps, the same `oat docs nav sync` command refreshes the `nav:` block in `mkdocs.yml` instead.
76
122
  - Use [Markdown Features](markdown-features.md) for supported syntax and examples.
77
123
 
78
- ## Agent guidance
79
-
80
- - Treat `index.md` plus its `## Contents` section as the local discovery source of truth.
81
- - Prefer linking to source files and commands explicitly when documenting behavior.
82
- - Regenerate or freshness-check the docs surface index after adding, removing, renaming, or reordering pages.
124
+ Agent working rules: `../../AGENTS.md` (app-root source file).
83
125
 
84
126
  ## Related Guides
85
127
 
@@ -79,7 +79,7 @@ theme.
79
79
 
80
80
  A diagram that needs to read well, especially on a phone, gets a hand-drawn SVG
81
81
  pair next to its Mermaid source. Mermaid stays the source of truth: when you
82
- change the Mermaid, update both SVGs in the same change.
82
+ change the Mermaid, update both SVGs in the same commit, preserving nodes, edges and labels. Give each SVG `role="img"` and descriptive `<title>`/`<desc>` elements connected by `aria-labelledby`; keep labels readable and Markdown alt text concise (about 155 characters or less).
83
83
 
84
84
  === "Syntax"
85
85
 
@@ -150,8 +150,20 @@ Use a language identifier on every opening fence. In this docs app, use `bash` f
150
150
 
151
151
  ## Authoring Reminder
152
152
 
153
- After adding or reorganizing docs pages, refresh the generated docs surface:
153
+ After adding, moving or renaming pages, update both authored maps and inbound links. From the **repository root**, refresh and validate the generated surfaces:
154
154
 
155
155
  ```bash
156
156
  pnpm -w run cli:source -- docs generate-index --docs-dir apps/oat-docs/docs --output apps/oat-docs/index.md
157
157
  ```
158
+
159
+ ```bash
160
+ pnpm -w run cli:source -- docs nav sync --target-dir apps/oat-docs
161
+ pnpm -w run cli:source -- docs nav sync --target-dir apps/oat-docs --check
162
+ pnpm --filter oat-docs docs:format
163
+ pnpm --filter oat-docs docs:format:check
164
+ pnpm --filter oat-docs docs:lint
165
+ pnpm docs:validate
166
+ pnpm build:docs
167
+ ```
168
+
169
+ These checks cover navigation, source contracts, formatting and build output. Inspect rendered tabs and diagrams too; they do not validate Mermaid syntax or accessibility automatically. Agent rules live in `../../AGENTS.md` (app-root source file).
@@ -63,20 +63,21 @@ Choose Markdown files or a framework app, using the guided skill or direct CLI.
63
63
 
64
64
  The docs-bootstrap skill offers Markdown, Fumadocs, and MkDocs. Configured tooling is authoritative; framework evidence is checked before plain-directory evidence. A root README alone does not trigger adoption, and an empty selected target stays fresh setup. Markdown uses file checks and an adopt/audit handoff, with no app questions, dependencies, framework patches, docs-root AGENTS, or site build.
65
65
 
66
- For framework apps, it wraps `oat docs init` with a seven-step guided flow: preflight detection (repo shape + existing-setup conflict surfacing), richer input gathering (including a site name distinct from the package name), the CLI invocation itself, labeled post-patches for open CLI gaps, install + build verification, post-scaffold config inspection, and a chunked educational walkthrough.
66
+ For framework apps, it wraps `oat docs init` with a seven-step guided flow: preflight detection (repo shape + existing-setup conflict surfacing), richer input gathering (including a site name distinct from the package name), the CLI invocation itself, CLI-owned scaffold inspection, install + build verification, post-scaffold config inspection, and a chunked educational walkthrough.
67
67
 
68
68
  What the framework path adds over the raw CLI:
69
69
 
70
70
  - **Preflight + conflict resolution.** Detects existing `documentation` config / docs app dir / root `AGENTS.md` section and walks a deliberate resolution choice (replace, abort, repair, or deferred second-app) before any mutation.
71
71
  - **Richer inputs.** Asks for a **site name** separate from the package name, so layout branding and page metadata converge on the same display title. `createDocsConfig()` handles runtime configuration, not titles.
72
- - **AGENTS.md bridge.** FP-15 writes a task-framed `<appRoot>/AGENTS.md` only when the CLI does not scaffold it and no file already exists. Template content, metadata, command context, Node requirements, Contents links and generated-files guidance are CLI-owned. For nested-standalone repos only, the Fumadocs template passes an ESM-safe Turbopack root through `createDocsConfig` while preserving static export settings. Monorepo and single-package scaffolds use Next.js root discovery. Older scaffold shapes become analyze findings rather than post-patches.
72
+ - **CLI-owned guidance.** Fresh Fumadocs and MkDocs apps include app-root `AGENTS.md`, a reader-first Getting Started stub, a human contributor entry and `docs/contributing/docs-toolchain.md`. Commands state their working directory. Bootstrap observes this output; older CLIs missing it get analyze/manual CLI-template upgrade advice, rather than a second template owner. Existing and Markdown surfaces are preserved. Nested-standalone Fumadocs still uses the ESM-safe Turbopack root while monorepo and single-package apps use Next root discovery.
73
+ - **Agent Markdown.** Fumadocs exports `/llms.txt`, `/llms-full.txt` and `/llms/<page-slugs>/content.md` (root `/llms/content.md`) from loaded `.md` readers. MDX and configured non-readers are excluded. Source headers identify how to resolve authored relative links; rendered and Markdown URLs include the deployment base path once.
73
74
  - **Build verification.** Runs install + build, classifies failures against known patterns, stops on unknown errors rather than guessing.
74
75
  - **Config inspection.** Reads `.oat/config.json` back, verifies paths exist on disk, handles the nested-standalone dual-config case, and collects the `requireForProjectCompletion` opt-in explicitly.
75
76
  - **Root-build explanation.** When the CLI safely patches a compatible Turbo root `build` script, the walkthrough explains why the filter was added, shows the diff shape, and documents how to adjust or revert it. When the CLI skips the patch, the walkthrough relays the recommended manual snippet.
76
77
  - **Educational walkthrough.** Seven sections covering the `documentation` config, the authored-source/generated-navigation model, the `## Contents` contract (with extension discipline), the three agent-instruction surfaces (root `AGENTS.md` pointer / docs-app `AGENTS.md` / `docs/contributing.md`), Fumadocs internals (or MkDocs Minimum Contract), and the OAT docs ecosystem (`oat-project-document`, `oat-docs-analyze`, `oat-docs-apply`).
77
78
  - **Optional content kickoff.** Hands off to `oat-docs-analyze` + `oat-docs-apply` if you want to populate initial repo-specific content immediately.
78
79
 
79
- Capability detection gates the remaining AGENTS bridge. Existing files are preserved; use analyze and reviewed recommendations to address older scaffold output.
80
+ Missing app-root `AGENTS.md` from an older CLI is reported as a missing capability with analyze/manual CLI-template upgrade advice. Existing files are preserved; use analyze and reviewed recommendations to address older scaffold output.
80
81
 
81
82
  ### 3b. Direct CLI (deterministic / non-interactive)
82
83
 
@@ -105,7 +106,7 @@ oat docs init --app-name my-docs --framework fumadocs --yes
105
106
  oat docs init --app-name my-docs --framework mkdocs --yes
106
107
  ```
107
108
 
108
- Use 3b when you want a fully headless scaffold (CI, automation) and can accept the raw CLI output without the guided post-patches.
109
+ Use 3b when you want a fully headless scaffold (CI, automation) and can accept the raw CLI output without the guided walkthrough.
109
110
 
110
111
  For compatible Turbo monorepos, the CLI also patches the repo-root
111
112
  `package.json` by default so root `pnpm build` excludes the new docs app and a
@@ -298,11 +299,11 @@ Important:
298
299
  three kinds of documentation. In all three, each folder's `index.md` has a
299
300
  `## Contents` list of its pages.
300
301
 
301
- | Framework | Choose it when | What you give up |
302
- | -------------- | -------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
303
- | Plain Markdown | People and agents read the docs in the repository; no site is needed | A rendered site and search. You keep each `## Contents` list up to date by hand |
304
- | Fumadocs | A Node/pnpm repository wants a hosted docs site | An app with dependencies and a build. A page missing from its folder's `## Contents` list is hidden from the sidebar |
305
- | MkDocs | The team already uses Python and MkDocs Material | Python setup (`setup-docs.sh` runs `pip install`). `oat docs nav sync` rewrites the whole `nav:` block of `mkdocs.yml` |
302
+ | Framework | Choose it when | What you give up |
303
+ | --------------- | -------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
304
+ | Plain Markdown | People and agents read the docs in the repository; no site is needed | A rendered site and search. You keep each `## Contents` list up to date by hand |
305
+ | Fumadocs | A Node/pnpm repository wants a hosted docs site | An app with dependencies and a build. A page missing from its folder's `## Contents` list is hidden from the sidebar |
306
+ | MkDocs (legacy) | The team already uses Python and MkDocs Material | Python setup (`setup-docs.sh` runs `pip install`). `oat docs nav sync` rewrites the whole `nav:` block of `mkdocs.yml` |
306
307
 
307
308
  When nothing chooses for it (a non-interactive run or `--yes`), `oat docs init`
308
309
  uses Fumadocs. That is only a default; pick the smallest option your readers
@@ -323,3 +324,15 @@ need.
323
324
  existing MkDocs site with `oat init --setup` instead of `oat docs init`. When
324
325
  moving an MkDocs site to Fumadocs, `oat docs migrate` converts MkDocs syntax
325
326
  and frontmatter; it only previews changes until you pass `--apply`.
327
+
328
+ MkDocs/Material scaffolding is **legacy**; its existing Python pins remain unchanged. [Material's changelog](https://squidfunk.github.io/mkdocs-material/changelog/) says Material receives critical/security fixes through May 5, 2027 and names Zensical as its successor. That lifecycle belongs to Material, not MkDocs core, and does not promise that the scaffold's older pins contain the latest fixes. Pinned MkDocs 1.4.2 still renders configured non-reader routes even though OAT omits them from navigation and manifests.
329
+
330
+ ## Verify the scaffold in PR CI
331
+
332
+ Current framework starters run `docs:check` before build and MkDocs `test` runs the same checker. Bootstrap presents concrete CI edits after inspecting config: checker, actual framework build, then regeneration and Git diff of a configured generated Markdown inventory. It preserves existing workflow content and writes only the approved diff. Use full-history checkout/fetch for diagram comparisons. Markdown gets checker-only wiring unless an external manifest was separately configured. See [Check Documentation](check.md) for diagnostics and repair.
333
+
334
+ ## Fumadocs install-root compatibility
335
+
336
+ Current Fumadocs needs exact `mdast-util-to-markdown: 2.1.2` to avoid the upstream bold/italic handler recursion in 2.2.0. CLI init creates a small `pnpm-workspace.yaml` only for a new independent app that is its own installation root. A real workspace member gets no local boundary: bootstrap presents the exact root YAML override for approval, preserving package globs, unrelated settings and conflicting pins. Declined/skipped edits remain manual and build verification stays pending. `--no-root-patch` controls root build scripts only.
337
+
338
+ Use effective-root `pnpm-workspace.yaml` for pnpm 10+ (including 12, which ignores `package.json`'s `pnpm.overrides`); member-only policy is ineffective. After installing from the actual root, inspect `pnpm why mdast-util-to-markdown`, confirm 2.1.2 and retain root config/lockfile. Run the checker and real build with all authored content preserved. This is a constrained fresh-install policy, not a framework upgrade or an unconstrained resolution claim.
@@ -0,0 +1,154 @@
1
+ ---
2
+ title: Check Documentation
3
+ description: Validate reader structure, links, navigation, contributor commands and accessible diagram sources without building a site.
4
+ ---
5
+
6
+ # Check Documentation
7
+
8
+ Run the portable checker before committing documentation. It reads authored
9
+ Markdown/MDX, config, local package scripts and diagram assets; it never builds a
10
+ site, runs page scripts or MDX, executes documented commands, or fetches links.
11
+
12
+ ```bash
13
+ oat docs check
14
+ oat docs check --target-dir docs-site
15
+ oat docs check --rule description h1 --rule links --json
16
+ ```
17
+
18
+ Omitted targets use `documentation.root`, then the existing `docs` fallback.
19
+ Framework app roots resolve to their content directory. A literal Markdown root
20
+ stays literal even with a child named `docs`. Paths in findings are deterministic,
21
+ content-root-relative POSIX paths; physical line locations are included when
22
+ available, including nested supported tabs. No sidebar or default manifest is
23
+ required for Markdown.
24
+
25
+ ## Results and repair
26
+
27
+ Errors exit **1**; warning-only runs exit **0**. System/runtime failures retain
28
+ exit **2**. Unknown rule IDs and malformed checker config are actionable
29
+ `configuration` findings. JSON has exactly these top-level keys:
30
+
31
+ ```json
32
+ {
33
+ "summary": { "errors": 1, "warnings": 0 },
34
+ "findings": [
35
+ {
36
+ "ruleId": "description",
37
+ "severity": "error",
38
+ "path": "guide.md",
39
+ "line": 1,
40
+ "message": "Frontmatter description is required and must be nonempty."
41
+ }
42
+ ]
43
+ }
44
+ ```
45
+
46
+ Fix the authored page, its local Contents map and inbound links together. For
47
+ owned generated navigation, run `oat docs nav sync`, then rerun the checker.
48
+ Hand-authored or undeclared navigation is compared for membership/order without
49
+ requiring generated display labels, title fields or YAML formatting; do not
50
+ silently regenerate it. Missing optional Fumadocs metadata, metadata objects without
51
+ `pages`, and absent MkDocs `nav` skip comparison. Present `pages` must be an array;
52
+ explicit entries still compare membership/order. Implicit Fumadocs order is not
53
+ compared. Nav-sync ownership retains its existing strict read-only freshness check. Generated inventories are separate: regenerate configured output
54
+ and check its Git diff after the build. A build that rewrites the inventory does
55
+ not prove the committed copy was fresh.
56
+
57
+ The framework starters provide `docs:check`; MkDocs `test` runs the checker too.
58
+ Both build scripts run it before navigation/build. In OAT's workspace, from the
59
+ repository root use `pnpm --filter oat-docs docs:check`. The existing
60
+ `pnpm docs:validate` also keeps OAT-specific hosted README, skill catalog and
61
+ live-consumer checks. Review warnings; avoid blanket suppressions.
62
+
63
+ ## Stable rules and default counting
64
+
65
+ Threshold names below are keys of `documentation.check.thresholds`. Comparisons
66
+ are strictly **above** the stated limits except depth, which triggers **at** its
67
+ threshold. Counts use authored reader `.md`/`.mdx` files and real Markdown nodes;
68
+ fenced examples do not become headings, links, groups or diagrams. YAML
69
+ frontmatter, GFM/reference links, explicit heading IDs, static HTML and supported
70
+ recursive tabs participate.
71
+
72
+ | Rule ID | Default behavior |
73
+ | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
74
+ | `directory-index` | Error for a reader-bearing directory without `index.md` and a nonempty dash-bullet Contents map, invalid map grammar or unresolved strict Contents target. Ancestors of reader pages participate. |
75
+ | `root-width` | Flat root Contents links warn above `rootWarn: 10`, error above `rootError: 14`. Real groups exempt the width. |
76
+ | `contents-width` | Ungrouped Contents links warn above `contentsWarn: 10`, error above `contentsError: 15`. `catalog: true` or the recognized OAT generated-index marker exempts only this width rule. |
77
+ | `leaf-size` | Direct reader pages include index. A leaf has no reader-bearing child directory: index-only errors; two total pages warn. |
78
+ | `folder-size` | Direct reader pages including index warn above `folderWarn: 12`, error above `folderError: 20`, unless the index has real groups. |
79
+ | `depth` | Content root is depth 0; warn at `depthWarn: 4`, error at `depthError: 5`. |
80
+ | `page-length` | Warn above `pageLines: 500` physical source lines. Explicit `type: reference` or `reference`/`references` path segments use `referenceLines: 1000` and warn above `referenceH3: 40` real H3 headings. No default length error limit. |
81
+ | `frontmatter` | Unreadable source, invalid YAML or a non-mapping frontmatter document errors. Read failures use relative paths and safe error codes; invalid metadata skips description validation while independent body checks continue at physical positions. |
82
+ | `description` | Missing/empty frontmatter description errors; character lengths below `descriptionMin: 40` or above `descriptionMax: 160` warn. |
83
+ | `h1` | Error unless each page has exactly one real H1. |
84
+ | `links` | Error for unresolved in-root source links/anchors. No network checking. Ordinary escaping links are provenance warnings and their targets are not read. Contents links retain stricter local-map rules. |
85
+ | `contents-description` | Error for descriptions ending in an ellipsis/truncation. |
86
+ | `overview` | Warn below `overviewWords: 10` before Contents. |
87
+ | `contents-separator` | Warn when Contents descriptions mix separators in a tree. |
88
+ | `navigation` | Error for explicit navigation drift using declared ownership semantics; hand-authored/undeclared absent optional meta/pages/nav skips comparison. Nav-sync freshness stays strict; Markdown skips it. |
89
+ | `commands` | Error for missing literal contributor scripts; implicit pnpm shorthand also accepts installed package/workspace `.bin` entries. Explicit pnpm run/npm run stays script-only; unresolved context errors; echo scripts warn. |
90
+ | `mermaid` | Parse every real Mermaid fence using the pinned Mermaid parser. Invalid syntax errors. |
91
+ | `diagram-pairs` | Diagram light/dark SVG siblings and both page references are required. Conventional diagram paths and explicit paired references participate; ordinary logos are not diagrams. |
92
+ | `diagram-accessibility` | Mermaid missing `accTitle`/`accDescr` warns. SVGs require `role="img"`, nonempty title/desc. Rendered diagrams without page-visible explanatory text or an associated long description warn. |
93
+ | `diagram-freshness` | Warn when changed Mermaid lacks both associated SVG changes; association follows the actual section/tab group. Missing usable Git comparison is explicitly unverified. |
94
+ | `image-alt` | Warn for empty, filename/slug-like or longer than `altMax: 155` image alt text. |
95
+ | `provenance` | Warn for planning/backlog/home paths, configured ticket/milestone patterns and ordinary links escaping the root. Legitimate reader docs remain visible. |
96
+
97
+ These are lint limits, distinct from authoring targets for concise pages and
98
+ focused maps. `documentation.nonReaderPaths` uses the existing
99
+ [bounded matcher](commands.md#exclusion-patterns) for reader inventory and checks.
100
+ `documentation.excludes` remains manifest-only and cannot hide reader defects.
101
+
102
+ ## Contributor command context
103
+
104
+ Literal pnpm script and npm run examples in `contributing.md`/`.mdx` and
105
+ `contributing/**` are checked against package manifests. Each code block starts
106
+ at the repository root. Use executable `cd`, `-w`/`--workspace-root`, `--dir` or
107
+ literal `--filter` selection to establish another context. Prose such as “from
108
+ the app directory” alone does not change it. Built-in package-manager commands
109
+ and illustrative placeholders are recognized; commands are never run.
110
+
111
+ Implicit pnpm shorthand (for example, `pnpm tsc`) may use an installed entry in
112
+ that package's or the workspace root's `node_modules/.bin`. Only its presence is
113
+ checked. Explicit `pnpm run tsc` and `npm run tsc` still require a package script.
114
+ System PATH lookup is outside this check; before dependencies are installed, a
115
+ binary shorthand may be reported missing. Use `pnpm exec` for explicit binary examples.
116
+
117
+ ## Diagram comparison and limits
118
+
119
+ Syntax validation lazily loads the pinned Mermaid parser with a real Node DOM
120
+ and strict sanitization; script execution and resource loading stay disabled.
121
+ It does not render or prove semantic/visual correctness. Inspect both themes
122
+ for important diagrams. Put meaningful `accTitle` and `accDescr` in Mermaid,
123
+ keep SVG title/desc and page explanations, and change both theme SVGs with source.
124
+
125
+ Freshness uses the merge base against `documentation.check.diagramBaseRef`
126
+ (default `origin/main` when available), plus committed, staged, unstaged and
127
+ untracked changes. It never mutates Git. PR checkout/fetch must provide the base;
128
+ without one, static validation still runs and freshness is reported unverified.
129
+ Bootstrap supplies concrete checker → framework build → configured-manifest
130
+ freshness CI guidance. Markdown runs only the checker unless an external generated
131
+ manifest was explicitly configured.
132
+
133
+ ## Configure narrow policy
134
+
135
+ `documentation.check` is a shared repository object preserved by real config
136
+ commands. Rule values are `error`, `warn` or `off`; `--rule` selects checks without
137
+ changing policy. `frontmatter` and `mermaid` govern syntax independently from
138
+ `description` and `diagram-accessibility`; metadata/accessibility exceptions do
139
+ not suppress syntax or body findings. Explicit `warn`/`off` settings or exceptions
140
+ for the syntax rule itself remain supported. Exceptions use the same bounded path matcher, a stable rule ID
141
+ and a mandatory nonempty reason; omitted exception severity means `off`.
142
+
143
+ ```bash
144
+ oat config set documentation.check '{"rules":{"image-alt":"warn"},"thresholds":{"referenceLines":1200},"exceptions":[{"path":"reference/decisions.md","rule":"provenance","reason":"Reader-facing decision pointers preserve canonical rationale."}],"provenance":{"ticketPatterns":["TICKET-[0-9]+"],"milestonePatterns":["Milestone [0-9]+"]},"diagramBaseRef":"origin/main"}'
145
+ oat config get documentation.check --json
146
+ oat config dump --json
147
+ oat config unset documentation.check --shared
148
+ ```
149
+
150
+ Numeric thresholds are nonnegative safe integers with ordered warn/error and
151
+ min/max pairs. Patterns must compile as regular expressions. Unknown names,
152
+ invalid values, blank reasons and escaping exception paths are rejected rather
153
+ than silently dropped. Keep decision-pointer exceptions narrow and justified;
154
+ metadata/maps/links should normally be repaired in source.
@@ -13,18 +13,23 @@ or **MkDocs Material**.
13
13
 
14
14
  - What it does: documents the docs-specific CLI surface for scaffolding apps, migrating markdown, generating Fumadocs app-root index manifests, and syncing MkDocs or Fumadocs navigation.
15
15
  - When to use it: when you already know you are working on a docs surface and need the exact command-level behavior.
16
- - Primary commands: `oat docs init`, `oat docs migrate`, `oat docs generate-index`, `oat docs nav sync`
16
+ - Primary commands: `oat docs init`, `oat docs migrate`, `oat docs generate-index`, `oat docs nav sync`, `oat docs check`
17
17
 
18
18
  ## Command surface
19
19
 
20
- | Command | Purpose |
21
- | ------------------------- | ------------------------------------------------------------------------- |
22
- | `oat docs init` | Set up Markdown files or a docs app; additively adopt Markdown. |
23
- | `oat docs migrate` | Convert MkDocs admonitions to GFM callouts and inject frontmatter. |
24
- | `oat docs generate-index` | Generate a manifest from Markdown files, outside authored content. |
25
- | `oat docs nav sync` | Regenerate `mkdocs.yml` nav or Fumadocs `meta.json` from `index.md` maps. |
26
- | `oat docs analyze` | CLI entrypoint that points users to the `oat-docs-analyze` skill. |
27
- | `oat docs apply` | CLI entrypoint that points users to the `oat-docs-apply` skill. |
20
+ | Command | Purpose |
21
+ | ------------------------- | ------------------------------------------------------------------------------------- |
22
+ | `oat docs init` | Set up Markdown files or a docs app; additively adopt Markdown. |
23
+ | `oat docs migrate` | Convert MkDocs admonitions to GFM callouts and inject frontmatter. |
24
+ | `oat docs generate-index` | Generate a manifest from Markdown files, outside authored content. |
25
+ | `oat docs nav sync` | Regenerate `mkdocs.yml` nav or Fumadocs `meta.json` from `index.md` maps. |
26
+ | `oat docs check` | Read-only reader, navigation, command and diagram checks; errors fail, warnings pass. |
27
+ | `oat docs analyze` | CLI entrypoint that points users to the `oat-docs-analyze` skill. |
28
+ | `oat docs apply` | CLI entrypoint that points users to the `oat-docs-apply` skill. |
29
+
30
+ ## `oat docs check`
31
+
32
+ Run `oat docs check [--target-dir <dir>] [--rule <id>...] [--json]` before committing. It resolves the configured root, validates real reader files without a site build, and emits deterministic findings. Errors exit 1; warning-only exits 0. See [Check Documentation](check.md) for stable rule IDs, counting, narrow policy/exception settings and the exact JSON contract.
28
33
 
29
34
  ## Which Generation Command To Run
30
35
 
@@ -40,7 +45,7 @@ explicit external output and retain the authored config index. Both frameworks k
40
45
 
41
46
  Use `oat docs init` to bootstrap Markdown documentation or scaffold a framework app.
42
47
 
43
- > **Consider the `oat-docs-bootstrap` skill instead.** The skill wraps `oat docs init` with preflight detection, richer input gathering (site name distinct from package name), capability-gated post-patches that close open CLI gaps (site-title metadata, Turbopack root, template-content fixes, docs-app `AGENTS.md` bridge, `## Contents` link extensions, `contributing.md` three-surfaces cleanup), build verification, config inspection, and a seven-section educational walkthrough. See [Add Docs to a Repo §3a](add-docs-to-a-repo.md#3a-preferred-the-oat-docs-bootstrap-skill-guided) for the full flow. The CLI documented here remains the authoritative surface for flags and is the right choice when you need a deterministic, non-interactive scaffold (CI, automation).
48
+ > **Consider the `oat-docs-bootstrap` skill instead.** The skill wraps `oat docs init` with preflight detection, richer input gathering (site name distinct from package name), capability probing and verification of CLI-owned scaffolds (including framework app-root `AGENTS.md`), build verification, config inspection, and a seven-section educational walkthrough. Missing capabilities or older scaffold gaps lead to CLI update advice or an analyze handoff with manual CLI/template upgrade recommendations. See [Add Docs to a Repo §3a](add-docs-to-a-repo.md#3a-preferred-the-oat-docs-bootstrap-skill-guided) for the full flow. The CLI documented here remains the authoritative surface for flags and is the right choice when you need a deterministic, non-interactive scaffold (CI, automation).
44
49
 
45
50
  Key behavior:
46
51
 
@@ -13,6 +13,7 @@ Use this section when you are adopting the docs app workflow in a repo, maintain
13
13
 
14
14
  - [Add or Adopt Docs in a Repo](add-docs-to-a-repo.md) - Set up Markdown or a docs app and safely adopt existing Markdown.
15
15
  - [Documentation Commands](commands.md) - Docs CLI surface for init, migration, index generation, and nav sync.
16
+ - [Check Documentation](check.md) - Portable reader, navigation, command and diagram validation.
16
17
  - [Docs Workflows](workflows.md) - How the docs CLI helpers pair with analyze/apply workflows.
17
18
  - [Improve Agent Instructions](agent-instructions.md) - Analyze instruction gaps and apply approved evidence-backed changes.
18
19
 
@@ -1,4 +1,10 @@
1
1
  {
2
2
  "title": "Docs Tooling",
3
- "pages": ["add-docs-to-a-repo", "commands", "workflows", "agent-instructions"]
3
+ "pages": [
4
+ "add-docs-to-a-repo",
5
+ "commands",
6
+ "check",
7
+ "workflows",
8
+ "agent-instructions"
9
+ ]
4
10
  }
@@ -31,7 +31,7 @@ Install the workflow skills with `oat tools install docs` (preferred) or
31
31
  local navigation maintenance inside an existing OAT documentation surface
32
32
  - `oat-docs-bootstrap` is the guided onramp for Markdown setup/adoption or adding a docs app —
33
33
  wraps `oat docs init` with preflight detection, richer input gathering (site
34
- name distinct from package name), labeled post-patches for open CLI gaps,
34
+ name distinct from package name), capability probing and CLI-owned scaffold inspection,
35
35
  file-level verification for Markdown or framework build verification, config
36
36
  inspection, and an educational walkthrough
37
37
  - `oat-docs-analyze` evaluates a docs surface for structure, drift, coverage,
@@ -96,8 +96,8 @@ Diagram: bootstrap once, then analyze, approve and apply only agreed improvement
96
96
  - **Setup, once.** `oat-docs-bootstrap` checks the repo without writing, asks
97
97
  you to confirm its inputs, then runs `oat docs init`. Plain Markdown setup validates authored files,
98
98
  configuration and guidance without installing app dependencies or building a
99
- site. Fumadocs and MkDocs setup adds the relevant post-patches, installation,
100
- build verification and walkthrough.
99
+ site. Fumadocs and MkDocs setup inspects CLI-owned scaffold output, installs
100
+ dependencies, verifies the build and provides a walkthrough.
101
101
  - **Analyze.** `oat-docs-analyze` never edits docs. It writes an analysis
102
102
  artifact under `.oat/repo/analysis/` (and updates OAT tracking).
103
103
  - **Approve.** `oat-docs-apply` builds a plan from the newest artifact and
@@ -109,7 +109,7 @@ Diagram: bootstrap once, then analyze, approve and apply only agreed improvement
109
109
  marked as needing confirmation are confirmed again before they are written.
110
110
  - **Repeat.** Re-run analyze afterwards to confirm the result.
111
111
 
112
- 1. Bootstrap or explicitly adopt a documentation surface with `oat-docs-bootstrap` (preferred — guided, includes post-scaffold patches and walkthrough) or `oat docs init` directly (CLI-only / non-interactive workflows)
112
+ 1. Bootstrap or explicitly adopt a documentation surface with `oat-docs-bootstrap` (preferred — guided, includes capability probing, scaffold verification and walkthrough) or `oat docs init` directly (CLI-only / non-interactive workflows)
113
113
  2. (Optional) If migrating from MkDocs, handle that as a separate migration workstream; `oat docs migrate --docs-dir docs --config mkdocs.yml --apply` is only the syntax/frontmatter helper
114
114
  3. Use `oat-docs-authoring` for targeted OAT Markdown/Fumadocs authoring work, with `authoring-docs` as the universal documentation-quality baseline
115
115
  4. Keep authored context and title/description metadata, with an `index.md` and useful `## Contents` in each non-excluded Markdown-bearing directory; preserve asset-only exceptions and local instructions
@@ -296,8 +296,12 @@ configuration, and links.
296
296
  **Fumadocs or MkDocs path:** Use this when you want a built documentation
297
297
  site. The skill gathers app inputs (the visible site title and the package
298
298
  name are different inputs), probes which capabilities the installed CLI
299
- supports, runs the scaffold, and applies only the relevant post-patches (the
300
- skill's labeled fixes for known gaps in the CLI's scaffold output).
299
+ supports, runs the CLI scaffold, and inspects the output. Current CLI templates
300
+ own the app-root `AGENTS.md` and framework content. Missing `--site-name` support
301
+ stops bootstrap before scaffolding with CLI update advice. Missing app guidance
302
+ or older scaffold gaps become analyze findings with manual CLI/template upgrade
303
+ recommendations; bootstrap preserves existing files and supplies no replacement
304
+ AGENTS template.
301
305
  Verification installs dependencies and runs a build. If a docs app already
302
306
  exists, the default repair route runs analyze then apply and exits. An explicit
303
307
  `replace` choice deletes the existing app; a second app remains unsupported.
@@ -306,10 +310,10 @@ exists, the default repair route runs analyze then apply and exits. An explicit
306
310
  runs `oat docs init`, which writes the `documentation` section of
307
311
  `.oat/config.json` and adds or updates a managed `## Documentation` section
308
312
  in the root `AGENTS.md`. This happens on both paths. On the Fumadocs or
309
- MkDocs path it also scaffolds the app, applies post-patches, installs
310
- dependencies, runs a build, and may patch the root `package.json` so the
311
- default build leaves the docs app out. It may also write an `AGENTS.md`
312
- inside the new app when the CLI did not create one. Only after you confirm:
313
+ MkDocs path the CLI also scaffolds the app, including its app-root `AGENTS.md`,
314
+ and may patch the root `package.json` so the default build leaves the docs app
315
+ out. Bootstrap inspects that output, installs dependencies and runs a build.
316
+ Only after you confirm:
313
317
  the `replace` choice deletes the existing docs app directory and clears its
314
318
  `documentation` config and root `AGENTS.md` section (it refuses only when
315
319
  that directory has uncommitted changes); answering yes to the
@@ -519,3 +523,7 @@ routes and package scripts remain manual required changes.
519
523
  - [Improve Agent Instructions](agent-instructions.md)
520
524
  - [`../reference/docs-index-contract.md`](../reference/docs-index-contract.md)
521
525
  - [`../contributing/skills.md`](../contributing/skills.md)
526
+
527
+ ## Portable checks and PR CI
528
+
529
+ Run `oat docs check` before proposing repairs. Its findings feed analysis and approved apply work; it does not rewrite sources or grant navigation ownership. Bootstrap uses its concrete PR CI recipe to propose checker, real framework build and configured generated-manifest freshness steps while preserving existing workflows. Approve the exact workflow diff before writes. Markdown has no build or default manifest step. Full Git history/fetch enables the diagram base comparison. See [Check Documentation](check.md).
@@ -976,9 +976,11 @@ The `docs` pack contains active documentation and instruction-governance
976
976
  workflows:
977
977
 
978
978
  - **oat-docs-bootstrap** — Guide users through Markdown setup/adoption or a docs app
979
- end-to-end: preflight detection, input gathering, scaffold (via `oat docs
980
- init`) with capability-gated post-patches, build verification, config
981
- inspection, and an educational walkthrough.
979
+ end-to-end: preflight detection, input gathering, scaffold via `oat docs init`,
980
+ capability probing, CLI-owned scaffold inspection, build verification,
981
+ config inspection, and an educational walkthrough. Current CLI templates own
982
+ framework app-root `AGENTS.md`; missing capabilities or older scaffold gaps
983
+ lead to CLI update advice or analyze/manual CLI/template upgrade recommendations.
982
984
  - **oat-docs-analyze** — Analyze a docs surface for contract coverage, nav
983
985
  drift, stale claims, and coverage gaps.
984
986
  - **oat-docs-apply** — Apply only approved, evidence-backed docs-analysis
@@ -78,6 +78,8 @@ Git retries include prior outputs only with HEAD ownership evidence, while
78
78
  no-Git retries report current-pass mutations. See [Backlog
79
79
  Lifecycle](../workflows/backlog-and-planning/backlog-lifecycle.md).
80
80
 
81
+ `oat docs check [--target-dir <dir>] [--rule <id>...] [--json]` validates reader structure, links, navigation, contributor commands and diagrams without a site build. Errors exit 1; warning-only exits 0. See [Check Documentation](../docs-tooling/check.md) for rules/config and JSON.
82
+
81
83
  ## Command Groups
82
84
 
83
85
  | Command group | What it covers | Go deeper |
@@ -99,6 +99,7 @@ Common keys in `.oat/config.json`:
99
99
  - `documentation.guidance` — advisory Markdown IA source paths/URLs, as a string or ordered non-empty string array. Repo config overrides user config; explicit skill input overrides both. Absent values use the installed `authoring-docs` IA reference. Use `oat config set documentation.guidance ./docs/ia/index.md` or `oat config set documentation.guidance '["~/guidance/index.md","https://example.com/docs/index.md"]' --user`. Arrays retain order; commas in paths are literal. `--local` is unsupported. `get --json` reports `shared`, `user`, or `default` provenance; `unset` reveals the next tier. Only locators are stored, with unrelated config fields preserved. Sources stay read-only, external packs have `index.md` and `## Contents`, and local AGENTS/contributing rules remain authoritative. Conflicts become `ask_user`. See [IA selection](../docs-tooling/workflows.md#ia-selection-and-guidance).
100
100
  - `documentation.nonReaderPaths` — shared repository-only array of content-root-relative globs for drafts/templates. Set with `oat config set documentation.nonReaderPaths 'templates/,drafts/**'`; empty value clears and `unset` removes it. Entries are trimmed/de-duplicated; non-arrays, empty or non-string entries are rejected. Local/user writes are refused. The [bounded grammar](../docs-tooling/commands.md#exclusion-patterns) matches nav inventory, explicit Contents targets, nav checks and manifests only for the configured app/content root; excluded metadata is not rewritten. Fumadocs source collections also exclude rendering when wired through OAT source config. Pinned MkDocs 1.4.2 still renders excluded pages as routes; only nav/manifest exclusion is supported.
101
101
  - `documentation.excludes` — a JSON array of globs, relative to the docs directory, that `oat docs generate-index` leaves out of the generated index. `oat config set` takes the list as one comma-separated value (`"a/**,b.md"`) and stores it as an array; repeated `--exclude` flags extend it, and an empty value clears the key
102
+ - `documentation.check` — shared checker policy: stable rule severities, named numeric thresholds, reason-bearing bounded path/rule exceptions, ticket/milestone regex patterns and optional diagram base ref. Set/get/dump/unset preserve and validate the object. See [Check Documentation](../docs-tooling/check.md#configure-narrow-policy) for exact fields/defaults and repair commands.
102
103
  - `documentation.requireForProjectCompletion` — whether docs sync is a completion gate
103
104
  - `instructions.claude.shims` — how `oat instructions sync` keeps a `CLAUDE.md` beside each `AGENTS.md`: `none` (the default: no shims; sync removes the ones OAT created and warns about any other `CLAUDE.md`, all or nothing: it removes none while any `CLAUDE.md`, `.claude/CLAUDE.md`, or `CLAUDE.local.md` has content of its own; see [All or nothing](../provider-sync/instruction-sync.md#all-or-nothing)), `pointer`, `symlink`, or `copy`. The `--strategy` flag overrides it for one run. Set it with `oat config set instructions.claude.shims pointer` when contributors need `CLAUDE.md` (see [Claude Code and AGENTS.md](../provider-sync/instruction-sync.md#claude-code-and-agentsmd)); `oat config unset` returns to `none`. Any other value is rejected with exit code `2` rather than read as unset, and `oat config set` can still replace it
104
105
  - `instructions.claude.excludes` — a JSON array of repository-relative directories that `oat instructions sync` and `oat instructions validate` must not treat as pointer sites, additive to the documentation content root they already skip by default (see [Instruction Sync](../provider-sync/instruction-sync.md#documentation-trees)). `oat config set` takes the list as one comma-separated value (`"vendor/generated,apps/oat-docs/docs"`) and stores it as an array of repository-relative POSIX paths, trimmed and de-duplicated; an empty value clears the key, and `oat config unset instructions.claude.excludes` removes it. An entry that could never exclude anything — an absolute path, or one escaping the repository with `..` — is rejected with exit code `1` rather than stored. A structurally malformed value already on disk (a non-array, or an empty or non-string entry) is rejected with exit code `2` and a repair message, and `oat config set` can still replace it. Entries that are well formed but cannot exclude anything — among them absolute paths, paths escaping the repository, paths that match no directory (matching is case-sensitive, and the warning names the on-disk spelling when the path differs only in case), paths that resolve elsewhere through a symlink (the warning names the resolved target instead of blaming case-sensitivity), and the unexcludable `.oat/repo` carve-in root — never abort the command; they are reported as warnings and are not counted as protection. Warnings go to stderr in human mode and to the `exclusionWarnings` field under `--json`
@@ -267,14 +267,14 @@ Visibility reports source metadata: “user” is `user-invocable` and “model
267
267
 
268
268
  ### Docs workflows
269
269
 
270
- | Skill | Description | Visibility | Needs an active project? |
271
- | ----------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------- | ------------------------ |
272
- | [`authoring-docs`](../docs-tooling/workflows.md#authoring-docs) | Use when creating, restructuring, migrating, auditing, or reviewing technical documentation for software projects. Provides evidence-first, provider-portable Markdown authoring standards. | user: true; model disabled: false | No |
273
- | [`oat-docs`](../docs-tooling/workflows.md#oat-docs) | Use when a user asks questions about OAT workflows, CLI commands, skill authoring, configuration, or project lifecycle. Answers questions by reading locally-bundled OAT documentation. | user: true; model disabled: false | No |
274
- | [`oat-docs-analyze`](../docs-tooling/workflows.md#oat-docs-analyze) | Run when you need to evaluate documentation structure, navigation, and coverage against the OAT documentation contract. Produces a severity-rated analysis artifact for oat-docs-apply. | user: true; model disabled: true | No |
275
- | [`oat-docs-apply`](../docs-tooling/workflows.md#oat-docs-apply) | Run when you have a docs analysis artifact and want to generate or update documentation structure and content. Creates a branch, applies approved changes, and optionally opens a PR. | user: true; model disabled: true | No |
276
- | [`oat-docs-authoring`](../docs-tooling/workflows.md#oat-docs-authoring) | Use when authoring or restructuring targeted content inside an existing OAT Markdown surface or OAT/Fumadocs docs app. Preserves OAT docs navigation, generated indexes, and validation boundaries. | user: true; model disabled: false | No |
277
- | [`oat-docs-bootstrap`](../docs-tooling/workflows.md#oat-docs-bootstrap) | Use when bootstrapping or adopting an OAT documentation surface in a repo. Guides the user through preflight detection, richer input gathering than the raw CLI, &#96;oat docs init&#96; invocation with gated post-patches for open CLI gaps, build verification, post-scaffold config inspection, and an educational walkthrough. Supports plain Markdown &#40;file-level path&#41;, Fumadocs &#40;full path&#41;, and MkDocs &#40;lean path with defined minimum contract&#41;. | user: true; model disabled: true | Optional |
270
+ | Skill | Description | Visibility | Needs an active project? |
271
+ | ----------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------- | ------------------------ |
272
+ | [`authoring-docs`](../docs-tooling/workflows.md#authoring-docs) | Use when creating, restructuring, migrating, auditing, or reviewing technical documentation for software projects. Provides evidence-first, provider-portable Markdown authoring standards. | user: true; model disabled: false | No |
273
+ | [`oat-docs`](../docs-tooling/workflows.md#oat-docs) | Use when a user asks questions about OAT workflows, CLI commands, skill authoring, configuration, or project lifecycle. Answers questions by reading locally-bundled OAT documentation. | user: true; model disabled: false | No |
274
+ | [`oat-docs-analyze`](../docs-tooling/workflows.md#oat-docs-analyze) | Run when you need to evaluate documentation structure, navigation, and coverage against the OAT documentation contract. Produces a severity-rated analysis artifact for oat-docs-apply. | user: true; model disabled: true | No |
275
+ | [`oat-docs-apply`](../docs-tooling/workflows.md#oat-docs-apply) | Run when you have a docs analysis artifact and want to generate or update documentation structure and content. Creates a branch, applies approved changes, and optionally opens a PR. | user: true; model disabled: true | No |
276
+ | [`oat-docs-authoring`](../docs-tooling/workflows.md#oat-docs-authoring) | Use when authoring or restructuring targeted content inside an existing OAT Markdown surface or OAT/Fumadocs docs app. Preserves OAT docs navigation, generated indexes, and validation boundaries. | user: true; model disabled: false | No |
277
+ | [`oat-docs-bootstrap`](../docs-tooling/workflows.md#oat-docs-bootstrap) | Use when bootstrapping or adopting an OAT documentation surface in a repo. Guides the user through preflight detection, richer input gathering than the raw CLI, CLI-owned &#96;oat docs init&#96; scaffolding, build verification, post-scaffold config inspection, and an educational walkthrough. Supports plain Markdown &#40;file-level path&#41;, Fumadocs &#40;full path&#41;, and MkDocs &#40;lean path with defined minimum contract&#41;. | user: true; model disabled: true | Optional |
278
278
 
279
279
  ### Explainer Kit
280
280