@open-agent-toolkit/cli 0.3.28 → 0.3.30

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 (47) hide show
  1. package/README.md +4 -0
  2. package/assets/bundle-metadata.json +1 -1
  3. package/assets/docs/docs-tooling/add-docs-to-a-repo.md +2 -0
  4. package/assets/docs/docs-tooling/commands.md +111 -3
  5. package/assets/docs/docs-tooling/workflows.md +16 -0
  6. package/assets/docs/reference/cli-reference.md +2 -0
  7. package/assets/public-package-versions.json +4 -4
  8. package/assets/skills/authoring-docs/SKILL.md +2 -2
  9. package/assets/skills/authoring-docs/references/information-architecture.md +5 -2
  10. package/assets/skills/authoring-docs/references/page-templates/alert-runbook.md +63 -0
  11. package/assets/skills/authoring-docs/references/page-templates/command-reference.md +55 -0
  12. package/assets/skills/authoring-docs/references/page-templates/decisions-pointer.md +44 -0
  13. package/assets/skills/authoring-docs/references/page-templates/engineering-feature.md +53 -0
  14. package/assets/skills/authoring-docs/references/page-templates/per-area-agents.md +42 -0
  15. package/assets/skills/authoring-docs/references/page-templates/product-feature.md +49 -0
  16. package/assets/skills/authoring-docs/references/page-templates/qa-validation.md +59 -0
  17. package/assets/skills/authoring-docs/references/page-templates/screen-spec.md +51 -0
  18. package/assets/skills/authoring-docs/references/page-templates/skill-command-guide.md +44 -0
  19. package/assets/skills/authoring-docs/references/page-templates/solution-record.md +43 -0
  20. package/assets/skills/authoring-docs/references/templates.md +22 -2
  21. package/assets/skills/oat-docs-analyze/SKILL.md +89 -3
  22. package/assets/skills/oat-docs-analyze/references/analysis-artifact-template.md +23 -0
  23. package/assets/skills/oat-docs-analyze/references/quality-checklist.md +18 -0
  24. package/assets/skills/oat-docs-bootstrap/SKILL.md +11 -5
  25. package/dist/commands/docs/index.d.ts.map +1 -1
  26. package/dist/commands/docs/index.js +2 -0
  27. package/dist/commands/docs/init/content.d.ts +23 -0
  28. package/dist/commands/docs/init/content.d.ts.map +1 -0
  29. package/dist/commands/docs/init/content.js +361 -0
  30. package/dist/commands/docs/init/index.d.ts.map +1 -1
  31. package/dist/commands/docs/init/index.js +32 -1
  32. package/dist/commands/docs/init/markdown.d.ts.map +1 -1
  33. package/dist/commands/docs/init/markdown.js +21 -2
  34. package/dist/commands/docs/init/resolve-options.d.ts +4 -1
  35. package/dist/commands/docs/init/resolve-options.d.ts.map +1 -1
  36. package/dist/commands/docs/init/resolve-options.js +4 -0
  37. package/dist/commands/docs/init/scaffold.d.ts.map +1 -1
  38. package/dist/commands/docs/init/scaffold.js +20 -1
  39. package/dist/commands/docs/literals/evidence.d.ts +39 -0
  40. package/dist/commands/docs/literals/evidence.d.ts.map +1 -0
  41. package/dist/commands/docs/literals/evidence.js +205 -0
  42. package/dist/commands/docs/literals/literals.d.ts +3 -0
  43. package/dist/commands/docs/literals/literals.d.ts.map +1 -0
  44. package/dist/commands/docs/literals/literals.js +50 -0
  45. package/dist/release/public-package-contract.d.ts.map +1 -1
  46. package/dist/release/public-package-contract.js +10 -0
  47. package/package.json +3 -3
@@ -0,0 +1,51 @@
1
+ ---
2
+ title: Screen spec
3
+ description: Shared visible-state contract only for screens serving several journeys.
4
+ ---
5
+
6
+ # Screen spec
7
+
8
+ ## When to use
9
+
10
+ Create this page only when one screen serves several journeys. Otherwise keep the
11
+ state contract in its feature pages and avoid a second canonical description.
12
+
13
+ ## Route and params
14
+
15
+ List verified route identity, parameters, validation and defaults.
16
+
17
+ ## Entry points
18
+
19
+ Name the journeys and deep links reaching this screen and their preconditions.
20
+
21
+ ## Visible states
22
+
23
+ Describe loading, empty, content, permission and error states supported by source.
24
+
25
+ ## Locators
26
+
27
+ | Element | Test ID | A11y label | Literal text | Source path |
28
+ | ----------------- | ------------------------ | --------------------------- | -------------------------- | ----------------- |
29
+ | <element concept> | <verified ID or unknown> | <verified label or unknown> | <verified text or unknown> | <source location> |
30
+
31
+ ## Transitions
32
+
33
+ Describe actions, state changes and visible results; link journey-specific behavior.
34
+
35
+ ## Back behavior
36
+
37
+ Explain back, dismissal, restoration and cancellation for each supported entry path.
38
+
39
+ ## Writing and evidence rules
40
+
41
+ Use backticks only for literals verified verbatim in source, such as commands,
42
+ errors, labels and identifiers. Write concepts in ordinary prose. Cite the
43
+ source location for each verified literal; label unknown facts as unknown.
44
+ Remove drafting prompts before publishing and retain owner-review gaps explicitly.
45
+
46
+ Keep these three evidence classes separate:
47
+
48
+ - Planned automation: intended coverage, with owner and remaining work.
49
+ - Implemented assertions: the test path and the exact assertion it implements.
50
+ - Dated execution evidence: date, environment/configuration, result and evidence
51
+ location. Implemented assertions alone do not prove a successful execution.
@@ -0,0 +1,44 @@
1
+ ---
2
+ title: Skill or command guide
3
+ description: A reader task guide for invoking one skill or command.
4
+ ---
5
+
6
+ # Skill or command guide
7
+
8
+ ## Invocation
9
+
10
+ Give the verified invocation and how to provide the required inputs.
11
+
12
+ ## Prerequisites
13
+
14
+ Describe setup, access, repository state and authority needed for this invocation.
15
+
16
+ ## Example scenario
17
+
18
+ Explain one concrete input, goal and expected result without invented product facts.
19
+
20
+ ## What it does without asking
21
+
22
+ State automatic actions, mutation scope, approval boundaries and stop conditions.
23
+
24
+ ## Expected output
25
+
26
+ Describe resulting files, messages or state and how to verify success or partial work.
27
+
28
+ ## Next step
29
+
30
+ Name the next reader action, review or recovery route and link canonical guidance.
31
+
32
+ ## Writing and evidence rules
33
+
34
+ Use backticks only for literals verified verbatim in source, such as commands,
35
+ errors, labels and identifiers. Write concepts in ordinary prose. Cite the
36
+ source location for each verified literal; label unknown facts as unknown.
37
+ Remove drafting prompts before publishing and retain owner-review gaps explicitly.
38
+
39
+ Keep these three evidence classes separate:
40
+
41
+ - Planned automation: intended coverage, with owner and remaining work.
42
+ - Implemented assertions: the test path and the exact assertion it implements.
43
+ - Dated execution evidence: date, environment/configuration, result and evidence
44
+ location. Implemented assertions alone do not prove a successful execution.
@@ -0,0 +1,43 @@
1
+ ---
2
+ title: Solution record
3
+ description: An incident diagnosis and fix, distinct from a capability solution guide.
4
+ symptoms: []
5
+ root_cause: unknown
6
+ component: unknown
7
+ severity: unknown
8
+ date: null
9
+ ---
10
+
11
+ # Solution record
12
+
13
+ ## Problem
14
+
15
+ Describe impact, reproduction and observed symptoms. Keep the frontmatter symptoms
16
+ verbatim from observed errors; do not invent an incident, date or severity.
17
+
18
+ ## Root cause
19
+
20
+ Explain the causal chain with source/evidence references and remaining uncertainty.
21
+
22
+ ## Fix
23
+
24
+ Describe the actual change, affected component, verification and rollback.
25
+
26
+ ## Prevention
27
+
28
+ Separate proposed prevention from implemented assertions and dated execution results.
29
+ Name follow-up owners and unresolved review gaps.
30
+
31
+ ## Writing and evidence rules
32
+
33
+ Use backticks only for literals verified verbatim in source, such as commands,
34
+ errors, labels and identifiers. Write concepts in ordinary prose. Cite the
35
+ source location for each verified literal; label unknown facts as unknown.
36
+ Remove drafting prompts before publishing and retain owner-review gaps explicitly.
37
+
38
+ Keep these three evidence classes separate:
39
+
40
+ - Planned automation: intended coverage, with owner and remaining work.
41
+ - Implemented assertions: the test path and the exact assertion it implements.
42
+ - Dated execution evidence: date, environment/configuration, result and evidence
43
+ location. Implemented assertions alone do not prove a successful execution.
@@ -551,8 +551,8 @@ docs/
551
551
  ## IA Proposal
552
552
 
553
553
  Use for bootstrap or an existing-tree `--ia` analysis. This proposes structure;
554
- it neither persists an IA decision nor materializes a preset. Feature and QA
555
- validation page templates are not included; use the page-type guidance to
554
+ it neither persists an IA decision nor materializes a preset. Use the copyable
555
+ page assets below and the page-type guidance to
556
556
  plan their content.
557
557
 
558
558
  ````markdown
@@ -601,3 +601,23 @@ questions. Record an explicit choice before replacement or a second app.
601
601
  Existing docs default to analyze → apply of approved recommendations.
602
602
  No private exemplar text, copied external contents or unapproved moves.}
603
603
  ````
604
+
605
+ ## Copyable page assets
606
+
607
+ These Markdown bodies are the canonical source for approved preset scaffolds under
608
+ `contributing/templates/`. They are drafts, excluded from reader navigation and
609
+ manifest inventories through `documentation.nonReaderPaths`. Prefer local templates
610
+ when present; remove prompts and unneeded sections before publishing a reader page.
611
+ A Solution record captures an incident diagnosis, unlike the solution page type; a
612
+ Decisions pointer routes to records and never substitutes for an ADR.
613
+
614
+ - [Product feature](page-templates/product-feature.md) - Intended behavior and reader-visible boundaries for one feature or journey.
615
+ - [Engineering feature](page-templates/engineering-feature.md) - Implementation contracts and testing seams for one feature.
616
+ - [QA validation](page-templates/qa-validation.md) - Reproducible behavioral validation for one feature or journey.
617
+ - [Screen spec](page-templates/screen-spec.md) - Shared visible-state contract only for screens serving several journeys.
618
+ - [Alert runbook](page-templates/alert-runbook.md) - Triage, recovery and verification for a specific operational alert.
619
+ - [Solution record](page-templates/solution-record.md) - An incident diagnosis and fix, distinct from a capability solution guide.
620
+ - [Command reference](page-templates/command-reference.md) - Verified command inputs, outputs and mutation boundaries.
621
+ - [Skill or command guide](page-templates/skill-command-guide.md) - A reader task guide for invoking one skill or command.
622
+ - [Decisions pointer](page-templates/decisions-pointer.md) - A curated guide to consequential decisions, not a ledger or an ADR.
623
+ - [Per-area AGENTS](page-templates/per-area-agents.md) - Local authoring instructions excluded from reader navigation.
@@ -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(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
7
+ allowed-tools: Read, Write, Bash(git:*), Bash(oat config:*), Bash(oat docs nav sync --check:*), Bash(oat docs check:*), Bash(oat docs literals:*), 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.3'
9
+ version: '1.7.4'
10
10
  ---
11
11
 
12
12
  # Docs Analysis
@@ -336,7 +336,8 @@ app's docs avoid merely mirroring implementation directories. Review coverage
336
336
  only for declared readers: Product features/journeys/screens/states; QA scenario
337
337
  tables with seeds and automation references; consumer first-success/task guides;
338
338
  agent entrypoints, canonical sources and verification commands. Do not demand
339
- these tracks from every repository or implement the later P24 source checks.
339
+ these tracks from every repository. For an accepted triad, also perform the
340
+ conditional source assessments below.
340
341
 
341
342
  Top-level IA misroutes a declared audience: `High` when the reader cannot find
342
343
  a normal first-success or required verification path; `Medium` when that path
@@ -389,6 +390,91 @@ Evidence standard for this step:
389
390
  - If multiple repo files are needed to verify a claim, cite all relevant sources.
390
391
  - If the canonical source is ambiguous, mark the claim `unverified` rather than guessing.
391
392
 
393
+ ### Conditional triad source assessments (P24)
394
+
395
+ Run these six assessments only after the authored **accepted** IA decision and
396
+ local Information architecture section agree with the mirror's
397
+ `verification: triad`. Cite that agreement first. A mirror alone does not prove
398
+ acceptance. For absent, `agent-only`, or `none` overlays, record not applicable
399
+ and continue ordinary analysis unchanged. Missing/broken authored acceptance or
400
+ a conflicting mirror blocks these assessments with `unverified` / `ask_user`;
401
+ it does not block ordinary analysis or justify choosing an IA.
402
+
403
+ Map Product, QA and Engineering feature subsets from the accepted decision,
404
+ tracks/principles and local guidance, citing each mapping. Do not infer roles
405
+ from fixed folder names or tracks array order. Engineering may mix domain
406
+ contracts with feature pages: compare only its mapped feature subset. A grouped
407
+ flat IA may have no per-feature triad; explain not applicable rather than invent
408
+ folders. An unresolved mapping stays `unverified` / `ask_user` without new config.
409
+
410
+ 1. **Slug parity.** Compare relative feature/journey keys in the mapped subsets.
411
+ Exclude indexes, support pages, templates and Engineering domain contracts.
412
+ Cite missing/extra peers and the declared mapping before recommending repair.
413
+ 2. **Paired documentation.** Inspect each member's actual peer links, resolving
414
+ relative paths and anchors within the repository. Accept case-insensitive
415
+ Paired Documentation headings and QA's canonical Scope links when they point
416
+ to the appropriate Product/Engineering peers. A heading alone or an unrelated
417
+ resolving link is insufficient. Cite both link and target/anchor; unresolved
418
+ or wrong-peer links become evidence-backed findings.
419
+ 3. **Quoted literals and concepts.** Select Product/QA reader Markdown and narrow
420
+ canonical implementation directories from cited source references/local
421
+ guidance, then invoke the read-only helper (repeat one value per flag):
422
+
423
+ ```bash
424
+ oat docs literals --target-dir <resolved-target> \
425
+ --page <product-page> --page <qa-page> \
426
+ --source-root <implementation-dir> \
427
+ --source-exclude <generated-or-fixture-pattern> --json
428
+ ```
429
+
430
+ Pages are content-relative; roots and exclusions are repository-relative.
431
+ Never scan the repository root, dependencies, home or external sources.
432
+ Select implementation roots and exclusions that omit docs, templates,
433
+ generated/vendor output and example/test fixtures as evidence. The helper
434
+ does not automatically exclude documentation from selected source roots;
435
+ a match to documentation itself is not canonical implementation support.
436
+ Inspect the returned scope, searched files and skipped symlink/binary/non-UTF8
437
+ inputs; incomplete traversal or invalid selections fail visibly. Missing
438
+ canonical sources remain unverified; do not broaden scanning to manufacture
439
+ matches.
440
+
441
+ The helper extracts AST inline code, ignores fences, and performs exactly
442
+ one strict HTML entity decode per value and physical source line, followed
443
+ by case-sensitive substring matching. It reports the first lexical source
444
+ file/physical line, without snippets or a runtime verdict. CommonMark can
445
+ normalize multiline spans; source matching stays per physical line. It does
446
+ not fold whitespace/Unicode, decode JS escapes, evaluate interpolation or
447
+ load i18n/runtime values. A found substring can be in a comment, dead code,
448
+ fixture or longer text: read the citation and judge canonical relevance.
449
+ `not-found` is initially **unverified**, never automatic contradiction.
450
+ Require a differing canonical value before judging contradicted. Distinguish
451
+ intentionally explained concepts from UI literals; prose concepts need no
452
+ occurrence, while ambiguous backticked concepts require clarification or a
453
+ cited conceptual explanation. Exit 0 means completed candidates (including
454
+ not-found/not-applicable), not verified documentation.
455
+
456
+ 4. **Test-ID registry membership.** Locate the repository's actual canonical
457
+ test-ID registry and read its real format. Check exact member equality,
458
+ never substring occurrence in arbitrary source. Cite registry and docs.
459
+ Missing/ambiguous registry stays `unverified` / `ask_user`; do not invent a
460
+ registry path/schema or treat helper matches as membership proof.
461
+ 5. **Scoped scenario candidates.** Inspect QA tables for duplicate IDs and the
462
+ same scoped Given + When with different Then outcomes. Compare feature,
463
+ seed, platform and configuration preconditions before judging contradiction;
464
+ meaningful differences can explain the result. Cite both rows and scope.
465
+ Ambiguous scope stays unverified. This is judgment, not a scenario engine.
466
+ 6. **Templates in authored Contents.** Read raw authored `## Contents` links
467
+ before applying reader/nav exclusions. Flag links that expose drafting
468
+ templates as reader destinations even when `nonReaderPaths` makes nav/check
469
+ skip them; cite the map entry and template purpose/local declaration. Do not
470
+ infer safety from a clean generated nav or checker result.
471
+
472
+ Record applicability, mappings, docs/source citations, candidates and judgments
473
+ in the existing artifact's Accuracy Verification section. Use the existing
474
+ severity and recommendation `approval: explicit | default` classes; missing
475
+ mapping/registry evidence is not permission to add a schema or implementation.
476
+ No P24 `oat docs check` rule is added, and its G5 JSON/rule IDs are unchanged.
477
+
392
478
  ### Step 5: Analyze Content Coverage Opportunities
393
479
 
394
480
  Add a coverage-gap pass after accuracy verification.
@@ -247,6 +247,29 @@ runtime-only behavior here.
247
247
 
248
248
  {Or: "No repo-checkable substantive claims required accuracy verification."}
249
249
 
250
+ ### Conditional triad source assessments (P24)
251
+
252
+ - Gate: {accepted authored IA + local section citations and mirror agreement;
253
+ non-triad: not applicable; missing/conflict: unverified / ask_user}
254
+ - Role/subset mapping: {Product, QA, Engineering feature roots and citations;
255
+ hybrid domain exclusions; flat applicability; never folder names/array order}
256
+ - Literal helper: {exact invocation; scope, searched files and skipped reasons;
257
+ occurrence candidates only, not a runtime verdict}
258
+
259
+ | Assessment | Docs / canonical evidence | Candidate and judgment |
260
+ | -------------------------- | -------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
261
+ | Slug parity | {mapped feature keys and missing/extra peers} | {verdict or unverified / not applicable} |
262
+ | Paired documentation | {peer links + resolved target anchors; QA Scope accepted} | {correct peers, not just any resolving link} |
263
+ | Quoted literals / concepts | {helper path:line + canonical source / conceptual explanation} | {found requires relevance judgment; not-found initially unverified} |
264
+ | Test-ID registry | {actual registry path:line + exact member} | {membership; absent registry unverified / ask_user} |
265
+ | Scoped scenarios | {both rows + feature/seed/platform/config scope} | {duplicate ID / same Given+When with differing Then candidate; explained or unresolved} |
266
+ | Raw authored Contents | {map entry + template purpose / nonReaderPaths} | {flag reader links to templates even when nav excludes them} |
267
+
268
+ Keep one strict HTML entity decode per side and physical-source-line matching
269
+ limits visible. No JS/i18n evaluation, runtime claim, invented mapping/registry,
270
+ or automatic contradiction from absence. Recommendations retain existing
271
+ approval classes and docs/source citations.
272
+
250
273
  ## Coverage Review by Surface
251
274
 
252
275
  Summarize which documentable surfaces were proven by repo evidence and how well
@@ -55,6 +55,24 @@ Use this checklist when evaluating a docs surface.
55
55
  - Referenced paths exist.
56
56
  - Tooling/setup instructions are current.
57
57
 
58
+ ## Conditional triad source assessments (P24)
59
+
60
+ - Authored accepted IA and local section agree with the mirror's triad overlay;
61
+ other overlays are not applicable, missing/conflicting evidence unverified / ask_user.
62
+ - Roles and feature subsets come from cited decisions/local guidance, including
63
+ renamed tracks, hybrid Engineering and flat applicability; no folder/order inference.
64
+ - Slug parity compares only mapped feature keys, excluding support/domain pages.
65
+ - Peer links resolve to the correct member and anchor; QA Scope links count.
66
+ - Product/QA literals use `oat docs literals` with explicit pages, narrow source
67
+ roots and source exclusions. Scope, searched files and skipped reasons are reviewed.
68
+ - Once-decoded, case-sensitive physical-line occurrences receive canonical-source
69
+ judgment; not-found remains unverified and explained concepts are distinguished.
70
+ - Test IDs use exact membership in the actual registry; absent registry stays unverified.
71
+ - Duplicate IDs and same scoped Given+When/different Then candidates are judged
72
+ with seed/platform/configuration evidence, never automatically contradicted.
73
+ - Raw authored Contents links to templates are flagged despite reader/nav exclusions.
74
+ - Existing severity, citations and recommendation approval classes are preserved.
75
+
58
76
  ## Discoverability
59
77
 
60
78
  - Important pages are reachable from a parent `index.md` or site nav.
@@ -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.4'
9
+ version: '1.4.5'
10
10
  ---
11
11
 
12
12
  # Docs Bootstrap
@@ -120,8 +120,8 @@ The detailed framework procedures below apply to Fumadocs/MkDocs. When the selec
120
120
  2. **Gather inputs:** Offer “Markdown (plain files), Fumadocs, or MkDocs?” Collect documentation title (`--site-name`), dedicated relative target directory (default `docs` in every repo shape), and optional description. Reuse an existing compatible configured Markdown root. Ask no app/package name, package-manager, site-runtime, or dependency questions. Lint and format default to `none`; describe selected existing repository tools only, without installing them. Validate a nonempty title and a dedicated in-repository target, excluding the repository root and escaping symlinks. Confirm fresh setup or additive adoption, title, root, and audit handoff. `appName` is absent and `conflictResolution` is `adopt`, `audit`, `abort`, or null for this path.
121
121
  Before Markdown CLI invocation, run **Step 2.5** for fresh setup and explicitly selected adoption; it is not bypassed by this condensed path.
122
122
 
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.
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
+ 3. **Invoke CLI:** For fresh setup, pass the explicitly approved nearest preset and anticipated reader-page count together as `--ia-preset <preset> --planned-pages <count>` only when both are advertised. Adoption never receives these flags. 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.
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. Without preset inputs, fresh setup creates only authored `index.md` and `contributing.md` in the target. For approved preset runs, compare the actual reader tree with the accepted selection: selected track directories at 15 or more anticipated reader pages, grouped root Contents and flat reader pages below 15, and flat structure for `flat-small` at any count. Inspect purpose, entry principle, useful section guidance and Contents links to actual pages. Verify the applicable `contributing/templates/` subset (all ten for triad, Engineering feature plus the six operations/reference/agent shapes for domain, six for other presets), retained when flat; `documentation.nonReaderPaths` includes `contributing/templates/**` without losing prior settings, and templates stay outside reader Contents and any separately configured manifest. Check the track table and accepted-selection guidance in `contributing.md`, separate from later IA persistence. In every Markdown run, verify no docs-root AGENTS, app package, framework config, dependencies, sidebar, site build, default manifest, 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.
125
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.
126
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.
127
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.
@@ -392,7 +392,7 @@ through `oat-docs-analyze --ia`; it does not return to scaffold afterward.
392
392
  `ask_user` with local/external source citations. Non-repo guidance stays read-only
393
393
  and private exemplars are never copied. Cite ordered sources in the proposal
394
394
  and final summary, including the built-in path when it wins.
395
- 6. Obtain explicit approval of the selected IA before persistence. After setup,
395
+ 6. Include the anticipated total reader-page count in the proposal (exclude contributor, template and toolchain pages). Obtain explicit approval of the selected IA and count before fresh preset materialization or persistence. For a fresh empty target, transport the approved nearest preset and count using the capability-gated flags below. Existing surfaces and explicit adoption retain their preserve-and-analyze flow without preset flags. After setup,
396
396
  use apply's `record-ia` procedure: target-repo `oat pjm doctor --json` and
397
397
  adoption check before `oat decision new`, an Information architecture section
398
398
  in the framework docs-app AGENTS.md or Markdown contributing page, and shared
@@ -401,7 +401,7 @@ through `oat-docs-analyze --ia`; it does not return to scaffold afterward.
401
401
  it unrecorded. Do not silently initialize PJM. For an existing surface, hand
402
402
  off an analysis artifact plus approved recommendation IDs to apply, with
403
403
  individual approval for explicit record/restructure/tooling items.
404
- This IA selection stage does not materialize preset trees or change ownership for an existing app.
404
+ Preset materialization is CLI-owned and only for fresh empty targets; it does not record an IA decision or change ownership for an existing app.
405
405
  Sidebar ownership is separately chosen for existing framework apps; absent
406
406
  remains undeclared, Markdown ignores it, and no automatic nav generation is
407
407
  authorized by IA approval alone.
@@ -436,6 +436,7 @@ Base flags (always passed):
436
436
 
437
437
  Capability-gated flags (added only when the Capability Probe reports support):
438
438
 
439
+ - `--ia-preset {preset}` and `--planned-pages {count}` — pass together only for an explicitly approved fresh empty target, after both capabilities are advertised. IDs: `product-engineering-qa`, `consumer-maintainer`, `domain-engineering`, `task-type`, `toolkit-cli`, `flat-small`. Count is an integer of at least 1, with no implicit preset/default or interactive CLI choice. If either capability is absent, stop this handoff and recommend a CLI update. Do not substitute a file-write plan, copy templates manually, or use preset init to replace an existing surface.
439
440
  - `--site-name {siteName}` — only if `capabilities.siteNameFlag === true`. If absent, stop before scaffolding and recommend updating the CLI; do not rewrite the older template output.
440
441
  - `--no-root-patch` — only if `capabilities.noRootPatchFlag === true` and the Preflight / Conflict Resolution result says root package mutation should be skipped. This is recommended for no-root-package repositories or when the user explicitly chose no root mutation; current CLI builds also auto-skip when no root `package.json` exists, so the flag is optional documentation of intent, not a recovery mechanism.
441
442
 
@@ -445,12 +446,17 @@ Do not pass flags the CLI doesn't advertise. Never assume a flag exists because
445
446
 
446
447
  Before CLI invocation, run `$CLI_CMD docs init --help` once. Record:
447
448
 
449
+ - `iaPresetFlag` and `plannedPagesFlag`: whether `--ia-preset` and `--planned-pages` are both advertised. Require both for the approved fresh selection, including the Markdown path.
448
450
  - `siteNameFlag`: whether `--site-name` is advertised.
449
451
  - `agentsMdScaffold`: whether the installed framework template file list confirms native app-root `AGENTS.md` scaffolding; if unavailable, record unknown and verify actual output after invocation. Do not infer a CLI flag from this capability.
450
452
  - `noRootPatchFlag`: whether `--no-root-patch` is advertised.
451
453
 
452
454
  If the probe fails or returns no help, stop with the verbatim error and recommend updating or repairing the CLI. Never guess capabilities.
453
455
 
456
+ After preset init, inspect actual files and config before claiming success. At 15 or more anticipated reader pages, verify the selected track directories: triad `product/`, `engineering/`, `qa/`; consumer/maintainer `consumer/`, `maintainer/`; domain `engineering/`; task type `tutorials/`, `how-to/`, `reference/`, `explanation/`; toolkit `tools/`, `workflows/`. Below 15, or for `flat-small` at any count, verify grouped root Contents and flat reader pages instead. The exact CLI cutoff implements the approximate authoring heuristic, without selecting a different reader model. Track indexes own purpose, entry principle and useful section headings; they do not manufacture every section directory.
457
+
458
+ Verify the track table/accepted-selection guidance in framework app-root AGENTS, or Markdown `contributing.md`. Engineering stays hybrid (domain/implementation contracts alongside paired features); Product/QA enter by feature or journey. Check the applicable `contributing/templates/` subset: all ten for triad, Engineering feature plus the six operations/reference/agent shapes for domain, six for other presets. Size collapse retains the subset. Screen specs and per-area AGENTS are copyable only, never automatically instantiated. Verify `documentation.nonReaderPaths` includes `contributing/templates/**` without losing prior settings, and templates stay out of Contents, sidebar and manifest. `excludes` remains manifest-only; pinned MkDocs may still render non-reader routes and retains `use_directory_urls: false`. Run the real checker and framework nav `--check`; repair failures without suppressing rules. Keep approved-selection evidence separate from the later `record-ia` persistence/adoption result.
459
+
454
460
  After scaffolding, inspect `<appRoot>/AGENTS.md`: absence is a missing-capability finding with analyze/manual upgrade advice; any existing file is preserved. No missing-file bridge is permitted. Check template output against the current scaffold contract. Older output with missing metadata, unresolved Node-version advice, missing generated-files guidance, extension-less Contents links, duplicated agent instructions, or a Fumadocs wrapper that loses static export settings becomes a finding under `oat-docs-analyze`'s legacy scaffold checks (load that skill from installed scope and resolve `references/legacy-scaffold-checks.md` from its own directory). Record the observed path and evidence, then offer analyze; do not reinstate template patches. Ambiguous or user-authored shapes are reported for review, never overwritten.
455
461
 
456
462
  **3c. Invoke the CLI.**
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/docs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAUpC,wBAAgB,iBAAiB,IAAI,OAAO,CAU3C"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/docs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAWpC,wBAAgB,iBAAiB,IAAI,OAAO,CAW3C"}
@@ -4,12 +4,14 @@ import { createDocsApplyCommand } from './apply.js';
4
4
  import { createDocsCheckCommand } from './check/check.js';
5
5
  import { createDocsGenerateIndexCommand } from './index-generate/index.js';
6
6
  import { createDocsInitCommand } from './init/index.js';
7
+ import { createDocsLiteralsCommand } from './literals/literals.js';
7
8
  import { createDocsMigrateCommand } from './migrate/index.js';
8
9
  import { createDocsNavCommand } from './nav/index.js';
9
10
  export function createDocsCommand() {
10
11
  return new Command('docs')
11
12
  .description('OAT documentation bootstrap and maintenance commands')
12
13
  .addCommand(createDocsCheckCommand())
14
+ .addCommand(createDocsLiteralsCommand())
13
15
  .addCommand(createDocsAnalyzeCommand())
14
16
  .addCommand(createDocsApplyCommand())
15
17
  .addCommand(createDocsGenerateIndexCommand())
@@ -0,0 +1,23 @@
1
+ export declare const IA_PRESETS: readonly ['product-engineering-qa', 'consumer-maintainer', 'domain-engineering', 'task-type', 'toolkit-cli', 'flat-small'];
2
+ export type IaPreset = (typeof IA_PRESETS)[number];
3
+ export interface PresetSelection {
4
+ iaPreset?: IaPreset;
5
+ plannedPages?: number;
6
+ }
7
+ /** Validate the opt-in pair before planning or writing any scaffold files. */
8
+ export declare function resolvePresetSelection(preset?: string, count?: string | number): PresetSelection;
9
+ export declare function mergeTemplateExclusion(paths?: string[]): string[];
10
+ /** Shared narrow content plan; bodies are loaded from the bundled canonical skill. */
11
+ export declare function planPresetContent(options: PresetSelection & {
12
+ assetsRoot: string;
13
+ siteName: string;
14
+ siteDescription?: string;
15
+ markdown: boolean;
16
+ }): Promise<{
17
+ files: {
18
+ name: string;
19
+ content: string;
20
+ }[];
21
+ guidance: string;
22
+ } | null>;
23
+ //# sourceMappingURL=content.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../../../src/commands/docs/init/content.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,UAAU,YACrB,wBAAwB,EACxB,qBAAqB,EACrB,oBAAoB,EACpB,WAAW,EACX,aAAa,EACb,YAAY,CACJ,CAAC;AACX,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC;AACnD,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,8EAA8E;AAC9E,wBAAgB,sBAAsB,CACpC,MAAM,CAAC,EAAE,MAAM,EACf,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GACtB,eAAe,CAiBjB;AAmSD,wBAAgB,sBAAsB,CAAC,KAAK,GAAE,MAAM,EAAO,GAAG,MAAM,EAAE,CAErE;AAQD,sFAAsF;AACtF,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,eAAe,GAAG;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,OAAO,CAAC;CACnB,GACA,OAAO,CAAC;IACT,KAAK,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC3C,QAAQ,EAAE,MAAM,CAAC;CAClB,GAAG,IAAI,CAAC,CAwFR"}