@open-agent-toolkit/cli 0.2.62 → 0.2.64

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 (145) hide show
  1. package/assets/bundle-metadata.json +1 -1
  2. package/assets/docs/cli-utilities/config-and-local-state.md +1 -0
  3. package/assets/docs/cli-utilities/configuration.md +10 -8
  4. package/assets/docs/cli-utilities/project-log.md +16 -0
  5. package/assets/docs/cli-utilities/tool-packs.md +83 -0
  6. package/assets/docs/cli-utilities/workflow-gates.md +124 -16
  7. package/assets/docs/contributing/skills.md +42 -7
  8. package/assets/docs/provider-sync/commands.md +3 -0
  9. package/assets/docs/provider-sync/instruction-sync.md +107 -0
  10. package/assets/docs/provider-sync/manifest-and-drift.md +105 -0
  11. package/assets/docs/reference/cli-reference.md +16 -6
  12. package/assets/docs/reference/oat-directory-structure.md +32 -31
  13. package/assets/docs/workflows/projects/lifecycle.md +45 -0
  14. package/assets/docs/workflows/projects/picking-up-projects.md +14 -0
  15. package/assets/docs/workflows/skills/explainer-kit.md +10 -4
  16. package/assets/docs/workflows/skills/repo-improve.md +15 -1
  17. package/assets/public-package-versions.json +4 -4
  18. package/assets/skills/create-agnostic-skill/SKILL.md +9 -7
  19. package/assets/skills/create-agnostic-skill/references/skill-template.md +9 -7
  20. package/assets/skills/oat-explainer-kit/SKILL.md +14 -1
  21. package/assets/skills/oat-explainer-kit/references/config-contract.md +12 -0
  22. package/assets/skills/oat-explainer-kit/references/lifecycle-contract.md +57 -10
  23. package/assets/skills/oat-explainer-kit/scripts/check-terminal-outcome.mjs +28 -5
  24. package/assets/skills/oat-explainer-kit/scripts/probe-recap-seams.mjs +371 -0
  25. package/assets/skills/oat-explainer-kit/scripts/resolve-intent.mjs +123 -1
  26. package/assets/skills/oat-project-autonomous/SKILL.md +10 -1
  27. package/assets/skills/oat-project-autonomous/references/gate-inventory.md +122 -121
  28. package/assets/skills/oat-project-complete/SKILL.md +134 -4
  29. package/assets/skills/oat-project-document/references/docs/autonomy-contract.md +122 -121
  30. package/assets/skills/oat-project-implement/SKILL.md +1 -1
  31. package/assets/skills/oat-project-implement/references/completion-and-closeout.md +38 -6
  32. package/assets/skills/oat-project-implement/references/docs/autonomy-contract.md +122 -121
  33. package/assets/skills/oat-project-lite/references/docs/autonomy-contract.md +122 -121
  34. package/assets/skills/oat-project-next/SKILL.md +62 -19
  35. package/assets/skills/oat-project-plan/SKILL.md +31 -5
  36. package/assets/skills/oat-project-pr-final/SKILL.md +281 -6
  37. package/assets/skills/oat-project-pr-final/references/docs/autonomy-contract.md +122 -121
  38. package/assets/skills/oat-project-progress/SKILL.md +12 -3
  39. package/assets/skills/oat-project-quick-start/SKILL.md +264 -4
  40. package/assets/skills/oat-project-quick-start/references/docs/autonomy-contract.md +122 -121
  41. package/assets/skills/oat-project-summary/SKILL.md +34 -23
  42. package/assets/skills/oat-repo-improve/SKILL.md +40 -5
  43. package/assets/skills/oat-repo-improve/references/plan-template.md +84 -7
  44. package/dist/agents/canonical/resolve.d.ts.map +1 -1
  45. package/dist/agents/canonical/resolve.js +25 -4
  46. package/dist/commands/config/index.d.ts +1 -0
  47. package/dist/commands/config/index.d.ts.map +1 -1
  48. package/dist/commands/config/index.js +401 -18
  49. package/dist/commands/doctor/index.d.ts +7 -0
  50. package/dist/commands/doctor/index.d.ts.map +1 -1
  51. package/dist/commands/doctor/index.js +10 -2
  52. package/dist/commands/gate/index.d.ts +3 -1
  53. package/dist/commands/gate/index.d.ts.map +1 -1
  54. package/dist/commands/gate/index.js +699 -211
  55. package/dist/commands/init/tools/index.d.ts.map +1 -1
  56. package/dist/commands/init/tools/index.js +68 -36
  57. package/dist/commands/init/tools/shared/skill-script-references.d.ts +126 -0
  58. package/dist/commands/init/tools/shared/skill-script-references.d.ts.map +1 -0
  59. package/dist/commands/init/tools/shared/skill-script-references.js +311 -0
  60. package/dist/commands/instructions/instructions.types.d.ts +63 -0
  61. package/dist/commands/instructions/instructions.types.d.ts.map +1 -1
  62. package/dist/commands/instructions/instructions.utils.d.ts +51 -2
  63. package/dist/commands/instructions/instructions.utils.d.ts.map +1 -1
  64. package/dist/commands/instructions/instructions.utils.js +201 -4
  65. package/dist/commands/instructions/sync/sync.d.ts.map +1 -1
  66. package/dist/commands/instructions/sync/sync.js +12 -1
  67. package/dist/commands/instructions/validate/validate.d.ts.map +1 -1
  68. package/dist/commands/instructions/validate/validate.js +12 -1
  69. package/dist/commands/project/log/append.d.ts +195 -0
  70. package/dist/commands/project/log/append.d.ts.map +1 -1
  71. package/dist/commands/project/log/append.js +1034 -11
  72. package/dist/commands/shared/frontmatter.d.ts +51 -0
  73. package/dist/commands/shared/frontmatter.d.ts.map +1 -1
  74. package/dist/commands/shared/frontmatter.js +118 -6
  75. package/dist/commands/status/index.d.ts.map +1 -1
  76. package/dist/commands/status/index.js +5 -3
  77. package/dist/commands/sync/index.d.ts +14 -0
  78. package/dist/commands/sync/index.d.ts.map +1 -1
  79. package/dist/commands/sync/index.js +21 -0
  80. package/dist/commands/tools/info/index.d.ts.map +1 -1
  81. package/dist/commands/tools/info/index.js +14 -1
  82. package/dist/commands/tools/info/info-tool.d.ts +12 -0
  83. package/dist/commands/tools/info/info-tool.d.ts.map +1 -1
  84. package/dist/commands/tools/info/info-tool.js +54 -6
  85. package/dist/commands/tools/info/skill-views.d.ts +86 -0
  86. package/dist/commands/tools/info/skill-views.d.ts.map +1 -0
  87. package/dist/commands/tools/info/skill-views.js +383 -0
  88. package/dist/commands/tools/install/index.d.ts.map +1 -1
  89. package/dist/commands/tools/install/index.js +3 -25
  90. package/dist/commands/tools/list/list-tools.d.ts +2 -0
  91. package/dist/commands/tools/list/list-tools.d.ts.map +1 -1
  92. package/dist/commands/tools/list/list-tools.js +23 -4
  93. package/dist/commands/tools/remove/index.d.ts.map +1 -1
  94. package/dist/commands/tools/remove/index.js +35 -42
  95. package/dist/commands/tools/remove/remove-tools.d.ts +3 -2
  96. package/dist/commands/tools/remove/remove-tools.d.ts.map +1 -1
  97. package/dist/commands/tools/remove/remove-tools.js +14 -4
  98. package/dist/commands/tools/shared/auto-sync.d.ts +12 -1
  99. package/dist/commands/tools/shared/auto-sync.d.ts.map +1 -1
  100. package/dist/commands/tools/shared/auto-sync.js +20 -4
  101. package/dist/commands/tools/shared/format-pack-inventory.d.ts +12 -1
  102. package/dist/commands/tools/shared/format-pack-inventory.d.ts.map +1 -1
  103. package/dist/commands/tools/shared/format-pack-inventory.js +48 -6
  104. package/dist/commands/tools/shared/in-process-sync.d.ts +11 -0
  105. package/dist/commands/tools/shared/in-process-sync.d.ts.map +1 -0
  106. package/dist/commands/tools/shared/in-process-sync.js +79 -0
  107. package/dist/commands/tools/shared/pack-evidence.d.ts +78 -2
  108. package/dist/commands/tools/shared/pack-evidence.d.ts.map +1 -1
  109. package/dist/commands/tools/shared/pack-evidence.js +96 -2
  110. package/dist/commands/tools/shared/pack-lifecycle-outcome.d.ts +11 -0
  111. package/dist/commands/tools/shared/pack-lifecycle-outcome.d.ts.map +1 -1
  112. package/dist/commands/tools/shared/pack-lifecycle-outcome.js +24 -3
  113. package/dist/commands/tools/shared/pack-provider-evidence.d.ts +73 -0
  114. package/dist/commands/tools/shared/pack-provider-evidence.d.ts.map +1 -0
  115. package/dist/commands/tools/shared/pack-provider-evidence.js +161 -0
  116. package/dist/commands/tools/shared/provider-context.d.ts +88 -0
  117. package/dist/commands/tools/shared/provider-context.d.ts.map +1 -0
  118. package/dist/commands/tools/shared/provider-context.js +77 -0
  119. package/dist/commands/tools/shared/provider-reachability.d.ts +93 -0
  120. package/dist/commands/tools/shared/provider-reachability.d.ts.map +1 -0
  121. package/dist/commands/tools/shared/provider-reachability.js +358 -0
  122. package/dist/commands/tools/shared/sync-evidence.d.ts +57 -0
  123. package/dist/commands/tools/shared/sync-evidence.d.ts.map +1 -0
  124. package/dist/commands/tools/shared/sync-evidence.js +147 -0
  125. package/dist/commands/tools/update/index.d.ts +0 -4
  126. package/dist/commands/tools/update/index.d.ts.map +1 -1
  127. package/dist/commands/tools/update/index.js +22 -40
  128. package/dist/commands/tools/update/update-tools.d.ts.map +1 -1
  129. package/dist/commands/tools/update/update-tools.js +23 -8
  130. package/dist/config/json.d.ts +36 -0
  131. package/dist/config/json.d.ts.map +1 -1
  132. package/dist/config/json.js +135 -3
  133. package/dist/config/oat-config.d.ts +41 -0
  134. package/dist/config/oat-config.d.ts.map +1 -1
  135. package/dist/config/oat-config.js +111 -0
  136. package/dist/drift/index.d.ts +2 -0
  137. package/dist/drift/index.d.ts.map +1 -1
  138. package/dist/drift/index.js +1 -0
  139. package/dist/drift/skill-view-diagnostic.d.ts +197 -0
  140. package/dist/drift/skill-view-diagnostic.d.ts.map +1 -0
  141. package/dist/drift/skill-view-diagnostic.js +343 -0
  142. package/dist/validation/skills.d.ts +1 -0
  143. package/dist/validation/skills.d.ts.map +1 -1
  144. package/dist/validation/skills.js +181 -19
  145. package/package.json +2 -2
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "oatVersion": "0.2.62"
3
+ "oatVersion": "0.2.64"
4
4
  }
@@ -120,6 +120,7 @@ Use `oat config` for repo runtime config inspection and supported key mutation.
120
120
 
121
121
  - `oat config get <key>` - read one resolved config value
122
122
  - `oat config set <key> <value>` - update a supported shared or repo-local key
123
+ - `oat config unset <key>` - remove a supported key from one surface, with the same `--shared`/`--local`/`--user` flags and per-key restrictions as `set`. Pruning removes any parent object the removal empties, and the resolved value falls back to the next surface or the built-in default. A key the surface does not hold reports an already-unset outcome and exits 0; `--json` adds a `removed` boolean that distinguishes that no-op from a real removal. Five classes are refused with exit 1: unknown keys (including the uncatalogued `documentation.index`), lifecycle state (`activeProject`, `lastPausedProject`, cleared with `oat config set <key> ''`), pack intent (`tools.*`, removed with `oat tools remove --pack <pack> --scope project`), the aggregate read views `workflow.dispatchCeiling` and `workflow.dispatchCeiling.providers`, and environment-shadowed keys with nothing stored on the target surface. See [CLI Reference](../reference/cli-reference.md#oat-config-surface-flags) for the full contract
123
124
  - `oat config list` - show the resolved command-surface values with source information
124
125
  - `oat config dump --json` - emit the full merged config payload with per-key source attribution, suitable for automation and debugging
125
126
  - `oat config describe` - list supported config surfaces and keys across shared repo, repo-local, user, and sync/provider config
@@ -18,13 +18,13 @@ For the deep file-by-file reference, see:
18
18
 
19
19
  ## The five config surfaces
20
20
 
21
- | Surface | File | Typical contents | Primary CLI surface |
22
- | ------------------------- | ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------- |
23
- | Shared repo config | `.oat/config.json` | Repo-wide non-sync settings such as `projects.root`, `git.defaultBranch`, `documentation.*`, `archive.*`, `tools.*`, and shared `workflow.*` defaults | `oat config get/set/list/describe`, `oat gate` |
24
- | Repo-local config | `.oat/config.local.json` | Per-developer state for this checkout, such as `activeProject`, `lastPausedProject`, repo-local `activeIdea`, and local `workflow.*` overrides | `oat config get/set/list/describe`, `oat gate` |
25
- | User config | `~/.oat/config.json` | User-level state such as global `activeIdea` fallback and personal `workflow.*` defaults | `oat config describe`, `oat gate` |
26
- | Project sync config | `.oat/sync/config.json` | Provider enablement, sync strategy, and repo-level known stray settings | `oat providers set`, `oat config describe` |
27
- | User provider sync config | `~/.oat/sync/config.json` | User sync strategy and personal known provider strays | Provider-sync commands, `oat config describe` |
21
+ | Surface | File | Typical contents | Primary CLI surface |
22
+ | ------------------------- | ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------- |
23
+ | Shared repo config | `.oat/config.json` | Repo-wide non-sync settings such as `projects.root`, `git.defaultBranch`, `documentation.*`, `archive.*`, `tools.*`, and shared `workflow.*` defaults | `oat config get/set/unset/list/describe`, `oat gate` |
24
+ | Repo-local config | `.oat/config.local.json` | Per-developer state for this checkout, such as `activeProject`, `lastPausedProject`, repo-local `activeIdea`, and local `workflow.*` overrides | `oat config get/set/unset/list/describe`, `oat gate` |
25
+ | User config | `~/.oat/config.json` | User-level state such as global `activeIdea` fallback and personal `workflow.*` defaults | `oat config get/set/unset/describe`, `oat gate` |
26
+ | Project sync config | `.oat/sync/config.json` | Provider enablement, sync strategy, and repo-level known stray settings | `oat providers set`, `oat config describe` |
27
+ | User provider sync config | `~/.oat/sync/config.json` | User sync strategy and personal known provider strays | Provider-sync commands, `oat config describe` |
28
28
 
29
29
  The main split is:
30
30
 
@@ -51,6 +51,7 @@ What each command is for:
51
51
  - `oat config list` shows the currently resolved command-surface values for shared and repo-local keys.
52
52
  - `oat config get <key>` reads one supported key value.
53
53
  - `oat config set <key> <value>` updates supported shared or repo-local keys.
54
+ - `oat config unset <key>` removes a supported key from one surface, using the same `--shared`/`--local`/`--user` flags and per-key restrictions as `set`. The resolved value then falls back to the next surface down, or to the built-in default. A key the surface does not hold exits 0 as already-unset (`--json` adds a `removed` boolean to tell the two apart). Unknown keys, lifecycle state, `tools.*` pack intent, the `workflow.dispatchCeiling` aggregate read views, and environment-shadowed keys with nothing stored are refused with exit 1 — see [CLI Reference](../reference/cli-reference.md#oat-config-surface-flags).
54
55
  - `oat config describe` shows the supported config catalog across shared repo, repo-local, user, and sync/provider surfaces.
55
56
  - `oat config describe <key>` shows file, scope, default, mutability, owning command, and description for one key.
56
57
 
@@ -91,6 +92,7 @@ Common keys in `.oat/config.json`:
91
92
  - `git.defaultBranch` — base branch fallback for PR workflows
92
93
  - `documentation.root`, `documentation.tooling`, `documentation.config` — docs-surface ownership
93
94
  - `documentation.excludes` — a JSON array of globs, relative to the docs directory, that `oat docs generate-index` leaves out of the generated index. `oat config set` takes the list as one comma-separated value (`"a/**,b.md"`) and stores it as an array; repeated `--exclude` flags extend it, and an empty value clears the key
95
+ - `documentation.instructionPointerExcludes` — a JSON array of repository-relative directories that `oat instructions sync` and `oat instructions validate` must not treat as pointer sites, additive to the documentation content root they already skip by default (see [Instruction Sync](../provider-sync/instruction-sync.md#documentation-trees)). `oat config set` takes the list as one comma-separated value (`"vendor/generated,apps/oat-docs/docs"`) and stores it as an array of repository-relative POSIX paths, trimmed and de-duplicated; an empty value clears the key, and `oat config unset documentation.instructionPointerExcludes` removes it. An entry that could never exclude anything — an absolute path, or one escaping the repository with `..` — is rejected with exit code `1` rather than stored. A structurally malformed value already on disk (a non-array, or an empty or non-string entry) is rejected with exit code `2` and a repair message, and `oat config set` can still replace it. Entries that are well formed but cannot exclude anything — among them absolute paths, paths escaping the repository, paths that match no directory (matching is case-sensitive), and the unexcludable `.oat/repo` carve-in root — never abort the command; they are reported as warnings and are not counted as protection. Warnings go to stderr in human mode and to the `exclusionWarnings` field under `--json`
94
96
  - `documentation.requireForProjectCompletion` — whether docs sync is a completion gate
95
97
  - `archive.s3Uri` — base S3 archive prefix
96
98
  - `archive.s3SyncOnComplete` — upload archived projects to S3 during completion
@@ -768,7 +770,7 @@ Workflow preferences resolve through three config surfaces, with `local > shared
768
770
 
769
771
  ### Setting preferences
770
772
 
771
- `oat config set` supports mutually exclusive surface flags for workflow keys:
773
+ `oat config set` and `oat config unset` support the same mutually exclusive surface flags for workflow keys:
772
774
 
773
775
  ```bash
774
776
  # User-level: applies to all repos on this machine
@@ -71,6 +71,22 @@ oat project log append \
71
71
  Structural entries require `--structural`, `--producer`, `--ref`, and `--body`.
72
72
  Do not combine structural flags with judgment flags.
73
73
 
74
+ ### Idempotent append and commit
75
+
76
+ Two optional flags let an interrupted append be replayed safely:
77
+
78
+ - `--idempotency-key <key>` — skip the append when an existing entry body
79
+ already carries `key`, reporting `already-appended` instead of writing a
80
+ duplicate. The key must appear in `--body`, since that is how a replay
81
+ recognizes the entry it already wrote.
82
+ - `--commit` — stage and commit the log after appending, retrying a bounded
83
+ three attempts when the failure is a transient `.git/index.lock`.
84
+
85
+ Together they are the recovery entry point for a gate whose project-log
86
+ finalization could not commit. See
87
+ [Workflow Gates](./workflow-gates.md#project-log-finalization) for the receipt
88
+ and the exact recovery command.
89
+
74
90
  The helper produces these heading grammars in UTC:
75
91
 
76
92
  ```text
@@ -307,6 +307,57 @@ application-process restart requirement, or proof of visibility. No advice is
307
307
  emitted for current/no-op, planned-only, failed, missing, inactive, or
308
308
  unsupported materialization.
309
309
 
310
+ Every pack lifecycle outcome (`install`, `update`, `remove`, and the aggregate
311
+ init path) and every pack inventory surface (`oat tools list`, `oat tools
312
+ info`, `oat status`, `oat doctor`) carries per-provider reachability evidence
313
+ in its JSON, derived from the same config-aware registry the sync engine uses:
314
+ activation, content capability, projection, materialization, catalog-refresh
315
+ visibility, and recovery guidance. Human output names the provider on its own
316
+ line and on any provider-attributed diagnostic. Reachability is never inferred
317
+ from the presence of a provider directory on disk.
318
+
319
+ The four inventory surfaces agree on managed user-scope roles. `list` and
320
+ `info` resolve the same provider surface as `status` and `doctor`, so an
321
+ active Codex or Cursor adapter that supplies managed roles suppresses the
322
+ unmaterialized-user-agent report on all four rather than only two.
323
+
324
+ Each provider state maps to exactly one row below. Pack evidence status and
325
+ the lifecycle exit code derive from the **severity** column, never from the
326
+ code name, so adding a code later cannot silently change an exit code.
327
+
328
+ | Provider state (per provider, scope, content kind) | Diagnostic code | Severity | Pack evidence status | Lifecycle outcome / exit code |
329
+ | ---------------------------------------------------------------------- | --------------------------------------- | --------- | -------------------- | ------------------------------------------------ |
330
+ | Active, supported, projection and materialization succeeded | none | -- | `ok` | `complete` / 0 |
331
+ | Explicitly disabled in sync config for this scope | `provider-inactive` | `info` | `ok` | `complete` / 0 |
332
+ | Active but the content kind is unsupported by the adapter | `provider-unsupported` | `info` | `ok` | `complete` / 0 |
333
+ | Active, supported, no projection exists (never synced or sync skipped) | `provider-materialization-missing` | `warning` | `partial` | `complete` / 0 (install succeeded; sync advised) |
334
+ | Active, supported, the sync operation for this asset failed | `provider-materialization-failed` | `error` | `partial` | `partial` / 1 |
335
+ | Active, projected, no sourced refresh contract for the host | `visibility-unknown` | `info` | `ok` | `complete` / 0 |
336
+ | Active, projected, host catalog needs a refresh or a restart | `refresh-required` / `restart-required` | `info` | `ok` | `complete` / 0 |
337
+ | Read-only inventory (`list`, `info`, `status`, `doctor`): no sync ran | registry-derived codes only | as above | as above | not applicable |
338
+ | Auto-sync not run (disabled or skipped) after a lifecycle operation | none; `providerSync.status: 'not-run'` | -- | `ok` | `complete` / 0 |
339
+
340
+ Rows with `info` severity are visible in JSON and in the human provider line
341
+ but do not turn `ok` into `partial`. A provider that was never detected and
342
+ never configured is not reported per pack: its inactive state is still carried
343
+ on the evidence row, but emitting a diagnostic for every registered provider on
344
+ every pack would bury the actionable rows. `unknown` visibility is reported as
345
+ unknown; it never claims reachability and never fails an otherwise successful
346
+ install. A read-only inventory surface ran no sync, so it never reports
347
+ `provider-materialization-failed`.
348
+
349
+ The three visibility codes — `visibility-unknown`, `refresh-required`, and
350
+ `restart-required` — are lifecycle-only for the same reason. They require an
351
+ established projection, and a read-only surface never establishes one: it
352
+ observed no sync, so it reports materialization as a non-claim rather than
353
+ asserting the provider view exists. For an active provider that supports the
354
+ content kind, the registered catalog state remains readable in the row's
355
+ `visibility` field on every surface; only the diagnostics are withheld. Run
356
+ `oat tools install`, `update`, or `remove` to see them emitted. An inactive or
357
+ unsupported row reports `not-applicable` visibility instead, matching its
358
+ `not-applicable` projection: catalog advice about a provider that cannot
359
+ receive the content would read as a step to act on.
360
+
310
361
  Repository templates under `.oat/templates/` are **owner-owned seeds**. OAT
311
362
  compares a source-backed seed with its bundled default: a byte-equivalent copy
312
363
  is reported as current, while an edited copy is retained and reported as a
@@ -512,8 +563,40 @@ Key behavior:
512
563
 
513
564
  - Displays name, type (skill/agent), version, bundled version, pack, scope, and status
514
565
  - Reports whether the tool is invocable (for skills) and whether an update is available
566
+ - For a skill, adds a read-only provider-view section per active provider and scope: the expected provider path, the view class, and versions where a copy makes them comparable
567
+ - Suggests the narrowest safe repair, one `oat sync --scope <concrete>` per affected scope and never `--scope all`
515
568
  - Returns exit code 1 if the tool is not found in any scope
516
569
 
570
+ An unknown name keeps the existing `Tool '<name>' not found.` wording and prints
571
+ no provider-view section, so a skill that exists but was never distributed is
572
+ never confused with a name the repository does not have.
573
+
574
+ ```text
575
+ $ oat tools info probe-skill --scope project
576
+ probe-skill
577
+ Type: skill
578
+ Version: 1.4.2
579
+ Pack: custom
580
+ Scope: project
581
+ Status: not-bundled
582
+ Provider views (project):
583
+ claude: missing-additive .claude/skills/probe-skill
584
+ Canonical skill has never been projected to this view: no manifest entry and nothing at the expected path.
585
+ cursor: inactive
586
+ Repair: oat sync --scope project
587
+ ```
588
+
589
+ The section is additive in `--json` output as `providerViews`, an array of one
590
+ entry per concrete scope where the canonical skill exists. The command reads the
591
+ manifest, the sync config, and the filesystem; it never writes, and it never
592
+ runs a sync. If the sync config or the manifest cannot be read, that scope's
593
+ section reports `unavailable` with a redacted reason and the tool detail and exit
594
+ code are unchanged; a failure reading one provider's view degrades only that row,
595
+ to `unverified` with the same redacted reason. An absent sync config is not a
596
+ failure: it resolves to the defaults and the scope is diagnosed normally. See
597
+ [Manifest and Drift](../provider-sync/manifest-and-drift.md#resolution-time-skill-view-classes)
598
+ for the view classes.
599
+
517
600
  ### `oat tools has <pack>`
518
601
 
519
602
  Purpose:
@@ -375,14 +375,14 @@ once an artifact exists, its `generatedAt` (the artifact's seconds-precision
375
375
  `oat_generated_at`), so a caller can correlate the result to the exact artifact
376
376
  and disambiguate re-gate rounds:
377
377
 
378
- | `status` | Exit | Meaning |
379
- | ------------------------------ | ---- | ------------------------------------------------------------ |
380
- | `ok` | 0 | Review completed; gate passed at the threshold. |
381
- | `blocked` | 1 | Review completed; findings at/above the threshold. |
382
- | `review_failed` | ≠0 | The provider target exited non-zero; no verdict. |
383
- | `artifact_missing` | 1 | The child exited cleanly without producing an artifact. |
384
- | `artifact_validation_failed` | 1 | Artifact format or configured invocation fields are invalid. |
385
- | `targeting_correlation_failed` | 1 | Identity did not correlate; do not run review-receive. |
378
+ | `status` | Exit | Meaning |
379
+ | ------------------------------ | ---- | --------------------------------------------------------------- |
380
+ | `ok` | 0 | Review completed; gate passed at the threshold. |
381
+ | `blocked` | 1 | Review completed; findings at/above the threshold. |
382
+ | `review_failed` | ≠0 | No validated verdict: the target or post-selection work failed. |
383
+ | `artifact_missing` | 1 | The child exited cleanly without producing an artifact. |
384
+ | `artifact_validation_failed` | 1 | Artifact format or configured invocation fields are invalid. |
385
+ | `targeting_correlation_failed` | 1 | Identity did not correlate; do not run review-receive. |
386
386
 
387
387
  Only `ok` and `blocked` are positive, receive-eligible review outcomes: both
388
388
  follow successful identity corroboration and carry a non-null `handoff`.
@@ -400,6 +400,37 @@ bookkeeping finish inline or through a synchronously awaited child, then start
400
400
  a new gate run. Do not use review-fix retries or review-receive for the failed
401
401
  run.
402
402
 
403
+ Post-selection recovery covers work that fails _after_ the reviewer already
404
+ committed a run-correlated artifact: corroboration, the threshold, handoff
405
+ construction, or result writing. Recovery means re-validation, never re-review.
406
+ The gate re-runs the same eligibility pipeline the normal path uses (project
407
+ containment, `oat_generated_at` validity, verdict parsing, gate-invocation
408
+ corroboration, the `oat_review_invocation: gate` marker, and the threshold)
409
+ against the immutable content/signature snapshot selected at correlation time.
410
+ It re-validates that snapshot rather than re-parsing whatever the path now
411
+ holds, and it never dispatches a second reviewer. The artifact must still be
412
+ present and unchanged for re-validation to succeed: a deleted or rewritten
413
+ artifact fails re-validation and the run stays failed.
414
+ When that re-validation succeeds the gate returns the ordinary `ok` or
415
+ `blocked` envelope with an additive `postSelectionRecovery: true`. Like
416
+ `lateCompletion`, that is recovery telemetry rather than a new status: route
417
+ review-receive from `status`, `receiveEligible`, and `handoff` as usual.
418
+
419
+ When no artifact was selected, or the selected snapshot does not re-validate,
420
+ the run stays `review_failed` with `outcome:
421
+ unexpected_post_selection_failure`. That envelope names the failing sub-step in
422
+ `postSelection.step` (`target-dispatch`, `artifact-scan`,
423
+ `artifact-correlation`, `artifact-validation`, `verdict-parse`,
424
+ `invocation-corroboration`, or `verdict-disposition`) and a routable
425
+ `postSelection.code`: the thrown error's own `code` or constructor name, the
426
+ eligibility cause when a committed artifact failed re-validation, or
427
+ `recovery_revalidation_failed` when the re-validation attempt itself threw. That
428
+ last case also emits a `gate-recovery-failed` diagnostic, so a persistent
429
+ non-recovery stays distinguishable from the transient failure that triggered it.
430
+ Replacement bytes at the artifact path, a missing artifact, a non-gate
431
+ invocation marker, and an artifact targeting another project never recover. Route deterministically on those
432
+ fields instead of re-dispatching the reviewer.
433
+
403
434
  `ok` and `blocked` also include `receiveEligible: true`, `outcome`,
404
435
  `artifactPath`, `counts`, `scope`, `handoff`, `gateInvocation`, and
405
436
  `corroboration`. Invoke review-receive only when all three conditions hold:
@@ -445,6 +476,81 @@ oat --json gate review \
445
476
  Read the resulting envelope and exit code; that is the whole completion
446
477
  contract.
447
478
 
479
+ ### Project log finalization
480
+
481
+ After the envelope is written, the gate appends one structural entry to the
482
+ project's `project-log.md` and commits it, so the run does not leave a dirty
483
+ worktree for whatever executes next. The entry body ends with
484
+ `run=<runId>` — the same run id the envelope carries. That token is the entry's
485
+ stable identity: a retry or a later recovery recognizes the entry it already
486
+ wrote instead of appending a second one.
487
+
488
+ Staging and committing the log retries **three attempts** separated by two
489
+ waits (250 ms, then 500 ms) when, and only when, git itself reports index-lock
490
+ contention: `Unable to create '…/index.lock': File exists`, or git's `Another
491
+ git process seems to be running in this repository` advice in output that also
492
+ names an index lock. Every other failure — a hook,
493
+ signing, identity, or pathspec error — is reported immediately rather than
494
+ retried, including one whose output merely mentions `index.lock`. The gate never
495
+ deletes, moves, or forces a lock it did not take. A lock whose mtime is
496
+ unchanged across the whole retry window is reported as `persistent-index-lock`;
497
+ one that moves is `transient-index-lock`. If a competing writer commits the same
498
+ entry while the gate retries, the gate reports the work as already committed
499
+ instead of a failure — but only when the committed log still carries this run's
500
+ entry.
501
+
502
+ When the retries are exhausted the append has landed but the commit has not, so
503
+ the gate writes a durable receipt to
504
+ `<project>/gate-receipts/<runId>.json` and emits a
505
+ `gate-project-log-partial-finalization` diagnostic naming the receipt and
506
+ printing its recovery command verbatim. The gate result is unchanged: a passing
507
+ review still exits `ok`.
508
+
509
+ The receipt must not dirty the worktree, so this repository ignores
510
+ `**/gate-receipts/` repository-wide rather than under `.oat/projects` alone:
511
+ `projects.root` is settable, and the receipt follows the resolved project. A
512
+ repository whose ignore rules do not cover the receipt still gets the receipt —
513
+ losing the finalization would be worse than a tracked file — plus a
514
+ `gate-project-log-receipt-warning` diagnostic naming the path, so the gap
515
+ surfaces before the next repository-wide `git add`.
516
+
517
+ The receipt completes the finalization from a later process, with no reviewer
518
+ and no second gate run:
519
+
520
+ ```bash
521
+ oat project log append --project <projectPath> --structural \
522
+ --producer 'oat gate review' --ref <ref> --body <body> \
523
+ --idempotency-key <runId> --commit
524
+ ```
525
+
526
+ Before appending anything, that command validates the receipt against the live
527
+ tree: the project path must resolve to the same project, `worktreeRoot` must
528
+ match `git rev-parse --show-toplevel`, and the review artifact must still exist
529
+ with its recorded sha256 signature. A receipt that names no artifact — the gate
530
+ correlated none, so `artifactPath` and `artifactSignature` are both `null` — is
531
+ bound by run id, project, worktree, and the entry fields alone; a receipt that
532
+ names an artifact _without_ a signature is malformed and refused. The replayed
533
+ entry must also be the entry
534
+ the receipt describes — `--producer`, `--ref`, and `--body` are compared against
535
+ the receipt, and the receipt's own run id must be the `--idempotency-key` that
536
+ names its file — so a receipt can never be consumed while some other entry is
537
+ written. Any mismatch exits non-zero with a
538
+ `gate-project-log-receipt-mismatch` diagnostic and touches nothing. On a match
539
+ it appends (or reports `already-appended` when the entry is already there),
540
+ commits with the same bounded retry, and deletes the receipt. Running it twice
541
+ is safe: the second run appends nothing and creates no commit.
542
+
543
+ At the start of a run, a receipt still sitting under the project produces a
544
+ `gate-project-log-receipt-pending` diagnostic naming the receipt and its
545
+ recovery command. Its `state` is `stale` only when the _committed_ log
546
+ (`HEAD:project-log.md`) already carries that run id and entry — the append
547
+ landed and was committed, so recovery will observe `already-appended` and clear
548
+ the receipt. Everything else is `pending`, including the ordinary case where
549
+ the entry is in the working tree but no commit succeeded: that is precisely
550
+ what the receipt exists to finish, so it is never reported as leftovers. A
551
+ receipt naming another tree's log, or a committed log that cannot be read back,
552
+ also stays `pending`. The warning is discovery only; the gate still runs.
553
+
448
554
  ## Exec targets
449
555
 
450
556
  `oat gate cross-provider-exec` chooses from `workflow.gates.execTargets`.
@@ -884,14 +990,16 @@ those artifacts; correct the project/run correlation and start a new gate run.
884
990
 
885
991
  ### Incident-to-regression mapping
886
992
 
887
- | Observed failure | Regression coverage |
888
- | -------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
889
- | Headless reviewer could not complete an async delegation | route unit matrix plus canonical checkout-local command, strict receipt, headless inline, and structured-refusal cases |
890
- | Large final review exceeded the old 15-minute budget | scope-aware resolver tests plus scaled final-scope fake-runtime case |
891
- | Silent child looked idle while transcripts grew | metadata-probe tests plus timeout-with-advancing-transcript fixture |
892
- | Timeout or child failure produced no artifact | fail-closed `noOutputProduced` fixture |
893
- | Artifact carried the wrong gate run ID | provenance-mismatch fixture |
894
- | Passing artifact lost receive routing | handoff and `receiveEligible` fixture |
993
+ | Observed failure | Regression coverage |
994
+ | --------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
995
+ | Headless reviewer could not complete an async delegation | route unit matrix plus canonical checkout-local command, strict receipt, headless inline, and structured-refusal cases |
996
+ | Large final review exceeded the old 15-minute budget | scope-aware resolver tests plus scaled final-scope fake-runtime case |
997
+ | Silent child looked idle while transcripts grew | metadata-probe tests plus timeout-with-advancing-transcript fixture |
998
+ | Timeout or child failure produced no artifact | fail-closed `noOutputProduced` fixture |
999
+ | Artifact carried the wrong gate run ID | provenance-mismatch fixture |
1000
+ | Passing artifact lost receive routing | handoff and `receiveEligible` fixture |
1001
+ | Passing review reported as a failed gate after a post-selection error | post-selection recovery cases plus snapshot-replacement, non-gate-marker, and foreign-target controls |
1002
+ | Transient index lock turned a completed review into a failed gate | index-lock retry cases plus persistent/transient classification, receipt fixture, and fresh-process recovery control |
895
1003
 
896
1004
  ## Current limits
897
1005
 
@@ -179,20 +179,55 @@ direct managed-role intent still retains the canonical agent.
179
179
 
180
180
  - `name`
181
181
  - `description`
182
- - `version`
182
+ - `metadata.version` (top-level `version` is the deprecated alias)
183
183
  - `disable-model-invocation`
184
184
  - `user-invocable`
185
185
  - `allowed-tools`
186
186
  - `oat_gateable`
187
187
 
188
- ### The `version` field is gated
188
+ ### How a skill's version is resolved
189
+
190
+ The Agent Skills specification carries a skill's version under `metadata`, so
191
+ that is where a new skill declares it:
192
+
193
+ ```yaml
194
+ metadata:
195
+ version: 1.0.0
196
+ ```
197
+
198
+ OAT resolves a version from `metadata.version` first and from the top-level
199
+ `version` field second, and it resolves it the same way everywhere it reads
200
+ one: the installed-versus-bundled comparison behind `oat tools list`,
201
+ `oat tools update`, and `oat doctor`; skill validation; and canonical role
202
+ resolution. `resolveSkillVersion` in
203
+ `packages/cli/src/commands/shared/frontmatter.ts` owns that order, so the
204
+ runtime helper and the validators cannot disagree.
205
+
206
+ The top-level `version` field remains supported as a deprecated alias. Every
207
+ bundled skill still uses it today, so `pnpm oat:validate-skills` reports each
208
+ one as a non-blocking warning; the value is still read, and nothing breaks.
209
+ Migrating the bundled skills is tracked separately.
210
+
211
+ A skill that carries both fields with different values is a conflict. The
212
+ resolver reports the `metadata.version` value together with the conflict, and
213
+ the callers that must not guess act on it: validation reports an error rather
214
+ than silently picking one, and canonical role resolution treats the identity as
215
+ invalid. The runtime version readers still return the `metadata.version` value,
216
+ so an installed-versus-bundled comparison keeps working while the conflict is
217
+ being fixed. Carrying both with the _same_ value is accepted.
218
+
219
+ ### The version is gated
189
220
 
190
221
  Changing any canonical skill's `SKILL.md` requires bumping its frontmatter
191
- `version` in the same PR — one bump per changed skill in the final PR diff,
192
- even if the skill was edited multiple times on the branch. The rule is
193
- enforced by `pnpm run check:skill-bumps`, which runs locally (root `AGENTS.md`
194
- Definition of Done) and in CI; a changed skill whose version matches
195
- `origin/main` fails the gate.
222
+ version in the same PR — one bump per changed skill in the final PR diff,
223
+ even if the skill was edited multiple times on the branch. The gate reads the
224
+ resolved version, so it enforces the bump whether the skill declares
225
+ `metadata.version` or the top-level alias. The rule is enforced by
226
+ `pnpm run check:skill-bumps`, which runs locally (root `AGENTS.md` Definition
227
+ of Done) and in CI; a changed skill whose version matches `origin/main` fails
228
+ the gate. The deprecation warning above is deliberately not part of that gate:
229
+ `check:skill-bumps` fails on any finding it receives, so an alias warning
230
+ routed through it would fail every changed skill until the migration lands.
196
231
 
197
232
  ## Practical Authoring Flow
198
233
 
@@ -210,6 +210,7 @@ Key behavior:
210
210
  - Supports `--strategy pointer|symlink|copy` to validate the expected file shape
211
211
  - Reports `ok`, `missing`, `content_mismatch`, and `stray` states
212
212
  - Detects Claude-only adoptable directories and unreadable/broken instruction paths as drift
213
+ - Skips the derived documentation content root and any `documentation.instructionPointerExcludes` paths, using the same exclusions as `oat instructions sync`
213
214
  - Exit code `0` when all entries are valid, `1` when drift is detected
214
215
  - Detailed behavior: [`Instruction Sync`](instruction-sync.md)
215
216
 
@@ -227,5 +228,7 @@ Key behavior:
227
228
  - Adopts Claude-only stray files by writing canonical `AGENTS.md` content first, then regenerating `CLAUDE.md`
228
229
  - Skips mismatched files unless `--force` is provided
229
230
  - Skips unreadable canonical or Claude-only sources and reports manual-repair guidance instead of forcing recovery
231
+ - Skips the documentation content tree (`<documentation.root>/docs` when that is a directory, otherwise `documentation.root`) plus any `documentation.instructionPointerExcludes` paths, so authored pages never receive pointers; app-level instruction files such as `apps/oat-docs/AGENTS.md` are still synced
232
+ - Never deletes an existing `CLAUDE.md` inside an excluded tree
230
233
  - Uses pointer content `@AGENTS.md\n`, file symlinks, or hard copies depending on the selected strategy
231
234
  - Detailed behavior and examples: [`Instruction Sync`](instruction-sync.md)
@@ -23,8 +23,115 @@ Instruction sync is currently project-only.
23
23
  - It supports nested directories all the way down the tree.
24
24
  - It skips provider-irrelevant or local-only roots such as `.git`, `.oat`, `.worktrees`, and `node_modules`.
25
25
  - Exception: `.oat/repo/**` is scanned even though the rest of `.oat/` is skipped, so the curated `AGENTS.md` files there (repo root guidance, `pjm/`, `reference/`) get their sibling `CLAUDE.md` shims managed and validated like any other directory. The rest of `.oat/` (`templates/`, `projects/`, `sync/`) stays excluded.
26
+ - It skips the documentation content tree by default, and any path you add to `documentation.instructionPointerExcludes`. See [Documentation trees](#documentation-trees) below.
26
27
  - It does not scan user-level provider roots such as `~/.claude` in this release.
27
28
 
29
+ ## Documentation Trees
30
+
31
+ A documentation tree holds authored pages, not instructions for agents. A
32
+ `CLAUDE.md` written into one becomes a published page, and a page legitimately
33
+ named `CLAUDE.md` is content that must not be treated as a pointer. Both
34
+ `oat instructions validate` and `oat instructions sync` therefore skip the
35
+ documentation content root, so validate never reports drift that sync refuses
36
+ to fix.
37
+
38
+ The content root is derived from `documentation.root` in `.oat/config.json`:
39
+
40
+ - `<documentation.root>/docs` when that path is a directory;
41
+ - otherwise `documentation.root` itself.
42
+
43
+ This is the same derivation `oat docs generate-index` uses to pick its default
44
+ docs directory, so the excluded tree and the indexed tree agree by
45
+ construction. (`oat docs generate-index --docs-dir` overrides the index side
46
+ only; it does not change what instruction sync excludes.)
47
+
48
+ **App-level instruction files are still synced.** `documentation.root`
49
+ canonically names the docs _app_ root, and a file like
50
+ `apps/oat-docs/AGENTS.md` is instructions for working on the docs app rather
51
+ than a documentation page. When the app root has a `docs` child, only that
52
+ child is skipped, and the app root keeps receiving its `CLAUDE.md` pointer. Opt
53
+ the app root out explicitly if you do not want it synced.
54
+
55
+ Add further paths with `documentation.instructionPointerExcludes`, a list of
56
+ repository-relative directories. Set it with
57
+ `oat config set documentation.instructionPointerExcludes "vendor,third_party/docs"`
58
+ (an empty value clears it, and `oat config unset` removes it), or write it
59
+ directly:
60
+
61
+ ```json
62
+ {
63
+ "documentation": {
64
+ "root": "apps/oat-docs",
65
+ "instructionPointerExcludes": ["vendor", "third_party/docs"]
66
+ }
67
+ }
68
+ ```
69
+
70
+ Each entry excludes that directory and everything beneath it, matching the
71
+ directory path exactly rather than by prefix — excluding `apps/docs` leaves a
72
+ sibling `apps/docs-legacy` scanned. Entries are repository-relative and
73
+ normalized, so `apps/./docs`, `apps//docs`, and `apps/docs/` all name the same
74
+ tree; absolute paths and paths escaping the repository are dropped with a
75
+ warning when they are already stored — and refused outright by
76
+ `oat config set` — and the repository root itself cannot be excluded. A structurally malformed value
77
+ (anything other than an array of non-empty strings) is rejected with exit code
78
+ `2` rather than silently ignored.
79
+
80
+ The list is additive to the derived content root, and it is applied after the
81
+ `.oat/repo` carve-in, so excluding _another_ tree can never collaterally leave
82
+ `.oat/repo/**` unscanned. `.oat/repo` itself is never excludable — listing it
83
+ is reported as having no effect rather than silently honoured, and its
84
+ `AGENTS.md` keeps its pointer. A deliberate opt-out naming a path _beneath_
85
+ it, such as `.oat/repo/pjm`, is honoured: descendants are reached by ordinary
86
+ traversal, so only the carve-in root is protected from exclusion.
87
+
88
+ ### When an exclusion does nothing
89
+
90
+ An entry that is well formed but cannot protect anything — it names a
91
+ directory that does not exist, differs in case from the real path on a
92
+ case-insensitive filesystem such as APFS, is absolute, escapes the repository,
93
+ or is the unexcludable `.oat/repo` — does not fail the command. It is reported
94
+ as a warning naming the entry, and it is never counted as protection.
95
+
96
+ The warning channel depends on the mode: in human mode warnings are written to
97
+ stderr, and under `--json` they are carried in the `exclusionWarnings` payload
98
+ field instead, because `--json` suppresses stderr warnings entirely.
99
+
100
+ That distinction matters most on a case-insensitive filesystem: a
101
+ `documentation.root` of `Apps/Docsapp` resolves happily while the scan compares
102
+ the real `apps/docsapp`, so the tree would be scanned after all. Trust
103
+ `effectiveExcludedPaths`, not `excludedPaths`, when deciding whether a tree is
104
+ protected — and read `exclusionWarnings` for the reason, since the stderr
105
+ warnings are silent under `--json`.
106
+
107
+ Because both commands read `.oat/config.json` to resolve exclusions, they
108
+ inherit its validation. Any value that fails a _fail-closed_ field check —
109
+ including keys these commands do not otherwise use, such as
110
+ `documentation.excludes` — makes `oat instructions sync` and
111
+ `oat instructions validate` exit `2` until it is repaired. Not every key is
112
+ fail-closed: a wrong-typed scalar such as `documentation.root` is dropped
113
+ rather than rejected, so it never aborts the command (a dropped `root` simply
114
+ leaves the content root underived, and no default exclusion applies).
115
+
116
+ Exclusion only stops a directory from being scanned. Nothing is deleted: a
117
+ `CLAUDE.md` that already exists inside an excluded tree is left exactly as it
118
+ is. When any exclusion is configured, `--json` output carries three additional
119
+ fields.
120
+
121
+ - `excludedPaths` lists the configured exclusions — a statement of intent, not
122
+ a per-directory skip log, so `.oat` appearing there does not contradict
123
+ `.oat/repo` still being scanned.
124
+ - `effectiveExcludedPaths` lists the subset that names a real, case-exact
125
+ directory the scan actually pruned. It is present whenever `excludedPaths`
126
+ is, including as an empty array when every configured entry turned out to be
127
+ inert.
128
+ - `exclusionWarnings` lists one message per configured exclusion that will not
129
+ protect anything — the `--json` counterpart of the stderr warnings above.
130
+
131
+ Each field is omitted when it would be empty. `exclusionWarnings` is
132
+ independent of the other two: an absolute or repository-escaping entry is
133
+ dropped before `excludedPaths` is built, so it appears only here.
134
+
28
135
  ## Canonical Model
29
136
 
30
137
  - `AGENTS.md` is canonical.