@open-agent-toolkit/cli 0.1.20 → 0.1.22

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 (63) hide show
  1. package/assets/agents/oat-reviewer.md +48 -10
  2. package/assets/docs/cli-utilities/config-and-local-state.md +12 -0
  3. package/assets/docs/cli-utilities/configuration.md +19 -1
  4. package/assets/docs/contributing/documentation.md +6 -2
  5. package/assets/docs/docs-tooling/add-docs-to-a-repo.md +24 -14
  6. package/assets/docs/docs-tooling/commands.md +16 -14
  7. package/assets/docs/docs-tooling/workflows.md +22 -9
  8. package/assets/docs/reference/cli-reference.md +6 -2
  9. package/assets/docs/reference/docs-index-contract.md +28 -6
  10. package/assets/docs/reference/index.md +1 -1
  11. package/assets/docs/workflows/projects/implementation-execution.md +1 -1
  12. package/assets/docs/workflows/projects/reviews.md +41 -0
  13. package/assets/docs/workflows/skills/index.md +3 -1
  14. package/assets/public-package-versions.json +4 -4
  15. package/assets/skills/authoring-docs/SKILL.md +135 -0
  16. package/assets/skills/authoring-docs/references/categories.md +251 -0
  17. package/assets/skills/authoring-docs/references/information-architecture.md +156 -0
  18. package/assets/skills/authoring-docs/references/page-types.md +119 -0
  19. package/assets/skills/authoring-docs/references/principles.md +98 -0
  20. package/assets/skills/authoring-docs/references/review-rubric.md +169 -0
  21. package/assets/skills/authoring-docs/references/templates.md +549 -0
  22. package/assets/skills/authoring-docs/references/workflow.md +133 -0
  23. package/assets/skills/authoring-docs/references/writing-style.md +128 -0
  24. package/assets/skills/oat-agent-instructions-analyze/SKILL.md +43 -13
  25. package/assets/skills/oat-docs-analyze/SKILL.md +183 -28
  26. package/assets/skills/oat-docs-analyze/references/analysis-artifact-template.md +101 -1
  27. package/assets/skills/oat-docs-analyze/references/directory-assessment-criteria.md +16 -0
  28. package/assets/skills/oat-docs-analyze/references/quality-checklist.md +83 -3
  29. package/assets/skills/oat-docs-authoring/SKILL.md +193 -0
  30. package/assets/skills/oat-docs-authoring/references/docs-root-resolution.md +64 -0
  31. package/assets/skills/oat-docs-authoring/references/lifecycle-boundaries.md +51 -0
  32. package/assets/skills/oat-docs-authoring/references/oat-fumadocs-contract.md +77 -0
  33. package/assets/skills/oat-docs-authoring/references/targeted-authoring-workflow.md +61 -0
  34. package/assets/skills/oat-docs-authoring/references/validation.md +61 -0
  35. package/assets/skills/oat-docs-bootstrap/SKILL.md +15 -11
  36. package/assets/skills/oat-docs-bootstrap/assets/AGENTS.md.template +5 -5
  37. package/assets/skills/oat-project-discover/SKILL.md +22 -4
  38. package/assets/skills/oat-project-import-plan/SKILL.md +38 -9
  39. package/assets/skills/oat-project-plan/SKILL.md +30 -7
  40. package/assets/skills/oat-project-plan-writing/SKILL.md +45 -2
  41. package/assets/skills/oat-project-progress/SKILL.md +9 -3
  42. package/assets/skills/oat-project-quick-start/SKILL.md +40 -8
  43. package/assets/skills/oat-project-review-provide/SKILL.md +24 -11
  44. package/assets/skills/oat-project-review-receive/SKILL.md +37 -17
  45. package/dist/commands/config/index.d.ts.map +1 -1
  46. package/dist/commands/config/index.js +36 -0
  47. package/dist/commands/index.d.ts.map +1 -1
  48. package/dist/commands/index.js +2 -0
  49. package/dist/commands/init/tools/shared/skill-manifest.d.ts +1 -1
  50. package/dist/commands/init/tools/shared/skill-manifest.d.ts.map +1 -1
  51. package/dist/commands/init/tools/shared/skill-manifest.js +2 -0
  52. package/dist/commands/review/index.d.ts +3 -0
  53. package/dist/commands/review/index.d.ts.map +1 -0
  54. package/dist/commands/review/index.js +7 -0
  55. package/dist/commands/review/latest.d.ts +23 -0
  56. package/dist/commands/review/latest.d.ts.map +1 -0
  57. package/dist/commands/review/latest.js +182 -0
  58. package/dist/config/oat-config.d.ts +5 -0
  59. package/dist/config/oat-config.d.ts.map +1 -1
  60. package/dist/config/oat-config.js +12 -0
  61. package/dist/config/resolve.d.ts.map +1 -1
  62. package/dist/config/resolve.js +4 -0
  63. package/package.json +2 -2
@@ -0,0 +1,128 @@
1
+ ---
2
+ title: Writing Style
3
+ description: Style rules for clear, direct, maintainable technical documentation.
4
+ ---
5
+
6
+ # Writing Style
7
+
8
+ Technical documentation should be plain, specific, and useful under pressure.
9
+ The reader should not have to decode tone, chase implied context, or guess
10
+ whether a statement is current.
11
+
12
+ ## Voice
13
+
14
+ Use a direct, practical voice.
15
+
16
+ Prefer:
17
+
18
+ ```md
19
+ Run the tests before opening a pull request.
20
+ ```
21
+
22
+ Avoid:
23
+
24
+ ```md
25
+ It is recommended that tests are run prior to the opening of a pull request.
26
+ ```
27
+
28
+ ## Active Voice and Specific Nouns
29
+
30
+ Active voice makes responsibility clear. Specific nouns make actions
31
+ verifiable.
32
+
33
+ Weak:
34
+
35
+ ```md
36
+ The cache is invalidated after the migration is run.
37
+ ```
38
+
39
+ Stronger:
40
+
41
+ ```md
42
+ The deploy workflow invalidates the Fastly cache after the migration finishes.
43
+ ```
44
+
45
+ ## Avoid False Ease
46
+
47
+ Avoid words that make complex tasks sound trivial:
48
+
49
+ - just
50
+ - simply
51
+ - obviously
52
+ - easy
53
+ - basically
54
+
55
+ Replace hidden assumptions with exact steps, commands, or links.
56
+
57
+ ## Avoid Tribal Knowledge
58
+
59
+ Do not write "use the usual process" or "deploy normally." Name the workflow,
60
+ environment, command, approval requirement, and verification path when known.
61
+
62
+ ## Define Acronyms on First Use
63
+
64
+ Define acronyms the first time they appear. If an acronym is used only once,
65
+ avoid introducing it.
66
+
67
+ ## Prefer Present Tense
68
+
69
+ Use future tense only for future behavior that is planned and dated. Avoid
70
+ stale words such as `new`, `soon`, `currently`, `temporary`, `eventually`, and
71
+ `recent` without a date or issue link.
72
+
73
+ ## Use Concrete Examples
74
+
75
+ Show copyable examples with expected output when possible. Expected output helps
76
+ humans verify success and helps agents reason about command behavior.
77
+
78
+ ## Warn Only for Real Risk
79
+
80
+ Use warnings for production impact, destructive operations, security concerns,
81
+ and irreversible behavior.
82
+
83
+ ```md
84
+ > [!WARNING]
85
+ > This command deletes all pending jobs in the queue. Run it only during an
86
+ > active incident after confirming the queue contents.
87
+ ```
88
+
89
+ Use notes for useful context, not ordinary tips.
90
+
91
+ ## Markdown Rules
92
+
93
+ - Use one `#` heading per page.
94
+ - Do not skip heading levels.
95
+ - Use fenced code blocks with language identifiers.
96
+ - Use `sh` for shell commands.
97
+ - Use `txt` for command output.
98
+ - Do not include shell prompts unless the prompt itself matters.
99
+ - Use angle brackets for placeholders, such as `<environment>`.
100
+ - Explain every placeholder.
101
+ - Use descriptive link text.
102
+ - Use tables for reference data, not long prose.
103
+
104
+ ## Headings Should Be Descriptive
105
+
106
+ Weak headings:
107
+
108
+ ```md
109
+ ## Stuff
110
+
111
+ ## More
112
+
113
+ ## Notes
114
+
115
+ ## Misc
116
+ ```
117
+
118
+ Stronger headings:
119
+
120
+ ```md
121
+ ## Configure environment variables
122
+
123
+ ## Run database migrations
124
+
125
+ ## Verify the deployment
126
+
127
+ ## Roll back a failed deploy
128
+ ```
@@ -1,10 +1,10 @@
1
1
  ---
2
2
  name: oat-agent-instructions-analyze
3
- version: 1.10.0
3
+ version: 1.11.0
4
4
  description: Run when you need to evaluate agent instruction file coverage, quality, and drift. Produces a severity-rated analysis artifact. Run before oat-agent-instructions-apply to identify what needs improvement.
5
5
  disable-model-invocation: true
6
6
  user-invocable: true
7
- allowed-tools: Read, Write, Bash(git:*), Glob, Grep, AskUserQuestion
7
+ allowed-tools: Read, Write, Bash(git:*), Glob, Grep, AskUserQuestion, Task
8
8
  ---
9
9
 
10
10
  # Agent Instructions Analysis
@@ -32,6 +32,7 @@ Scan, evaluate, and report on agent instruction file coverage, quality, and drif
32
32
  - Reading all instruction files and project configuration.
33
33
  - Running helper scripts for discovery.
34
34
  - Writing analysis artifact to `.oat/repo/analysis/`.
35
+ - Reviewing and correcting the analysis artifact and companion bundle through the shared Auto Artifact-Review Loop.
35
36
  - Updating `.oat/tracking.json`.
36
37
 
37
38
  ## Analyze vs Apply Boundary
@@ -58,16 +59,17 @@ or fill in missing evidence gaps on its own.
58
59
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
59
60
 
60
61
  - Step indicators:
61
- - `[1/10] Resolving providers + mode…`
62
- - `[2/10] Discovering instruction files…`
63
- - `[3/10] Discovering documentation surfaces…`
64
- - `[4/10] Evaluating quality + validating existing rules…`
65
- - `[5/10] Assessing directory coverage gaps…`
66
- - `[6/10] Discovering file-type patterns…`
67
- - `[7/10] Checking for drift…`
68
- - `[8/10] Checking cross-format consistency…`
69
- - `[9/10] Writing analysis artifact…`
70
- - `[10/10] Updating tracking + summary…`
62
+ - `[1/11] Resolving providers + mode…`
63
+ - `[2/11] Discovering instruction files…`
64
+ - `[3/11] Discovering documentation surfaces…`
65
+ - `[4/11] Evaluating quality + validating existing rules…`
66
+ - `[5/11] Assessing directory coverage gaps…`
67
+ - `[6/11] Discovering file-type patterns…`
68
+ - `[7/11] Checking for drift…`
69
+ - `[8/11] Checking cross-format consistency…`
70
+ - `[9/11] Writing analysis artifact…`
71
+ - `[10/11] Reviewing artifact accuracy…`
72
+ - `[11/11] Updating verified tracking + summary…`
71
73
 
72
74
  ## Process
73
75
 
@@ -435,7 +437,32 @@ The markdown artifact and companion bundle together are the contract for apply.
435
437
  recommendation that requires judgment during generation
436
438
  - stable recommendation IDs and pack references for any recommendation that apply may execute
437
439
 
438
- ### Step 9: Update Tracking and Output Summary
440
+ ### Step 9: Review Analysis Artifact Accuracy
441
+
442
+ Run the shared **Auto Artifact-Review Loop** from `oat-project-plan-writing` after `$ARTIFACT_PATH` and `$BUNDLE_DIR` are written and before tracking is updated or `oat-agent-instructions-apply` is recommended.
443
+
444
+ Use the `analysis` target:
445
+
446
+ - `type: analysis`
447
+ - `scope: agent-instructions`
448
+ - `analysis_artifact: $ARTIFACT_PATH`
449
+ - `oat_output_mode: structured`
450
+
451
+ Follow the canonical loop exactly:
452
+
453
+ 1. Resolve `workflow.autoArtifactReview.analysis`; missing config means enabled, and only explicit `false` skips the loop.
454
+ 2. Resolve `oat_orchestration_retry_limit`; default to `2` if unavailable.
455
+ 3. Dispatch `oat-reviewer` in structured mode via Tier 1 subagent when available, falling back to the same reviewer prompt inline when needed.
456
+ 4. Apply Critical and Important fixes when they are local to the analysis artifact, companion bundle, and unambiguous.
457
+ 5. Offer Medium and Minor fixes rather than applying them silently.
458
+ 6. Rewrite `$ARTIFACT_PATH` and any affected bundle files after applied fixes, then re-dispatch while retries remain.
459
+ 7. Stop when the reviewer is clean or the retry bound is exhausted.
460
+
461
+ The review loop may only edit the markdown analysis artifact and its companion bundle. It must not modify or create instruction files, provider rules, repo configuration, or any other downstream apply target. If a finding cannot be fixed inside the analysis artifact or bundle, preserve it as a residual review finding and surface it in the summary before handoff.
462
+
463
+ If the loop is disabled, note `Auto artifact review: skipped (workflow.autoArtifactReview.analysis=false)` in the summary and do not describe the artifact as verified.
464
+
465
+ ### Step 10: Update Verified Tracking and Output Summary
439
466
 
440
467
  **Update tracking:**
441
468
 
@@ -454,6 +481,8 @@ bash "$TRACKING_SCRIPT" write \
454
481
  {providers...}
455
482
  ```
456
483
 
484
+ Only run this tracking write after Step 9 finishes. A tracked agent-instructions analysis artifact is therefore reviewed/verified unless the summary explicitly says the auto artifact-review loop was skipped.
485
+
457
486
  **Output summary to the user:**
458
487
 
459
488
  ```
@@ -472,6 +501,7 @@ Analysis complete.
472
501
 
473
502
  Artifact: {artifact_path}
474
503
  Bundle: {bundle_dir}
504
+ Auto artifact review: {passed|passed with residual findings|skipped}
475
505
 
476
506
  Next step: Run oat-agent-instructions-apply to act on these findings.
477
507
  ```
@@ -1,10 +1,10 @@
1
1
  ---
2
2
  name: oat-docs-analyze
3
- version: 1.2.0
3
+ version: 1.4.0
4
4
  description: Run when you need to evaluate documentation structure, navigation, and coverage against the OAT docs app contract. Produces a severity-rated analysis artifact for oat-docs-apply.
5
5
  disable-model-invocation: true
6
6
  user-invocable: true
7
- allowed-tools: Read, Write, Bash(git:*), Glob, Grep, AskUserQuestion
7
+ allowed-tools: Read, Write, Bash(git:*), Glob, Grep, AskUserQuestion, Task
8
8
  ---
9
9
 
10
10
  # Docs Analysis
@@ -13,7 +13,8 @@ Scan a repository's documentation surface, evaluate it against the OAT docs cont
13
13
 
14
14
  ## Prerequisites
15
15
 
16
- - Git repository with either an MkDocs app, a `docs/` tree, or root-level Markdown docs.
16
+ - Git repository with either an OAT/Fumadocs docs app, an MkDocs app, a
17
+ `docs/` tree, or root-level Markdown docs.
17
18
  - `jq` available in PATH for tracking updates.
18
19
 
19
20
  ## Mode Assertion
@@ -32,6 +33,7 @@ Scan a repository's documentation surface, evaluate it against the OAT docs cont
32
33
 
33
34
  - Reading docs trees, MkDocs config, and related repository metadata.
34
35
  - Writing a docs analysis artifact to `.oat/repo/analysis/`.
36
+ - Reviewing and correcting the docs analysis artifact itself through the shared Auto Artifact-Review Loop.
35
37
  - Updating docs analysis tracking metadata.
36
38
 
37
39
  ## Analyze vs Apply Boundary
@@ -49,6 +51,9 @@ If you catch yourself:
49
51
 
50
52
  - Editing docs content directly -> STOP and move that recommendation to the artifact.
51
53
  - Rewriting navigation while analyzing -> STOP and record the required fix instead.
54
+ - Hand-editing or regenerating generated root indexes -> STOP and record a
55
+ generated-artifact finding with the exact evidence that proves freshness or
56
+ source-contract drift.
52
57
 
53
58
  **Recovery:**
54
59
 
@@ -66,28 +71,42 @@ When executing this skill, provide lightweight progress feedback so the user can
66
71
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
67
72
 
68
73
  - Use step indicators:
69
- - `[1/9] Resolving docs target + mode…`
70
- - `[2/9] Inventorying docs files…`
71
- - `[3/9] Evaluating index contract…`
72
- - `[4/9] Assessing quality + coverage…`
73
- - `[5/9] Verifying substantive claims…`
74
- - `[6/9] Finding content opportunities…`
75
- - `[7/9] Checking nav and drift…`
76
- - `[8/9] Writing analysis artifact…`
77
- - `[9/9] Updating tracking + summary…`
74
+ - `[1/10] Resolving docs target + mode…`
75
+ - `[2/10] Inventorying docs files…`
76
+ - `[3/10] Evaluating index contract…`
77
+ - `[4/10] Assessing quality + coverage…`
78
+ - `[5/10] Verifying substantive claims…`
79
+ - `[6/10] Finding content opportunities…`
80
+ - `[7/10] Checking generated indexes, nav and drift…`
81
+ - `[8/10] Writing analysis artifact…`
82
+ - `[9/10] Reviewing artifact accuracy…`
83
+ - `[10/10] Updating verified tracking + summary…`
78
84
 
79
85
  ## Process
80
86
 
81
87
  ### Step 0: Resolve Docs Target and Analysis Mode
82
88
 
83
- Determine the documentation root using the first matching surface:
84
-
85
- 1. `apps/*/mkdocs.yml`
86
- 2. `mkdocs.yml` at repo root
87
- 3. `docs/`
88
- 4. Root-level Markdown docs (`README.md`, `CONTRIBUTING.md`, etc.) when no docs app exists
89
-
90
- Prefer the OAT docs app when multiple MkDocs apps exist and one is clearly the active repo docs surface.
89
+ Determine the documentation root using explicit docs-app evidence before generic
90
+ repo fallbacks:
91
+
92
+ 1. `.oat/config.json` `documentation.root` / `documentation.tooling`.
93
+ - When `documentation.tooling` is `fumadocs`, record the surface type as
94
+ `oat-fumadocs-app`.
95
+ - Treat `documentation.root` as the docs app root. Resolve the authored docs
96
+ source root and generated index path from `documentation.index`, app config,
97
+ package scripts, generator scripts, or local guidance.
98
+ 2. OAT/Fumadocs app candidates under `apps/*`, before root `docs/` fallback:
99
+ - `apps/*/source.config.*`
100
+ - `apps/*/next.config.*` with `apps/*/docs`
101
+ - `apps/*/docs` plus docs-app package scripts or local guidance evidence
102
+ 3. `apps/*/mkdocs.yml`
103
+ 4. `mkdocs.yml` at repo root
104
+ 5. generic root `docs/`
105
+ 6. Root-level Markdown docs (`README.md`, `CONTRIBUTING.md`, etc.) when no docs app exists
106
+
107
+ Do not select generic root `docs/` or root Markdown docs while `.oat/config.json`
108
+ or `apps/*` Fumadocs evidence identifies an active OAT/Fumadocs docs app. Prefer
109
+ the app declared in `.oat/config.json` when multiple app candidates exist.
91
110
 
92
111
  Resolve tracking and analysis mode using the shared helper:
93
112
 
@@ -107,6 +126,8 @@ Build a complete inventory of:
107
126
  - All directories containing Markdown files
108
127
  - All `index.md` files
109
128
  - Any `overview.md` files
129
+ - Generated root indexes or manifests, including warning banners such as "do not edit"
130
+ - Local guidance that identifies generated index paths or regeneration commands
110
131
  - `mkdocs.yml` nav entries when present
111
132
 
112
133
  Record the docs surface type:
@@ -114,11 +135,16 @@ Record the docs surface type:
114
135
  - `mkdocs-app`
115
136
  - `docs-tree`
116
137
  - `root-markdown`
138
+ - `oat-fumadocs-app`
117
139
 
118
140
  Capture the evidence sources that will justify later findings and recommendations. Prefer:
119
141
 
120
142
  - `mkdocs.yml` and generated nav structure
143
+ - `.oat/config.json`, package scripts, generator scripts, and local `AGENTS.md`
144
+ files that identify authored docs roots or generated root indexes
121
145
  - `docs/contributing.md`, contributor guides, and setup docs
146
+ - docs-app `AGENTS.md`, contributing pages, or authoring guides that tell
147
+ agents how to edit, analyze, apply, and validate docs
122
148
  - `package.json` scripts, `requirements.txt`, and docs bootstrap scripts
123
149
  - existing `index.md` trees and repeated directory patterns
124
150
  - exact missing or stale paths, commands, and page references
@@ -126,6 +152,21 @@ Capture the evidence sources that will justify later findings and recommendation
126
152
  Do **not** infer docs structure conventions from a tiny sample of pages when the broader
127
153
  tree or config disagrees.
128
154
 
155
+ For OAT/Fumadocs docs apps, check whether local guidance covers:
156
+
157
+ - authored docs source location
158
+ - generated root indexes or manifests and their no-hand-edit boundary
159
+ - every content directory needing `index.md`
160
+ - useful `## Contents` maps
161
+ - `.md`-suffixed relative links, including `subdir/index.md`
162
+ - `.md` as the default format and `.mdx` only for JSX/component needs
163
+ - read-only audit routing to `oat-docs-analyze`
164
+ - approved bulk edits routing to `oat-docs-apply`
165
+ - generated artifact regeneration or freshness checks after source docs changes
166
+
167
+ Flag stale local guidance that references older aliases without mapping them to
168
+ the current analyze/apply flow.
169
+
129
170
  ### Step 2: Evaluate the `index.md` Contract
130
171
 
131
172
  Use `references/quality-checklist.md` and `references/directory-assessment-criteria.md`.
@@ -134,9 +175,41 @@ For every documentation directory:
134
175
 
135
176
  1. Verify `index.md` exists.
136
177
  2. Verify `index.md` includes a `## Contents` section.
137
- 3. Verify the `## Contents` section maps sibling pages and immediate child directories.
138
- 4. Flag `overview.md` usage as a migration finding.
139
- 5. Verify single-file directories still expose an `index.md` entrypoint.
178
+ 3. Flag placeholder-only `## Contents` sections, including comments, generic
179
+ "add links here" copy, or empty lists.
180
+ 4. Verify the `## Contents` section maps sibling pages and immediate child directories.
181
+ 5. Verify parent `## Contents` maps include child directories that contain docs.
182
+ 6. Flag `overview.md` usage as a migration finding.
183
+ 7. Flag unexpected `.mdx` for plain content unless JSX/components or local
184
+ guidance justify it.
185
+ 8. Verify single-file directories still expose a useful `index.md` entrypoint
186
+ or local section map.
187
+ 9. Exempt asset-only directories that contain no Markdown content and are not
188
+ linked as navigable docs sections.
189
+
190
+ For OAT/Fumadocs docs apps, also distinguish authored source maps from generated
191
+ root indexes:
192
+
193
+ 1. Resolve the authored docs source root and generated root index path from
194
+ `.oat/config.json`, package scripts, generator scripts, or local guidance.
195
+ 2. Confirm the generated root index exists when local configuration says it is
196
+ produced, and record whether it appears tracked, ignored, or local-only.
197
+ 3. Confirm generated warning banners are present when the repo's generator emits
198
+ them or local guidance requires them.
199
+ 4. Compare generated entries against the authored `## Contents` graph.
200
+ 5. Flag stale generated entries that point to deleted or moved docs paths.
201
+ 6. Flag missing generated entries for authored pages or child directories that
202
+ are reachable from source `## Contents` maps.
203
+ 7. Flag generated entries that are not reachable from any authored parent
204
+ `## Contents` map unless local generator semantics explicitly explain them.
205
+ 8. Classify ordering drift separately from missing or stale entries.
206
+ 9. If source maps and generated output disagree but generator behavior is not
207
+ documented well enough to judge, classify the finding as unclear generator
208
+ semantics instead of guessing.
209
+
210
+ Generated index checks are read-only. Recommend regeneration, source-map fixes,
211
+ or tool investigation in the analysis artifact; do not hand-edit generated
212
+ files from this skill.
140
213
 
141
214
  ### Step 3: Assess Quality and Coverage
142
215
 
@@ -163,13 +236,28 @@ Evidence standard:
163
236
  For each evaluated page or directory:
164
237
 
165
238
  1. Read the docs file plus the local evidence needed to validate its claims.
166
- 2. Record findings with severity, exact source refs, and confidence.
167
- 3. Decide a disclosure mode for each recommendation:
239
+ 2. Resolve every local relative Markdown link from the page where it appears.
240
+ Flag broken targets. In OAT/Fumadocs docs apps, flag extensionless local
241
+ Markdown links and prefer `.md`-suffixed targets, including
242
+ `subdir/index.md`.
243
+ 3. Accept anchors on `.md` links, such as `page.md#section`, and do not flag
244
+ anchors-only, external URLs, `mailto:` links, image/asset links, or link
245
+ syntax intentionally shown inside inline code, fenced examples, or template
246
+ snippets.
247
+ 4. Check Markdown hygiene: opening code fences need language identifiers; shell
248
+ examples should follow local fence conventions, defaulting to `sh` unless
249
+ local guidance uses `bash` or the block needs Bash-only syntax.
250
+ 5. Flag empty headings, multiple document-level H1s outside intentional imported
251
+ README contexts, overlong frontmatter descriptions when local guidance
252
+ defines a limit, ellipsis-truncated descriptions, and README-copy metadata
253
+ signals that make search/navigation output look stale.
254
+ 6. Record findings with severity, exact source refs, and confidence.
255
+ 7. Decide a disclosure mode for each recommendation:
168
256
  - `inline`
169
257
  - `link_only`
170
258
  - `omit`
171
259
  - `ask_user`
172
- 4. Record canonical link targets whenever a `link_only` recommendation is used.
260
+ 8. Record canonical link targets whenever a `link_only` recommendation is used.
173
261
 
174
262
  In `delta` mode, always evaluate changed docs files plus the nearest parent `index.md` pages.
175
263
  In `full` mode, evaluate the whole docs surface.
@@ -225,9 +313,32 @@ sources only. Prefer:
225
313
  - `app/services/`, `src/services/`, or equivalent business-logic modules
226
314
  - the main application entrypoint and route registration files
227
315
  - key models, schemas, and config surfaces that define user-facing behavior
316
+ - command definitions, CLI parsers, flag schemas, and command tests
317
+ - deployment, release, monitoring, runbook, rollback, and support/escalation
318
+ files that define operational behavior
228
319
 
229
320
  Do not speculate about future roadmap items or undocumented external integrations.
230
321
 
322
+ Classify coverage by the surfaces proven in the repo:
323
+
324
+ - For app/service docs, check purpose, audience, local setup, testing,
325
+ configuration, deployment/release, observability, runbooks, rollback,
326
+ ownership, support/escalation, troubleshooting, and common failure modes.
327
+ - For API docs, check whether broad API surfaces have navigable
328
+ contract-grade reference pages with routes/endpoints, request/response
329
+ shapes, authentication, error modes, examples, and versioning where those
330
+ concepts exist in repo sources.
331
+ - For CLI docs, check command groups, flags, output modes, destructive
332
+ behavior, dry-run/force options, scripting contracts, exit-code behavior when
333
+ sourced, and examples for common workflows.
334
+ - For operations docs, flag "Future Topics" placeholders, empty runbook
335
+ outlines, unsupported deploy/monitoring claims, and missing owner-reviewed
336
+ gaps for unverifiable operations knowledge.
337
+
338
+ When a claim affects ownership, support, deployment, observability, rollback, or
339
+ external integration behavior and repo evidence cannot verify it, mark it as an
340
+ owner-review gap rather than guessing.
341
+
231
342
  For each significant feature or API capability found in the codebase:
232
343
 
233
344
  1. Capture the capability area and the evidence that proves it exists.
@@ -259,6 +370,19 @@ where the docs should live, and what specific subtopics the codebase shows shoul
259
370
 
260
371
  ### Step 6: Check Navigation and Drift
261
372
 
373
+ If a generated root index or manifest exists:
374
+
375
+ 1. Compare generated entries with the authored `## Contents` graph.
376
+ 2. Flag generated output that is missing, ignored/local-only when local guidance
377
+ expects a tracked artifact, stale, ordered differently from authored maps, or
378
+ unclear because generator semantics are undocumented.
379
+ 3. Flag generated entries that are not reachable from authored maps as either
380
+ authored-source contract drift or generator-semantics uncertainty, depending
381
+ on the evidence.
382
+ 4. Cite exact generated paths, authored source paths, package scripts, config
383
+ files, and representative links for each finding.
384
+ 5. Prefer source-of-truth fixes over generated-file edits.
385
+
262
386
  If `mkdocs.yml` exists:
263
387
 
264
388
  1. Compare nav entries with the docs tree.
@@ -293,6 +417,9 @@ Populate the artifact with:
293
417
  - Inventory summary
294
418
  - Severity-rated findings
295
419
  - Directory coverage and contract gaps
420
+ - Generated index and authored local-map findings
421
+ - Authored link, `## Contents`, and Markdown hygiene findings
422
+ - Local docs-app guidance gaps
296
423
  - Accuracy verification verdicts for repo-checkable claims
297
424
  - Content opportunities for missing or thin docs coverage
298
425
  - Navigation/drift findings
@@ -302,7 +429,32 @@ Populate the artifact with:
302
429
  - Progressive disclosure decisions (`inline`, `link_only`, `omit`, `ask_user`)
303
430
  - Canonical link targets when deeper detail should stay out of always-on docs pages
304
431
 
305
- ### Step 9: Update Tracking and Output Summary
432
+ ### Step 9: Review Analysis Artifact Accuracy
433
+
434
+ Run the shared **Auto Artifact-Review Loop** from `oat-project-plan-writing` after `$ARTIFACT_PATH` is written and before tracking is updated or `oat-docs-apply` is recommended.
435
+
436
+ Use the `analysis` target:
437
+
438
+ - `type: analysis`
439
+ - `scope: docs`
440
+ - `analysis_artifact: $ARTIFACT_PATH`
441
+ - `oat_output_mode: structured`
442
+
443
+ Follow the canonical loop exactly:
444
+
445
+ 1. Resolve `workflow.autoArtifactReview.analysis`; missing config means enabled, and only explicit `false` skips the loop.
446
+ 2. Resolve `oat_orchestration_retry_limit`; default to `2` if unavailable.
447
+ 3. Dispatch `oat-reviewer` in structured mode via Tier 1 subagent when available, falling back to the same reviewer prompt inline when needed.
448
+ 4. Apply Critical and Important fixes when they are local to the analysis artifact and unambiguous.
449
+ 5. Offer Medium and Minor fixes rather than applying them silently.
450
+ 6. Rewrite `$ARTIFACT_PATH` after applied fixes and re-dispatch while retries remain.
451
+ 7. Stop when the reviewer is clean or the retry bound is exhausted.
452
+
453
+ The review loop may only edit the analysis artifact. It must not edit docs content, `mkdocs.yml`, navigation files, or any other downstream apply target. If a finding cannot be fixed inside the analysis artifact, preserve it as a residual review finding and surface it in the summary before handoff.
454
+
455
+ If the loop is disabled, note `Auto artifact review: skipped (workflow.autoArtifactReview.analysis=false)` in the summary and do not describe the artifact as verified.
456
+
457
+ ### Step 10: Update Verified Tracking and Output Summary
306
458
 
307
459
  Update docs tracking using the shared helper:
308
460
 
@@ -320,13 +472,15 @@ bash "$TRACKING_SCRIPT" write \
320
472
  --artifact-path "$ARTIFACT_PATH"
321
473
  ```
322
474
 
475
+ Only run this tracking write after Step 9 finishes. A tracked docs analysis artifact is therefore reviewed/verified unless the summary explicitly says the auto artifact-review loop was skipped.
476
+
323
477
  Output a summary:
324
478
 
325
479
  ```text
326
480
  Analysis complete.
327
481
 
328
482
  Docs target: {path}
329
- Surface type: {mkdocs-app|docs-tree|root-markdown}
483
+ Surface type: {mkdocs-app|oat-fumadocs-app|docs-tree|root-markdown}
330
484
  Files evaluated: {N}
331
485
  Mode: {full|delta}
332
486
 
@@ -337,6 +491,7 @@ Analysis complete.
337
491
  Low: {N}
338
492
 
339
493
  Artifact: {artifact_path}
494
+ Auto artifact review: {passed|passed with residual findings|skipped}
340
495
 
341
496
  Next step: Run oat-docs-apply to act on these findings.
342
497
  ```