@open-agent-toolkit/cli 0.2.24 → 0.2.25

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 (32) hide show
  1. package/assets/agents/oat-reviewer.md +12 -1
  2. package/assets/docs/cli-utilities/configuration.md +2 -4
  3. package/assets/docs/reference/cli-reference.md +1 -1
  4. package/assets/docs/workflows/projects/reviews.md +19 -10
  5. package/assets/public-package-versions.json +4 -4
  6. package/assets/skills/oat-project-autonomous/references/gate-inventory.md +3 -3
  7. package/assets/skills/oat-project-document/references/docs/autonomy-contract.md +3 -3
  8. package/assets/skills/oat-project-implement/SKILL.md +1 -1
  9. package/assets/skills/oat-project-implement/references/docs/autonomy-contract.md +3 -3
  10. package/assets/skills/oat-project-implement/references/phase-execution.md +29 -0
  11. package/assets/skills/oat-project-pr-final/references/docs/autonomy-contract.md +3 -3
  12. package/assets/skills/oat-project-quick-start/references/docs/autonomy-contract.md +3 -3
  13. package/assets/skills/oat-project-review-provide/SKILL.md +124 -26
  14. package/assets/skills/oat-project-review-provide-remote/SKILL.md +64 -15
  15. package/assets/skills/oat-project-review-receive/SKILL.md +21 -1
  16. package/assets/skills/oat-project-review-receive-remote/SKILL.md +39 -2
  17. package/assets/skills/oat-review-provide-remote/SKILL.md +55 -12
  18. package/assets/templates/plan.md +13 -7
  19. package/dist/commands/config/index.js +8 -8
  20. package/dist/commands/review/latest.d.ts.map +1 -1
  21. package/dist/commands/review/latest.js +22 -9
  22. package/dist/config/resolve.js +1 -1
  23. package/dist/review-remote/body-builder.d.ts +12 -3
  24. package/dist/review-remote/body-builder.d.ts.map +1 -1
  25. package/dist/review-remote/body-builder.js +11 -0
  26. package/dist/review-remote/marker-parser.d.ts +8 -3
  27. package/dist/review-remote/marker-parser.d.ts.map +1 -1
  28. package/dist/review-remote/marker-parser.js +13 -2
  29. package/dist/review-remote/narrowing.d.ts +44 -8
  30. package/dist/review-remote/narrowing.d.ts.map +1 -1
  31. package/dist/review-remote/narrowing.js +106 -10
  32. package/package.json +2 -2
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: oat-review-provide-remote
3
- version: 1.0.3
3
+ version: 1.1.0
4
4
  description: Use when reviewing a GitHub PR opened on another machine and posting findings back as a single PR review, outside any OAT project context. Fetches the PR via gh, reviews it, and posts via gh api.
5
5
  disable-model-invocation: true
6
6
  user-invocable: true
@@ -77,7 +77,7 @@ oat-review-provide-remote [--pr <N>] [--no-checkout] [--narrow|--no-narrow]
77
77
 
78
78
  - `--pr <N>`: target PR number. When omitted, auto-detect from the current branch.
79
79
  - `--no-checkout`: skip the ephemeral worktree and review from `gh pr diff` only (degraded context).
80
- - `--narrow` / `--no-narrow`: force or forbid re-review narrowing against a prior provide-remote review. When neither is passed, honor `workflow.autoNarrowReReviewScope` (no prompt when `true`; confirm prompt otherwise).
80
+ - `--narrow` / `--no-narrow`: force or forbid re-review narrowing against a prior ad-hoc provide-remote review. `--narrow` takes precedence over the configured preference; `--no-narrow` forces full scope. When neither is passed, honor `workflow.autoNarrowReReviewScope`: unset and `true` narrow automatically, while only `false` forces full scope. This path never prompts for a narrowing decision.
81
81
 
82
82
  Inputs are CLI-style args parsed from `$ARGUMENTS`. No file inputs. No file outputs on this machine.
83
83
 
@@ -143,26 +143,63 @@ gh pr view "$PR" --json title,body,headRefOid,baseRefName,state
143
143
 
144
144
  ### Step 3: Detect Prior Reviews + Narrow Scope
145
145
 
146
- List prior PR reviews and parse each body's marker block. Filter to reviews where `oat_provide_remote: true` AND `oat_review_scope == "ad-hoc"` AND no `oat_project` key — project-rail markers are ignored by the ad-hoc filter.
146
+ Resolve preference and per-invocation flags before candidate enumeration:
147
+
148
+ 1. `--no-narrow` forces full PR scope with reason `narrowing-disabled` and skips `gh api` review enumeration entirely.
149
+ 2. `--narrow` forces a narrowing attempt even when the configured preference is `false`.
150
+ 3. With neither flag, unset and `true` attempt narrowing; only `false` forces full PR scope with reason `narrowing-disabled` and skips `gh api` review enumeration entirely.
151
+
152
+ Only when narrowing will be attempted, list prior PR reviews and parse each body's GitHub review marker block. Capture command status and stderr separately:
147
153
 
148
154
  ```bash
149
- gh api "/repos/{owner}/{repo}/pulls/$PR/reviews"
155
+ REVIEWS_ERROR_FILE=""
156
+ REVIEWS_DIAGNOSTIC=""
157
+ REVIEWS_DISCOVERY_OK=false
158
+
159
+ if ! REVIEWS_ERROR_FILE=$(mktemp "${TMPDIR:-/tmp}/oat-review-errors.XXXXXX"); then
160
+ REVIEWS_DIAGNOSTIC="diagnostic-file-unavailable: unable to create a temporary stderr file"
161
+ elif REVIEWS_JSON=$(gh api "/repos/{owner}/{repo}/pulls/$PR/reviews" 2>"$REVIEWS_ERROR_FILE"); then
162
+ REVIEWS_DISCOVERY_OK=true
163
+ rm -f -- "$REVIEWS_ERROR_FILE"
164
+ REVIEWS_ERROR_FILE=""
165
+ else
166
+ REVIEWS_DIAGNOSTIC=$(dd if="$REVIEWS_ERROR_FILE" bs=500 count=1 2>/dev/null)
167
+ rm -f -- "$REVIEWS_ERROR_FILE"
168
+ REVIEWS_ERROR_FILE=""
169
+ fi
150
170
  ```
151
171
 
152
- Take the most recent matching review (by submitted timestamp). Before narrowing to `<prior_sha>..<HEAD>`, run the stale-SHA guard (design.md Error Handling Stale prior-review SHA):
172
+ Do not run `gh api` when diagnostic-file creation fails. Treat that failure, a nonzero `gh api` result, or a response-level enumeration/parsing failure as discovery failure. Before removing the diagnostic file, preserve at most 500 bytes from stderr. If response parsing later fails, set `REVIEWS_DISCOVERY_OK=false` and put at most 500 characters of the parse error in `REVIEWS_DIAGNOSTIC`. Apply the forced/automatic policy below whenever `REVIEWS_DISCOVERY_OK=false`. Do not treat individual irrelevant or lineage-ineligible marker blocks as response-level failure.
173
+
174
+ - With forced `--narrow`, discovery failure is a hard error with reason `prior-reviews-unavailable`; report the diagnostic and stop instead of pretending to narrow.
175
+ - On the automatic path, discovery failure fails open to full PR scope with stable reason `prior-reviews-unavailable` plus the diagnostic detail, then continues to review the full PR diff.
176
+
177
+ After successful enumeration, candidate discovery belongs to this rail: use only marker blocks where `oat_provide_remote: true`, `oat_review_scope == "ad-hoc"`, no `oat_project` key is present, and the invocation is in the ad-hoc lifecycle lineage (`manual` or `auto`). Project-rail, gate, and invocation-less or unknown legacy markers remain unknown and ineligible. This rail has no project-plan or local lifecycle Reviews-table fallback.
178
+
179
+ Take the most recent eligible marker by submitted timestamp. Candidate discovery and marker provenance remain rail-specific; only after this rail supplies that candidate apply the shared guard, fallback, and classification semantics mirrored by `packages/cli/src/review-remote/narrowing.ts`. When no eligible marker supplies a full 40-character hexadecimal `oat_review_head_sha`, use full PR scope with reason `no-prior-review`. Do not run Git guards for an invalid candidate.
180
+
181
+ Before accepting `<prior_sha>..<PR_HEAD_SHA>`, run the stale-SHA guard (design.md → Error Handling → Stale prior-review SHA):
153
182
 
154
183
  Run the guard in the available git context `$GIT_CTX` — `$EPHEMERAL_PATH` in rich-context (checkout) mode, or `$REPO_ROOT` in diff-only mode (where no worktree exists):
155
184
 
156
185
  1. **Existence:** `git -C "$GIT_CTX" cat-file -e <prior_sha>` (diff-only mode: `git -C "$REPO_ROOT" fetch origin <prior_sha>:refs/oat-prior-review` first, then re-check; if that fetch fails, fall back to full PR scope).
157
186
  2. **Ancestry:** `git -C "$GIT_CTX" merge-base --is-ancestor <prior_sha> "$PR_HEAD_SHA"`.
158
187
 
159
- Guard outcomes:
188
+ Guard outcomes and reasons:
160
189
 
161
- - Both pass -> narrow to `<prior_sha>..<HEAD>`.
162
- - Either fails -> fall back to full PR scope and warn that the prior SHA is unreachable (likely rebase/force-push).
190
+ - Both pass -> narrow to exactly `<prior_sha>..<PR_HEAD_SHA>` with reason `narrowed from guarded prior reviewed head`.
191
+ - Object missing or fetch failure -> fall back to full PR scope with reason `stale-sha` and detail `prior-commit-missing`.
192
+ - Ancestry failure -> fall back to full PR scope with reason `stale-sha` and detail `prior-commit-not-ancestor`.
163
193
  - `--narrow` set AND guard fails -> hard error; surface unreachability and stop.
164
- - `workflow.autoNarrowReReviewScope == true` -> never prompt; guard failure auto-falls back to full scope with the warning as the auto-fallback notice.
165
- - No matching prior review -> use full PR diff.
194
+ - The automatic path fails open for every candidate or guard failure and preserves the applicable reason.
195
+
196
+ When a guarded narrow range is accepted, enumerate its changed files with `git diff --name-only "<prior_sha>..<PR_HEAD_SHA>"` and classify it for reporting:
197
+
198
+ - `empty`: no changed files.
199
+ - `substantive`: any non-empty range. The ad-hoc rail has no active project prefix, so it cannot classify a range as `bookkeeping-only`.
200
+ - If changed-file enumeration fails, conservatively classify as `substantive` and add `changed-files-unavailable` to the reason.
201
+
202
+ The shared vocabulary remains `empty`, `bookkeeping-only`, or `substantive`; `bookkeeping-only` is reachable only on a project rail with an exact active-project prefix. Classification is reporting-only: it never skips, gates, or shortens the review. Print one narrowing resolution line containing the resolved full-scope or narrow range, classification when narrowed, and the explicit reason. Do not print another narrowing prompt or decision line elsewhere.
166
203
 
167
204
  ### Step 4: Run the Review (Inline)
168
205
 
@@ -233,6 +270,9 @@ Posting failure handling (design.md → Error Handling → Posting failures): on
233
270
  Always release the ephemeral worktree in a `finally`, even when review or posting fails:
234
271
 
235
272
  ```bash
273
+ if [[ -n "${REVIEWS_ERROR_FILE:-}" ]]; then
274
+ rm -f -- "$REVIEWS_ERROR_FILE"
275
+ fi
236
276
  git -C "$REPO_ROOT" worktree remove --force "$EPHEMERAL_PATH" || git -C "$REPO_ROOT" worktree prune
237
277
  rm -rf "$EPHEMERAL_PATH"
238
278
  ```
@@ -252,7 +292,7 @@ At completion, report:
252
292
 
253
293
  - PR number and HEAD SHA reviewed.
254
294
  - Read mode (worktree checkout vs diff-only).
255
- - Narrowing decision (full scope vs `<prior_sha>..<HEAD>`, and why).
295
+ - Narrowing decision (full scope vs `<prior_sha>..<PR_HEAD_SHA>`), reporting-only classification when narrowed, and the explicit reason.
256
296
  - Severity counts and total findings.
257
297
  - Inline-comment count posted vs findings downgraded to the body (out-of-diff).
258
298
  - Verdict (`REQUEST_CHANGES` or `COMMENT`).
@@ -263,7 +303,10 @@ At completion, report:
263
303
 
264
304
  - PR scope resolved and confirmed.
265
305
  - PR content acquired via ephemeral worktree (or diff-only fallback) without mutating the caller's working tree.
266
- - Prior provide-remote reviews detected; re-review narrowing applied only after the stale-SHA guard passes.
306
+ - Prior ad-hoc GitHub markers detected and restricted to the ad-hoc lifecycle lineage; project and gate markers are ineligible, and no project-plan or local Reviews-table fallback is used.
307
+ - Re-review narrowing applies only after the full-SHA, existence, and ancestry guards pass, with explicit fail-open reasons.
308
+ - Unset and `true` narrow automatically, only `false` forces full scope, per-invocation flags retain precedence, and no narrowing prompt remains.
309
+ - Narrowed ranges are classified as `empty` or `substantive` for reporting only; changed-file enumeration failure conservatively reports `substantive`.
267
310
  - Findings produced with consistent 4-tier severities and file:line references.
268
311
  - Inline comments mapped to in-diff positions; out-of-diff findings downgraded to the body, never dropped.
269
312
  - Posted-review body carries the marker block first, correct severity counts, and the minor-fix nudge when minors are present.
@@ -168,13 +168,19 @@ git commit -m "feat(p01-t02): {description}"
168
168
 
169
169
  {Keep both code + artifact rows below. Add additional code rows (p03, p04, etc.) as needed, but do not delete `spec`/`design`.}
170
170
 
171
- | Scope | Type | Status | Date | Artifact |
172
- | ------ | -------- | ------- | ---- | -------- |
173
- | p01 | code | pending | - | - |
174
- | p02 | code | pending | - | - |
175
- | final | code | pending | - | - |
176
- | spec | artifact | pending | - | - |
177
- | design | artifact | pending | - | - |
171
+ | Scope | Type | Status | Date | Artifact | Reviewed Head | Invocation | Gate Target |
172
+ | ------ | -------- | ------- | ---- | -------- | ------------- | ---------- | ----------- |
173
+ | p01 | code | pending | - | - | - | - | - |
174
+ | p02 | code | pending | - | - | - | - | - |
175
+ | final | code | pending | - | - | - | - | - |
176
+ | spec | artifact | pending | - | - | - | - | - |
177
+ | design | artifact | pending | - | - | - | - | - |
178
+
179
+ For code-review events, `Reviewed Head` is the full 40-character SHA at the
180
+ head of the reviewed range. `Invocation` records `manual`, `auto`, or `gate`;
181
+ `Gate Target` is populated only for gate events. Legacy five-column rows remain
182
+ valid. Writers must preserve every existing row and every unknown trailing
183
+ cell; never truncate a widened row back to five columns.
178
184
 
179
185
  **Status values:** `pending` → `received` → `fixes_added` → `fixes_completed` → `passed`
180
186
 
@@ -508,7 +508,7 @@ const CONFIG_CATALOG = [
508
508
  defaultValue: 'unset',
509
509
  mutability: 'read/write',
510
510
  owningCommand: 'oat config set workflow.hillCheckpointDefault <value>',
511
- description: 'Default HiLL checkpoint behavior in oat-project-implement: "every" pauses after every phase, "final" pauses only after the last phase. When unset, the skill prompts. Resolution: env > local > shared > user > default.',
511
+ description: 'Default HiLL checkpoint behavior in oat-project-implement: "every" pauses after every phase, "final" pauses only after the last phase. When unset, the skill prompts. Resolution: local > shared > user > default.',
512
512
  },
513
513
  {
514
514
  key: 'workflow.archiveOnComplete',
@@ -519,7 +519,7 @@ const CONFIG_CATALOG = [
519
519
  defaultValue: 'unset',
520
520
  mutability: 'read/write',
521
521
  owningCommand: 'oat config set workflow.archiveOnComplete <true|false>',
522
- description: 'Skip the "Archive after completion?" prompt in oat-project-complete. When unset, the skill prompts. Resolution: env > local > shared > user > default.',
522
+ description: 'Skip the "Archive after completion?" prompt in oat-project-complete. When unset, the skill prompts. Resolution: local > shared > user > default.',
523
523
  },
524
524
  {
525
525
  key: 'workflow.createPrOnComplete',
@@ -530,7 +530,7 @@ const CONFIG_CATALOG = [
530
530
  defaultValue: 'unset',
531
531
  mutability: 'read/write',
532
532
  owningCommand: 'oat config set workflow.createPrOnComplete <true|false>',
533
- description: 'Skip the "Open a PR?" prompt in oat-project-complete. When true, completion auto-triggers PR creation. Resolution: env > local > shared > user > default.',
533
+ description: 'Skip the "Open a PR?" prompt in oat-project-complete. When true, completion auto-triggers PR creation. Resolution: local > shared > user > default.',
534
534
  },
535
535
  {
536
536
  key: 'workflow.postImplementSequence',
@@ -541,7 +541,7 @@ const CONFIG_CATALOG = [
541
541
  defaultValue: 'unset',
542
542
  mutability: 'read/write',
543
543
  owningCommand: "oat config set workflow.postImplementSequence '<legacy-or-json>'",
544
- description: 'Default post-implementation chaining. Legacy strings remain supported unchanged. Structured JSON uses {"preApproval":[...],"postApproval":[...]} with the canonical sequence steps. Plain get/list/dump output serializes structured values as compact JSON; get --json preserves the object value. When unset, the skill prompts. Resolution: env > local > shared > user > default.',
544
+ description: 'Default post-implementation chaining. Legacy strings remain supported unchanged. Structured JSON uses {"preApproval":[...],"postApproval":[...]} with the canonical sequence steps. Plain get/list/dump output serializes structured values as compact JSON; get --json preserves the object value. When unset, the skill prompts. Resolution: local > shared > user > default.',
545
545
  },
546
546
  {
547
547
  key: 'workflow.reviewExecutionModel',
@@ -552,7 +552,7 @@ const CONFIG_CATALOG = [
552
552
  defaultValue: 'unset',
553
553
  mutability: 'read/write',
554
554
  owningCommand: 'oat config set workflow.reviewExecutionModel <value>',
555
- description: 'Default execution model for the final review step in oat-project-implement: "subagent" dispatches a review subagent, "inline" runs the review in-context, "fresh-session" prints guidance for running the review in a separate session (with an escape hatch to subagent/inline). When unset, the skill prompts. Resolution: env > local > shared > user > default.',
555
+ description: 'Default execution model for the final review step in oat-project-implement: "subagent" dispatches a review subagent, "inline" runs the review in-context, "fresh-session" prints guidance for running the review in a separate session (with an escape hatch to subagent/inline). When unset, the skill prompts. Resolution: local > shared > user > default.',
556
556
  },
557
557
  {
558
558
  key: 'workflow.autoReviewAtHillCheckpoints',
@@ -563,7 +563,7 @@ const CONFIG_CATALOG = [
563
563
  defaultValue: 'unset',
564
564
  mutability: 'read/write',
565
565
  owningCommand: 'oat config set workflow.autoReviewAtHillCheckpoints <true|false>',
566
- description: 'Automatically run the extra lifecycle review when a HiLL checkpoint is reached. This does not control Tier 1 per-phase oat-reviewer gates. When unset, the skill prompts. Resolution: env > local > shared > user > legacy autoReviewAtCheckpoints > default.',
566
+ description: 'Automatically run the extra lifecycle review when a HiLL checkpoint is reached. This does not control Tier 1 per-phase oat-reviewer gates. When unset, the skill prompts. Resolution: local > shared > user > legacy autoReviewAtCheckpoints > default.',
567
567
  },
568
568
  {
569
569
  key: 'workflow.autoNarrowReReviewScope',
@@ -571,10 +571,10 @@ const CONFIG_CATALOG = [
571
571
  file: '.oat/config.local.json | .oat/config.json | ~/.oat/config.json',
572
572
  scope: 'workflow',
573
573
  type: 'boolean',
574
- defaultValue: 'unset',
574
+ defaultValue: 'true',
575
575
  mutability: 'read/write',
576
576
  owningCommand: 'oat config set workflow.autoNarrowReReviewScope <true|false>',
577
- description: 'Auto-narrow re-review scope to fix-task commits in oat-project-review-provide when re-reviewing completed fix tasks. Has no effect on initial reviews (there is nothing to narrow to). When unset, the skill prompts. Resolution: env > local > shared > user > default.',
577
+ description: 'Automatically narrows re-review scope to changes since the prior same-lineage review. Narrowing is enabled by default; false opts out to full scope. Has no effect on initial reviews (there is nothing to narrow to). Resolution: local > shared > user > default.',
578
578
  },
579
579
  {
580
580
  key: 'workflow.autoArtifactReview.plan',
@@ -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;AASD,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,qB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Ac,CAAC;IAChE,kBAAkB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACrD,kBAAkB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,CAAC,CAAC;CACnE;AAiPD,wBAAsB,gBAAgB,CACpC,OAAO,EAAE,uBAAuB,GAC/B,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,CAkG9B;AAmDD,wBAAgB,yBAAyB,CACvC,SAAS,GAAE,OAAO,CAAC,wBAAwB,CAAM,GAChD,OAAO,CA2BT"}
@@ -99,20 +99,33 @@ function parseReviewLedgerEvents(planContent) {
99
99
  const remaining = planContent.slice(heading.index + heading[0].length);
100
100
  const nextHeadingIndex = remaining.search(/^##(?!#)[ \t]+\S.*\r?$/m);
101
101
  const section = nextHeadingIndex === -1 ? remaining : remaining.slice(0, nextHeadingIndex);
102
- return section
102
+ const rows = section
103
103
  .split('\n')
104
104
  .filter((line) => line.trim().startsWith('|'))
105
- .slice(2)
106
105
  .map((line) => line
107
106
  .split('|')
108
107
  .slice(1, -1)
109
- .map((cell) => cell.trim()))
110
- .filter((cells) => cells.length === 5)
111
- .map(([scope = '', type = '', status = '', , artifact = '']) => ({
112
- scope,
113
- type,
114
- status,
115
- artifact,
108
+ .map((cell) => cell.trim()));
109
+ const headers = rows[0];
110
+ if (!headers) {
111
+ return [];
112
+ }
113
+ const normalizedHeaders = headers.map((header) => header.toLowerCase());
114
+ const scopeIndex = normalizedHeaders.indexOf('scope');
115
+ const typeIndex = normalizedHeaders.indexOf('type');
116
+ const statusIndex = normalizedHeaders.indexOf('status');
117
+ const artifactIndex = normalizedHeaders.indexOf('artifact');
118
+ if (scopeIndex === -1 ||
119
+ typeIndex === -1 ||
120
+ statusIndex === -1 ||
121
+ artifactIndex === -1) {
122
+ return [];
123
+ }
124
+ return rows.slice(2).map((cells) => ({
125
+ scope: cells[scopeIndex] ?? '',
126
+ type: cells[typeIndex] ?? '',
127
+ status: cells[statusIndex] ?? '',
128
+ artifact: cells[artifactIndex] ?? '',
116
129
  }));
117
130
  }
118
131
  async function correlateProjectActionability(repoRoot, projectPath, candidates) {
@@ -68,7 +68,7 @@ const DEFAULT_WORKFLOW_CONFIG = {
68
68
  postImplementSequence: null,
69
69
  reviewExecutionModel: null,
70
70
  autoReviewAtHillCheckpoints: null,
71
- autoNarrowReReviewScope: null,
71
+ autoNarrowReReviewScope: true,
72
72
  autoArtifactReview: {
73
73
  plan: true,
74
74
  analysis: true,
@@ -38,15 +38,13 @@ export interface OutOfDiffFinding {
38
38
  /** Finding description / rationale — preserved verbatim, never dropped. */
39
39
  body: string;
40
40
  }
41
- export interface BuildInput {
41
+ interface BuildInputBase {
42
42
  /** Full 40-char hex SHA of the reviewed PR HEAD. */
43
43
  headSha: string;
44
44
  /** Scope token (`pNN`, `final`, …) or the `ad-hoc` sentinel. */
45
45
  scope: string;
46
46
  /** Project path — set only on the project rail; omitted on ad-hoc. */
47
47
  project?: string;
48
- /** How the review was invoked. */
49
- invocation: ReviewInvocation;
50
48
  /** 2-3 sentence human-readable summary. */
51
49
  summary: string;
52
50
  findings: BuilderFinding[];
@@ -63,6 +61,16 @@ export interface BuildInput {
63
61
  /** Commands the user can run to verify fixes; omitted when absent/empty. */
64
62
  verificationCommands?: string[];
65
63
  }
64
+ interface LifecycleBuildInput {
65
+ invocation: Exclude<ReviewInvocation, 'gate'>;
66
+ gateTarget?: never;
67
+ }
68
+ interface GateBuildInput {
69
+ invocation: 'gate';
70
+ /** Exact non-empty target that owns this gate review lineage. */
71
+ gateTarget: string;
72
+ }
73
+ export type BuildInput = BuildInputBase & (LifecycleBuildInput | GateBuildInput);
66
74
  /**
67
75
  * Map a finding set to the GitHub review verdict: `REQUEST_CHANGES` when any
68
76
  * critical or important finding is present, otherwise `COMMENT` (including the
@@ -76,4 +84,5 @@ export declare function buildReviewBody(input: BuildInput): {
76
84
  body: string;
77
85
  verdict: ReviewVerdict;
78
86
  };
87
+ export {};
79
88
  //# sourceMappingURL=body-builder.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"body-builder.d.ts","sourceRoot":"","sources":["../../src/review-remote/body-builder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAqB,KAAK,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAE3E,MAAM,MAAM,aAAa,GAAG,iBAAiB,GAAG,SAAS,CAAC;AAE1D,MAAM,MAAM,eAAe,GAAG,UAAU,GAAG,WAAW,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE5E,2EAA2E;AAC3E,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,eAAe,CAAC;CAC3B;AAED;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,gBAAgB;IAC/B,0DAA0D;IAC1D,IAAI,EAAE,MAAM,CAAC;IACb,8EAA8E;IAC9E,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,QAAQ,EAAE,eAAe,CAAC;IAC1B,gEAAgE;IAChE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2EAA2E;IAC3E,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,UAAU;IACzB,oDAAoD;IACpD,OAAO,EAAE,MAAM,CAAC;IAChB,gEAAgE;IAChE,KAAK,EAAE,MAAM,CAAC;IACd,sEAAsE;IACtE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kCAAkC;IAClC,UAAU,EAAE,gBAAgB,CAAC;IAC7B,2CAA2C;IAC3C,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,cAAc,EAAE,CAAC;IAC3B;;;;;;;;OAQG;IACH,iBAAiB,CAAC,EAAE,gBAAgB,EAAE,CAAC;IACvC,4EAA4E;IAC5E,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;CACjC;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,cAAc,EAAE,GAAG,aAAa,CAKpE;AAkED;;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AM,CAAC,CAAC;IAC9C,UAAU,CAAC,EAAE,KAAK,CAAC;CACpB;AAED,UAAU,cAAc;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,iEAAiE;IACjE,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,UAAU,GAAG,cAAc,GACrC,CAAC,mBAAmB,GAAG,cAAc,CAAC,CAAC;AAEzC;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,cAAc,EAAE,GAAG,aAAa,CAKpE;AAgFD;;GAEG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,UAAU,GAAG;IAClD,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,aAAa,CAAC;CACxB,CAkCA"}
@@ -45,6 +45,17 @@ function buildMarkerBlock(input) {
45
45
  lines.push(`oat_project: ${input.project}`);
46
46
  }
47
47
  lines.push(`oat_review_invocation: ${input.invocation}`);
48
+ if (input.invocation === 'gate') {
49
+ if (input.gateTarget.trim() === '' ||
50
+ input.gateTarget.trim() !== input.gateTarget) {
51
+ throw new Error('gate invocation requires an exact non-empty gateTarget');
52
+ }
53
+ lines.push(`oat_gate_target: ${input.gateTarget}`);
54
+ }
55
+ else if ('gateTarget' in input &&
56
+ input.gateTarget !== undefined) {
57
+ throw new Error('lifecycle invocation must not include gateTarget');
58
+ }
48
59
  return `<!-- ${MARKER_BLOCK_OPEN}\n${lines.join('\n')}\n-->`;
49
60
  }
50
61
  /**
@@ -13,7 +13,7 @@
13
13
  */
14
14
  /** Token that opens the marker comment block. */
15
15
  export declare const MARKER_BLOCK_OPEN = "oat-review-metadata";
16
- export type ReviewInvocation = 'manual' | 'auto';
16
+ export type ReviewInvocation = 'manual' | 'auto' | 'gate';
17
17
  export interface MarkerBlock {
18
18
  /** Always `true` for an OAT provide-remote review; the discriminator. */
19
19
  oat_provide_remote: true;
@@ -26,8 +26,13 @@ export interface MarkerBlock {
26
26
  * `null` value) discriminates project rail from ad-hoc rail.
27
27
  */
28
28
  oat_project?: string;
29
- /** How the review was invoked. Defaults to `manual` when omitted. */
30
- oat_review_invocation: ReviewInvocation;
29
+ /**
30
+ * How the review was invoked. Missing and unknown values stay undefined so
31
+ * legacy markers cannot silently acquire lifecycle lineage.
32
+ */
33
+ oat_review_invocation?: ReviewInvocation;
34
+ /** Exact gate target. Required before a gate marker can establish lineage. */
35
+ oat_gate_target?: string;
31
36
  /** Forward-compat bag for unknown marker keys. Omitted when none seen. */
32
37
  extras?: Record<string, string>;
33
38
  }
@@ -1 +1 @@
1
- {"version":3,"file":"marker-parser.d.ts","sourceRoot":"","sources":["../../src/review-remote/marker-parser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,iDAAiD;AACjD,eAAO,MAAM,iBAAiB,wBAAwB,CAAC;AAavD,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,MAAM,CAAC;AAEjD,MAAM,WAAW,WAAW;IAC1B,yEAAyE;IACzE,kBAAkB,EAAE,IAAI,CAAC;IACzB,oDAAoD;IACpD,mBAAmB,EAAE,MAAM,CAAC;IAC5B,gEAAgE;IAChE,gBAAgB,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qEAAqE;IACrE,qBAAqB,EAAE,gBAAgB,CAAC;IACxC,0EAA0E;IAC1E,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC;AAUD;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI,CAqEjE"}
1
+ {"version":3,"file":"marker-parser.d.ts","sourceRoot":"","sources":["../../src/review-remote/marker-parser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,iDAAiD;AACjD,eAAO,MAAM,iBAAiB,wBAAwB,CAAC;AAavD,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC;AAE1D,MAAM,WAAW,WAAW;IAC1B,yEAAyE;IACzE,kBAAkB,EAAE,IAAI,CAAC;IACzB,oDAAoD;IACpD,mBAAmB,EAAE,MAAM,CAAC;IAC5B,gEAAgE;IAChE,gBAAgB,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,qBAAqB,CAAC,EAAE,gBAAgB,CAAC;IACzC,8EAA8E;IAC9E,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,0EAA0E;IAC1E,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC;AAWD;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI,CA+EjE"}
@@ -26,6 +26,7 @@ const KNOWN_KEYS = new Set([
26
26
  'oat_review_scope',
27
27
  'oat_project',
28
28
  'oat_review_invocation',
29
+ 'oat_gate_target',
29
30
  ]);
30
31
  /**
31
32
  * Parse the first OAT marker block out of a posted-review body.
@@ -73,17 +74,27 @@ export function parseMarkerBlock(body) {
73
74
  return null;
74
75
  }
75
76
  const invocationRaw = raw['oat_review_invocation'];
76
- const oat_review_invocation = invocationRaw === 'auto' ? 'auto' : 'manual';
77
+ const oat_review_invocation = invocationRaw === 'manual' ||
78
+ invocationRaw === 'auto' ||
79
+ invocationRaw === 'gate'
80
+ ? invocationRaw
81
+ : undefined;
77
82
  const block = {
78
83
  oat_provide_remote: true,
79
84
  oat_review_head_sha: headSha,
80
85
  oat_review_scope: scope,
81
- oat_review_invocation,
82
86
  };
87
+ if (oat_review_invocation !== undefined) {
88
+ block.oat_review_invocation = oat_review_invocation;
89
+ }
83
90
  // Project key existence (not a null value) discriminates the rail.
84
91
  if ('oat_project' in raw && raw['oat_project'] !== '') {
85
92
  block.oat_project = raw['oat_project'];
86
93
  }
94
+ const gateTarget = raw['oat_gate_target']?.trim();
95
+ if (gateTarget) {
96
+ block.oat_gate_target = gateTarget;
97
+ }
87
98
  const extras = {};
88
99
  for (const [key, value] of Object.entries(raw)) {
89
100
  if (!KNOWN_KEYS.has(key)) {
@@ -9,8 +9,15 @@
9
9
  * range, so a rebased/force-pushed/shallow prior SHA never produces a
10
10
  * misleading partial range.
11
11
  */
12
- import type { ReviewInvocation } from './marker-parser.js';
12
+ import type { MarkerBlock, ReviewInvocation } from './marker-parser.js';
13
13
  export type ReviewRail = 'ad-hoc' | 'project';
14
+ export type ReviewLineage = {
15
+ kind: 'lifecycle';
16
+ } | {
17
+ kind: 'gate';
18
+ target: string;
19
+ };
20
+ export type ReviewInvocationKind = ReviewInvocation;
14
21
  /** A prior provide-remote review, distilled from its parsed marker block. */
15
22
  export interface PriorReview {
16
23
  /** Full 40-char SHA recorded by the prior review. */
@@ -19,10 +26,34 @@ export interface PriorReview {
19
26
  scope: string;
20
27
  /** Project path — present only for project-rail reviews. */
21
28
  project?: string;
22
- invocation: ReviewInvocation;
29
+ invocation?: ReviewInvocationKind;
30
+ /** Review lineage; absent on legacy records, which are not eligible. */
31
+ lineage?: ReviewLineage;
23
32
  /** ISO-8601 review submission timestamp, used for descending sort. */
24
33
  submittedAt: string;
25
34
  }
35
+ /** Provenance persisted on one tracked Reviews ledger row. */
36
+ export interface ReviewLedgerProvenance {
37
+ reviewedHead: string;
38
+ scope: string;
39
+ project?: string;
40
+ invocation?: string;
41
+ gateTarget?: string;
42
+ artifact: string;
43
+ submittedAt: string;
44
+ }
45
+ /**
46
+ * Normalize one parsed GitHub marker into a narrowing candidate. Unknown
47
+ * invocation and target-less gate markers preserve their metadata but carry no
48
+ * lineage, so tuple matching rejects them and fails open.
49
+ */
50
+ export declare function priorReviewFromMarker(marker: MarkerBlock, submittedAt: string): PriorReview;
51
+ /**
52
+ * Normalize durable ledger provenance into the same candidate shape used by
53
+ * artifact-sourced reviews. Both sources then pass through {@link matchesTuple}
54
+ * and cannot drift into separate lineage predicates.
55
+ */
56
+ export declare function priorReviewFromLedger(row: ReviewLedgerProvenance): PriorReview;
26
57
  /**
27
58
  * Narrow git surface needed by the guard. Callers pass a worktree-bound
28
59
  * implementation (rich-context mode) or a fetch-capable one (diff-only mode);
@@ -35,6 +66,8 @@ export interface GitInvoker {
35
66
  isAncestor(sha: string, head: string): Promise<boolean>;
36
67
  /** `git fetch origin <sha>:<ref>` — fetch a single ref (diff-only mode). */
37
68
  fetchRef(sha: string): Promise<boolean>;
69
+ /** Files changed in `<priorSha>..<headSha>`. */
70
+ changedFiles(priorSha: string, headSha: string): Promise<string[]>;
38
71
  }
39
72
  export interface NarrowingInput {
40
73
  reviews: PriorReview[];
@@ -43,30 +76,33 @@ export interface NarrowingInput {
43
76
  project: string | null;
44
77
  /** Current scope token, or `ad-hoc`. */
45
78
  scope: string;
79
+ /** Current review lineage, including the target for gate invocations. */
80
+ lineage: ReviewLineage;
46
81
  /** Current PR HEAD SHA. */
47
82
  headSha: string;
48
83
  git: GitInvoker;
49
84
  /** `--narrow` was passed explicitly: guard failure becomes a hard error. */
50
85
  forceNarrow?: boolean;
51
- /** `workflow.autoNarrowReReviewScope === true`: never prompt. */
52
- autoNarrow?: boolean;
86
+ /** Resolved preference: unset and true narrow; false forces full scope. */
87
+ narrowingPreference?: boolean;
53
88
  /** Diff-only mode (no ephemeral worktree): fetch the single ref first. */
54
89
  diffOnly?: boolean;
55
90
  }
56
- export type FullScopeReason = 'no-prior-review' | 'stale-sha';
91
+ export type FullScopeReason = 'narrowing-disabled' | 'no-prior-review' | 'stale-sha';
92
+ export type RangeClassification = 'empty' | 'bookkeeping-only' | 'substantive';
57
93
  export interface NarrowRangeResult {
58
94
  kind: 'narrow-range';
59
95
  priorSha: string;
60
96
  headSha: string;
61
- /** Whether the caller still owes the user a confirm prompt. */
62
- prompted: boolean;
97
+ classification: RangeClassification;
98
+ /** Why classification conservatively fell back, when enumeration failed. */
99
+ classificationReason?: 'changed-files-unavailable';
63
100
  }
64
101
  export interface FullScopeFallbackResult {
65
102
  kind: 'full-scope-fallback';
66
103
  reason: FullScopeReason;
67
104
  /** The stale SHA that triggered the fallback, when applicable. */
68
105
  priorSha?: string;
69
- prompted: boolean;
70
106
  }
71
107
  export interface HardErrorResult {
72
108
  kind: 'hard-error';
@@ -1 +1 @@
1
- {"version":3,"file":"narrowing.d.ts","sourceRoot":"","sources":["../../src/review-remote/narrowing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAExD,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,SAAS,CAAC;AAE9C,6EAA6E;AAC7E,MAAM,WAAW,WAAW;IAC1B,qDAAqD;IACrD,OAAO,EAAE,MAAM,CAAC;IAChB,4CAA4C;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,4DAA4D;IAC5D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,gBAAgB,CAAC;IAC7B,sEAAsE;IACtE,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;;GAIG;AACH,MAAM,WAAW,UAAU;IACzB,+DAA+D;IAC/D,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC5C,yEAAyE;IACzE,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACxD,4EAA4E;IAC5E,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CACzC;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,IAAI,EAAE,UAAU,CAAC;IACjB,4EAA4E;IAC5E,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,wCAAwC;IACxC,KAAK,EAAE,MAAM,CAAC;IACd,2BAA2B;IAC3B,OAAO,EAAE,MAAM,CAAC;IACh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