@open-agent-toolkit/cli 0.3.25 → 0.3.27
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.
- package/README.md +6 -0
- package/assets/bundle-metadata.json +1 -1
- package/assets/docs/contributing/documentation.md +39 -6
- package/assets/docs/contributing/markdown-features.md +14 -2
- package/assets/docs/docs-tooling/add-docs-to-a-repo.md +26 -15
- package/assets/docs/docs-tooling/commands.md +13 -10
- package/assets/docs/docs-tooling/workflows.md +14 -10
- package/assets/docs/getting-started/tool-packs.md +5 -3
- package/assets/docs/reference/cli-reference.md +1 -1
- package/assets/docs/reference/configuration.md +2 -1
- package/assets/docs/reference/docs-index-contract.md +19 -6
- package/assets/docs/reference/oat-directory-structure.md +13 -0
- package/assets/docs/skills/index.md +8 -8
- package/assets/public-package-versions.json +4 -4
- package/assets/skills/oat-docs-analyze/SKILL.md +2 -2
- package/assets/skills/oat-docs-analyze/references/legacy-scaffold-checks.md +4 -0
- package/assets/skills/oat-docs-bootstrap/SKILL.md +49 -62
- package/assets/templates/docs-app-fuma/AGENTS.md +50 -0
- package/assets/templates/docs-app-fuma/app/[[...slug]]/page.tsx +7 -3
- package/assets/templates/docs-app-fuma/app/llms/[...slug]/route.ts +15 -0
- package/assets/templates/docs-app-fuma/app/llms-full.txt/route.ts +7 -0
- package/assets/templates/docs-app-fuma/app/llms.txt/route.ts +7 -0
- package/assets/templates/docs-app-fuma/docs/contributing/docs-toolchain.md +48 -0
- package/assets/templates/docs-app-fuma/docs/contributing/index.md +13 -0
- package/assets/templates/docs-app-fuma/docs/contributing.md +77 -41
- package/assets/templates/docs-app-fuma/docs/getting-started.md +3 -33
- package/assets/templates/docs-app-fuma/docs/index.md +2 -2
- package/assets/templates/docs-app-fuma/lib/source.ts +5 -0
- package/assets/templates/docs-app-fuma/package.json.template +1 -1
- package/assets/templates/docs-app-fuma/source.config.ts +6 -1
- package/assets/templates/docs-app-mkdocs/AGENTS.md +46 -0
- package/assets/templates/docs-app-mkdocs/docs/contributing/docs-toolchain.md +44 -0
- package/assets/templates/docs-app-mkdocs/docs/contributing/index.md +13 -0
- package/assets/templates/docs-app-mkdocs/docs/contributing.md +105 -21
- package/assets/templates/docs-app-mkdocs/docs/getting-started.md +7 -25
- package/assets/templates/docs-app-mkdocs/docs/index.md +7 -2
- package/assets/templates/docs-app-mkdocs/mkdocs.yml +1 -0
- package/assets/templates/docs-app-mkdocs/package.json.template +2 -2
- package/dist/commands/config/index.d.ts.map +1 -1
- package/dist/commands/config/index.js +21 -3
- package/dist/commands/docs/index-generate/generator.d.ts +4 -34
- package/dist/commands/docs/index-generate/generator.d.ts.map +1 -1
- package/dist/commands/docs/index-generate/generator.js +51 -157
- package/dist/commands/docs/index-generate/index.d.ts +1 -1
- package/dist/commands/docs/index-generate/index.d.ts.map +1 -1
- package/dist/commands/docs/index-generate/index.js +26 -8
- package/dist/commands/docs/init/docs-commands.d.ts +1 -0
- package/dist/commands/docs/init/docs-commands.d.ts.map +1 -1
- package/dist/commands/docs/init/docs-commands.js +8 -3
- package/dist/commands/docs/init/index.d.ts.map +1 -1
- package/dist/commands/docs/init/index.js +21 -1
- package/dist/commands/docs/init/scaffold.d.ts.map +1 -1
- package/dist/commands/docs/init/scaffold.js +37 -16
- package/dist/commands/docs/nav/contents.d.ts +13 -3
- package/dist/commands/docs/nav/contents.d.ts.map +1 -1
- package/dist/commands/docs/nav/contents.js +85 -24
- package/dist/commands/docs/nav/fumadocs.d.ts +1 -0
- package/dist/commands/docs/nav/fumadocs.d.ts.map +1 -1
- package/dist/commands/docs/nav/fumadocs.js +56 -17
- package/dist/commands/docs/nav/sync.d.ts +2 -0
- package/dist/commands/docs/nav/sync.d.ts.map +1 -1
- package/dist/commands/docs/nav/sync.js +21 -1
- package/dist/commands/docs/shared/exclusions.d.ts +37 -0
- package/dist/commands/docs/shared/exclusions.d.ts.map +1 -0
- package/dist/commands/docs/shared/exclusions.js +161 -0
- package/dist/config/oat-config.d.ts +2 -0
- package/dist/config/oat-config.d.ts.map +1 -1
- package/dist/config/oat-config.js +6 -3
- package/dist/config/resolve.d.ts.map +1 -1
- package/dist/config/resolve.js +1 -0
- package/package.json +2 -2
- package/assets/skills/oat-docs-bootstrap/assets/AGENTS.md.template +0 -64
package/README.md
CHANGED
|
@@ -41,6 +41,12 @@ 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
|
+
|
|
44
50
|
## Update Notifications
|
|
45
51
|
|
|
46
52
|
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.
|
|
@@ -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, diagram syntax validation or screenshot testing. A successful build or Mermaid transform test does not prove diagram validity. Keep language labels on code fences and use `bash` for shell commands.
|
|
47
|
+
|
|
48
|
+
Mermaid is diagram source. 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
|
-
|
|
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,6 +81,7 @@ 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
|
|
|
52
87
|
## Authoring Expectations
|
|
@@ -70,16 +105,14 @@ Documentation should ship with the code it explains. This page covers the core d
|
|
|
70
105
|
|
|
71
106
|
```bash
|
|
72
107
|
pnpm -w run cli:source -- docs nav sync --target-dir apps/oat-docs
|
|
108
|
+
pnpm -w run cli:source -- docs nav sync --target-dir apps/oat-docs --check
|
|
109
|
+
pnpm docs:validate
|
|
73
110
|
```
|
|
74
111
|
|
|
75
112
|
- In MkDocs apps, the same `oat docs nav sync` command refreshes the `nav:` block in `mkdocs.yml` instead.
|
|
76
113
|
- Use [Markdown Features](markdown-features.md) for supported syntax and examples.
|
|
77
114
|
|
|
78
|
-
|
|
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.
|
|
115
|
+
Agent working rules: `../../AGENTS.md` (app-root source file).
|
|
83
116
|
|
|
84
117
|
## Related Guides
|
|
85
118
|
|
|
@@ -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
|
|
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
|
|
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,
|
|
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
|
-
- **
|
|
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
|
-
|
|
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
|
|
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
|
|
@@ -212,10 +213,18 @@ oat docs nav sync --target-dir apps/my-docs
|
|
|
212
213
|
|
|
213
214
|
Generated Fumadocs `meta.json` is strict: a page no `## Contents` map lists
|
|
214
215
|
stays out of the sidebar. The `prebuild` script that `oat docs init` scaffolds
|
|
215
|
-
for Fumadocs
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
216
|
+
for Fumadocs runs the read-only check before generation/build; fresh MkDocs
|
|
217
|
+
`docs:build` does too. Init explicitly seeds `documentation.navOwner: nav-sync`
|
|
218
|
+
and generates navigation after successful scaffold/config. External scripts select
|
|
219
|
+
`--target-dir .` from the app directory; source-workspace scripts select the
|
|
220
|
+
repo-relative app and quote paths with spaces. Existing apps are not rewritten:
|
|
221
|
+
bootstrap sends undeclared/hand-authored ownership through analyze/apply.
|
|
222
|
+
|
|
223
|
+
Use shared `documentation.nonReaderPaths` for drafts/page templates with the
|
|
224
|
+
[bounded glob grammar](commands.md#exclusion-patterns). Nav, nav checks and
|
|
225
|
+
manifests omit matches even when Contents links them; `documentation.excludes`
|
|
226
|
+
stays manifest-only. OAT's Fumadocs collections also omit their rendering. Pinned
|
|
227
|
+
MkDocs 1.4.2 still renders those routes; nav exclusion does not make content private.
|
|
219
228
|
|
|
220
229
|
**Fumadocs** apps also have an app-root docs index manifest, generated from
|
|
221
230
|
the Markdown file tree automatically via `predev`/`prebuild` hooks. You can
|
|
@@ -290,11 +299,11 @@ Important:
|
|
|
290
299
|
three kinds of documentation. In all three, each folder's `index.md` has a
|
|
291
300
|
`## Contents` list of its pages.
|
|
292
301
|
|
|
293
|
-
| Framework
|
|
294
|
-
|
|
|
295
|
-
| Plain Markdown
|
|
296
|
-
| Fumadocs
|
|
297
|
-
| MkDocs
|
|
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` |
|
|
298
307
|
|
|
299
308
|
When nothing chooses for it (a non-interactive run or `--yes`), `oat docs init`
|
|
300
309
|
uses Fumadocs. That is only a default; pick the smallest option your readers
|
|
@@ -305,8 +314,8 @@ need.
|
|
|
305
314
|
- If a Node/pnpm team wants a hosted site, choose Fumadocs. Its build hooks
|
|
306
315
|
regenerate the app-root `index.md` inventory but not the sidebar files, so run
|
|
307
316
|
`oat docs nav sync` after adding, moving, or renaming pages, commit the
|
|
308
|
-
`meta.json` files it writes
|
|
309
|
-
|
|
317
|
+
`meta.json` files it writes. Fresh scaffold builds already run the read-only
|
|
318
|
+
check; older apps can add it explicitly after choosing nav-sync ownership.
|
|
310
319
|
- If your team uses Python and MkDocs Material, choose MkDocs. Run
|
|
311
320
|
`oat docs nav sync --check` to see what would change before letting nav sync
|
|
312
321
|
rewrite `nav:`.
|
|
@@ -315,3 +324,5 @@ need.
|
|
|
315
324
|
existing MkDocs site with `oat init --setup` instead of `oat docs init`. When
|
|
316
325
|
moving an MkDocs site to Fumadocs, `oat docs migrate` converts MkDocs syntax
|
|
317
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.
|
|
@@ -31,7 +31,7 @@ or **MkDocs Material**.
|
|
|
31
31
|
Use the framework-specific generated-artifact command:
|
|
32
32
|
|
|
33
33
|
- Fumadocs apps run `fumadocs-mdx` and `oat docs generate-index`. In this repo, `predev` and `prebuild` regenerate `apps/oat-docs/index.md` from `apps/oat-docs/docs`. Run `oat docs nav sync` yourself after structural changes to rewrite the committed `meta.json` sidebar files from authored directory `index.md` `## Contents` sections; the hooks never write them. `prebuild` runs `oat docs nav sync --check`, so a build fails when those files are stale or a page is unlisted.
|
|
34
|
-
- MkDocs apps use `oat docs nav sync` to regenerate the `nav:` block in `mkdocs.yml` from authored directory `index.md` `## Contents` sections.
|
|
34
|
+
- MkDocs apps use `oat docs nav sync` to regenerate the `nav:` block in `mkdocs.yml` from authored directory `index.md` `## Contents` sections. Fresh scaffolds run its read-only `--check` in `docs:build`.
|
|
35
35
|
|
|
36
36
|
Markdown needs no generation command or site build; optional inventories require
|
|
37
37
|
explicit external output and retain the authored config index. Both frameworks keep authored `## Contents` sections as the source of local discovery. The generated artifact differs by framework.
|
|
@@ -40,7 +40,7 @@ explicit external output and retain the authored config index. Both frameworks k
|
|
|
40
40
|
|
|
41
41
|
Use `oat docs init` to bootstrap Markdown documentation or scaffold a framework app.
|
|
42
42
|
|
|
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
|
|
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 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
44
|
|
|
45
45
|
Key behavior:
|
|
46
46
|
|
|
@@ -50,6 +50,8 @@ Key behavior:
|
|
|
50
50
|
to `apps/<app-name>` for monorepos
|
|
51
51
|
- framework apps default to `<app-name>/` at repo root for single-package repos
|
|
52
52
|
- sets `documentation.tooling`, `documentation.root`, and `documentation.index` in `.oat/config.json`
|
|
53
|
+
- fresh Fumadocs/MkDocs creation explicitly seeds `documentation.navOwner: nav-sync` and generates navigation after successful scaffold/config, including an explicitly selected new app in a repo with prior docs config; the old app is not rewritten
|
|
54
|
+
- existing app directories are refused rather than regenerated; bootstrap routes existing framework surfaces through analyze/apply, and Markdown/dry runs never sync navigation
|
|
53
55
|
- for framework apps, when the repo root exposes a compatible Turbo `scripts.build`, patches it to exclude the new docs app from the default root build and adds a root-level `build:docs` script
|
|
54
56
|
- prints a unified diff before writing the root `package.json` change and returns a manual snippet when the patch is skipped because the build script is missing, non-Turbo, or ambiguous
|
|
55
57
|
|
|
@@ -90,12 +92,12 @@ Fumadocs scaffold:
|
|
|
90
92
|
|
|
91
93
|
- thin Next.js app importing from `@open-agent-toolkit/docs-config`, `@open-agent-toolkit/docs-theme`, `@open-agent-toolkit/docs-transforms`
|
|
92
94
|
- static export (`output: 'export'`) with FlexSearch, Mermaid diagrams, dark/light mode
|
|
93
|
-
- `predev`/`prebuild` hooks run `oat docs generate-index` automatically
|
|
95
|
+
- `predev`/`prebuild` hooks run `oat docs generate-index` automatically; `prebuild` first runs `oat docs nav sync --target-dir . --check` (source-workspace scripts explicitly select the repo-relative app)
|
|
94
96
|
- starter docs: `docs/index.md`, `docs/getting-started.md`, `docs/contributing.md`
|
|
95
97
|
|
|
96
98
|
MkDocs scaffold:
|
|
97
99
|
|
|
98
|
-
- MkDocs Material with OAT contributor contract (
|
|
100
|
+
- MkDocs Material with OAT contributor contract; `docs:build` first runs `oat docs nav sync --target-dir . --check` (source workspaces select the app explicitly)
|
|
99
101
|
- includes `docs/index.md`, `docs/contributing.md`, and the local tooling needed to run the app
|
|
100
102
|
|
|
101
103
|
Supported flags:
|
|
@@ -174,10 +176,10 @@ Key behavior:
|
|
|
174
176
|
- writes configuration only for the Fumadocs manifest transition — recording the manifest it just wrote inside `documentation.root` in `documentation.index`, when `documentation.tooling` is `fumadocs` or the config declares neither `tooling` nor `config`. Markdown and MkDocs configurations are never written, and `documentation.root` and `documentation.config` are never modified
|
|
175
177
|
- prepends an `AUTOGENERATED` warning comment to the output and rewrites the file on every run; do not hand-edit the generated `index.md`
|
|
176
178
|
- should be freshness-checked against authored `docs/**/index.md` `## Contents` maps before treating it as navigation evidence
|
|
177
|
-
-
|
|
178
|
-
- reports the derived docs directory in human output and as `docsDir` / `docsDirSource` under `--json`, alongside `excludes` — the effective exclusion list, `documentation.excludes`
|
|
179
|
+
- ordering: authored local Contents orders surviving direct entries in the hierarchical inventory; cross-directory links order the containing entry without duplicates. Child directory titles use index frontmatter, then H1, then slug. Remaining entries use index/directories/files/lexical fallback and are flagged `[unlisted in Contents]` when Contents exists. Missing Contents keeps fallback; malformed present Contents is an error
|
|
180
|
+
- reports the derived docs directory in human output and as `docsDir` / `docsDirSource` under `--json`, alongside `excludes` — the effective exclusion list, `documentation.excludes`, applicable `documentation.nonReaderPaths`, then the `--exclude` flags, exactly as handed to the generator
|
|
179
181
|
- says where to look when a manifest is empty rather than reporting a bare `0 entries`: which exclusion patterns were active, or that the docs directory held no indexable pages. The wording is observational — the command reports indexed entries, not pattern matches, so it names the exclusions without asserting they are the cause. An empty manifest is a report, not a failure — the file is still written, so a stale index is never left behind, and the command still exits `0`
|
|
180
|
-
- omits pages matching the exclusion list. Nothing is excluded by default; once listed, non-page Markdown such as `CLAUDE.md` or `AGENTS.md` stops reaching the manifest.
|
|
182
|
+
- omits pages matching the exclusion list. Nothing is excluded by default; once listed, non-page Markdown such as `CLAUDE.md` or `AGENTS.md` stops reaching the manifest. Manifest-only patterns come from `documentation.excludes` in `.oat/config.json` and from repeated `--exclude` flags; matching-root `documentation.nonReaderPaths` also applies, and the flags **extend** the configured list rather than replacing it. A directory left empty by exclusion emits no heading, and an empty list produces byte-identical output to no exclusions at all
|
|
181
183
|
|
|
182
184
|
Supported flags:
|
|
183
185
|
|
|
@@ -227,7 +229,7 @@ script hooks.
|
|
|
227
229
|
Use nav sync after adding, removing, renaming, or reordering docs pages.
|
|
228
230
|
|
|
229
231
|
The command reads only the reserved `## Contents` section from each directory
|
|
230
|
-
`index.md`. It detects the framework from the app directory:
|
|
232
|
+
`index.md`. Starting in 0.3.26, the shared parser reports malformed Contents in both nav sync and manifest generation. Dash links preserve authored order; `### <Label>` groups become Fumadocs separators or MkDocs nested lists. Empty authored groups and `*`/`+` link bullets report file/line errors: add a dash link/remove the heading, or change the bullet to `-`. See the [shared grammar](../reference/docs-index-contract.md#-contents-format). It detects the framework from the app directory:
|
|
231
233
|
|
|
232
234
|
Plain Markdown needs file/link checks and authored Contents maintenance, without
|
|
233
235
|
site nav generation. Framework apps generate navigation as follows:
|
|
@@ -245,8 +247,9 @@ site nav generation. Framework apps generate navigation as follows:
|
|
|
245
247
|
Use `--check` in builds and CI. It computes the same navigation, writes
|
|
246
248
|
nothing, and exits 1 when any generated file would change or, for Fumadocs,
|
|
247
249
|
any page or folder is unlisted, naming each one (`stale` and `unlisted` in
|
|
248
|
-
`--json`). This repository's `apps/oat-docs` `prebuild` runs it, so
|
|
249
|
-
|
|
250
|
+
`--json`). Fresh Fumadocs `prebuild` and MkDocs `docs:build` scripts run it with explicit app selection, preserving external `oat` versus source-workspace CLI commands and quoting paths with spaces. This repository's `apps/oat-docs` `prebuild` also runs it, so `pnpm build:docs` fails on stale navigation.
|
|
251
|
+
|
|
252
|
+
Shared `documentation.nonReaderPaths` uses the exclusion grammar above, relative to the configured content root. Navigation inventory, explicit Contents links, `--check` and manifests omit matches; excluded metadata is never cleaned or rewritten. An unrelated explicit target does not inherit the setting. `documentation.excludes` stays manifest-only. OAT Fumadocs source collections omit non-readers from rendering too; pinned MkDocs 1.4.2 omits them from nav/manifest but still renders their routes (no rendering-exclusion support).
|
|
250
253
|
|
|
251
254
|
Fumadocs apps also regenerate the root markdown manifest with
|
|
252
255
|
`oat docs generate-index`; the two commands write different artifacts.
|
|
@@ -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),
|
|
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
|
|
100
|
-
build
|
|
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
|
|
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
|
|
300
|
-
|
|
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
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
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
|
|
@@ -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
|
|
980
|
-
|
|
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
|
|
@@ -233,7 +233,7 @@ Notable commands introduced in the current CLI surface:
|
|
|
233
233
|
- `--local` — write to or remove from `.oat/config.local.json` (per-developer repo state, gitignored)
|
|
234
234
|
- `--user` — write to or remove from `~/.oat/config.json` (user-level fallback, applies across all repos)
|
|
235
235
|
|
|
236
|
-
When no flag is passed, the CLI picks a sensible default per key type: structural keys (`projects.root`, `documentation.*`, etc.) go to shared, state keys (`activeProject`, etc.) go to local, workflow preferences (`workflow.*`) go to local. Pass at most one flag — the command rejects multiple surface flags. `documentation.guidance` is shared by default and also accepts `--user`; use a path/URL string or a JSON string array, not a comma-separated list. `documentation.ia` accepts the [recorded IA JSON shape](configuration.md#shared-repo-config-you-will-touch-most-often) and `documentation.navOwner` accepts `nav-sync` or `hand-authored`; both are shared-only. Unset owner means undeclared, and Markdown ignores it. IA is an atomic value in get/dump, not a set of separately configurable child keys.
|
|
236
|
+
When no flag is passed, the CLI picks a sensible default per key type: structural keys (`projects.root`, `documentation.*`, etc.) go to shared, state keys (`activeProject`, etc.) go to local, workflow preferences (`workflow.*`) go to local. Pass at most one flag — the command rejects multiple surface flags. `documentation.guidance` is shared by default and also accepts `--user`; use a path/URL string or a JSON string array, not a comma-separated list. `documentation.ia` accepts the [recorded IA JSON shape](configuration.md#shared-repo-config-you-will-touch-most-often) and `documentation.navOwner` accepts `nav-sync` or `hand-authored`; both are shared-only. Unset owner means undeclared, and Markdown ignores it. IA is an atomic value in get/dump, not a set of separately configurable child keys. `documentation.nonReaderPaths` is also shared-only and uses a comma-separated glob list on `set`, stored as an array; empty clears it. It omits matching reader paths from nav/check/manifest and supported Fumadocs collections, while `documentation.excludes` remains manifest-only. See [non-reader configuration](configuration.md#shared-repo-config-you-will-touch-most-often).
|
|
237
237
|
|
|
238
238
|
Per-key restrictions apply identically to `set` and `unset`: structural keys can only be written at shared scope, most state keys can only be written at local scope (`activeIdea` is the exception — it accepts both local and user), and workflow preference keys accept any non-auto surface. Legacy `autoReviewAtCheckpoints` remains shared-only; prefer `workflow.autoReviewAtHillCheckpoints`.
|
|
239
239
|
|
|
@@ -95,8 +95,9 @@ Common keys in `.oat/config.json`:
|
|
|
95
95
|
- `git.defaultBranch` — base branch fallback for PR workflows
|
|
96
96
|
- `documentation.root`, `documentation.tooling`, `documentation.config` — docs-surface ownership. With tooling `markdown`, root is the literal content directory (including nested `docs`) and `documentation.index` is authored `<root>/index.md`; Markdown adds no framework config. Framework roots retain app/source semantics. Use `oat docs init --framework markdown` or explicit `--adopt` for setup; optional manifests need external output and never change the authored index. See [Documentation path resolution](oat-directory-structure.md#documentation-path-resolution)
|
|
97
97
|
- `documentation.ia` — shared repository-only mirror of the accepted authored IA. Set JSON with required `preset` and repo-relative `decision`, optional `tracks: [{path, principle}]`, and optional `verification: "triad" | "agent-only" | "none"`. The decision record plus Information architecture section in framework docs-app `AGENTS.md` or Markdown contributing page remain authoritative. Use `oat config set documentation.ia '{"preset":"Flat Small","decision":".oat/repo/reference/decisions/DR-example.md","verification":"none"}'`; unset removes the mirror only. Invalid shapes/paths are rejected; neither `--user` nor `--local` is supported.
|
|
98
|
-
- `documentation.navOwner` — shared `nav-sync | hand-authored`, independent of recorded IA, for Fumadocs/MkDocs only. Set with `oat config set documentation.navOwner hand-authored`. Absent is undeclared (`get --json` reports null/default), never implied nav-sync; analyze asks the operator and no automatic regeneration is authorized. Markdown ignores this field.
|
|
98
|
+
- `documentation.navOwner` — shared `nav-sync | hand-authored`, independent of recorded IA, for Fumadocs/MkDocs only. Set with `oat config set documentation.navOwner hand-authored`. Absent is undeclared (`get --json` reports null/default), never implied nav-sync; analyze asks the operator and no automatic regeneration is authorized. Markdown ignores this field. Fresh Fumadocs/MkDocs init explicitly seeds nav-sync and generates navigation after scaffold/config succeeds. Existing apps are not regenerated through bootstrap; explicit nav-sync commands retain their behavior.
|
|
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
|
+
- `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.
|
|
100
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
|
|
101
102
|
- `documentation.requireForProjectCompletion` — whether docs sync is a completion gate
|
|
102
103
|
- `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
|
|
@@ -15,23 +15,28 @@ OAT docs navigation starts from authored `docs/**/index.md` files. Each `## Cont
|
|
|
15
15
|
- The `## Contents` section is the machine-readable local map for sibling pages and child directories.
|
|
16
16
|
- Every `## Contents` link should use a `.md`-suffixed relative target, including child directory links such as `subdir/index.md`.
|
|
17
17
|
- Do not hand-edit generated navigation or generated root-index artifacts.
|
|
18
|
-
- For Fumadocs, refresh or freshness-check the generated app-root manifest after adding, removing, or renaming Markdown files. Compare that manifest against authored `## Contents` maps for drift;
|
|
18
|
+
- For Fumadocs, refresh or freshness-check the generated app-root manifest after adding, removing, or renaming Markdown files. Compare that manifest against authored `## Contents` maps for drift; the manifest follows each local Contents order, with deterministic unlisted fallback entries.
|
|
19
19
|
- Run `oat docs nav sync` after adding, removing, renaming, or reordering pages. It regenerates the framework's navigation from authored `## Contents` maps and preserves the order declared in each local map: the `nav:` block in `mkdocs.yml` for MkDocs, and one `meta.json` per docs directory for Fumadocs.
|
|
20
20
|
|
|
21
21
|
## `## Contents` format
|
|
22
22
|
|
|
23
|
-
Use Markdown
|
|
23
|
+
Use dash-prefixed Markdown links for sibling pages and child directories. Optional third-level headings start ordered groups:
|
|
24
24
|
|
|
25
25
|
```md
|
|
26
26
|
## Contents
|
|
27
27
|
|
|
28
28
|
- [Getting Started](getting-started.md) - Setup and local workflow.
|
|
29
|
+
|
|
30
|
+
### Reference
|
|
31
|
+
|
|
29
32
|
- [Reference](reference/index.md) - Reference pages for the subsystem.
|
|
30
33
|
```
|
|
31
34
|
|
|
32
35
|
Notes:
|
|
33
36
|
|
|
34
37
|
- Links after `## Contents` can include short human-readable descriptions.
|
|
38
|
+
- Groups start at `### <Label>` and end at the next group or the next second-level heading. Links before the first group remain ungrouped. Fumadocs emits `---Label---` before the first retained entry; MkDocs emits a labeled nested list. Filtering a self-index or non-reader link never leaves an empty separator.
|
|
39
|
+
- A group with no authored entries is an error with its file and line; add a dash link or remove the empty heading. A `*` or `+` link bullet is also an error with file and line; replace it with `-`.
|
|
35
40
|
- Child directories should link to their `index.md`.
|
|
36
41
|
- Leaf pages should link to their `.md` filename.
|
|
37
42
|
- Prose outside `## Contents` is ignored by nav generation and remains freeform; it can explain scope, reader paths, or migration status.
|
|
@@ -65,8 +70,8 @@ pnpm -w run cli:source -- docs generate-index --docs-dir apps/oat-docs/docs --ou
|
|
|
65
70
|
|
|
66
71
|
Fumadocs generated behavior:
|
|
67
72
|
|
|
68
|
-
-
|
|
69
|
-
-
|
|
73
|
+
- The inventory stays hierarchical. Each local Contents orders its surviving direct entries; a cross-directory link orders its containing direct entry without duplicating the page. Child directory titles come from their index frontmatter title, then H1, then slug, independently of nav labels.
|
|
74
|
+
- Remaining entries use deterministic index/directories/files/lexical fallback and carry `[unlisted in Contents]` when a Contents map exists. With no Contents map the inventory keeps its fallback order; malformed present Contents reports the shared grammar errors.
|
|
70
75
|
- Generated manifests should carry an autogen warning and are rewritten by `predev` / `prebuild`.
|
|
71
76
|
|
|
72
77
|
## Fumadocs Nav Sync
|
|
@@ -75,7 +80,7 @@ In a Fumadocs app (detected by its `source.config.ts`), `oat docs nav sync --tar
|
|
|
75
80
|
|
|
76
81
|
Fumadocs generated behavior:
|
|
77
82
|
|
|
78
|
-
- `pages` follows the order of the directory's `## Contents` links. The root list starts with `index`; a child directory appears by its folder name, and its own `index.md` becomes that folder's landing page. A folder whose `meta.json` keeps `root: true` also lists `index` first, because Fumadocs gives a root folder no implicit landing page.
|
|
83
|
+
- `pages` follows the order of the directory's `## Contents` links. The root list starts with `index`; a child directory appears by its folder name, and its own `index.md` becomes that folder's landing page. A folder whose `meta.json` keeps `root: true` or a nonempty trimmed string also lists `index` first, because Fumadocs gives a root folder no implicit landing page. OAT source config narrowly adapts the pinned metadata schema to accept these named roots.
|
|
79
84
|
- Navigation is strict: there is no `"..."` rest entry. A page or folder that no `## Contents` map lists stays out of the sidebar, and the command reports it by path in its human output and in `--json` (`unlisted`). Add the page to its directory's `## Contents` map to show it.
|
|
80
85
|
- A `## Contents` link to a page in another directory is written as a Fumadocs link entry such as `[Writing Skills](/contributing/skills)`, so each page belongs to exactly one folder.
|
|
81
86
|
- A page or folder whose name Fumadocs would read as a `pages` directive, such as `!hidden`, `z...a`, `...name`, or `---`, is written in the local-path form `./!hidden` so it stays a page entry.
|
|
@@ -94,9 +99,17 @@ MkDocs generated behavior:
|
|
|
94
99
|
|
|
95
100
|
- Root `docs/index.md` becomes `Home`.
|
|
96
101
|
- Child directory `index.md` files become section landing pages.
|
|
97
|
-
- Nested entries are emitted in the order they appear under each local `## Contents` block.
|
|
102
|
+
- Nested entries are emitted in the order they appear under each local `## Contents` block, including labeled groups.
|
|
98
103
|
- `mkdocs.yml` may contain other configuration, but its `nav:` block is derived from authored `## Contents`.
|
|
99
104
|
|
|
105
|
+
## Non-reader paths and ownership
|
|
106
|
+
|
|
107
|
+
Shared `documentation.nonReaderPaths` declares drafts/templates outside the reader tree using the [bounded exclusion grammar](../docs-tooling/commands.md#exclusion-patterns), relative to the content root. It applies only to the configured app/content root. Navigation inventory, explicit Contents links, read-only nav checks and manifests skip matches; an explicit link does not override an exclusion. Excluded subtrees are not read, rewritten or cleaned by nav sync. A missing reader entry remains an error in Fumadocs `--check`. Existing `documentation.excludes` affects manifests only.
|
|
108
|
+
|
|
109
|
+
Fumadocs collections also omit matching pages and metadata when `defineDocs` uses OAT's `docs` and `meta` source options with an explicit repository config path. The pinned MkDocs 1.4.2 has no configurable rendering exclusion: these pages leave navigation and manifests but still render as routes. This setting is not a way to keep private content out of a MkDocs site.
|
|
110
|
+
|
|
111
|
+
Fresh Fumadocs/MkDocs init explicitly writes `documentation.navOwner: nav-sync` and generates navigation after scaffold/config succeeds. Their generated `prebuild` / `docs:build` scripts run `nav sync --check`. Existing hand-authored or undeclared surfaces are preserved through bootstrap and use analyze/apply to choose ownership; absence never implies permission to regenerate. Markdown has no sidebar or nav sync.
|
|
112
|
+
|
|
100
113
|
## Generated-file boundaries
|
|
101
114
|
|
|
102
115
|
- Edit authored files under the resolved content root (`docs/` inside framework apps, or the literal configured Markdown root), especially the nearest `index.md` and `## Contents`.
|
|
@@ -124,6 +124,7 @@ Current schema keys:
|
|
|
124
124
|
| `documentation.tooling` | `string` | - | Documentation tooling identifier (`markdown`, `mkdocs`, or `fumadocs`); parsing remains permissive |
|
|
125
125
|
| `documentation.config` | `string` | - | Path to the documentation framework config file (e.g., `mkdocs.yml`, `next.config.js`) |
|
|
126
126
|
| `documentation.index` | `string` | - | Path to the docs surface entry point: authored `<root>/index.md` for Markdown, the generated app-root manifest `<root>/index.md` for Fumadocs, `mkdocs.yml` for MkDocs. Set by `oat docs init`. `oat docs generate-index` writes it only for the Fumadocs manifest transition and never for Markdown or MkDocs. |
|
|
127
|
+
| `documentation.nonReaderPaths` | `string[]` | - | Shared-only content-root-relative bounded globs omitted from nav inventory/Contents/check/manifest and, with OAT source config, Fumadocs rendering. MkDocs 1.4.2 still renders routes. See [Non-reader paths](#non-reader-paths). |
|
|
127
128
|
| `documentation.excludes` | `string[]` | - | Globs, relative to the docs directory, that `oat docs generate-index` leaves out of the generated index. See [Excluding pages from the generated index](#excluding-pages-from-the-generated-index). |
|
|
128
129
|
| `documentation.requireForProjectCompletion` | `boolean` | `false` | When `true`, OAT project completion gates require documentation to be updated |
|
|
129
130
|
| `git.defaultBranch` | `string` | `"main"` | Default branch for PR creation. Auto-detected during `oat init` via `gh repo view` or `origin/HEAD`. Used by `oat-project-pr-final` and `oat-project-pr-progress`. |
|
|
@@ -195,6 +196,18 @@ A legacy source root with no `docs` child resolves `--docs-dir` and `--output` t
|
|
|
195
196
|
|
|
196
197
|
**Configuration writes.** The only configuration write generation performs is the Fumadocs manifest transition: when the written manifest lies inside `documentation.root` and `documentation.tooling` is `fumadocs`, the repo-relative output path is recorded in `documentation.index`. A config that declares neither `documentation.tooling` nor `documentation.config` is treated as the same Fumadocs-shaped case. Any other declared tooling — `markdown` and `mkdocs` included — is never written, and neither are `documentation.root` and `documentation.config`. The value is always repo-relative: when `documentation.root` points outside the repository, the manifest is still generated but the key is left untouched rather than recording a machine-specific path.
|
|
197
198
|
|
|
199
|
+
### Non-reader paths
|
|
200
|
+
|
|
201
|
+
`documentation.nonReaderPaths` declares drafts/templates outside the reader tree. It uses the bounded grammar below, relative to the configured content root (literal Markdown root or framework app's `docs/`). Nav inventory, explicit Contents targets, read-only nav checks and generated manifests skip matches; excluded subtrees and their metadata are never rewritten or cleaned. The setting applies only to the matching configured app/content root, not an unrelated explicit target. Fumadocs rendering uses the same exclusions through OAT source config's collection options. Pinned MkDocs 1.4.2 cannot exclude rendering: nav/manifest omission leaves routes in the build.
|
|
202
|
+
|
|
203
|
+
```bash
|
|
204
|
+
oat config set documentation.nonReaderPaths 'templates/,drafts/**'
|
|
205
|
+
oat config set documentation.nonReaderPaths ''
|
|
206
|
+
oat config unset documentation.nonReaderPaths
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
This is shared repository config only; `--local` and `--user` are rejected. Entries are trimmed and de-duplicated, with malformed values rejected and repairable through `set`. `documentation.excludes` remains manifest-only.
|
|
210
|
+
|
|
198
211
|
### Excluding pages from the generated index
|
|
199
212
|
|
|
200
213
|
`documentation.excludes` and the repeatable `--exclude <glob>` flag feed one matcher. Flags **extend** the configured list rather than replacing it, so a one-off exclusion cannot silently republish pages the repository deliberately excluded. A directory left empty by exclusion emits no heading, and an empty list produces byte-identical output to no exclusions at all.
|
|
@@ -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
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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, `oat docs init`
|
|
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 `oat docs init` scaffolding, build verification, post-scaffold config inspection, and an educational walkthrough. Supports plain Markdown (file-level path), Fumadocs (full path), and MkDocs (lean path with defined minimum contract). | user: true; model disabled: true | Optional |
|
|
278
278
|
|
|
279
279
|
### Explainer Kit
|
|
280
280
|
|