@open-agent-toolkit/cli 0.3.19 → 0.3.21

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 (121) hide show
  1. package/README.md +2 -1
  2. package/assets/agents/oat-phase-implementer.md +26 -3
  3. package/assets/agents/oat-reviewer.md +8 -3
  4. package/assets/bundle-metadata.json +1 -1
  5. package/assets/docs/reference/cli-reference.md +12 -7
  6. package/assets/docs/reference/oat-directory-structure.md +1 -0
  7. package/assets/docs/reference/project-artifacts.md +56 -1
  8. package/assets/docs/reference/project-state-machine.md +41 -7
  9. package/assets/docs/skills/brainstorm.md +3 -2
  10. package/assets/docs/skills/index.md +13 -10
  11. package/assets/docs/workflows/advanced/autonomy.md +3 -1
  12. package/assets/docs/workflows/advanced/dispatch-ceiling.md +2 -2
  13. package/assets/docs/workflows/advanced/workflow-gates.md +17 -4
  14. package/assets/docs/workflows/approvals-and-automation.md +21 -10
  15. package/assets/docs/workflows/choose-workflow.md +17 -9
  16. package/assets/docs/workflows/ideas/index.md +1 -1
  17. package/assets/docs/workflows/ideas/lifecycle.md +3 -2
  18. package/assets/docs/workflows/projects/closeout/closeout-skills.md +80 -7
  19. package/assets/docs/workflows/projects/closeout/pr-flow.md +7 -1
  20. package/assets/docs/workflows/projects/execution/execution-skills.md +16 -3
  21. package/assets/docs/workflows/projects/execution/implementation-execution.md +1 -1
  22. package/assets/docs/workflows/projects/execution/picking-up-projects.md +11 -1
  23. package/assets/docs/workflows/projects/lifecycle.md +108 -9
  24. package/assets/docs/workflows/projects/planning/hill-checkpoints.md +6 -6
  25. package/assets/docs/workflows/projects/planning/planning-skills.md +9 -7
  26. package/assets/docs/workflows/projects/planning/starting-projects.md +57 -11
  27. package/assets/docs/workflows/projects/reviews/index.md +22 -1
  28. package/assets/docs/workflows/projects/reviews/review-flavors.md +5 -3
  29. package/assets/public-package-versions.json +4 -4
  30. package/assets/skills/oat-brainstorm/SKILL.md +34 -9
  31. package/assets/skills/oat-brainstorm/references/destinations.md +6 -3
  32. package/assets/skills/oat-dispatch-subagents/SKILL.md +1 -1
  33. package/assets/skills/oat-dispatch-subagents/references/record-schema.md +6 -0
  34. package/assets/skills/oat-docs/SKILL.md +7 -3
  35. package/assets/skills/oat-pjm-review-backlog/SKILL.md +2 -2
  36. package/assets/skills/oat-project-autonomous/SKILL.md +9 -3
  37. package/assets/skills/oat-project-autonomous/references/gate-inventory.md +151 -132
  38. package/assets/skills/oat-project-brief/SKILL.md +1 -1
  39. package/assets/skills/oat-project-brief/references/brief-contract.md +465 -9
  40. package/assets/skills/oat-project-brief/references/docs/autonomy-contract.md +151 -132
  41. package/assets/skills/oat-project-brief/references/docs/gate-approval-record.md +9 -0
  42. package/assets/skills/oat-project-capture/SKILL.md +2 -2
  43. package/assets/skills/oat-project-complete/SKILL.md +14 -5
  44. package/assets/skills/oat-project-discover/SKILL.md +3 -2
  45. package/assets/skills/oat-project-document/SKILL.md +12 -6
  46. package/assets/skills/oat-project-document/references/docs/autonomy-contract.md +151 -132
  47. package/assets/skills/oat-project-goal/SKILL.md +697 -0
  48. package/assets/skills/oat-project-goal/references/docs/autonomy-contract.md +412 -0
  49. package/assets/skills/oat-project-goal/references/docs/gate-approval-record.md +93 -0
  50. package/assets/skills/oat-project-implement/SKILL.md +1 -1
  51. package/assets/skills/oat-project-implement/references/completion-and-closeout.md +67 -0
  52. package/assets/skills/oat-project-implement/references/docs/autonomy-contract.md +151 -132
  53. package/assets/skills/oat-project-implement/references/docs/gate-approval-record.md +9 -0
  54. package/assets/skills/oat-project-implement/references/phase-execution.md +10 -3
  55. package/assets/skills/oat-project-implement/references/plan-and-resume.md +28 -1
  56. package/assets/skills/oat-project-lite/SKILL.md +1 -1
  57. package/assets/skills/oat-project-lite/references/docs/autonomy-contract.md +151 -132
  58. package/assets/skills/oat-project-new/SKILL.md +3 -3
  59. package/assets/skills/oat-project-next/SKILL.md +45 -15
  60. package/assets/skills/oat-project-next/references/docs/gate-approval-record.md +9 -0
  61. package/assets/skills/oat-project-plan/SKILL.md +14 -3
  62. package/assets/skills/oat-project-plan-writing/SKILL.md +6 -4
  63. package/assets/skills/oat-project-pr-final/SKILL.md +51 -1
  64. package/assets/skills/oat-project-pr-final/references/docs/autonomy-contract.md +151 -132
  65. package/assets/skills/oat-project-pr-progress/SKILL.md +97 -3
  66. package/assets/skills/oat-project-progress/SKILL.md +38 -5
  67. package/assets/skills/oat-project-progress/references/docs/gate-approval-record.md +9 -0
  68. package/assets/skills/oat-project-quick-start/SKILL.md +14 -9
  69. package/assets/skills/oat-project-quick-start/references/docs/autonomy-contract.md +151 -132
  70. package/assets/skills/oat-project-quick-start/references/docs/gate-approval-record.md +9 -0
  71. package/assets/skills/oat-project-reconcile/SKILL.md +31 -2
  72. package/assets/skills/oat-project-review-provide/SKILL.md +79 -13
  73. package/assets/skills/oat-project-review-receive/SKILL.md +70 -1
  74. package/assets/skills/oat-project-revise/SKILL.md +25 -1
  75. package/assets/skills/oat-project-summary/SKILL.md +60 -5
  76. package/assets/skills/oat-wave-execute/SKILL.md +2 -2
  77. package/assets/templates/state.md +1 -1
  78. package/dist/commands/project/closeout-check/closeout-invariant.d.ts +119 -3
  79. package/dist/commands/project/closeout-check/closeout-invariant.d.ts.map +1 -1
  80. package/dist/commands/project/closeout-check/closeout-invariant.js +454 -2
  81. package/dist/commands/project/closeout-check/index.d.ts +21 -3
  82. package/dist/commands/project/closeout-check/index.d.ts.map +1 -1
  83. package/dist/commands/project/closeout-check/index.js +190 -4
  84. package/dist/commands/project/complete-state/index.d.ts +2 -1
  85. package/dist/commands/project/complete-state/index.d.ts.map +1 -1
  86. package/dist/commands/project/complete-state/index.js +7 -1
  87. package/dist/commands/project/delivery/check.d.ts +66 -0
  88. package/dist/commands/project/delivery/check.d.ts.map +1 -0
  89. package/dist/commands/project/delivery/check.js +232 -0
  90. package/dist/commands/project/delivery/evidence.d.ts +171 -0
  91. package/dist/commands/project/delivery/evidence.d.ts.map +1 -0
  92. package/dist/commands/project/delivery/evidence.js +902 -0
  93. package/dist/commands/project/delivery/index.d.ts +7 -0
  94. package/dist/commands/project/delivery/index.d.ts.map +1 -0
  95. package/dist/commands/project/delivery/index.js +13 -0
  96. package/dist/commands/project/delivery/refresh.d.ts +110 -0
  97. package/dist/commands/project/delivery/refresh.d.ts.map +1 -0
  98. package/dist/commands/project/delivery/refresh.js +441 -0
  99. package/dist/commands/project/index.d.ts.map +1 -1
  100. package/dist/commands/project/index.js +2 -0
  101. package/dist/commands/project/log/append.d.ts +6 -0
  102. package/dist/commands/project/log/append.d.ts.map +1 -1
  103. package/dist/commands/project/log/append.js +6 -1
  104. package/dist/commands/project/new/scaffold.d.ts.map +1 -1
  105. package/dist/commands/project/new/scaffold.js +47 -1
  106. package/dist/commands/project/promote/promote.d.ts +15 -1
  107. package/dist/commands/project/promote/promote.d.ts.map +1 -1
  108. package/dist/commands/project/promote/promote.js +99 -15
  109. package/dist/commands/project/validate-plan/index.d.ts.map +1 -1
  110. package/dist/commands/project/validate-plan/index.js +10 -0
  111. package/dist/commands/project/validate-plan/profiles.d.ts +19 -4
  112. package/dist/commands/project/validate-plan/profiles.d.ts.map +1 -1
  113. package/dist/commands/project/validate-plan/profiles.js +153 -2
  114. package/dist/commands/shared/frontmatter.d.ts +1 -1
  115. package/dist/commands/shared/frontmatter.d.ts.map +1 -1
  116. package/dist/commands/shared/frontmatter.js +1 -0
  117. package/dist/commands/state/generate.d.ts.map +1 -1
  118. package/dist/commands/state/generate.js +35 -4
  119. package/dist/commands/tools/shared/pack-manifest.d.ts.map +1 -1
  120. package/dist/commands/tools/shared/pack-manifest.js +1 -0
  121. package/package.json +2 -2
@@ -0,0 +1,93 @@
1
+ # Lifecycle Gate Approval Record
2
+
3
+ A configured lifecycle gate ends in an outcome the operator or a later session
4
+ needs to see again: it passed, it warned, the operator explicitly continued
5
+ past a failure, the project disabled it, or it blocked. Chat output does not
6
+ survive the session, so the skill that runs the gate persists the outcome in
7
+ project `state.md`. This document defines the record's shared core once; each
8
+ carrier names where it lives and what it adds.
9
+
10
+ ## Core record
11
+
12
+ ```yaml
13
+ <carrier>:
14
+ status: allowed # allowed | blocked
15
+ disposition: passed # passed | warned | prompt_approved | project_disabled; null when blocked
16
+ config_fingerprint: '<stable hash of the resolved gate declaration>'
17
+ reviewed_head: '<full SHA of the commit the gate reviewed>'
18
+ decided_at: '2026-10-02T15:20:00Z'
19
+ ```
20
+
21
+ - `status`: `allowed` | `blocked`.
22
+ - `disposition`: `passed`, `warned`, `prompt_approved`, or `project_disabled`
23
+ when `status` is `allowed`; `null` when `status` is `blocked`.
24
+ - `config_fingerprint`: the writer's stable hash of the resolved gate
25
+ declaration it ran (command, description, `onFailure`, `maxAttempts`, and the
26
+ project override state), recorded as provenance. Implement recomputes its own
27
+ carrier's fingerprint under its Step 14 rules; quick-start readers do not.
28
+ - `reviewed_head`: the full 40-character SHA of the commit the gate reviewed,
29
+ recorded as provenance. `null` when no gate ran.
30
+ - `decided_at`: the ISO 8601 UTC time the outcome was decided. A record written
31
+ before `decided_at` existed is not malformed for that reason alone.
32
+
33
+ ## Write rules
34
+
35
+ | Gate outcome | Record |
36
+ | --------------------------------------------------------------- | ----------------------------------------------------------- |
37
+ | Passed its threshold | `allowed` / `passed` |
38
+ | Failed under `onFailure: warn` | `allowed` / `warned` |
39
+ | Failed under `onFailure: prompt`, operator explicitly continued | `allowed` / `prompt_approved` |
40
+ | Failed under `onFailure: prompt`, operator declined or deferred | `blocked` / `null` |
41
+ | `block` still failing after `maxAttempts` | `blocked` / `null` |
42
+ | Configured but disabled by project override (no launch) | `allowed` / `project_disabled` |
43
+ | Launch, transport, validation, or receive failure | `blocked` / `null` |
44
+ | Not configured | no record (quick-start); implement writes `allowed/no_gate` |
45
+
46
+ Only an explicit operator continuation writes `prompt_approved`. Declining,
47
+ deferring, giving no response, or running under `OAT_AUTONOMOUS=1` writes
48
+ `blocked`, never anything that reads as approval. A rerun of the same gate
49
+ replaces the record.
50
+
51
+ ## Carriers
52
+
53
+ - **`oat_implement_exit_gate`** (`oat-project-implement`,
54
+ `references/completion-and-closeout.md` Step 14) uses this core and keeps its
55
+ additional values and fields there: the `pending` and `stale` statuses, the
56
+ `no_gate` disposition, and the resolution, attempt, launch, receive, waiver,
57
+ and freshness fields. Its own effective-delta freshness rule decides whether a
58
+ record is current.
59
+ - **`oat_quick_start_gate`** (`oat-project-quick-start`, Gate Execution) carries
60
+ exactly the core.
61
+ - **`oat_brief_gate`** (`oat-project-brief`, Gate Execution) carries exactly the
62
+ core, written and read under the same rules as `oat_quick_start_gate`. It is
63
+ absent when no gate is configured, and nothing routes on it: it is provenance
64
+ only.
65
+ - **`oat_milestone_gates[mNN].plan` and `.exit`** (goal mode;
66
+ `oat-project-goal` writes `plan` after each milestone's approval, and
67
+ `oat-project-implement`'s milestone closeout writes `exit`) carry the core
68
+ plus `resolution` (`configured`, `no_gate`, or `project_disabled`), a
69
+ `subject` binding (`plan` or `code` and the milestone's ordered phase set),
70
+ and derived `freshness` with `freshness_reason`. `reviewed_head` is `null`
71
+ for `no_gate` and `project_disabled`, and `no_gate` is written rather than
72
+ omitted because routing reads these carriers. `oat-project-brief`'s
73
+ `references/brief-contract.md` section 12.4 is their contract.
74
+
75
+ ## Reading a quick-start record
76
+
77
+ Readers report a quick-start record as recorded and do not recompute
78
+ `config_fingerprint`: no CLI emits a canonical fingerprint for the quick-start
79
+ gate, so a recomputation could not be reproduced across sessions. They do not
80
+ route on the record either.
81
+
82
+ - Report `status`, `disposition`, `decided_at`, and `config_fingerprint` (as
83
+ provenance) exactly as stored.
84
+ - Report the record as malformed when `status` and `disposition` do not form
85
+ one of the combinations in the write rules, or when a present `decided_at` is
86
+ not a valid ISO 8601 UTC time.
87
+ - `reviewed_head` is provenance only and is not compared with `HEAD`, because
88
+ the quick-start completion step commits after the gate.
89
+ - An absent record means none was written: no gate was configured, the gate
90
+ has not reached an outcome, or the plan predates the record. Readers do not
91
+ infer which.
92
+
93
+ Readers never write, repair, or infer a record.
@@ -7,7 +7,7 @@ disable-model-invocation: true
7
7
  user-invocable: true
8
8
  allowed-tools: Read, Write, Bash(git:*), Bash(oat:*), Bash(oat project log:*), Glob, Grep, AskUserQuestion, Task
9
9
  metadata:
10
- version: 2.3.19
10
+ version: 2.3.20
11
11
  ---
12
12
 
13
13
  # Implementation Phase
@@ -41,10 +41,74 @@ record `**Status:** in_progress` with the `**Blocker:**` line, or close it
41
41
  `failed` when the attempt is abandoned. Option 3 edits the brief's phases under
42
42
  the `plan-and-resume.md` Step 2.2 rules.
43
43
 
44
+ ### Goal Milestone Closeout
45
+
46
+ This section applies only when `oat_workflow_mode` is `goal` and the run's
47
+ scope is a milestone or recovery scope (`plan-and-resume.md`, Goal Projects).
48
+ `oat-project-brief/references/brief-contract.md` sections 12.4, 12.5 and 12.8
49
+ own the carrier, ladder and freshness rules; this section states the order.
50
+ Steps 11–16 below are the **terminal** closeout and run for goal only after a
51
+ valid declaration, once every phase in the terminal execution scope is
52
+ accepted.
53
+
54
+ When every phase-unit in the milestone or recovery scope is accepted (the
55
+ router's `closeout mNN: …` context), and whenever the router routes a
56
+ missing, blocked or stale exit carrier back here, this scoped closeout is the
57
+ recovery owner for that carrier:
58
+
59
+ 1. **Exit gate before the integrated review.** Resolve and run the configured
60
+ implement exit gate exactly as Step 14 does (`oat gate resolve
61
+ oat-project-implement --project "$PROJECT_PATH" --json`, canonical
62
+ `oat --json gate review`, receive eligibility, `onFailure`, `maxAttempts`),
63
+ scoped to the milestone's ordered phase set. The goal ladder exception
64
+ applies: this gate precedes the integrated delivery review, and queued
65
+ fixes require it to run again.
66
+ 2. **Write the milestone carrier.** Record `oat_milestone_gates[mNN].exit`
67
+ with the gate approval record core, `resolution` (`configured`, `no_gate`,
68
+ or `project_disabled`), `subject: { kind: code, scope: [ordered phase
69
+ set] }`, and `freshness: fresh` with `freshness_reason: null` for every
70
+ carrier it records, `no_gate` and `project_disabled` included. A configured
71
+ gate keeps the head it actually reviewed as `reviewed_head`; `no_gate` and
72
+ `project_disabled` record `reviewed_head: null`. A blocked outcome records
73
+ `status: blocked`, `disposition: null`, and no transition. This carrier is
74
+ never `oat_implement_exit_gate`.
75
+ 3. **Read freshness before any transition.** Run
76
+ `oat project delivery check --project "$PROJECT_PATH" --subject <mNN|dNN> --json`
77
+ and persist its `exit` result (`source: milestone-carrier`) as the
78
+ carrier's `freshness` and `freshness_reason`; the command exits 1 while the
79
+ integrated review is not yet passed, so read only `exit` here. The bounded
80
+ bookkeeping-successor rule (section 12.8) decides freshness: bookkeeping
81
+ commits after the reviewed head never force a rerun, and a substantive
82
+ commit does.
83
+ 4. **Transition.** For the active milestone, when the carrier is `allowed` and
84
+ fresh, write `oat_milestone_status: reviewing` (`implementing → reviewing`);
85
+ never `delivering`, which belongs to `oat-project-review-receive`. For a
86
+ recovery scope, advance `oat_goal_recovery.stage` instead: accepted fixes →
87
+ `exit_gate`, then an allowed, fresh carrier → `reviewing`; the active
88
+ milestone's fields stay unchanged.
89
+ 5. **Hand off.** Commit the carrier and transition as bookkeeping, then
90
+ report the router's next skill: `oat-project-review-provide` with the
91
+ explicit `code mNN: <ordered phase ids>` (or `code mNN/dNN: …`) scope.
92
+
93
+ **Terminal `pr` step.** When the terminal post-implement sequence (Step 15)
94
+ reaches the `pr` step's position, run `oat project closeout-check
95
+ "$PROJECT_PATH" --json`. When delivery coverage holds, record the step complete
96
+ with `satisfied_by: { pr: delivery-coverage }` in the snapshot and run every
97
+ other configured step unchanged; never record it before that position. When an
98
+ accepted phase is uncovered (`phase-uncovered`), the step's target
99
+ `oat-project-pr-final` registers the terminal delivery; other refusals route to
100
+ their `nextOwner.skill`.
101
+
44
102
  ### Step 11: Prepare Final Closeout Baseline
45
103
 
46
104
  When all plan tasks are complete (i.e., there is no next incomplete `pNN-tNN` task):
47
105
 
106
+ In goal mode this step is terminal closeout: it starts only after a valid
107
+ declaration (`oat_goal_status: declared_met`) when every phase in the terminal
108
+ execution scope is accepted; a milestone closes through Goal Milestone Closeout
109
+ above instead. The Outcomes audit below is the declaration's
110
+ `oat_goal_outcome_audit`, which implement reads and never writes.
111
+
48
112
  In brief modes this step starts only when every phase-unit in the active scope
49
113
  is accepted (`**Status:** completed` under its journal heading), no phase is
50
114
  provisional, and no execution record is open. Closed records alone never start
@@ -946,6 +1010,9 @@ last phase-unit in document order. The generic sequence normalization, the
946
1010
  autonomous lifecycle-tail default, the project recap, and the non-lite algorithm
947
1011
  below then apply unchanged; with no final checkpoint, item 5 of that algorithm
948
1012
  governs. In v1 the `pr` step keeps its target, `oat-project-pr-final`.
1013
+ Goal follows this path at terminal closeout, with the `pr` step satisfied by
1014
+ delivery coverage at its position (Goal Milestone Closeout, Terminal `pr`
1015
+ step).
949
1016
 
950
1017
  Run final verification (Step 12). Final review must be `passed` and the
951
1018
  configured implementation exit gate in Step 14 must be allowed before any