@open-agent-toolkit/cli 0.3.15 → 0.3.16

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 (97) hide show
  1. package/assets/NOTICES.md +48 -0
  2. package/assets/bundle-metadata.json +1 -1
  3. package/assets/docs/provider-sync/commands.md +21 -0
  4. package/assets/docs/reference/cli-reference.md +2 -1
  5. package/assets/docs/reference/configuration.md +10 -2
  6. package/assets/docs/skills/index.md +1 -0
  7. package/assets/docs/skills/recon.md +8 -5
  8. package/assets/docs/workflows/advanced/autonomy.md +10 -0
  9. package/assets/docs/workflows/advanced/workflow-gates.md +109 -10
  10. package/assets/docs/workflows/approvals-and-automation.md +3 -1
  11. package/assets/docs/workflows/projects/closeout/closeout-skills.md +62 -1
  12. package/assets/docs/workflows/projects/execution/implementation-execution.md +23 -3
  13. package/assets/docs/workflows/projects/execution/project-log.md +6 -0
  14. package/assets/docs/workflows/projects/lifecycle.md +7 -0
  15. package/assets/docs/workflows/projects/reviews/index.md +63 -1
  16. package/assets/docs/workflows/waves/wave-workflows.md +11 -3
  17. package/assets/public-package-versions.json +4 -4
  18. package/assets/skills/oat-project-autonomous/SKILL.md +1 -1
  19. package/assets/skills/oat-project-autonomous/references/gate-inventory.md +172 -165
  20. package/assets/skills/oat-project-complete-auto/SKILL.md +388 -0
  21. package/assets/skills/oat-project-document/SKILL.md +1 -1
  22. package/assets/skills/oat-project-document/references/docs/autonomy-contract.md +172 -165
  23. package/assets/skills/oat-project-implement/SKILL.md +6 -1
  24. package/assets/skills/oat-project-implement/references/completion-and-closeout.md +28 -1
  25. package/assets/skills/oat-project-implement/references/docs/autonomy-contract.md +172 -165
  26. package/assets/skills/oat-project-implement/references/docs/complexity-review-fallback.md +262 -0
  27. package/assets/skills/oat-project-implement/references/docs/gate-approval-record.md +80 -0
  28. package/assets/skills/oat-project-implement/references/phase-execution.md +18 -0
  29. package/assets/skills/oat-project-lite/SKILL.md +1 -1
  30. package/assets/skills/oat-project-lite/references/docs/autonomy-contract.md +172 -165
  31. package/assets/skills/oat-project-next/SKILL.md +19 -2
  32. package/assets/skills/oat-project-next/references/docs/gate-approval-record.md +80 -0
  33. package/assets/skills/oat-project-pr-final/SKILL.md +4 -3
  34. package/assets/skills/oat-project-pr-final/references/docs/autonomy-contract.md +172 -165
  35. package/assets/skills/oat-project-progress/SKILL.md +15 -1
  36. package/assets/skills/oat-project-progress/references/docs/gate-approval-record.md +80 -0
  37. package/assets/skills/oat-project-quick-start/SKILL.md +31 -3
  38. package/assets/skills/oat-project-quick-start/references/docs/autonomy-contract.md +172 -165
  39. package/assets/skills/oat-project-quick-start/references/docs/complexity-review-fallback.md +262 -0
  40. package/assets/skills/oat-project-quick-start/references/docs/gate-approval-record.md +80 -0
  41. package/assets/skills/oat-project-review-receive/SKILL.md +21 -3
  42. package/assets/skills/oat-project-review-receive/references/docs/complexity-review-fallback.md +262 -0
  43. package/assets/skills/oat-wave-execute/SKILL.md +49 -28
  44. package/assets/skills/oat-wave-program/SKILL.md +15 -6
  45. package/assets/skills/oat-wrap-up/SKILL.md +9 -3
  46. package/assets/skills/oat-wrap-up/references/report-template.md +1 -1
  47. package/assets/skills/recon/SKILL.md +1 -1
  48. package/assets/skills/recon/references/packet-contract.md +18 -3
  49. package/assets/skills/recon/scripts/lib/contracts.mjs +16 -2
  50. package/assets/skills/recon/scripts/reconcile-ledger.mjs +20 -10
  51. package/assets/skills/recon/scripts/render-packet.mjs +31 -3
  52. package/assets/skills/recon/scripts/validate-packet.mjs +5 -5
  53. package/assets/templates/state.md +7 -0
  54. package/dist/commands/config/index.d.ts.map +1 -1
  55. package/dist/commands/config/index.js +13 -0
  56. package/dist/commands/gate/index.d.ts +5 -0
  57. package/dist/commands/gate/index.d.ts.map +1 -1
  58. package/dist/commands/gate/index.js +270 -9
  59. package/dist/commands/shared/frontmatter.d.ts +1 -1
  60. package/dist/commands/shared/frontmatter.d.ts.map +1 -1
  61. package/dist/commands/shared/frontmatter.js +1 -0
  62. package/dist/commands/state/generate.d.ts +1 -1
  63. package/dist/commands/state/generate.d.ts.map +1 -1
  64. package/dist/commands/state/generate.js +87 -8
  65. package/dist/commands/sync/apply.d.ts.map +1 -1
  66. package/dist/commands/sync/apply.js +31 -5
  67. package/dist/commands/sync/dry-run.d.ts.map +1 -1
  68. package/dist/commands/sync/dry-run.js +28 -11
  69. package/dist/commands/sync/sync.utils.d.ts +13 -0
  70. package/dist/commands/sync/sync.utils.d.ts.map +1 -1
  71. package/dist/commands/sync/sync.utils.js +21 -1
  72. package/dist/commands/tools/shared/pack-manifest.d.ts.map +1 -1
  73. package/dist/commands/tools/shared/pack-manifest.js +1 -0
  74. package/dist/config/oat-config.d.ts +1 -0
  75. package/dist/config/oat-config.d.ts.map +1 -1
  76. package/dist/config/oat-config.js +3 -0
  77. package/dist/config/resolve.d.ts.map +1 -1
  78. package/dist/config/resolve.js +1 -0
  79. package/dist/drift/detector.js +6 -6
  80. package/dist/engine/compute-plan.d.ts.map +1 -1
  81. package/dist/engine/compute-plan.js +87 -2
  82. package/dist/engine/engine.types.d.ts +10 -1
  83. package/dist/engine/engine.types.d.ts.map +1 -1
  84. package/dist/engine/engine.types.js +4 -0
  85. package/dist/engine/execute-plan.d.ts.map +1 -1
  86. package/dist/engine/execute-plan.js +42 -5
  87. package/dist/engine/managed-copy-hash.d.ts +4 -3
  88. package/dist/engine/managed-copy-hash.d.ts.map +1 -1
  89. package/dist/engine/managed-copy-hash.js +4 -3
  90. package/dist/fs/assets.d.ts.map +1 -1
  91. package/dist/fs/assets.js +7 -1
  92. package/dist/manifest/hash.d.ts +8 -10
  93. package/dist/manifest/hash.d.ts.map +1 -1
  94. package/dist/ui/output.js +1 -1
  95. package/dist/validation/skills.d.ts.map +1 -1
  96. package/dist/validation/skills.js +13 -0
  97. package/package.json +2 -2
package/assets/NOTICES.md CHANGED
@@ -154,3 +154,51 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
154
154
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
155
155
  SOFTWARE.
156
156
  ```
157
+
158
+ ## tkstang/skills
159
+
160
+ **Source:** https://github.com/tkstang/skills/tree/main/skills/complexity-review
161
+ **License:** MIT
162
+ **Version referenced:** `complexity-review` 1.0.2 (commit `8767bce4819a2cae1a9f257de650a5ed0ae0afc1`)
163
+
164
+ ### `complexity-review` skill
165
+
166
+ Source files: `skills/complexity-review/SKILL.md` and
167
+ `skills/complexity-review/references/evidence-guide.md`.
168
+
169
+ Passages adapted and condensed into `.agents/docs/complexity-review-fallback.md`:
170
+ the core premise, contract restatement, simplest viable baseline, machinery
171
+ inventory, deletion test, evidence and recommendation scales, ledger columns,
172
+ verdict criteria, report sections, and reviewer stance. The OAT version adds
173
+ the budget-exhaustion triggers, the installed-skill probe, the read-only
174
+ dispatch contract, the REQUIRES-OPERATOR, open-finding, and disposition
175
+ sections, and the decision-message record.
176
+
177
+ Consumer OAT skills: `oat-project-implement`, `oat-project-quick-start`, and
178
+ `oat-project-review-receive` (each vendors the doc under `references/docs/`).
179
+
180
+ ### Upstream MIT license
181
+
182
+ ```text
183
+ MIT License
184
+
185
+ Copyright (c) 2026 Thomas Stang
186
+
187
+ Permission is hereby granted, free of charge, to any person obtaining a copy
188
+ of this software and associated documentation files (the "Software"), to deal
189
+ in the Software without restriction, including without limitation the rights
190
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
191
+ copies of the Software, and to permit persons to whom the Software is
192
+ furnished to do so, subject to the following conditions:
193
+
194
+ The above copyright notice and this permission notice shall be included in all
195
+ copies or substantial portions of the Software.
196
+
197
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
198
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
199
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
200
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
201
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
202
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
203
+ SOFTWARE.
204
+ ```
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "oatVersion": "0.3.15"
3
+ "oatVersion": "0.3.16"
4
4
  }
@@ -98,6 +98,27 @@ Key behavior:
98
98
  failures, but skew present — apply reports
99
99
  `Manifest version refreshed; no content changes required.` instead of
100
100
  `No changes required.`, so a manifest write is never described as a no-op.
101
+ - A faithful copy-strategy entry whose manifest row records a stale
102
+ `contentHash` (a pre-framing legacy digest or a tampered value) is planned as
103
+ `skip` with the reason
104
+ `already in sync; restamp stale manifest content hash`, and `--json` plan
105
+ entries carry the verified digest as `restampContentHash`. Apply writes that
106
+ digest, so the next run is a no-op. Only a row that tracks the same provider
107
+ path that sync checked is restamped. Dry-run then reports
108
+ `Run without --dry-run to restamp N stale manifest content hashes.` instead
109
+ of `No changes to apply.`. Apply reports
110
+ `Manifest content hash restamped for N entries; no content changes required.`
111
+ (combined with the version-refresh sentence when both happen), or
112
+ `Manifest content hash restamped for N entries.` beside a partial failure.
113
+ - A copy-strategy canonical skill directory without `SKILL.md`, or agent
114
+ directory without `AGENT.md`, is planned as an `error` operation whose reason
115
+ names the missing file, instead of a copy that never verifies and is retried
116
+ on every run. It changes nothing and is not a planned operation; other
117
+ entries still sync. Apply reports it as a failed result (`status: failed`
118
+ with a `failure` in `--json` `operationResults`) and exits 1. Dry-run lists
119
+ it, warns `N entry cannot sync until its configuration error is fixed.`,
120
+ counts it in `summary.failed`, and still exits 0. Symlink strategy is
121
+ unaffected.
101
122
 
102
123
  `oat sync` is not the only command that replaces a manifest's producer version.
103
124
  `oat init`, `oat remove skill`, and `oat status` each capture the manifest's
@@ -162,7 +162,7 @@ Notable commands introduced in the current CLI surface:
162
162
  - `oat project validate-plan --project-path <path>` - validates `oat_plan_parallel_groups` metadata in `plan.md`; exits non-zero on invalid. Lite plans must contain exactly one phase, declare no parallel groups, and give every Validation Criteria bullet either a backticked command or a `manual:` instruction. See [Implementation Execution](../workflows/projects/execution/implementation-execution.md#parallel-phase-groups).
163
163
  - `oat project log append|check|synthesize|rollup` - manage the optional append-only project observation log: append validated judgment or structural entries, inspect grammar and synthesis status, complete end-of-run synthesis, and roll observations into `summary.md` plus the configured repository ledger. See [Project Log](../workflows/projects/execution/project-log.md).
164
164
  - `oat project set-mode` — deprecated no-op. Execution mode is no longer user-selectable; emits a deprecation warning and preserves the `--json` contract.
165
- - `oat gate review <prompt...>` - run a stateful, headless OAT review through the target registry, parse the produced review artifact, and exit nonzero for configured blocking findings. `--timeout-ms <milliseconds>` overrides target, `workflow.gateTimeouts`, environment, and scope defaults; accepted values are 1,000–14,400,000. Final/phase/range code reviews default to 30 minutes, while task code and artifact reviews default to 15 minutes. With `--json`, the result envelope on exit is the canonical completion signal: `status` is `ok` | `blocked` | `review_failed` | `artifact_missing` | `artifact_validation_failed` | `targeting_correlation_failed`, alongside `runId`, `generatedAt`, and `artifactPath` when available. `artifact_missing` means an accepted child exited cleanly without an artifact; fix synchronous review/artifact completion and start a new run, without review-receive or same-run remediation. For `targeting_correlation_failed`, correct the project declaration or artifact routing and start a new run; do not run review-receive even if an artifact path is present. For `artifact_validation_failed`, correct the artifact and rerun the gate until it revalidates as `ok` or `blocked`. Invoke `oat-project-review-receive` only when all three conditions hold: `status` is `ok` or `blocked`, `receiveEligible` is `true`, and `handoff` is non-null. `review_failed` may include structured `refusal`, `noOutputProduced`, and metadata-only `activityEvidence`; these diagnostic fields never make a run receive-eligible. After a timeout, a validated run-correlated artifact returns the ordinary `ok` or `blocked` envelope with additive `lateCompletion: true`. When post-selection work fails after the reviewer already committed a run-correlated artifact, the gate re-validates that selected snapshot through the same eligibility path rather than re-parsing whatever the path now holds, never re-dispatching, and returns the ordinary `ok` or `blocked` envelope with additive `postSelectionRecovery: true`; the artifact must still be present and unchanged for re-validation to succeed. When nothing recovers, `review_failed` names the failing sub-step in `postSelection.step` and its cause in `postSelection.code`. Duplicate run-ID matches or a changed artifact with a mismatched run ID retain `targeting_correlation_failed` and `receiveEligible: false`. Orchestrators should read the structured result rather than poll the filesystem. See [Workflow Gates](../workflows/advanced/workflow-gates.md).
165
+ - `oat gate review <prompt...>` - run a stateful, headless OAT review through the target registry, parse the produced review artifact, and exit nonzero for configured blocking findings. `--timeout-ms <milliseconds>` overrides target, `workflow.gateTimeouts`, environment, and scope defaults; accepted values are 1,000–14,400,000. Final/phase/range code reviews and artifact reviews default to 30 minutes, while task code reviews default to 15 minutes. With `--json`, the result envelope on exit is the canonical completion signal: `status` is `ok` | `blocked` | `review_failed` | `artifact_missing` | `artifact_validation_failed` | `targeting_correlation_failed`, alongside `runId`, `generatedAt`, and `artifactPath` when available. `artifact_missing` means an accepted child exited cleanly without an artifact; fix synchronous review/artifact completion and start a new run, without review-receive or same-run remediation. For `targeting_correlation_failed`, correct the project declaration or artifact routing and start a new run; do not run review-receive even if an artifact path is present. For `artifact_validation_failed`, correct the artifact and rerun the gate until it revalidates as `ok` or `blocked`. Invoke `oat-project-review-receive` only when all three conditions hold: `status` is `ok` or `blocked`, `receiveEligible` is `true`, and `handoff` is non-null. `review_failed` may include structured `refusal`, `noOutputProduced`, and metadata-only `activityEvidence`; these diagnostic fields never make a run receive-eligible. After a timeout, a validated run-correlated artifact returns the ordinary `ok` or `blocked` envelope with additive `lateCompletion: true`. When post-selection work fails after the reviewer already committed a run-correlated artifact, the gate re-validates that selected snapshot through the same eligibility path rather than re-parsing whatever the path now holds, never re-dispatching, and returns the ordinary `ok` or `blocked` envelope with additive `postSelectionRecovery: true`; the artifact must still be present and unchanged for re-validation to succeed. When nothing recovers, `review_failed` names the failing sub-step in `postSelection.step` and its cause in `postSelection.code`. Duplicate run-ID matches or a changed artifact with a mismatched run ID retain `targeting_correlation_failed` and `receiveEligible: false`. Orchestrators should read the structured result rather than poll the filesystem. See [Workflow Gates](../workflows/advanced/workflow-gates.md).
166
166
  - `oat gate route --expect-runtime <runtime> --expect-model <model> --can-await <true|false> --json` - return the headless child route (`inline`, `delegate-sync`, or `refuse`) from provider-marker and model evidence. Ambiguous or contradictory evidence never routes inline.
167
167
  - `oat gate exec <prompt...>` / `oat gate cross-provider-exec <prompt...>` - run a generic target prompt. `--timeout-ms` uses the same validated CLI override; untyped runs otherwise retain the legacy default path.
168
168
  - `oat gate target set <id> --invocation-model <model|provider-default> --invocation-reasoning-effort <effort|provider-default>` - persist optional configured invocation metadata alongside an exec target without inferring it from the target command.
@@ -203,6 +203,7 @@ The `workflow.*` namespace holds user-facing workflow preferences that let you a
203
203
  - `workflow.hillCheckpointDefault` (`every` | `final`) — default HiLL checkpoint behavior in `oat-project-implement`
204
204
  - `workflow.archiveOnComplete` (`boolean`) — skip the archive prompt in `oat-project-complete`
205
205
  - `workflow.createPrOnComplete` (`boolean`) — skip the "Open a PR?" prompt in `oat-project-complete`
206
+ - `workflow.autonomousComplete` (`boolean`, default `false`) — standing opt-in for the non-interactive `oat-project-complete-auto` companion; when `false` it stops with "interactive completion required"
206
207
  - `workflow.postImplementSequence` (legacy `wait` | `summary` | `pr` | `docs-pr`, or structured `{preApproval, postApproval}` arrays) — approval-aware post-implementation chaining
207
208
  - `workflow.reviewExecutionModel` (`subagent` | `inline` | `fresh-session`) — default final-review execution model
208
209
  - `workflow.autoReviewAtHillCheckpoints` (`boolean`) — auto-run the extra lifecycle review at HiLL checkpoints
@@ -272,7 +272,13 @@ packaged `assets/` directory next to the installed CLI. Setting a non-empty
272
272
  required bundle directory is empty in the packed tarball.
273
273
  - Produce a matching bundle with `bash packages/cli/scripts/bundle-assets.sh`
274
274
  while `OAT_ASSETS_DIR` points at the target directory (the script already
275
- honors the variable as its destination).
275
+ honors the variable as its destination). Because publishing replaces the
276
+ destination, the script accepts an override destination only when it is
277
+ absent, an empty directory, or a previous bundle (a directory holding
278
+ `bundle-metadata.json`); it refuses anything else, including a directory it
279
+ cannot list. The default `packages/cli/assets` destination is exempt. The
280
+ script also stops before copying when an inventory lookup comes back empty,
281
+ absolute, climbing with `..`, or naming the repository root.
276
282
 
277
283
  This is primarily a test-isolation and packaging seam; day-to-day use of the CLI
278
284
  does not need it.
@@ -294,7 +300,7 @@ must be integer milliseconds from `1,000` through `14,400,000`.
294
300
  "workflow": {
295
301
  "gateTimeouts": {
296
302
  "code": 2400000,
297
- "artifact": 900000
303
+ "artifact": 2400000
298
304
  },
299
305
  "gates": {
300
306
  "execTargets": {
@@ -712,6 +718,7 @@ Workflow preference keys live under the `workflow.*` namespace:
712
718
  - `workflow.hillCheckpointDefault` — `every` or `final`. Default HiLL checkpoint behavior in `oat-project-implement` (a HiLL, or human-in-the-loop, checkpoint is a stop for your review): pause after every phase or only after the last phase. When unset, the skill prompts. See [Choosing a checkpoint default](#choosing-a-checkpoint-default).
713
719
  - `workflow.archiveOnComplete` — boolean. Skip the "Archive after completion?" prompt in `oat-project-complete`. When unset, the skill prompts.
714
720
  - `workflow.createPrOnComplete` — boolean. Skip the "Open a PR?" prompt in `oat-project-complete`; when true, completion auto-triggers PR creation. When unset, the skill prompts.
721
+ - `workflow.autonomousComplete` — boolean, default `false`. Standing opt-in for `oat-project-complete-auto`, the non-interactive completion companion that runs only when a workflow names it as a step (today `oat-wave-execute` closeout step 8 and the `oat-wave-program` completion checkpoint). Its `OAT_AUTONOMOUS` lifecycle route refuses until a lifecycle skill names the companion, and none does today. When `false`, the companion stops with "interactive completion required" and writes nothing. The interactive `oat-project-complete` is unaffected.
715
722
  - `workflow.postImplementSequence` — legacy `wait`, `summary`, `pr`, or `docs-pr`, or `{ "preApproval": [...], "postApproval": [...] }`. Legacy values remain strings and keep their existing mappings. Structured arrays contain ordered, globally unique `summary`, `document`, `pr`, and `retro` steps. `retro` is post-approval only: a structured value containing it in `preApproval` is rejected. Pre-approval steps run after final review and before final HiLL approval; post-approval steps run only after that approval. Plain retrieval keeps legacy strings and prints structured values as compact JSON; `--json` returns the raw value.
716
723
  - `workflow.retro.filing.repo` — `issues`, `backlog`, or `none`; unset by default. Selects the repo-lane filing destination.
717
724
  - `workflow.retro.filing.upstream` — `issues` or `none`; unset by default. Selects the upstream-lane filing destination.
@@ -889,6 +896,7 @@ Other preferences **depend on per-repo configuration** to be safe. These should
889
896
  - `workflow.archiveOnComplete` — correctness depends on the repo's `archive.s3Uri` / `archive.s3SyncOnComplete` being configured. A user-level `true` would try to archive in repos that aren't set up for it.
890
897
  - `workflow.postImplementSequence` — correctness depends on `documentation.requireForProjectCompletion`. Setting `pr` at user level would foot-gun you in any repo that requires docs, because completion would later block on the docs gate while the PR is already open.
891
898
  - `workflow.createPrOnComplete` — this key is almost always redundant with `postImplementSequence`-driven flows. When it's meaningful, its correctness depends on the same per-repo docs and PR gates. Prefer shared scope, or omit it entirely and rely on `postImplementSequence: pr` or `docs-pr` to handle PR creation at the end of implement.
899
+ - `workflow.autonomousComplete` — authorizes unattended completion, which archives with the repo's `workflow.archiveOnComplete` and `archive.*` settings. It never creates a PR: it reads and reports `workflow.createPrOnComplete` without acting on it, and only updates the description of an already tracked PR. A user-level `true` would authorize autonomous completion in every repo, including ones whose archive settings were never chosen for it. Set it with `--shared` (or `--local` for one checkout) in each repo whose completion settings you have reviewed.
892
900
 
893
901
  **Cross-repo foot-gun example:** If you set `workflow.createPrOnComplete: true --user`, it applies to every repo you work on. In a repo with `documentation.requireForProjectCompletion: true` and `postImplementSequence: pr` (no docs step), running `oat-project-complete` would try to auto-create a PR, then immediately hit the docs gate and block you — leaving you with an open PR and a stuck completion. Your user-level preference silently asserted something that only holds in a specific shared-config shape.
894
902
 
@@ -145,6 +145,7 @@ for policy, storage, approval, and recovery details.
145
145
  - `oat-explainer-kit`
146
146
  - `oat-wrap-up`
147
147
  - `oat-project-complete`
148
+ - `oat-project-complete-auto`
148
149
  - `oat-wave-program`
149
150
  - `oat-wave-execute`
150
151
 
@@ -303,11 +303,14 @@ downgrades. Every claim a review kept below `verified` (an unresolved issue
303
303
  scoped to it or global to its review, a coverage finding that names it, or a
304
304
  non-affirming disposition) is listed under Review Downgrades with the review's
305
305
  own text, even when it is not a key claim, so a `complete` packet cannot hide a
306
- downgraded claim. A claim that a required review left without a disposition stays
307
- `unresolved`. Any claim below `verified` that an incorporated assurance review,
308
- core or thorough, listed in its brief but left without a disposition is listed
309
- there as not reviewed by that review; a claim outside a review's brief is never
310
- reported as its omission. A review's
306
+ downgraded claim. The required reviews are semantic, adversarial, and coverage,
307
+ plus redundant verification when the run achieves `thorough`; contradiction
308
+ resolution is never required. A claim that any required review left without a
309
+ disposition stays `unresolved`, so the run publishes an honest packet instead of
310
+ failing validation. Any claim below `verified` that an incorporated assurance
311
+ review, core or thorough, listed in its brief but left without a disposition is
312
+ listed there as not reviewed by that review; a claim outside a required review's
313
+ brief is listed as outside its brief, never as that review's omission. A review's
311
314
  `unresolvedIssues` entry may name the claim IDs it affects or apply to the
312
315
  whole review; a legacy plain-string entry is read as review-wide. A material
313
316
  coverage gap does not fail publication by itself: the claims it affects stay
@@ -75,6 +75,16 @@ A boundary is a successful fail-closed outcome, not permission to continue with
75
75
  a guessed answer. The run reports what stopped, the evidence, and the operator
76
76
  action needed to resume.
77
77
 
78
+ When a review or gate budget runs out (a review-cycle cap, the orchestration
79
+ retry limit, or a gate's `maxAttempts`), the run first dispatches the
80
+ [complexity review](../projects/reviews/index.md#complexity-review-at-budget-exhaustion)
81
+ and includes its decision-message content in the boundary report. The run never
82
+ selects the disposition, including **simplify**: the operator chooses when
83
+ resuming. A quick-start plan gate outcome is persisted as
84
+ `oat_quick_start_gate` (see
85
+ [Gate approval records](workflow-gates.md#gate-approval-records)); a failed
86
+ `prompt` gate is recorded as `blocked`, never as approved.
87
+
78
88
  The canonical autonomy contract and exhaustive gate inventory
79
89
  (`.agents/docs/autonomy-contract.md`, vendored into each consuming skill at
80
90
  `references/docs/autonomy-contract.md`) map each prompt to its autonomous
@@ -247,6 +247,45 @@ Only an artifact with `oat_review_invocation: gate` and the matching
247
247
  review, phase review, or manually produced independent review cannot substitute
248
248
  for it.
249
249
 
250
+ ### Gate approval records
251
+
252
+ Two lifecycle gates persist their outcome in project `state.md` with a shared
253
+ five-field core:
254
+
255
+ | Field | Meaning |
256
+ | -------------------- | ---------------------------------------------------------------------------------------------- |
257
+ | `status` | `allowed` or `blocked` |
258
+ | `disposition` | `passed`, `warned`, `prompt_approved`, or `project_disabled` when allowed; `null` when blocked |
259
+ | `config_fingerprint` | Stable hash of the resolved gate declaration |
260
+ | `reviewed_head` | The commit the gate reviewed, recorded as provenance |
261
+ | `decided_at` | ISO 8601 UTC time of the decision |
262
+
263
+ `oat_implement_exit_gate` keeps its additional closeout fields and writes
264
+ `decided_at` with every allowed or blocked outcome. `oat_quick_start_gate`,
265
+ written by `oat-project-quick-start` for every configured plan-gate outcome,
266
+ carries exactly the core:
267
+
268
+ - a passing gate writes `allowed/passed`, and a `warn` failure writes
269
+ `allowed/warned`;
270
+ - a `prompt` failure the operator explicitly continues past writes
271
+ `allowed/prompt_approved`;
272
+ - a declined or deferred `prompt` (always under `OAT_AUTONOMOUS=1`), a `block`
273
+ still failing at `maxAttempts`, or an operational failure writes `blocked`
274
+ with a `null` disposition;
275
+ - a gate disabled by project override writes `allowed/project_disabled`
276
+ without launching anything; and
277
+ - a gate that is not configured writes no record (implement writes
278
+ `allowed/no_gate` instead).
279
+
280
+ `oat-project-next` and `oat-project-progress` report the quick-start record as
281
+ recorded: status, disposition, `decided_at`, and `config_fingerprint` as
282
+ provenance, or `malformed` when the fields do not form a valid record. They do
283
+ not recompute the fingerprint, because no CLI emits a canonical one for the
284
+ quick-start gate, and they never route on the record: quick plan readiness
285
+ remains the only routing rule for quick plans, and `reviewed_head` is not
286
+ compared with `HEAD` because quick-start commits after the gate. A record
287
+ written before `decided_at` existed is still valid.
288
+
250
289
  ## Review gates
251
290
 
252
291
  `oat gate review` is intentionally stateful. It is equivalent to running
@@ -953,6 +992,12 @@ failures, and receive failures are operational failures rather than validated
953
992
  blocking findings. They remain blocked regardless of `onFailure`; even `warn`
954
993
  cannot turn them into an allowed disposition.
955
994
 
995
+ When `block` still fails after `maxAttempts`, the implementation exit gate and
996
+ the quick-start plan gate run a
997
+ [complexity review](../projects/reviews/index.md#complexity-review-at-budget-exhaustion)
998
+ before escalating, and show it with the accumulated feedback. The operator
999
+ chooses how to proceed, including **simplify**; agents never choose for them.
1000
+
956
1001
  `cross-provider-exec` does fallback only before dispatch, while selecting an
957
1002
  available target. Once a target actually runs, its exit code is the gate result;
958
1003
  OAT does not try another target after a failed review.
@@ -970,9 +1015,11 @@ the budget at the narrowest useful level. The first valid value wins:
970
1015
  All configured values must be integer milliseconds from `1,000` through
971
1016
  `14,400,000`. Invalid persisted values are ignored with a warning and
972
1017
  resolution continues to the next source. Code reviews at `final`, phase
973
- (`pNN`), or phase-range (`pNN-pMM`) scope default to 1,800,000 ms (30 minutes).
974
- Task-scoped code reviews (`pNN-tNN`) and artifact reviews default to 900,000 ms
975
- (15 minutes). Startup output reports both the resolved value and source.
1018
+ (`pNN`), or phase-range (`pNN-pMM`) scope and every artifact review (for
1019
+ example `plan`, `design`, or `discovery`) default to 1,800,000 ms (30 minutes),
1020
+ because they read the full surface. Task-scoped code reviews (`pNN-tNN`)
1021
+ default to 900,000 ms (15 minutes). Startup output reports both the resolved
1022
+ value and source.
976
1023
 
977
1024
  Example migration from the former single environment override:
978
1025
 
@@ -981,7 +1028,7 @@ Example migration from the former single environment override:
981
1028
  "workflow": {
982
1029
  "gateTimeouts": {
983
1030
  "code": 2400000,
984
- "artifact": 900000
1031
+ "artifact": 2400000
985
1032
  },
986
1033
  "gates": {
987
1034
  "execTargets": {
@@ -1048,10 +1095,60 @@ diagnostic because the refusal itself explains why execution stopped.
1048
1095
 
1049
1096
  Before spawn, the gate also writes a transient marker under the system temp
1050
1097
  directory at `oat-gate-runs/<runId>.json`; startup diagnostics print its path.
1051
- The marker records target, runtime, project, review type/scope, start time,
1052
- budget, and budget source. It is deleted at terminal completion. An orphaned
1053
- marker indicates the gate parent itself stopped unexpectedly, but markers are
1054
- diagnostic only and are never used for artifact validation.
1098
+ The marker records target, runtime, project, the resolved project directory
1099
+ (`projectRoot`), the owning gate process ID (`pid`), review type/scope, start
1100
+ time, budget, and budget source. It is deleted at terminal completion. An
1101
+ orphaned marker indicates the gate parent itself stopped unexpectedly. Markers
1102
+ are diagnostic only: they are never used for artifact validation or for
1103
+ duplicate-run detection.
1104
+
1105
+ #### Nested and duplicate runs
1106
+
1107
+ Before launching, `oat gate review` atomically claims its project directory,
1108
+ review type, and review scope (type and scope compare case-insensitively). The
1109
+ claim is a `claim-<hash>.lock` file in the same `oat-gate-runs/` directory,
1110
+ created through an exclusive link, so at most one live gate holds a given
1111
+ project, type, and scope at a time. That holds even when two identical gates
1112
+ start at the same moment. The claim is released when the run ends.
1113
+
1114
+ If the claim is already held by a live process, the new run is rejected
1115
+ without launching a target, writing a marker, or appending a project-log entry.
1116
+ It exits nonzero with `status: review_failed`,
1117
+ `outcome: review_did_not_complete`, and a message naming the holding run, its
1118
+ process ID, and its claim path. This covers a reviewer that launches its own
1119
+ gate for the scope it is reviewing, a second orchestrator launch for a scope
1120
+ already under review, and simultaneous launches. Wait for the live run to
1121
+ finish; remove the named claim only when that process is not a gate. A claim
1122
+ whose owner process is dead, or whose content cannot be parsed, is replaced
1123
+ once and the run proceeds. Recovery and release serialize destructive claim
1124
+ changes with an exclusive `<claim-path>.mutation` directory. Recovery checks
1125
+ ownership again under that guard before removing a stale claim, so a
1126
+ replacement live owner remains protected even when three launches compete.
1127
+ If another mutation holds the guard, the new run refuses to start; retry after
1128
+ it finishes. An interrupted mutation can leave the guard behind. Remove that
1129
+ exact guard directory only after verifying that no gate is still using it;
1130
+ OAT does not automatically reclaim it. Liveness is a process-ID check, so a stale claim
1131
+ whose process ID was reused by an unrelated process still blocks until it is
1132
+ removed.
1133
+
1134
+ The gate exports its run directory to the reviewer child as
1135
+ `OAT_GATE_RUN_MARKER_DIR`, and every gate prefers that variable (when it is an
1136
+ absolute path) over the system temp directory. A nested gate therefore finds
1137
+ its parent's claim even when the reviewer runtime gives tool commands a
1138
+ different `TMPDIR`. Runs in separate checkouts or worktrees resolve to
1139
+ different project directories and never block each other.
1140
+
1141
+ The `ok`/`blocked` envelope and the `review_did_not_complete` envelope (child
1142
+ failure, timeout, refusal, or duplicate rejection) record the decision as
1143
+ `recursion`: `{ "decision": "none" }`,
1144
+ `{ "decision": "rejected", "matchedRunId": "<runId>" }`, or
1145
+ `{ "decision": "unchecked" }` when claim acquisition fails (including an
1146
+ unreadable claim or a held mutation guard). The gate warns, exits nonzero with
1147
+ `status: review_failed` and `outcome: review_did_not_complete`, and does not
1148
+ launch a reviewer, write a run marker, or append a project-log entry. Other envelopes keep
1149
+ their existing shape. JSON mode also writes a `gate-recursion` diagnostic line
1150
+ beside the `gate-run-marker` line; a rejection adds `matchedPid` and
1151
+ `claimPath`.
1055
1152
 
1056
1153
  After a review target times out, OAT re-scans the project reviews for exactly
1057
1154
  one artifact carrying that invocation's `oat_gate_run_id`. A recovered artifact
@@ -1085,6 +1182,7 @@ those artifacts; correct the project/run correlation and start a new gate run.
1085
1182
  | Passing artifact lost receive routing | handoff and `receiveEligible` fixture |
1086
1183
  | 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 |
1087
1184
  | 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 |
1185
+ | A second gate ran for a project and scope already under review | claim unit cases plus running-gate, simultaneous-launch, and differing-`TMPDIR` nested fake-runtime cases |
1088
1186
 
1089
1187
  ## Current limits
1090
1188
 
@@ -1200,8 +1298,9 @@ skip tool-approval prompts, so an unattended reviewer can stall on such a
1200
1298
  prompt. On a trusted machine that runs gates unattended, add your own target
1201
1299
  with the permissions it needs, for example with `--layer user`.
1202
1300
 
1203
- A code review of a whole phase, a phase range, or the final result may run for
1204
- 30 minutes by default; other reviews get 15 minutes. OAT uses the first timeout
1301
+ A code review of a whole phase, a phase range, or the final result, and any
1302
+ artifact review, may run for 30 minutes by default; task-scoped code reviews
1303
+ get 15 minutes. OAT uses the first timeout
1205
1304
  it finds: the command's `--timeout-ms`, then the target's `timeoutMs`, then
1206
1305
  `workflow.gateTimeouts`, then the `OAT_GATE_EXEC_TIMEOUT_MS` environment
1207
1306
  variable, then the built-in default.
@@ -77,6 +77,7 @@ No gate is configured by default.
77
77
  | Final review | 1 reviewer | At most 3 review cycles, then the agent stops and asks you how to proceed |
78
78
  | Review at checkpoints | 1 extra review at each checkpoint before the last, when on | Off unless you answer yes to the auto-review question on the first implementation run or set `workflow.autoReviewAtHillCheckpoints`; autonomous runs always turn it on |
79
79
  | Gate (optional) | 1 reviewer run per gate | `maxAttempts`, 2 runs in total by default |
80
+ | Budget exhausted | 1 read-only complexity review | Runs once when a review cycle cap, the retry limit, or a gate's `maxAttempts` runs out, before the agent asks you how to proceed |
80
81
 
81
82
  OAT does not estimate prices. Cost depends on your provider's pricing and on
82
83
  your _dispatch policy_: the highest model tier OAT may use for subagents.
@@ -92,7 +93,8 @@ or High finding adds 2 runs, a fix and a new review, at most twice per phase, so
92
93
  the phases alone can reach 18. Not counted: the summary, documentation, and pull
93
94
  request steps, the project explainer and project recap, and the optional phase
94
95
  gate review (one extra reviewer run per selected phase). A blocked
95
- implementation gate also reruns the final review before the gate runs again.
96
+ implementation gate also reruns the final review before the gate runs again,
97
+ and any budget that runs out adds one read-only complexity-review run.
96
98
 
97
99
  ## What OAT does without asking
98
100
 
@@ -21,7 +21,9 @@ When no closeout sequence is stored for the project, finish it in this order:
21
21
  4. Optionally, after you approve the finished work, `oat-project-retro` writes
22
22
  a retrospective, and `oat-project-retro-file` files its tracker items.
23
23
  5. `oat-project-complete` finalizes the project. You can run it before or after
24
- the pull request merges.
24
+ the pull request merges. Wave workflows that complete wrapper projects
25
+ without prompts use the
26
+ [`oat-project-complete-auto`](#oat-project-complete-auto) companion instead.
25
27
 
26
28
  Use `oat-project-pr-progress` instead of the final PR only to share one
27
29
  finished phase while later phases are still in progress. Use
@@ -536,3 +538,62 @@ fakes completion by editing a status field by hand.
536
538
  **Next step:** Confirm the reported completion and PR-update outcomes. Follow
537
539
  any explicit recovery action if the flow stopped. Merge and release remain
538
540
  separate operations under repository policy.
541
+
542
+ ## oat-project-complete-auto
543
+
544
+ The non-interactive companion to `oat-project-complete`. Workflow steps use it
545
+ to complete projects without prompts; a person completing a project uses
546
+ `oat-project-complete`. It decides every completion answer from config and
547
+ recorded project state, refuses whenever an answer would need a human, and
548
+ then follows the interactive skill's current steps.
549
+
550
+ **Invocation:** You do not invoke it. The skill is model-invocable but not
551
+ user-invocable, so it is never offered as a slash command. It runs only when a
552
+ workflow step names it with a `--requested-by` value: `oat-wave-execute`
553
+ closeout step 8 (one wave wrapper, completed before its merge handoff) and the
554
+ `oat-wave-program` program completion checkpoint (a batch of wrappers, after
555
+ your yes). Its `OAT_AUTONOMOUS` lifecycle route refuses until a lifecycle
556
+ skill names the companion, and none does today. An agent never runs it on its
557
+ own initiative, for example to clean up a finished but unarchived project.
558
+
559
+ **Prerequisites:** Needs `workflow.autonomousComplete: true`; without it the
560
+ skill stops with "interactive completion required" and writes nothing (see
561
+ [Configuration](../../../reference/configuration.md)). It also needs an
562
+ installed `oat-project-complete` with its scripts. Each project is then
563
+ preflighted on its own and refused, with the failing check named, when its
564
+ closeout sequence is incomplete, a task is incomplete, the final review has
565
+ not passed, the PR precondition is unmet, blockers are recorded, the project
566
+ log is ambiguous, or a completion question has no recorded answer (for
567
+ example `workflow.archiveOnComplete` unset on a shared or synced project). The
568
+ PR must be merged, or, for a step that completes before the merge, open and
569
+ tracked in the project's state.
570
+
571
+ **What it does without asking:** after every guard passes, it records a
572
+ completion-before-merge exception in `implementation.md` when the PR is still
573
+ open, points the active project at the project, and follows
574
+ `oat-project-complete` with the resolved answers: archive per
575
+ `workflow.archiveOnComplete`, a summary refresh when the summary is missing or
576
+ stale, and no retrospective. It never creates a PR, whatever
577
+ `workflow.createPrOnComplete` says; it updates the description of an existing
578
+ tracked PR as the interactive steps require. The completion commit body
579
+ records the requesting step (for a synced archive, the run report does). In batch mode a refused project stays deferred
580
+ while the others complete.
581
+
582
+ **Example scenario:** An autonomous wave run reaches closeout with the final
583
+ review passed and the wave PR open. Execute's step 8 runs the companion with
584
+ `--completion-before-merge`, which records the exception and completes and
585
+ archives the wrapper before the merge handoff. Had `workflow.autonomousComplete`
586
+ been off, the companion would refuse and the wave would defer the completion
587
+ tail to program close instead.
588
+
589
+ **Expected output:** A run report with one entry per project: `completed`,
590
+ `refused`, or `failed`, the refusing check (`opt-in`, `activation`, or
591
+ `preflight:<n>`), the PR and its state, any exception, the archive decision,
592
+ and the completion commit. The calling workflow records the outcome in its own
593
+ ledger.
594
+
595
+ **Next step:** For a refused project, fix the named check or complete it with
596
+ `oat-project-complete`. If a completion step fails after the project was
597
+ archived, a later companion run refuses because the project directory is gone;
598
+ resume with `oat-project-complete`, whose archive-resume branches finish the
599
+ tail.
@@ -74,8 +74,12 @@ The root:
74
74
  cleanliness;
75
75
  - selects and launches the phase reviewer;
76
76
  - owns retry limits, review disposition, worktree fan-in, HiLL checkpoints, and
77
- tracking-artifact commits; and
78
- - runs external phase gates and final closeout.
77
+ tracking-artifact commits;
78
+ - runs external phase gates and final closeout; and
79
+ - logs root judgment: breaks, surprises, workarounds, or notable successes,
80
+ including observations relayed from subagent reports, appended through
81
+ `oat project log append` at the next bookkeeping boundary rather than while
82
+ a child owns the worktree.
79
83
 
80
84
  The root does not implement phase tasks while an accepted phase launch owns
81
85
  that scope.
@@ -108,7 +112,9 @@ once, and directly executes each task in plan order. For every task it:
108
112
  6. verifies the commit, file boundary, tests, and clean worktree.
109
113
 
110
114
  After all tasks, it runs phase-wide verification and returns a compact report.
111
- It does not dispatch the phase reviewer or mutate general project bookkeeping.
115
+ It does not dispatch the phase reviewer, mutate general project bookkeeping,
116
+ or write the project log; phase implementers and other dispatched subagents
117
+ have no logging duties.
112
118
  While it owns the worktree, it may atomically update only the active phase's
113
119
  authoritative `oat_phase_recovery_policy.phase_attempt_usage.<pNN>` entry. The
114
120
  phase returns with a matching committed `completed` or `failed` terminal marker
@@ -473,6 +479,20 @@ accepted failed launch and not a new schema version.
473
479
  Review-->>Root: Pass
474
480
  ```
475
481
 
482
+ ### Budget exhaustion
483
+
484
+ The bounded loops end at fixed budgets: fix and re-review rounds at
485
+ `oat_orchestration_retry_limit`, phase review gate rounds at the same limit,
486
+ the final review at its three-cycle cap, and the configured exit gate at
487
+ `maxAttempts`. At each of these points the root dispatches one read-only
488
+ [complexity review](../reviews/index.md#complexity-review-at-budget-exhaustion) before
489
+ escalating, saves its report under `reviews/archived/`, and shows a decision
490
+ message with the stop reasons, the verdict, and the recommended disposition.
491
+ The operator chooses: extra cycles, proceed with override, corrective revision,
492
+ or **simplify**. The choice and the report path are recorded in
493
+ `implementation.md`. Agents never select the disposition; under
494
+ `OAT_AUTONOMOUS=1` the run stops with the same content in its boundary report.
495
+
476
496
  ## Parallel Phase Groups
477
497
 
478
498
  For a plan-declared parallel group, the root:
@@ -119,6 +119,12 @@ entries without asking agents to edit `project-log.md`:
119
119
  - `oat-project-implement` records accepted subagent dispatches, STOP or park
120
120
  events, phase outcomes, and parallel-group merge results. These entries point
121
121
  to the corresponding `implementation.md` record instead of copying it.
122
+ - The `oat-project-implement` root also appends root-judgment entries when
123
+ breaks, surprises, workarounds, or notable successes surface, including
124
+ observations relayed from subagent reports. An entry that surfaces while a
125
+ child owns the worktree is queued and appended at the next bookkeeping
126
+ boundary. Phase implementers and other dispatched subagents have no logging
127
+ duties.
122
128
  - When `oat-project-implement` or `oat-project-review-provide` receives an
123
129
  artifact-mode review, the root workflow first consumes exactly one
124
130
  `**Reconnaissance:** attempted` or
@@ -318,6 +318,7 @@ See [Implementation Execution](execution/implementation-execution.md) for the fu
318
318
  - `oat-project-review-receive` now presents a findings overview before asking for any disposition decisions.
319
319
  - Findings are shown with stable IDs by severity (`C*`, `I*`, `M*`, `m*`) so follow-up choices map clearly to specific items.
320
320
  - For each finding, the receive step summarizes the reviewer note, adds agent analysis, and gives a recommendation (convert now vs defer with rationale).
321
+ - When a scope reaches the three-cycle review cap, the receive step dispatches a [complexity review](reviews/index.md#complexity-review-at-budget-exhaustion) and adds **simplify** to the dispositions the operator can choose. Every other budget exhaustion in the lifecycle (the orchestration retry limit, the final review cap, and a gate's `maxAttempts`) runs the same review before escalating.
321
322
 
322
323
  ## Alternate lifecycle lanes
323
324
 
@@ -398,6 +399,12 @@ effort controls.
398
399
 
399
400
  Quick lane lightweight design intentionally keeps a smaller collaborative/draft choice. Selective collaborative becomes available only after promotion into the full spec-driven design lane.
400
401
 
402
+ When a plan gate is configured, quick-start persists its outcome as
403
+ `oat_quick_start_gate` in project state (see
404
+ [Gate approval records](../advanced/workflow-gates.md#gate-approval-records)).
405
+ `oat-project-next` and `oat-project-progress` report that record; quick plan
406
+ readiness stays the only routing rule for quick plans.
407
+
401
408
  Quick-start follows the same dispatch policy rule at the plan boundary: capture
402
409
  the policy when interactive, persist `oat_dispatch_policy` to project state, and
403
410
  avoid any mid-implementation policy prompt. Legacy dispatch-ceiling state is