@open-agent-toolkit/cli 0.3.15 → 0.3.17

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 (189) hide show
  1. package/assets/NOTICES.md +48 -0
  2. package/assets/agents/oat-phase-implementer.md +26 -6
  3. package/assets/agents/oat-reviewer.md +51 -1
  4. package/assets/bundle-metadata.json +1 -1
  5. package/assets/docs/contributing/documentation.md +4 -0
  6. package/assets/docs/contributing/skills.md +3 -1
  7. package/assets/docs/getting-started/bootstrap.md +1 -1
  8. package/assets/docs/getting-started/index.md +0 -4
  9. package/assets/docs/getting-started/tool-packs.md +0 -7
  10. package/assets/docs/provider-sync/commands.md +21 -0
  11. package/assets/docs/reference/cli-reference.md +44 -2
  12. package/assets/docs/reference/config-and-local-state.md +11 -2
  13. package/assets/docs/reference/configuration.md +10 -2
  14. package/assets/docs/reference/project-artifacts.md +43 -8
  15. package/assets/docs/skills/index.md +1 -0
  16. package/assets/docs/skills/recon.md +8 -5
  17. package/assets/docs/skills/repo-improve.md +9 -7
  18. package/assets/docs/workflows/advanced/autonomy.md +50 -0
  19. package/assets/docs/workflows/advanced/workflow-gates.md +109 -10
  20. package/assets/docs/workflows/approvals-and-automation.md +3 -1
  21. package/assets/docs/workflows/backlog-and-planning/backlog-lifecycle.md +25 -24
  22. package/assets/docs/workflows/backlog-and-planning/remote-project-management.md +0 -7
  23. package/assets/docs/workflows/ideas/lifecycle.md +2 -7
  24. package/assets/docs/workflows/projects/closeout/closeout-skills.md +62 -1
  25. package/assets/docs/workflows/projects/execution/implementation-execution.md +23 -3
  26. package/assets/docs/workflows/projects/execution/project-log.md +6 -0
  27. package/assets/docs/workflows/projects/lifecycle.md +7 -0
  28. package/assets/docs/workflows/projects/reviews/index.md +63 -1
  29. package/assets/docs/workflows/projects/reviews/review-flavors.md +8 -0
  30. package/assets/docs/workflows/waves/wave-workflows.md +11 -3
  31. package/assets/public-package-versions.json +4 -4
  32. package/assets/skills/oat-agent-instructions-apply/SKILL.md +14 -4
  33. package/assets/skills/oat-brainstorm/SKILL.md +17 -13
  34. package/assets/skills/oat-docs-apply/SKILL.md +13 -3
  35. package/assets/skills/oat-doctor/SKILL.md +11 -1
  36. package/assets/skills/oat-explainer-kit/SKILL.md +1 -1
  37. package/assets/skills/oat-explainer-kit/references/lifecycle-contract.md +6 -3
  38. package/assets/skills/oat-pjm-review-backlog/SKILL.md +2 -2
  39. package/assets/skills/oat-pjm-update-repo-reference/SKILL.md +28 -3
  40. package/assets/skills/oat-project-autonomous/SKILL.md +60 -5
  41. package/assets/skills/oat-project-autonomous/references/gate-inventory.md +210 -165
  42. package/assets/skills/oat-project-capture/SKILL.md +7 -3
  43. package/assets/skills/oat-project-complete/SKILL.md +39 -34
  44. package/assets/skills/oat-project-complete/scripts/execute-synced-archive-entry.mjs +106 -28
  45. package/assets/skills/oat-project-complete/scripts/parse-synced-archive-resume-fields.mjs +30 -3
  46. package/assets/skills/oat-project-complete-auto/SKILL.md +388 -0
  47. package/assets/skills/oat-project-design/SKILL.md +12 -9
  48. package/assets/skills/oat-project-discover/SKILL.md +8 -4
  49. package/assets/skills/oat-project-document/SKILL.md +14 -5
  50. package/assets/skills/oat-project-document/references/docs/autonomy-contract.md +210 -165
  51. package/assets/skills/oat-project-implement/SKILL.md +6 -1
  52. package/assets/skills/oat-project-implement/references/completion-and-closeout.md +34 -7
  53. package/assets/skills/oat-project-implement/references/docs/autonomy-contract.md +210 -165
  54. package/assets/skills/oat-project-implement/references/docs/complexity-review-fallback.md +262 -0
  55. package/assets/skills/oat-project-implement/references/docs/gate-approval-record.md +80 -0
  56. package/assets/skills/oat-project-implement/references/phase-execution.md +38 -6
  57. package/assets/skills/oat-project-import-plan/SKILL.md +20 -6
  58. package/assets/skills/oat-project-lite/SKILL.md +7 -5
  59. package/assets/skills/oat-project-lite/references/docs/autonomy-contract.md +210 -165
  60. package/assets/skills/oat-project-new/SKILL.md +6 -2
  61. package/assets/skills/oat-project-next/SKILL.md +19 -2
  62. package/assets/skills/oat-project-next/references/docs/gate-approval-record.md +80 -0
  63. package/assets/skills/oat-project-plan/SKILL.md +14 -6
  64. package/assets/skills/oat-project-pr-final/SKILL.md +4 -3
  65. package/assets/skills/oat-project-pr-final/references/docs/autonomy-contract.md +210 -165
  66. package/assets/skills/oat-project-progress/SKILL.md +27 -1
  67. package/assets/skills/oat-project-progress/references/docs/gate-approval-record.md +80 -0
  68. package/assets/skills/oat-project-promote-spec-driven/SKILL.md +7 -3
  69. package/assets/skills/oat-project-quick-start/SKILL.md +47 -14
  70. package/assets/skills/oat-project-quick-start/references/docs/autonomy-contract.md +210 -165
  71. package/assets/skills/oat-project-quick-start/references/docs/complexity-review-fallback.md +262 -0
  72. package/assets/skills/oat-project-quick-start/references/docs/gate-approval-record.md +80 -0
  73. package/assets/skills/oat-project-reconcile/SKILL.md +8 -4
  74. package/assets/skills/oat-project-retro/SKILL.md +1 -1
  75. package/assets/skills/oat-project-retro/references/apply-procedure.md +6 -6
  76. package/assets/skills/oat-project-retro-file/SKILL.md +7 -3
  77. package/assets/skills/oat-project-review-provide/SKILL.md +23 -4
  78. package/assets/skills/oat-project-review-provide-remote/SKILL.md +19 -1
  79. package/assets/skills/oat-project-review-receive/SKILL.md +57 -14
  80. package/assets/skills/oat-project-review-receive/references/docs/complexity-review-fallback.md +262 -0
  81. package/assets/skills/oat-project-review-receive-remote/SKILL.md +7 -3
  82. package/assets/skills/oat-project-revise/SKILL.md +13 -5
  83. package/assets/skills/oat-project-spec/SKILL.md +8 -4
  84. package/assets/skills/oat-project-summary/SKILL.md +11 -7
  85. package/assets/skills/oat-repo-knowledge-index/SKILL.md +54 -20
  86. package/assets/skills/oat-repo-knowledge-index/scripts/refresh-owned.mjs +118 -0
  87. package/assets/skills/oat-review-provide/SKILL.md +7 -3
  88. package/assets/skills/oat-review-receive-remote/SKILL.md +14 -4
  89. package/assets/skills/oat-wave-execute/SKILL.md +72 -38
  90. package/assets/skills/oat-wave-execute/assets/wrapper-plan-template.md +16 -2
  91. package/assets/skills/oat-wave-program/SKILL.md +15 -6
  92. package/assets/skills/oat-worktree-bootstrap-auto/SKILL.md +45 -17
  93. package/assets/skills/oat-wrap-up/SKILL.md +9 -3
  94. package/assets/skills/oat-wrap-up/references/report-template.md +1 -1
  95. package/assets/skills/recon/SKILL.md +1 -1
  96. package/assets/skills/recon/references/packet-contract.md +18 -3
  97. package/assets/skills/recon/scripts/lib/contracts.mjs +16 -2
  98. package/assets/skills/recon/scripts/reconcile-ledger.mjs +20 -10
  99. package/assets/skills/recon/scripts/render-packet.mjs +31 -3
  100. package/assets/skills/recon/scripts/validate-packet.mjs +5 -5
  101. package/assets/templates/pjm-agents.md +38 -8
  102. package/assets/templates/repo-agents.md +5 -0
  103. package/assets/templates/repo-readme.md +5 -0
  104. package/assets/templates/state.md +7 -0
  105. package/dist/commands/backlog/archive.d.ts +3 -0
  106. package/dist/commands/backlog/archive.d.ts.map +1 -1
  107. package/dist/commands/backlog/archive.js +63 -26
  108. package/dist/commands/backlog/index.d.ts.map +1 -1
  109. package/dist/commands/backlog/index.js +3 -0
  110. package/dist/commands/backlog/rewrite-references.d.ts +5 -0
  111. package/dist/commands/backlog/rewrite-references.d.ts.map +1 -1
  112. package/dist/commands/backlog/rewrite-references.js +39 -1
  113. package/dist/commands/config/index.d.ts.map +1 -1
  114. package/dist/commands/config/index.js +13 -0
  115. package/dist/commands/gate/index.d.ts +5 -0
  116. package/dist/commands/gate/index.d.ts.map +1 -1
  117. package/dist/commands/gate/index.js +270 -9
  118. package/dist/commands/init/index.d.ts.map +1 -1
  119. package/dist/commands/init/index.js +1 -0
  120. package/dist/commands/internal/commit-paths.d.ts +3 -0
  121. package/dist/commands/internal/commit-paths.d.ts.map +1 -0
  122. package/dist/commands/internal/commit-paths.js +31 -0
  123. package/dist/commands/internal/index.d.ts.map +1 -1
  124. package/dist/commands/internal/index.js +2 -0
  125. package/dist/commands/pjm/init.d.ts.map +1 -1
  126. package/dist/commands/pjm/init.js +37 -8
  127. package/dist/commands/project/archive/archive-utils.d.ts +6 -3
  128. package/dist/commands/project/archive/archive-utils.d.ts.map +1 -1
  129. package/dist/commands/project/archive/archive-utils.js +510 -104
  130. package/dist/commands/project/archive/push-runner.d.ts.map +1 -1
  131. package/dist/commands/project/archive/push-runner.js +1 -0
  132. package/dist/commands/project/log/append.d.ts +2 -3
  133. package/dist/commands/project/log/append.d.ts.map +1 -1
  134. package/dist/commands/project/log/append.js +55 -101
  135. package/dist/commands/project/migrate/index.d.ts +1 -2
  136. package/dist/commands/project/migrate/index.d.ts.map +1 -1
  137. package/dist/commands/project/migrate/index.js +8 -2
  138. package/dist/commands/project/new/scaffold.d.ts.map +1 -1
  139. package/dist/commands/project/new/scaffold.js +4 -4
  140. package/dist/commands/project/promote/promote.d.ts +8 -0
  141. package/dist/commands/project/promote/promote.d.ts.map +1 -1
  142. package/dist/commands/project/promote/promote.js +37 -6
  143. package/dist/commands/project/status.d.ts.map +1 -1
  144. package/dist/commands/project/status.js +3 -0
  145. package/dist/commands/project/sync/ref-sync.d.ts +12 -1
  146. package/dist/commands/project/sync/ref-sync.d.ts.map +1 -1
  147. package/dist/commands/project/sync/ref-sync.js +347 -23
  148. package/dist/commands/shared/exact-path-commit.d.ts +32 -0
  149. package/dist/commands/shared/exact-path-commit.d.ts.map +1 -0
  150. package/dist/commands/shared/exact-path-commit.js +691 -0
  151. package/dist/commands/shared/frontmatter.d.ts +1 -1
  152. package/dist/commands/shared/frontmatter.d.ts.map +1 -1
  153. package/dist/commands/shared/frontmatter.js +1 -0
  154. package/dist/commands/state/generate.d.ts +1 -1
  155. package/dist/commands/state/generate.d.ts.map +1 -1
  156. package/dist/commands/state/generate.js +87 -8
  157. package/dist/commands/sync/apply.d.ts.map +1 -1
  158. package/dist/commands/sync/apply.js +31 -5
  159. package/dist/commands/sync/dry-run.d.ts.map +1 -1
  160. package/dist/commands/sync/dry-run.js +28 -11
  161. package/dist/commands/sync/sync.utils.d.ts +13 -0
  162. package/dist/commands/sync/sync.utils.d.ts.map +1 -1
  163. package/dist/commands/sync/sync.utils.js +21 -1
  164. package/dist/commands/tools/shared/pack-manifest.d.ts.map +1 -1
  165. package/dist/commands/tools/shared/pack-manifest.js +1 -0
  166. package/dist/config/oat-config.d.ts +1 -0
  167. package/dist/config/oat-config.d.ts.map +1 -1
  168. package/dist/config/oat-config.js +3 -0
  169. package/dist/config/resolve.d.ts.map +1 -1
  170. package/dist/config/resolve.js +1 -0
  171. package/dist/drift/detector.js +6 -6
  172. package/dist/engine/compute-plan.d.ts.map +1 -1
  173. package/dist/engine/compute-plan.js +87 -2
  174. package/dist/engine/engine.types.d.ts +10 -1
  175. package/dist/engine/engine.types.d.ts.map +1 -1
  176. package/dist/engine/engine.types.js +4 -0
  177. package/dist/engine/execute-plan.d.ts.map +1 -1
  178. package/dist/engine/execute-plan.js +42 -5
  179. package/dist/engine/managed-copy-hash.d.ts +4 -3
  180. package/dist/engine/managed-copy-hash.d.ts.map +1 -1
  181. package/dist/engine/managed-copy-hash.js +4 -3
  182. package/dist/fs/assets.d.ts.map +1 -1
  183. package/dist/fs/assets.js +7 -1
  184. package/dist/manifest/hash.d.ts +8 -10
  185. package/dist/manifest/hash.d.ts.map +1 -1
  186. package/dist/ui/output.js +1 -1
  187. package/dist/validation/skills.d.ts.map +1 -1
  188. package/dist/validation/skills.js +151 -11
  189. package/package.json +3 -2
@@ -166,7 +166,7 @@ is evaluated.
166
166
  - **Passing gate** (no findings at or above the threshold): receive runs a non-pausing **judgment sweep**. It makes a per-finding decision for each Medium/Low — defer to final review (the default, recorded so [final review](#phase-and-final-review) resurfaces it), address now (only for small, contained, low-risk fixes, which do **not** re-trigger the standard reviewer or re-gate the phase), or reject with rationale — then archives the artifact. Address-now is an exception, not the norm; if such a fix reveals a Critical/High concern it escalates to the blocking path.
167
167
  - **Blocking gate** (one or more findings at or above the threshold): receive converts findings to fix tasks and implementation re-runs the standard reviewer and the gate for the phase. These block → fix → re-gate rounds are bounded by `oat_orchestration_retry_limit` (default `2`); exhausting the bound stops a sequential run or excludes the phase in a parallel group, matching the standard fix loop's terminal handling.
168
168
 
169
- Gate-originated artifacts (`oat_review_invocation: gate`) are excluded from the same-scope review-cycle cap in `oat-project-review-receive`. The cap measures failed fix cycles of the standard review loop, so counting gate artifacts would trip it on artifact volume rather than real fix rounds.
169
+ Gate-originated artifacts (`oat_review_invocation: gate`) and saved complexity reports are excluded from the same-scope review-cycle cap in `oat-project-review-receive`. The cap measures failed fix cycles of the standard review loop, so counting gate artifacts would trip it on artifact volume rather than real fix rounds.
170
170
 
171
171
  When a phase is re-gated multiple times, each round produces a distinct review artifact — filenames and `oat_generated_at` are seconds-precision, so rounds never collide and `oat review latest` resolves the newest. An orchestrator should know a gate finished from the `oat --json gate review` result envelope on process exit (`status`, `runId`, `generatedAt`), not by watching the `reviews/` directory or the provider's log; see [Gate completion signal](../../advanced/workflow-gates.md#gate-completion-signal).
172
172
 
@@ -226,6 +226,68 @@ Final review `passed` gate requires:
226
226
  - Deferred Medium findings resurfaced and explicitly dispositioned.
227
227
  - Low findings explicitly dispositioned (after plain-language explanation).
228
228
 
229
+ ## Complexity review at budget exhaustion
230
+
231
+ When a review or gate budget runs out, another round of the same review is
232
+ unlikely to converge. Before asking the operator how to proceed, the root
233
+ dispatches one complexity review and shows it together with the reasons the
234
+ loop stopped. The review asks whether the reviewed work, and the machinery the
235
+ findings keep demanding, earns its cost against the contract. It is not
236
+ another correctness review.
237
+
238
+ It runs at every budget-exhaustion point:
239
+
240
+ | Exhaustion point | Owning skill |
241
+ | ------------------------------------------------------------- | ---------------------------- |
242
+ | Phase review fix rounds reach `oat_orchestration_retry_limit` | `oat-project-implement` |
243
+ | A phase review gate still blocks at that limit | `oat-project-implement` |
244
+ | The final review reaches its three-cycle cap | `oat-project-implement` |
245
+ | The implementation exit gate ends in `block` at `maxAttempts` | `oat-project-implement` |
246
+ | A review scope reaches the three-cycle cap | `oat-project-review-receive` |
247
+ | The quick-start plan gate ends in `block` at `maxAttempts` | `oat-project-quick-start` |
248
+
249
+ A single `prompt` failure, a `warn` outcome, and launch or transport failures
250
+ that consume no attempt are not budget exhaustions. The operator can ask for
251
+ the same review at any other time; there is no automatic early trigger.
252
+
253
+ How it runs:
254
+
255
+ - **Probe.** OAT looks for an installed `complexity-review` skill in
256
+ `~/.agents/skills`, then `~/.claude/skills`, then the repository's
257
+ `.agents/skills`. When one is found, the reviewer follows it as a document,
258
+ without asking questions. Otherwise the reviewer follows a condensed method
259
+ bundled with the lifecycle skills: restate the contract from independent
260
+ sources, establish the simplest viable baseline, inventory the machinery,
261
+ apply the deletion test, build a ledger (Item, Claimed value, Evidence,
262
+ Lifecycle cost, Recommendation), and give a verdict of
263
+ `Deletion-rule compliant`, `Partially compliant`, or `Not compliant`.
264
+ - **Read-only reviewer.** One reviewer-class subagent at the resolved reviewer
265
+ ceiling reads the reviewed target, the contract sources (backlog items,
266
+ discovery, spec, design, and decision records), and every review artifact of
267
+ the exhausted loop. It writes nothing and returns its report to the root.
268
+ Outside an implement run (quick-start, or a standalone review-receive), the
269
+ root loads the project dispatch skills and resolves the reviewer ceiling with
270
+ `oat project dispatch-ceiling resolve --role reviewer`.
271
+ - **One review per exhausted loop.** A saved report for the scope that is newer
272
+ than every review artifact of that scope is reused, so re-entering a capped
273
+ receive does not dispatch a second review.
274
+ - **OAT additions.** The report marks rows only the operator can settle as
275
+ `REQUIRES-OPERATOR`, classifies each open finding as an accepted
276
+ requirement, a regression, or new hardening, lists the findings a
277
+ simplification would dissolve, and recommends a disposition: extra cycles,
278
+ proceed with override, corrective revision, or **simplify**.
279
+ - **Decision message.** The root saves the report as
280
+ `reviews/archived/complexity-<scope>-<timestamp>.md` (outside the top-level
281
+ `reviews/` directory, so routers never mistake it for an unprocessed review,
282
+ and outside the review-cycle count), shows one decision message with the
283
+ stop reasons, verdict, dissolvable findings, and operator questions, and
284
+ records the operator's choice with the report path in `implementation.md`.
285
+
286
+ Agents never select the disposition, including the recommended one. Under
287
+ `OAT_AUTONOMOUS=1` the run stops at its boundary report, which carries the same
288
+ content. The condensed method adapts the operator's `complexity-review` skill
289
+ from `tkstang/skills`; see `NOTICES.md`.
290
+
229
291
  ## Subagent Compatibility
230
292
 
231
293
  `oat-project-review-provide` uses provider-aware subagent dispatch when available. This outer dispatch starts the primary `oat-reviewer`; it is separate from any optional reconnaissance workers that the reviewer may launch after resolving its authoritative review scope:
@@ -36,6 +36,14 @@ for the deep review request/receive mechanics.
36
36
  `oat-project-dispatch-subagents` lifecycle-role table, and the OAT design
37
37
  decision that defined these four flavors.
38
38
 
39
+ Reviews of changed trust or input-limit boundaries require focused probes for
40
+ credible failure modes. Record the failure and accepted controls, their source,
41
+ and any concrete execution limitations. Independently verified implementer
42
+ evidence can satisfy the obligation when the reviewer cannot run the probe;
43
+ unsupported consequential guarantees remain blocking findings. Keep probes
44
+ proportional to the changed boundary and preserve review independence and
45
+ containment.
46
+
39
47
  ## Flow map
40
48
 
41
49
  === "Diagram"
@@ -113,7 +113,9 @@ for your approval before the first wave starts. When the final wave merges,
113
113
  the skill stops at one human-gated checkpoint that asks whether to run the
114
114
  deferred completion tail (archive, S3 upload, and active-project clear) for
115
115
  every wave's wrapper project; autonomous runs never answer that question
116
- themselves.
116
+ themselves. On yes, it runs `oat-project-complete-auto` once in batch mode;
117
+ a wrapper the companion refuses keeps its deferral, and the report names its
118
+ next step (usually completing it with `oat-project-complete`).
117
119
 
118
120
  **Example scenario:** Twelve reviewed external plans include a shared API
119
121
  foundation, client changes, and independent documentation work. Use `new` to
@@ -173,7 +175,10 @@ closeout it archives the wave's backlog items with `oat backlog archive` and
173
175
  runs the configured closeout sequence (which can open the PR). It then stops
174
176
  once at a HiLL (human-in-the-loop) approval checkpoint before running the
175
177
  `oat-project-complete` process, including project archive and any configured
176
- S3 upload. After you merge the wave, it resets the working branch, deletes
178
+ S3 upload. Under autonomous execution it runs that process through the
179
+ `oat-project-complete-auto` companion, which needs
180
+ `workflow.autonomousComplete: true` and records a completion-before-merge
181
+ exception for the open wave PR. After you merge the wave, it resets the working branch, deletes
177
182
  stale phase branches, and runs `oat-wave-program wave-close`. Merging the wave
178
183
  into `main` stays your decision.
179
184
 
@@ -192,7 +197,10 @@ presented as proof the integrated tree passes.
192
197
 
193
198
  Closeout writes end-of-run synthesis before archive work. Autonomous execution
194
199
  can defer a wrapper's archive tail to program close only with an explicit
195
- ledger disposition. That deferral does not satisfy the full completion tail.
200
+ ledger disposition, and only when the companion refuses for a deferrable
201
+ reason (the opt-in is off, the PR precondition is unmet, or a completion
202
+ question has no recorded answer); any other refusal stops closeout at a
203
+ boundary. That deferral does not satisfy the full completion tail.
196
204
  Source-plan requirements remain intact even when live drift changes a mechanism.
197
205
 
198
206
  **Next step:** Follow the wave's reported review and merge boundary. After the
@@ -1,6 +1,6 @@
1
1
  {
2
- "cli": "0.3.15",
3
- "docs-config": "0.3.15",
4
- "docs-theme": "0.3.15",
5
- "docs-transforms": "0.3.15"
2
+ "cli": "0.3.17",
3
+ "docs-config": "0.3.17",
4
+ "docs-theme": "0.3.17",
5
+ "docs-transforms": "0.3.17"
6
6
  }
@@ -5,13 +5,17 @@ disable-model-invocation: true
5
5
  user-invocable: true
6
6
  allowed-tools: Read, Write, Edit, Bash(git:*), Bash(gh:*), Glob, Grep, AskUserQuestion
7
7
  metadata:
8
- version: 1.7.3
8
+ version: 1.7.4
9
9
  ---
10
10
 
11
11
  # Agent Instructions Apply
12
12
 
13
13
  Generate or update agent instruction files based on an analysis artifact, with user review and PR-based workflow.
14
14
 
15
+ ## Hook-safe exact-path commits
16
+
17
+ Before a parent-branch commit, verify `oat internal commit-paths --help` succeeds. If unavailable, stop and update the OAT CLI; never fall back to a staged-index or pathspec-only commit. Set `COMMIT_IDENTITY` to a unique operation/artifact identity before the first attempt and retain it for every retry; use a new identity for a new operation. Pass only the exact produced file list, including tracked removals and both names of a rename. A blocked/failed result stops the workflow; retain its receipt and follow its diagnostics. Hooks remain enabled. Synced project artifacts continue through `oat project push`.
18
+
15
19
  ## Prerequisites
16
20
 
17
21
  - Git repository with a recent analysis artifact in `.oat/repo/analysis/`.
@@ -317,6 +321,12 @@ If branch creation fails (e.g., uncommitted changes), ask the user to resolve an
317
321
 
318
322
  ### Step 5: Generate/Update Instruction Files
319
323
 
324
+ Before the first approved write, initialize `OWNED_OUTPUT_FILES=()`. Append
325
+ each exact successfully created, modified or removed path at that write,
326
+ including both names of a rename and any generated navigation/index file this
327
+ step actually changes. Retain the complete list through verification and commit
328
+ retries; do not substitute a directory or staged-index diff.
329
+
320
330
  For each approved recommendation, in the order from Step 2:
321
331
 
322
332
  - When the companion bundle exists, load the approved recommendation's manifest entry and matching pack before
@@ -382,11 +392,11 @@ not from repo-root `.agents/docs/`.
382
392
  **Stage and commit:**
383
393
 
384
394
  ```bash
385
- git add {list of generated/updated files}
386
- git commit -m "chore: update agent instruction files
395
+ OWNED_COMMIT_PATHS=("${OWNED_OUTPUT_FILES[@]}")
396
+ oat internal commit-paths --identity "${COMMIT_IDENTITY:?set once and retain for retries}:oat-agent-instructions-apply:1" --message "chore: update agent instruction files
387
397
 
388
398
  Generated by oat-agent-instructions-apply from analysis artifact.
389
- Files: {count} created, {count} updated."
399
+ Files: {count} created, {count} updated." -- "${OWNED_COMMIT_PATHS[@]}" || exit 1
390
400
  ```
391
401
 
392
402
  **Offer to open a PR:**
@@ -5,13 +5,17 @@ disable-model-invocation: false
5
5
  user-invocable: true
6
6
  allowed-tools: Read, Write, Bash, Glob, Grep, AskUserQuestion
7
7
  metadata:
8
- version: 1.3.7
8
+ version: 1.3.8
9
9
  ---
10
10
 
11
11
  # Brainstorm
12
12
 
13
13
  Project-independent brainstorming dispatcher. Owns the explicit activation gate (see `## Activation Contract`), the Superpowers-style conversational cadence, the visual-need assessment and conditional visual-companion offer, the destination identification, and the per-destination handoff to existing OAT skills.
14
14
 
15
+ ## Hook-safe exact-path commits
16
+
17
+ Before a parent-branch commit, verify `oat internal commit-paths --help` succeeds. If unavailable, stop and update the OAT CLI; never fall back to a staged-index or pathspec-only commit. Set `COMMIT_IDENTITY` to a unique operation/artifact identity before the first attempt and retain it for every retry; use a new identity for a new operation. Pass only the exact produced file list, including tracked removals and both names of a rename. A blocked/failed result stops the workflow; retain its receipt and follow its diagnostics. Hooks remain enabled. Synced project artifacts continue through `oat project push`.
18
+
15
19
  ## Activation Contract
16
20
 
17
21
  Brainstorm-quality response (options, tradeoffs, open questions, no premature implementation, no destination guess) is the **default** for any exploratory phrasing without a named destination. Mode assertion + banner is **reserved** for explicit hard-activation triggers or user confirmation. The banner is a workflow commitment marker, not a quality marker.
@@ -662,8 +666,8 @@ beside another dirty project file must take Step 4.
662
666
  FOLD_BACK_PUSH=$(oat project push "$ACTIVE_PROJECT" --message "chore(oat): integrate brainstorm into <artifact-basename> for <project-name>" --json) || { echo "oat: project push failed; run oat project pull, resolve the reported state, and retry" >&2; exit 1; }
663
667
  FOLD_BACK_COMMIT_SHA=$(parse_synced_push_receipt "$FOLD_BACK_PUSH") || { printf '%s\n' "$FOLD_BACK_PUSH" >&2; echo "Recovery: run oat project pull \"$ACTIVE_PROJECT\", resolve conflicts, then retry this push." >&2; exit 1; }
664
668
  else
665
- git add -- "$ARTIFACT_PATH"
666
- git commit -m "chore(oat): integrate brainstorm into <artifact-basename> for <project-name>"
669
+ OWNED_COMMIT_PATHS=("$ARTIFACT_PATH")
670
+ oat internal commit-paths --identity "${COMMIT_IDENTITY:?set once and retain for retries}:oat-brainstorm:1" --message "chore(oat): integrate brainstorm into <artifact-basename> for <project-name>" -- "${OWNED_COMMIT_PATHS[@]}" || exit 1
667
671
  FOLD_BACK_COMMIT_SHA=$(git rev-parse HEAD)
668
672
  fi
669
673
  ```
@@ -690,8 +694,8 @@ failures remain fail-closed.
690
694
  CURRENT_ARTIFACT_PUSH=$(oat project push "$ACTIVE_PROJECT" --message "$CURRENT_ARTIFACT_SUBJECT" --json) || { echo "oat: project push failed; run oat project pull, resolve the reported state, and retry" >&2; exit 1; }
691
695
  CURRENT_ARTIFACT_COMMIT_SHA=$(parse_synced_push_receipt "$CURRENT_ARTIFACT_PUSH") || { printf '%s\n' "$CURRENT_ARTIFACT_PUSH" >&2; echo "Recovery: run oat project pull \"$ACTIVE_PROJECT\", resolve conflicts, then retry this push." >&2; exit 1; }
692
696
  else
693
- git add -- "$ARTIFACT_PATH"
694
- git commit --only -m "$CURRENT_ARTIFACT_SUBJECT" -- "$ARTIFACT_PATH"
697
+ OWNED_COMMIT_PATHS=("$ARTIFACT_PATH")
698
+ oat internal commit-paths --identity "${COMMIT_IDENTITY:?set once and retain for retries}:oat-brainstorm:2" --message "$CURRENT_ARTIFACT_SUBJECT" -- "${OWNED_COMMIT_PATHS[@]}" || exit 1
695
699
  CURRENT_ARTIFACT_COMMIT_SHA=$(git rev-parse HEAD)
696
700
  fi
697
701
  ```
@@ -705,8 +709,8 @@ failures remain fail-closed.
705
709
  FOLD_BACK_PUSH=$(oat project push "$ACTIVE_PROJECT" --message "chore(oat): integrate brainstorm into <artifact-basename> for <project-name>" --json) || { echo "oat: project push failed; run oat project pull, resolve the reported state, and retry" >&2; exit 1; }
706
710
  FOLD_BACK_COMMIT_SHA=$(parse_synced_push_receipt "$FOLD_BACK_PUSH") || { printf '%s\n' "$FOLD_BACK_PUSH" >&2; echo "Recovery: run oat project pull \"$ACTIVE_PROJECT\", resolve conflicts, then retry this push." >&2; exit 1; }
707
711
  else
708
- git add -- "$ARTIFACT_PATH"
709
- git commit --only -m "chore(oat): integrate brainstorm into <artifact-basename> for <project-name>" -- "$ARTIFACT_PATH"
712
+ OWNED_COMMIT_PATHS=("$ARTIFACT_PATH")
713
+ oat internal commit-paths --identity "${COMMIT_IDENTITY:?set once and retain for retries}:oat-brainstorm:3" --message "chore(oat): integrate brainstorm into <artifact-basename> for <project-name>" -- "${OWNED_COMMIT_PATHS[@]}" || exit 1
710
714
  FOLD_BACK_COMMIT_SHA=$(git rev-parse HEAD)
711
715
  fi
712
716
  ```
@@ -722,8 +726,8 @@ failures remain fail-closed.
722
726
  MIXED_FOLD_BACK_PUSH=$(oat project push "$ACTIVE_PROJECT" --message "chore(oat): integrate brainstorm + prior edits into <artifact-basename> for <project-name>" --json) || { echo "oat: project push failed; run oat project pull, resolve the reported state, and retry" >&2; exit 1; }
723
727
  FOLD_BACK_COMMIT_SHA=$(parse_synced_push_receipt "$MIXED_FOLD_BACK_PUSH") || { printf '%s\n' "$MIXED_FOLD_BACK_PUSH" >&2; echo "Recovery: run oat project pull \"$ACTIVE_PROJECT\", resolve conflicts, then retry this push." >&2; exit 1; }
724
728
  else
725
- git add -- "$ARTIFACT_PATH"
726
- git commit --only -m "chore(oat): integrate brainstorm + prior edits into <artifact-basename> for <project-name>" -- "$ARTIFACT_PATH"
729
+ OWNED_COMMIT_PATHS=("$ARTIFACT_PATH")
730
+ oat internal commit-paths --identity "${COMMIT_IDENTITY:?set once and retain for retries}:oat-brainstorm:4" --message "chore(oat): integrate brainstorm + prior edits into <artifact-basename> for <project-name>" -- "${OWNED_COMMIT_PATHS[@]}" || exit 1
727
731
  FOLD_BACK_COMMIT_SHA=$(git rev-parse HEAD)
728
732
  fi
729
733
  ```
@@ -773,7 +777,7 @@ The filename was confirmed at step 8 (default `YYYY-MM-DD-<topic>.md`). Resolve
773
777
 
774
778
  If `<ACTIVE_PROJECT>/brainstorming/` does not exist, create it (`mkdir -p`). The `brainstorming/` subdirectory is parallel to existing `pr/` and `reviews/` subdirectories — explicit purpose, naturally discoverable.
775
779
 
776
- Render `${SKILL_DIR}/templates/brainstorm-doc.md` (resolve `${SKILL_DIR}` per the rule in step 3) with the synthesized payload (same shape as the doc-to-path destination) and write to the resolved path.
780
+ Set `REFERENCE_PATH` to the exact resolved file path before writing. Render `${SKILL_DIR}/templates/brainstorm-doc.md` (resolve `${SKILL_DIR}` per the rule in step 3) with the synthesized payload (same shape as the doc-to-path destination) and write to `REFERENCE_PATH`. Retain that produced filename for commit/retry.
777
781
 
778
782
  After writing, persist the file with the same fail-closed scope guard:
779
783
 
@@ -784,13 +788,13 @@ if [ "$PROJECT_SCOPE" = "synced" ]; then
784
788
  REFERENCE_PUSH=$(oat project push "$ACTIVE_PROJECT" --message "chore(oat): capture brainstorming reference for <project-name>" --json) || { echo "oat: project push failed; run oat project pull, resolve the reported state, and retry" >&2; exit 1; }
785
789
  REFERENCE_COMMIT_SHA=$(parse_synced_push_receipt "$REFERENCE_PUSH") || { printf '%s\n' "$REFERENCE_PUSH" >&2; echo "Recovery: run oat project pull \"$ACTIVE_PROJECT\", resolve conflicts, then retry this push." >&2; exit 1; }
786
790
  else
787
- git add -- "<active-project-relative-path>"
788
- git commit -m "chore(oat): capture brainstorming reference for <project-name>"
791
+ OWNED_COMMIT_PATHS=("$REFERENCE_PATH")
792
+ oat internal commit-paths --identity "${COMMIT_IDENTITY:?set once and retain for retries}:oat-brainstorm:5" --message "chore(oat): capture brainstorming reference for <project-name>" -- "${OWNED_COMMIT_PATHS[@]}" || exit 1
789
793
  REFERENCE_COMMIT_SHA=$(git rev-parse HEAD)
790
794
  fi
791
795
  ```
792
796
 
793
- For shared/local scope, use only `git add -- <path>` so unrelated working-tree changes are not swept into the commit, then capture `git rev-parse --short HEAD`. For synced scope, use the validated push receipt SHA and never stage the artifact on the parent branch. Report the resulting SHA alongside the absolute path written, then end mode assertion.
797
+ For shared/local scope, commit only the exact produced path through `oat internal commit-paths` with the retained operation identity, stop on a nonzero result, then capture `git rev-parse --short HEAD`. For synced scope, use the validated push receipt SHA and never stage the artifact on the parent branch. Report the resulting SHA alongside the absolute path written, then end mode assertion.
794
798
 
795
799
  For synced projects, the preceding short-hash sentence is superseded by the
796
800
  full `REFERENCE_COMMIT_SHA` returned from `oat project push --json`; no parent
@@ -5,13 +5,17 @@ disable-model-invocation: true
5
5
  user-invocable: true
6
6
  allowed-tools: Read, Write, Edit, Bash(git:*), Bash(gh:*), Glob, Grep, AskUserQuestion
7
7
  metadata:
8
- version: '1.4.2'
8
+ version: '1.4.3'
9
9
  ---
10
10
 
11
11
  # Docs Apply
12
12
 
13
13
  Generate or update documentation files from a docs analysis artifact, with explicit approval and branch-based workflow.
14
14
 
15
+ ## Hook-safe exact-path commits
16
+
17
+ Before a parent-branch commit, verify `oat internal commit-paths --help` succeeds. If unavailable, stop and update the OAT CLI; never fall back to a staged-index or pathspec-only commit. Set `COMMIT_IDENTITY` to a unique operation/artifact identity before the first attempt and retain it for every retry; use a new identity for a new operation. Pass only the exact produced file list, including tracked removals and both names of a rename. A blocked/failed result stops the workflow; retain its receipt and follow its diagnostics. Hooks remain enabled. Synced project artifacts continue through `oat project push`.
18
+
15
19
  ## Prerequisites
16
20
 
17
21
  - A recent docs analysis artifact in `.oat/repo/analysis/`.
@@ -196,6 +200,12 @@ If branch creation fails because of unrelated local changes, ask the user to res
196
200
 
197
201
  ### Step 4: Apply Approved Changes
198
202
 
203
+ Before the first approved write, initialize `OWNED_OUTPUT_FILES=()`. Append
204
+ each exact successfully created, modified or removed path at that write,
205
+ including both names of a rename and any generated navigation/index file this
206
+ step actually changes. Retain the complete list through verification and commit
207
+ retries; do not substitute a directory or staged-index diff.
208
+
199
209
  For each approved recommendation:
200
210
 
201
211
  1. Read only the affected docs files and the evidence sources cited by the artifact.
@@ -245,8 +255,8 @@ If no docs app exists yet, use file-level verification and confirm the structura
245
255
  Commit the approved changes:
246
256
 
247
257
  ```bash
248
- git add {approved-files}
249
- git commit -m "docs: apply approved docs recommendations"
258
+ OWNED_COMMIT_PATHS=("${OWNED_OUTPUT_FILES[@]}")
259
+ oat internal commit-paths --identity "${COMMIT_IDENTITY:?set once and retain for retries}:oat-docs-apply:1" --message "docs: apply approved docs recommendations" -- "${OWNED_COMMIT_PATHS[@]}" || exit 1
250
260
  ```
251
261
 
252
262
  **Offer to open a PR:**
@@ -6,7 +6,7 @@ disable-model-invocation: true
6
6
  user-invocable: true
7
7
  allowed-tools: Read, Bash, Glob, Grep, AskUserQuestion
8
8
  metadata:
9
- version: 2.0.3
9
+ version: 2.0.4
10
10
  ---
11
11
 
12
12
  # OAT Doctor
@@ -223,6 +223,16 @@ State the adoption state (`declared`, `inferred-legacy`, `partial-initialization
223
223
  | `pjm:remote_schema`, `pjm:remote_binding_ids`, `pjm:remote_metadata_state`, `pjm:remote_storage_content`, `pjm:remote_policy`, `pjm:remote_concurrent_intents`, `pjm:remote_operations`, `pjm:remote_retention`, `pjm:remote_host_capability` | emitted only when a remote binding is adopted: `oat-pjm-remote` (reconcile or refresh) and `workflows/backlog-and-planning/remote-project-management.md` |
224
224
  | any other `pjm:*` name | `info` with the check's message; no fix path is invented |
225
225
 
226
+ When applying a backlog close-out fix, use `oat backlog archive <id> --summary
227
+ "outcome" --json` (or the agreed `--wont-do` outcome). Capture its complete
228
+ `affectedPaths`, append only an owned handoff's filesystem deletion, format
229
+ existing affected text with the repository command, and commit the exact paths
230
+ via `oat internal commit-paths` with a unique retained identity and enabled
231
+ hooks. Include tracked old/new item names, ledger/index and rewritten
232
+ references. Verify helper availability and stop on an unavailable or
233
+ blocked/failed helper; preserve unrelated staged/unstaged work. Follow the
234
+ repository's PJM Backlog Lifecycle; do not stage only the missing old path.
235
+
226
236
  #### Agent instructions dive
227
237
 
228
238
  Explain the sync strategy in use (`oat instructions validate --json` `.strategy`: `none`, the default, keeps no CLAUDE.md because Claude Code reads AGENTS.md itself; `pointer`, `symlink`, and `copy` keep a shim beside each AGENTS.md) and each non-`ok` entry and leftover-CLAUDE.md warning with its path. Explain each missing heading: what the CLI writes there and why an agent needs it (`getting-started/bootstrap.md` for `## Tool Packs`; `workflows/backlog-and-planning/backlog-lifecycle.md` § Adoption comes first for the PJM sections). Offer `oat instructions sync`, `oat tools guidance` (read-only: prints the `OAT tools` block to add), or `oat pjm init` (appends absent PJM blocks) as the finding names; for wording and coverage beyond presence, hand off to `oat-agent-instructions-analyze` then `oat-agent-instructions-apply`.
@@ -5,7 +5,7 @@ disable-model-invocation: false
5
5
  user-invocable: true
6
6
  allowed-tools: Read, Write, Edit, Bash, Grep, Glob, AskUserQuestion
7
7
  metadata:
8
- version: 1.0.10
8
+ version: 1.0.11
9
9
  ---
10
10
 
11
11
  # OAT Explainer Kit
@@ -126,9 +126,12 @@ roll back an approved plan.
126
126
 
127
127
  At project completion, pass only a selected satisfied `project-recap` run to
128
128
  `oat project archive --project-recap-run`. Consume
129
- `projectRecapExport.sourceRunRoot`, `projectRecapExport.exportRoot`, and
130
- `projectRecapExport.manifest.relativePath` from the archive JSON response. Do
131
- not infer the dated export path. The archive export is the durable copy.
129
+ `projectRecapExport.sourceRunRoot`, `exportRoot`, `runId`,
130
+ `page.sourceRelativePath`, `page.originalSha256`, `page.exportedSha256`, and
131
+ `verifiedArtifactCount` from the archive JSON response. Do not infer the dated
132
+ export path: `exportRoot` is one tracked HTML page. The complete original run,
133
+ manifest, source, and QA evidence remain in the archived project. Persisted
134
+ legacy package receipts remain readable; new exports have no tracked sidecars.
132
135
 
133
136
  Project-explainer runs remain active-project working artifacts and are never
134
137
  exported as completion reference products. Local-scope projects do not export a
@@ -6,7 +6,7 @@ disable-model-invocation: true
6
6
  allowed-tools: Read, Write, Glob, Grep, Bash(git:*), AskUserQuestion, Task
7
7
  user-invocable: true
8
8
  metadata:
9
- version: 1.6.2
9
+ version: 1.6.3
10
10
  ---
11
11
 
12
12
  # Review Backlog
@@ -259,7 +259,7 @@ This step mirrors the **Project Kickoff Handoffs** section of the pjm instructio
259
259
  - the recommended project mode (`oat-project-lite` for single-sitting work, `oat-project-quick-start` for quick work, or `oat-project-new` for spec-driven work), including which artifacts (spec/design/plan) to pre-populate from existing research when it exists;
260
260
  - authoritative input pointers (research directories, decision records, code paths);
261
261
  - repo conventions and verification gates the item file does not restate;
262
- - a close-out section requiring (a) the **Backlog Lifecycle** — `oat backlog archive <id>` — executed in the same PR that ships the item, and (b) deletion of the handoff file (`git rm`) in that same PR.
262
+ - a close-out section requiring (a) the **Backlog Lifecycle** — `oat backlog archive <id> --summary "outcome" --json` — in the same PR that ships the item, and (b) filesystem deletion of its owned handoff. Consume the complete returned `affectedPaths`, append the tracked handoff deletion, format existing text with the repository command, and commit the exact list via `oat internal commit-paths` with a unique retained identity and enabled hooks; stop if unavailable or blocked/failed. Include both old/new item names, ledger, index and rewritten references; preserve unrelated staged/unstaged work.
263
263
 
264
264
  **Staleness:** if this alignment pass drops an item from the kickoff stack, delete its handoff (`git rm .oat/repo/pjm/handoffs/<BL-id>.md`) in the same pass rather than letting it drift.
265
265
 
@@ -5,7 +5,7 @@ disable-model-invocation: false
5
5
  user-invocable: true
6
6
  allowed-tools: Read, Write, Bash, Glob, Grep, AskUserQuestion
7
7
  metadata:
8
- version: 1.4.1
8
+ version: 1.4.2
9
9
  ---
10
10
 
11
11
  # Update Repo Reference
@@ -120,8 +120,8 @@ To close out a completed backlog item, run the atomic close-out command rather
120
120
  than moving files by hand:
121
121
 
122
122
  ```bash
123
- oat backlog archive <id> --summary "one-line outcome"
124
- # abandoned work: oat backlog archive <id> --wont-do --summary "why"
123
+ oat backlog archive <id> --summary "one-line outcome" --json
124
+ # abandoned work: oat backlog archive <id> --wont-do --summary "why" --json
125
125
  ```
126
126
 
127
127
  This flips the item's `status` to a terminal value (`closed`/`wont_do` — never
@@ -135,6 +135,31 @@ backlog files by hand outside this command (curated overview text, an enriched
135
135
  oat backlog regenerate-index
136
136
  ```
137
137
 
138
+ Archive never stages files. Capture each successful `--json` result and retain
139
+ its complete `affectedPaths` array, including the old tracked item deletion,
140
+ the archived destination, completed ledger, index and rewritten references.
141
+ On retry use the returned operation paths; do not reconstruct ownership from
142
+ all files that mention the item. If this close-out owns a kickoff handoff,
143
+ remove it with a filesystem operation and append its tracked deletion path.
144
+ Convert returned absolute paths to literal repository-relative files using
145
+ the same repository root (avoiding checkout/scratch-path aliases).
146
+ Deduplicate the exact file list, format only existing supported text files
147
+ with the repository's documented formatter, and commit that list through
148
+ `oat internal commit-paths` with enabled hooks. Verify helper availability
149
+ first; if unavailable, stop and update the CLI. Set a unique `COMMIT_IDENTITY`
150
+ before the first attempt and retain the identity, message and literal paths
151
+ through retries; a blocked/failed helper result stops close-out. Unrelated
152
+ staged and unstaged work must remain intact. An empty settled-noop path list
153
+ needs no commit; omit a missing source path only if Git proves it was never
154
+ tracked, never omit a tracked old path or the new destination.
155
+
156
+ ```bash
157
+ oat internal commit-paths --help || exit 1
158
+ # ARCHIVE_OWNED_FILES is the literal affectedPaths union plus owned handoff deletion.
159
+ # Format the existing text members with the repository's documented write command.
160
+ oat internal commit-paths --identity "${COMMIT_IDENTITY:?set once and retain for retries}:backlog-closeout" --message "chore(pjm): archive completed backlog work" -- "${ARCHIVE_OWNED_FILES[@]}" || exit 1
161
+ ```
162
+
138
163
  ### Step 5: Sanity Checks
139
164
 
140
165
  Use the `Grep` tool for focused searches:
@@ -6,7 +6,7 @@ disable-model-invocation: true
6
6
  user-invocable: true
7
7
  allowed-tools: Read, Write, Bash, Glob, Grep, AskUserQuestion, Task
8
8
  metadata:
9
- version: 1.0.17
9
+ version: 1.0.19
10
10
  ---
11
11
 
12
12
  # Autonomous OAT Project
@@ -15,6 +15,10 @@ Run an OAT project from its persisted entry state to final PR by chaining the
15
15
  existing lifecycle skills. This skill supplies policy and sequencing; each
16
16
  lifecycle skill continues to own its artifacts, gates, reviews, and state.
17
17
 
18
+ ## Hook-safe exact-path commits
19
+
20
+ Before a parent-branch commit, verify `oat internal commit-paths --help` succeeds. If unavailable, stop and update the OAT CLI; never fall back to a staged-index or pathspec-only commit. Set `COMMIT_IDENTITY` to a unique operation/artifact identity before the first attempt and retain it for every retry; use a new identity for a new operation. Pass only the exact produced file list, including tracked removals and both names of a rename. A blocked/failed result stops the workflow; retain its receipt and follow its diagnostics. Hooks remain enabled. Synced project artifacts continue through `oat project push`.
21
+
18
22
  ## When to Use
19
23
 
20
24
  Use this skill only when the user explicitly requests autonomous end-to-end OAT
@@ -233,6 +237,57 @@ Select the earliest incomplete lifecycle owner:
233
237
  An approved plan enters at implementation. Never replay completed phases solely
234
238
  because this is a new session.
235
239
 
240
+ ### Step 1.5: Disclose Effective Limits and Hard Stops
241
+
242
+ Before lifecycle execution, read the owning contracts: the vendored autonomy
243
+ contract/gate inventory, `oat-project-implement/references/phase-execution.md`
244
+ and `oat-phase-implementer` recovery contract, the current project dispatch
245
+ adapter and generic dispatch contract, and each applicable lifecycle gate's
246
+ configuration and failure policy. Do not infer permission from an allowance.
247
+
248
+ For an existing project, resolve `oat_phase_recovery_policy` from `state.md`:
249
+ use `phase_attempt_limits.<pNN>` when present, otherwise
250
+ `default_attempt_limit` (default `10`); require integer limits from `0` through
251
+ `20`. Read prior durable `used_attempts` and `pending_attempt` from
252
+ `phase_attempt_usage.<pNN>` and reconcile pending identities before work. Report
253
+ remaining capacity as `max(0, effective limit - used_attempts)`, the source and
254
+ any phase override. A fully reconciled pending attempt completes the same
255
+ reserved attempt, even at the limit; it receives no new reservation.
256
+
257
+ Print the effective project default and every known phase's values at kickoff:
258
+
259
+ ```text
260
+ Recovery: project default={limit}; source={state.md | owning default 10}
261
+ Phase {pNN}: effective={limit}; source={phase override | project default | owning default}
262
+ prior durable usage={used}; remaining capacity={remaining}; pending={none | reconciled attempt/status}
263
+ Dispatch/review: {resolved route retry limit, review-cycle cap, gate maxAttempts and their sources}
264
+ Stops: {applicable owning stop conditions and evidence/next action}
265
+ ```
266
+
267
+ For a new project, disclose the owning defaults and mark phase-specific values
268
+ unresolved until scaffolding/planning supplies them; refresh the report before
269
+ implementation and on resume or a configured limit change. Never invent phase
270
+ usage. An unavailable or malformed policy/ledger stops before dispatch.
271
+
272
+ Capacity is not permission. A `failed-attempt` disposition is terminal even
273
+ with remaining capacity. Applicable hard stops include recovery eligibility or
274
+ proof failure; budget exhaustion for a new attempt; malformed ledger or
275
+ unresolved pending attempt; immediate direction-required stop for a lost or
276
+ unbindable exact target, with no fallback; accepted-launch failure when neither
277
+ same-handle continuation nor a lifecycle-authorized fresh recover launch at the
278
+ same exact target can continue; blocking review policy;
279
+ missing credentials; repository authority or ownership limits; unresolved
280
+ product judgment; unauthorized destructive risk; and inventory gaps. Apply the
281
+ owning gate's validated `block`/`prompt`/`warn` semantics without weakening its
282
+ operational or provenance stops. Name the exact inventory boundary and its
283
+ owner when reporting a stop.
284
+
285
+ Route retries, implementation recovery events, reserved recovery attempts,
286
+ review-fix rounds and gate attempts are separate counters. The elevated warning
287
+ at three recovery events does not grant recovery permission or change a limit.
288
+ Remaining allowance covers separate eligible events. Continue-after-failure is
289
+ a separate future policy choice, not authority supplied by this kickoff.
290
+
236
291
  ### Step 2: Select Workflow Mode by Review Density
237
292
 
238
293
  For a new goal, choose mode as a rigor selector:
@@ -299,8 +354,8 @@ PROJECT_SCOPE=$(oat project scope "$PROJECT_PATH" --format value) || {
299
354
  if [ "$PROJECT_SCOPE" = "synced" ]; then
300
355
  oat project push "$PROJECT_PATH" --message "chore(oat): persist autonomous explainer intent" || { echo "oat: project push failed; run oat project pull, resolve the reported state, and retry" >&2; exit 1; }
301
356
  else
302
- git add "$PROJECT_PATH/state.md"
303
- git diff --cached --quiet || git commit -m "chore(oat): persist autonomous explainer intent"
357
+ OWNED_COMMIT_PATHS=("$PROJECT_PATH/state.md")
358
+ oat internal commit-paths --identity "${COMMIT_IDENTITY:?set once and retain for retries}:oat-project-autonomous:1" --message "chore(oat): persist autonomous explainer intent" -- "${OWNED_COMMIT_PATHS[@]}" || exit 1
304
359
  fi
305
360
  ```
306
361
 
@@ -351,8 +406,8 @@ PROJECT_SCOPE=$(oat project scope "$PROJECT_PATH" --format value) || {
351
406
  if [ "$PROJECT_SCOPE" = "synced" ]; then
352
407
  oat project push "$PROJECT_PATH" --message "chore(oat): update autonomous execution learnings" || { echo "oat: project push failed; run oat project pull, resolve the reported state, and retry" >&2; exit 1; }
353
408
  else
354
- git add "$PROJECT_PATH/oat-execution-learnings.md"
355
- git diff --cached --quiet || git commit -m "chore(oat): update autonomous execution learnings"
409
+ OWNED_COMMIT_PATHS=("$PROJECT_PATH/oat-execution-learnings.md")
410
+ oat internal commit-paths --identity "${COMMIT_IDENTITY:?set once and retain for retries}:oat-project-autonomous:2" --message "chore(oat): update autonomous execution learnings" -- "${OWNED_COMMIT_PATHS[@]}" || exit 1
356
411
  fi
357
412
  ```
358
413