@open-agent-toolkit/cli 0.3.7 → 0.3.9

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 (147) hide show
  1. package/README.md +3 -3
  2. package/assets/agents/oat-codebase-mapper.md +3 -2
  3. package/assets/agents/oat-reviewer.md +5 -13
  4. package/assets/agents/skeptical-evaluator.md +6 -2
  5. package/assets/bundle-metadata.json +1 -1
  6. package/assets/docs/cli-utilities/backlog-lifecycle.md +3 -2
  7. package/assets/docs/cli-utilities/bootstrap.md +5 -2
  8. package/assets/docs/cli-utilities/config-and-local-state.md +13 -6
  9. package/assets/docs/cli-utilities/configuration.md +25 -10
  10. package/assets/docs/cli-utilities/tool-packs.md +60 -10
  11. package/assets/docs/cli-utilities/workflow-gates.md +37 -0
  12. package/assets/docs/contributing/code.md +9 -5
  13. package/assets/docs/provider-sync/commands.md +17 -8
  14. package/assets/docs/provider-sync/instruction-sync.md +241 -39
  15. package/assets/docs/provider-sync/providers.md +20 -0
  16. package/assets/docs/provider-sync/scope-and-surface.md +3 -1
  17. package/assets/docs/reference/cli-reference.md +4 -1
  18. package/assets/docs/reference/oat-directory-structure.md +12 -11
  19. package/assets/docs/reference/troubleshooting.md +19 -4
  20. package/assets/docs/workflows/projects/evidence-layers.md +5 -1
  21. package/assets/docs/workflows/projects/implementation-execution.md +22 -8
  22. package/assets/docs/workflows/projects/lifecycle.md +4 -6
  23. package/assets/docs/workflows/projects/retro.md +7 -0
  24. package/assets/public-package-versions.json +4 -4
  25. package/assets/skills/oat-agent-instructions-analyze/SKILL.md +4 -4
  26. package/assets/skills/oat-agent-instructions-analyze/references/analysis-artifact-template.md +5 -5
  27. package/assets/skills/oat-agent-instructions-analyze/references/docs/rules-files.md +14 -11
  28. package/assets/skills/oat-agent-instructions-analyze/references/quality-checklist.md +2 -2
  29. package/assets/skills/oat-agent-instructions-analyze/scripts/resolve-instruction-files.sh +4 -3
  30. package/assets/skills/oat-agent-instructions-analyze/scripts/resolve-providers.sh +17 -6
  31. package/assets/skills/oat-agent-instructions-apply/SKILL.md +3 -3
  32. package/assets/skills/oat-agent-instructions-apply/references/docs/rules-files.md +14 -11
  33. package/assets/skills/oat-dispatch-subagents/SKILL.md +1 -1
  34. package/assets/skills/oat-dispatch-subagents/references/managed-claude-example.json +387 -0
  35. package/assets/skills/oat-dispatch-subagents/references/record-schema.md +75 -0
  36. package/assets/skills/oat-doctor/SKILL.md +17 -13
  37. package/assets/skills/oat-project-autonomous/references/gate-inventory.md +1 -1
  38. package/assets/skills/oat-project-document/references/docs/autonomy-contract.md +1 -1
  39. package/assets/skills/oat-project-implement/SKILL.md +2 -2
  40. package/assets/skills/oat-project-implement/references/completion-and-closeout.md +33 -11
  41. package/assets/skills/oat-project-implement/references/dispatch-and-dry-run.md +24 -22
  42. package/assets/skills/oat-project-implement/references/docs/autonomy-contract.md +1 -1
  43. package/assets/skills/oat-project-implement/references/phase-execution.md +109 -8
  44. package/assets/skills/oat-project-lite/SKILL.md +23 -1
  45. package/assets/skills/oat-project-lite/references/docs/autonomy-contract.md +1 -1
  46. package/assets/skills/oat-project-next/SKILL.md +3 -3
  47. package/assets/skills/oat-project-pr-final/references/docs/autonomy-contract.md +1 -1
  48. package/assets/skills/oat-project-progress/SKILL.md +2 -2
  49. package/assets/skills/oat-project-quick-start/references/docs/autonomy-contract.md +1 -1
  50. package/assets/skills/oat-project-retro/SKILL.md +70 -6
  51. package/assets/skills/oat-project-review-provide/SKILL.md +3 -1
  52. package/assets/skills/oat-project-review-provide-remote/SKILL.md +3 -1
  53. package/assets/templates/docs-app-mkdocs/docs/contributing.md +1 -3
  54. package/assets/templates/pjm-agents.md +7 -3
  55. package/assets/templates/state.md +2 -2
  56. package/dist/agents/canonical/resolve.d.ts +6 -4
  57. package/dist/agents/canonical/resolve.d.ts.map +1 -1
  58. package/dist/agents/canonical/resolve.js +6 -4
  59. package/dist/commands/backlog/archive.d.ts +10 -2
  60. package/dist/commands/backlog/archive.d.ts.map +1 -1
  61. package/dist/commands/backlog/archive.js +22 -6
  62. package/dist/commands/backlog/index.d.ts.map +1 -1
  63. package/dist/commands/backlog/index.js +5 -1
  64. package/dist/commands/backlog/rewrite-references.d.ts +41 -0
  65. package/dist/commands/backlog/rewrite-references.d.ts.map +1 -0
  66. package/dist/commands/backlog/rewrite-references.js +516 -0
  67. package/dist/commands/config/index.d.ts +1 -0
  68. package/dist/commands/config/index.d.ts.map +1 -1
  69. package/dist/commands/config/index.js +69 -34
  70. package/dist/commands/gate/index.d.ts.map +1 -1
  71. package/dist/commands/gate/index.js +51 -2
  72. package/dist/commands/gate/review-verdict.d.ts +22 -0
  73. package/dist/commands/gate/review-verdict.d.ts.map +1 -1
  74. package/dist/commands/gate/review-verdict.js +111 -0
  75. package/dist/commands/init/index.d.ts +6 -0
  76. package/dist/commands/init/index.d.ts.map +1 -1
  77. package/dist/commands/init/index.js +27 -4
  78. package/dist/commands/init/tools/index.d.ts +18 -1
  79. package/dist/commands/init/tools/index.d.ts.map +1 -1
  80. package/dist/commands/init/tools/index.js +84 -17
  81. package/dist/commands/init/tools/project-guidance.d.ts +19 -4
  82. package/dist/commands/init/tools/project-guidance.d.ts.map +1 -1
  83. package/dist/commands/init/tools/project-guidance.js +58 -15
  84. package/dist/commands/init/tools/workflows/index.d.ts.map +1 -1
  85. package/dist/commands/init/tools/workflows/index.js +5 -1
  86. package/dist/commands/instructions/instructions.types.d.ts +105 -4
  87. package/dist/commands/instructions/instructions.types.d.ts.map +1 -1
  88. package/dist/commands/instructions/instructions.types.js +4 -5
  89. package/dist/commands/instructions/instructions.utils.d.ts +161 -6
  90. package/dist/commands/instructions/instructions.utils.d.ts.map +1 -1
  91. package/dist/commands/instructions/instructions.utils.js +650 -12
  92. package/dist/commands/instructions/sync/sync.d.ts.map +1 -1
  93. package/dist/commands/instructions/sync/sync.js +256 -18
  94. package/dist/commands/instructions/validate/validate.d.ts.map +1 -1
  95. package/dist/commands/instructions/validate/validate.js +36 -8
  96. package/dist/commands/pjm/index.d.ts.map +1 -1
  97. package/dist/commands/pjm/index.js +19 -4
  98. package/dist/commands/pjm/init.d.ts +3 -0
  99. package/dist/commands/pjm/init.d.ts.map +1 -1
  100. package/dist/commands/pjm/init.js +23 -5
  101. package/dist/commands/project/dispatch/canonical-role.d.ts +33 -0
  102. package/dist/commands/project/dispatch/canonical-role.d.ts.map +1 -0
  103. package/dist/commands/project/dispatch/canonical-role.js +114 -0
  104. package/dist/commands/project/dispatch/index.d.ts.map +1 -1
  105. package/dist/commands/project/dispatch/index.js +3 -1
  106. package/dist/commands/project/dispatch/record.d.ts.map +1 -1
  107. package/dist/commands/project/dispatch/record.js +146 -4
  108. package/dist/commands/shared/agents-md.d.ts +26 -5
  109. package/dist/commands/shared/agents-md.d.ts.map +1 -1
  110. package/dist/commands/shared/agents-md.js +182 -3
  111. package/dist/commands/sync/apply.d.ts.map +1 -1
  112. package/dist/commands/sync/apply.js +28 -21
  113. package/dist/commands/tools/guidance/index.d.ts +15 -0
  114. package/dist/commands/tools/guidance/index.d.ts.map +1 -0
  115. package/dist/commands/tools/guidance/index.js +81 -0
  116. package/dist/commands/tools/index.d.ts.map +1 -1
  117. package/dist/commands/tools/index.js +2 -0
  118. package/dist/commands/tools/shared/sync-evidence.d.ts.map +1 -1
  119. package/dist/commands/tools/shared/sync-evidence.js +32 -5
  120. package/dist/config/oat-config.d.ts +57 -3
  121. package/dist/config/oat-config.d.ts.map +1 -1
  122. package/dist/config/oat-config.js +223 -15
  123. package/dist/config/resolve.d.ts.map +1 -1
  124. package/dist/config/resolve.js +12 -2
  125. package/dist/engine/compute-plan.d.ts.map +1 -1
  126. package/dist/engine/compute-plan.js +31 -3
  127. package/dist/providers/claude/dispatch-envelope.d.ts +53 -0
  128. package/dist/providers/claude/dispatch-envelope.d.ts.map +1 -1
  129. package/dist/providers/claude/dispatch-envelope.js +324 -48
  130. package/dist/providers/claude/rule-transform.js +1 -1
  131. package/dist/providers/copilot/rule-transform.js +1 -1
  132. package/dist/providers/cursor/rule-transform.js +1 -1
  133. package/dist/providers/identity/absolute-paths.d.ts +13 -0
  134. package/dist/providers/identity/absolute-paths.d.ts.map +1 -1
  135. package/dist/providers/identity/absolute-paths.js +27 -14
  136. package/dist/providers/identity/generic-dispatch-record.d.ts +212 -0
  137. package/dist/providers/identity/generic-dispatch-record.d.ts.map +1 -1
  138. package/dist/providers/identity/generic-dispatch-record.js +78 -19
  139. package/dist/providers/identity/oat-dispatch-record.d.ts +5 -0
  140. package/dist/providers/identity/oat-dispatch-record.d.ts.map +1 -1
  141. package/dist/providers/identity/oat-dispatch-record.js +11 -2
  142. package/dist/providers/shared/registry.d.ts +6 -0
  143. package/dist/providers/shared/registry.d.ts.map +1 -1
  144. package/dist/providers/shared/registry.js +30 -0
  145. package/dist/rules/canonical/parse.d.ts.map +1 -1
  146. package/dist/rules/canonical/parse.js +38 -3
  147. package/package.json +2 -2
@@ -5,7 +5,7 @@ disable-model-invocation: true
5
5
  user-invocable: true
6
6
  allowed-tools: Read, Glob, Grep, Bash(git:*), Bash(oat:*), Skill
7
7
  metadata:
8
- version: 1.1.2
8
+ version: 1.1.3
9
9
  ---
10
10
 
11
11
  # Project Next
@@ -253,8 +253,8 @@ Otherwise, look up the target skill from the routing table for the current `oat_
253
253
  | Current Phase | Phase Status | Boundary Tier | Quick Plan Readiness | Target Skill |
254
254
  | ------------- | ------------ | ------------- | -------------------- | -------------------------- |
255
255
  | discovery | in_progress | tier 3 | — | `oat-project-discover` |
256
- | discovery | in_progress | tier 2 | — | `oat-project-plan` |
257
- | discovery | complete | tier 1 | — | `oat-project-plan` |
256
+ | discovery | in_progress | tier 2 | — | `oat-project-quick-start` |
257
+ | discovery | complete | tier 1 | — | `oat-project-quick-start` |
258
258
  | plan | in_progress | tier 3 | not ready | `oat-project-quick-start` |
259
259
  | plan | in_progress | tier 2 | not ready | `oat-project-quick-start` |
260
260
  | plan | in_progress | tier 1 | not ready | `oat-project-quick-start` |
@@ -274,7 +274,7 @@ remains immutable baseline evidence for the original p01-t01 verification.
274
274
  | `oat-dispatch-subagents/references/provider-claude.md` | `fbe3a21e9533 -> NG` |
275
275
  | `oat-dispatch-subagents/references/provider-codex.md` | `95b0f82018c7 -> NG` |
276
276
  | `oat-dispatch-subagents/references/provider-cursor.md` | `f781555295a9 -> NG`; `55ccfef14fd6 -> NG` |
277
- | `oat-dispatch-subagents/references/record-schema.md` | `78f8069274a8 -> NG`; `1c9a84c4d1e0 -> NG`; `2a63da6e3a96 -> NG`; `30762d53b043 -> NG` |
277
+ | `oat-dispatch-subagents/references/record-schema.md` | `78f8069274a8 -> NG`; `1c9a84c4d1e0 -> NG`; `2a63da6e3a96 -> NG`; `30762d53b043 -> NG`; `66bc2f0d4fda -> NG` |
278
278
  | `oat-project-dispatch-subagents/SKILL.md` | `eca03ad1ca12 -> PDISPATCH-01`; `59fbcdc79cea -> PDISPATCH-01` |
279
279
  | `oat-project-plan/SKILL.md` | `f99e44b39932 -> PLAN-12`; `7e6a9854504b -> NG` |
280
280
  | `oat-project-complete/SKILL.md` | `0177956707aa -> NG`; `8305b5bb65ef -> NG`; `3c0b26f0ff1c -> NG`; `8cc1fa5aab1e -> COMPLETE-01`; `4c209fbb4716 -> COMPLETE-01`; `02e4175e1171 -> COMPLETE-01`; `d698d4f98e76 -> COMPLETE-01`; `9f86a7218d93 -> COMPLETE-01`; `024713698d9a -> COMPLETE-01`; `c327995053fa -> COMPLETE-01`; `61f81d4ec7c1 -> COMPLETE-01`; `14fb2e56809f -> COMPLETE-01`; `7d4ff668744d -> COMPLETE-01`; `502a6c141784 -> COMPLETE-01`; `fb7e2db356af -> COMPLETE-01`; `f73f8476360a -> NG`; `1e15f420039f -> NG`; `cc234032ddd7 -> NG`; `1dd54687229b -> NG`; `fc05c8303cd2 -> NG`; `24be721d635e -> NG` |
@@ -5,7 +5,7 @@ disable-model-invocation: false
5
5
  user-invocable: true
6
6
  allowed-tools: Read, Glob, Grep, Bash(git:*), Bash(oat:*), AskUserQuestion
7
7
  metadata:
8
- version: 1.4.2
8
+ version: 1.4.3
9
9
  ---
10
10
 
11
11
  # Progress Router
@@ -276,7 +276,7 @@ Routing matrix by mode:
276
276
  | oat_phase | oat_phase_status | Next Skill |
277
277
  | --------- | ---------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
278
278
  | discovery | in_progress | Continue `oat-project-discover` |
279
- | discovery | complete | `oat-project-plan` |
279
+ | discovery | complete | `oat-project-quick-start` |
280
280
  | plan | in_progress | Continue `oat-project-quick-start` when the plan is not implementation-ready; otherwise `oat-project-implement` |
281
281
  | plan | complete | `oat-project-implement` when the plan is implementation-ready; otherwise `oat-project-quick-start` |
282
282
  | implement | in_progress | Continue `oat-project-implement`. If drift detected (see drift detection above), also mention `oat-project-reconcile` as an option. |
@@ -274,7 +274,7 @@ remains immutable baseline evidence for the original p01-t01 verification.
274
274
  | `oat-dispatch-subagents/references/provider-claude.md` | `fbe3a21e9533 -> NG` |
275
275
  | `oat-dispatch-subagents/references/provider-codex.md` | `95b0f82018c7 -> NG` |
276
276
  | `oat-dispatch-subagents/references/provider-cursor.md` | `f781555295a9 -> NG`; `55ccfef14fd6 -> NG` |
277
- | `oat-dispatch-subagents/references/record-schema.md` | `78f8069274a8 -> NG`; `1c9a84c4d1e0 -> NG`; `2a63da6e3a96 -> NG`; `30762d53b043 -> NG` |
277
+ | `oat-dispatch-subagents/references/record-schema.md` | `78f8069274a8 -> NG`; `1c9a84c4d1e0 -> NG`; `2a63da6e3a96 -> NG`; `30762d53b043 -> NG`; `66bc2f0d4fda -> NG` |
278
278
  | `oat-project-dispatch-subagents/SKILL.md` | `eca03ad1ca12 -> PDISPATCH-01`; `59fbcdc79cea -> PDISPATCH-01` |
279
279
  | `oat-project-plan/SKILL.md` | `f99e44b39932 -> PLAN-12`; `7e6a9854504b -> NG` |
280
280
  | `oat-project-complete/SKILL.md` | `0177956707aa -> NG`; `8305b5bb65ef -> NG`; `3c0b26f0ff1c -> NG`; `8cc1fa5aab1e -> COMPLETE-01`; `4c209fbb4716 -> COMPLETE-01`; `02e4175e1171 -> COMPLETE-01`; `d698d4f98e76 -> COMPLETE-01`; `9f86a7218d93 -> COMPLETE-01`; `024713698d9a -> COMPLETE-01`; `c327995053fa -> COMPLETE-01`; `61f81d4ec7c1 -> COMPLETE-01`; `14fb2e56809f -> COMPLETE-01`; `7d4ff668744d -> COMPLETE-01`; `502a6c141784 -> COMPLETE-01`; `fb7e2db356af -> COMPLETE-01`; `f73f8476360a -> NG`; `1e15f420039f -> NG`; `cc234032ddd7 -> NG`; `1dd54687229b -> NG`; `fc05c8303cd2 -> NG`; `24be721d635e -> NG` |
@@ -5,7 +5,7 @@ disable-model-invocation: false
5
5
  user-invocable: true
6
6
  allowed-tools: Read, Write, Bash(git:*), Bash(jq:*), Bash(pnpm:*), Bash(oat config:*), Bash(oat decision:*), Bash(oat project log:*), Bash(oat project push:*), Bash(oat project scope:*), Bash(oat tools:*), Glob, Grep, AskUserQuestion
7
7
  metadata:
8
- version: 1.0.6
8
+ version: 1.0.7
9
9
  ---
10
10
 
11
11
  # Project Retrospective
@@ -53,8 +53,9 @@ OAT ▸ PROJECT RETRO
53
53
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
54
54
  ```
55
55
 
56
- Use `[1/6] Resolving project and mode…` through `[6/6] Formatting and
57
- committing…`. Name evidence inventory, synthesis, disposition, and project-log
56
+ Use `[1/7] Resolving project and mode…` through `[7/7] Walking through
57
+ register items…`, with `[6/7] Formatting and committing…` before the final
58
+ walkthrough. Name evidence inventory, synthesis, disposition, and project-log
58
59
  steps as they begin.
59
60
 
60
61
  ## Artifact Hygiene
@@ -165,7 +166,9 @@ provenance.
165
166
 
166
167
  ### Step 4: Resolve Post-Generation Consent
167
168
 
168
- Read effective `workflow.retro.apply` and `workflow.retro.filing` configuration.
169
+ Read effective `workflow.retro.apply`, `workflow.retro.filing.repo`, and
170
+ `workflow.retro.filing.upstream` configuration. Read each filing leaf key on its
171
+ own; the filing namespace has no single readable value.
169
172
 
170
173
  **Interactive run:**
171
174
 
@@ -173,16 +176,19 @@ Read effective `workflow.retro.apply` and `workflow.retro.filing` configuration.
173
176
  2. Ask whether to apply eligible RP apply-items now.
174
177
  3. If unfiled UP or RP file-items exist, offer the `oat-project-retro-file`
175
178
  skill.
179
+ 4. Close the run with the Step 7 walkthrough, whatever the user answered.
176
180
 
177
181
  **Non-interactive run:**
178
182
 
179
183
  - Apply only when `workflow.retro.apply` is `auto`.
180
184
  - `ask` or absent means propose-only.
181
- - Chain to `oat-project-retro-file` only when at least one
182
- `workflow.retro.filing` destination is explicitly configured; chaining means
185
+ - Chain to `oat-project-retro-file` only when `workflow.retro.filing.repo` or
186
+ `workflow.retro.filing.upstream` is explicitly configured; chaining means
183
187
  loading the current `oat-project-retro-file/SKILL.md` and following it, or
184
188
  dispatching a child that carries it.
185
189
  - Without filing config, file nothing and report that proposals remain.
190
+ - Close the run with the Step 7 walkthrough even though no one answered a
191
+ prompt.
186
192
 
187
193
  All applications follow the apply procedure. Filing remains owned by
188
194
  `oat-project-retro-file`; generate/apply mode does not file tracker items.
@@ -298,6 +304,61 @@ Commit the artifact, project-log append, and any approved apply outputs. Use
298
304
  one reviewed batch when items are tightly coupled; otherwise use one commit per
299
305
  item as described in the apply procedure. Never stage unrelated changes.
300
306
 
307
+ ### Step 7: Final Report Walkthrough
308
+
309
+ After the artifact passes Step 6 validation, end the final response with a
310
+ walkthrough of every `RP-*` and `UP-*` item so the user can decide what to apply
311
+ or file without opening the retro. Link the artifact by its repo-relative path
312
+ instead of reproducing it; the walkthrough explains items, it does not copy
313
+ their bodies.
314
+
315
+ For each item, state:
316
+
317
+ - its ID and a short title;
318
+ - a plain-language summary of what it proposes;
319
+ - why it matters for future runs;
320
+ - its current disposition and destination, read from the register fields after
321
+ every action in this run; and
322
+ - the next available action, or that none remains.
323
+
324
+ Group items in this order: apply items (RP `Disposition: apply`), repository
325
+ filing items (RP `Disposition: file`), and upstream filing items (UP). Give an
326
+ empty group a one-line "none" note rather than dropping it.
327
+
328
+ The walkthrough is required in interactive and non-interactive runs alike, and
329
+ whether apply or filing was performed, declined, deferred, skipped, automatic,
330
+ or unanswered. When both registers are empty, give an explicit no-items summary
331
+ such as "No repo improvements or upstream feedback items were proposed."
332
+
333
+ Worked example:
334
+
335
+ ```markdown
336
+ Retro: `.oat/projects/shared/example/references/project-retro.md`
337
+
338
+ **Apply items**
339
+
340
+ - **RP-01 — Isolate HOME in template tests.** Summary: run template-resolving
341
+ tests with a temporary HOME. Why it matters: they read the maintainer's user
342
+ templates and fail locally while passing in CI. Disposition: apply; Status:
343
+ applied; Applied-ref: `abc1234`. Next action: none.
344
+
345
+ **Repository filing items**
346
+
347
+ - **RP-02 — Document the cache-replay trap.** Summary: warn that a green turbo
348
+ run can be a cache replay. Why it matters: two sessions reported replays as
349
+ real passes. Disposition: file; Status: proposed; Destination: — because
350
+ filing was deferred, and `workflow.retro.filing.repo` routes it to the
351
+ backlog. Next action: run retro filing to create the backlog item.
352
+
353
+ **Upstream filing items**
354
+
355
+ - **UP-01 — Name the file in rule parse errors.** Summary: include the rule path
356
+ in canonical parse failures. Why it matters: the error named no file, so
357
+ diagnosis needed a full scan. Status: proposed; Destination: — because
358
+ `workflow.retro.filing.upstream` is unset. Next action: set that key or file
359
+ it interactively.
360
+ ```
361
+
301
362
  ## Success Criteria
302
363
 
303
364
  - The resolved mode matches explicit user/config intent.
@@ -311,3 +372,6 @@ item as described in the apply procedure. Never stage unrelated changes.
311
372
  - No promotion is applied or item filed without interactive approval or
312
373
  explicit non-interactive configuration.
313
374
  - The project log and commit preserve the outcome without unrelated changes.
375
+ - The final response walks through every `RP-*` and `UP-*` item, grouped into
376
+ apply, repository filing, and upstream filing items, or gives an explicit
377
+ no-items summary, and links the artifact instead of reproducing it.
@@ -5,7 +5,7 @@ disable-model-invocation: false
5
5
  user-invocable: true
6
6
  allowed-tools: Read, Glob, Grep, Write, Edit, Bash(git:*), Bash(oat:*), Bash(pnpm:*), Bash(mkdir:*), Bash(date:*), Bash(realpath:*), Bash(awk:*), AskUserQuestion
7
7
  metadata:
8
- version: 1.5.10
8
+ version: 1.5.11
9
9
  ---
10
10
 
11
11
  # Request Review
@@ -1034,6 +1034,8 @@ When `oat gate review` invokes this skill, it includes gate-originated context i
1034
1034
 
1035
1035
  The gate prompt also supplies exact values for `oat_gate_run_id`, `oat_gate_target`, `oat_gate_runtime`, `oat_invocation_model`, `oat_invocation_reasoning_effort`, and `oat_invocation_source`. Copy all six values verbatim for gate-originated artifacts. These fields record OAT's configured invocation; do not derive them from `baseCommand`, the target id, model self-identification, or surrounding dispatch prose. Optional observed/self-reported identity is separate and non-authoritative.
1036
1036
 
1037
+ For gate-originated artifacts (`oat_review_invocation: gate`), write the Step 6.0 resolver stamp on a line labeled `**Dispatch audit (policy view):**`, with the stamp in one backtick pair so the literal `Dispatch:` token stays readable, for example ``**Dispatch audit (policy view):** `Dispatch: scope=p01 action=review role=reviewer …` ``. The resolver stamp records the project reviewer policy, and the six gate frontmatter fields record the gate's actual invocation; the label keeps both accurate. `oat gate review` checks every other reviewer audit stamp anywhere outside `## Findings`, the severity sections, and fenced code (for example in the metadata block, `## Dispatch Audit`, or `## Review Scope`), including a backtick-wrapped stamp followed only by punctuation or one parenthetical, against the frontmatter: its `target` must equal `oat_gate_target`, and its `effort_axis` must equal `selected:<oat_invocation_reasoning_effort>` when that effort is concrete. A disagreeing stamp fails the gate with `gate_dispatch_audit_mismatched`. Manual and auto reviews keep their audit line unlabeled.
1038
+
1037
1039
  For all other invocations (user-triggered, fresh session), use `manual`.
1038
1040
 
1039
1041
  Gate parsing contract:
@@ -5,7 +5,7 @@ disable-model-invocation: true
5
5
  user-invocable: true
6
6
  allowed-tools: Read, Write, Bash, Glob, Grep, Task, AskUserQuestion
7
7
  metadata:
8
- version: 1.1.7
8
+ version: 1.1.8
9
9
  ---
10
10
 
11
11
  # Remote Review Provide (Project-Scoped GitHub PR)
@@ -408,6 +408,8 @@ oat_gate_target: <exact configured gate target; omit for lifecycle>
408
408
 
409
409
  `oat_project` carries the resolved project path so machine A's `oat-project-review-receive-remote` routes findings into the right project's plan tasks. Preserve the current invocation lineage in the GitHub marker: omit `oat_gate_target` for lifecycle reviews and include the exact target for gate reviews. Verdict: `REQUEST_CHANGES` when any critical or high finding exists; `COMMENT` otherwise (including a clean, zero-findings review — never auto-`APPROVE`).
410
410
 
411
+ For gate reviews (`oat_review_invocation: gate`), write the resolver stamp in the posted review's dispatch audit metadata on a line labeled `**Dispatch audit (policy view):**`, with the stamp in one backtick pair so the literal `Dispatch:` token stays readable. The resolver stamp records the project reviewer policy, while `oat_gate_target` names the gate's actual invocation; the label keeps both accurate. Any other reviewer audit stamp outside `## Findings`, the severity sections, and fenced code must name `oat_gate_target` as its `target` and carry `effort_axis=selected:<effort>` for a concrete gate effort, because `oat gate review` rejects a disagreeing unlabeled stamp with `gate_dispatch_audit_mismatched`. Lifecycle reviews keep their audit line unlabeled.
412
+
411
413
  ### Step 8: Post the Review + Clean Up
412
414
 
413
415
  Probe `agent-reviews` for a posting flow with a non-mutating check (`npx agent-reviews --help`), cached for the run:
@@ -102,9 +102,8 @@ Extends fenced code support and enables custom fences such as Mermaid:
102
102
  ```mermaid
103
103
  flowchart LR
104
104
  A[Read index.md] --> B[Generate nav]
105
- ````
106
-
107
105
  ```
106
+ ````
108
107
 
109
108
  ### `pymdownx.tabbed`
110
109
 
@@ -119,4 +118,3 @@ Adds table-of-contents anchors and permalinks for headings.
119
118
  - Treat `index.md` plus its `## Contents` section as the local discovery source of truth.
120
119
  - Prefer linking to source files and commands explicitly when documenting behavior.
121
120
  - When adding a new plugin or extension, update this guide with what it does and how to use it.
122
- ```
@@ -36,8 +36,10 @@ for abandoned work and `--summary "<text>"` to record the outcome. The command
36
36
  performs the whole close-out atomically: it flips `status` to the terminal
37
37
  value and bumps `updated`, appends the canonical `backlog/completed.md` entry
38
38
  (always for `closed`; for `wont_do` only when `--summary` is given), moves the
39
- item file from `backlog/items/` to `backlog/archived/`, and regenerates
40
- `backlog/index.md`. Stage the resulting changes with the shipping commit/PR.
39
+ item file from `backlog/items/` to `backlog/archived/`, rewrites inbound
40
+ `.oat/repo` links and path references to the moved file (reporting each
41
+ rewritten file), and regenerates `backlog/index.md`. Stage the resulting
42
+ changes with the shipping commit/PR.
41
43
 
42
44
  **Manual fallback.** These are the steps the command automates — follow them, in
43
45
  order, only when closing out by hand:
@@ -46,7 +48,9 @@ order, only when closing out by hand:
46
48
  2. Append a summary entry to `backlog/completed.md` (newest first; entry format
47
49
  is documented at the top of that file). Add the entry for a `wont_do` item
48
50
  only when the abandonment itself is worth recording (an explicit summary).
49
- 3. `git mv` the item file from `backlog/items/` to `backlog/archived/`.
51
+ 3. `git mv` the item file from `backlog/items/` to `backlog/archived/`, then
52
+ rewrite inbound `.oat/repo` links to `archived/` (plans, decision records,
53
+ other items, and repository-root paths such as `oat_external_plan_sources`).
50
54
  4. Run `oat backlog regenerate-index` and stage the regenerated
51
55
  `backlog/index.md`.
52
56
  5. If the completion changes the operating picture, refresh
@@ -50,8 +50,8 @@ oat_workflow_origin: native # native | imported
50
50
  # max_attempts: 2
51
51
  # attempts_completed: 0
52
52
  # reviewed_head: null
53
- # implementation_base_ref: null # exact logical base ref for effective-delta-v1
54
- # implementation_fingerprint: null # new generations use sha256:effective-delta-v1:<digest>
53
+ # implementation_base_ref: null # exact logical base ref for the qualified effective-delta fingerprint
54
+ # implementation_fingerprint: null # new generations use sha256:effective-delta-v2:<digest>; stored v1 values keep v1 semantics
55
55
  # freshness_head: null # rolling accepted tree checkpoint
56
56
  # freshness_fingerprint: null # full effective delta at freshness_head
57
57
  # launch_state: not_started # not_started | intent_persisted | accepted | result_persisted | not_accepted
@@ -36,10 +36,12 @@ export interface ResolveCanonicalRoleInput {
36
36
  projectCanonicalRoot: string;
37
37
  }
38
38
  /**
39
- * Deliberately a library for skill-side callers: dispatch protocols resolve
40
- * role identity before the native launch and hand the resulting evidence to
41
- * `oat project dispatch record`, which validates it. There is intentionally no
42
- * production call site inside the CLI.
39
+ * Resolve canonical role identity before a native launch. Its production
40
+ * caller is `oat project dispatch canonical-role`
41
+ * (`commands/project/dispatch/canonical-role.ts`), which prints the evidence
42
+ * as a `canonical-role-resolution` event for `oat project dispatch record` to
43
+ * validate, so skill-side callers never hand-assemble redacted paths or a
44
+ * content digest.
43
45
  */
44
46
  export declare function resolveCanonicalRole(input: ResolveCanonicalRoleInput): CanonicalRoleEvidence;
45
47
  //# sourceMappingURL=resolve.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../../../src/agents/canonical/resolve.ts"],"names":[],"mappings":"AAYA,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,CAAC;AAC9D,MAAM,MAAM,uBAAuB,GAC/B,kBAAkB,GAClB,yBAAyB,CAAC;AAC9B,MAAM,MAAM,6BAA6B,GACrC,SAAS,GACT,gBAAgB,GAChB,kBAAkB,GAClB,mBAAmB,GACnB,cAAc,GACd,cAAc,CAAC;AAEnB,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC;AAElC,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,iBAAiB,CAAC;IACxB,SAAS,EAAE,YAAY,CAAC;IACxB,OAAO,EAAE,6BAA6B,CAAC;CACxC;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,qBAAqB,GAC7B;IACE,MAAM,EAAE,UAAU,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,iBAAiB,CAAC;IACxB,UAAU,EAAE,uBAAuB,CAAC;IACpC,aAAa,EAAE,YAAY,CAAC;IAC5B,YAAY,EAAE,YAAY,CAAC;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAA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AAE,uBAAuB,CAAC;IACpC,aAAa,EAAE,YAAY,CAAC;IAC5B,YAAY,EAAE,YAAY,CAAC;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,SAAS,aAAa,EAAE,CAAC;CAC3C,GACD;IACE,MAAM,EAAE,SAAS,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,SAAS,aAAa,EAAE,CAAC;IAC1C,QAAQ,EAAE,SAAS,cAAc,EAAE,CAAC;CACrC,CAAC;AAEN,MAAM,WAAW,yBAAyB;IACxC,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,oBAAoB,EAAE,MAAM,CAAC;CAC9B;AAgLD;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,yBAAyB,GAC/B,qBAAqB,CA0DvB"}
@@ -138,10 +138,12 @@ function resolveRoleIdentity(resolved, candidate, input, candidateMisses) {
138
138
  }
139
139
  }
140
140
  /**
141
- * Deliberately a library for skill-side callers: dispatch protocols resolve
142
- * role identity before the native launch and hand the resulting evidence to
143
- * `oat project dispatch record`, which validates it. There is intentionally no
144
- * production call site inside the CLI.
141
+ * Resolve canonical role identity before a native launch. Its production
142
+ * caller is `oat project dispatch canonical-role`
143
+ * (`commands/project/dispatch/canonical-role.ts`), which prints the evidence
144
+ * as a `canonical-role-resolution` event for `oat project dispatch record` to
145
+ * validate, so skill-side callers never hand-assemble redacted paths or a
146
+ * content digest.
145
147
  */
146
148
  export function resolveCanonicalRole(input) {
147
149
  const loadedRoot = resolve(input.skillDir, '..', '..');
@@ -7,6 +7,12 @@ export interface ArchiveBacklogItemResult {
7
7
  completedEntry: 'written' | 'scaffolded' | 'skipped';
8
8
  movedTo: string | null;
9
9
  indexRegenerated: boolean;
10
+ /**
11
+ * Markdown files under `.oat/repo/**` whose references to
12
+ * `items/<id>.md` were rewritten to `archived/<id>.md`, relative to the
13
+ * repository root.
14
+ */
15
+ rewrittenReferences: string[];
10
16
  warnings: string[];
11
17
  }
12
18
  export interface ArchiveBacklogItemOptions {
@@ -26,8 +32,10 @@ export declare class BacklogArchiveError extends Error {
26
32
  /**
27
33
  * Atomic backlog close-out. Validates the current status, sets the terminal
28
34
  * status and `updated`, records a canonical `completed.md` entry, moves the
29
- * item file into `archived/`, and regenerates the index. Idempotent when the
30
- * item is already archived.
35
+ * item file into `archived/`, rewrites inbound `.oat/repo` references to the
36
+ * moved file, and regenerates the index. Idempotent when the item is already
37
+ * archived: that path writes no status, completed-log, or move changes and only
38
+ * retries the reference rewrite and index regeneration.
31
39
  */
32
40
  export declare function archiveBacklogItem(backlogRoot: string, id: string, options?: ArchiveBacklogItemOptions): Promise<ArchiveBacklogItemResult>;
33
41
  //# sourceMappingURL=archive.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"archive.d.ts","sourceRoot":"","sources":["../../../src/commands/backlog/archive.ts"],"names":[],"mappings":"AASA,OAAO,EAEL,KAAK,iBAAiB,EAGvB,MAAM,sBAAsB,CAAC;AAmB9B,mDAAmD;AACnD,MAAM,WAAW,wBAAwB;IACvC,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,UAAU,GAAG,MAAM,CAAC;IAC5B,MAAM,EAAE,iBAAiB,GAAG,IAAI,CAAC;IACjC,cAAc,EAAE,SAAS,GAAG,YAAY,GAAG,SAAS,CAAC;IACrD,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,MAAM,WAAW,yBAAyB;IACxC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,8EAA8E;IAC9E,GAAG,C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ACF;AAkID;;;;;;;GAOG;AACH,wBAAsB,kBAAkB,CACtC,WAAW,EAAE,MAAM,EACnB,EAAE,EAAE,MAAM,EACV,OAAO,GAAE,yBAA8B,GACtC,OAAO,CAAC,wBAAwB,CAAC,CA4InC"}
@@ -5,6 +5,7 @@ import { promisify } from 'node:util';
5
5
  import { getFrontmatterBlock } from '../shared/frontmatter.js';
6
6
  import YAML from 'yaml';
7
7
  import { regenerateBacklogIndex } from './regenerate-index.js';
8
+ import { rewriteInboundReferences } from './rewrite-references.js';
8
9
  import { BACKLOG_ITEM_STATUSES, extractBacklogStatus, isValidBacklogStatus, } from './shared/item-status.js';
9
10
  const execFileAsync = promisify(execFile);
10
11
  const COMPLETED_HEADING = '## Completed Items';
@@ -133,14 +134,17 @@ async function moveItemFile(backlogRoot, fromPath, toPath, warnings) {
133
134
  /**
134
135
  * Atomic backlog close-out. Validates the current status, sets the terminal
135
136
  * status and `updated`, records a canonical `completed.md` entry, moves the
136
- * item file into `archived/`, and regenerates the index. Idempotent when the
137
- * item is already archived.
137
+ * item file into `archived/`, rewrites inbound `.oat/repo` references to the
138
+ * moved file, and regenerates the index. Idempotent when the item is already
139
+ * archived: that path writes no status, completed-log, or move changes and only
140
+ * retries the reference rewrite and index regeneration.
138
141
  */
139
142
  export async function archiveBacklogItem(backlogRoot, id, options = {}) {
140
143
  const itemsPath = join(backlogRoot, 'items', `${id}.md`);
141
144
  const archivedPath = join(backlogRoot, 'archived', `${id}.md`);
142
145
  const warnings = [];
143
- // Idempotent no-op: already archived.
146
+ // Already archived: no status, completed-log, or move writes; only the
147
+ // idempotent reference rewrite and index regeneration are retried.
144
148
  if (await pathExists(archivedPath)) {
145
149
  // Conflicting duplicate: the same id lives in BOTH `items/` and
146
150
  // `archived/`. Treating this as a clean no-op would silently leave the live
@@ -157,14 +161,22 @@ export async function archiveBacklogItem(backlogRoot, id, options = {}) {
157
161
  catch {
158
162
  status = null;
159
163
  }
160
- warnings.push(`Backlog item ${id} is already archived at ${archivedPath}; nothing to do.`);
164
+ warnings.push(`Backlog item ${id} is already archived at ${archivedPath}; re-checked inbound references and regenerated the index.`);
165
+ // Retry the idempotent tail of a close-out: a run that failed during the
166
+ // reference rewrite (or an item archived before the rewrite existed)
167
+ // still gets its inbound links repointed and the index regenerated.
168
+ const references = await rewriteInboundReferences(backlogRoot, itemsPath, archivedPath, { rebaseMovedItem: false });
169
+ warnings.push(...references.warnings);
170
+ const regeneration = await regenerateBacklogIndex(backlogRoot);
171
+ warnings.push(...regeneration.warnings);
161
172
  return {
162
173
  id,
163
174
  result: 'noop',
164
175
  status,
165
176
  completedEntry: 'skipped',
166
177
  movedTo: archivedPath,
167
- indexRegenerated: false,
178
+ indexRegenerated: true,
179
+ rewrittenReferences: references.rewritten,
168
180
  warnings,
169
181
  };
170
182
  }
@@ -214,7 +226,10 @@ export async function archiveBacklogItem(backlogRoot, id, options = {}) {
214
226
  }
215
227
  // 6. Move items/<id>.md -> archived/<id>.md (git mv with rename fallback).
216
228
  await moveItemFile(backlogRoot, itemsPath, archivedPath, warnings);
217
- // 7. Regenerate the index via the exported core.
229
+ // 7. Rewrite inbound references so no `.oat/repo` link dangles at items/.
230
+ const references = await rewriteInboundReferences(backlogRoot, itemsPath, archivedPath);
231
+ warnings.push(...references.warnings);
232
+ // 8. Regenerate the index via the exported core.
218
233
  const regeneration = await regenerateBacklogIndex(backlogRoot);
219
234
  warnings.push(...regeneration.warnings);
220
235
  return {
@@ -224,6 +239,7 @@ export async function archiveBacklogItem(backlogRoot, id, options = {}) {
224
239
  completedEntry,
225
240
  movedTo: archivedPath,
226
241
  indexRegenerated: true,
242
+ rewrittenReferences: references.rewritten,
227
243
  warnings,
228
244
  };
229
245
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/backlog/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAuB,MAAM,sBAAsB,CAAC;AAChF,OAAO,EAAE,kBAAkB,EAAE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E,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,kBAAkB,EAAuB,MAAM,WAAW,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AA8B5D,UAAU,0BAA0B;IAClC,mBAAmB,EAAE,OAAO,mBAAmB,CAAC;IAChD,kBAAkB,EAAE,OAAO,kBAAkB,CAAC;IAC9C,iBAAiB,EAAE,OAAO,iBAAiB,CAAC;IAC5C,kBAAkB,EAAE,OAAO,kBAAkB,CAAC;IAC9C,iBAAiB,EAAE,OAAO,iBAAiB,CAAC;IAC5C,sBAAsB,EAAE,OAAO,sBAAsB,CAAC;IACtD,iBAAiB,EAAE,OAAO,iBAAiB,CAAC;IAC5C,kBAAkB,EAAE,OAAO,kBAAkB,CAAC;IAC9C,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;CAChD;AA4ED,wBAAgB,oBAAoB,CAClC,SAAS,GAAE,OAAO,CAAC,0BAA0B,CAAM,GAClD,OAAO,CA6RT"}
@@ -179,7 +179,7 @@ export function createBacklogCommand(overrides = {}) {
179
179
  });
180
180
  cmd
181
181
  .command('archive')
182
- .description('Close out a backlog item: set a terminal status, record it in completed.md, move it to archived/, and regenerate the index')
182
+ .description('Close out a backlog item: set a terminal status, record it in completed.md, move it to archived/, rewrite inbound .oat/repo references to it, and regenerate the index')
183
183
  .argument('<id>', 'Backlog item id (`BL-YYMMDD-slug`)')
184
184
  .option('--wont-do', 'Close the item as `wont_do` instead of `closed`')
185
185
  .option('--summary <text>', 'One-line outcome summary for completed.md')
@@ -206,6 +206,10 @@ export function createBacklogCommand(overrides = {}) {
206
206
  else {
207
207
  context.logger.success(`Archived ${id} as ${result.status} (moved to ${result.movedTo}).`);
208
208
  }
209
+ // Both results can rewrite: a retry on an archived item re-runs it.
210
+ for (const path of result.rewrittenReferences) {
211
+ context.logger.info(`Rewrote references in ${path}`);
212
+ }
209
213
  }
210
214
  process.exitCode = 0;
211
215
  }