@open-agent-toolkit/cli 0.1.20 → 0.1.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 (33) hide show
  1. package/assets/agents/oat-reviewer.md +48 -10
  2. package/assets/docs/cli-utilities/config-and-local-state.md +12 -0
  3. package/assets/docs/cli-utilities/configuration.md +19 -1
  4. package/assets/docs/docs-tooling/workflows.md +8 -2
  5. package/assets/docs/reference/cli-reference.md +6 -2
  6. package/assets/docs/workflows/projects/reviews.md +41 -0
  7. package/assets/public-package-versions.json +4 -4
  8. package/assets/skills/oat-agent-instructions-analyze/SKILL.md +43 -13
  9. package/assets/skills/oat-docs-analyze/SKILL.md +42 -12
  10. package/assets/skills/oat-project-discover/SKILL.md +22 -4
  11. package/assets/skills/oat-project-import-plan/SKILL.md +38 -9
  12. package/assets/skills/oat-project-plan/SKILL.md +30 -7
  13. package/assets/skills/oat-project-plan-writing/SKILL.md +45 -2
  14. package/assets/skills/oat-project-progress/SKILL.md +9 -3
  15. package/assets/skills/oat-project-quick-start/SKILL.md +40 -8
  16. package/assets/skills/oat-project-review-provide/SKILL.md +24 -11
  17. package/assets/skills/oat-project-review-receive/SKILL.md +37 -17
  18. package/dist/commands/config/index.d.ts.map +1 -1
  19. package/dist/commands/config/index.js +36 -0
  20. package/dist/commands/index.d.ts.map +1 -1
  21. package/dist/commands/index.js +2 -0
  22. package/dist/commands/review/index.d.ts +3 -0
  23. package/dist/commands/review/index.d.ts.map +1 -0
  24. package/dist/commands/review/index.js +7 -0
  25. package/dist/commands/review/latest.d.ts +23 -0
  26. package/dist/commands/review/latest.d.ts.map +1 -0
  27. package/dist/commands/review/latest.js +182 -0
  28. package/dist/config/oat-config.d.ts +5 -0
  29. package/dist/config/oat-config.d.ts.map +1 -1
  30. package/dist/config/oat-config.js +12 -0
  31. package/dist/config/resolve.d.ts.map +1 -1
  32. package/dist/config/resolve.js +4 -0
  33. package/package.json +2 -2
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: oat-project-import-plan
3
- version: 1.3.2
3
+ version: 1.3.3
4
4
  description: Use when you have an external markdown plan to execute with OAT. Preserves the source plan and normalizes it into canonical plan.md format.
5
5
  argument-hint: '<path-to-plan.md> [--provider codex|cursor|claude] [--project <name>]'
6
6
  disable-model-invocation: true
@@ -56,13 +56,14 @@ When executing this skill, provide lightweight progress feedback so the user can
56
56
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
57
57
 
58
58
  - Before multi-step work, print step indicators, e.g.:
59
- - `[0/6] Checking inherited git state...`
60
- - `[1/6] Resolving project + source plan…`
61
- - `[2/6] Preserving imported source…`
62
- - `[3/6] Normalizing plan to OAT task structure…`
63
- - `[4/6] Updating project metadata + state…`
64
- - `[5/6] Refreshing dashboard…`
65
- - `[6/6] Ensuring implementation tracker…`
59
+ - `[0/7] Checking inherited git state...`
60
+ - `[1/7] Resolving project + source plan…`
61
+ - `[2/7] Preserving imported source…`
62
+ - `[3/7] Normalizing plan to OAT task structure…`
63
+ - `[4/7] Updating plan metadata…`
64
+ - `[5/7] Running import-aware plan review…`
65
+ - `[6/7] Updating project state + dashboard…`
66
+ - `[7/7] Ensuring implementation tracker…`
66
67
 
67
68
  ## Process
68
69
 
@@ -180,7 +181,7 @@ Dispatch Profile import handling:
180
181
  Set frontmatter in `"$PROJECT_PATH/plan.md"`:
181
182
 
182
183
  - `oat_status: complete`
183
- - `oat_ready_for: oat-project-implement`
184
+ - `oat_ready_for: null` (Step 4.5 sets this after the import-aware plan review)
184
185
  - `oat_phase: plan`
185
186
  - `oat_phase_status: complete`
186
187
  - `oat_plan_source: imported`
@@ -188,6 +189,33 @@ Set frontmatter in `"$PROJECT_PATH/plan.md"`:
188
189
  - `oat_import_source_path: {source-path}`
189
190
  - `oat_import_provider: {codex|cursor|claude|null}`
190
191
 
192
+ ### Step 4.5: Run Import-Aware Plan Artifact Review Loop
193
+
194
+ Invoke the shared `Auto Artifact-Review Loop` from `oat-project-plan-writing` with target `plan` before advancing project state or handing off to implementation.
195
+
196
+ Required payload:
197
+
198
+ - `target: plan`
199
+ - `type: artifact`
200
+ - `scope: plan`
201
+ - `artifact_path: "$PROJECT_PATH/plan.md"`
202
+ - `oat_output_mode: structured`
203
+ - `import_aware: true`
204
+ - `review_note: "Review for canonical OAT plan conformance, executable completeness, stable task IDs, required sections, review-row preservation, and verification clarity. Preserve the imported source's intent and ordering; do not rewrite the author's plan goals or product decisions unless required for OAT conformance or completeness."`
205
+
206
+ Apply the shared loop exactly:
207
+
208
+ - Resolve `workflow.autoArtifactReview.plan`; only an explicit `false` skips the loop.
209
+ - Resolve `oat_orchestration_retry_limit` from project state, defaulting to `2`.
210
+ - Dispatch `oat-reviewer` in structured mode using Tier 1 subagent when available and Tier 2 inline fallback otherwise.
211
+ - Apply Critical and Important artifact-local fixes when unambiguous and limited to canonical conformance/completeness; offer Medium and Minor fixes instead of silently applying them.
212
+ - Re-dispatch after rewrites until clean or the retry bound is exhausted.
213
+ - Update the `plan` artifact row in the `## Reviews` table to `passed` when clean. If residual findings remain, preserve the row and surface the residual findings before downstream handoff.
214
+
215
+ After the loop completes or is explicitly skipped, set `"$PROJECT_PATH/plan.md"` frontmatter:
216
+
217
+ - `oat_ready_for: oat-project-implement`
218
+
191
219
  ### Step 5: Update Project State
192
220
 
193
221
  Set `"$PROJECT_PATH/state.md"` frontmatter:
@@ -245,6 +273,7 @@ Report:
245
273
  - ✅ Imported markdown preserved at `references/imported-plan.md`.
246
274
  - ✅ Canonical `plan.md` generated with OAT task structure.
247
275
  - ✅ `plan.md` metadata marks `oat_plan_source: imported`.
276
+ - ✅ `plan.md` records the import-aware plan artifact review row unless `workflow.autoArtifactReview.plan` was explicitly disabled.
248
277
  - ✅ `state.md` marks `oat_workflow_mode: import`.
249
278
  - ✅ `implementation.md` is present and resumable.
250
279
  - ✅ `oat_plan_hill_phases` left unset in frontmatter (deferred to `oat-project-implement` Step 2.5).
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: oat-project-plan
3
- version: 1.3.4
3
+ version: 1.3.5
4
4
  description: Use when design.md is complete and executable implementation tasks are needed. Breaks design into bite-sized TDD tasks in canonical plan.md format.
5
5
  disable-model-invocation: true
6
6
  user-invocable: true
@@ -41,11 +41,12 @@ When executing this skill, provide lightweight progress feedback so the user can
41
41
  OAT ▸ PLAN
42
42
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
43
43
 
44
- - Before multi-step work (drafting/finalizing/committing), print 2–5 short step indicators, e.g.:
45
- - `[1/4] Reading design + context…`
46
- - `[2/4] Drafting phases + tasks…`
47
- - `[3/4] Finalizing plan + rollups…`
48
- - `[4/4] Updating state + committing…`
44
+ - Before multi-step work (drafting/finalizing/reviewing/committing), print 2–5 short step indicators, e.g.:
45
+ - `[1/5] Reading design + context…`
46
+ - `[2/5] Drafting phases + tasks…`
47
+ - `[3/5] Finalizing plan + rollups…`
48
+ - `[4/5] Running plan artifact review…`
49
+ - `[5/5] Updating state + committing…`
49
50
  - For any operation that may take noticeable time (e.g., reading large artifacts), print a start line and a completion line (duration optional).
50
51
  - Keep it concise; don’t print a line for every shell command.
51
52
 
@@ -293,7 +294,7 @@ This creates traceability: Requirement → Tasks → Implementation
293
294
  ### Step 10.1: Keep Reviews Table Rows
294
295
 
295
296
  Follow the review table preservation rules from `oat-project-plan-writing`:
296
- - Include both **code** rows (p01/p02/…/final) and **artifact** rows (`spec`, `design`)
297
+ - Include both **code** rows (p01/p02/…/final) and **artifact** rows (`spec`, `design`, `plan`)
297
298
  - Add additional rows as needed (e.g., p03), but never delete existing rows
298
299
 
299
300
  **Why stable IDs:** Using `p01-t03` instead of "Task 3" prevents broken references when tasks are inserted or reordered.
@@ -381,12 +382,34 @@ Ask: "Does this breakdown make sense? Any tasks missing?"
381
382
 
382
383
  Iterate until user confirms.
383
384
 
385
+ ### Step 12.5: Run Plan Artifact Review Loop
386
+
387
+ Invoke the shared `Auto Artifact-Review Loop` from `oat-project-plan-writing` with target `plan` before setting `plan.md` to implementation-ready.
388
+
389
+ Required payload:
390
+
391
+ - `target: plan`
392
+ - `type: artifact`
393
+ - `scope: plan`
394
+ - `artifact_path: "$PROJECT_PATH/plan.md"`
395
+ - `oat_output_mode: structured`
396
+
397
+ Apply the shared loop exactly:
398
+
399
+ - Resolve `workflow.autoArtifactReview.plan`; only an explicit `false` skips the loop.
400
+ - Resolve `oat_orchestration_retry_limit` from project state, defaulting to `2`.
401
+ - Dispatch `oat-reviewer` in structured mode using Tier 1 subagent when available and Tier 2 inline fallback otherwise.
402
+ - Apply Critical and Important artifact-local fixes when unambiguous; offer Medium and Minor fixes instead of silently applying them.
403
+ - Re-dispatch after rewrites until clean or the retry bound is exhausted.
404
+ - Update the `plan` artifact row in the `## Reviews` table to `passed` when clean. If residual findings remain, preserve the row and surface the residual findings before downstream handoff.
405
+
384
406
  ### Step 13: Mark Plan Complete
385
407
 
386
408
  Before setting `oat_status: complete`, verify:
387
409
  - `## Planning Checklist` exists
388
410
  - the checklist records that checkpoint confirmation is deferred to implementation
389
411
  - if `oat_plan_hill_phases` is already present, it is intentionally preserved and valid
412
+ - the `plan` artifact review row has been recorded by Step 12.5, unless `workflow.autoArtifactReview.plan` was explicitly disabled
390
413
 
391
414
  Update frontmatter:
392
415
  ```yaml
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: oat-project-plan-writing
3
- version: 1.2.4
3
+ version: 1.2.5
4
4
  description: Use when authoring or mutating plan.md in any OAT workflow. Defines canonical format invariants — stable task IDs, required sections, review table rules, and resume guardrails.
5
5
  disable-model-invocation: true
6
6
  user-invocable: false
@@ -23,6 +23,49 @@ This is a sub-phase indicator; the calling skill owns the top-level banner.
23
23
 
24
24
  - When invoked by a calling skill, print the sub-banner immediately before plan authoring begins.
25
25
 
26
+ ## Auto Artifact-Review Loop
27
+
28
+ This is the canonical contract for bounded automated reviews of generated OAT artifacts. Calling skills own the concrete edits, progress indicators, and commits; this section defines the shared loop they must follow.
29
+
30
+ Use this loop after an artifact has been written and before the calling skill hands off to the downstream consumer. Current targets:
31
+
32
+ - `plan`: dispatch `oat-reviewer` with `type: artifact`, `scope: plan`, and `oat_output_mode: structured`.
33
+ - `analysis`: dispatch `oat-reviewer` with `type: analysis`, `scope: docs` or `agent-instructions`, `analysis_artifact`, and `oat_output_mode: structured`.
34
+
35
+ ### Canonical Procedure
36
+
37
+ 1. **Resolve the gate**
38
+ - Read `workflow.autoArtifactReview.<target>` using the same config-resolution path as other `workflow.*` keys.
39
+ - Missing config means enabled. Only an explicit `false` disables the loop.
40
+ - If disabled, skip the review loop, note the skip in the calling skill's handoff/status output, and continue without pretending the artifact was reviewed.
41
+
42
+ 2. **Resolve the retry bound**
43
+ - Read `oat_orchestration_retry_limit` from the active project state.
44
+ - If absent, invalid, or unavailable, use default `2`.
45
+ - The bound controls rewrite/re-dispatch cycles after the initial review. A bound of `0` still permits the initial structured review, then surfaces residual findings without retrying.
46
+
47
+ 3. **Dispatch `oat-reviewer` in structured mode**
48
+ - Tier 1: use the configured `oat-reviewer` subagent when available and authorized.
49
+ - Tier 2: if Tier 1 is unavailable or declined, run the same reviewer prompt inline with the same payload and checklist.
50
+ - Always set `oat_output_mode: structured`; the loop consumes `StructuredFindings` in-memory and the reviewer writes no artifact.
51
+ - Do not downgrade the checklist when falling back inline. The fallback changes only execution tier, not review requirements.
52
+
53
+ 4. **Apply or offer fixes by severity**
54
+ - If the structured review is clean, proceed to outcome recording.
55
+ - Apply Critical and Important fixes by default when they are local to the reviewed artifact and the fix is unambiguous.
56
+ - Offer Medium and Minor fixes to the user instead of applying them silently.
57
+ - If a finding cannot be fixed within the artifact boundary, preserve it as residual and surface it before handoff.
58
+
59
+ 5. **Rewrite and re-dispatch within the bound**
60
+ - After applying fixes, rewrite the artifact and re-dispatch `oat-reviewer` with the same target payload.
61
+ - Each rewrite/re-dispatch cycle consumes one retry.
62
+ - Stop when the reviewer returns no findings or when the retry bound is exhausted.
63
+
64
+ 6. **Record the outcome**
65
+ - Record a clean pass or residual findings in the calling skill's lifecycle output before handoff.
66
+ - For `plan`, update the `plan` artifact row in the Reviews table without deleting any existing rows. Use `passed` when clean; if residual findings remain, preserve enough detail in the handoff for the next skill/user to act.
67
+ - For `analysis`, mark the analysis artifact as reviewed/verified using the calling skill's analysis-tracking convention, and surface any residual findings before the corresponding apply skill consumes it.
68
+
26
69
  ## Canonical Plan Format
27
70
 
28
71
  Every `plan.md` produced or edited by any OAT skill **must** satisfy these invariants.
@@ -98,7 +141,7 @@ If any required section is missing when a skill edits `plan.md`, it must be rest
98
141
 
99
142
  ### Review Table Preservation Rules
100
143
 
101
- - The `## Reviews` table includes both **code** rows (`p01`, `p02`, …, `final`) and **artifact** rows (`spec`, `design`).
144
+ - The `## Reviews` table includes both **code** rows (`p01`, `p02`, …, `final`) and **artifact** rows (`spec`, `design`, `plan`).
102
145
  - Skills must **never delete** existing review rows.
103
146
  - New rows may be appended (e.g., `p03` for a newly added phase).
104
147
  - Status semantics: `pending` → `received` → `fixes_added` → `fixes_completed` → `passed`.
@@ -1,8 +1,8 @@
1
1
  ---
2
2
  name: oat-project-progress
3
- version: 1.2.4
4
- description: Use when resuming work, checking status, or unsure which OAT skill to run next. Evaluates project progress and routes to the appropriate next step.
5
- disable-model-invocation: true
3
+ version: 1.2.5
4
+ description: Use when the user explicitly asks to check OAT project progress — e.g. "check progress", "what's next", "where are we", or confirms a previously offered progress check. Do NOT auto-invoke just because a workflow step completed. Reads project status and offers the next route.
5
+ disable-model-invocation: false
6
6
  user-invocable: true
7
7
  allowed-tools: Read, Glob, Grep, Bash(git:*), AskUserQuestion
8
8
  ---
@@ -35,6 +35,12 @@ Run `oat-project-progress` at any time to:
35
35
  - See current project status
36
36
  - Get recommended next skill
37
37
 
38
+ ## Model Invocation Routing
39
+
40
+ This skill is model-invokable for explicit read-only status and routing asks such as "check progress" or "what's next". It has no active-project gate because it can safely report that no project is active.
41
+
42
+ Do NOT auto-invoke only because another workflow step finished. If model-invoked, offer to check progress first when the user's intent is ambiguous. After reporting status, offer the recommended next skill before routing to it.
43
+
38
44
  ## Process
39
45
 
40
46
  ### Step 1: Check Knowledge Base Exists
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: oat-project-quick-start
3
- version: 2.1.4
3
+ version: 2.1.6
4
4
  description: Use when a task is small enough for quick mode or rapid iteration is preferred. Scaffolds a lightweight OAT project from discovery directly to a runnable plan, with optional brainstorming and lightweight design.
5
5
  argument-hint: '<project-name> ["project description"]'
6
6
  disable-model-invocation: true
@@ -57,13 +57,14 @@ When executing this skill, provide lightweight progress feedback so the user can
57
57
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
58
58
 
59
59
  - Before multi-step work, print step indicators, e.g.:
60
- - `[0/6] Checking inherited git state...`
61
- - `[1/6] Scaffolding quick-mode project…`
62
- - `[2/6] Exploring solution space + capturing discovery…`
63
- - `[3/6] Decision point: design depth…`
64
- - `[4/6] Generating execution plan…`
65
- - `[5/6] Initializing implementation tracker…`
66
- - `[6/6] Refreshing dashboard…`
60
+ - `[0/7] Checking inherited git state...`
61
+ - `[1/7] Scaffolding quick-mode project…`
62
+ - `[2/7] Exploring solution space + capturing discovery…`
63
+ - `[3/7] Decision point: design depth…`
64
+ - `[4/7] Generating execution plan…`
65
+ - `[5/7] Running plan artifact review…`
66
+ - `[6/7] Initializing implementation tracker…`
67
+ - `[7/7] Refreshing dashboard…`
67
68
  - _(If lightweight design is chosen, insert design steps between 3 and 4)_
68
69
 
69
70
  ## Artifact Persistence (Required)
@@ -423,6 +424,14 @@ git add "$PROJECT_PATH/design.md" "$PROJECT_PATH/state.md"
423
424
  git diff --cached --quiet || git commit -m "chore(oat): capture quick-start design for {project-name}"
424
425
  ```
425
426
 
427
+ Complete discovery through the CLI validation boundary before proceeding to plan generation:
428
+
429
+ ```bash
430
+ oat project complete-discovery "$PROJECT_PATH" --ready-for oat-project-quick-start
431
+ git add "$PROJECT_PATH/discovery.md" "$PROJECT_PATH/state.md"
432
+ git diff --cached --quiet || git commit -m "chore(oat): complete quick-start discovery for {project-name}"
433
+ ```
434
+
426
435
  ### Step 3: Generate Plan Directly
427
436
 
428
437
  Create/update `"$PROJECT_PATH/plan.md"` from `.oat/templates/plan.md`.
@@ -513,6 +522,27 @@ must block before work starts if it still cannot resolve a ceiling.
513
522
  Do not treat provider default effort as the OAT dispatch ceiling. Provider
514
523
  default is informational for base/unpinned roles only.
515
524
 
525
+ ### Step 3.6: Run Plan Artifact Review Loop
526
+
527
+ Invoke the shared `Auto Artifact-Review Loop` from `oat-project-plan-writing` with target `plan` before syncing project state or handing off to implementation.
528
+
529
+ Required payload:
530
+
531
+ - `target: plan`
532
+ - `type: artifact`
533
+ - `scope: plan`
534
+ - `artifact_path: "$PROJECT_PATH/plan.md"`
535
+ - `oat_output_mode: structured`
536
+
537
+ Apply the shared loop exactly:
538
+
539
+ - Resolve `workflow.autoArtifactReview.plan`; only an explicit `false` skips the loop.
540
+ - Resolve `oat_orchestration_retry_limit` from project state, defaulting to `2`.
541
+ - Dispatch `oat-reviewer` in structured mode using Tier 1 subagent when available and Tier 2 inline fallback otherwise.
542
+ - Apply Critical and Important artifact-local fixes when unambiguous; offer Medium and Minor fixes instead of silently applying them.
543
+ - Re-dispatch after rewrites until clean or the retry bound is exhausted.
544
+ - Update the `plan` artifact row in the `## Reviews` table to `passed` when clean. If residual findings remain, preserve the row and surface the residual findings before downstream handoff.
545
+
516
546
  ### Step 4: Sync Project State
517
547
 
518
548
  Update `"$PROJECT_PATH/state.md"`:
@@ -527,6 +557,7 @@ Recommended quick-mode gate defaults:
527
557
 
528
558
  - keep implementation phase checkpoints via `oat_plan_hill_phases`
529
559
  - do not require discovery/spec/design artifact review rows to be passed before implementation
560
+ - record the `plan` artifact review row from Step 3.6 unless `workflow.autoArtifactReview.plan` was explicitly disabled
530
561
 
531
562
  ### Step 5: Initialize Implementation Tracking
532
563
 
@@ -577,5 +608,6 @@ Report:
577
608
  - ✅ `state.md` marks `oat_workflow_mode: quick`.
578
609
  - ✅ `discovery.md` contains synthesized or backfilled quick discovery decisions from the session context.
579
610
  - ✅ `plan.md` is complete and executable (`oat_ready_for: oat-project-implement`).
611
+ - ✅ `plan.md` records the plan artifact review row unless `workflow.autoArtifactReview.plan` was explicitly disabled.
580
612
  - ✅ `implementation.md` is initialized for resumable execution.
581
613
  - ✅ Changed quick-start artifacts are committed before handoff or pause; `.oat/state.md` is refreshed locally when available.
@@ -1,8 +1,8 @@
1
1
  ---
2
2
  name: oat-project-review-provide
3
- version: 1.3.5
4
- description: Use when completed work in an active OAT project needs a quality gate before merge. Performs a lifecycle-scoped review after a task, phase, or full implementation, unlike oat-review-provide.
5
- disable-model-invocation: true
3
+ version: 1.3.7
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
+ disable-model-invocation: false
6
6
  user-invocable: true
7
7
  allowed-tools: Read, Glob, Grep, Bash(git:*), AskUserQuestion
8
8
  ---
@@ -19,10 +19,18 @@ Reviewers should distinguish implementation defects from artifact drift. If code
19
19
 
20
20
  ## Prerequisites
21
21
 
22
- **Required:** Active project with at least one completed task.
22
+ **Required:** Active project or explicit user-provided project/review target that resolves to project state, with at least one completed task.
23
23
 
24
24
  **Required:** Core project artifacts are already committed before the review begins. Review should not be the first step that notices an untracked project tree or pending bookkeeping-only artifact edits.
25
25
 
26
+ ## Model Invocation Gate
27
+
28
+ This skill is model-invokable only for explicit review asks such as "review project" or "review the project", or when the user confirms a previously offered project-review step. Do NOT auto-invoke merely because a task, phase, or implementation appears complete.
29
+
30
+ Before acting, verify that there is an active OAT project or a user-provided review target that can be resolved to project state. If neither exists, do not run this skill; offer `oat-project-open` / `oat-project-quick-start` for project workflow setup, or `oat-review-provide` for a non-project ad-hoc review.
31
+
32
+ When the gate passes, summarize the inferred review type and scope, then ask before running the review.
33
+
26
34
  ## Mode Assertion
27
35
 
28
36
  **OAT MODE: Review Request**
@@ -84,7 +92,7 @@ Run the `oat-project-review-provide` skill and it will:
84
92
 
85
93
  ## Process
86
94
 
87
- ### Step 0: Resolve Active Project (Hard Requirement)
95
+ ### Step 0: Resolve Project or Explicit Review Target
88
96
 
89
97
  OAT stores active project context in `.oat/config.local.json` (`activeProject`, local-only).
90
98
 
@@ -96,21 +104,26 @@ PROJECTS_ROOT="${PROJECTS_ROOT%/}"
96
104
 
97
105
  Validation rules:
98
106
 
99
- - `PROJECT_PATH` must be set and point to an existing directory.
100
- - `"$PROJECT_PATH/state.md"` must exist for mode-aware review validation.
107
+ - Prefer `PROJECT_PATH` from `activeProject` when it is set and points to an existing directory.
108
+ - If `activeProject` is missing or invalid, allow an explicit user-provided project/review target to resolve `PROJECT_PATH`:
109
+ - project path, e.g. `.oat/projects/shared/{project-name}`
110
+ - project name, resolved as `${PROJECTS_ROOT}/{project-name}`
111
+ - review target phrasing that includes a project name or project path
112
+ - A resolved `PROJECT_PATH` must point to an existing directory.
113
+ - `"$PROJECT_PATH/state.md"` must exist for mode-aware project review validation.
101
114
 
102
- If either check fails, **stop and route**. Do not create/guess project pointers in this skill.
115
+ If neither an active project nor an explicit target resolves to a valid `PROJECT_PATH` with `state.md`, **stop and route**. Do not create or guess project pointers in this skill.
103
116
 
104
117
  Tell user:
105
118
 
106
- - This is a project-scoped skill and needs an initialized OAT project (`activeProject` in `.oat/config.local.json` + project `state.md`).
107
- - Without project state, review can still proceed via non-project skill: `oat-review-provide`.
119
+ - This is a project-scoped skill and needs an initialized OAT project, either from `activeProject` or from a project/review target the user explicitly provided.
120
+ - Without resolvable project state, review can still proceed via non-project skill: `oat-review-provide`.
108
121
  - To continue with project workflow instead, run one of:
109
122
  - `oat-project-open` (existing project)
110
123
  - `oat-project-quick-start` (new quick project)
111
124
  - `oat-project-import-plan` (external plan import)
112
125
 
113
- If validation passes, derive `{project-name}` as basename of `PROJECT_PATH`.
126
+ If validation passes, derive `{project-name}` as basename of `PROJECT_PATH`. Summarize the resolved project/review target and ask before continuing to Step 1.
114
127
 
115
128
  ### Step 1: Parse Arguments or Ask
116
129
 
@@ -1,10 +1,10 @@
1
1
  ---
2
2
  name: oat-project-review-receive
3
- version: 1.5.1
4
- description: Use when review findings from oat-project-review-provide need closure. Converts review artifacts into actionable plan tasks.
5
- disable-model-invocation: true
3
+ version: 1.5.2
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
+ disable-model-invocation: false
6
6
  user-invocable: true
7
- allowed-tools: Read, Write, Bash(git:*), Glob, Grep, AskUserQuestion
7
+ allowed-tools: Read, Write, Bash(git:*), Bash(oat:*), Glob, Grep, AskUserQuestion
8
8
  ---
9
9
 
10
10
  # Receive Review
@@ -17,10 +17,18 @@ Turn review output into plan changes and a clear next action. This closes the fe
17
17
 
18
18
  ## Prerequisites
19
19
 
20
- **Required:** An active review artifact exists in the top level of `{PROJECT_PATH}/reviews/` (not in `reviews/archived/`).
20
+ **Required:** An active project review artifact can be resolved, usually from the top level of `{PROJECT_PATH}/reviews/`. Conversational entry may first discover the latest project or ad-hoc review with `oat review latest`; ad-hoc reviews should be routed to `oat-review-receive`.
21
21
 
22
22
  This skill assumes the reviewed project artifacts were already committed before the review ran. If you discover untracked core project artifacts here, treat that as earlier workflow drift and include them in the bookkeeping fix instead of leaving the project partially tracked.
23
23
 
24
+ ## Model Invocation Gate
25
+
26
+ This skill is model-invokable only for explicit review-receive asks such as "receive review" or "process review", or when the user confirms a previously offered review-receive step. Do NOT auto-invoke just because a review artifact exists.
27
+
28
+ Before acting, resolve either an active project review or a latest ad-hoc review target. If the latest target is ad-hoc, offer to route to `oat-review-receive` instead of processing it with this project lifecycle skill. If no target is resolvable, offer `oat-project-review-provide` for project reviews or `oat-review-provide` for ad-hoc reviews.
29
+
30
+ When a project review target is resolvable, summarize the selected review path, scope, and generated date, then ask before updating artifacts.
31
+
24
32
  ## Mode Assertion
25
33
 
26
34
  **OAT MODE: Receive Review**
@@ -76,27 +84,39 @@ PROJECTS_ROOT="${PROJECTS_ROOT%/}"
76
84
 
77
85
  **If `PROJECT_PATH` is missing/invalid:**
78
86
 
79
- - Ask the user for `{project-name}`
80
- - Set `PROJECT_PATH` to `${PROJECTS_ROOT}/{project-name}`
81
- - Write it for future use:
82
- ```bash
83
- mkdir -p .oat
84
- oat config set activeProject "$PROJECT_PATH"
85
- ```
87
+ - Continue to Step 1 without a project path so `oat review latest` can still discover ad-hoc review targets.
88
+ - Do not guess or write `activeProject` during model-invoked target discovery.
89
+ - If the user explicitly names a project, set `PROJECT_PATH` to `${PROJECTS_ROOT}/{project-name}` and validate it before Step 1.
86
90
 
87
91
  **If `PROJECT_PATH` is valid:** derive `{project-name}` as the directory name (basename of the path).
88
92
 
89
- ### Step 1: Locate Active Review Artifact
93
+ ### Step 1: Locate Latest Review Artifact
90
94
 
91
95
  ```bash
92
- ls -t "$PROJECT_PATH/reviews/"*.md 2>/dev/null | head -10
96
+ if [ -n "${PROJECT_PATH:-}" ] && [ -d "$PROJECT_PATH" ]; then
97
+ oat review latest --project "$PROJECT_PATH" --json
98
+ else
99
+ oat review latest --json
100
+ fi
93
101
  ```
94
102
 
95
103
  Selection rules:
96
104
 
97
- - Only process active review artifacts in the top level of `"$PROJECT_PATH/reviews/"`.
98
- - Ignore anything already under `"$PROJECT_PATH/reviews/archived/"`.
99
- - Treat archived artifacts as history only; do not offer them as receive candidates.
105
+ - 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.
106
+ - Read the JSON result:
107
+ - `path: null` means no review target was found.
108
+ - `kind: "project"` means this skill can process the target when the path is an active top-level project review.
109
+ - `kind: "adhoc"` means route to `oat-review-receive` after offering that handoff to the user.
110
+ - Only process active project review artifacts in the top level of `"$PROJECT_PATH/reviews/"`.
111
+ - 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`.
112
+
113
+ Fallback when the CLI is unavailable:
114
+
115
+ ```bash
116
+ ls -t "$PROJECT_PATH/reviews/"*.md 2>/dev/null | head -10
117
+ ```
118
+
119
+ Use this fallback only for active project reviews. It cannot discover ad-hoc reviews and its filesystem ordering is less reliable than `oat_generated_at`, so state that limitation if fallback is used.
100
120
 
101
121
  **If no active review files:** Block and ask user to run the `oat-project-review-provide` skill first.
102
122
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/config/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAIhF,OAAO,EACL,KAAK,SAAS,EACd,KAAK,cAAc,EAGnB,KAAK,UAAU,EAQhB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAEL,KAAK,cAAc,EAEpB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA4DpC,UAAU,yBAAyB;IACjC,mBAAmB,EAAE,CACnB,OAAO,EAAE,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC,CAAC,CAAC,KAC/C,cAAc,CAAC;IACpB,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,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,CAAC,CAAC;IAClE,mBAAmB,EAAE,CACnB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,cAAc,KACnB,OAAO,CAAC,IAAI,CAAC,CAAC;IACnB,cAAc,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,OAAO,CAAC,UAAU,CAAC,CAAC;IAC/D,eAAe,EAAE,CAAC,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9E,mBAAmB,EAAE,CACnB,QAAQ,EAAE,MAAM,EAChB,GAAG,EAAE,MAAM,CAAC,UAAU,KACnB,OAAO,CAAC,MAAM,CAAC,CAAC;IACrB,sBAAsB,EAAE,CACtB,QAAQ,EAAE,MAAM,EAChB,aAAa,EAAE,MAAM,EACrB,GAAG,EAAE,MAAM,CAAC,UAAU,KACnB,OAAO,CAAC,cAAc,CAAC,CAAC;IAC7B,UAAU,EAAE,MAAM,CAAC,UAAU,CAAC;CAC/B;AAysCD,wBAAgB,mBAAmB,CACjC,SAAS,GAAE,OAAO,CAAC,yBAAyB,CAAM,GACjD,OAAO,CA0GT"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/config/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAIhF,OAAO,EACL,KAAK,SAAS,EACd,KAAK,cAAc,EAGnB,KAAK,UAAU,EAQhB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAEL,KAAK,cAAc,EAEpB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA8DpC,UAAU,yBAAyB;IACjC,mBAAmB,EAAE,CACnB,OAAO,EAAE,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC,CAAC,CAAC,KAC/C,cAAc,CAAC;IACpB,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,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,CAAC,CAAC;IAClE,mBAAmB,EAAE,CACnB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,cAAc,KACnB,OAAO,CAAC,IAAI,CAAC,CAAC;IACnB,cAAc,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,OAAO,CAAC,UAAU,CAAC,CAAC;IAC/D,eAAe,EAAE,CAAC,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9E,mBAAmB,EAAE,CACnB,QAAQ,EAAE,MAAM,EAChB,GAAG,EAAE,MAAM,CAAC,UAAU,KACnB,OAAO,CAAC,MAAM,CAAC,CAAC;IACrB,sBAAsB,EAAE,CACtB,QAAQ,EAAE,MAAM,EAChB,aAAa,EAAE,MAAM,EACrB,GAAG,EAAE,MAAM,CAAC,UAAU,KACnB,OAAO,CAAC,cAAc,CAAC,CAAC;IAC7B,UAAU,EAAE,MAAM,CAAC,UAAU,CAAC;CAC/B;AAkvCD,wBAAgB,mBAAmB,CACjC,SAAS,GAAE,OAAO,CAAC,yBAAyB,CAAM,GACjD,OAAO,CA0GT"}
@@ -40,6 +40,8 @@ const KEY_ORDER = [
40
40
  'workflow.reviewExecutionModel',
41
41
  'workflow.autoReviewAtHillCheckpoints',
42
42
  'workflow.autoNarrowReReviewScope',
43
+ 'workflow.autoArtifactReview.plan',
44
+ 'workflow.autoArtifactReview.analysis',
43
45
  'workflow.designMode',
44
46
  'workflow.dispatchCeiling.preset',
45
47
  'workflow.dispatchCeiling.providers.codex',
@@ -410,6 +412,28 @@ const CONFIG_CATALOG = [
410
412
  owningCommand: 'oat config set workflow.autoNarrowReReviewScope <true|false>',
411
413
  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.',
412
414
  },
415
+ {
416
+ key: 'workflow.autoArtifactReview.plan',
417
+ group: 'Workflow Preferences (3-layer: local > shared > user)',
418
+ file: '.oat/config.local.json | .oat/config.json | ~/.oat/config.json',
419
+ scope: 'workflow',
420
+ type: 'boolean',
421
+ defaultValue: 'true',
422
+ mutability: 'read/write',
423
+ owningCommand: 'oat config set workflow.autoArtifactReview.plan <true|false>',
424
+ description: 'Automatically run the bounded artifact-review loop for generated plan artifacts before implementation handoff. Resolution: local > shared > user > default.',
425
+ },
426
+ {
427
+ key: 'workflow.autoArtifactReview.analysis',
428
+ group: 'Workflow Preferences (3-layer: local > shared > user)',
429
+ file: '.oat/config.local.json | .oat/config.json | ~/.oat/config.json',
430
+ scope: 'workflow',
431
+ type: 'boolean',
432
+ defaultValue: 'true',
433
+ mutability: 'read/write',
434
+ owningCommand: 'oat config set workflow.autoArtifactReview.analysis <true|false>',
435
+ description: 'Automatically run the bounded accuracy-review loop for generated analysis artifacts before apply workflows consume them. Resolution: local > shared > user > default.',
436
+ },
413
437
  {
414
438
  key: 'workflow.designMode',
415
439
  group: 'Workflow Preferences (3-layer: local > shared > user)',
@@ -530,6 +554,8 @@ const WORKFLOW_BOOLEAN_KEYS = new Set([
530
554
  'workflow.createPrOnComplete',
531
555
  'workflow.autoReviewAtHillCheckpoints',
532
556
  'workflow.autoNarrowReReviewScope',
557
+ 'workflow.autoArtifactReview.plan',
558
+ 'workflow.autoArtifactReview.analysis',
533
559
  ]);
534
560
  function isWorkflowKey(key) {
535
561
  return key.startsWith('workflow.');
@@ -638,6 +664,16 @@ function applyWorkflowValue(workflow, key, value) {
638
664
  },
639
665
  };
640
666
  }
667
+ if (subKey.startsWith('autoArtifactReview.')) {
668
+ const reviewKey = subKey.slice('autoArtifactReview.'.length);
669
+ return {
670
+ ...workflow,
671
+ autoArtifactReview: {
672
+ ...workflow.autoArtifactReview,
673
+ [reviewKey]: value,
674
+ },
675
+ };
676
+ }
641
677
  return {
642
678
  ...workflow,
643
679
  [subKey]: value,
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAsBzC,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAoBvD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAuBzC,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAqBvD"}
@@ -13,6 +13,7 @@ import { createProjectCommand } from './project/index.js';
13
13
  import { createProvidersCommand } from './providers/index.js';
14
14
  import { createRemoveCommand } from './remove/index.js';
15
15
  import { createRepoCommand } from './repo/index.js';
16
+ import { createReviewCommand } from './review/index.js';
16
17
  import { createStateCommand } from './state/index.js';
17
18
  import { createStatusCommand } from './status/index.js';
18
19
  import { createSyncCommand } from './sync/index.js';
@@ -27,6 +28,7 @@ export function registerCommands(program) {
27
28
  program.addCommand(createProvidersCommand());
28
29
  program.addCommand(createRemoveCommand());
29
30
  program.addCommand(createRepoCommand());
31
+ program.addCommand(createReviewCommand());
30
32
  program.addCommand(createDoctorCommand());
31
33
  program.addCommand(createCleanupCommand());
32
34
  program.addCommand(createDocsCommand());
@@ -0,0 +1,3 @@
1
+ import { Command } from 'commander';
2
+ export declare function createReviewCommand(): Command;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/review/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,wBAAgB,mBAAmB,IAAI,OAAO,CAI7C"}
@@ -0,0 +1,7 @@
1
+ import { Command } from 'commander';
2
+ import { createReviewLatestCommand } from './latest.js';
3
+ export function createReviewCommand() {
4
+ return new Command('review')
5
+ .description('OAT review artifact commands')
6
+ .addCommand(createReviewLatestCommand());
7
+ }
@@ -0,0 +1,23 @@
1
+ import { type CommandContext, type GlobalOptions } from '../../app/command-context.js';
2
+ import { type OatLocalConfig } from '../../config/oat-config.js';
3
+ import { Command } from 'commander';
4
+ export type ReviewLatestKind = 'project' | 'adhoc';
5
+ export interface LatestReview {
6
+ path: string;
7
+ scope: string;
8
+ generatedAt: string;
9
+ kind: ReviewLatestKind;
10
+ }
11
+ export interface FindLatestReviewOptions {
12
+ repoRoot: string;
13
+ projectPath?: string | null;
14
+ }
15
+ interface ReviewLatestDependencies {
16
+ buildCommandContext: (options: GlobalOptions) => CommandContext;
17
+ resolveProjectRoot: (cwd: string) => Promise<string>;
18
+ readOatLocalConfig: (repoRoot: string) => Promise<OatLocalConfig>;
19
+ }
20
+ export declare function findLatestReview(options: FindLatestReviewOptions): Promise<LatestReview | null>;
21
+ export declare function createReviewLatestCommand(overrides?: Partial<ReviewLatestDependencies>): Command;
22
+ export {};
23
+ //# sourceMappingURL=latest.d.ts.map
@@ -0,0 +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;AAM9B,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;CACxB;AAQD,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AAED,UAAU,wBAAwB;IAChC,mBAAmB,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,cAAc,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;AA6HD,wBAAsB,gBAAgB,CACpC,OAAO,EAAE,uBAAuB,GAC/B,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,CAmE9B;AA+CD,wBAAgB,yBAAyB,CACvC,SAAS,GAAE,OAAO,CAAC,wBAAwB,CAAM,GAChD,OAAO,CAkBT"}