@open-agent-toolkit/cli 0.2.29 → 0.2.31

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 (87) hide show
  1. package/assets/bundle-metadata.json +1 -1
  2. package/assets/docs/cli-utilities/configuration.md +52 -1
  3. package/assets/docs/contributing/code.md +19 -7
  4. package/assets/docs/contributing/explainer-kit-verification.md +9 -1
  5. package/assets/docs/contributing/skills.md +9 -0
  6. package/assets/docs/workflows/projects/artifacts.md +5 -0
  7. package/assets/docs/workflows/projects/index.md +1 -0
  8. package/assets/docs/workflows/projects/lifecycle.md +23 -0
  9. package/assets/docs/workflows/projects/retro.md +261 -0
  10. package/assets/docs/workflows/skills/explainer-kit-providers.md +16 -5
  11. package/assets/docs/workflows/skills/explainer-kit.md +98 -38
  12. package/assets/docs/workflows/skills/index.md +6 -0
  13. package/assets/public-package-versions.json +4 -4
  14. package/assets/skills/explainer-kit/SKILL.md +33 -8
  15. package/assets/skills/explainer-kit/briefs/project-recap.md +25 -7
  16. package/assets/skills/explainer-kit/recipes/project-recap.v2.json +72 -0
  17. package/assets/skills/explainer-kit/references/contracts.md +49 -17
  18. package/assets/skills/explainer-kit/references/destination-contract.md +141 -25
  19. package/assets/skills/explainer-kit/references/extension-contract.md +19 -10
  20. package/assets/skills/explainer-kit/references/visual-authoring.md +24 -0
  21. package/assets/skills/explainer-kit/references/visual-review.md +19 -5
  22. package/assets/skills/explainer-kit/schemas/author-request.v3.schema.json +241 -0
  23. package/assets/skills/explainer-kit/schemas/publish-receipt.v2.schema.json +215 -0
  24. package/assets/skills/explainer-kit/schemas/publish-request.v2.schema.json +34 -0
  25. package/assets/skills/explainer-kit/schemas/run-request.schema.json +4 -1
  26. package/assets/skills/explainer-kit/schemas/terminal-evidence.v1.schema.json +81 -0
  27. package/assets/skills/explainer-kit/schemas/visual-review-evidence.v1.schema.json +66 -0
  28. package/assets/skills/explainer-kit/scripts/lib/catalog.mjs +109 -3
  29. package/assets/skills/explainer-kit/scripts/lib/contracts.mjs +550 -17
  30. package/assets/skills/explainer-kit/scripts/lib/durability.mjs +90 -8
  31. package/assets/skills/explainer-kit/scripts/lib/fs-safe.mjs +5 -0
  32. package/assets/skills/explainer-kit/scripts/lib/internal-references.mjs +538 -0
  33. package/assets/skills/explainer-kit/scripts/lib/package-coverage.mjs +129 -11
  34. package/assets/skills/explainer-kit/scripts/lib/publication-policy.mjs +54 -0
  35. package/assets/skills/explainer-kit/scripts/lib/recipes.mjs +2 -1
  36. package/assets/skills/explainer-kit/scripts/lib/records.mjs +139 -22
  37. package/assets/skills/explainer-kit/scripts/lib/s3-roots.mjs +353 -0
  38. package/assets/skills/explainer-kit/scripts/lib/s3-static.mjs +237 -107
  39. package/assets/skills/explainer-kit/scripts/lib/set-plan.mjs +1 -0
  40. package/assets/skills/explainer-kit/scripts/lib/terminal-evidence.mjs +157 -0
  41. package/assets/skills/explainer-kit/scripts/lib/visual-review.mjs +26 -6
  42. package/assets/skills/explainer-kit/scripts/run.mjs +1006 -144
  43. package/assets/skills/oat-explainer-kit/SKILL.md +16 -3
  44. package/assets/skills/oat-explainer-kit/references/config-contract.md +13 -8
  45. package/assets/skills/oat-explainer-kit/references/lifecycle-contract.md +50 -6
  46. package/assets/skills/oat-explainer-kit/references/migration.md +2 -1
  47. package/assets/skills/oat-explainer-kit/references/visual-review-callback.md +11 -0
  48. package/assets/skills/oat-explainer-kit/scripts/bind-project-sources.mjs +37 -15
  49. package/assets/skills/oat-explainer-kit/scripts/check-terminal-outcome.mjs +83 -0
  50. package/assets/skills/oat-explainer-kit/scripts/derive-destination.mjs +91 -0
  51. package/assets/skills/oat-explainer-kit/scripts/finalize-tracked-run.mjs +66 -10
  52. package/assets/skills/oat-explainer-kit/scripts/resolve-config.mjs +60 -21
  53. package/assets/skills/oat-explainer-kit/scripts/resolve-paths.mjs +52 -8
  54. package/assets/skills/oat-explainer-kit/scripts/run.mjs +271 -36
  55. package/assets/skills/oat-project-autonomous/references/gate-inventory.md +38 -38
  56. package/assets/skills/oat-project-complete/SKILL.md +60 -8
  57. package/assets/skills/oat-project-document/references/docs/autonomy-contract.md +38 -38
  58. package/assets/skills/oat-project-implement/SKILL.md +1 -1
  59. package/assets/skills/oat-project-implement/references/completion-and-closeout.md +28 -6
  60. package/assets/skills/oat-project-implement/references/docs/autonomy-contract.md +38 -38
  61. package/assets/skills/oat-project-pr-final/references/docs/autonomy-contract.md +38 -38
  62. package/assets/skills/oat-project-quick-start/references/docs/autonomy-contract.md +38 -38
  63. package/assets/skills/oat-project-retro/SKILL.md +310 -0
  64. package/assets/skills/oat-project-retro/references/apply-procedure.md +212 -0
  65. package/assets/skills/oat-project-retro/references/evidence-and-lanes.md +91 -0
  66. package/assets/skills/oat-project-retro/references/retro-quality-bar.md +100 -0
  67. package/assets/skills/oat-project-retro-file/SKILL.md +387 -0
  68. package/assets/templates/project-retro.md +236 -0
  69. package/dist/commands/config/index.d.ts.map +1 -1
  70. package/dist/commands/config/index.js +99 -0
  71. package/dist/commands/init/tools/shared/skill-manifest.d.ts +2 -2
  72. package/dist/commands/init/tools/shared/skill-manifest.d.ts.map +1 -1
  73. package/dist/commands/init/tools/shared/skill-manifest.js +3 -0
  74. package/dist/commands/project/archive/archive-utils.d.ts.map +1 -1
  75. package/dist/commands/project/archive/archive-utils.js +57 -7
  76. package/dist/commands/project/archive/explainer-terminal-evidence.d.ts +29 -0
  77. package/dist/commands/project/archive/explainer-terminal-evidence.d.ts.map +1 -0
  78. package/dist/commands/project/archive/explainer-terminal-evidence.js +37 -0
  79. package/dist/config/oat-config.d.ts +14 -1
  80. package/dist/config/oat-config.d.ts.map +1 -1
  81. package/dist/config/oat-config.js +42 -2
  82. package/dist/config/resolve.d.ts.map +1 -1
  83. package/dist/config/resolve.js +9 -0
  84. package/package.json +2 -2
  85. /package/assets/skills/explainer-kit/recipes/{project-recap.json → project-recap.v1.json} +0 -0
  86. /package/assets/skills/explainer-kit/schemas/{publish-receipt.schema.json → publish-receipt.v1.schema.json} +0 -0
  87. /package/assets/skills/explainer-kit/schemas/{publish-request.schema.json → publish-request.v1.schema.json} +0 -0
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: oat-project-complete
3
- version: 1.6.0
3
+ version: 1.6.2
4
4
  description: Use when all implementation work is finished and the project is ready to close. Marks the OAT project lifecycle as complete.
5
5
  disable-model-invocation: true
6
6
  user-invocable: true
@@ -123,6 +123,22 @@ Also preflight summary status using the same freshness rules as `oat-project-sum
123
123
  - `summary.md` is `stale` when the tracking frontmatter fields `oat_summary_last_task`, `oat_summary_revision_count`, or `oat_summary_includes_revisions` no longer match `current_last_task`, `current_rev_count`, or `current_rev_list` as defined in `oat-project-summary` Step 3
124
124
  - `summary.md` is `current` when those tracking fields still match the `oat-project-summary` Step 3 comparison inputs
125
125
 
126
+ Preflight `{PROJECT_PATH}/references/project-retro.md` alongside the summary.
127
+ The safety-net offer is governed by how this completion run executes, not by how
128
+ implementation ran:
129
+
130
+ - Treat the run as non-interactive when `OAT_AUTONOMOUS=1` or
131
+ `OAT_NON_INTERACTIVE=1`; otherwise treat it as interactive.
132
+ - When the retro is missing and this completion run is interactive, add exactly
133
+ one question to the batched prompt: "No project retro exists. Generate one
134
+ before completing?"
135
+ - When the retro is missing and this completion run is non-interactive, skip the
136
+ offer. Explicitly configured `retro` in the post-implementation sequence is
137
+ the consented non-interactive path.
138
+ - When the retro exists, never offer regeneration. If either
139
+ `oat_retro_promotions` or `oat_retro_filing` is `proposed` or `partial`, emit
140
+ at most one line noting that the existing retro has unsettled register items.
141
+
126
142
  **Questions to ask (in a single prompt):**
127
143
 
128
144
  1. **Confirm completion:** "Ready to mark **{PROJECT_NAME}** as complete?"
@@ -130,8 +146,9 @@ Also preflight summary status using the same freshness rules as `oat-project-sum
130
146
  3. **Generate or refresh summary** (only if summary status is `missing` or `stale`): present the status explicitly:
131
147
  - Missing example: "A summary has not been generated yet. Would you like me to generate it now as part of completion?"
132
148
  - Stale example: "The project summary is out of date. Would you like me to refresh it now as part of completion?"
133
- 4. **Generate final project recap** (only when recap intent resolution returned `needsPrompt: true`): "Generate a final project recap as part of completion?"
134
- 5. **Open PR:** "Open a PR in GitHub after generating the PR description?" ask this only when no tracked open PR already exists.
149
+ 4. **Generate project retro** (only when the retro is missing and this completion run is interactive): "No project retro exists. Generate one before completing?"
150
+ 5. **Generate final project recap** (only when recap intent resolution returned `needsPrompt: true`): "Generate a final project recap as part of completion?"
151
+ 6. **Open PR:** "Open a PR in GitHub after generating the PR description?" — ask this only when no tracked open PR already exists.
135
152
 
136
153
  If `oat_pr_status` is `open`, do not ask the Open PR question. Set `SHOULD_OPEN_PR="false"` and treat the existing PR as already tracked.
137
154
 
@@ -142,13 +159,19 @@ Ready to complete project **{PROJECT_NAME}**?
142
159
 
143
160
  1. Archive the project after completion? (yes/no)
144
161
  2. A summary has not been generated yet. Generate it now as part of completion? (yes/no)
145
- 3. Generate a final project recap as part of completion? (yes/no)
146
- 4. Open a PR in GitHub? (yes/no)
162
+ 3. No project retro exists. Generate one before completing? (yes/no)
163
+ 4. Generate a final project recap as part of completion? (yes/no)
164
+ 5. Open a PR in GitHub? (yes/no)
147
165
  ```
148
166
 
149
167
  If the user declines the completion confirmation, exit gracefully.
150
168
 
151
- After the user accepts the completion confirmation, store the answers as `SHOULD_ARCHIVE`, `SHOULD_GENERATE_SUMMARY`, `SHOULD_GENERATE_RECAP`, and `SHOULD_OPEN_PR` for use in later steps. Persist a prompted recap answer only after that confirmation is accepted.
169
+ After the user accepts the completion confirmation, store the answers as
170
+ `SHOULD_ARCHIVE`, `SHOULD_GENERATE_SUMMARY`, `SHOULD_GENERATE_RETRO`,
171
+ `SHOULD_GENERATE_RECAP`, and `SHOULD_OPEN_PR` for use in later steps. Set
172
+ `SHOULD_GENERATE_RETRO="false"` when the retro already exists or this completion
173
+ run is non-interactive. Persist a prompted recap answer only after that
174
+ confirmation is accepted.
152
175
 
153
176
  If the summary status is `current`, set `SHOULD_GENERATE_SUMMARY="false"` and note that a current summary is already available.
154
177
 
@@ -273,6 +296,19 @@ Check if `{PROJECT_PATH}/summary.md` exists and whether it is current against th
273
296
  - Used as source for the PR description (in Step 7)
274
297
  - Preserved in the archived project directory (in Step 8)
275
298
 
299
+ ### Step 3.5.5: Retro Safety-Net
300
+
301
+ When `SHOULD_GENERATE_RETRO="true"`, dispatch `oat-project-retro` in generate
302
+ mode before any lifecycle mutation. Apply and filing behavior remains
303
+ config-gated inside that skill.
304
+
305
+ Use the host's skill-to-skill invocation when available. Do not assume
306
+ `oat-project-retro` is a shell command on `PATH`. If dispatch is unavailable or
307
+ generation fails, warn with the reason and continue completion; this offer is a
308
+ safety net, not a completion gate. Never leave a partial retro artifact.
309
+
310
+ When `SHOULD_GENERATE_RETRO="false"`, do not dispatch the skill.
311
+
276
312
  ### Step 3.6: Select Final Project Recap
277
313
 
278
314
  Run this gate after the optional summary refresh and before any lifecycle
@@ -281,7 +317,7 @@ mutation. Initialize `SELECTED_PROJECT_RECAP_RUN=""`.
281
317
  When `SHOULD_GENERATE_RECAP="true"`, inspect manifests under
282
318
  `{PROJECT_PATH}/explainers/` before generating. A fresh `project-recap` manifest for the current completed implementation is reused without invoking the adapter again. Fresh means the manifest identifies recipe `project-recap`, belongs to this project, has a terminal outcome, and its recorded source hashes match the current approved implementation inputs, including the refreshed summary when present.
283
319
 
284
- If no fresh recap exists, invoke `scripts/run.mjs#runOatExplainer` exactly once with recipe `project-recap`, project invocation, the active project, and unattended lifecycle mode so approved OAT artifacts do not trigger a second content prompt. A failed adapter run warns but does not block completion. Use a returned valid terminal `project-recap` manifest as the selected run; do not rerun to improve its outcome.
320
+ If no fresh recap exists, invoke `scripts/run.mjs#runOatExplainer` exactly once with recipe `project-recap`, project invocation, the active project, and unattended lifecycle mode so approved OAT artifacts do not trigger a second content prompt. A returned `failed` outcome warns but does not block completion. An invocation that returns no terminal outcome blocks lifecycle mutation. Use a returned valid terminal `project-recap` manifest as the selected run; do not rerun to improve its outcome.
285
321
  Before that invocation, construct exactly one brief-aware, provider-neutral
286
322
  author seam as documented by
287
323
  `oat-explainer-kit/references/author-callback.md`. In-process callers pass
@@ -302,7 +338,17 @@ it was given.
302
338
 
303
339
  Set `SELECTED_PROJECT_RECAP_RUN` only to the final selected `project-recap` run. The value must be project-relative in the form `explainers/<run-slug>` so it can be passed safely to the archive CLI. An incomplete, stale, wrong-project, or `project-explainer` manifest is never selected as the final recap.
304
340
 
305
- When recap intent resolves to `skip`, or generation produces no valid final recap, leave `SELECTED_PROJECT_RECAP_RUN` empty and complete without a recap. Record any failed recap attempt as a warning rather than changing project completion status.
341
+ Before any lifecycle mutation, invoke the shared
342
+ `oat-explainer-kit/scripts/check-terminal-outcome.mjs` guard with the resolved
343
+ intent and, for `generate`, the selected or attempted manifest. The only
344
+ terminal generated outcomes are `built-durable`, `built-not-durable`,
345
+ `built-needs-review`, and `failed`. Missing records and `incomplete` block
346
+ completion; do not substitute a warning or infer an outcome from filesystem
347
+ presence. A `skip` intent requires no manifest.
348
+
349
+ When recap intent resolves to `skip`, leave `SELECTED_PROJECT_RECAP_RUN` empty
350
+ and complete without a recap. A terminal `failed` recap attempt is recorded as
351
+ a warning rather than changing project completion status.
306
352
 
307
353
  `project-explainer` runs are active-project working artifacts, not durable post-completion reference products. Do not export, re-attest, or add archive-aware PR or summary reference links for a `project-explainer` run.
308
354
 
@@ -598,6 +644,12 @@ with:
598
644
  For a shared project that was not archived, use the selected active run and
599
645
  omit `relocatedFrom`, but keep the same `completion-bookkeeping` mode.
600
646
 
647
+ When the finalization plan is `complete` with `built-needs-review` or `failed`,
648
+ preserve that exact outcome and skip both attestation and the evidence commit.
649
+ These evidence-only plans are already complete for lifecycle retention and
650
+ remain unpublishable. Call `verifyTrackedRunFinalization(...)` on the complete
651
+ plan; it must not promote either outcome to `built-durable`.
652
+
601
653
  The lifecycle bookkeeping commit is the artifact commit. Call the compatible
602
654
  core's `recordDurability(...)` with the finalizer's planned request. Submit only immutable paths under `projectRecapExport.exportRoot` as commit evidence for an archived recap; `manifest.json` and `build-record.json` are mutable records and
603
655
  must not appear in that evidence path list. The successful exported-path