@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
@@ -62,6 +62,15 @@ replaces the record.
62
62
  core, written and read under the same rules as `oat_quick_start_gate`. It is
63
63
  absent when no gate is configured, and nothing routes on it: it is provenance
64
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.
65
74
 
66
75
  ## Reading a quick-start record
67
76
 
@@ -5,7 +5,7 @@ disable-model-invocation: true
5
5
  user-invocable: true
6
6
  allowed-tools: Read, Write, Bash(git:*), Glob, Grep, AskUserQuestion
7
7
  metadata:
8
- version: 1.0.5
8
+ version: 1.0.6
9
9
  ---
10
10
 
11
11
  # Reconcile Manual Implementation
@@ -188,6 +188,35 @@ replacements:
188
188
  phase ID, never an extracted or accepted unit), or `null` when every unit is
189
189
  accepted.
190
190
 
191
+ **Goal-mode branch (`WORKFLOW_MODE=goal`).** The brief-mode branch applies,
192
+ with `oat-project-brief/references/brief-contract.md` section 12 winning where
193
+ this skill differs:
194
+
195
+ - **Pointer scope.** The pointer is the first incomplete unit within the
196
+ active milestone's ordered phase set (the shared Milestones reader), never a
197
+ phase of another milestone.
198
+ - **Interrupted recovery.** When `oat_goal_recovery` is set, repair only that
199
+ record: check that its `milestone` has a `## Milestones` row, that its
200
+ `phase_ids` are that row's phases (plus any appended `p-revN` assigned to
201
+ it), that a non-null `delivery_id` names a registry entry of that milestone,
202
+ and that a non-null `review_artifact` exists in `reviews/` or
203
+ `reviews/archived/`. Then set `stage` from the evidence on disk by the
204
+ section 12.5 missing-evidence order (open fix records → `implementing`; a
205
+ missing, blocked or stale exit carrier → `exit_gate`; no integrated review
206
+ of the set → `reviewing`; a produced, unreceived artifact → `receiving`;
207
+ a received `passed` review with a fresh carrier → `delivering`). Reconcile
208
+ confirms the repaired record with the user in Step 4. Older-delivery
209
+ recovery leaves `oat_milestone`, `oat_milestone_status`,
210
+ `oat_current_task_id`, and `oat_current_task` untouched.
211
+ - **Never for the active milestone.** Reconcile never creates an
212
+ `oat_goal_recovery` record for the active milestone and never creates one
213
+ at all: only `oat-project-review-receive`, `oat-project-revise`, and
214
+ `oat-project-pr-progress` open recovery records.
215
+ - **Registration ambiguity.** A `registering` delivery whose lookup matched
216
+ more than one pull request is routed here by its registration owner: report
217
+ the matches and attach the one the user confirms in Step 4; reconcile never
218
+ creates a pull request.
219
+
191
220
  ### Step 1: Find Checkpoint
192
221
 
193
222
  Identify the last commit that OAT has already tracked. Everything after this commit is "untracked human work" that needs reconciliation.
@@ -694,7 +723,7 @@ oat_current_task_id: { next_pending_task_id } # or null if all complete
694
723
  oat_last_updated: { today }
695
724
  ```
696
725
 
697
- Find the next pending task by scanning plan order: first task with status not `completed`. In brief modes the pointer is the first incomplete phase-unit, per the brief-mode branch above.
726
+ Find the next pending task by scanning plan order: first task with status not `completed`. In brief modes the pointer is the first incomplete phase-unit, per the brief-mode branch above; in goal mode, within the active milestone's phase set, per the goal-mode branch.
698
727
 
699
728
  In `state.md`:
700
729
 
@@ -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.14
8
+ version: 1.5.15
9
9
  ---
10
10
 
11
11
  # Request Review
@@ -188,6 +188,12 @@ accepted unit to the first incomplete unit in document order. A brief code
188
188
  scope is always a phase-unit (`pNN`, `p-revN`, `pNN-pMM`, or `final`), never an
189
189
  execution record.
190
190
 
191
+ When `WORKFLOW_MODE` is `goal`, the same pointer rule applies within the active
192
+ milestone's ordered phase set, and an integrated milestone or delivery review
193
+ takes its scope from the router's `code` context (`code mNN: pAA, pBB` or
194
+ `code mNN/dNN: …`) or from a pending `oat_goal_recovery` record, never from the
195
+ phase table (Step 3.0g).
196
+
191
197
  If inference produces a result, propose it and proceed unless the user overrides:
192
198
 
193
199
  ```
@@ -321,6 +327,7 @@ WORKFLOW_MODE=$(oat project status --project-path "$PROJECT_PATH" --field projec
321
327
  - `import`: `plan.md` (`references/imported-plan.md` recommended, `spec.md`/`design.md` optional)
322
328
  - `lite`: `plan.md`, `implementation.md` (`discovery.md`/`spec.md`/`design.md` are absent by design)
323
329
  - `brief`: `plan.md` (the Project Brief) and `implementation.md` (the per-phase journal, which carries the `**Base:**`/`**Head:**` anchors); `discovery.md`, `spec.md`, and `design.md` are absent by design, and research under `references/` is optional
330
+ - `goal`: the same as `brief`, plus the `## Milestones` table in `plan.md` and the goal state in `state.md` (milestone, recovery record, milestone gate carriers, delivery registry)
324
331
 
325
332
  **Required for artifact review:**
326
333
 
@@ -334,6 +341,7 @@ WORKFLOW_MODE=$(oat project status --project-path "$PROJECT_PATH" --field projec
334
341
  - reviewing `plan` in `quick/import` mode may use `discovery.md` and/or `references/imported-plan.md` instead; lite uses the separate rule below
335
342
  - reviewing `plan` in `lite` mode requires only `plan.md`; its Summary, Decisions, Assumptions, Out of Scope, and Validation Criteria sections are the complete upstream contract
336
343
  - reviewing `plan` in `brief` mode requires only `plan.md`; the brief and `oat-project-brief/references/brief-contract.md` are the complete upstream contract. `discovery`, `spec`, and `design` are not reviewable artifacts in brief mode
344
+ - reviewing `plan` in `goal` mode follows the `brief` rule; for an amendment the request names the milestone under review and its ordered phase set
337
345
 
338
346
  **If missing:** Report missing required artifacts for the current mode and stop if requirements are not met.
339
347
 
@@ -347,13 +355,14 @@ If review type is `artifact`:
347
355
 
348
356
  If review type is `code`, use the scope resolution below.
349
357
 
350
- **Step 3.0: Brief-Mode Anchor Resolution (`brief` only)**
358
+ **Step 3.0: Brief-Family Anchor Resolution (`brief` and goal phase-unit reviews)**
351
359
 
352
- When `WORKFLOW_MODE` is `brief` and the review type is `code`, the review range
353
- comes from the phase anchors recorded in the journal, not from commit-message
354
- inference. `oat-project-brief/references/brief-contract.md` section 10 is
355
- authoritative where this step and the contract differ. This step is inert for
356
- every other workflow mode.
360
+ When `WORKFLOW_MODE` is `brief` — or `goal` for a phase-unit review routed
361
+ here by Step 3.0g — and the review type is `code`, the review range comes from
362
+ the phase anchors recorded in the journal, not from commit-message inference.
363
+ `oat-project-brief/references/brief-contract.md` section 10 is authoritative
364
+ where this step and the contract differ. This step is inert for every other
365
+ workflow mode and for goal integrated reviews (Step 3.0g).
357
366
 
358
367
  Resolution order for brief code reviews:
359
368
 
@@ -609,6 +618,51 @@ and, when they apply, `oat_review_fallback_reason`,
609
618
  them to the reviewer and Step 8 writes them; `oat-project-review-receive`
610
619
  preserves them.
611
620
 
621
+ **Step 3.0g: Goal Explicit Review Scope (`goal` only)**
622
+
623
+ When `WORKFLOW_MODE` is `goal`, a phase-unit code review (`pNN`, `p-revN`)
624
+ runs Step 3.0 unchanged. An integrated milestone or delivery review follows
625
+ `oat-project-brief/references/brief-contract.md` section 12.6 (explicit goal
626
+ review scopes) and section 12.5 (the goal exception to the shared ladder):
627
+
628
+ 1. **Explicit identity only.** Accept only a milestone or delivery identity
629
+ with its ordered phase set: the router's `code mNN: pAA, pBB` or
630
+ `code mNN/dNN: …` context, a pending `oat_goal_recovery` record
631
+ (`milestone`, `delivery_id`, `phase_ids`), or the same form typed by the
632
+ user. Refuse a `pNN-pMM` or `final` token for an integrated goal review, and
633
+ never expand membership first to last or derive it from commit labels.
634
+ 2. **Validate the set.** It must equal the milestone's ordered phase set from
635
+ the shared Milestones reader (`oat project status --json`), the recovery
636
+ record's `phase_ids`, or a registered delivery's frozen scope with any
637
+ recorded correction phases. A mismatch stops with the two sets; membership
638
+ errors route to `oat-project-goal`.
639
+ 3. **Exit gate first.** Before dispatch, run
640
+ `oat project delivery check --project "$PROJECT_PATH" --subject <mNN|dNN> --json`
641
+ and read only its `exit` result (`source: milestone-carrier`); the command
642
+ exits 1 here because no passed integrated review exists yet. A missing,
643
+ blocked or stale exit carrier stops and routes to `oat-project-implement`
644
+ scoped closeout: the milestone exit gate precedes the integrated review.
645
+ 4. **Range.** Resolve each set member's anchors with the Step 3.0 per-phase
646
+ checks (existence, ancestry). The aggregate head is the last set member's
647
+ head in document order and must contain every member head; the range is the
648
+ first member's base through the aggregate head. Delivery evidence uses
649
+ integration heads: a parallel group member's pre-fan-in review is member
650
+ evidence only. Missing anchors widen to the merge-base range exactly as in
651
+ Step 3.0; invalid anchors route to `oat-project-reconcile`.
652
+ 5. **Disclose, never relabel.** The range may be wider than the set. Name every
653
+ phase whose anchored commits fall inside the range but outside the set
654
+ (for example `p03` of m02 between `p02` and `p-rev1`) under an
655
+ `Intervening changes:` line in the Review Scope, so the reviewer judges only
656
+ the set and treats the rest as context.
657
+ 6. **Record.** Write the brief artifact record with
658
+ `oat_review_requested_scope: mNN` (or `mNN/dNN`) and `oat_review_phase_ids`
659
+ equal to the exact ordered set; the semantic set survives in provenance even
660
+ when the Git range is wider.
661
+ 7. **No narrowing below the set.** Step 3a may narrow a re-review's Git range,
662
+ but a narrowed or revision-only goal review is never recorded as the full
663
+ integrated review without the prior review it builds on; its
664
+ `oat_review_phase_ids` stays the full set.
665
+
612
666
  **Step 3a: Detect Re-Review Context**
613
667
 
614
668
  After parsing the requested scope, distinguish an explicit range override from a
@@ -791,8 +845,8 @@ case "$SCOPE_TOKEN" in
791
845
  FILES_CHANGED=$(printf "%s\n" "$PROJECT_PATH/plan.md" "$PROJECT_PATH/spec.md" "$PROJECT_PATH/design.md")
792
846
  elif [[ "$WORKFLOW_MODE" == "quick" ]]; then
793
847
  FILES_CHANGED=$(printf "%s\n" "$PROJECT_PATH/plan.md" "$PROJECT_PATH/discovery.md")
794
- elif [[ "$WORKFLOW_MODE" == "lite" || "$WORKFLOW_MODE" == "brief" ]]; then
795
- # brief: the reviewer also receives oat-project-brief/references/brief-contract.md
848
+ elif [[ "$WORKFLOW_MODE" == "lite" || "$WORKFLOW_MODE" == "brief" || "$WORKFLOW_MODE" == "goal" ]]; then
849
+ # brief and goal: the reviewer also receives oat-project-brief/references/brief-contract.md
796
850
  # as the contract reference (Step 5), not as a file in scope.
797
851
  FILES_CHANGED=$(printf "%s\n" "$PROJECT_PATH/plan.md")
798
852
  else
@@ -878,8 +932,8 @@ Build the "Review Scope" metadata for the reviewer:
878
932
 
879
933
  **Artifact Paths:**
880
934
 
881
- - Spec: {PROJECT_PATH}/spec.md (required in spec-driven mode; optional in quick/import/lite; absent in brief)
882
- - Design: {PROJECT_PATH}/design.md (required in spec-driven mode; optional in quick/import/lite; absent in brief)
935
+ - Spec: {PROJECT_PATH}/spec.md (required in spec-driven mode; optional in quick/import/lite; absent in brief and goal)
936
+ - Design: {PROJECT_PATH}/design.md (required in spec-driven mode; optional in quick/import/lite; absent in brief and goal)
883
937
  - Plan: {PROJECT_PATH}/plan.md
884
938
  - Implementation: {PROJECT_PATH}/implementation.md
885
939
  - Discovery: {PROJECT_PATH}/discovery.md
@@ -951,7 +1005,7 @@ artifact-plan and code Review Scope explicitly as:
951
1005
  - Import reference: not required
952
1006
  - Plan: `{PROJECT_PATH}/plan.md` (the Project Brief: Goal, Outcomes, Approach, Constraints and Out of Scope, Decisions, and the in-scope phases' `**Intent:**` and `**Exit evidence:**` are the requirements contract)
953
1007
  - Implementation: `{PROJECT_PATH}/implementation.md` (the per-phase journal: anchors, execution records, verification evidence)
954
- - Brief contract: `oat-project-brief/references/brief-contract.md`
1008
+ - Brief contract: `oat-project-brief/references/brief-contract.md` (goal: sections 1–11 and section 12)
955
1009
 
956
1010
  and append the brief anchor record to every brief code Review Scope:
957
1011
 
@@ -1298,7 +1352,7 @@ If running inline (Tier 3), execute the review and write artifact.
1298
1352
  **Review checklist (from oat-reviewer):**
1299
1353
 
1300
1354
  1. Verify scope (don't review out-of-scope changes)
1301
- 2. If code review: verify alignment to available requirements sources (`spec`/`design` for spec-driven mode; `discovery`/import reference for quick/import; plan.md Summary, Decisions, Assumptions, Out of Scope, and Validation Criteria for lite; the brief's Outcomes, Constraints and Out of Scope, Decisions, and the in-scope phases' Intent and Exit evidence for brief)
1355
+ 2. If code review: verify alignment to available requirements sources (`spec`/`design` for spec-driven mode; `discovery`/import reference for quick/import; plan.md Summary, Decisions, Assumptions, Out of Scope, and Validation Criteria for lite; the brief's Outcomes, Constraints and Out of Scope, Decisions, and the in-scope phases' Intent and Exit evidence for brief and goal)
1302
1356
  3. If code review: verify code quality (correctness, tests, security, maintainability)
1303
1357
  4. If artifact review: verify completeness/clarity/readiness of the artifact and its alignment with upstream artifacts
1304
1358
  5. Categorize findings (Critical/High/Medium/Low)
@@ -1470,6 +1524,7 @@ Record this artifact as one append-ordered review event:
1470
1524
 
1471
1525
  - `Scope`: `{scope}` (examples: `p02`, `final`, `spec`, `design`)
1472
1526
  - Phase-range examples such as `p02-p03` are valid code-review scopes and should be preserved exactly.
1527
+ - Goal integrated reviews: exactly the milestone ID (`m01`) or, for a registered delivery, the delivery ID (`d01`); the ordered phase set lives in `oat_review_phase_ids`, never in the Scope cell (brief contract section 12.6).
1473
1528
  - `Type`: `code` or `artifact`
1474
1529
  - `Status`: `received` (receive-review will decide `fixes_added` vs `passed`; `passed` now requires no unresolved Critical/High/Medium and final deferred-medium disposition when applicable)
1475
1530
  - `Date`: `{today}`
@@ -1497,6 +1552,14 @@ eight columns.
1497
1552
 
1498
1553
  If plan.md is missing (e.g., spec/design review before planning), skip this update and rely on the review artifact + next-step routing.
1499
1554
 
1555
+ **Goal mode.** Review-provide records the event as `received` and never writes
1556
+ `passed`, `delivering`, or any milestone status: `oat-project-review-receive`
1557
+ owns the transition to `delivering`. When a pending `oat_goal_recovery` record
1558
+ names this scope at stage `reviewing`, advance it to `stage: receiving` and set
1559
+ `review_artifact: reviews/{filename}.md` in `state.md`; leave `oat_milestone`,
1560
+ `oat_milestone_status`, and the execution pointer unchanged. Step 9.5 then
1561
+ commits `state.md` with the review bookkeeping.
1562
+
1500
1563
  ### Step 9.5: Commit Review Bookkeeping Atomically (Required)
1501
1564
 
1502
1565
  **If `INLINE_ONLY=true`:** skip this step — no artifact was written to disk.
@@ -1509,6 +1572,7 @@ After writing the review artifact and applying the Step 9 Reviews-table update,
1509
1572
 
1510
1573
  - Always include the active review artifact file: `reviews/{filename}.md`
1511
1574
  - Include `plan.md` when Step 9 updated the Reviews table
1575
+ - Include `state.md` when Step 9 advanced a goal recovery record (`GOAL_RECOVERY_ADVANCED=true`)
1512
1576
  - Do not write or commit new review artifacts directly into `reviews/archived/`
1513
1577
  - Do not include unrelated implementation/code files in this commit
1514
1578
 
@@ -1533,6 +1597,8 @@ if [ "$PROJECT_SCOPE" = "synced" ]; then
1533
1597
  else
1534
1598
  OWNED_COMMIT_PATHS=("$ACTIVE_REVIEW_PATH")
1535
1599
  [ -f "$PROJECT_PATH/plan.md" ] && OWNED_COMMIT_PATHS+=("$PROJECT_PATH/plan.md")
1600
+ # goal: Step 9 advanced a pending oat_goal_recovery record
1601
+ [ "${GOAL_RECOVERY_ADVANCED:-false}" = true ] && OWNED_COMMIT_PATHS+=("$PROJECT_PATH/state.md")
1536
1602
  oat internal commit-paths --identity "${COMMIT_IDENTITY:?set once and retain for retries}:oat-project-review-provide:1" --message "chore(oat): record {scope} review artifact" -- "${OWNED_COMMIT_PATHS[@]}" || exit 1
1537
1603
  fi
1538
1604
  ```
@@ -5,7 +5,7 @@ disable-model-invocation: false
5
5
  user-invocable: true
6
6
  allowed-tools: Read, Write, Bash(git:*), Bash(oat:*), Glob, Grep, AskUserQuestion, Task
7
7
  metadata:
8
- version: 1.6.10
8
+ version: 1.6.11
9
9
  ---
10
10
 
11
11
  # Receive Review
@@ -424,6 +424,70 @@ Never write `### Task` headings into the brief, and never write `**Base:**` or
424
424
  `**Head:**`: `oat-project-implement` records anchors when the phase starts and
425
425
  ends.
426
426
 
427
+ **Goal mode (`oat_workflow_mode: goal`).** The brief-mode rules above apply,
428
+ with `oat-project-brief/references/brief-contract.md` section 12 winning where
429
+ this skill differs (12.3 transitions, 12.5 the goal ladder exception, 12.6
430
+ explicit scopes and recovery, 12.7 the registry). A phase-unit review (`pNN`,
431
+ `p-revN`) is received exactly as in brief mode. For an integrated milestone or
432
+ delivery review:
433
+
434
+ 1. **Identity.** The target is the artifact's `oat_review_requested_scope`
435
+ (`mNN` or `mNN/dNN`) with its ordered `oat_review_phase_ids`, or the
436
+ pending `oat_goal_recovery` record whose `review_artifact` names this
437
+ artifact. A recovery record that names a different artifact is never
438
+ satisfied by this one. The target is **older** when its milestone is not
439
+ `oat_milestone`, or its delivery belongs to an earlier milestone;
440
+ otherwise it is the **active** milestone.
441
+ 2. **Queued fixes.** Place the fixes by the late-fix rule above, with the
442
+ reviewed phase being the last phase of the explicit set. An appended
443
+ `p-revN` joins the **target** milestone's `## Milestones` row (append it to
444
+ that row's phase list); a frozen delivery scope is never edited. Then
445
+ invalidate the evidence: run
446
+ `oat project delivery check --project "$PROJECT_PATH" --subject <mNN|dNN> --json`,
447
+ confirm the report's `exit.source` is `milestone-carrier` and its `status`
448
+ is `undeliverable`, and write `oat_milestone_gates[mNN].exit.freshness: stale`
449
+ with `freshness_reason: "fixes queued from reviews/archived/{REVIEW_FILENAME}"`
450
+ followed by the report's `exit.reason` when present; for a registered
451
+ delivery also write its `integrated_review.disposition: stale`. Queued fixes
452
+ invalidate the review and exit-gate evidence even when the check would
453
+ still report them fresh, so the exit gate runs again before the next
454
+ integrated review.
455
+ - **Active target:** update the execution pointer as in brief mode and
456
+ write `oat_milestone_status: implementing` (from `reviewing` or
457
+ `delivering`).
458
+ - **Older target:** write only `oat_goal_recovery: { milestone,
459
+ delivery_id, phase_ids, stage: implementing, review_artifact: null }`,
460
+ with `phase_ids` the explicit set plus any appended `p-revN` (create the
461
+ record, or move an existing one for this target back to `implementing`).
462
+ Leave `oat_milestone`, `oat_milestone_status`, `oat_current_task_id`, and
463
+ `oat_current_task` unchanged; Step 7's brief pointer write is skipped.
464
+ 3. **Clean receive.** `fixes_completed` is not a passed review. When no fixes
465
+ are queued, write the Reviews event `passed` (Step 6) and persist the
466
+ authoritative evidence in tracked records before Step 7.5 archives the file:
467
+ the Reviews row keeps its `Reviewed Head`; for a registered delivery the
468
+ same write rewrites `integrated_review` (`artifact:
469
+ reviews/archived/{REVIEW_FILENAME}`, `scope` from `oat_review_phase_ids`,
470
+ `bound_revisions` from the reviewed member base and head,
471
+ `disposition: passed`), writes each `members[i].reviewed_head` to the
472
+ reviewed member head that `bound_revisions` binds for it, and replaces
473
+ `exit_gate` with the current allowed milestone exit carrier. The delivery's
474
+ `exit_gate` and `members[].reviewed_head` are set once and may change only
475
+ in the commit that records a review naming a different artifact of this
476
+ delivery (section 12.8), so never split these writes. Commit them (Step 7.6), then
477
+ re-validate scope, revisions and the exit carrier with
478
+ `oat project delivery check --project "$PROJECT_PATH" --subject <mNN|dNN> --json`:
479
+ - `status: ok` → **active target:** write `oat_milestone_status: delivering`
480
+ (`reviewing → delivering`); **older target:** advance the recovery record
481
+ to `stage: delivering`. Only review-receive writes this transition.
482
+ - `status: undeliverable` with a not-fresh `exit` → write
483
+ `exit.freshness: stale` with the report's `exit.reason`; the router
484
+ sends the scoped closeout back to `oat-project-implement`.
485
+ - `status: undeliverable` with a not-fresh `review` → write no transition
486
+ and route to `oat-project-review-provide` for a new integrated review of
487
+ the same explicit set.
488
+
489
+ Commit the transition or invalidation as its own bookkeeping commit.
490
+
427
491
  ### Step 4: Determine Next Task IDs
428
492
 
429
493
  Read plan.md to find the last task ID in the target phase:
@@ -827,6 +891,11 @@ Low findings handling is scope-aware:
827
891
 
828
892
  ### Step 10: Route to Next Action
829
893
 
894
+ **Goal mode:** report the router's next skill (`oat project status --json`)
895
+ instead of offering a task list when the receive wrote `delivering`, advanced a
896
+ recovery record, or routed to review-provide or scoped closeout; older-target
897
+ fixes resume through the recovery record, never through the active milestone.
898
+
830
899
  **Ask user:**
831
900
 
832
901
  ```
@@ -5,7 +5,7 @@ disable-model-invocation: true
5
5
  user-invocable: true
6
6
  allowed-tools: Read, Write, Bash(git:*), Glob, Grep, AskUserQuestion
7
7
  metadata:
8
- version: 1.0.6
8
+ version: 1.0.7
9
9
  ---
10
10
 
11
11
  # Project Revise
@@ -216,6 +216,30 @@ Add a pending `p-rev{N}` `code` row to the brief's `## Reviews` table. The
216
216
  executor opens `prev{N}-tNN` execution records in `implementation.md` when the
217
217
  work starts and commits them as `fix(prev{N}-tNN): …`; revise writes none.
218
218
 
219
+ **Goal mode (`oat_workflow_mode: goal`):** the brief-mode rules apply, with
220
+ `oat-project-brief/references/brief-contract.md` section 12.6 winning. Inline
221
+ feedback requires an explicit target before any write: a milestone or
222
+ delivery identity (`mNN` or `mNN/dNN`), named by the user or by the open
223
+ delivery the feedback is about. Ask for it when it is not stated; never infer
224
+ it from the open PR's commit labels or a first–last phase range.
225
+
226
+ - **Phase-only `p-rev{N}`.** The revision phase is a phase-unit with no
227
+ execution records, as in brief mode, and it joins the **target** milestone:
228
+ append `p-rev{N}` to that milestone's `## Milestones` row, so its membership
229
+ is exact. A registered delivery's frozen scope is never edited.
230
+ - **Invalidate the target's evidence.** Write
231
+ `oat_milestone_gates[mNN].exit.freshness: stale` with
232
+ `freshness_reason: "revision p-rev{N} (inline feedback)"`, and for a
233
+ registered target delivery its `integrated_review.disposition: stale`.
234
+ - **Active target** (the milestone is `oat_milestone`): write the ordinary
235
+ pointer (4e, 4f) and `oat_milestone_status: implementing`.
236
+ - **Older target** (an earlier milestone or its delivery): create or advance
237
+ `oat_goal_recovery: { milestone, delivery_id, phase_ids: [the target's
238
+ ordered set plus p-rev{N}], stage: implementing, review_artifact: null }`
239
+ instead, and skip the 4e/4f pointer and status writes: `oat_milestone`,
240
+ `oat_milestone_status`, `oat_current_task_id`, and `oat_current_task` stay
241
+ unchanged.
242
+
219
243
  **Task naming:** Prefix with `(revision)` — following the `(review)` convention in review-receive.
220
244
 
221
245
  **Task IDs:** `prev{N}-t{NN}` format (e.g., `prev1-t01`, `prev1-t02`).
@@ -5,7 +5,7 @@ disable-model-invocation: false
5
5
  user-invocable: true
6
6
  allowed-tools: Read, Write, Bash(git:*), Bash(jq:*), Bash(oat config:*), Bash(oat decision:*), Bash(oat pjm:*), Bash(oat project log:*), Bash(oat project push:*), Bash(oat project scope:*), Bash(oat template:*), Bash(oat tools:*), Glob, Grep, AskUserQuestion
7
7
  metadata:
8
- version: 1.5.9
8
+ version: 1.5.10
9
9
  ---
10
10
 
11
11
  # Project Summary
@@ -22,7 +22,7 @@ Produce a `summary.md` that serves as institutional memory — capturing what wa
22
22
 
23
23
  ## Prerequisites
24
24
 
25
- **Required:** Active project with `implementation.md` that has meaningful progress (at least one completed task; in brief modes, at least one accepted phase-unit).
25
+ **Required:** Active project with `implementation.md` that has meaningful progress (at least one completed task; in brief and goal modes, at least one accepted phase-unit).
26
26
 
27
27
  ## Mode Assertion
28
28
 
@@ -150,6 +150,14 @@ design:
150
150
  | `implementation.md` Final Summary | Shipped results; takes precedence over the brief's plans |
151
151
  | `state.md`, `project-log.md`, `oat-execution-learnings.md`, `references/research/` | Same roles as below, when present |
152
152
 
153
+ For `oat_workflow_mode: goal`, read the brief sources above, plus the
154
+ `## Milestones` table (organize What Was Implemented by milestone), the
155
+ `state.md` delivery registry (`oat_deliveries`: each delivery's scope, members
156
+ and endpoint observation are shipped results), and, after a declaration, the
157
+ outcome audit (`oat_goal_outcome_audit`) as the authoritative per-outcome
158
+ disposition, with deferred and retired obligations listed under Follow-up
159
+ Items.
160
+
153
161
  For every other workflow mode, read all available artifacts for synthesis:
154
162
 
155
163
  - `"$PROJECT_PATH/discovery.md"` — initial request, decisions, constraints
@@ -250,7 +258,7 @@ test -f "$PROJECT_PATH/summary.md"
250
258
 
251
259
  Copy template: `oat template resolve summary --output "$PROJECT_PATH/summary.md"`
252
260
 
253
- **Brief modes (`oat_workflow_mode: brief`): freshness by phase fingerprint.**
261
+ **Brief modes (`oat_workflow_mode: brief` or `goal`): freshness by phase fingerprint.**
254
262
  Replace the task and revision comparison above with
255
263
  `oat_summary_phase_fingerprint`, a stable hash of the ordered accepted phase
256
264
  IDs; for each accepted phase its `**Head:**`, its `**Status:**` line, and the
@@ -310,13 +318,36 @@ brief_summary_fingerprint() {
310
318
  CURRENT_PHASE_FINGERPRINT=$(brief_summary_fingerprint)
311
319
  ````
312
320
 
321
+ **Goal fragment.** In goal mode the fingerprint also covers the delivery IDs
322
+ at endpoint, so a delivery newly observed at its agreed endpoint requires a
323
+ refresh. Append one `delivery=<dNN>` line per registry entry with
324
+ `status: at_endpoint` or a recorded `endpoint_attainment`, in registry order,
325
+ to the hashed input:
326
+
327
+ ```bash
328
+ goal_summary_deliveries() {
329
+ oat project status --project-path "$PROJECT_PATH" --field project.deliveries 2>/dev/null |
330
+ node -e 'let s = ""; process.stdin.on("data", (d) => (s += d)).on("end", () => {
331
+ for (const d of JSON.parse(s.trim() || "null") ?? [])
332
+ if (d.status === "at_endpoint" || d.endpoint_attainment) console.log(`delivery=${d.delivery_id}`);
333
+ })'
334
+ }
335
+
336
+ if [ "$(oat project status --project-path "$PROJECT_PATH" --field project.workflowMode 2>/dev/null)" = goal ]; then
337
+ CURRENT_PHASE_FINGERPRINT=$(
338
+ { printf '%s\n' "$CURRENT_PHASE_FINGERPRINT"; goal_summary_deliveries; } |
339
+ { command -v sha256sum >/dev/null 2>&1 && sha256sum || shasum -a 256; } | cut -d' ' -f1
340
+ )
341
+ fi
342
+ ```
343
+
313
344
  - No existing summary, or `oat_summary_phase_fingerprint` differs from
314
345
  `CURRENT_PHASE_FINGERPRINT`: refresh. Update What Was Implemented from the
315
346
  newly accepted phases, Revision History when an accepted `p-revN` is new, and
316
347
  Follow-up Items from review dispositions.
317
348
  - Fingerprint unchanged: no phase-driven update. The autonomous-learnings and
318
349
  project-log triggers above stay independent and can still require a refresh.
319
- - A brief summary never reads or writes `oat_summary_last_task`; execution
350
+ - A brief or goal summary never reads or writes `oat_summary_last_task`; execution
320
351
  records are not units. `oat-project-complete` recomputes the same
321
352
  fingerprint with this fragment to decide whether `summary.md` is stale.
322
353
 
@@ -492,7 +523,7 @@ oat_summary_includes_revisions: [{ list of p-revN IDs reflected }]
492
523
  ---
493
524
  ```
494
525
 
495
- In brief modes write `oat_summary_phase_fingerprint: {CURRENT_PHASE_FINGERPRINT}`
526
+ In brief and goal modes write `oat_summary_phase_fingerprint: {CURRENT_PHASE_FINGERPRINT}`
496
527
  (Step 3) and omit `oat_summary_last_task`; keep `oat_summary_revision_count`
497
528
  and `oat_summary_includes_revisions` as informational fields.
498
529
 
@@ -502,6 +533,28 @@ Run this step after `summary.md` has been authored or refreshed, including the
502
533
  distinct `## Autonomous Execution Learnings` section when its source artifact
503
534
  exists.
504
535
 
536
+ **Goal terminal deferral.** When `oat_workflow_mode` is `goal`, this run
537
+ comes before `pr` in the post-implement sequence (`oat_post_implement_sequence`
538
+ lists `pr` but not yet among its completed steps), and
539
+ `oat project closeout-check "$PROJECT_PATH" --json` (read-only) still reports
540
+ `phase-uncovered` (a terminal delivery is still to be registered), write only
541
+ files under `$PROJECT_PATH`: skip the `oat project log rollup` call below (it
542
+ appends to the repository ledger and also writes the `## Workflow Observations`
543
+ section, which the later run supplies) and all of Step 7 (decision-record
544
+ promotion and the regenerated decisions index). Report them as deferred with:
545
+ `Deferred: ledger roll-up and decision promotion run in the completion summary refresh; do not decline it.`
546
+ A repo-level commit after the terminal milestone's reviewed revision is not
547
+ bookkeeping (brief contract 12.8), so it would make the terminal subject
548
+ undeliverable for the terminal registration in the PR skill's Step 1.5.
549
+ Without `phase-uncovered` there is nothing to defer (delivery coverage already
550
+ holds and `pr` registers nothing): run Steps 6 and 7 as usual. Perform the
551
+ deferred writes in the next summary run after `phase-uncovered` clears: a
552
+ `summary` step configured after `pr`, or the summary refresh at completion,
553
+ which the goal fingerprint fragment (Step 3) marks stale once the terminal
554
+ delivery reaches its endpoint. Both writes are idempotent, so the later run
555
+ needs no extra state. Registered deliveries are unaffected: they are judged
556
+ against their observed member revisions.
557
+
505
558
  Before the roll-up or decision promotion mutates repository-wide outputs,
506
559
  preflight the owned paths and snapshot unrelated staged state:
507
560
 
@@ -564,6 +617,8 @@ append-based `project` → `general` promotion in Step 2.5.
564
617
 
565
618
  ### Step 7: Promote Key Decisions to Canonical Decision Records
566
619
 
620
+ Under the goal terminal deferral (Step 6), skip this step and report it deferred.
621
+
567
622
  Run this step **after** `summary.md` (including its `## Key Decisions` section) has been written/refreshed and its frontmatter updated. It promotes the project's Key Decisions out of per-project prose and into the canonical, repo-wide `reference/decisions/` log so they stop being siloed in `summary.md`. This step is **additive and non-interactive** — it never prompts.
568
623
 
569
624
  **7.1 — PJM capability and adoption gate (auto, no prompt).** Check capability
@@ -6,7 +6,7 @@ disable-model-invocation: false
6
6
  user-invocable: true
7
7
  allowed-tools: Read, Write, Edit, Bash, Grep, Glob, Task
8
8
  metadata:
9
- version: 1.9.8
9
+ version: 1.9.9
10
10
  ---
11
11
 
12
12
  # Execute a Wave of External Plans
@@ -201,7 +201,7 @@ writes and stay on the orchestrator's own model class, the same rule
201
201
  absent because of version skew, run the command without it, expect the scaffold
202
202
  to auto-commit, record that generated commit, and land the wrapper artifacts in
203
203
  a follow-up commit (Orc W1 scaffold evidence). The wrapper stays in quick
204
- mode: its lanes need task-level plans, so lite and brief do not apply.
204
+ mode: its lanes need task-level plans, so lite, brief, and goal do not apply.
205
205
  2. **Verify scaffold substitution AND advance the lifecycle** in `state.md`.
206
206
  On oat ≥0.1.65, verify that the basic scaffold placeholders
207
207
  (`{ OAT_HILL_CHECKPOINTS }`, `{ OAT_PHASE }`, `{ OAT_WORKFLOW_MODE }`) were
@@ -34,7 +34,7 @@ oat_phase_status: in_progress # Status: in_progress | complete | pr_open
34
34
  # - { harness: cursor, model: gpt-5.5-xhigh }
35
35
  # source: project-state
36
36
  # oat_dispatch_ceiling: # legacy compatibility alias for capped managed provider targets
37
- oat_workflow_mode: { OAT_WORKFLOW_MODE } # spec-driven | quick | import | lite | brief
37
+ oat_workflow_mode: { OAT_WORKFLOW_MODE } # spec-driven | quick | import | lite | brief | goal
38
38
  oat_workflow_origin: native # native | imported
39
39
  # oat_skill_gate_overrides: # optional; per-project posture for configured lifecycle gates
40
40
  # oat-project-implement: disabled # only the literal value `disabled`; absence means follow configuration