@open-agent-toolkit/cli 0.3.24 → 0.3.26

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 (48) hide show
  1. package/assets/bundle-metadata.json +1 -1
  2. package/assets/docs/docs-tooling/add-docs-to-a-repo.md +14 -6
  3. package/assets/docs/docs-tooling/commands.md +12 -9
  4. package/assets/docs/docs-tooling/workflows.md +53 -8
  5. package/assets/docs/reference/cli-reference.md +1 -1
  6. package/assets/docs/reference/configuration.md +3 -0
  7. package/assets/docs/reference/docs-index-contract.md +19 -6
  8. package/assets/docs/reference/oat-directory-structure.md +13 -0
  9. package/assets/public-package-versions.json +4 -4
  10. package/assets/skills/oat-docs-analyze/SKILL.md +106 -6
  11. package/assets/skills/oat-docs-analyze/references/analysis-artifact-template.md +42 -2
  12. package/assets/skills/oat-docs-analyze/scripts/package-drift.mjs +129 -0
  13. package/assets/skills/oat-docs-apply/SKILL.md +131 -12
  14. package/assets/skills/oat-docs-apply/references/apply-plan-template.md +58 -14
  15. package/assets/skills/oat-docs-bootstrap/SKILL.md +33 -8
  16. package/assets/templates/docs-app-fuma/package.json.template +1 -1
  17. package/assets/templates/docs-app-fuma/source.config.ts +6 -1
  18. package/assets/templates/docs-app-mkdocs/package.json.template +2 -2
  19. package/dist/commands/config/index.d.ts.map +1 -1
  20. package/dist/commands/config/index.js +67 -9
  21. package/dist/commands/docs/index-generate/generator.d.ts +4 -34
  22. package/dist/commands/docs/index-generate/generator.d.ts.map +1 -1
  23. package/dist/commands/docs/index-generate/generator.js +51 -157
  24. package/dist/commands/docs/index-generate/index.d.ts +1 -1
  25. package/dist/commands/docs/index-generate/index.d.ts.map +1 -1
  26. package/dist/commands/docs/index-generate/index.js +26 -8
  27. package/dist/commands/docs/init/index.d.ts.map +1 -1
  28. package/dist/commands/docs/init/index.js +21 -1
  29. package/dist/commands/docs/init/scaffold.d.ts.map +1 -1
  30. package/dist/commands/docs/init/scaffold.js +20 -13
  31. package/dist/commands/docs/nav/contents.d.ts +13 -3
  32. package/dist/commands/docs/nav/contents.d.ts.map +1 -1
  33. package/dist/commands/docs/nav/contents.js +85 -24
  34. package/dist/commands/docs/nav/fumadocs.d.ts +1 -0
  35. package/dist/commands/docs/nav/fumadocs.d.ts.map +1 -1
  36. package/dist/commands/docs/nav/fumadocs.js +26 -9
  37. package/dist/commands/docs/nav/sync.d.ts +2 -0
  38. package/dist/commands/docs/nav/sync.d.ts.map +1 -1
  39. package/dist/commands/docs/nav/sync.js +21 -1
  40. package/dist/commands/docs/shared/exclusions.d.ts +37 -0
  41. package/dist/commands/docs/shared/exclusions.d.ts.map +1 -0
  42. package/dist/commands/docs/shared/exclusions.js +161 -0
  43. package/dist/config/oat-config.d.ts +18 -0
  44. package/dist/config/oat-config.d.ts.map +1 -1
  45. package/dist/config/oat-config.js +64 -3
  46. package/dist/config/resolve.d.ts.map +1 -1
  47. package/dist/config/resolve.js +5 -1
  48. package/package.json +2 -2
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "oatVersion": "0.3.24"
3
+ "oatVersion": "0.3.26"
4
4
  }
@@ -212,10 +212,18 @@ oat docs nav sync --target-dir apps/my-docs
212
212
 
213
213
  Generated Fumadocs `meta.json` is strict: a page no `## Contents` map lists
214
214
  stays out of the sidebar. The `prebuild` script that `oat docs init` scaffolds
215
- for Fumadocs does not run the read-only check. To make builds fail on stale
216
- navigation or an unlisted page, as `apps/oat-docs` does, append
217
- `&& oat docs nav sync --check` to it; the script runs from the app directory,
218
- which `--target-dir` defaults to.
215
+ for Fumadocs runs the read-only check before generation/build; fresh MkDocs
216
+ `docs:build` does too. Init explicitly seeds `documentation.navOwner: nav-sync`
217
+ and generates navigation after successful scaffold/config. External scripts select
218
+ `--target-dir .` from the app directory; source-workspace scripts select the
219
+ repo-relative app and quote paths with spaces. Existing apps are not rewritten:
220
+ bootstrap sends undeclared/hand-authored ownership through analyze/apply.
221
+
222
+ Use shared `documentation.nonReaderPaths` for drafts/page templates with the
223
+ [bounded glob grammar](commands.md#exclusion-patterns). Nav, nav checks and
224
+ manifests omit matches even when Contents links them; `documentation.excludes`
225
+ stays manifest-only. OAT's Fumadocs collections also omit their rendering. Pinned
226
+ MkDocs 1.4.2 still renders those routes; nav exclusion does not make content private.
219
227
 
220
228
  **Fumadocs** apps also have an app-root docs index manifest, generated from
221
229
  the Markdown file tree automatically via `predev`/`prebuild` hooks. You can
@@ -305,8 +313,8 @@ need.
305
313
  - If a Node/pnpm team wants a hosted site, choose Fumadocs. Its build hooks
306
314
  regenerate the app-root `index.md` inventory but not the sidebar files, so run
307
315
  `oat docs nav sync` after adding, moving, or renaming pages, commit the
308
- `meta.json` files it writes, and add `oat docs nav sync --check` to your build
309
- or CI yourself, because the scaffold does not.
316
+ `meta.json` files it writes. Fresh scaffold builds already run the read-only
317
+ check; older apps can add it explicitly after choosing nav-sync ownership.
310
318
  - If your team uses Python and MkDocs Material, choose MkDocs. Run
311
319
  `oat docs nav sync --check` to see what would change before letting nav sync
312
320
  rewrite `nav:`.
@@ -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.
@@ -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 (unchanged from previous behavior)
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
- - sorting: `index.md` first, then directories before files, then lexical
178
- - reports the derived docs directory in human output and as `docsDir` / `docsDirSource` under `--json`, alongside `excludes` — the effective exclusion list, `documentation.excludes` merged with the `--exclude` flags exactly as it was handed to the generator
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. Patterns come from `documentation.excludes` in `.oat/config.json` and from repeated `--exclude` flags, 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
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
- `pnpm build:docs` fails on stale navigation.
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.
@@ -364,8 +364,11 @@ method works without private guidance or copied exemplars.
364
364
  Existing docs default to analyze → apply of approved recommendations and exit
365
365
  before scaffolding. Replacement requires an explicit choice. A second app also
366
366
  requires an explicit choice and remains unsupported by the current CLI. This
367
- selection stage does not persist IA decisions, restructure trees or materialize
368
- preset scaffolds. Feature and QA validation page templates are a later delivery;
367
+ proposal becomes durable only after approval: bootstrap/apply use `oat decision new`
368
+ and an Information architecture section in the framework docs-app `AGENTS.md`
369
+ or Markdown contributing page, plus the shared `documentation.ia` mirror.
370
+ Authored records stay authoritative; missing/conflicting records become `ask_user`.
371
+ Preset scaffolds and Feature/QA validation page templates are a later delivery;
369
372
  the IA Proposal template is available now.
370
373
 
371
374
  ## oat-docs-analyze
@@ -421,15 +424,16 @@ repair the analysis contract rather than asking apply to fill it in.
421
424
  ## oat-docs-apply
422
425
 
423
426
  **Invocation:** `/oat-docs-apply` after reviewing a docs analysis report.
424
- The skill loads the newest `.oat/repo/analysis/docs-*.md` report. You cannot
425
- select an older one, so rerun analysis if the newest report is not the one
426
- you reviewed. It then builds a recommendation plan and asks you to choose
427
+ Supply the analysis artifact path and approved recommendation IDs. If no path
428
+ is supplied, the skill offers the newest report for confirmation; it never
429
+ silently changes the reviewed input. It builds a recommendation plan and asks you to choose
427
430
  `apply all`, `apply interactively` (approve, modify, or skip each item), or
428
431
  `discuss` before changing anything.
429
432
 
430
433
  **Prerequisites:** A recent, complete docs analysis artifact and an unchanged
431
434
  compatible target. Recommendations need evidence, confidence, disclosure,
432
- and concrete link targets where applicable. Apply also needs `jq` for
435
+ stable unique IDs, `approval: explicit | default`, and concrete link targets
436
+ where applicable. Apply also needs `jq` for
433
437
  tracking updates, and `gh` only if you want it to open the pull request. No
434
438
  active OAT project is required. Missing analysis or a changed target requires a fresh analysis,
435
439
  not conventions invented during apply.
@@ -442,9 +446,12 @@ execute those selected actions without broadening the work to every finding.
442
446
 
443
447
  **Expected output:** Approved changes committed on a new
444
448
  `oat/docs-<timestamp>` branch, relevant source/link checks, and declared
445
- navigation or generated-artifact refreshes. Markdown retains its authored
449
+ navigation or generated-artifact refreshes, plus a structured result listing
450
+ applied, skipped (ID/reason), and failed IDs. Markdown retains its authored
446
451
  index and needs no framework build or nav sync; Fumadocs sidebar metadata is
447
- regenerated from approved Contents changes, never hand-edited. The summary
452
+ regenerated only with recorded `navOwner: nav-sync`. Hand-authored navigation
453
+ gets approved edits and read-only Contents membership/order comparison;
454
+ undeclared ownership becomes `ask_user`. The summary
448
455
  reports the applied plan and checks.
449
456
 
450
457
  **What it does without asking:** Nothing changes until you approve the plan.
@@ -467,6 +474,44 @@ pull request. Rerun analysis if you need a post-apply assessment, and treat
467
474
  unapproved recommendations as remaining decisions rather than completed
468
475
  work.
469
476
 
477
+ ## Approval, IA records and restructuring
478
+
479
+ Every analyze recommendation has a stable ID and `approval: explicit | default`.
480
+ `apply all` covers only non-blocked default content repairs. Docs-package updates,
481
+ restructure blocks and work outside Markdown scope require individual approval
482
+ by ID; unattended runs skip explicit items even when their IDs were supplied,
483
+ with reason `explicit_requires_interactive_approval`. Kickoff consent is not
484
+ approval of every finding. Bootstrap Step 7b uses this same artifact-plus-ID
485
+ handoff, and apply reports unsupported scaffold work as `manual`.
486
+
487
+ An approved IA record first checks target-repo PJM adoption with `oat pjm doctor
488
+ --json`; absent/partial adoption needs initialization before `oat decision new`.
489
+ The decision and authored section capture tracks, per-track organizing
490
+ principles, placement and verification overlay. Config mirrors the accepted
491
+ record without replacing it. Framework sidebar ownership is independent; Markdown
492
+ creates no docs-root AGENTS file and runs no nav sync.
493
+
494
+ A `restructure` block records source→destination mappings, both parent Contents
495
+ changes, grep-derived inbound-link rewrites, and old-URL recovery, then lands as
496
+ one exact-path commit per approved block. Retired pages retain a stub/archive
497
+ pointer and parent map update. Next static export cannot use Next config
498
+ redirects; choose an authored stub or verified host recovery, keeping unsupported
499
+ app/host changes manual. Check rewritten relative links/anchors and the old route
500
+ under the real base path; verify according to sidebar ownership and rerun analyze.
501
+
502
+ Analyze also audits Information Architecture Fit and declared Product, QA,
503
+ consumer and agent coverage. A top-level misroute is High when it blocks normal
504
+ first success/verification, Medium when it causes material detours; cosmetic
505
+ organization stays Low. Missing IA/owner raises `ask_user`.
506
+
507
+ For framework apps, offline drift compares installed `@open-agent-toolkit/docs-*` packages to the
508
+ running CLI's bundled `public-package-versions.json`, never registry latest.
509
+ Missing installations are unverified. The recommendation includes the exact
510
+ upgrade command. Individual tooling approval permits only docs-app `@open-agent-toolkit/docs-*`
511
+ dependency bumps (and resulting lockfile), the admonition/frontmatter conversions
512
+ already supported by `oat docs migrate`, and build verification. App config,
513
+ routes and package scripts remain manual required changes.
514
+
470
515
  ## Related docs
471
516
 
472
517
  - [`commands.md`](commands.md)
@@ -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.
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
 
@@ -94,7 +94,10 @@ Common keys in `.oat/config.json`:
94
94
  - `worktrees.root` — where OAT-managed worktrees live
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
+ - `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. 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.
97
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.
98
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
99
102
  - `documentation.requireForProjectCompletion` — whether docs sync is a completion gate
100
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; reordering `## Contents` does not reorder the generated manifest's file-tree sort.
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 bullet links for sibling pages and child directories:
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
- - Generated entries are ordered by the file-tree generator: `index.md` first, directories before files, then lexical order.
69
- - Reordering a `## Contents` block does not reorder the generated manifest's file-tree sort.
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.
@@ -1,6 +1,6 @@
1
1
  {
2
- "cli": "0.3.24",
3
- "docs-config": "0.3.24",
4
- "docs-theme": "0.3.24",
5
- "docs-transforms": "0.3.24"
2
+ "cli": "0.3.26",
3
+ "docs-config": "0.3.26",
4
+ "docs-theme": "0.3.26",
5
+ "docs-transforms": "0.3.26"
6
6
  }
@@ -6,7 +6,7 @@ disable-model-invocation: true
6
6
  user-invocable: true
7
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
8
8
  metadata:
9
- version: '1.7.0'
9
+ version: '1.7.1'
10
10
  ---
11
11
 
12
12
  # Docs Analysis
@@ -115,8 +115,9 @@ Use the five axes before presets and show two plausible two-level trees with
115
115
  5–8 representative page placements each, page jobs, nearest approved presets
116
116
  and tradeoffs. A UI alone does not justify Product/Engineering/QA; size chooses
117
117
  depth, not audience. For an existing tree respect AGENTS/contributing authority;
118
- conflicts are `ask_user`, with both source citations. Propose only: no IA
119
- persistence, restructure action or scaffold materialization in this stage.
118
+ conflicts are `ask_user`, with both source citations. Analyze remains read-only:
119
+ propose `record-ia` or `restructure` recommendations for apply; never persist
120
+ IA or materialize scaffolds from analysis.
120
121
 
121
122
  ### Step 0: Resolve Docs Target and Analysis Mode
122
123
 
@@ -317,6 +318,37 @@ For each evaluated page or directory:
317
318
  In `delta` mode, always evaluate changed docs files plus the nearest parent `index.md` pages.
318
319
  In `full` mode, evaluate the whole docs surface.
319
320
 
321
+ ### Information Architecture Fit
322
+
323
+ Read the authored IA decision and `## Information architecture` section in the
324
+ docs-app AGENTS.md (Fumadocs/MkDocs) or contributing page (Markdown).
325
+ `documentation.ia` is a repository-only mirror: compare preset, decision path,
326
+ tracks/principles and verification overlay to those authored sources. The
327
+ authored record is authoritative; missing/broken records or contradictory
328
+ mirrors become `ask_user` findings. No recorded IA means `ask_user` to choose
329
+ and record one, not an inferred preset. Keep ordinary contract analysis useful
330
+ while those recommendations are blocked.
331
+
332
+ In the artifact's **Information Architecture Fit** section, cite whether the
333
+ landing page routes each declared audience, all declared sections exist and are
334
+ reachable, page reader/purpose matches placement, root breadth is usable, and an
335
+ app's docs avoid merely mirroring implementation directories. Review coverage
336
+ only for declared readers: Product features/journeys/screens/states; QA scenario
337
+ tables with seeds and automation references; consumer first-success/task guides;
338
+ agent entrypoints, canonical sources and verification commands. Do not demand
339
+ these tracks from every repository or implement the later P24 source checks.
340
+
341
+ Top-level IA misroutes a declared audience: `High` when the reader cannot find
342
+ a normal first-success or required verification path; `Medium` when that path
343
+ is reachable but its placement causes material detours/confusion. Cite the
344
+ declared audience, route and concrete reader impact. This rule overrides Low
345
+ organization polish; do not upgrade purely cosmetic differences.
346
+
347
+ For framework apps read `documentation.navOwner` independently of IA. Missing
348
+ means **undeclared**: issue `ask_user` to choose `nav-sync` or `hand-authored`,
349
+ and run only read-only membership/order comparisons. Never assume nav sync owns
350
+ existing navigation. Markdown ignores navOwner and never runs nav sync.
351
+
320
352
  ### Step 4: Verify Substantive Claims Against Repo Sources
321
353
 
322
354
  Add a dedicated accuracy verification pass between page-quality assessment and nav/drift checks.
@@ -438,8 +470,8 @@ If a generated root index or manifest exists:
438
470
  files, and representative links for each finding.
439
471
  5. Prefer source-of-truth fixes over generated-file edits.
440
472
 
441
- If the app is Fumadocs (a `source.config.ts` beside `docs/`), its sidebar comes from
442
- `docs/**/meta.json` files that `oat docs nav sync` generates from `## Contents`:
473
+ For a Fumadocs app with recorded `navOwner: nav-sync`, compare generated
474
+ `docs/**/meta.json` with authored `## Contents`:
443
475
 
444
476
  1. Flag a docs directory with an `index.md` but no `meta.json` as a missing
445
477
  generated artifact.
@@ -463,6 +495,13 @@ If the app is Fumadocs (a `source.config.ts` beside `docs/`), its sidebar comes
463
495
  1 when either exists. The skill grants only this `--check` form; plain
464
496
  `oat docs nav sync` writes files and is not part of analysis.
465
497
 
498
+ For `hand-authored` or undeclared Fumadocs navigation, compare current meta.json
499
+ membership/order with Contents without assuming strict generator output; do not
500
+ flag rest entries merely because they are hand-authored. Report missing reader
501
+ routes and differences with local ownership evidence; recommend no automatic
502
+ regeneration. For nav-sync-owned MkDocs, use the same explicit-target read-only
503
+ `oat docs nav sync --check --target-dir <docs-app-dir>`.
504
+
466
505
  If `mkdocs.yml` exists:
467
506
 
468
507
  1. Compare nav entries with the docs tree.
@@ -476,6 +515,53 @@ site nav generation or builds. Lack of `mkdocs.yml`, a generated manifest, or an
476
515
  app package is expected, not a migration finding. For other unconfigured surfaces,
477
516
  record whether app migration is relevant only when evidence or user intent supports it.
478
517
 
518
+ ### Offline docs-package drift
519
+
520
+ For framework apps read their package.json and installed docs packages against
521
+ the running CLI's bundled `assets/public-package-versions.json`, without network.
522
+ Run this skill's production helper after resolving this skill's own directory:
523
+
524
+ ```bash
525
+ node "$SKILL_DIR/scripts/package-drift.mjs" --app "<docs-app-dir>" --cli "$(command -v oat)"
526
+ ```
527
+
528
+ If a package-manager wrapper prevents locating the CLI root, discover the bundle
529
+ from that invoked installation offline. Inspect `command -v oat` and, for a shell
530
+ shim, read its `exec` lines or `cmd-shim-target` comment (for example,
531
+ `sed -n '1,160p' "$(command -v oat)"`). Resolve a relative JavaScript target from
532
+ the shim's directory; do not evaluate copied shell text. Locate that target's
533
+ package root containing `package.json` named `@open-agent-toolkit/cli` and
534
+ `assets/public-package-versions.json`. `pnpm root -g` or `npm root -g` can help
535
+ locate it, but newer pnpm installations may nest it in a hashed directory; use
536
+ the actual shim target, never another checkout's bundle. Bind the inspected paths:
537
+
538
+ ```bash
539
+ OAT_INSTALLED_ENTRY="<absolute JavaScript target from the invoked shim>"
540
+ OAT_INSTALLED_ROOT="<that installed @open-agent-toolkit/cli package root>"
541
+ # Both must equal the invoked oat version; stop if either differs.
542
+ test "$(node "$OAT_INSTALLED_ENTRY" --version)" = "$(oat --version)" &&
543
+ test "$(node -p 'JSON.parse(require("node:fs").readFileSync(process.argv[1], "utf8")).version' "$OAT_INSTALLED_ROOT/package.json")" = "$(oat --version)" &&
544
+ node "$SKILL_DIR/scripts/package-drift.mjs" --app "<docs-app-dir>" --versions "$OAT_INSTALLED_ROOT/assets/public-package-versions.json"
545
+ ```
546
+
547
+ Never substitute registry latest or this target repo's package version. Missing
548
+ bundle metadata, missing installed packages, or non-orderable versions (including
549
+ prereleases) mean unverified, never an upgrade. The helper compares stable numeric
550
+ version components: older installed packages are `drift`; equal versions are
551
+ `current`; newer installed packages are `ahead`, with no upgrade command. For
552
+ `ahead`, report that the running CLI is stale and ask the operator to update or
553
+ select the intended CLI installation before re-analysis; do not recommend a docs
554
+ package downgrade. `unverified` also has no package command and needs manual
555
+ verification. Neither status authorizes a tooling update.
556
+
557
+ The helper reports declared and installed versions, target versions and commands
558
+ for orderable targets. If the app uses a different package manager, translate the
559
+ command to its documented equivalent preserving package, exact target and
560
+ dependency section. Cite the manifest, installed package path, bundle path and
561
+ exact command. Report older-package drift as `tooling-update`, `approval: explicit`;
562
+ describe unsupported scaffold repairs separately as `manual`. Markdown has no
563
+ app-package drift check. This helper reads only and never upgrades anything.
564
+
479
565
  ### Step 7: Severity-Rate Findings
480
566
 
481
567
  Use these defaults:
@@ -485,6 +571,19 @@ Use these defaults:
485
571
  - `Medium`: incomplete `## Contents`, `overview.md` still in use, plugin/contributor guidance gaps, moderate duplication
486
572
  - `Low`: polish, wording, or organization improvements
487
573
 
574
+ ### Recommendation handoff
575
+
576
+ Give every recommendation a unique stable ID (`R-001`, etc.) and
577
+ `approval: explicit | default`; preserve IDs through review and never reuse a
578
+ retired ID for a different change. `explicit` covers docs-package updates,
579
+ restructure blocks and anything outside the Markdown scope (including authored
580
+ IA decision/config writes). `default` covers ordinary in-scope content repairs.
581
+ Missing evidence, `omit` and `ask_user` remain independent blockers regardless
582
+ of approval class. Capture exact targets and commands; an explicit class is not
583
+ permission to perform unsupported work. Apply's one input is this artifact plus
584
+ a list of approved recommendation IDs. Blanket or unattended approval never
585
+ covers explicit recommendations; apply reports skipped IDs with reasons.
586
+
488
587
  ### Step 8: Write Analysis Artifact
489
588
 
490
589
  Use `references/analysis-artifact-template.md`.
@@ -506,7 +605,8 @@ Populate the artifact with:
506
605
  - Accuracy verification verdicts for repo-checkable claims
507
606
  - Content opportunities for missing or thin docs coverage
508
607
  - Navigation/drift findings
509
- - Ordered recommendations
608
+ - Information Architecture Fit and offline package drift
609
+ - Ordered recommendations with stable IDs and approval classes
510
610
  - Exact evidence references for each finding and recommendation
511
611
  - Confidence for each recommendation
512
612
  - Progressive disclosure decisions (`inline`, `link_only`, `omit`, `ask_user`)
@@ -27,6 +27,39 @@ oat_analysis_commit: { commitHash }
27
27
 
28
28
  Do not copy private guidance contents or persist an IA decision from this report.
29
29
 
30
+ ## Information Architecture Fit
31
+
32
+ - Authored decision and Information architecture section: {paths/lines or missing}
33
+ - Config mirror: {preset, decision, tracks/principles, verification; agrees/conflicts}
34
+ - Missing IA / conflicting authority: {ask_user recommendation ID or none}
35
+ - Sidebar owner: {nav-sync / hand-authored / undeclared; Markdown: ignored}
36
+ - Undeclared framework owner: {ask_user recommendation ID or none}
37
+
38
+ | Declared reader/track | Landing route and section reachability | Placement/coverage evidence | Reader impact | Severity |
39
+ | -------------------------------------------------------- | -------------------------------------- | ----------------------------------------- | -------------------------------------------------------------- | --------------------- |
40
+ | {Product / QA / consumer / agent / other declared track} | {exact links} | {sources; page purpose; missing coverage} | {blocked first success/verification, material detour, or none} | {High / Medium / N/A} |
41
+
42
+ Assess root breadth and implementation-directory mirroring using reader evidence.
43
+ Do not invent missing audiences or choose an IA without approval.
44
+
45
+ ## Offline Package Drift
46
+
47
+ - Bundle metadata: {running CLI public-package-versions.json path or unverified}
48
+ - Docs app manifest: {path; Markdown: not applicable}
49
+
50
+ | Package | Declared / installed | Bundled | Status | Exact upgrade command | Recommendation ID |
51
+ | ----------------------------- | ----------------------------------- | --------- | -------------------------------------- | ------------------------------------------------------------------------------ | ------------------------------------------------------- |
52
+ | {@open-agent-toolkit/docs-\*} | {range / actual version or missing} | {version} | {current / drift / ahead / unverified} | {drift only: helper upgrade command adapted to actual manager; otherwise none} | {drift only: R-NNN; approval: explicit; otherwise none} |
53
+
54
+ Only older installed packages (`drift`) receive a package-upgrade command and
55
+ stable recommendation ID with `approval: explicit`. `current` needs no tooling
56
+ recommendation, even if the helper emits a reinstall command. For `ahead`, select
57
+ or update the intended CLI installation, then re-analyze; do not recommend a docs
58
+ package downgrade. `unverified` requires manual verification before a package
59
+ recommendation.
60
+
61
+ Unsupported app config/routes/scripts: {manual changes required; never automatic}.
62
+
30
63
  ## Summary
31
64
 
32
65
  - **Files evaluated:** {N}
@@ -270,14 +303,18 @@ canonical docs/config/examples.
270
303
 
271
304
  1. **{Action}** — {rationale}
272
305
  - Target: `{path}`
273
- - Action Type: {create / update / move / scaffold / sync-nav}
306
+ - ID: {R-NNN; unique and stable}
307
+ - approval: {explicit | default}
308
+ - Action Type: {create / update / move / scaffold / sync-nav / record-ia / restructure / tooling-update / manual}
274
309
  - Evidence: {exact refs}
275
310
  - Confidence: {high | medium | low}
276
311
  - Disclosure: {inline | link_only | omit | ask_user}
277
312
  - Link Targets: {path or URL / N/A}
278
313
  2. **{Action}** — {rationale}
279
314
  - Target: `{path}`
280
- - Action Type: {create / update / move / scaffold / sync-nav}
315
+ - ID: {R-NNN; unique and stable}
316
+ - approval: {explicit | default}
317
+ - Action Type: {create / update / move / scaffold / sync-nav / record-ia / restructure / tooling-update / manual}
281
318
  - Evidence: {exact refs}
282
319
  - Confidence: {high | medium | low}
283
320
  - Disclosure: {inline | link_only | omit | ask_user}
@@ -286,6 +323,9 @@ canonical docs/config/examples.
286
323
 
287
324
  ## Apply Contract
288
325
 
326
+ - `oat-docs-apply` input is this artifact path plus approved recommendation IDs.
327
+ - Every recommendation has a unique stable ID and approval: explicit | default.
328
+ - Explicit items need individual approval by ID; blanket/unattended approval skips them and reports the reason.
289
329
  - `oat-docs-apply` may only implement recommendations backed by evidence in this artifact.
290
330
  - Findings based on contradicted claims must be resolved against cited repo sources before `oat-docs-apply` acts on them.
291
331
  - Generated artifacts must not be hand-edited by `oat-docs-apply`. If a