@open-agent-toolkit/cli 0.1.66 → 0.1.69

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 (37) hide show
  1. package/assets/agents/oat-reviewer.md +0 -1
  2. package/assets/docs/cli-utilities/workflow-gates.md +24 -5
  3. package/assets/docs/reference/cli-reference.md +1 -1
  4. package/assets/docs/workflows/projects/dispatch-ceiling.md +11 -3
  5. package/assets/docs/workflows/projects/pr-flow.md +12 -1
  6. package/assets/docs/workflows/projects/reviews.md +21 -1
  7. package/assets/public-package-versions.json +4 -4
  8. package/assets/skills/oat-project-autonomous/SKILL.md +1 -1
  9. package/assets/skills/oat-project-autonomous/references/gate-inventory.md +2 -2
  10. package/assets/skills/oat-project-complete/SKILL.md +20 -2
  11. package/assets/skills/oat-project-document/references/docs/autonomy-contract.md +2 -2
  12. package/assets/skills/oat-project-implement/SKILL.md +1 -1
  13. package/assets/skills/oat-project-implement/references/completion-and-closeout.md +12 -1
  14. package/assets/skills/oat-project-implement/references/dispatch-and-dry-run.md +24 -9
  15. package/assets/skills/oat-project-implement/references/docs/autonomy-contract.md +2 -2
  16. package/assets/skills/oat-project-implement/references/phase-execution.md +5 -2
  17. package/assets/skills/oat-project-next/SKILL.md +21 -6
  18. package/assets/skills/oat-project-plan/SKILL.md +6 -1
  19. package/assets/skills/oat-project-plan-writing/SKILL.md +19 -2
  20. package/assets/skills/oat-project-pr-final/SKILL.md +20 -5
  21. package/assets/skills/oat-project-pr-final/references/docs/autonomy-contract.md +2 -2
  22. package/assets/skills/oat-project-pr-progress/SKILL.md +18 -3
  23. package/assets/skills/oat-project-progress/SKILL.md +4 -1
  24. package/assets/skills/oat-project-quick-start/SKILL.md +6 -1
  25. package/assets/skills/oat-project-quick-start/references/docs/autonomy-contract.md +2 -2
  26. package/assets/skills/oat-project-review-provide/SKILL.md +7 -2
  27. package/assets/skills/oat-project-review-receive/SKILL.md +46 -18
  28. package/assets/skills/oat-project-review-receive-remote/SKILL.md +41 -8
  29. package/dist/commands/cleanup/project/project.utils.d.ts.map +1 -1
  30. package/dist/commands/cleanup/project/project.utils.js +19 -1
  31. package/dist/commands/gate/index.d.ts +2 -0
  32. package/dist/commands/gate/index.d.ts.map +1 -1
  33. package/dist/commands/gate/index.js +29 -1
  34. package/dist/commands/review/latest.d.ts +1 -0
  35. package/dist/commands/review/latest.d.ts.map +1 -1
  36. package/dist/commands/review/latest.js +96 -22
  37. package/package.json +2 -2
@@ -227,7 +227,7 @@ remains immutable baseline evidence for the original p01-t01 verification.
227
227
  | `oat-project-import-plan/SKILL.md` | `f7ca8635452f -> NG`; `c2e5fa410069 -> NG`; `655d61df0a8f -> NG`; `b137f73db20c -> IMPORT-01`; `45b699c1c0b5 -> IMPORT-01`; `ba6d120791c1 -> IMPORT-01`; `070ebc5259af -> IMPORT-03`; `c11552696e2e -> IMPORT-03`; `cfe661966baf -> IMPORT-04`; `baa91c0a0bf8 -> NG`; `e364e84b2702 -> NG`; `39031985a945 -> IMPORT-06`; `f106aa29a217 -> IMPORT-07`; `65038450aee3 -> IMPORT-07`; `bee4c4aa34c6 -> NG`; `3f0b53056edd -> IMPORT-09` |
228
228
  | `oat-project-implement/SKILL.md` | `c6732295bc8c -> NG`; `ffb3af0ba8ef -> NG`; `e0355c7a05e9 -> IMPLEMENT-11+IMPLEMENT-13+IMPLEMENT-16`; `6296f41ae11c -> NG`; `a167d03559fa -> NG`; `cf317c17c586 -> IMPLEMENT-01`; `8ce8a09feca4 -> NG` |
229
229
  | `oat-project-implement/references/completion-and-closeout.md` | `105600fbd045 -> IMPLEMENT-11`; `3e6055aede6c -> IMPLEMENT-11`; `0705f7533039 -> IMPLEMENT-11`; `0c39746f3cb5 -> IMPLEMENT-11`; `14d89fe39c8c -> IMPLEMENT-11`; `378a75543a72 -> IMPLEMENT-11`; `c7b25627e674 -> IMPLEMENT-11`; `51ef9a453323 -> IMPLEMENT-11`; `c67145e3fb00 -> IMPLEMENT-11`; `64fbeac64811 -> IMPLEMENT-11`; `19b13c17bddb -> NG`; `f7dab9c1f96c -> IMPLEMENT-12`; `c69c17a069a8 -> IMPLEMENT-14`; `a97fa5634a68 -> IMPLEMENT-14`; `3af58881811c -> IMPLEMENT-14`; `4203e1f49d0f -> IMPLEMENT-14`; `c3bd2458a3d3 -> IMPLEMENT-13`; `95b5eafc070d -> IMPLEMENT-13`; `25ecbe9c998b -> IMPLEMENT-13+IMPLEMENT-14+IMPLEMENT-15+IMPLEMENT-16`; `f6f24fd71da4 -> IMPLEMENT-13+IMPLEMENT-14+IMPLEMENT-15+IMPLEMENT-16`; `f18283bc1cf9 -> IMPLEMENT-13+IMPLEMENT-14+IMPLEMENT-15+IMPLEMENT-16`; `2c1ffc4a82dd -> IMPLEMENT-13+IMPLEMENT-14+IMPLEMENT-15+IMPLEMENT-16`; `3454a07aa843 -> IMPLEMENT-16`; `0d86e2098cfb -> IMPLEMENT-13+IMPLEMENT-14+IMPLEMENT-15+IMPLEMENT-16`; `d5fe597d266f -> IMPLEMENT-13+IMPLEMENT-14+IMPLEMENT-15+IMPLEMENT-16`; `55a152e944c1 -> IMPLEMENT-16`; `effac7cbd573 -> IMPLEMENT-13+IMPLEMENT-14+IMPLEMENT-15+IMPLEMENT-16`; `9d2a34d8b148 -> IMPLEMENT-13+IMPLEMENT-14+IMPLEMENT-15+IMPLEMENT-16`; `d27462aaed26 -> IMPLEMENT-13+IMPLEMENT-14+IMPLEMENT-15+IMPLEMENT-16`; `9d52ecb17268 -> IMPLEMENT-13+IMPLEMENT-14+IMPLEMENT-15+IMPLEMENT-16`; `5b91aabe3757 -> IMPLEMENT-13+IMPLEMENT-14+IMPLEMENT-15+IMPLEMENT-16`; `fd0ad919f702 -> IMPLEMENT-13+IMPLEMENT-14+IMPLEMENT-15+IMPLEMENT-16`; `63bf28df1474 -> IMPLEMENT-13+IMPLEMENT-14+IMPLEMENT-15+IMPLEMENT-16`; `a4ed471dbc78 -> IMPLEMENT-16`; `6b7a64cec6e5 -> IMPLEMENT-16`; `0a4fdba0ebc0 -> IMPLEMENT-13+IMPLEMENT-14+IMPLEMENT-15+IMPLEMENT-16`; `a5033c2aada5 -> IMPLEMENT-13+IMPLEMENT-14+IMPLEMENT-15+IMPLEMENT-16`; `e77609eddba0 -> IMPLEMENT-13+IMPLEMENT-14+IMPLEMENT-15+IMPLEMENT-16`; `351156e8dde4 -> IMPLEMENT-13+IMPLEMENT-14+IMPLEMENT-15+IMPLEMENT-16`; `51d45bd2bbd1 -> IMPLEMENT-16`; `f7796ffcc804 -> IMPLEMENT-16`; `990d730cb494 -> IMPLEMENT-16`; `6ed28bb7d384 -> IMPLEMENT-16`; `8b7d4b5bcf1b -> IMPLEMENT-16`; `88aad500e6e9 -> IMPLEMENT-16`; `877e3e3f9eda -> IMPLEMENT-16`; `fc03c97f834e -> IMPLEMENT-16`; `12939a3da5e0 -> IMPLEMENT-16`; `bdb418335a88 -> IMPLEMENT-16`; `fba97e596ebd -> IMPLEMENT-16`; `3d0b5e2f14f0 -> IMPLEMENT-17`; `f56a9ce88461 -> IMPLEMENT-17`; `9ba67b50d0ba -> IMPLEMENT-17`; `39ff911760af -> IMPLEMENT-17`; `5b560b5bd6e3 -> IMPLEMENT-17`; `fa21df5e5e01 -> IMPLEMENT-17`; `0fed77bec55e -> IMPLEMENT-17`; `6d81cfb0483f -> IMPLEMENT-17`; `bee4c4aa34c6 -> NG`; `3f0b53056edd -> IMPLEMENT-18` |
230
- | `oat-project-implement/references/dispatch-and-dry-run.md` | `21b85f5e4daa -> IMPLEMENT-08`; `74c92b32bb2a -> IMPLEMENT-08`; `8efd2d0517ab -> IMPLEMENT-09`; `461ed9b3e495 -> IMPLEMENT-09`; `b5ad64fd744d -> NG`; `14ce436cfffa -> NG`; `043ca36da3e2 -> NG`; `a23e45c1dc8d -> NG`; `498143bb41a7 -> NG`; `4fe3eb179023 -> NG`; `7f75485e5a33 -> NG`; `8ec3a96df029 -> NG`; `16c3f96e758d -> NG`; `5915c41fe058 -> NG`; `f51e43eeac56 -> NG`; `fd41c25623cb -> NG`; `58a932ed6453 -> NG`; `4718bd3ce12d -> NG`; `58c444a2126b -> NG` |
230
+ | `oat-project-implement/references/dispatch-and-dry-run.md` | `21b85f5e4daa -> IMPLEMENT-08`; `74c92b32bb2a -> IMPLEMENT-08`; `8efd2d0517ab -> IMPLEMENT-09`; `461ed9b3e495 -> IMPLEMENT-09`; `b5ad64fd744d -> NG`; `14ce436cfffa -> NG`; `043ca36da3e2 -> NG`; `a23e45c1dc8d -> NG`; `498143bb41a7 -> NG`; `4fe3eb179023 -> NG`; `7f75485e5a33 -> NG`; `8ec3a96df029 -> NG`; `16c3f96e758d -> NG`; `5915c41fe058 -> NG`; `f51e43eeac56 -> NG`; `fd41c25623cb -> NG`; `58a932ed6453 -> NG`; `4718bd3ce12d -> NG`; `58c444a2126b -> NG`; `2df3adae4120 -> NG`; `e75df892b55c -> NG` |
231
231
  | `oat-project-implement/references/docs/autonomy-contract.md` | `* -> NG` |
232
232
  | `oat-project-implement/references/phase-execution.md` | `27737e814790 -> NG`; `6dda2b8e62e2 -> IMPLEMENT-10`; `b3197086bb1e -> IMPLEMENT-10` |
233
233
  | `oat-project-implement/references/plan-and-resume.md` | `413829d31e32 -> IMPLEMENT-02`; `c7706cd8ad09 -> IMPLEMENT-03`; `a80a948df658 -> IMPLEMENT-03`; `b7ea139780ec -> IMPLEMENT-03+IMPLEMENT-04`; `8d438f2180ba -> IMPLEMENT-03`; `9e72e0518cda -> IMPLEMENT-03`; `3e177a1021e6 -> IMPLEMENT-03+IMPLEMENT-04`; `b59fc9eb9ce3 -> IMPLEMENT-03`; `a2b1d6855283 -> IMPLEMENT-03`; `44351a32e52a -> IMPLEMENT-03`; `b98b022f5523 -> IMPLEMENT-03`; `e9f5b949e214 -> IMPLEMENT-03`; `316fb6d9e980 -> IMPLEMENT-03`; `8b25a2c5c548 -> IMPLEMENT-03`; `1a59b1c0e705 -> IMPLEMENT-03`; `466cd562fc52 -> IMPLEMENT-03`; `083d896978d5 -> IMPLEMENT-03`; `f4ab11c13ae9 -> IMPLEMENT-03`; `7dc17ffcc1c4 -> IMPLEMENT-03`; `f731a90adabd -> IMPLEMENT-04`; `886ac01e7aa9 -> IMPLEMENT-04`; `b715db67df0c -> IMPLEMENT-04`; `2d9f26a539f3 -> IMPLEMENT-10`; `28384dee114f -> IMPLEMENT-05`; `f2591a4978b4 -> NG`; `8290823080b5 -> IMPLEMENT-06`; `f75789bf6c8e -> IMPLEMENT-07` |
@@ -238,7 +238,7 @@ remains immutable baseline evidence for the original p01-t01 verification.
238
238
  | `oat-project-pr-final/references/docs/autonomy-contract.md` | `* -> NG` |
239
239
  | `oat-project-complete/SKILL.md` | `6ed459f9e462 -> NG`; `a167d03559fa -> NG`; `79c2eeed668c -> COMPLETE-01`; `2c1514b9d9af -> COMPLETE-01`; `31c750b4fea7 -> COMPLETE-01`; `cfba413b1293 -> COMPLETE-01`; `ffcdc9d576c0 -> COMPLETE-01`; `7fcfce0423ac -> COMPLETE-01`; `9497d9f94eed -> COMPLETE-01`; `7b59c728d3fb -> COMPLETE-01`; `48e10a9636fe -> COMPLETE-01`; `c0dad37fc166 -> COMPLETE-01`; `aa9a36243ec1 -> COMPLETE-01`; `7bcbf58b54e9 -> NG`; `4c7f88a7f942 -> COMPLETE-02`; `6a1a95acc8cc -> COMPLETE-02`; `3b559956b3eb -> COMPLETE-03`; `14d161cdf99b -> COMPLETE-03`; `12f7c30a54c8 -> NG`; `fffe5eea5ebd -> NG` |
240
240
  | `oat-project-review-provide/SKILL.md` | `1f4b981cac8b -> NG`; `adaeca152bb2 -> NG`; `2f7c201c3c06 -> NG`; `88f79700afdc -> NG`; `655d61df0a8f -> NG`; `efafde9ef5a0 -> NG`; `d2a3861d6323 -> REVIEWPROVIDE-02`; `65f5b9cf49cd -> REVIEWPROVIDE-04`; `962cb38d246a -> REVIEWPROVIDE-04`; `1a568483ba0b -> REVIEWPROVIDE-04`; `610e27edfe85 -> REVIEWPROVIDE-04`; `fab62c510bd0 -> REVIEWPROVIDE-05`; `a9f30853c867 -> REVIEWPROVIDE-05`; `0929c916fc20 -> REVIEWPROVIDE-05`; `f9a37c63afab -> REVIEWPROVIDE-05`; `687bb9368f92 -> REVIEWPROVIDE-05`; `bb0096e95c47 -> REVIEWPROVIDE-06`; `55f6357a987d -> REVIEWPROVIDE-06`; `1bee61f8531c -> REVIEWPROVIDE-07`; `3d35091607a1 -> REVIEWPROVIDE-08`; `fb40c4341c4c -> NG`; `b22d16885150 -> NG`; `d2b25906242e -> REVIEWPROVIDE-08`; `fd8ebf72b3c4 -> NG`; `fcb9de611ff3 -> NG`; `d2a838dfb18d -> NG`; `c3d50ea7cf69 -> NG`; `09b1b8dd445c -> NG`; `7acc8f3718d2 -> REVIEWPROVIDE-09`; `b2fa883fc4a2 -> NG`; `fe4421531b4c -> NG` |
241
- | `oat-project-review-receive/SKILL.md` | `9b8a3743d626 -> NG`; `df49c8c6f192 -> NG`; `4ee8730382d3 -> NG`; `655d61df0a8f -> NG`; `765f897d67ac -> NG`; `53b58d16dd32 -> NG`; `fb8755a3bdf4 -> NG`; `c8ab5dd90075 -> NG`; `1f7dd98dff2f -> NG`; `56f78c6740e6 -> NG`; `76f5fb5a88cd -> NG`; `085abfa3599f -> REVIEWRECEIVE-01`; `3ad3aadb8c60 -> NG`; `a7d114059bb6 -> NG`; `ac88cfaa83d9 -> NG`; `3f758313fedb -> REVIEWRECEIVE-08`; `f31f07284718 -> REVIEWRECEIVE-02`; `aba178a21441 -> REVIEWRECEIVE-04`; `a37e601cd731 -> REVIEWRECEIVE-05`; `20e05e1a4381 -> REVIEWRECEIVE-06`; `90001dadf75f -> REVIEWRECEIVE-07`; `f8fd58180ecf -> NG`; `c3abcdc02d9f -> NG` |
241
+ | `oat-project-review-receive/SKILL.md` | `9b8a3743d626 -> NG`; `df49c8c6f192 -> NG`; `4ee8730382d3 -> NG`; `655d61df0a8f -> NG`; `765f897d67ac -> NG`; `53b58d16dd32 -> NG`; `fb8755a3bdf4 -> NG`; `c8ab5dd90075 -> NG`; `1f7dd98dff2f -> NG`; `56f78c6740e6 -> NG`; `76f5fb5a88cd -> NG`; `085abfa3599f -> REVIEWRECEIVE-01`; `3ad3aadb8c60 -> NG`; `a7d114059bb6 -> NG`; `ac88cfaa83d9 -> NG`; `3f758313fedb -> REVIEWRECEIVE-08`; `f31f07284718 -> REVIEWRECEIVE-02`; `aba178a21441 -> REVIEWRECEIVE-04`; `a37e601cd731 -> REVIEWRECEIVE-05`; `20e05e1a4381 -> REVIEWRECEIVE-06`; `90001dadf75f -> REVIEWRECEIVE-07`; `f8fd58180ecf -> NG`; `c3abcdc02d9f -> NG`; `f2ebdd6abb9b -> NG` |
242
242
  | `oat-dispatch-subagents/SKILL.md` | `cb4f86157fd6 -> DISPATCH-01`; `f165b1626192 -> DISPATCH-01`; `7ed5e2b1eb71 -> PDISPATCH-01`; `11c72bcdebad -> DISPATCH-02`; `0834ee701e12 -> DISPATCH-02`; `7fda54e1d519 -> PDISPATCH-01` |
243
243
  | `oat-dispatch-subagents/references/provider-claude.md` | `fbe3a21e9533 -> NG` |
244
244
  | `oat-dispatch-subagents/references/provider-codex.md` | `95b0f82018c7 -> NG` |
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: oat-project-review-provide
3
- version: 1.3.16
3
+ version: 1.3.17
4
4
  description: Use when the user explicitly asks to review an OAT project — e.g. "review project", "review the project", "run project review", or confirms a previously offered review. Do NOT auto-invoke on completed work alone. Resolves a project review scope and offers before running.
5
5
  disable-model-invocation: false
6
6
  user-invocable: true
@@ -842,7 +842,7 @@ Run the `oat-project-review-receive` skill to convert findings into plan tasks.
842
842
 
843
843
  After review artifact is written, update `plan.md` `## Reviews` table _if plan.md exists_.
844
844
 
845
- Update or add a row matching `{scope}`:
845
+ Record this artifact as one append-ordered review event:
846
846
 
847
847
  - `Scope`: `{scope}` (examples: `p02`, `final`, `spec`, `design`)
848
848
  - Phase-range examples such as `p02-p03` are valid code-review scopes and should be preserved exactly.
@@ -851,6 +851,11 @@ Update or add a row matching `{scope}`:
851
851
  - `Date`: `{today}`
852
852
  - `Artifact`: `reviews/{filename}.md`
853
853
 
854
+ For the first event with this Scope + Type, claim an unbound `pending`
855
+ placeholder only when its Artifact is `-`. Otherwise append a new row for the
856
+ new artifact. Never replace or regress a bound event merely because Scope +
857
+ Type matches; distinct artifact filenames are distinct review events.
858
+
854
859
  If plan.md is missing (e.g., spec/design review before planning), skip this update and rely on the review artifact + next-step routing.
855
860
 
856
861
  ### Step 9.5: Commit Review Bookkeeping Atomically (Required)
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: oat-project-review-receive
3
- version: 1.5.7
3
+ version: 1.5.9
4
4
  description: Use when the user explicitly asks to receive review findings for an OAT project — e.g. "receive review", "process review", "process the project review", or confirms a previously offered review-receive step. Do NOT auto-invoke merely because a review file exists. Resolves the latest review and offers before acting.
5
5
  disable-model-invocation: false
6
6
  user-invocable: true
@@ -102,7 +102,7 @@ PROJECTS_ROOT="${PROJECTS_ROOT%/}"
102
102
 
103
103
  ```bash
104
104
  if [ -n "${PROJECT_PATH:-}" ] && [ -d "$PROJECT_PATH" ]; then
105
- oat review latest --project "$PROJECT_PATH" --json
105
+ oat review latest --project "$PROJECT_PATH" --actionable-project --json
106
106
  else
107
107
  oat review latest --json
108
108
  fi
@@ -110,11 +110,13 @@ fi
110
110
 
111
111
  Selection rules:
112
112
 
113
- - Use `oat review latest` as the first-choice resolver. It scans project reviews (`reviews/` and `reviews/archived/`) plus ad-hoc review locations and orders candidates by `oat_generated_at` frontmatter rather than filesystem mtime. Review artifacts carry a seconds-precision `oat_generated_at` and a matching timestamped filename, so same-scope same-day re-gates order deterministically and the newest round wins — never assume the plain `<scope>-review-<date>.md` name is current.
113
+ - With a valid project, use the `--actionable-project` path first. It resolves only an active/actionable project review from the top-level `reviews/` directory, so newer historical artifacts in `reviews/archived/` cannot strand an older active event.
114
+ - If the actionable-project result has `path: null`, run `oat review latest --json` without `--actionable-project` to discover the latest ad-hoc target or report project history. The default resolver intentionally preserves all-history ordering across project (`reviews/` and `reviews/archived/`) and ad-hoc locations.
115
+ - Both resolver paths order candidates by `oat_generated_at` frontmatter rather than filesystem mtime. Review artifacts carry a seconds-precision `oat_generated_at` and a matching timestamped filename, so same-scope same-day re-gates order deterministically and the newest round wins — never assume the plain `<scope>-review-<date>.md` name is current.
114
116
  - Read the JSON result:
115
117
  - `path: null` means no review target was found.
116
118
  - `kind: "project"` and `actionable: true` means this skill can process the target when the path is an active top-level project review.
117
- - `archived: true` or `actionable: false` means the target is historical/non-actionable for project review-receive.
119
+ - An `archived: true` or `actionable: false` result from the all-history fallback means no active project review was resolved and the selected result is historical/non-actionable for project review-receive.
118
120
  - `kind: "adhoc"` means route to `oat-review-receive` after offering that handoff to the user.
119
121
  - Only process active project review artifacts in the top level of `"$PROJECT_PATH/reviews/"`.
120
122
  - Treat archived project artifacts as history only; do not receive them automatically. If `oat review latest` returns an archived project review, tell the user no active project review is waiting and offer to run `oat-project-review-provide`.
@@ -140,11 +142,32 @@ Use this fallback only for active project reviews. It cannot discover ad-hoc rev
140
142
  Derive archive bookkeeping before making lifecycle edits:
141
143
 
142
144
  ```bash
143
- REVIEW_FILENAME=$(basename "$REVIEW_PATH")
145
+ SOURCE_REVIEW_FILENAME=$(basename "$REVIEW_PATH")
146
+ REVIEW_FILENAME="$SOURCE_REVIEW_FILENAME"
144
147
  ARCHIVED_REVIEW_DIR="$PROJECT_PATH/reviews/archived"
145
148
  ARCHIVED_REVIEW_PATH="$ARCHIVED_REVIEW_DIR/$REVIEW_FILENAME"
149
+
150
+ if [[ -e "$ARCHIVED_REVIEW_PATH" ]]; then
151
+ REVIEW_STEM="${SOURCE_REVIEW_FILENAME%.md}"
152
+ ARCHIVE_TIMESTAMP=$(date -u +%Y-%m-%dT%H%M%SZ)
153
+ REVIEW_FILENAME="${REVIEW_STEM}-${ARCHIVE_TIMESTAMP}.md"
154
+ ARCHIVED_REVIEW_PATH="$ARCHIVED_REVIEW_DIR/$REVIEW_FILENAME"
155
+ ARCHIVE_COLLISION_INDEX=2
156
+
157
+ while [[ -e "$ARCHIVED_REVIEW_PATH" ]]; do
158
+ REVIEW_FILENAME="${REVIEW_STEM}-${ARCHIVE_TIMESTAMP}-${ARCHIVE_COLLISION_INDEX}.md"
159
+ ARCHIVED_REVIEW_PATH="$ARCHIVED_REVIEW_DIR/$REVIEW_FILENAME"
160
+ ARCHIVE_COLLISION_INDEX=$((ARCHIVE_COLLISION_INDEX + 1))
161
+ done
162
+ fi
146
163
  ```
147
164
 
165
+ `SOURCE_REVIEW_FILENAME` identifies the selected active event before archival.
166
+ `REVIEW_FILENAME` and `ARCHIVED_REVIEW_PATH` are the collision-free final
167
+ identity and destination. Resolve them here, before writing plan,
168
+ implementation, or artifact-review references. Never choose a different
169
+ basename later in either receive path.
170
+
148
171
  ### Step 2: Parse Findings into Buckets
149
172
 
150
173
  Extract findings from the review artifact and categorize:
@@ -382,7 +405,9 @@ Add new tasks to plan.md in the target phase. When adding or editing tasks, pres
382
405
 
383
406
  **Review-fix bookkeeping (required):**
384
407
  - When you add review-generated fix tasks:
385
- - Update the relevant Reviews table row status to `fixes_added` (work queued) and set the Date + Artifact.
408
+ - Locate the Reviews event matching the selected review's Scope, Type, and `SOURCE_REVIEW_FILENAME`, then update it to `fixes_added` (work queued), set the Date, and replace its Artifact with `reviews/archived/$REVIEW_FILENAME`.
409
+ - The written `REVIEW_FILENAME` becomes the event's artifact filename and identity for every later mutation; use the already-resolved final basename in every plan and implementation reference.
410
+ - Never select a row by scope alone or move an event status backward. If the exact bound event is missing, stop and reconcile the ledger instead of mutating another event.
386
411
  - Update `## Implementation Complete` totals (phase counts + total task count) so downstream PR/review summaries don’t go stale.
387
412
  - If the plan includes any phase rollups that reference task counts, update those too.
388
413
 
@@ -399,10 +424,11 @@ Add new tasks to plan.md in the target phase. When adding or editing tasks, pres
399
424
  **Update Reviews section:**
400
425
  ```markdown
401
426
  ## Reviews
402
- - Update or add a row for `{scope}` in the Reviews table:
427
+ - Find the existing event by `{scope}`, review Type, and
428
+ `$SOURCE_REVIEW_FILENAME`, then update only that row:
403
429
  - Status: `fixes_added` (if tasks were added) or `passed` (if no Critical/Important/Medium and no unresolved final-scope gates)
404
430
  - Date: `{today}`
405
- - Artifact: `reviews/archived/{filename}.md`
431
+ - Artifact: `reviews/archived/$REVIEW_FILENAME`
406
432
  ````
407
433
 
408
434
  **Status semantics (v1):**
@@ -410,6 +436,7 @@ Add new tasks to plan.md in the target phase. When adding or editing tasks, pres
410
436
  - `fixes_added`: fix tasks were created and added to the plan
411
437
  - `fixes_completed`: fix tasks implemented, awaiting re-review
412
438
  - `passed`: re-review completed and recorded as passing (no unresolved Critical/Important/Medium, and all final-scope gates satisfied: deferred-medium + minor disposition)
439
+ - Status changes are monotonic. Never move an event status backward, replace an earlier event, or update a different event that happens to share the same scope/type.
413
440
 
414
441
  ### Step 7: Update Implementation.md
415
442
 
@@ -419,7 +446,7 @@ Add a note to implementation.md:
419
446
  ### Review Received: {scope}
420
447
 
421
448
  **Date:** {today}
422
- **Review artifact:** reviews/archived/{filename}.md
449
+ **Review artifact:** reviews/archived/$REVIEW_FILENAME
423
450
 
424
451
  **Findings:**
425
452
 
@@ -438,7 +465,7 @@ Add a note to implementation.md:
438
465
 
439
466
  After the fix tasks are complete:
440
467
 
441
- - Update the review row status to `fixes_completed`
468
+ - Update this same artifact-identified review event to `fixes_completed`
442
469
  - Re-run `oat-project-review-provide {type} {scope}` then `oat-project-review-receive` to reach `passed`
443
470
  ```
444
471
 
@@ -468,8 +495,8 @@ mv "$REVIEW_PATH" "$ARCHIVED_REVIEW_PATH"
468
495
 
469
496
  Rules:
470
497
 
471
- - Perform the move only after all written references have been updated to `reviews/archived/{filename}.md`.
472
- - If `"$ARCHIVED_REVIEW_PATH"` already exists, append a timestamp suffix before moving so history is preserved.
498
+ - Perform the move only after all written references and event identity have been updated to `reviews/archived/$REVIEW_FILENAME`.
499
+ - Use the `REVIEW_FILENAME` and `ARCHIVED_REVIEW_PATH` resolved in Step 1. Do not rename or re-resolve the destination here.
473
500
  - Report the archived location in the final summary.
474
501
 
475
502
  ### Step 7.6: Commit Review Bookkeeping (Required)
@@ -647,8 +674,9 @@ mkdir -p "$ARCHIVED_REVIEW_DIR"
647
674
  mv "$REVIEW_PATH" "$ARCHIVED_REVIEW_PATH"
648
675
  ```
649
676
 
650
- - Perform the move only after all artifact edits are applied and any written references point to `reviews/archived/{filename}.md`.
651
- - If `"$ARCHIVED_REVIEW_PATH"` already exists, append a timestamp suffix before moving so history is preserved.
677
+ - Before the move, use the Step 1 `REVIEW_FILENAME` for every artifact-review reference or event identity written by the approved edits.
678
+ - Perform the move only after all artifact edits are applied and every written reference points to `reviews/archived/$REVIEW_FILENAME`.
679
+ - Use the Step 1 `ARCHIVED_REVIEW_PATH` unchanged. Do not rename or re-resolve the destination here.
652
680
 
653
681
  **Then route:**
654
682
 
@@ -662,14 +690,14 @@ mv "$REVIEW_PATH" "$ARCHIVED_REVIEW_PATH"
662
690
  ```
663
691
  Review received for {project-name}.
664
692
 
665
- Review: {review_filename}
693
+ Review: $REVIEW_FILENAME
666
694
  Scope: {scope}
667
695
  Findings: {N} critical, {N} important, {N} medium, {N} minor
668
696
 
669
697
  Actions taken:
670
698
  - Added {N} fix tasks to plan.md ({task_ids})
671
699
  - Updated implementation.md with review notes
672
- - Archived review artifact to `reviews/archived/{filename}.md`
700
+ - Archived review artifact to `reviews/archived/$REVIEW_FILENAME`
673
701
  - Deferred/accepted Medium findings: {N}
674
702
  - Minor findings dispositioned: {N} converted (default), {N} deferred-with-rationale (explicit user decision required for final scope)
675
703
  - Finding disposition map: {ID -> converted|deferred|accepted + rationale summary}
@@ -684,13 +712,13 @@ For `artifact` reviews, summarize instead:
684
712
  ```
685
713
  Review received for {project-name}.
686
714
 
687
- Review: {review_filename}
715
+ Review: $REVIEW_FILENAME
688
716
  Scope: {scope}
689
717
  Findings: {N} critical, {N} important, {N} medium, {N} minor
690
718
 
691
719
  Actions taken:
692
720
  - Applied {N} artifact edits
693
- - Archived review artifact to `reviews/archived/{filename}.md`
721
+ - Archived review artifact to `reviews/archived/$REVIEW_FILENAME`
694
722
  - No plan tasks created
695
723
  - Finding disposition map: {ID -> resolve_in_artifact|rejected_with_rationale|needs_user_direction}
696
724
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: oat-project-review-receive-remote
3
- version: 1.4.0
3
+ version: 1.4.2
4
4
  description: Use when processing GitHub PR review comments within project context. Fetches PR comments, creates plan tasks, and updates project artifacts.
5
5
  disable-model-invocation: true
6
6
  user-invocable: true
@@ -117,9 +117,22 @@ npx agent-reviews --json --unresolved --pr <N>
117
117
 
118
118
  If no unresolved comments:
119
119
 
120
- - Report clean status.
121
- - Update `plan.md` review row for scoped entry to `passed` when applicable.
122
- - Stop.
120
+ 1. Create a UTC timestamp and event-distinct filename:
121
+ `reviews/archived/remote-pr-<N>-review-YYYY-MM-DDTHHMMSSZ.md`.
122
+ 2. Ensure `reviews/archived/` exists, then write that artifact with the PR
123
+ number, fetch timestamp, remote scope/type, and a zero-unresolved-findings
124
+ result. A clean remote review is consumed as it is recorded, so it must not
125
+ remain in top-level `reviews/`.
126
+ 3. Record the clean result as a `passed` Reviews event whose event identity
127
+ combines `Scope`, `Type`, and artifact filename:
128
+ - Claim only an unbound `pending` placeholder with matching Scope + Type and
129
+ Artifact `-`; otherwise append a distinct row.
130
+ - Set Date and Artifact to this clean event. Advance only this event and
131
+ never mutate another row by scope alone.
132
+ 4. Commit `plan.md` and the clean review artifact atomically with
133
+ `chore(oat): record clean remote review (pr-#<N>)`. Do not stop with
134
+ uncommitted bookkeeping.
135
+ 5. Report clean status and stop.
123
136
 
124
137
  ### Step 3: Classify and Normalize Findings
125
138
 
@@ -162,14 +175,34 @@ For each converted finding:
162
175
 
163
176
  ### Step 6: Update Project Artifacts
164
177
 
178
+ Before changing the ledger, write an event-distinct review artifact containing
179
+ the PR number, fetch timestamp, normalized findings, and dispositions:
180
+ `reviews/archived/remote-pr-<N>-review-YYYY-MM-DDTHHMMSSZ.md`. Remote receive
181
+ fully dispositions the event as `passed` or `fixes_added`, so the artifact is
182
+ consumed immediately and belongs in `reviews/archived/`, not top-level
183
+ `reviews/`. Each fetch/triage cycle gets a new timestamped artifact filename,
184
+ even when the PR and lifecycle scope are unchanged.
185
+
186
+ ```bash
187
+ REMOTE_REVIEW_TIMESTAMP=$(date -u +%Y-%m-%dT%H%M%SZ)
188
+ REMOTE_REVIEW_FILENAME="remote-pr-${PR_NUMBER}-review-${REMOTE_REVIEW_TIMESTAMP}.md"
189
+ mkdir -p "$PROJECT_PATH/reviews/archived"
190
+ REMOTE_REVIEW_PATH="$PROJECT_PATH/reviews/archived/$REMOTE_REVIEW_FILENAME"
191
+ ```
192
+
165
193
  Update `plan.md`:
166
194
 
167
195
  - Append inserted review-fix task sections in correct phase order.
168
- - Update `## Reviews` row for remote scope:
196
+ - Record an append-ordered `## Reviews` event for the remote scope:
169
197
  - status `fixes_added` when tasks were added
170
198
  - status `passed` when no actionable findings remain
171
199
  - date set to today
172
- - artifact `github-pr #<N>`
200
+ - artifact `reviews/archived/remote-pr-<N>-review-YYYY-MM-DDTHHMMSSZ.md`
201
+ - Claim an unbound `pending` placeholder only when its Scope + Type matches and
202
+ its Artifact is `-`; otherwise append the event. Later mutations select it by
203
+ Scope + Type + artifact filename, never by scope or `github-pr #<N>` alone.
204
+ - Never move an event status backward or overwrite an earlier event from the
205
+ same PR.
173
206
  - Update `## Implementation Complete` totals.
174
207
 
175
208
  Update `implementation.md`:
@@ -192,12 +225,12 @@ Update `state.md`:
192
225
 
193
226
  ### Step 6.5: Commit Review Bookkeeping (Required)
194
227
 
195
- **CRITICAL — DO NOT SKIP.** This skill modifies `plan.md`, `implementation.md`, and `state.md` when processing GitHub PR comments. When it runs in a separate agent session (subagent, fresh session, or different conversation), uncommitted bookkeeping updates cause state drift for the original agent. The commit below is the safety net.
228
+ **CRITICAL — DO NOT SKIP.** This skill modifies the event-distinct review artifact, `plan.md`, `implementation.md`, and `state.md` when processing GitHub PR comments. When it runs in a separate agent session (subagent, fresh session, or different conversation), uncommitted bookkeeping updates cause state drift for the original agent. The commit below is the safety net.
196
229
 
197
230
  Commit all modified OAT tracking files atomically:
198
231
 
199
232
  ```bash
200
- git add "$PROJECT_PATH/plan.md" "$PROJECT_PATH/implementation.md" "$PROJECT_PATH/state.md"
233
+ git add "$PROJECT_PATH/plan.md" "$PROJECT_PATH/implementation.md" "$PROJECT_PATH/state.md" "$REMOTE_REVIEW_PATH"
201
234
  git diff --cached --quiet || git commit -m "chore(oat): record remote review findings and add fix tasks (pr-#$PR_NUMBER)"
202
235
  ```
203
236
 
@@ -1 +1 @@
1
- {"version":3,"file":"project.utils.d.ts","sourceRoot":"","sources":["../../../../src/commands/cleanup/project/project.utils.ts"],"names":[],"mappings":"AAQA,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,GAAG,OAAO,CAG1E;AAED,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,GAAG,OAAO,CAG1E;AAED,wBAAgB,wBAAwB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAErE;AAED,wBAAgB,wBAAwB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAEtE;AAED,wBAAgB,6BAA6B,CAC3C,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,GACnB,OAAO,CAKT;AAED,wBAAgB,0BAA0B,CACxC,eAAe,EAAE,MAAM,EACvB,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,MAAM,GACZ,MAAM,CAMR;AAED,wBAAgB,kCAAkC,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAkB1E"}
1
+ {"version":3,"file":"project.utils.d.ts","sourceRoot":"","sources":["../../../../src/commands/cleanup/project/project.utils.ts"],"names":[],"mappings":"AAQA,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,GAAG,OAAO,CAG1E;AAED,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,GAAG,OAAO,CAG1E;AAED,wBAAgB,wBAAwB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CA8BrE;AAED,wBAAgB,wBAAwB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAEtE;AAED,wBAAgB,6BAA6B,CAC3C,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,GACnB,OAAO,CAKT;AAED,wBAAgB,0BAA0B,CACxC,eAAe,EAAE,MAAM,EACvB,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,MAAM,GACZ,MAAM,CAMR;AAED,wBAAgB,kCAAkC,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAkB1E"}
@@ -14,7 +14,25 @@ export function projectNeedsStateFile(fileNames) {
14
14
  return !files.has('state.md') && hasLifecycleArtifacts(files);
15
15
  }
16
16
  export function projectPlanMarksComplete(planContent) {
17
- return /\|\s*final\s*\|\s*code\s*\|\s*passed\s*\|/i.test(planContent);
17
+ const reviewsHeading = /^## Reviews[ \t]*\r?$/m.exec(planContent);
18
+ if (!reviewsHeading) {
19
+ return false;
20
+ }
21
+ const afterHeading = planContent.slice(reviewsHeading.index + reviewsHeading[0].length);
22
+ const nextSectionIndex = afterHeading.search(/^##(?!#)[ \t]+\S.*\r?$/m);
23
+ const reviewsSection = nextSectionIndex === -1
24
+ ? afterHeading
25
+ : afterHeading.slice(0, nextSectionIndex);
26
+ const finalCodeEvents = reviewsSection
27
+ .split('\n')
28
+ .filter((line) => line.trim().startsWith('|'))
29
+ .map((line) => line
30
+ .split('|')
31
+ .slice(1, -1)
32
+ .map((cell) => cell.trim()))
33
+ .filter(([scope, type]) => scope?.toLowerCase() === 'final' && type?.toLowerCase() === 'code');
34
+ const latestFinalCodeEvent = finalCodeEvents[finalCodeEvents.length - 1];
35
+ return latestFinalCodeEvent?.[2]?.toLowerCase() === 'passed';
18
36
  }
19
37
  export function stateLifecycleIsComplete(stateContent) {
20
38
  return /^oat_lifecycle:\s*complete$/m.test(stateContent);
@@ -32,6 +32,8 @@ interface ProcessRunOptions {
32
32
  }
33
33
  interface ProcessRunResult {
34
34
  exitCode: number;
35
+ stderrBytes: number;
36
+ stdoutBytes: number;
35
37
  timedOut?: boolean;
36
38
  }
37
39
  interface GateLivenessSnapshot {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/gate/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,aAAa,EACnB,MAAM,sBAAsB,CAAC;AAQ9B,OAAO,EAQL,KAAK,UAAU,EAIf,KAAK,SAAS,EACd,KAAK,cAAc,EACnB,KAAK,UAAU,EAEhB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAKL,KAAK,cAAc,EACpB,MAAM,iBAAiB,CAAC;AAWzB,OAAO,EAEL,KAAK,WAAW,EACjB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EAExB,MAAM,gCAAgC,CAAC;AAExC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,OAAO,EACL,sBAAsB,EAIvB,MAAM,kBAAkB,CAAC;AAE1B,UAAU,uBAAuB;IAC/B,mBAAmB,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,cAAc,CAAC;IAChE,kBAAkB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACrD,aAAa,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,SAAS,CAAC,CAAC;IACxD,cAAc,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACvE,kBAAkB,EAAE,CAAC,QAAQ,E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,mBAAmB,GAAG,SAAS,CAAC;CAC5D;AAED,UAAU,qBAAqB;IAC7B,KAAK,EAAE,kBAAkB,CAAC;IAC1B,QAAQ,EAAE,qBAAqB,CAAC;IAChC,QAAQ,EAAE;QACR,KAAK,EAAE,MAAM,CAAC;QACd,UAAU,EAAE,kBAAkB,CAAC;QAC/B,UAAU,EAAE,kBAAkB,CAAC;QAC/B,MAAM,EAAE,WAAW,CAAC;QACpB,MAAM,EAAE,oBAAoB,CAAC,QAAQ,CAAC,CAAC;QACvC,aAAa,EAAE,WAAW,EAAE,CAAC;QAC7B,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;QAC9B,sBAAsB,CAAC,EAAE,MAAM,CAAC;KACjC,CAAC;IACF,QAAQ,EAAE;QACR,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,EAAE,MAAM,CAAC;QAChB,MAAM,EAAE,WAAW,CAAC;QACpB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAqmCD,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,EAC9C,cAAc,EAAE,MAAM,EACtB,KAAK,EAAE,kBAAkB,EACzB,gBAAgB,CAAC,EAAE,oBAAoB,GACtC,kBAAkB,GAAG,IAAI,CAS3B;AAmjDD,wBAAgB,iBAAiB,CAC/B,SAAS,GAAE,OAAO,CAAC,uBAAuB,CAAM,GAC/C,OAAO,CAwMT"}
@@ -201,6 +201,8 @@ async function runChildProcess(command, args, options) {
201
201
  return new Promise((resolve, reject) => {
202
202
  let timedOut = false;
203
203
  let killTimeout = null;
204
+ let stderrBytes = 0;
205
+ let stdoutBytes = 0;
204
206
  const startedAt = Date.now();
205
207
  let lastActivityAt = startedAt;
206
208
  const child = spawn(command, args, {
@@ -214,10 +216,12 @@ async function runChildProcess(command, args, options) {
214
216
  lastActivityAt = Date.now();
215
217
  };
216
218
  child.stdout?.on('data', (chunk) => {
219
+ stdoutBytes += chunk.byteLength;
217
220
  recordActivity();
218
221
  process.stdout.write(chunk);
219
222
  });
220
223
  child.stderr?.on('data', (chunk) => {
224
+ stderrBytes += chunk.byteLength;
221
225
  recordActivity();
222
226
  process.stderr.write(chunk);
223
227
  });
@@ -261,6 +265,8 @@ async function runChildProcess(command, args, options) {
261
265
  }
262
266
  resolve({
263
267
  exitCode: timedOut ? 124 : (code ?? 1),
268
+ stderrBytes,
269
+ stdoutBytes,
264
270
  ...(timedOut ? { timedOut: true } : {}),
265
271
  });
266
272
  });
@@ -1298,6 +1304,9 @@ function writeReviewGateExecutionFailure(context, payload) {
1298
1304
  ...(payload.timeoutMs !== undefined
1299
1305
  ? { timeoutMs: payload.timeoutMs }
1300
1306
  : {}),
1307
+ ...(payload.noOutputProduced !== undefined
1308
+ ? { noOutputProduced: payload.noOutputProduced }
1309
+ : {}),
1301
1310
  message,
1302
1311
  });
1303
1312
  return;
@@ -1574,7 +1583,7 @@ async function runReviewGate(prompt, options, context, dependencies) {
1574
1583
  ]);
1575
1584
  const childResult = await executeTarget(selected, [reviewPrompt], context, dependencies);
1576
1585
  const childExitCode = childResult.exitCode;
1577
- if (childExitCode !== 0) {
1586
+ if (childExitCode !== 0 && !childResult.timedOut) {
1578
1587
  writeReviewGateExecutionFailure(context, {
1579
1588
  runId,
1580
1589
  target: selected.id,
@@ -1599,6 +1608,24 @@ async function runReviewGate(prompt, options, context, dependencies) {
1599
1608
  before,
1600
1609
  after,
1601
1610
  });
1611
+ if (childResult.timedOut &&
1612
+ artifactResolution.matchingArtifactPaths.length === 0 &&
1613
+ !artifactResolution.diagnosticArtifact) {
1614
+ writeReviewGateExecutionFailure(context, {
1615
+ runId,
1616
+ target: selected.id,
1617
+ project: projectPath,
1618
+ projectResolutionSource: reviewProject.source,
1619
+ exitCode: childExitCode,
1620
+ timedOut: true,
1621
+ timeoutMs: resolveGateExecTimeoutMs(dependencies.processEnv),
1622
+ noOutputProduced: childResult.stdoutBytes + childResult.stderrBytes === 0,
1623
+ gateInvocation,
1624
+ dispatchReport,
1625
+ });
1626
+ process.exitCode = childExitCode;
1627
+ return;
1628
+ }
1602
1629
  const initialTargetCorroboration = corroborateReviewTarget({
1603
1630
  repoRoot,
1604
1631
  reviewProject,
@@ -1766,6 +1793,7 @@ async function runReviewGate(prompt, options, context, dependencies) {
1766
1793
  gateInvocation,
1767
1794
  dispatchReport,
1768
1795
  corroboration,
1796
+ ...(childResult.timedOut ? { lateCompletion: true } : {}),
1769
1797
  });
1770
1798
  process.exitCode = blocking ? 1 : 0;
1771
1799
  }
@@ -13,6 +13,7 @@ export interface LatestReview {
13
13
  export interface FindLatestReviewOptions {
14
14
  repoRoot: string;
15
15
  projectPath?: string | null;
16
+ actionableProjectOnly?: boolean;
16
17
  }
17
18
  interface ReviewLatestDependencies {
18
19
  buildCommandContext: (options: GlobalOptions) => CommandContext;
@@ -1 +1 @@
1
- {"version":3,"file":"latest.d.ts","sourceRoot":"","sources":["../../../src/commands/review/latest.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,aAAa,EACnB,MAAM,sBAAsB,CAAC;AAO9B,OAAO,EAAsB,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAE7E,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,OAAO,CAAC;AAEnD,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,gBAAgB,CAAC;IACvB,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,OAAO,CAAC;CACrB;AAQD,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC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