@open-agent-toolkit/cli 0.3.27 → 0.3.29

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 (105) hide show
  1. package/README.md +8 -0
  2. package/assets/bundle-metadata.json +1 -1
  3. package/assets/docs/contributing/documentation.md +11 -2
  4. package/assets/docs/docs-tooling/add-docs-to-a-repo.md +12 -0
  5. package/assets/docs/docs-tooling/check.md +154 -0
  6. package/assets/docs/docs-tooling/commands.md +61 -11
  7. package/assets/docs/docs-tooling/index.md +1 -0
  8. package/assets/docs/docs-tooling/meta.json +7 -1
  9. package/assets/docs/docs-tooling/workflows.md +4 -0
  10. package/assets/docs/reference/cli-reference.md +2 -0
  11. package/assets/docs/reference/configuration.md +1 -0
  12. package/assets/public-package-versions.json +4 -4
  13. package/assets/skills/authoring-docs/SKILL.md +2 -2
  14. package/assets/skills/authoring-docs/references/information-architecture.md +5 -2
  15. package/assets/skills/authoring-docs/references/page-templates/alert-runbook.md +63 -0
  16. package/assets/skills/authoring-docs/references/page-templates/command-reference.md +55 -0
  17. package/assets/skills/authoring-docs/references/page-templates/decisions-pointer.md +44 -0
  18. package/assets/skills/authoring-docs/references/page-templates/engineering-feature.md +53 -0
  19. package/assets/skills/authoring-docs/references/page-templates/per-area-agents.md +42 -0
  20. package/assets/skills/authoring-docs/references/page-templates/product-feature.md +49 -0
  21. package/assets/skills/authoring-docs/references/page-templates/qa-validation.md +59 -0
  22. package/assets/skills/authoring-docs/references/page-templates/screen-spec.md +51 -0
  23. package/assets/skills/authoring-docs/references/page-templates/skill-command-guide.md +44 -0
  24. package/assets/skills/authoring-docs/references/page-templates/solution-record.md +43 -0
  25. package/assets/skills/authoring-docs/references/templates.md +22 -2
  26. package/assets/skills/oat-docs-analyze/SKILL.md +13 -2
  27. package/assets/skills/oat-docs-authoring/SKILL.md +1 -1
  28. package/assets/skills/oat-docs-authoring/references/validation.md +4 -0
  29. package/assets/skills/oat-docs-bootstrap/SKILL.md +63 -6
  30. package/assets/skills/oat-docs-bootstrap/references/pr-ci.md +89 -0
  31. package/assets/templates/docs-app-fuma/AGENTS.md +9 -2
  32. package/assets/templates/docs-app-fuma/docs/contributing/docs-toolchain.md +40 -3
  33. package/assets/templates/docs-app-fuma/docs/contributing.md +7 -1
  34. package/assets/templates/docs-app-fuma/docs/index.md +1 -1
  35. package/assets/templates/docs-app-fuma/gitignore.template +12 -0
  36. package/assets/templates/docs-app-fuma/package.json.template +2 -1
  37. package/assets/templates/docs-app-fuma/pnpm-workspace.yaml +5 -0
  38. package/assets/templates/docs-app-mkdocs/AGENTS.md +4 -2
  39. package/assets/templates/docs-app-mkdocs/docs/contributing/docs-toolchain.md +4 -2
  40. package/assets/templates/docs-app-mkdocs/docs/contributing.md +7 -1
  41. package/assets/templates/docs-app-mkdocs/docs/index.md +1 -1
  42. package/assets/templates/docs-app-mkdocs/gitignore.template +8 -0
  43. package/assets/templates/docs-app-mkdocs/package.json.template +3 -2
  44. package/dist/commands/config/index.d.ts.map +1 -1
  45. package/dist/commands/config/index.js +35 -3
  46. package/dist/commands/docs/check/check.d.ts +3 -0
  47. package/dist/commands/docs/check/check.d.ts.map +1 -0
  48. package/dist/commands/docs/check/check.js +48 -0
  49. package/dist/commands/docs/check/check.types.d.ts +17 -0
  50. package/dist/commands/docs/check/check.types.d.ts.map +1 -0
  51. package/dist/commands/docs/check/check.types.js +1 -0
  52. package/dist/commands/docs/check/checker.d.ts +8 -0
  53. package/dist/commands/docs/check/checker.d.ts.map +1 -0
  54. package/dist/commands/docs/check/checker.js +82 -0
  55. package/dist/commands/docs/check/commands.d.ts +5 -0
  56. package/dist/commands/docs/check/commands.d.ts.map +1 -0
  57. package/dist/commands/docs/check/commands.js +232 -0
  58. package/dist/commands/docs/check/diagrams.d.ts +5 -0
  59. package/dist/commands/docs/check/diagrams.d.ts.map +1 -0
  60. package/dist/commands/docs/check/diagrams.js +197 -0
  61. package/dist/commands/docs/check/files.d.ts +21 -0
  62. package/dist/commands/docs/check/files.d.ts.map +1 -0
  63. package/dist/commands/docs/check/files.js +121 -0
  64. package/dist/commands/docs/check/markdown.d.ts +60 -0
  65. package/dist/commands/docs/check/markdown.d.ts.map +1 -0
  66. package/dist/commands/docs/check/markdown.js +125 -0
  67. package/dist/commands/docs/check/mermaid-runtime.d.ts +3 -0
  68. package/dist/commands/docs/check/mermaid-runtime.d.ts.map +1 -0
  69. package/dist/commands/docs/check/mermaid-runtime.js +57 -0
  70. package/dist/commands/docs/check/navigation.d.ts +4 -0
  71. package/dist/commands/docs/check/navigation.d.ts.map +1 -0
  72. package/dist/commands/docs/check/navigation.js +104 -0
  73. package/dist/commands/docs/check/reader-rules.d.ts +6 -0
  74. package/dist/commands/docs/check/reader-rules.d.ts.map +1 -0
  75. package/dist/commands/docs/check/reader-rules.js +214 -0
  76. package/dist/commands/docs/index.d.ts.map +1 -1
  77. package/dist/commands/docs/index.js +2 -0
  78. package/dist/commands/docs/init/content.d.ts +23 -0
  79. package/dist/commands/docs/init/content.d.ts.map +1 -0
  80. package/dist/commands/docs/init/content.js +361 -0
  81. package/dist/commands/docs/init/index.d.ts +1 -0
  82. package/dist/commands/docs/init/index.d.ts.map +1 -1
  83. package/dist/commands/docs/init/index.js +40 -1
  84. package/dist/commands/docs/init/markdown.d.ts.map +1 -1
  85. package/dist/commands/docs/init/markdown.js +21 -2
  86. package/dist/commands/docs/init/resolve-options.d.ts +4 -1
  87. package/dist/commands/docs/init/resolve-options.d.ts.map +1 -1
  88. package/dist/commands/docs/init/resolve-options.js +4 -0
  89. package/dist/commands/docs/init/scaffold.d.ts +1 -0
  90. package/dist/commands/docs/init/scaffold.d.ts.map +1 -1
  91. package/dist/commands/docs/init/scaffold.js +57 -4
  92. package/dist/commands/docs/nav/contents.d.ts +4 -0
  93. package/dist/commands/docs/nav/contents.d.ts.map +1 -1
  94. package/dist/commands/docs/nav/contents.js +10 -0
  95. package/dist/config/documentation-check.d.ts +38 -0
  96. package/dist/config/documentation-check.d.ts.map +1 -0
  97. package/dist/config/documentation-check.js +132 -0
  98. package/dist/config/oat-config.d.ts +2 -0
  99. package/dist/config/oat-config.d.ts.map +1 -1
  100. package/dist/config/oat-config.js +4 -0
  101. package/dist/config/resolve.d.ts.map +1 -1
  102. package/dist/config/resolve.js +1 -0
  103. package/dist/release/public-package-contract.d.ts.map +1 -1
  104. package/dist/release/public-package-contract.js +13 -0
  105. package/package.json +11 -2
@@ -0,0 +1,53 @@
1
+ ---
2
+ title: Engineering feature
3
+ description: Implementation contracts and testing seams for one feature.
4
+ ---
5
+
6
+ # Engineering feature
7
+
8
+ ## Routes and params
9
+
10
+ List verified routes, parameters, defaults and validation boundaries.
11
+
12
+ ## Primary files
13
+
14
+ Link implementation entry points and explain each file's responsibility.
15
+
16
+ ## Data and state
17
+
18
+ Describe ownership, lifecycle, persistence and shared contracts; link domain references.
19
+
20
+ ## Flags
21
+
22
+ List verified flags and rollout/configuration behavior; state unknown when unverified.
23
+
24
+ ## Failure modes and constraints
25
+
26
+ Describe failure propagation, recovery and supported limits with source references.
27
+
28
+ ## Testing seams
29
+
30
+ Identify setup, injection boundaries and observable assertions without claiming coverage.
31
+
32
+ ## Paired documentation
33
+
34
+ Link the Product feature and QA validation pages. Engineering is hybrid: domain and
35
+ implementation contracts coexist with paired feature pages, without duplicating facts.
36
+
37
+ ## Source references
38
+
39
+ Cite source paths and symbols supporting each implementation claim.
40
+
41
+ ## Writing and evidence rules
42
+
43
+ Use backticks only for literals verified verbatim in source, such as commands,
44
+ errors, labels and identifiers. Write concepts in ordinary prose. Cite the
45
+ source location for each verified literal; label unknown facts as unknown.
46
+ Remove drafting prompts before publishing and retain owner-review gaps explicitly.
47
+
48
+ Keep these three evidence classes separate:
49
+
50
+ - Planned automation: intended coverage, with owner and remaining work.
51
+ - Implemented assertions: the test path and the exact assertion it implements.
52
+ - Dated execution evidence: date, environment/configuration, result and evidence
53
+ location. Implemented assertions alone do not prove a successful execution.
@@ -0,0 +1,42 @@
1
+ ---
2
+ title: Per-area AGENTS
3
+ description: Local authoring instructions excluded from reader navigation.
4
+ ---
5
+
6
+ # Per-area AGENTS
7
+
8
+ ## Audience
9
+
10
+ Name the reader and agent work contexts this area serves.
11
+
12
+ ## Voice
13
+
14
+ Describe the area's vocabulary, level of detail and evidence expectations.
15
+
16
+ ## Belongs here versus elsewhere
17
+
18
+ State the entry principle, canonical facts owned here and routes to adjacent areas.
19
+
20
+ ## Cross-area triggers
21
+
22
+ Name changes requiring paired Product/Engineering/QA pages or shared-contract review.
23
+
24
+ ## Verification
25
+
26
+ List the actual checks and review process for this area. Keep this instruction file
27
+ out of reader Contents and navigation. This copyable template does not automatically
28
+ create per-track AGENTS files; reconcile ancestor instructions before adopting it.
29
+
30
+ ## Writing and evidence rules
31
+
32
+ Use backticks only for literals verified verbatim in source, such as commands,
33
+ errors, labels and identifiers. Write concepts in ordinary prose. Cite the
34
+ source location for each verified literal; label unknown facts as unknown.
35
+ Remove drafting prompts before publishing and retain owner-review gaps explicitly.
36
+
37
+ Keep these three evidence classes separate:
38
+
39
+ - Planned automation: intended coverage, with owner and remaining work.
40
+ - Implemented assertions: the test path and the exact assertion it implements.
41
+ - Dated execution evidence: date, environment/configuration, result and evidence
42
+ location. Implemented assertions alone do not prove a successful execution.
@@ -0,0 +1,49 @@
1
+ ---
2
+ title: Product feature
3
+ description: Intended behavior and reader-visible boundaries for one feature or journey.
4
+ ---
5
+
6
+ # Product feature
7
+
8
+ ## Availability and entry points
9
+
10
+ Describe who can use the feature, prerequisites and supported entry points.
11
+ Identify unavailable contexts without guessing rollout status.
12
+
13
+ ## Expected journey
14
+
15
+ Describe the reader's goal, starting state, numbered actions and observable result.
16
+
17
+ ## Behavior rules
18
+
19
+ State the rules and permissions that determine the result; link canonical shared rules.
20
+
21
+ ## States and edge cases
22
+
23
+ Cover loading, empty, success, denied and failed states that source supports.
24
+
25
+ ## External boundary
26
+
27
+ Name external systems and where this feature stops owning behavior.
28
+
29
+ ## Paired documentation
30
+
31
+ Link the Engineering feature and QA validation pages using matching feature names.
32
+
33
+ ## Evidence and owner-review gaps
34
+
35
+ Cite implementation/product evidence and name unconfirmed behavior and its reviewer.
36
+
37
+ ## Writing and evidence rules
38
+
39
+ Use backticks only for literals verified verbatim in source, such as commands,
40
+ errors, labels and identifiers. Write concepts in ordinary prose. Cite the
41
+ source location for each verified literal; label unknown facts as unknown.
42
+ Remove drafting prompts before publishing and retain owner-review gaps explicitly.
43
+
44
+ Keep these three evidence classes separate:
45
+
46
+ - Planned automation: intended coverage, with owner and remaining work.
47
+ - Implemented assertions: the test path and the exact assertion it implements.
48
+ - Dated execution evidence: date, environment/configuration, result and evidence
49
+ location. Implemented assertions alone do not prove a successful execution.
@@ -0,0 +1,59 @@
1
+ ---
2
+ title: QA validation
3
+ description: Reproducible behavioral validation for one feature or journey.
4
+ ---
5
+
6
+ # QA validation
7
+
8
+ ## Scope
9
+
10
+ Name the behavior, supported platforms and paired Product and Engineering pages.
11
+
12
+ ## Named seeds
13
+
14
+ Name each reproducible account/data seed, setup procedure and preconditions. Do not
15
+ include credentials or real personal data; document safe provisioning instead.
16
+
17
+ ## Configuration matrix
18
+
19
+ List relevant versions, flags, permissions, data states and platform combinations.
20
+
21
+ ## Scenarios
22
+
23
+ | ID | Priority | Given | When | Then (exact copy) | Evidence | Automation |
24
+ | ----------- | ---------- | ---------------------- | -------- | --------------------------------------- | ------------------------------ | --------------------------------------- |
25
+ | <stable ID> | <priority> | <named seed and state> | <action> | <verified observable result or unknown> | <dated result link or not run> | <planned or implemented test reference> |
26
+
27
+ ## Ready signal
28
+
29
+ State the observable signal that setup and asynchronous work are ready before acting.
30
+
31
+ ## Cleanup
32
+
33
+ Give reset/removal steps and verify that seeds and side effects are cleaned up.
34
+
35
+ ## Platform deltas
36
+
37
+ Document supported differences, including locators and expected results.
38
+
39
+ ## External boundary
40
+
41
+ Name external behavior that requires another owner or test environment.
42
+
43
+ ## Out of scope
44
+
45
+ Explain excluded behaviors and who verifies them. Keep owner-review gaps visible.
46
+
47
+ ## Writing and evidence rules
48
+
49
+ Use backticks only for literals verified verbatim in source, such as commands,
50
+ errors, labels and identifiers. Write concepts in ordinary prose. Cite the
51
+ source location for each verified literal; label unknown facts as unknown.
52
+ Remove drafting prompts before publishing and retain owner-review gaps explicitly.
53
+
54
+ Keep these three evidence classes separate:
55
+
56
+ - Planned automation: intended coverage, with owner and remaining work.
57
+ - Implemented assertions: the test path and the exact assertion it implements.
58
+ - Dated execution evidence: date, environment/configuration, result and evidence
59
+ location. Implemented assertions alone do not prove a successful execution.
@@ -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(pnpm:*), Bash(bash:*), Bash(jq:*), Bash(node:*), Bash(mkdir:*), Bash(date:*), Bash(echo:*), Bash(cd:*), Bash(pwd:*), Glob, Grep, AskUserQuestion, Task
7
+ allowed-tools: Read, Write, Bash(git:*), Bash(oat config:*), Bash(oat docs nav sync --check:*), Bash(oat docs check:*), Bash(pnpm:*), Bash(bash:*), Bash(jq:*), Bash(node:*), Bash(mkdir:*), Bash(date:*), Bash(echo:*), Bash(cd:*), Bash(pwd:*), Glob, Grep, AskUserQuestion, Task
8
8
  metadata:
9
- version: '1.7.2'
9
+ version: '1.7.3'
10
10
  ---
11
11
 
12
12
  # Docs Analysis
@@ -457,6 +457,17 @@ where the docs should live, and what specific subtopics the codebase shows shoul
457
457
 
458
458
  ### Step 6: Check Navigation and Drift
459
459
 
460
+ Probe the installed `oat docs check --help`, then run its read-only
461
+ `oat docs check --target-dir <resolved-root> --json` (or the repo’s documented
462
+ source/local CLI equivalent). Retain exact findings and exit; errors fail while
463
+ warning-only passes. Use stable rule IDs/locations as evidence for recommendations,
464
+ including reader limits, contributor commands, Mermaid/SVG and provenance. It
465
+ executes no page code or documented commands and needs no build. Missing capability
466
+ or unusable Git diagram base is explicitly unverified. Preserve specialized local
467
+ validators; portable success does not establish coverage or claim accuracy. Review
468
+ narrow reason-bearing exceptions from actual config, never invent blanket
469
+ suppressions or automatic navigation ownership.
470
+
460
471
  If a generated root index or manifest exists:
461
472
 
462
473
  1. Compare generated entries with the authored `## Contents` graph.
@@ -6,7 +6,7 @@ disable-model-invocation: false
6
6
  allowed-tools: Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion
7
7
  user-invocable: true
8
8
  metadata:
9
- version: '1.2.0'
9
+ version: '1.2.1'
10
10
  ---
11
11
 
12
12
  # OAT Docs Authoring
@@ -45,6 +45,10 @@ When navigation, file placement, or `## Contents` changes:
45
45
  If generated output is ignored, absent by policy, or cannot be produced in the
46
46
  current environment, record the exact reason in the handoff.
47
47
 
48
+ ## Portable checker
49
+
50
+ Run the installed `oat docs check --target-dir <resolved-root> --json` when available, or the repository’s documented source/local CLI equivalent. It is read-only and needs no site build. Keep findings and exit: errors fail, warning-only passes. Review warnings, repair authored metadata/maps/links and explicitly sync owned navigation; never add blanket exclusions to pass. Missing CLI capability is unverified, not a successful check. Preserve existing app-specific validators. See the installed checker command docs for stable rule IDs and narrow reason-bearing `documentation.check` exceptions.
51
+
48
52
  ## Local Contract Checks
49
53
 
50
54
  Before finishing:
@@ -6,7 +6,7 @@ disable-model-invocation: true
6
6
  user-invocable: true
7
7
  allowed-tools: Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion
8
8
  metadata:
9
- version: '1.4.3'
9
+ version: '1.4.5'
10
10
  ---
11
11
 
12
12
  # Docs Bootstrap
@@ -40,6 +40,8 @@ Bootstrap or adopt documentation in this repo and guide the user through underst
40
40
  - Inspecting native scaffold capabilities and reporting missing current-template guidance without rewriting it
41
41
  - Running install + build and classifying failures against known patterns
42
42
  - Reading `.oat/config.json` back to verify paths and prompting for `requireForProjectCompletion`
43
+ - Presenting concrete PR CI edits from `references/pr-ci.md`, writing only the approved diff while preserving existing workflows
44
+ - Presenting the exact effective-install-root compatibility policy below and writing only that approved root-policy edit while preserving existing settings/conflicts
43
45
  - Narrating the scaffolded output as a chunked educational walkthrough
44
46
  - Delegating optional initial content population to `oat-docs-analyze` + `oat-docs-apply`
45
47
 
@@ -118,8 +120,8 @@ The detailed framework procedures below apply to Fumadocs/MkDocs. When the selec
118
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.
119
121
  Before Markdown CLI invocation, run **Step 2.5** for fresh setup and explicitly selected adoption; it is not bypassed by this condensed path.
120
122
 
121
- 3. **Invoke CLI:** Probe `$CLI_CMD docs init --help` and require advertised Markdown/`--adopt` support before invocation; if missing, report the needed CLI update rather than fabricating scaffold files. Run `$CLI_CMD docs init --framework markdown --target-dir <root> --site-name <title> --description <description> --lint none --format none --yes`, adding `--adopt` only for explicit adoption. Pass the selected lint/format values when using existing tools. Never pass app-only flags. An optional `--dry-run` previews file/config/guidance changes without writes; it does not count as a completed bootstrap. Capture terminal/JSON results, exact exit, created/preserved files, config changes, guidance action, and audit advice. `partial`/exit 1 with manual-required or blocked guidance means unresolved guidance; real runs may have created files, whereas dry-runs have only planned files. Report actual state and stop before claiming completion. Other refusals also stop without template repairs. For success, read config back to resolve the actual content root and authored index.
122
- 4. **Verify files:** Print `[4/7] Verifying files…`. Check config root/index, baseline file existence, nonempty `title`/`description`, useful audience/scope context and populated `## Contents` links resolving to actual sibling pages or child `index.md`s. Honor excludes and asset-only exceptions; preserve local AGENTS instructions. Fresh setup creates only authored `index.md` and `contributing.md` in the target; verify no docs-root AGENTS, app package, framework config, dependencies, or root build changes. Run already documented lint/link/format checks when applicable; otherwise inspect files/links directly. Adoption preserves existing bytes and may leave missing child indexes, metadata, context, or links: record these as audit gaps for analyze/apply rather than repairing them or calling the tree fully conformant. Distinguish successful setup verification from content-conformance findings.
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.
123
125
  5. **Inspect config:** `documentation.tooling` is the string `markdown`; `root` is the literal content directory; `index` is its authored entrypoint, normally `<root>/index.md`. Markdown introduces no `documentation.config`. Preserve unrelated config/excludes/completion settings. Verify deterministic managed root Documentation guidance names that root, Markdown tooling, authored index, and `<root>/contributing.md`; preserve manual/local guidance and surface unresolved disposition. The Step 5e completion opt-in remains available using the docs root rather than an app name, without silently changing an existing value. No nested app-config reconciliation or framework patch inspection applies.
124
126
  6. **Walkthrough:** In short chunks, show actual config and `<root>/index.md`: useful context plus the Contents map, title/description metadata, sibling `page.md` and child `section/index.md` links, exclusions and asset-only exceptions. Explain adding a page/section and updating the nearest authored map without overwriting existing context. Root AGENTS Documentation guidance and `<root>/contributing.md` establish agent/human conventions; a preexisting local AGENTS file remains authoritative, but bootstrap creates none. Authored indexes are edited directly. Optional generated inventories require explicit external output, e.g. `$CLI_CMD docs generate-index --docs-dir <root> --output .oat/docs-manifest.md`; output must stay outside the full configured content root and cannot overwrite the configured authored index even with a narrowed `--docs-dir`. Generation does not repoint `documentation.index`. Markdown bootstrap never generates a manifest automatically. Skip framework deep dives and preview-server/build commands.
125
127
  7. **Audit handoff and summary:** Offer `oat-docs-analyze` against the literal configured root, followed by `oat-docs-apply` only for approved repairs. An adopted incomplete tree needs that audit; config/guidance alone prove no full conformance. Explain `oat-project-document` for source-backed project deltas. Summarize tooling, actual root/authored index, created/preserved files, guidance/config disposition, ordered IA guidance locators/provenance and proposal recommendation/conflicts, file-check outcomes, unresolved audit gaps, optional manifest ownership, and exact skill handoff. For dry-run/partial/refusal, label the outcome accordingly rather than printing BOOTSTRAP COMPLETE. No app, install, build, patch, or dev-command fields apply.
@@ -390,7 +392,7 @@ through `oat-docs-analyze --ia`; it does not return to scaffold afterward.
390
392
  `ask_user` with local/external source citations. Non-repo guidance stays read-only
391
393
  and private exemplars are never copied. Cite ordered sources in the proposal
392
394
  and final summary, including the built-in path when it wins.
393
- 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,
394
396
  use apply's `record-ia` procedure: target-repo `oat pjm doctor --json` and
395
397
  adoption check before `oat decision new`, an Information architecture section
396
398
  in the framework docs-app AGENTS.md or Markdown contributing page, and shared
@@ -399,7 +401,7 @@ through `oat-docs-analyze --ia`; it does not return to scaffold afterward.
399
401
  it unrecorded. Do not silently initialize PJM. For an existing surface, hand
400
402
  off an analysis artifact plus approved recommendation IDs to apply, with
401
403
  individual approval for explicit record/restructure/tooling items.
402
- 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.
403
405
  Sidebar ownership is separately chosen for existing framework apps; absent
404
406
  remains undeclared, Markdown ignores it, and no automatic nav generation is
405
407
  authorized by IA approval alone.
@@ -416,7 +418,7 @@ Print `[3/7] Scaffolding…` at the start of this step.
416
418
 
417
419
  For an explicitly fresh Fumadocs/MkDocs app, current CLI init writes `documentation.navOwner: nav-sync` and generates navigation after successful scaffold/config. An explicitly selected new app in a repository with prior docs config is fresh creation; preserve the old app's authored files. This does not authorize regeneration of an existing app: keep undeclared/hand-authored ownership untouched and use the existing analyze/apply handoff. IA approval alone never authorizes navigation writes. Markdown and dry runs run no nav sync.
418
420
 
419
- Inspect the generated package scripts rather than adding a duplicate patch: Fumadocs `prebuild` and MkDocs `docs:build` run `nav sync --check`, using external `oat` from the app directory with `--target-dir .`, or source-workspace CLI with the explicit quoted repo-relative app. A stale navigation check requires fixing authored Contents and explicitly syncing owned navigation before retrying, not deleting the check or silently regenerating an undeclared owner.
421
+ Inspect the generated package scripts rather than adding a duplicate patch: `docs:check` runs the portable checker and MkDocs `test` runs the same real check. Framework builds run the checker before navigation/build. Fumadocs `prebuild` and MkDocs `docs:build` run `nav sync --check`, using external `oat` from the app directory with `--target-dir .`, or source-workspace CLI with the explicit quoted repo-relative app. A stale navigation check requires fixing authored Contents and explicitly syncing owned navigation before retrying, not deleting the check or silently regenerating an undeclared owner.
420
422
 
421
423
  **3a. Assemble CLI flags.**
422
424
 
@@ -434,6 +436,7 @@ Base flags (always passed):
434
436
 
435
437
  Capability-gated flags (added only when the Capability Probe reports support):
436
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.
437
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.
438
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.
439
442
 
@@ -443,12 +446,17 @@ Do not pass flags the CLI doesn't advertise. Never assume a flag exists because
443
446
 
444
447
  Before CLI invocation, run `$CLI_CMD docs init --help` once. Record:
445
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.
446
450
  - `siteNameFlag`: whether `--site-name` is advertised.
447
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.
448
452
  - `noRootPatchFlag`: whether `--no-root-patch` is advertised.
449
453
 
450
454
  If the probe fails or returns no help, stop with the verbatim error and recommend updating or repairing the CLI. Never guess capabilities.
451
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
+
452
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.
453
461
 
454
462
  **3c. Invoke the CLI.**
@@ -516,6 +524,40 @@ Print `[4/7] Verifying build…` at the start of this step.
516
524
 
517
525
  Skip this step entirely if `Scaffold Result.scaffoldSucceeded !== true` — a failed scaffold produces an undefined state; installing and building on top of it makes things worse.
518
526
 
527
+ **4a prerequisite: inspect and approve Fumadocs install-root policy.**
528
+
529
+ Before running install, read the CLI's `installationAdvice` and the generated
530
+ toolchain guide. Locate the actual pnpm installation root, including any enclosing
531
+ `pnpm-workspace.yaml`; a workspace member's package is not that root. Current
532
+ Fumadocs loses handler properties added by `mdast-util-to-markdown` 2.2.0, so valid
533
+ bold/italic content can fail compilation. Preserve all content and framework APIs.
534
+ The required compatibility constraint is exactly 2.1.2 in the effective root's
535
+ `pnpm-workspace.yaml`:
536
+
537
+ ```yaml
538
+ overrides:
539
+ mdast-util-to-markdown: 2.1.2
540
+ ```
541
+
542
+ A newly scaffolded independent app has its own root YAML (`packages: []` plus
543
+ this override); inspect it and install there. The CLI never creates this boundary
544
+ in monorepo mode or under an enclosing pnpm workspace. For an existing workspace
545
+ root, PRESENT the exact concrete YAML diff and obtain explicit approval before
546
+ writing it. Preserve package globs and all unrelated settings; add the entry to
547
+ an existing `overrides` map, never duplicate the map or replace the file. A
548
+ conflicting existing pin requires the owner's decision; a declined/skipped edit
549
+ stays a manual setup requirement and verification remains pending. Do not create
550
+ a local boundary that splits a workspace member. Do not implement a policy merger
551
+ or silently extend CLI root-package patching: it changes build scripts only,
552
+ and `--no-root-patch` neither sets nor approves dependency policy.
553
+
554
+ Honor the selected manager (pnpm 10+); effective-root YAML works in pnpm 10 and 12.
555
+ A member-only override is ignored in 10, and 12 also ignores `package.json`'s
556
+ `pnpm.overrides`. After install, inspect actual `pnpm why mdast-util-to-markdown`
557
+ from that root, confirm 2.1.2, retain the root config/lockfile, then run checker and
558
+ build. Label this a constrained fresh install; do not promise unconstrained
559
+ resolution, change user-scope pnpm, or delete bold/italic to avoid the failure.
560
+
519
561
  **4a. Install dependencies.**
520
562
 
521
563
  Command varies by repo shape (from Preflight Result) and framework (Fumadocs only uses pnpm; MkDocs uses Python tooling — handled in the MkDocs Minimum Contract, Step 6):
@@ -526,6 +568,8 @@ Command varies by repo shape (from Preflight Result) and framework (Fumadocs onl
526
568
 
527
569
  For Fumadocs, capture both stdout and stderr. Print a start line (`Installing dependencies…`) and a completion line with duration.
528
570
 
571
+ Before building, run `$CLI_CMD docs check --target-dir <configured-root>` from the repo root. Keep its JSON/findings and exit; metadata/maps/links, contributor commands and real Mermaid syntax are checked without executing page code. Errors stop verification; review warnings and route content repairs through analyze/apply. Never add blanket suppressions to pass bootstrap.
572
+
529
573
  **4b. Build.**
530
574
 
531
575
  Command varies by shape:
@@ -572,6 +616,7 @@ Record internally for the Post-Scaffold Inspector and Walkthrough:
572
616
 
573
617
  ```
574
618
  Verification Result:
619
+ installRootPolicy: { path, disposition: 'scaffolded' | 'approved' | 'manual' | 'conflict', resolvedVersion } | null
575
620
  installSucceeded: boolean
576
621
  buildSucceeded: boolean
577
622
  knownIssues: Array<{ pattern, severity: 'benign' | 'flagged' | 'surface-only' | 'auto-fixed', detail }>
@@ -670,6 +715,16 @@ Inspection Result:
670
715
 
671
716
  The Walkthrough's Section D (Configuration readback) references `issues[]` verbatim — format it so it reads cleanly when printed to the user.
672
717
 
718
+ **PR CI wiring (after config inspection):** Load `references/pr-ci.md` now.
719
+ Resolve its concrete inputs from the inspected config/scripts, present the exact
720
+ workflow diff, and write only after approval. Preserve existing workflow content
721
+ and use full-history checkout/fetch for the applicable diagram base. Execute its
722
+ checker, real framework build and configured-manifest freshness commands locally;
723
+ record exits and unverified portions. Markdown follows the same recipe with no
724
+ build/default manifest. Include the approved workflow path or declined/pending
725
+ status in the exit summary. This is bootstrap setup authority, not permission to
726
+ rewrite an existing app or introduce deployment.
727
+
673
728
  ### Step 6: Educational Walkthrough
674
729
 
675
730
  Narrate the scaffolded docs app as a chunked conversation, not a wall of text. The Walkthrough's job is to turn the user from "I ran a scaffold" into "I know how this docs app works". It is **not** a re-explanation of the CLI's output, nor a recitation of the AGENTS.md content — both are live files the user can read; the Walkthrough contextualizes them.
@@ -883,6 +938,8 @@ Agent guidance:
883
938
  Build:
884
939
  - Install: {ok | known-issue: ...}
885
940
  - Build: {ok | known-issue: ...}
941
+ - Install policy: {effective-root YAML + resolved 2.1.2 | manual/conflict/pending; constrained install}
942
+ - PR CI: {approved workflow path + checker/build/freshness exits | declined | pending}
886
943
  - Known issues (from Verification Result.knownIssues): {list or 'none'}
887
944
 
888
945
  Inspection: