@open-agent-toolkit/cli 0.3.27 → 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 (84) hide show
  1. package/README.md +6 -0
  2. package/assets/bundle-metadata.json +1 -1
  3. package/assets/docs/contributing/documentation.md +11 -2
  4. package/assets/docs/docs-tooling/add-docs-to-a-repo.md +10 -0
  5. package/assets/docs/docs-tooling/check.md +154 -0
  6. package/assets/docs/docs-tooling/commands.md +14 -9
  7. package/assets/docs/docs-tooling/index.md +1 -0
  8. package/assets/docs/docs-tooling/meta.json +7 -1
  9. package/assets/docs/docs-tooling/workflows.md +4 -0
  10. package/assets/docs/reference/cli-reference.md +2 -0
  11. package/assets/docs/reference/configuration.md +1 -0
  12. package/assets/public-package-versions.json +4 -4
  13. package/assets/skills/oat-docs-analyze/SKILL.md +13 -2
  14. package/assets/skills/oat-docs-authoring/SKILL.md +1 -1
  15. package/assets/skills/oat-docs-authoring/references/validation.md +4 -0
  16. package/assets/skills/oat-docs-bootstrap/SKILL.md +54 -3
  17. package/assets/skills/oat-docs-bootstrap/references/pr-ci.md +89 -0
  18. package/assets/templates/docs-app-fuma/AGENTS.md +9 -2
  19. package/assets/templates/docs-app-fuma/docs/contributing/docs-toolchain.md +40 -3
  20. package/assets/templates/docs-app-fuma/docs/contributing.md +7 -1
  21. package/assets/templates/docs-app-fuma/docs/index.md +1 -1
  22. package/assets/templates/docs-app-fuma/gitignore.template +12 -0
  23. package/assets/templates/docs-app-fuma/package.json.template +2 -1
  24. package/assets/templates/docs-app-fuma/pnpm-workspace.yaml +5 -0
  25. package/assets/templates/docs-app-mkdocs/AGENTS.md +4 -2
  26. package/assets/templates/docs-app-mkdocs/docs/contributing/docs-toolchain.md +4 -2
  27. package/assets/templates/docs-app-mkdocs/docs/contributing.md +7 -1
  28. package/assets/templates/docs-app-mkdocs/docs/index.md +1 -1
  29. package/assets/templates/docs-app-mkdocs/gitignore.template +8 -0
  30. package/assets/templates/docs-app-mkdocs/package.json.template +3 -2
  31. package/dist/commands/config/index.d.ts.map +1 -1
  32. package/dist/commands/config/index.js +35 -3
  33. package/dist/commands/docs/check/check.d.ts +3 -0
  34. package/dist/commands/docs/check/check.d.ts.map +1 -0
  35. package/dist/commands/docs/check/check.js +48 -0
  36. package/dist/commands/docs/check/check.types.d.ts +17 -0
  37. package/dist/commands/docs/check/check.types.d.ts.map +1 -0
  38. package/dist/commands/docs/check/check.types.js +1 -0
  39. package/dist/commands/docs/check/checker.d.ts +8 -0
  40. package/dist/commands/docs/check/checker.d.ts.map +1 -0
  41. package/dist/commands/docs/check/checker.js +82 -0
  42. package/dist/commands/docs/check/commands.d.ts +5 -0
  43. package/dist/commands/docs/check/commands.d.ts.map +1 -0
  44. package/dist/commands/docs/check/commands.js +232 -0
  45. package/dist/commands/docs/check/diagrams.d.ts +5 -0
  46. package/dist/commands/docs/check/diagrams.d.ts.map +1 -0
  47. package/dist/commands/docs/check/diagrams.js +197 -0
  48. package/dist/commands/docs/check/files.d.ts +21 -0
  49. package/dist/commands/docs/check/files.d.ts.map +1 -0
  50. package/dist/commands/docs/check/files.js +121 -0
  51. package/dist/commands/docs/check/markdown.d.ts +60 -0
  52. package/dist/commands/docs/check/markdown.d.ts.map +1 -0
  53. package/dist/commands/docs/check/markdown.js +125 -0
  54. package/dist/commands/docs/check/mermaid-runtime.d.ts +3 -0
  55. package/dist/commands/docs/check/mermaid-runtime.d.ts.map +1 -0
  56. package/dist/commands/docs/check/mermaid-runtime.js +57 -0
  57. package/dist/commands/docs/check/navigation.d.ts +4 -0
  58. package/dist/commands/docs/check/navigation.d.ts.map +1 -0
  59. package/dist/commands/docs/check/navigation.js +104 -0
  60. package/dist/commands/docs/check/reader-rules.d.ts +6 -0
  61. package/dist/commands/docs/check/reader-rules.d.ts.map +1 -0
  62. package/dist/commands/docs/check/reader-rules.js +214 -0
  63. package/dist/commands/docs/index.d.ts.map +1 -1
  64. package/dist/commands/docs/index.js +2 -0
  65. package/dist/commands/docs/init/index.d.ts +1 -0
  66. package/dist/commands/docs/init/index.d.ts.map +1 -1
  67. package/dist/commands/docs/init/index.js +8 -0
  68. package/dist/commands/docs/init/scaffold.d.ts +1 -0
  69. package/dist/commands/docs/init/scaffold.d.ts.map +1 -1
  70. package/dist/commands/docs/init/scaffold.js +37 -3
  71. package/dist/commands/docs/nav/contents.d.ts +4 -0
  72. package/dist/commands/docs/nav/contents.d.ts.map +1 -1
  73. package/dist/commands/docs/nav/contents.js +10 -0
  74. package/dist/config/documentation-check.d.ts +38 -0
  75. package/dist/config/documentation-check.d.ts.map +1 -0
  76. package/dist/config/documentation-check.js +132 -0
  77. package/dist/config/oat-config.d.ts +2 -0
  78. package/dist/config/oat-config.d.ts.map +1 -1
  79. package/dist/config/oat-config.js +4 -0
  80. package/dist/config/resolve.d.ts.map +1 -1
  81. package/dist/config/resolve.js +1 -0
  82. package/dist/release/public-package-contract.d.ts.map +1 -1
  83. package/dist/release/public-package-contract.js +3 -0
  84. package/package.json +11 -2
package/README.md CHANGED
@@ -47,6 +47,12 @@ Additional useful entry points:
47
47
 
48
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
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
+
50
56
  ## Update Notifications
51
57
 
52
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.27"
3
+ "oatVersion": "0.3.28"
4
4
  }
@@ -43,9 +43,9 @@ To add a page, choose its scope from the nearest map, add title/description fron
43
43
 
44
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
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.
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
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).
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
49
 
50
50
  ## Local workflow
51
51
 
@@ -84,6 +84,15 @@ All commands below run from the **repository root**. Contributor setup is in [Co
84
84
  pnpm --filter oat-docs docs:format:check
85
85
  ```
86
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
+
87
96
  ## Authoring Expectations
88
97
 
89
98
  - Keep docs aligned with the current repo behavior and current command surface.
@@ -326,3 +326,13 @@ need.
326
326
  and frontmatter; it only previews changes until you pass `--apply`.
327
327
 
328
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
 
@@ -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
  }
@@ -523,3 +523,7 @@ routes and package scripts remain manual required changes.
523
523
  - [Improve Agent Instructions](agent-instructions.md)
524
524
  - [`../reference/docs-index-contract.md`](../reference/docs-index-contract.md)
525
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).
@@ -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`
@@ -1,6 +1,6 @@
1
1
  {
2
- "cli": "0.3.27",
3
- "docs-config": "0.3.27",
4
- "docs-theme": "0.3.27",
5
- "docs-transforms": "0.3.27"
2
+ "cli": "0.3.28",
3
+ "docs-config": "0.3.28",
4
+ "docs-theme": "0.3.28",
5
+ "docs-transforms": "0.3.28"
6
6
  }
@@ -4,9 +4,9 @@ description: Run when you need to evaluate documentation structure, navigation,
4
4
  argument-hint: '[target] [--ia] [--ia-guidance <path|url>]'
5
5
  disable-model-invocation: true
6
6
  user-invocable: true
7
- allowed-tools: Read, Write, Bash(git:*), Bash(oat config:*), Bash(oat docs nav sync --check:*), Bash(pnpm:*), Bash(bash:*), Bash(jq:*), Bash(node:*), Bash(mkdir:*), Bash(date:*), Bash(echo:*), Bash(cd:*), Bash(pwd:*), Glob, Grep, AskUserQuestion, Task
7
+ allowed-tools: Read, Write, Bash(git:*), Bash(oat config:*), Bash(oat docs nav sync --check:*), Bash(oat docs check:*), Bash(pnpm:*), Bash(bash:*), Bash(jq:*), Bash(node:*), Bash(mkdir:*), Bash(date:*), Bash(echo:*), Bash(cd:*), Bash(pwd:*), Glob, Grep, AskUserQuestion, Task
8
8
  metadata:
9
- version: '1.7.2'
9
+ version: '1.7.3'
10
10
  ---
11
11
 
12
12
  # Docs Analysis
@@ -457,6 +457,17 @@ where the docs should live, and what specific subtopics the codebase shows shoul
457
457
 
458
458
  ### Step 6: Check Navigation and Drift
459
459
 
460
+ Probe the installed `oat docs check --help`, then run its read-only
461
+ `oat docs check --target-dir <resolved-root> --json` (or the repo’s documented
462
+ source/local CLI equivalent). Retain exact findings and exit; errors fail while
463
+ warning-only passes. Use stable rule IDs/locations as evidence for recommendations,
464
+ including reader limits, contributor commands, Mermaid/SVG and provenance. It
465
+ executes no page code or documented commands and needs no build. Missing capability
466
+ or unusable Git diagram base is explicitly unverified. Preserve specialized local
467
+ validators; portable success does not establish coverage or claim accuracy. Review
468
+ narrow reason-bearing exceptions from actual config, never invent blanket
469
+ suppressions or automatic navigation ownership.
470
+
460
471
  If a generated root index or manifest exists:
461
472
 
462
473
  1. Compare generated entries with the authored `## Contents` graph.
@@ -6,7 +6,7 @@ disable-model-invocation: false
6
6
  allowed-tools: Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion
7
7
  user-invocable: true
8
8
  metadata:
9
- version: '1.2.0'
9
+ version: '1.2.1'
10
10
  ---
11
11
 
12
12
  # OAT Docs Authoring
@@ -45,6 +45,10 @@ When navigation, file placement, or `## Contents` changes:
45
45
  If generated output is ignored, absent by policy, or cannot be produced in the
46
46
  current environment, record the exact reason in the handoff.
47
47
 
48
+ ## Portable checker
49
+
50
+ Run the installed `oat docs check --target-dir <resolved-root> --json` when available, or the repository’s documented source/local CLI equivalent. It is read-only and needs no site build. Keep findings and exit: errors fail, warning-only passes. Review warnings, repair authored metadata/maps/links and explicitly sync owned navigation; never add blanket exclusions to pass. Missing CLI capability is unverified, not a successful check. Preserve existing app-specific validators. See the installed checker command docs for stable rule IDs and narrow reason-bearing `documentation.check` exceptions.
51
+
48
52
  ## Local Contract Checks
49
53
 
50
54
  Before finishing:
@@ -6,7 +6,7 @@ disable-model-invocation: true
6
6
  user-invocable: true
7
7
  allowed-tools: Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion
8
8
  metadata:
9
- version: '1.4.3'
9
+ version: '1.4.4'
10
10
  ---
11
11
 
12
12
  # Docs Bootstrap
@@ -40,6 +40,8 @@ Bootstrap or adopt documentation in this repo and guide the user through underst
40
40
  - Inspecting native scaffold capabilities and reporting missing current-template guidance without rewriting it
41
41
  - Running install + build and classifying failures against known patterns
42
42
  - Reading `.oat/config.json` back to verify paths and prompting for `requireForProjectCompletion`
43
+ - Presenting concrete PR CI edits from `references/pr-ci.md`, writing only the approved diff while preserving existing workflows
44
+ - Presenting the exact effective-install-root compatibility policy below and writing only that approved root-policy edit while preserving existing settings/conflicts
43
45
  - Narrating the scaffolded output as a chunked educational walkthrough
44
46
  - Delegating optional initial content population to `oat-docs-analyze` + `oat-docs-apply`
45
47
 
@@ -119,7 +121,7 @@ The detailed framework procedures below apply to Fumadocs/MkDocs. When the selec
119
121
  Before Markdown CLI invocation, run **Step 2.5** for fresh setup and explicitly selected adoption; it is not bypassed by this condensed path.
120
122
 
121
123
  3. **Invoke CLI:** Probe `$CLI_CMD docs init --help` and require advertised Markdown/`--adopt` support before invocation; if missing, report the needed CLI update rather than fabricating scaffold files. Run `$CLI_CMD docs init --framework markdown --target-dir <root> --site-name <title> --description <description> --lint none --format none --yes`, adding `--adopt` only for explicit adoption. Pass the selected lint/format values when using existing tools. Never pass app-only flags. An optional `--dry-run` previews file/config/guidance changes without writes; it does not count as a completed bootstrap. Capture terminal/JSON results, exact exit, created/preserved files, config changes, guidance action, and audit advice. `partial`/exit 1 with manual-required or blocked guidance means unresolved guidance; real runs may have created files, whereas dry-runs have only planned files. Report actual state and stop before claiming completion. Other refusals also stop without template repairs. For success, read config back to resolve the actual content root and authored index.
122
- 4. **Verify files:** Print `[4/7] Verifying files…`. Check config root/index, baseline file existence, nonempty `title`/`description`, useful audience/scope context and populated `## Contents` links resolving to actual sibling pages or child `index.md`s. Honor excludes and asset-only exceptions; preserve local AGENTS instructions. Fresh setup creates only authored `index.md` and `contributing.md` in the target; verify no docs-root AGENTS, app package, framework config, dependencies, or root build changes. Run already documented lint/link/format checks when applicable; otherwise inspect files/links directly. Adoption preserves existing bytes and may leave missing child indexes, metadata, context, or links: record these as audit gaps for analyze/apply rather than repairing them or calling the tree fully conformant. Distinguish successful setup verification from content-conformance findings.
124
+ 4. **Verify files:** Print `[4/7] Verifying files…`. Check config root/index, baseline file existence, nonempty `title`/`description`, useful audience/scope context and populated `## Contents` links resolving to actual sibling pages or child `index.md`s. Honor excludes and asset-only exceptions; preserve local AGENTS instructions. Fresh setup creates only authored `index.md` and `contributing.md` in the target; verify no docs-root AGENTS, app package, framework config, dependencies, or root build changes. Run `$CLI_CMD docs check --target-dir <literal-root>` and already documented lint/link/format checks when applicable. Errors block conformance; warnings remain review items. Use `references/pr-ci.md` to present checker-only PR wiring with empty build/manifest inputs unless a generated external manifest was separately configured; apply only the approved workflow diff. Adoption preserves existing bytes and may leave missing child indexes, metadata, context, or links: record these as audit gaps for analyze/apply rather than repairing them or calling the tree fully conformant. Distinguish successful setup verification from content-conformance findings.
123
125
  5. **Inspect config:** `documentation.tooling` is the string `markdown`; `root` is the literal content directory; `index` is its authored entrypoint, normally `<root>/index.md`. Markdown introduces no `documentation.config`. Preserve unrelated config/excludes/completion settings. Verify deterministic managed root Documentation guidance names that root, Markdown tooling, authored index, and `<root>/contributing.md`; preserve manual/local guidance and surface unresolved disposition. The Step 5e completion opt-in remains available using the docs root rather than an app name, without silently changing an existing value. No nested app-config reconciliation or framework patch inspection applies.
124
126
  6. **Walkthrough:** In short chunks, show actual config and `<root>/index.md`: useful context plus the Contents map, title/description metadata, sibling `page.md` and child `section/index.md` links, exclusions and asset-only exceptions. Explain adding a page/section and updating the nearest authored map without overwriting existing context. Root AGENTS Documentation guidance and `<root>/contributing.md` establish agent/human conventions; a preexisting local AGENTS file remains authoritative, but bootstrap creates none. Authored indexes are edited directly. Optional generated inventories require explicit external output, e.g. `$CLI_CMD docs generate-index --docs-dir <root> --output .oat/docs-manifest.md`; output must stay outside the full configured content root and cannot overwrite the configured authored index even with a narrowed `--docs-dir`. Generation does not repoint `documentation.index`. Markdown bootstrap never generates a manifest automatically. Skip framework deep dives and preview-server/build commands.
125
127
  7. **Audit handoff and summary:** Offer `oat-docs-analyze` against the literal configured root, followed by `oat-docs-apply` only for approved repairs. An adopted incomplete tree needs that audit; config/guidance alone prove no full conformance. Explain `oat-project-document` for source-backed project deltas. Summarize tooling, actual root/authored index, created/preserved files, guidance/config disposition, ordered IA guidance locators/provenance and proposal recommendation/conflicts, file-check outcomes, unresolved audit gaps, optional manifest ownership, and exact skill handoff. For dry-run/partial/refusal, label the outcome accordingly rather than printing BOOTSTRAP COMPLETE. No app, install, build, patch, or dev-command fields apply.
@@ -416,7 +418,7 @@ Print `[3/7] Scaffolding…` at the start of this step.
416
418
 
417
419
  For an explicitly fresh Fumadocs/MkDocs app, current CLI init writes `documentation.navOwner: nav-sync` and generates navigation after successful scaffold/config. An explicitly selected new app in a repository with prior docs config is fresh creation; preserve the old app's authored files. This does not authorize regeneration of an existing app: keep undeclared/hand-authored ownership untouched and use the existing analyze/apply handoff. IA approval alone never authorizes navigation writes. Markdown and dry runs run no nav sync.
418
420
 
419
- Inspect the generated package scripts rather than adding a duplicate patch: Fumadocs `prebuild` and MkDocs `docs:build` run `nav sync --check`, using external `oat` from the app directory with `--target-dir .`, or source-workspace CLI with the explicit quoted repo-relative app. A stale navigation check requires fixing authored Contents and explicitly syncing owned navigation before retrying, not deleting the check or silently regenerating an undeclared owner.
421
+ Inspect the generated package scripts rather than adding a duplicate patch: `docs:check` runs the portable checker and MkDocs `test` runs the same real check. Framework builds run the checker before navigation/build. Fumadocs `prebuild` and MkDocs `docs:build` run `nav sync --check`, using external `oat` from the app directory with `--target-dir .`, or source-workspace CLI with the explicit quoted repo-relative app. A stale navigation check requires fixing authored Contents and explicitly syncing owned navigation before retrying, not deleting the check or silently regenerating an undeclared owner.
420
422
 
421
423
  **3a. Assemble CLI flags.**
422
424
 
@@ -516,6 +518,40 @@ Print `[4/7] Verifying build…` at the start of this step.
516
518
 
517
519
  Skip this step entirely if `Scaffold Result.scaffoldSucceeded !== true` — a failed scaffold produces an undefined state; installing and building on top of it makes things worse.
518
520
 
521
+ **4a prerequisite: inspect and approve Fumadocs install-root policy.**
522
+
523
+ Before running install, read the CLI's `installationAdvice` and the generated
524
+ toolchain guide. Locate the actual pnpm installation root, including any enclosing
525
+ `pnpm-workspace.yaml`; a workspace member's package is not that root. Current
526
+ Fumadocs loses handler properties added by `mdast-util-to-markdown` 2.2.0, so valid
527
+ bold/italic content can fail compilation. Preserve all content and framework APIs.
528
+ The required compatibility constraint is exactly 2.1.2 in the effective root's
529
+ `pnpm-workspace.yaml`:
530
+
531
+ ```yaml
532
+ overrides:
533
+ mdast-util-to-markdown: 2.1.2
534
+ ```
535
+
536
+ A newly scaffolded independent app has its own root YAML (`packages: []` plus
537
+ this override); inspect it and install there. The CLI never creates this boundary
538
+ in monorepo mode or under an enclosing pnpm workspace. For an existing workspace
539
+ root, PRESENT the exact concrete YAML diff and obtain explicit approval before
540
+ writing it. Preserve package globs and all unrelated settings; add the entry to
541
+ an existing `overrides` map, never duplicate the map or replace the file. A
542
+ conflicting existing pin requires the owner's decision; a declined/skipped edit
543
+ stays a manual setup requirement and verification remains pending. Do not create
544
+ a local boundary that splits a workspace member. Do not implement a policy merger
545
+ or silently extend CLI root-package patching: it changes build scripts only,
546
+ and `--no-root-patch` neither sets nor approves dependency policy.
547
+
548
+ Honor the selected manager (pnpm 10+); effective-root YAML works in pnpm 10 and 12.
549
+ A member-only override is ignored in 10, and 12 also ignores `package.json`'s
550
+ `pnpm.overrides`. After install, inspect actual `pnpm why mdast-util-to-markdown`
551
+ from that root, confirm 2.1.2, retain the root config/lockfile, then run checker and
552
+ build. Label this a constrained fresh install; do not promise unconstrained
553
+ resolution, change user-scope pnpm, or delete bold/italic to avoid the failure.
554
+
519
555
  **4a. Install dependencies.**
520
556
 
521
557
  Command varies by repo shape (from Preflight Result) and framework (Fumadocs only uses pnpm; MkDocs uses Python tooling — handled in the MkDocs Minimum Contract, Step 6):
@@ -526,6 +562,8 @@ Command varies by repo shape (from Preflight Result) and framework (Fumadocs onl
526
562
 
527
563
  For Fumadocs, capture both stdout and stderr. Print a start line (`Installing dependencies…`) and a completion line with duration.
528
564
 
565
+ Before building, run `$CLI_CMD docs check --target-dir <configured-root>` from the repo root. Keep its JSON/findings and exit; metadata/maps/links, contributor commands and real Mermaid syntax are checked without executing page code. Errors stop verification; review warnings and route content repairs through analyze/apply. Never add blanket suppressions to pass bootstrap.
566
+
529
567
  **4b. Build.**
530
568
 
531
569
  Command varies by shape:
@@ -572,6 +610,7 @@ Record internally for the Post-Scaffold Inspector and Walkthrough:
572
610
 
573
611
  ```
574
612
  Verification Result:
613
+ installRootPolicy: { path, disposition: 'scaffolded' | 'approved' | 'manual' | 'conflict', resolvedVersion } | null
575
614
  installSucceeded: boolean
576
615
  buildSucceeded: boolean
577
616
  knownIssues: Array<{ pattern, severity: 'benign' | 'flagged' | 'surface-only' | 'auto-fixed', detail }>
@@ -670,6 +709,16 @@ Inspection Result:
670
709
 
671
710
  The Walkthrough's Section D (Configuration readback) references `issues[]` verbatim — format it so it reads cleanly when printed to the user.
672
711
 
712
+ **PR CI wiring (after config inspection):** Load `references/pr-ci.md` now.
713
+ Resolve its concrete inputs from the inspected config/scripts, present the exact
714
+ workflow diff, and write only after approval. Preserve existing workflow content
715
+ and use full-history checkout/fetch for the applicable diagram base. Execute its
716
+ checker, real framework build and configured-manifest freshness commands locally;
717
+ record exits and unverified portions. Markdown follows the same recipe with no
718
+ build/default manifest. Include the approved workflow path or declined/pending
719
+ status in the exit summary. This is bootstrap setup authority, not permission to
720
+ rewrite an existing app or introduce deployment.
721
+
673
722
  ### Step 6: Educational Walkthrough
674
723
 
675
724
  Narrate the scaffolded docs app as a chunked conversation, not a wall of text. The Walkthrough's job is to turn the user from "I ran a scaffold" into "I know how this docs app works". It is **not** a re-explanation of the CLI's output, nor a recitation of the AGENTS.md content — both are live files the user can read; the Walkthrough contextualizes them.
@@ -883,6 +932,8 @@ Agent guidance:
883
932
  Build:
884
933
  - Install: {ok | known-issue: ...}
885
934
  - Build: {ok | known-issue: ...}
935
+ - Install policy: {effective-root YAML + resolved 2.1.2 | manual/conflict/pending; constrained install}
936
+ - PR CI: {approved workflow path + checker/build/freshness exits | declined | pending}
886
937
  - Known issues (from Verification Result.knownIssues): {list or 'none'}
887
938
 
888
939
  Inspection:
@@ -0,0 +1,89 @@
1
+ # Pull-request docs checks
2
+
3
+ Load this recipe during bootstrap config inspection, including Markdown setup.
4
+ Present the exact workflow diff for the selected repo and get approval before
5
+ writing it. Preserve existing triggers, jobs, permissions and steps. Existing-app
6
+ repair remains analyze/apply work; this recipe does not authorize scaffold or CI
7
+ replacement, deployment, or publication.
8
+
9
+ ## Resolve the concrete inputs
10
+
11
+ Read the actual shared config and package scripts, then substitute these values
12
+ in the existing PR workflow (or propose a new docs job if none exists):
13
+
14
+ - `DOCS_ROOT`: configured repository-relative documentation root.
15
+ - `DOCS_CONTENT`: literal root for Markdown; actual framework content directory.
16
+ - `DOCS_TOOLING`: `markdown`, `fumadocs` or `mkdocs`.
17
+ - `DOCS_BUILD_SCRIPT`: actual app build script (`build` for Fumadocs,
18
+ `docs:build` for the starter MkDocs app); empty for Markdown.
19
+ - `DOCS_MANIFEST`: only an explicitly configured **generated Markdown inventory**,
20
+ such as a Fumadocs app-root `index.md`. Leave empty for Markdown unless the
21
+ user separately configured an external inventory. An authored Markdown index
22
+ or MkDocs YAML is not a generated Markdown inventory.
23
+
24
+ Use Node >=22.17 and the repo's package-manager pin. Provision the selected CLI
25
+ version through the repo's existing dependency installation; framework starters
26
+ declare it in their app package. Add the app's `node_modules/.bin` to `GITHUB_PATH`
27
+ when the binary is installed there. A Markdown-only repo uses its existing approved
28
+ CLI provision; do not introduce an app, dependency install or build just for this
29
+ recipe. For MkDocs use the selected Python environment and the existing pinned
30
+ requirements/setup script. Do not upgrade framework or Python packages implicitly.
31
+ In a workspace install from the workspace root; for a nested standalone app,
32
+ install in that app. Keep existing unrelated setup steps. For Fumadocs, first
33
+ inspect the approved effective-root `pnpm-workspace.yaml` compatibility override
34
+ (`mdast-util-to-markdown: 2.1.2`) from Step4a; verify actual resolution and retain
35
+ the lockfile. Do not use member-only policy, silently merge a conflicting root
36
+ setting or claim an unconstrained install. A pending/declined root edit leaves
37
+ setup unverified.
38
+
39
+ Checkout needs full history so the read-only diagram comparison can use
40
+ `origin/main` (or the configured `documentation.check.diagramBaseRef`). For a
41
+ custom base fetch that ref explicitly. A missing base leaves static checks active
42
+ but reports diagram freshness unverified; do not label that result verified.
43
+
44
+ ## Verification steps
45
+
46
+ This concrete example uses a Fumadocs root `docs-site`. Substitute every env value
47
+ from the inspected repo, retaining the same checker → build → configured-manifest
48
+ order. The `oat` binary must be on PATH from the provision above. Generated manifests
49
+ are committed; the freshness step rejects an untracked output too.
50
+
51
+ ```yaml
52
+ - uses: actions/checkout@v5
53
+ with:
54
+ fetch-depth: 0
55
+ # Keep the repo's Node/package-manager/dependency setup here.
56
+ - name: Verify documentation
57
+ env:
58
+ DOCS_ROOT: docs-site
59
+ DOCS_CONTENT: docs-site/docs
60
+ DOCS_TOOLING: fumadocs
61
+ DOCS_BUILD_SCRIPT: build
62
+ DOCS_MANIFEST: docs-site/index.md
63
+ shell: bash
64
+ run: |
65
+ set -euo pipefail
66
+ oat docs check --target-dir "$DOCS_ROOT"
67
+ if [ "$DOCS_TOOLING" != markdown ]; then
68
+ (cd "$DOCS_ROOT" && pnpm run "$DOCS_BUILD_SCRIPT")
69
+ fi
70
+ if [ -n "$DOCS_MANIFEST" ]; then
71
+ git ls-files --error-unmatch -- "$DOCS_MANIFEST"
72
+ oat docs generate-index --docs-dir "$DOCS_CONTENT" --output "$DOCS_MANIFEST"
73
+ git diff --exit-code -- "$DOCS_MANIFEST"
74
+ fi
75
+ ```
76
+
77
+ Run those exact commands locally from the repository root after installation,
78
+ with the same concrete inputs and PATH. Record checker, real framework build and
79
+ freshness exits separately. A seeded missing description must fail the checker;
80
+ a stale committed configured manifest must fail the final diff. Restore fixtures
81
+ after each control. A command-order stub is not a framework build. Markdown uses
82
+ empty build/manifest inputs and runs only the checker.
83
+
84
+ If a check fails, repair the authored metadata/maps/links or explicitly sync owned
85
+ navigation; never remove the check, silently regenerate a hand-authored sidebar,
86
+ or add a blanket exclusion. Review warnings and narrow reason-bearing exceptions.
87
+ A build that regenerates an inventory does not prove committed freshness: keep
88
+ the final Git diff after the build. Report unverified or declined CI changes in
89
+ the bootstrap exit summary rather than claiming CI is wired.