@open-agent-toolkit/cli 0.0.26 → 0.0.28

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.
@@ -52,6 +52,24 @@ What each command is for:
52
52
  - `oat config describe` shows the supported config catalog across shared repo, repo-local, user, and sync/provider surfaces.
53
53
  - `oat config describe <key>` shows file, scope, default, mutability, owning command, and description for one key.
54
54
 
55
+ ### Source labels
56
+
57
+ `oat config get --json` and `oat config list` emit a `source` field identifying which config surface a resolved value came from. The current labels are:
58
+
59
+ | Label | Meaning |
60
+ | --------- | ---------------------------------------------------------------------------------- |
61
+ | `env` | Value came from an environment variable override (e.g. `OAT_PROJECTS_ROOT`) |
62
+ | `local` | Value came from `.oat/config.local.json` (per-developer repo state) |
63
+ | `shared` | Value came from `.oat/config.json` (team-shared repo settings) |
64
+ | `user` | Value came from `~/.oat/config.json` (user-level fallback) |
65
+ | `default` | No surface set the key; value is the CLI's built-in default (or `null` when unset) |
66
+
67
+ These labels match what `oat config dump` emits, so tooling that consumes either command can rely on the same vocabulary.
68
+
69
+ :::note Upgrade note
70
+ Earlier CLI versions returned `config.json` / `config.local.json` / `env` / `default` as the `source` strings. External scripts that previously matched on `"source":"config.json"` or `"source":"config.local.json"` should update to match the new `shared` / `local` labels. This change was made to align the `oat config get` / `oat config list` output with `oat config dump` and to avoid confusing users about which file was consulted.
71
+ :::
72
+
55
73
  ## Shared repo config you will touch most often
56
74
 
57
75
  Common keys in `.oat/config.json`:
@@ -110,6 +128,96 @@ oat config get lastPausedProject
110
128
  oat config describe activeIdea
111
129
  ```
112
130
 
131
+ ## Workflow preferences (`workflow.*`)
132
+
133
+ Workflow preferences let power users answer repetitive confirmation prompts once and have OAT workflow skills respect those answers automatically. They are the highest-value escape hatch from interactive friction when you always make the same choices.
134
+
135
+ ### Preference keys
136
+
137
+ All six workflow preference keys live under the `workflow.*` namespace:
138
+
139
+ - `workflow.hillCheckpointDefault` — `every` or `final`. Default HiLL checkpoint behavior in `oat-project-implement`: pause after every phase or only after the last phase. When unset, the skill prompts.
140
+ - `workflow.archiveOnComplete` — boolean. Skip the "Archive after completion?" prompt in `oat-project-complete`. When unset, the skill prompts.
141
+ - `workflow.createPrOnComplete` — boolean. Skip the "Open a PR?" prompt in `oat-project-complete`; when true, completion auto-triggers PR creation. When unset, the skill prompts.
142
+ - `workflow.postImplementSequence` — `wait`, `summary`, `pr`, or `docs-pr`. Controls what `oat-project-implement` chains after final review passes. `wait` stops without auto-chaining, `summary` runs only `oat-project-summary`, `pr` runs `oat-project-pr-final` (which auto-generates summary), `docs-pr` runs `oat-project-document` then `oat-project-pr-final`. When unset, the skill prompts.
143
+ - `workflow.reviewExecutionModel` — `subagent`, `inline`, or `fresh-session`. Default final-review execution model in `oat-project-implement`. `subagent` and `inline` run automatically. `fresh-session` is a soft preference: the skill prints guidance to run the review in another session but still offers escape hatches to `subagent` or `inline` if you change your mind. When unset, the skill prompts.
144
+ - `workflow.autoNarrowReReviewScope` — boolean. Auto-narrow re-review scope to fix-task commits only in `oat-project-review-provide`. When unset, the skill prompts.
145
+
146
+ ### Three-layer resolution
147
+
148
+ Workflow preferences resolve through three config surfaces, with `env > local > shared > user > default` precedence per key. This is the same generic resolution used by `oat config dump`:
149
+
150
+ - **User-level** (`~/.oat/config.json`): personal defaults that apply to every repo. This is where most power users should start — set preferences once, never worry about them again.
151
+ - **Shared repo** (`.oat/config.json`): team decisions for this repo. Overrides user defaults when present.
152
+ - **Repo-local** (`.oat/config.local.json`): personal override for this specific repo. Highest precedence per key.
153
+
154
+ ### Setting preferences
155
+
156
+ `oat config set` supports mutually exclusive surface flags for workflow keys:
157
+
158
+ ```bash
159
+ # User-level: applies to all repos on this machine
160
+ oat config set workflow.hillCheckpointDefault final --user
161
+ oat config set workflow.archiveOnComplete true --user
162
+ oat config set workflow.createPrOnComplete true --user
163
+ oat config set workflow.postImplementSequence pr --user
164
+ oat config set workflow.reviewExecutionModel subagent --user
165
+ oat config set workflow.autoNarrowReReviewScope true --user
166
+
167
+ # Shared repo: team decision for this repo
168
+ oat config set workflow.createPrOnComplete false --shared
169
+
170
+ # Repo-local: personal override for this repo (default when no flag)
171
+ oat config set workflow.hillCheckpointDefault every
172
+ ```
173
+
174
+ Default (no flag) targets `.oat/config.local.json` for workflow keys. Pass at most one of `--user`, `--shared`, or `--local`. Structural keys (`projects.root`, `worktrees.root`, `git.*`, `documentation.*`, `archive.*`, `tools.*`) are still shared-only regardless of flag.
175
+
176
+ ### Choosing the right surface (personal vs per-repo)
177
+
178
+ Not every workflow preference belongs at user level, even though "set once, applies everywhere" is tempting. The guiding principle:
179
+
180
+ > **If a workflow preference's correctness depends on other repo-level settings, it belongs at shared (per-repo) level, not user level.**
181
+
182
+ Some preferences are **genuinely personal** — their correct value is the same for you regardless of which repo you're in. These are safe to set at `--user`:
183
+
184
+ - `workflow.hillCheckpointDefault` — your personal tolerance for mid-implementation interruption
185
+ - `workflow.reviewExecutionModel` — depends on your provider environment (Claude Code, Cursor, Codex), not the repo
186
+ - `workflow.autoNarrowReReviewScope` — pure personal workflow preference, no per-repo interaction
187
+
188
+ Other preferences **depend on per-repo configuration** to be safe. These should be set at `--shared` (in each repo where they apply), not `--user`:
189
+
190
+ - `workflow.archiveOnComplete` — correctness depends on the repo's `archive.s3Uri` / `archive.s3SyncOnComplete` being configured. A user-level `true` would try to archive in repos that aren't set up for it.
191
+ - `workflow.postImplementSequence` — correctness depends on `documentation.requireForProjectCompletion`. Setting `pr` at user level would foot-gun you in any repo that requires docs, because completion would later block on the docs gate while the PR is already open.
192
+ - `workflow.createPrOnComplete` — this key is almost always redundant with `postImplementSequence`-driven flows. When it's meaningful, its correctness depends on the same per-repo docs and PR gates. Prefer shared scope, or omit it entirely and rely on `postImplementSequence: pr` or `docs-pr` to handle PR creation at the end of implement.
193
+
194
+ **Cross-repo foot-gun example:** If you set `workflow.createPrOnComplete: true --user`, it applies to every repo you work on. In a repo with `documentation.requireForProjectCompletion: true` and `postImplementSequence: pr` (no docs step), running `oat-project-complete` would try to auto-create a PR, then immediately hit the docs gate and block you — leaving you with an open PR and a stuck completion. Your user-level preference silently asserted something that only holds in a specific shared-config shape.
195
+
196
+ **Recommended split for most users:**
197
+
198
+ ```bash
199
+ # Personal defaults (apply everywhere)
200
+ oat config set workflow.hillCheckpointDefault final --user
201
+ oat config set workflow.reviewExecutionModel subagent --user
202
+ oat config set workflow.autoNarrowReReviewScope true --user
203
+
204
+ # Per-repo team decisions (set in each repo where they apply)
205
+ oat config set workflow.archiveOnComplete true --shared
206
+ oat config set workflow.postImplementSequence docs-pr --shared # or "pr" if docs aren't required
207
+ ```
208
+
209
+ If you want to override a shared team decision for this specific checkout, use `--local`:
210
+
211
+ ```bash
212
+ oat config set workflow.archiveOnComplete false --local # "I don't want to archive on this specific branch checkout"
213
+ ```
214
+
215
+ ### Relationship to `autoReviewAtCheckpoints`
216
+
217
+ The existing `autoReviewAtCheckpoints` key (top-level in `.oat/config.json`) was **not** migrated under the `workflow.*` namespace to preserve backward compatibility. It remains shared-scope-only and controls whether `oat-project-implement` auto-triggers code reviews at plan phase checkpoints. That is a separate behavioral toggle from the workflow preferences above — it affects when reviews happen, not which prompt-skipping defaults apply.
218
+
219
+ If you enable both, you get a near-uninterrupted lifecycle: auto-review runs at checkpoints, fix tasks are converted automatically, and the workflow preferences skip every remaining confirmation prompt.
220
+
113
221
  ## Provider sync config is different
114
222
 
115
223
  Provider sync settings are intentionally documented in the same discovery flow, but they are not owned by `oat config set`.
@@ -39,3 +39,28 @@ Notable inspection commands introduced in the current CLI surface:
39
39
  - `oat config dump --json` - merged config with source attribution
40
40
  - `oat project status --json` - full parsed state for the active tracked project
41
41
  - `oat project list --json` - summary state for tracked projects under the configured projects root
42
+
43
+ ## `oat config` surface flags
44
+
45
+ `oat config set` supports mutually exclusive surface flags that control which config file receives the write:
46
+
47
+ - `--shared` — write to `.oat/config.json` (committed team repo settings)
48
+ - `--local` — write to `.oat/config.local.json` (per-developer repo state, gitignored)
49
+ - `--user` — write to `~/.oat/config.json` (user-level fallback, applies across all repos)
50
+
51
+ When no flag is passed, the CLI picks a sensible default per key type: structural keys (`projects.root`, `documentation.*`, etc.) go to shared, state keys (`activeProject`, etc.) go to local, workflow preferences (`workflow.*`) go to local. Pass at most one flag — the command rejects multiple surface flags.
52
+
53
+ Per-key restrictions apply: structural keys can only be written at shared scope, most state keys can only be written at local scope (`activeIdea` is the exception — it accepts both local and user), and `autoReviewAtCheckpoints` remains shared-only. Workflow preference keys accept any non-auto surface.
54
+
55
+ ## `workflow.*` preference keys
56
+
57
+ The `workflow.*` namespace holds user-facing workflow preferences that let you answer repetitive confirmation prompts once and have OAT skills respect the answer automatically. Six keys:
58
+
59
+ - `workflow.hillCheckpointDefault` (`every` | `final`) — default HiLL checkpoint behavior in `oat-project-implement`
60
+ - `workflow.archiveOnComplete` (`boolean`) — skip the archive prompt in `oat-project-complete`
61
+ - `workflow.createPrOnComplete` (`boolean`) — skip the "Open a PR?" prompt in `oat-project-complete`
62
+ - `workflow.postImplementSequence` (`wait` | `summary` | `pr` | `docs-pr`) — post-implementation chaining behavior
63
+ - `workflow.reviewExecutionModel` (`subagent` | `inline` | `fresh-session`) — default final-review execution model
64
+ - `workflow.autoNarrowReReviewScope` (`boolean`) — auto-narrow re-review scope to fix-task commits
65
+
66
+ All six keys resolve through the 3-layer precedence chain (`env > local > shared > user > default`). See [Workflow preferences in the Configuration guide](../cli-utilities/configuration.md#workflow-preferences-workflow) for full descriptions, surface guidance, and cross-repo foot-gun examples.
@@ -46,6 +46,23 @@ It then writes the confirmed value into `plan.md`. If the field is later missing
46
46
 
47
47
  Listed phases are where you stop **after completing them**, not before. `["p03"]` means "complete p03, then pause" — not "pause before starting p03." Setting the last phase ID (e.g., `["p03"]` when p03 is final) means "stop only at the end of implementation."
48
48
 
49
+ ### Setting a default via `workflow.hillCheckpointDefault`
50
+
51
+ The first-run checkpoint prompt can be skipped entirely by setting the `workflow.hillCheckpointDefault` preference:
52
+
53
+ - `every` — automatically write `oat_plan_hill_phases: []` (pause after every phase) without prompting
54
+ - `final` — automatically write `oat_plan_hill_phases: ["<final-phase-id>"]` (pause only at the end) without prompting
55
+
56
+ When set, `oat-project-implement` reads the preference before the prompt and prints `HiLL checkpoints: <every|final> (from workflow.hillCheckpointDefault)`, skipping the interactive choice. When unset (default), the skill prompts as before.
57
+
58
+ This is a personal preference — typically set at user scope so it applies to every repo:
59
+
60
+ ```bash
61
+ oat config set workflow.hillCheckpointDefault final --user
62
+ ```
63
+
64
+ See [Workflow preferences in the Configuration guide](../../cli-utilities/configuration.md#workflow-preferences-workflow) for the full list of preference keys and surface guidance.
65
+
49
66
  ## Reference artifacts
50
67
 
51
68
  - `.oat/templates/plan.md`
@@ -199,6 +199,12 @@ Capture lane progression:
199
199
  - Stop at configured HiLL checkpoints.
200
200
  - Do not move lifecycle forward when required review gates are unresolved.
201
201
 
202
+ ## Reducing lifecycle friction with workflow preferences
203
+
204
+ The lifecycle has several interactive prompts that power users often answer the same way every time — HiLL checkpoint behavior, archive on complete, auto-create PR, post-implementation chaining, final review execution model, and re-review scope narrowing. These can be configured once via `workflow.*` preference keys and respected automatically by skills.
205
+
206
+ See the [Workflow preferences section in the Configuration guide](../../cli-utilities/configuration.md#workflow-preferences-workflow) for the full list of keys and how to set them. Preferences resolve through a three-layer chain (`env > repo-local > repo-shared > user > default`), so you can set personal defaults at user scope once and override per-repo only when needed.
207
+
202
208
  ## Active project resolution
203
209
 
204
210
  - Active project state is stored in `.oat/config.local.json` (`activeProject`, repo-relative path).
@@ -19,6 +19,12 @@ Review loop:
19
19
  - `reviews/archived/` is the local-only historical surface. Active `reviews/` content is not gitignored by default.
20
20
  - Ad-hoc review artifacts still default to local-only orphan storage under `.oat/projects/local/orphan-reviews/`.
21
21
 
22
+ ## Bookkeeping commits (required)
23
+
24
+ Both `oat-project-review-receive` and `oat-project-review-receive-remote` conclude with a required atomic commit of `plan.md`, `implementation.md`, `state.md`, and the archived review artifact (when tracked). This is the safety net that prevents cross-agent bookkeeping drift: when a subagent runs a receive skill in isolation, the commit ensures the original agent sees a clean checkout on return.
25
+
26
+ The commit is scoped and explicit — it stages only the project's tracking files and the project's `reviews/` directory. It never uses `git add -A` or repo-wide glob patterns. Deferring this commit requires explicit user approval and must be recorded in the receive skill's summary so the original agent knows state is uncommitted.
27
+
22
28
  ## Project vs ad-hoc
23
29
 
24
30
  **Provide** (request a review):
@@ -58,6 +64,24 @@ Auto-triggered reviews use `oat_review_invocation: auto` in the review artifact
58
64
 
59
65
  This feature is opt-in and disabled by default. When disabled, the manual `oat-project-review-provide` workflow applies.
60
66
 
67
+ ## Re-review scope narrowing
68
+
69
+ When re-reviewing after fix tasks have been applied, `oat-project-review-provide` detects completed `(review)` fix tasks and offers to narrow the re-review scope to just the fix-task commits. This avoids re-examining already-approved code.
70
+
71
+ The behavior can be set as a default via `workflow.autoNarrowReReviewScope`:
72
+
73
+ - `true` — automatically narrow to fix commits, no prompt
74
+ - `false` — always use the full scope, no prompt
75
+ - unset (default) — prompt the user on each re-review
76
+
77
+ Typically set at user scope since it's a personal workflow preference:
78
+
79
+ ```bash
80
+ oat config set workflow.autoNarrowReReviewScope true --user
81
+ ```
82
+
83
+ The preference only applies when there are completed fix tasks to narrow to. Initial reviews (before any fix tasks exist) always use the full scope regardless of the preference. See [Workflow preferences in the Configuration guide](../../cli-utilities/configuration.md#workflow-preferences-workflow) for the full list of preference keys.
84
+
61
85
  ## Phase and final review
62
86
 
63
87
  Use phase-scoped review artifacts during implementation (`p01`, `p02`, etc), then run final review before project closeout.
@@ -1,6 +1,6 @@
1
1
  {
2
- "cli": "0.0.26",
3
- "docs-config": "0.0.26",
4
- "docs-theme": "0.0.26",
5
- "docs-transforms": "0.0.26"
2
+ "cli": "0.0.28",
3
+ "docs-config": "0.0.28",
4
+ "docs-theme": "0.0.28",
5
+ "docs-transforms": "0.0.28"
6
6
  }
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: oat-project-complete
3
- version: 1.3.7
3
+ version: 1.4.0
4
4
  description: Use when all implementation work is finished and the project is ready to close. Marks the OAT project lifecycle as complete.
5
5
  disable-model-invocation: true
6
6
  user-invocable: true
@@ -64,6 +64,25 @@ Ask all user questions at once so the user can answer them in a single interacti
64
64
 
65
65
  Before asking the batched questions, read `oat_pr_status` and `oat_pr_url` from `state.md` frontmatter.
66
66
 
67
+ **Workflow preference checks (before asking questions):**
68
+
69
+ Some questions can be answered automatically from workflow preferences. Read each preference before deciding whether to include its question in the batched prompt:
70
+
71
+ ```bash
72
+ ARCHIVE_PREF=$(oat config get workflow.archiveOnComplete 2>/dev/null || true)
73
+ PR_ON_COMPLETE=$(oat config get workflow.createPrOnComplete 2>/dev/null || true)
74
+ ```
75
+
76
+ - **If `ARCHIVE_PREF` is `true`:** Set `SHOULD_ARCHIVE="true"`. Skip the archive question. Print `Archive on complete: enabled (from workflow.archiveOnComplete).`
77
+ - **If `ARCHIVE_PREF` is `false`:** Set `SHOULD_ARCHIVE="false"`. Skip the archive question. Print `Archive on complete: disabled (from workflow.archiveOnComplete).`
78
+ - **If unset:** Include the archive question in the batched prompt as normal (backward compatible).
79
+ - **If `PR_ON_COMPLETE` is `true` AND no tracked open PR exists:** Set `SHOULD_OPEN_PR="true"`. Skip the Open PR question. Print `PR on complete: enabled (from workflow.createPrOnComplete).`
80
+ - **If `PR_ON_COMPLETE` is `false`:** Set `SHOULD_OPEN_PR="false"`. Skip the Open PR question. Print `PR on complete: disabled (from workflow.createPrOnComplete).`
81
+ - **If `PR_ON_COMPLETE` is unset:** Include the Open PR question in the batched prompt as normal (backward compatible).
82
+ - The existing tracked-PR skip still applies: if `oat_pr_status` is `open`, do not ask the Open PR question and do not honor `PR_ON_COMPLETE=true` — the PR already exists.
83
+
84
+ The "Ready to mark complete?" confirmation is always asked — it is a meaningful "are you sure" moment, not a preference.
85
+
67
86
  Also preflight summary status using the same freshness rules as `oat-project-summary`:
68
87
 
69
88
  - `summary.md` is `missing` when `{PROJECT_PATH}/summary.md` does not exist
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: oat-project-implement
3
- version: 1.2.2
3
+ version: 1.3.0
4
4
  description: Use when plan.md is ready for execution. Implements plan tasks sequentially with TDD discipline and state tracking.
5
5
  disable-model-invocation: true
6
6
  user-invocable: true
@@ -21,6 +21,9 @@ Execute the implementation plan task-by-task with full state tracking.
21
21
 
22
22
  **Purpose:** Execute plan tasks with TDD discipline, track progress, handle blockers.
23
23
 
24
+ **CRITICAL — Bookkeeping commits are mandatory, not optional.**
25
+ After every code commit and after every phase/review-fix completion, you MUST commit the OAT tracking files (`implementation.md`, `state.md`, `plan.md`) as a separate bookkeeping commit. Do not defer, batch, or skip these commits under the reasoning that they "aren't related to the implementation." Skipping a bookkeeping commit is the primary cause of cross-session state drift and will cause the next implementation run to fail bookkeeping cross-checks. If bookkeeping commits feel frequent, that is the intended design — they are cheap and they prevent drift.
26
+
24
27
  ## Progress Indicators (User-Facing)
25
28
 
26
29
  When executing this skill, provide lightweight progress feedback so the user can tell what’s happening after they confirm.
@@ -140,6 +143,20 @@ Determine whether this is a first implementation run:
140
143
  - If `"$PROJECT_PATH/implementation.md"` does not exist, treat as first run.
141
144
  - If it exists but still has template placeholders and no completed task evidence, treat as first run.
142
145
 
146
+ #### Workflow preference check (before prompting)
147
+
148
+ Before presenting the checkpoint prompt to the user, check if a workflow preference has been configured:
149
+
150
+ ```bash
151
+ HILL_DEFAULT=$(oat config get workflow.hillCheckpointDefault 2>/dev/null || true)
152
+ ```
153
+
154
+ - **If `HILL_DEFAULT` is `every`:** Skip the prompt. Write `oat_plan_hill_phases: []` to plan.md frontmatter. Print: `HiLL checkpoints: every phase (from workflow.hillCheckpointDefault)`. Continue to Touchpoint A.
155
+ - **If `HILL_DEFAULT` is `final`:** Skip the prompt. Determine the final phase ID from plan.md (e.g., `p05`) and write `oat_plan_hill_phases: ["<final_phase_id>"]` to plan.md frontmatter. Print: `HiLL checkpoints: final phase only (from workflow.hillCheckpointDefault)`. Continue to Touchpoint A.
156
+ - **If unset, empty, or invalid:** Fall through to the standard prompt behavior below.
157
+
158
+ This preference check only applies on first runs — resuming implementations should trust the existing `oat_plan_hill_phases` value in plan.md (or repair as bookkeeping drift).
159
+
143
160
  Prompt behavior:
144
161
 
145
162
  - **If first run:** always present a complete phase-by-phase summary and confirm checkpoint phases before any task execution. A missing `oat_plan_hill_phases` value is the normal unconfirmed state; if a value is already present, treat it as a provisional value to confirm rather than as final.
@@ -202,8 +219,8 @@ cat "$PROJECT_PATH/implementation.md" 2>/dev/null | head -20
202
219
  - Validate the task pointer:
203
220
  - If `oat_current_task_id` points at a task already marked `completed` in the body, advance to the **next incomplete** task (first `pending` / `in_progress` / `blocked` entry).
204
221
  - If all tasks are completed, skip ahead to finalization (Step 11+).
205
- - Resume from the resolved task
206
- - Ask user: "Resume from {task_id}, or start fresh (overwrite implementation.md)?"
222
+ - **Always resume** from the resolved task. Print `Resuming from {task_id}.` Do not prompt.
223
+ - **Fresh start is an explicit override only.** If the user invoked the skill with `fresh=true` (argument), warn `Starting fresh — this will overwrite implementation.md. Any draft logs will be lost.` and proceed with fresh initialization. Do not offer fresh start interactively; it is a rare edge case reserved for corrupt state or deliberate plan rewrites.
207
224
 
208
225
  **Stale-state reconciliation (approval required):**
209
226
 
@@ -339,6 +356,9 @@ Keep project state in sync after each task (recommended source of truth for “w
339
356
  - `oat_project_state_updated: "{ISO 8601 UTC timestamp}"`
340
357
 
341
358
  **Bookkeeping commit (required):**
359
+
360
+ **DO NOT SKIP.** This commit prevents state drift across sessions.
361
+
342
362
  After the code commit (Step 6) and state updates above, commit all modified OAT tracking files:
343
363
 
344
364
  ```bash
@@ -376,6 +396,9 @@ Do not use `git add -A` or glob patterns. Only commit the three OAT project file
376
396
  - `oat_project_state_updated: “{ISO 8601 UTC timestamp}”`
377
397
 
378
398
  **Bookkeeping commit (required):**
399
+
400
+ **DO NOT SKIP.** This commit prevents state drift across sessions.
401
+
379
402
  After completing the review-fix checklist above, commit all modified OAT tracking files:
380
403
 
381
404
  ```bash
@@ -449,6 +472,9 @@ When pausing:
449
472
  - Notable decisions/deviations
450
473
 
451
474
  **Bookkeeping commit (required):**
475
+
476
+ **DO NOT SKIP.** This commit prevents state drift across sessions.
477
+
452
478
  After phase summary and task pointer advancement, commit all modified OAT tracking files:
453
479
 
454
480
  ```bash
@@ -579,6 +605,9 @@ Implementation - Tasks complete; awaiting final review.
579
605
  ```
580
606
 
581
607
  **Bookkeeping commit (required):**
608
+
609
+ **DO NOT SKIP.** This commit prevents state drift across sessions.
610
+
582
611
  After updating state.md to reflect implementation completion, commit all modified OAT tracking files:
583
612
 
584
613
  ```bash
@@ -632,7 +661,43 @@ echo "$FINAL_ROW"
632
661
  **If final review is not marked `passed`:**
633
662
 
634
663
  - Tell user: "All tasks complete. Final review required before PR."
635
- - Offer review options (3-tier capability model):
664
+
665
+ **Workflow preference check (before prompting):**
666
+
667
+ ```bash
668
+ REVIEW_MODEL=$(oat config get workflow.reviewExecutionModel 2>/dev/null || true)
669
+ ```
670
+
671
+ - **If `REVIEW_MODEL` is `subagent`:** Print `Review execution: subagent (from workflow.reviewExecutionModel).` Dispatch the review subagent directly via the Task tool. No prompt.
672
+ - **If `REVIEW_MODEL` is `inline`:** Print `Review execution: inline (from workflow.reviewExecutionModel).` Run the review in-context per `oat-project-review-provide` skill. No prompt.
673
+ - **If `REVIEW_MODEL` is `fresh-session`:** This is a **soft preference with escape hatch** because the agent cannot run the review in a fresh session on the user's behalf. Print the guidance block below, then handle the user's response per the three outcomes listed after it.
674
+ - **If unset or invalid:** Fall through to the standard 3-tier prompt below.
675
+
676
+ **Fresh-session guidance block (print when `REVIEW_MODEL` is `fresh-session`):**
677
+
678
+ ```
679
+ Per your config (workflow.reviewExecutionModel: fresh-session), your
680
+ preference is to run the review in a fresh session.
681
+
682
+ Run `oat-project-review-provide code final` in a separate session, then
683
+ resume this session when the review is complete.
684
+
685
+ If you'd like to review here instead:
686
+ 1) subagent
687
+ 2) inline
688
+
689
+ Enter 1 or 2 to run the review here, or press Enter to wait.
690
+ ```
691
+
692
+ **Fresh-session response outcomes:**
693
+
694
+ - User enters `1` → dispatch the subagent review (same behavior as `REVIEW_MODEL=subagent`).
695
+ - User enters `2` → run the review inline (same behavior as `REVIEW_MODEL=inline`).
696
+ - User presses Enter (or equivalent no-input confirmation) → pause the session and wait for the fresh-session review to complete before continuing.
697
+
698
+ **Standard prompt (when preference is unset):**
699
+
700
+ Offer review options (3-tier capability model):
636
701
 
637
702
  ```
638
703
  Implementation complete. Final review required.
@@ -673,6 +738,22 @@ To run in a separate session use: oat-project-review-provide code final
673
738
 
674
739
  After final review passes (no Critical/Important findings):
675
740
 
741
+ **Workflow preference check (before prompting):**
742
+
743
+ ```bash
744
+ POST_IMPL=$(oat config get workflow.postImplementSequence 2>/dev/null || true)
745
+ ```
746
+
747
+ - **If `POST_IMPL` is `wait`:** Print `Post-implementation: wait (from workflow.postImplementSequence). Run follow-up skills manually when ready.` Exit without auto-chaining.
748
+ - **If `POST_IMPL` is `summary`:** Print `Post-implementation: summary (from workflow.postImplementSequence).` Invoke `oat-project-summary`. Stop after summary completes.
749
+ - **If `POST_IMPL` is `pr`:** Print `Post-implementation: pr (from workflow.postImplementSequence).` Invoke `oat-project-pr-final` (which auto-generates `summary.md` as part of its flow).
750
+ - **If `POST_IMPL` is `docs-pr`:** Print `Post-implementation: docs-pr (from workflow.postImplementSequence).` Invoke `oat-project-document` then `oat-project-pr-final` (summary included via pr-final).
751
+ - **If unset or invalid:** Fall through to the standard prompt below.
752
+
753
+ **Rationale:** `oat-project-pr-final` already auto-generates/refreshes `summary.md` as part of its flow, so `pr` and `docs-pr` do not need a separate summary step. The `summary` value exists as a standalone option for the rare case where you want just the summary without PR.
754
+
755
+ **Standard prompt (when preference is unset):**
756
+
676
757
  ```
677
758
  Final review passed for {project-name}.
678
759
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: oat-project-review-provide
3
- version: 1.2.3
3
+ version: 1.3.0
4
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
5
  disable-model-invocation: true
6
6
  user-invocable: true
@@ -264,7 +264,17 @@ Before resolving scope, check if this is a re-review of fixes from a prior revie
264
264
 
265
265
  1. Scan `plan.md` for tasks tagged with `(review)` in the scope being reviewed (e.g., `(p02-review)` fix tasks for a `p02` phase review or `(p02-p03-review)` for a contiguous phase-range review).
266
266
  2. If `(review)` fix tasks exist **and** their status is `completed`:
267
- - This is a re-review. Offer the user a narrowed scope:
267
+ - This is a re-review. Before prompting, check the workflow preference:
268
+
269
+ ```bash
270
+ AUTO_NARROW=$(oat config get workflow.autoNarrowReReviewScope 2>/dev/null || true)
271
+ ```
272
+
273
+ - **If `AUTO_NARROW` is `true`:** Auto-narrow. Print `Re-review scope: narrowed to fix commits (from workflow.autoNarrowReReviewScope).` Gather only the commits for completed `(review)` fix tasks (see below). Skip the prompt.
274
+ - **If `AUTO_NARROW` is `false`:** Use full scope. Print `Re-review scope: full (from workflow.autoNarrowReReviewScope).` Skip the prompt and proceed with full scope resolution below.
275
+ - **If unset:** Fall through to the standard prompt.
276
+
277
+ - Standard prompt (when preference is unset):
268
278
 
269
279
  ```
270
280
  Detected completed review fix tasks for this scope:
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: oat-project-review-receive
3
- version: 1.2.1
3
+ version: 1.3.0
4
4
  description: Use when review findings from oat-project-review-provide need closure. Converts review artifacts into actionable plan tasks.
5
5
  disable-model-invocation: true
6
6
  user-invocable: true
@@ -418,6 +418,27 @@ Rules:
418
418
  - If `"$ARCHIVED_REVIEW_PATH"` already exists, append a timestamp suffix before moving so history is preserved.
419
419
  - Report the archived location in the final summary.
420
420
 
421
+ ### Step 7.6: Commit Review Bookkeeping (Required)
422
+
423
+ **CRITICAL — DO NOT SKIP.** When this skill runs in a separate agent session (subagent, fresh session, or different conversation), uncommitted bookkeeping updates cause state drift for the original agent. This skill modifies `plan.md`, `implementation.md`, `state.md`, and the contents of `reviews/` (via the Step 7.5 archive move) but does not commit them on its own — the commit below is the safety net.
424
+
425
+ Commit all modified OAT tracking files atomically:
426
+
427
+ ```bash
428
+ git add "$PROJECT_PATH/plan.md" "$PROJECT_PATH/implementation.md" "$PROJECT_PATH/state.md"
429
+ # Capture the Step 7.5 archive move: stages both the deletion of the original
430
+ # review path and the new archived location. Scope to the project's reviews/
431
+ # directory — never use repo-wide `git add -A`.
432
+ git add "$PROJECT_PATH/reviews/"
433
+ git diff --cached --quiet || git commit -m "chore(oat): record review findings and add fix tasks ({scope})"
434
+ ```
435
+
436
+ Do not use `git add -A` or glob patterns that reach outside `"$PROJECT_PATH/reviews/"`. Do not include unrelated implementation or code files in this commit. Do not defer this commit without explicit user approval — if deferred, clearly state in the summary that bookkeeping is uncommitted so the original agent knows to commit on return.
437
+
438
+ **Note on archived review paths:** When `reviews/archived/` matches a `localPaths` pattern (the default setup), the archived file is gitignored and `git add "$PROJECT_PATH/reviews/"` will only stage the deletion of the original (now-moved) top-level review file. When `reviews/archived/` is tracked, both the deletion and the new archived location are staged. Both cases are safe — the command handles them uniformly.
439
+
440
+ **Worktree handling:** If the project was resolved via a worktree in Step 0, run the git commands scoped to the worktree (`git -C "$WORKTREE_PATH" ...`) so the commit lands on the worktree branch.
441
+
421
442
  ### Step 8: Check Review Cycle Count
422
443
 
423
444
  **Bounded loop protection:**
@@ -632,6 +653,7 @@ This prevents reviewing already-approved code and focuses the reviewer on just t
632
653
  - Plan.md updated with new tasks
633
654
  - Implementation.md updated with review notes
634
655
  - Consumed review artifact archived under `reviews/archived/`
656
+ - All artifact updates (plan.md, implementation.md, state.md) committed atomically before the skill exits to prevent cross-session drift
635
657
  - Review cycle count checked (cap at 3)
636
658
  - Final-scope deferred Medium findings resurfaced and explicitly dispositioned
637
659
  - User routed to next action
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: oat-project-review-receive-remote
3
- version: 1.2.0
3
+ version: 1.3.0
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
@@ -190,6 +190,21 @@ Update `state.md`:
190
190
  - `oat_current_task: <first-new-task-id|null>`
191
191
  - `oat_project_state_updated: "{ISO 8601 UTC timestamp}"`
192
192
 
193
+ ### Step 6.5: Commit Review Bookkeeping (Required)
194
+
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.
196
+
197
+ Commit all modified OAT tracking files atomically:
198
+
199
+ ```bash
200
+ git add "$PROJECT_PATH/plan.md" "$PROJECT_PATH/implementation.md" "$PROJECT_PATH/state.md"
201
+ git diff --cached --quiet || git commit -m "chore(oat): record remote review findings and add fix tasks (pr-#$PR_NUMBER)"
202
+ ```
203
+
204
+ Do not use `git add -A` or glob patterns. Do not include unrelated implementation or code files. Do not defer this commit without explicit user approval.
205
+
206
+ **Worktree handling:** If the project was resolved via a worktree in Step 0, run the git commands scoped to the worktree (`git -C "$WORKTREE_PATH" ...`) so the commit lands on the worktree branch.
207
+
193
208
  ### Step 7: Enforce Review Cycle Limit and Route Next Action
194
209
 
195
210
  Track review cycles for the same scope.
@@ -232,4 +247,5 @@ At completion, report:
232
247
  - Findings triaged with explicit dispositions.
233
248
  - Plan tasks created with stable IDs when needed.
234
249
  - `plan.md`, `implementation.md`, and `state.md` updated consistently.
250
+ - All artifact updates committed atomically before the skill exits to prevent cross-session drift.
235
251
  - Review cycle guard and next-action routing applied.
@@ -1,5 +1,6 @@
1
1
  import { buildCommandContext, type CommandContext } from '../../app/command-context.js';
2
- import { type OatConfig, type OatLocalConfig } from '../../config/oat-config.js';
2
+ import { type OatConfig, type OatLocalConfig, type UserConfig } from '../../config/oat-config.js';
3
+ import { type ResolvedConfig } from '../../config/resolve.js';
3
4
  import { Command } from 'commander';
4
5
  interface ConfigCommandDependencies {
5
6
  buildCommandContext: (options: Parameters<typeof buildCommandContext>[0]) => CommandContext;
@@ -8,7 +9,10 @@ interface ConfigCommandDependencies {
8
9
  writeOatConfig: (repoRoot: string, config: OatConfig) => Promise<void>;
9
10
  readOatLocalConfig: (repoRoot: string) => Promise<OatLocalConfig>;
10
11
  writeOatLocalConfig: (repoRoot: string, config: OatLocalConfig) => Promise<void>;
12
+ readUserConfig: (userConfigDir: string) => Promise<UserConfig>;
13
+ writeUserConfig: (userConfigDir: string, config: UserConfig) => Promise<void>;
11
14
  resolveProjectsRoot: (repoRoot: string, env: NodeJS.ProcessEnv) => Promise<string>;
15
+ resolveEffectiveConfig: (repoRoot: string, userConfigDir: string, env: NodeJS.ProcessEnv) => Promise<ResolvedConfig>;
12
16
  processEnv: NodeJS.ProcessEnv;
13
17
  }
14
18
  export declare function createConfigCommand(overrides?: Partial<ConfigCommandDependencies>): Command;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/config/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAGhF,OAAO,EACL,KAAK,SAAS,EACd,KAAK,cAAc,EAMpB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA6CpC,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,mBAAmB,EAAE,CACnB,QAAQ,EAAE,MAAM,EAChB,GAAG,EAAE,MAAM,CAAC,UAAU,KACnB,OAAO,CAAC,MAAM,CAAC,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC,UAAU,CAAC;CAC/B;AAk3BD,wBAAgB,mBAAmB,CACjC,SAAS,GAAE,OAAO,CAAC,yBAAyB,CAAM,GACjD,OAAO,CAwET"}
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;AAGhF,OAAO,EACL,KAAK,SAAS,EACd,KAAK,cAAc,EAGnB,KAAK,UAAU,EAOhB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAEL,KAAK,cAAc,EAEpB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAmDpC,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;AA0hCD,wBAAgB,mBAAmB,CACjC,SAAS,GAAE,OAAO,CAAC,yBAAyB,CAAM,GACjD,OAAO,CA0GT"}