@open-agent-toolkit/cli 0.1.33 → 0.1.35

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 (97) hide show
  1. package/assets/docs/cli-utilities/config-and-local-state.md +20 -0
  2. package/assets/docs/cli-utilities/configuration.md +17 -6
  3. package/assets/docs/cli-utilities/index.md +5 -0
  4. package/assets/docs/cli-utilities/tool-packs.md +1 -1
  5. package/assets/docs/cli-utilities/workflow-gates.md +163 -0
  6. package/assets/docs/contributing/design-principles.md +1 -1
  7. package/assets/docs/contributing/skills.md +25 -0
  8. package/assets/docs/reference/cli-reference.md +3 -0
  9. package/assets/docs/reference/file-locations.md +1 -0
  10. package/assets/docs/reference/oat-directory-structure.md +3 -0
  11. package/assets/public-package-versions.json +4 -4
  12. package/assets/skills/oat-project-implement/SKILL.md +23 -1
  13. package/assets/skills/oat-project-plan/SKILL.md +23 -1
  14. package/dist/app/create-program.d.ts.map +1 -1
  15. package/dist/app/create-program.js +3 -6
  16. package/dist/app/help-config.d.ts +12 -0
  17. package/dist/app/help-config.d.ts.map +1 -0
  18. package/dist/app/help-config.js +15 -0
  19. package/dist/commands/doctor/index.d.ts.map +1 -1
  20. package/dist/commands/doctor/index.js +2 -1
  21. package/dist/commands/gate/index.d.ts +35 -0
  22. package/dist/commands/gate/index.d.ts.map +1 -0
  23. package/dist/commands/gate/index.js +500 -0
  24. package/dist/commands/index.d.ts.map +1 -1
  25. package/dist/commands/index.js +6 -0
  26. package/dist/commands/init/index.d.ts.map +1 -1
  27. package/dist/commands/init/index.js +2 -1
  28. package/dist/commands/init/tools/brainstorm/index.d.ts.map +1 -1
  29. package/dist/commands/init/tools/brainstorm/index.js +2 -1
  30. package/dist/commands/init/tools/core/index.d.ts.map +1 -1
  31. package/dist/commands/init/tools/core/index.js +18 -0
  32. package/dist/commands/init/tools/docs/index.d.ts.map +1 -1
  33. package/dist/commands/init/tools/docs/index.js +2 -1
  34. package/dist/commands/init/tools/ideas/index.d.ts.map +1 -1
  35. package/dist/commands/init/tools/ideas/index.js +2 -1
  36. package/dist/commands/init/tools/project-management/index.d.ts.map +1 -1
  37. package/dist/commands/init/tools/project-management/index.js +19 -0
  38. package/dist/commands/init/tools/research/index.d.ts.map +1 -1
  39. package/dist/commands/init/tools/research/index.js +2 -1
  40. package/dist/commands/init/tools/utility/index.d.ts.map +1 -1
  41. package/dist/commands/init/tools/utility/index.js +2 -1
  42. package/dist/commands/init/tools/workflows/index.d.ts.map +1 -1
  43. package/dist/commands/init/tools/workflows/index.js +2 -1
  44. package/dist/commands/internal/validate-oat-skills.d.ts +3 -0
  45. package/dist/commands/internal/validate-oat-skills.d.ts.map +1 -1
  46. package/dist/commands/internal/validate-oat-skills.js +44 -2
  47. package/dist/commands/project/split/evaluate-signals.d.ts.map +1 -1
  48. package/dist/commands/project/split/evaluate-signals.js +11 -1
  49. package/dist/commands/project/split/run.d.ts.map +1 -1
  50. package/dist/commands/project/split/run.js +14 -0
  51. package/dist/commands/project/split/validate-plan.d.ts.map +1 -1
  52. package/dist/commands/project/split/validate-plan.js +30 -6
  53. package/dist/commands/project/validate-plan/index.d.ts +6 -1
  54. package/dist/commands/project/validate-plan/index.d.ts.map +1 -1
  55. package/dist/commands/project/validate-plan/index.js +36 -9
  56. package/dist/commands/providers/inspect/inspect.d.ts.map +1 -1
  57. package/dist/commands/providers/inspect/inspect.js +2 -1
  58. package/dist/commands/providers/list/list.d.ts.map +1 -1
  59. package/dist/commands/providers/list/list.js +2 -1
  60. package/dist/commands/providers/set/index.d.ts.map +1 -1
  61. package/dist/commands/providers/set/index.js +6 -2
  62. package/dist/commands/remove/skill/remove-skill.d.ts.map +1 -1
  63. package/dist/commands/remove/skill/remove-skill.js +2 -1
  64. package/dist/commands/remove/skills/remove-skills.d.ts.map +1 -1
  65. package/dist/commands/remove/skills/remove-skills.js +2 -1
  66. package/dist/commands/repo/pr-comments/triage-collection/triage-comments.d.ts +1 -0
  67. package/dist/commands/repo/pr-comments/triage-collection/triage-comments.d.ts.map +1 -1
  68. package/dist/commands/repo/pr-comments/triage-collection/triage-comments.js +25 -13
  69. package/dist/commands/shared/scope-option.d.ts +21 -0
  70. package/dist/commands/shared/scope-option.d.ts.map +1 -0
  71. package/dist/commands/shared/scope-option.js +24 -0
  72. package/dist/commands/status/index.d.ts.map +1 -1
  73. package/dist/commands/status/index.js +2 -1
  74. package/dist/commands/sync/index.d.ts.map +1 -1
  75. package/dist/commands/sync/index.js +2 -1
  76. package/dist/commands/tools/info/index.d.ts.map +1 -1
  77. package/dist/commands/tools/info/index.js +2 -1
  78. package/dist/commands/tools/install/index.d.ts.map +1 -1
  79. package/dist/commands/tools/install/index.js +2 -0
  80. package/dist/commands/tools/list/index.d.ts.map +1 -1
  81. package/dist/commands/tools/list/index.js +2 -1
  82. package/dist/commands/tools/outdated/index.d.ts.map +1 -1
  83. package/dist/commands/tools/outdated/index.js +2 -1
  84. package/dist/commands/tools/remove/index.d.ts.map +1 -1
  85. package/dist/commands/tools/remove/index.js +2 -1
  86. package/dist/commands/tools/update/index.d.ts.map +1 -1
  87. package/dist/commands/tools/update/index.js +6 -2
  88. package/dist/config/oat-config.d.ts +22 -0
  89. package/dist/config/oat-config.d.ts.map +1 -1
  90. package/dist/config/oat-config.js +136 -0
  91. package/dist/config/resolve.d.ts +3 -1
  92. package/dist/config/resolve.d.ts.map +1 -1
  93. package/dist/config/resolve.js +103 -1
  94. package/dist/validation/skills.d.ts +2 -0
  95. package/dist/validation/skills.d.ts.map +1 -1
  96. package/dist/validation/skills.js +39 -0
  97. package/package.json +2 -2
@@ -103,6 +103,26 @@ oat config set workflow.autoArtifactReview.analysis false --local
103
103
 
104
104
  When archive settings are configured, completion uploads dated archive snapshots to S3, exports dated summary snapshots into the configured summary reference directory, and lets `oat-wrap-up` write tracked wrap-up reports into the configured wrap-up directory.
105
105
 
106
+ ## `oat gate ...`
107
+
108
+ Use `oat gate` when a gate-aware skill should run a configured final command
109
+ before it is considered done.
110
+
111
+ Available commands:
112
+
113
+ - `oat gate resolve <skill>` - inspect the resolved gate config for one skill
114
+ - `oat gate set <skill>` / `oat gate unset <skill>` - write or clear a skill gate
115
+ - `oat gate target set <id>` / `oat gate target unset <id>` - write or clear an exec target
116
+ - `oat gate cross-provider-exec <prompt...>` - select an available exec target and run the prompt there
117
+
118
+ The most common command is `oat gate cross-provider-exec`, which avoids the
119
+ current runtime by default so a review gate can run in a fresh Codex, Claude, or
120
+ Cursor runtime. Target commands are stored as JSON argv arrays, so configure
121
+ them with `oat gate target set --base-command-json ...` rather than
122
+ `oat config set`.
123
+
124
+ For schema, examples, and current V1 limits, see [Workflow Gates](workflow-gates.md).
125
+
106
126
  Use these reference pages for file ownership and schema details:
107
127
 
108
128
  - [File Locations](../reference/file-locations.md)
@@ -18,12 +18,12 @@ For the deep file-by-file reference, see:
18
18
 
19
19
  ## The four config surfaces
20
20
 
21
- | Surface | File | Typical contents | Primary CLI surface |
22
- | -------------------- | ------------------------ | ----------------------------------------------------------------------------------------------------------------------- | ------------------------------------------ |
23
- | Shared repo config | `.oat/config.json` | Repo-wide non-sync settings such as `projects.root`, `git.defaultBranch`, `documentation.*`, `archive.*`, and `tools.*` | `oat config get/set/list/describe` |
24
- | Repo-local config | `.oat/config.local.json` | Per-developer state for this checkout, such as `activeProject`, `lastPausedProject`, and repo-local `activeIdea` | `oat config get/set/list/describe` |
25
- | User config | `~/.oat/config.json` | User-level state such as global `activeIdea` fallback | `oat config describe` |
26
- | Provider sync config | `.oat/sync/config.json` | Provider enablement and sync strategy settings | `oat providers set`, `oat config describe` |
21
+ | Surface | File | Typical contents | Primary CLI surface |
22
+ | -------------------- | ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------- |
23
+ | Shared repo config | `.oat/config.json` | Repo-wide non-sync settings such as `projects.root`, `git.defaultBranch`, `documentation.*`, `archive.*`, `tools.*`, and shared `workflow.*` defaults | `oat config get/set/list/describe`, `oat gate` |
24
+ | Repo-local config | `.oat/config.local.json` | Per-developer state for this checkout, such as `activeProject`, `lastPausedProject`, repo-local `activeIdea`, and local `workflow.*` overrides | `oat config get/set/list/describe`, `oat gate` |
25
+ | User config | `~/.oat/config.json` | User-level state such as global `activeIdea` fallback and personal `workflow.*` defaults | `oat config describe`, `oat gate` |
26
+ | Provider sync config | `.oat/sync/config.json` | Provider enablement and sync strategy settings | `oat providers set`, `oat config describe` |
27
27
 
28
28
  The main split is:
29
29
 
@@ -86,6 +86,7 @@ Common keys in `.oat/config.json`:
86
86
  - `archive.awsProfile` — optional AWS named profile forwarded as `AWS_PROFILE` to every `aws` invocation in archive flows
87
87
  - `archive.awsRegion` — optional AWS region forwarded as `AWS_REGION` to every `aws` invocation in archive flows
88
88
  - `tools.<pack>` — whether a bundled tool pack is currently installed in the repo or user scopes after lifecycle reconciliation
89
+ - `workflow.gates.skills` / `workflow.gates.execTargets` — per-skill gates and cross-runtime exec targets; manage with `oat gate`
89
90
 
90
91
  Tool-pack state example:
91
92
 
@@ -96,6 +97,10 @@ oat config set tools.project-management true
96
97
 
97
98
  The `tools.*` keys are primarily maintained by `oat tools install`, `oat tools update`, and `oat tools remove`, but they are intentionally visible through `oat config` so workflows and operators can inspect or override pack-state signals when needed.
98
99
 
100
+ Workflow gate objects are structured config and use their own command group
101
+ instead of the scalar `oat config set` surface. See
102
+ [Workflow Gates](workflow-gates.md) for the full command surface and examples.
103
+
99
104
  Archive example:
100
105
 
101
106
  ```bash
@@ -150,6 +155,11 @@ Use `~/.oat/config.json` for user fallback state when no repo-local value is set
150
155
 
151
156
  - `activeIdea`
152
157
 
158
+ Repo-local and user config can also hold workflow defaults, including
159
+ `workflow.gates.*`. This is useful for personal runtime availability: for
160
+ example, one user may prefer `claude -p` as a gate target while another prefers
161
+ `codex exec`.
162
+
153
163
  In practice, you usually inspect these via:
154
164
 
155
165
  ```bash
@@ -260,6 +270,7 @@ Workflow preference keys live under the `workflow.*` namespace:
260
270
  - `workflow.dispatchCeiling.preset` — `balanced`, `maximum`, or `cost-conscious`. Convenience preset that compiles to per-provider values at write time. Setting this key is the recommended way to configure the ceiling.
261
271
  - `workflow.dispatchCeiling.providers.codex` — `low`, `medium`, `high`, or `xhigh`. Concrete Codex ceiling. Set automatically when a preset is selected; also settable directly for Advanced (no preset) configurations. Provider default effort is informational for base/unpinned roles and is not treated as this ceiling.
262
272
  - `workflow.dispatchCeiling.providers.claude` — `haiku`, `sonnet`, or `opus`. Concrete Claude ceiling. Set automatically when a preset is selected; also settable directly for Advanced configurations. Claude has no separate per-dispatch effort axis, so the effort axis remains `not-applicable`.
273
+ - `workflow.gates.skills` / `workflow.gates.execTargets` — structured per-skill final gate commands and exec-target registry. Use `oat gate set`, `oat gate target set`, and `oat gate cross-provider-exec`; do not use `oat config set` for these objects.
263
274
 
264
275
  ### Auto artifact-review preferences
265
276
 
@@ -15,6 +15,7 @@ Use this section when you want bootstrap guidance, tool-pack lifecycle details,
15
15
  - [Tool Packs and Installed Assets](tool-packs.md) - Bundled packs and `oat tools` lifecycle commands.
16
16
  - [Configuration](configuration.md) - OAT configuration guidance across shared, local, user, and provider-sync surfaces.
17
17
  - [Config and Local State](config-and-local-state.md) - Utility command groups for config, local state, diagnostics, and related inspection flows.
18
+ - [Workflow Gates](workflow-gates.md) - Per-skill final commands and cross-runtime review dispatch with `oat gate`.
18
19
 
19
20
  ## What Lives Here
20
21
 
@@ -25,6 +26,7 @@ Examples include:
25
26
  - bootstrap and setup flows such as `oat init`
26
27
  - bundled pack management through `oat tools`
27
28
  - general configuration guidance
29
+ - workflow gate commands for per-skill final checks and cross-runtime review dispatch
28
30
  - utility command groups for config, local state, diagnostics, and related inspection flows
29
31
 
30
32
  ## Who It's For
@@ -47,6 +49,7 @@ Use CLI Utilities when:
47
49
  - Use [CLI Bootstrap](bootstrap.md) when you are starting with `oat init`.
48
50
  - Go to [Tool Packs](tool-packs.md) when you are managing bundled OAT packs and installed assets.
49
51
  - Read [Configuration](configuration.md) for config semantics, or [Config and Local State](config-and-local-state.md) for inspection and diagnostic command groups.
52
+ - Use [Workflow Gates](workflow-gates.md) when you want a skill to run a configured final command before it is considered done.
50
53
 
51
54
  ## Common Tasks
52
55
 
@@ -54,6 +57,7 @@ Use CLI Utilities when:
54
57
  - Manage installed packs in [Tool Packs](tool-packs.md).
55
58
  - Adjust settings in [Configuration](configuration.md).
56
59
  - Use [Config and Local State](config-and-local-state.md) for the utility command groups that support inspection and diagnostics.
60
+ - Configure cross-runtime review gates in [Workflow Gates](workflow-gates.md).
57
61
 
58
62
  ## Go Deeper
59
63
 
@@ -61,3 +65,4 @@ Use CLI Utilities when:
61
65
  - [Tool Packs](tool-packs.md) - Bundled packs and `oat tools` lifecycle commands.
62
66
  - [Configuration](configuration.md) - OAT configuration guidance.
63
67
  - [Config and Local State](config-and-local-state.md) - Utility command groups for config, local state, diagnostics, and related inspection flows.
68
+ - [Workflow Gates](workflow-gates.md) - Per-skill final commands and cross-runtime review dispatch.
@@ -171,7 +171,7 @@ The `core` pack contains foundational diagnostic and documentation skills:
171
171
 
172
172
  Key behavior:
173
173
 
174
- - Core pack always installs at **user scope** (`~/.agents/skills/`), regardless of the `--scope` flag. This ensures core skills are available in any directory.
174
+ - Core pack always installs at **user scope** (`~/.agents/skills/`). It does not honor a different scope, and passing a conflicting explicit `--scope` (e.g. `oat init tools core --scope project`) is rejected with an error rather than silently ignored; omit `--scope` or pass `--scope user`. This ensures core skills are available in any directory.
175
175
  - Core is checked by default in the `oat init tools` guided setup.
176
176
  - Installation also bundles OAT documentation to `~/.oat/docs/` for the oat-docs skill.
177
177
  - `oat tools update --pack core` refreshes both skills and `~/.oat/docs/` documentation.
@@ -0,0 +1,163 @@
1
+ ---
2
+ title: Workflow Gates
3
+ description: Configure per-skill final commands and cross-runtime review dispatch with oat gate.
4
+ ---
5
+
6
+ # Workflow Gates
7
+
8
+ Workflow gates let a gate-aware skill run a configured final command before it
9
+ is considered done. The common use is independent review: one runtime performs
10
+ the work, then `oat gate cross-provider-exec` dispatches a prompt to another
11
+ runtime such as Codex or Claude.
12
+
13
+ V1 gates are deliberately thin. A gate command passes or fails by exit code, and
14
+ the skill owns what to do next.
15
+
16
+ ## Gate config
17
+
18
+ Gate config lives under `workflow.gates.skills` and is keyed by skill name.
19
+
20
+ ```json
21
+ {
22
+ "workflow": {
23
+ "gates": {
24
+ "skills": {
25
+ "oat-project-implement": {
26
+ "command": "oat gate cross-provider-exec \"Use oat-project-review-provide to review the current project\"",
27
+ "description": "Run a fresh-runtime final review before implementation is considered done.",
28
+ "onFailure": "block",
29
+ "maxAttempts": 2
30
+ }
31
+ }
32
+ }
33
+ }
34
+ }
35
+ ```
36
+
37
+ Fields:
38
+
39
+ - `command` - shell command the skill runs in its Gate Execution step.
40
+ - `onFailure` - `block`, `prompt`, or `warn`.
41
+ - `description` - optional context for the agent running the gate.
42
+ - `maxAttempts` - retry bound for `block`; defaults to `2`.
43
+
44
+ `oat-project-plan` and `oat-project-implement` are currently gate-aware. Gate
45
+ awareness is declared in skill frontmatter with `oat_gateable: true`, and
46
+ `oat internal validate-oat-skills` warns when config targets a missing or
47
+ non-gateable skill.
48
+
49
+ ## Exec targets
50
+
51
+ `oat gate cross-provider-exec` chooses from `workflow.gates.execTargets`.
52
+ Targets are keyed by opaque id. OAT uses only the declared runtime, commands,
53
+ and priority; it does not parse model names or infer provider semantics from the
54
+ id.
55
+
56
+ Built-in targets:
57
+
58
+ | Target id | Runtime | Base command | Current-host detector |
59
+ | ---------------- | -------- | ----------------------------------- | --------------------------------------- |
60
+ | `codex-default` | `codex` | `["codex", "exec"]` | `CODEX_THREAD_ID` or `CODEX_SESSION_ID` |
61
+ | `claude-default` | `claude` | `["claude", "-p"]` | `CLAUDECODE` |
62
+ | `cursor-default` | `cursor` | `["cursor-agent", "-p", "--force"]` | `CURSOR_AGENT` |
63
+
64
+ Config layers can partially override a target or disable it with `null`. Use the
65
+ dedicated target writer instead of `oat config set` because target commands are
66
+ structured argv arrays:
67
+
68
+ ```bash
69
+ oat gate target set claude-opus \
70
+ --runtime claude \
71
+ --base-command-json '["claude","-p","--model","opus"]' \
72
+ --availability-json '["claude","--version"]' \
73
+ --priority 90 \
74
+ --user
75
+ ```
76
+
77
+ JSON argv is intentional: provider commands often contain flags such as `-p` or
78
+ `--model`, which would be ambiguous as variadic CLI options.
79
+
80
+ ## Command surface
81
+
82
+ Inspect a skill gate:
83
+
84
+ ```bash
85
+ oat gate resolve oat-project-implement --json
86
+ ```
87
+
88
+ Set or clear a skill gate:
89
+
90
+ ```bash
91
+ oat gate set oat-project-implement \
92
+ --command 'oat gate cross-provider-exec "Use oat-project-review-provide to review the current project"' \
93
+ --description "Run final review in another runtime" \
94
+ --on-failure block \
95
+ --max-attempts 2 \
96
+ --user
97
+
98
+ oat gate unset oat-project-implement --user
99
+ ```
100
+
101
+ Set or clear an exec target:
102
+
103
+ ```bash
104
+ oat gate target set codex-high \
105
+ --runtime codex \
106
+ --base-command-json '["codex","exec","--model","gpt-5.5"]' \
107
+ --availability-json '["codex","--version"]' \
108
+ --priority 90 \
109
+ --user
110
+
111
+ oat gate target unset codex-high --user
112
+ ```
113
+
114
+ Dispatch a prompt through the target registry:
115
+
116
+ ```bash
117
+ oat gate cross-provider-exec "Use oat-project-review-provide to review the current project"
118
+ ```
119
+
120
+ By default the dispatcher:
121
+
122
+ 1. Resolves built-in and configured exec targets.
123
+ 2. Detects the current runtime with host detection commands.
124
+ 3. Applies `--avoid same-runtime`.
125
+ 4. Checks candidate availability in descending priority order, with target id as
126
+ the tie-breaker.
127
+ 5. Runs the chosen `baseCommand` with the prompt appended.
128
+ 6. Exits with the child process status.
129
+
130
+ Use `--target <id>` to pin one target and skip detection/avoidance:
131
+
132
+ ```bash
133
+ oat gate cross-provider-exec --target claude-opus "Review the current project"
134
+ ```
135
+
136
+ Use `--avoid none` only when you intentionally allow the current runtime to be
137
+ selected:
138
+
139
+ ```bash
140
+ oat gate cross-provider-exec --avoid none "Run this gate on any available target"
141
+ ```
142
+
143
+ ## Failure behavior
144
+
145
+ Gate failure behavior is owned by the gate-aware skill:
146
+
147
+ | `onFailure` | Meaning |
148
+ | ----------- | ------------------------------------------------------------------------------------ |
149
+ | `block` | Read the gate output, attempt remediation, rerun up to `maxAttempts`, then escalate. |
150
+ | `prompt` | Surface the failure and ask the user how to proceed. |
151
+ | `warn` | Record the failure and continue. |
152
+
153
+ `cross-provider-exec` does fallback only before dispatch, while selecting an
154
+ available target. Once a target actually runs, its exit code is the gate result;
155
+ OAT does not try another target after a failed review.
156
+
157
+ ## Current limits
158
+
159
+ V1 gates avoid the current runtime, not the current model or effort setting.
160
+ Same-runtime but different-target dispatch, such as using Cursor again with a
161
+ different model slug, is future work. Until that exists, use `--target <id>` when
162
+ you need an explicit reviewer target, or rely on the default `same-runtime`
163
+ avoidance for cross-runtime review.
@@ -71,7 +71,7 @@ packages/cli/src/
71
71
  ## Runtime Bootstrap and Flags
72
72
 
73
73
  - Startup order: load runtime config -> validate env/input -> build command context -> register commands.
74
- - Register global flags early and consistently (`--json`, `--verbose`, `--scope`, `--cwd`).
74
+ - Register global flags early and consistently (`--json`, `--verbose`, `--cwd`). Scope-aware commands take `--scope` as a per-command option (via the shared `withScopeOption` helper), not a global flag, so it appears in `--help` only on the commands that actually consume it.
75
75
 
76
76
  ## UX and Output Principles
77
77
 
@@ -41,6 +41,7 @@ Skill behavior is defined by frontmatter plus the process contract in each `SKIL
41
41
  - `disable-model-invocation`
42
42
  - `user-invocable`
43
43
  - `allowed-tools`
44
+ - `oat_gateable`
44
45
 
45
46
  ## Practical Authoring Flow
46
47
 
@@ -76,6 +77,30 @@ At minimum, the skill contract should:
76
77
 
77
78
  Use `create-agnostic-skill` or `create-oat-skill` as the starting point; both include the current delegation guidance and optional capability-detection template.
78
79
 
80
+ ## Gate-aware skills
81
+
82
+ A skill that supports configured final gates must declare `oat_gateable: true`
83
+ in frontmatter and include a final Gate Execution step in its process contract.
84
+ Without both pieces, a configured `workflow.gates.skills.<skill>` entry is a
85
+ validation warning rather than an executable contract.
86
+
87
+ The Gate Execution step should:
88
+
89
+ 1. Run `oat gate resolve <this-skill> --json`.
90
+ 2. Treat `null` as "no gate configured."
91
+ 3. Run the resolved `command` as the skill's last step when a gate is present.
92
+ 4. Use the command exit code as the pass/fail signal.
93
+ 5. Follow the gate's `onFailure` policy:
94
+ - `block` - remediate and rerun up to `maxAttempts`, then escalate.
95
+ - `prompt` - surface the failure and ask the user.
96
+ - `warn` - record the failure and continue.
97
+
98
+ For cross-runtime review gates, prefer putting
99
+ `oat gate cross-provider-exec "<prompt>"` in the configured gate command rather
100
+ than hard-coding a provider CLI directly in the skill. See
101
+ [Workflow Gates](../cli-utilities/workflow-gates.md) for the config and command
102
+ surface.
103
+
79
104
  ## Reading project state
80
105
 
81
106
  Skills that need fields from the active project's `state.md` (e.g. `phase`, `phaseStatus`, `workflowMode`, `docsUpdated`, `lastCommit`) MUST query the CLI instead of hand-parsing YAML with `grep`/`awk`.
@@ -14,6 +14,7 @@ The CLI is also a standalone value path. You can use `oat init`, `oat sync`, `oa
14
14
  - [CLI Bootstrap](../cli-utilities/bootstrap.md) - Bootstrap a repo with `oat init`, guided setup, and initial provider adoption.
15
15
  - [Tool Packs](../cli-utilities/tool-packs.md) - Install, update, inspect, and remove bundled OAT skills and agents.
16
16
  - [Config and Local State](../cli-utilities/config-and-local-state.md) - Config, backlog, local paths, diagnostics, and related utility commands.
17
+ - [Workflow Gates](../cli-utilities/workflow-gates.md) - Per-skill final commands and cross-runtime review dispatch.
17
18
  - [Docs Tooling Commands](../docs-tooling/commands.md) - Docs app scaffolding, migration, index generation, and nav sync.
18
19
  - [Provider Sync](../provider-sync/index.md) - Sync behavior, provider capabilities, config, and drift management.
19
20
  - [Agentic Workflows](../workflows/index.md) - Tracked project execution, skills, ideas, and workflow routing.
@@ -45,6 +46,7 @@ The first practical expansion path is to keep improving the existing owners: [Do
45
46
  | `oat decision ...` | Create, index, and migrate file-per-record repo decisions under `reference/decisions/` (`init`, `new`, `regenerate-index`, `migrate`). | [Config and Local State](../cli-utilities/config-and-local-state.md#oat-decision-) |
46
47
  | `oat backlog ...` / `oat local ...` | File-backed backlog helpers, local path sync, and local-only operational support. | [Config and Local State](../cli-utilities/config-and-local-state.md) |
47
48
  | `oat config ...` / `oat instructions ...` | Config discovery, source-aware config dumps, supported mutations, and instruction-integrity helpers. | [Config and Local State](../cli-utilities/config-and-local-state.md) |
49
+ | `oat gate ...` | Per-skill final gate config, exec-target registry writes, and cross-runtime prompt dispatch. | [Workflow Gates](../cli-utilities/workflow-gates.md) |
48
50
  | `oat state ...` / `oat index ...` / `internal` | Repo dashboard refresh, repo indexing, validation helpers, and diagnostics. | [Config and Local State](../cli-utilities/config-and-local-state.md) |
49
51
  | `oat docs ...` | Docs app bootstrap, migration, index generation, nav sync, and docs workflow entrypoints. | [Docs Tooling Commands](../docs-tooling/commands.md) |
50
52
  | `oat status` / `oat sync` / `oat providers ...` | Provider sync, drift inspection, provider configuration, and adoption behavior. | [Provider Sync](../provider-sync/index.md) |
@@ -66,6 +68,7 @@ Notable commands introduced in the current CLI surface:
66
68
  - `oat repo archive sync [project-name]` - hydrate archived project snapshots from the configured repo-scoped S3 archive into `.oat/projects/archived/`. The old `oat project archive sync` path remains as a deprecated shim.
67
69
  - `oat project validate-plan --project-path <path>` - validates `oat_plan_parallel_groups` metadata in `plan.md`; exits non-zero on invalid. See [Implementation Execution](../workflows/projects/implementation-execution.md#validating-plan-metadata).
68
70
  - `oat project set-mode` — deprecated no-op. Execution mode is no longer user-selectable; emits a deprecation warning and preserves the `--json` contract.
71
+ - `oat gate cross-provider-exec <prompt...>` - choose an available exec target while avoiding the current runtime by default, then run the prompt with the chosen target's configured base command.
69
72
 
70
73
  ## `oat config` surface flags
71
74
 
@@ -22,6 +22,7 @@ For detailed `.oat/` tree semantics, see:
22
22
  - Active idea: `activeIdea` in `.oat/config.local.json` (repo) or `~/.oat/config.json` (user)
23
23
  - Projects root config: `projects.root` in `.oat/config.json` (read via `oat config get projects.root`)
24
24
  - Archive config: `archive.s3Uri`, `archive.s3SyncOnComplete`, `archive.summaryExportPath`, `archive.wrapUpExportPath`, `archive.awsProfile`, and `archive.awsRegion` in `.oat/config.json`
25
+ - Workflow gate config: `workflow.gates.skills` and `workflow.gates.execTargets` in `.oat/config.json`, `.oat/config.local.json`, or `~/.oat/config.json` (manage via `oat gate`)
25
26
  - Project manifests/config: `.oat/sync/`
26
27
 
27
28
  Config discovery via CLI:
@@ -109,6 +109,8 @@ Current schema keys:
109
109
  | `workflow.dispatchCeiling.preset` | `string` | unset | Convenience preset compiled at write time to concrete per-provider ceilings (`balanced` = codex `high` / claude `sonnet`; `maximum` = codex `xhigh` / claude `opus`; `cost-conscious` = codex `medium` / claude `sonnet`). Stored only when a preset is chosen; runtime reads compiled `providers.*`, never the preset label. |
110
110
  | `workflow.dispatchCeiling.providers.codex` | `string` | unset | Maximum Codex reasoning effort OAT may select through deterministic pinned implementer/reviewer variants (`low`, `medium`, `high`, or `xhigh`). Codex provider default effort is informational for base/unpinned roles and is not treated as this ceiling. |
111
111
  | `workflow.dispatchCeiling.providers.claude` | `string` | unset | Maximum Claude model tier OAT may select for provider-native subagent dispatch (`haiku`, `sonnet`, or `opus`). Claude has no separate per-dispatch effort axis. The flat keys `workflow.dispatchCeiling.codex` and `workflow.dispatchCeiling.claude` were removed (no migration). |
112
+ | `workflow.gates.skills` | `object` | unset | Per-skill final gate config keyed by skill name. Managed with `oat gate set/unset`; gate-aware skills declare `oat_gateable: true`. |
113
+ | `workflow.gates.execTargets` | `object` | built-ins | Cross-runtime exec target registry keyed by opaque target id. Managed with `oat gate target set/unset`; built-ins cover Codex, Claude, and Cursor defaults. |
112
114
  | `archive.s3Uri` | `string` | - | Base S3 URI for repo-scoped archived project sync, for example `s3://bucket/oat-archive` |
113
115
  | `archive.s3SyncOnComplete` | `boolean` | `false` | When `true`, `oat-project-complete` uploads the archived project to the configured S3 archive after local archive succeeds |
114
116
  | `archive.summaryExportPath` | `string` | - | Repo-relative directory where completion exports `summary.md` as a dated snapshot like `20260401-<project-name>.md` for durable tracked reference |
@@ -119,6 +121,7 @@ Current schema keys:
119
121
  All `documentation.*` keys are managed via `oat config get/set` and are set automatically by `oat docs init`.
120
122
  The `git.defaultBranch` key is auto-detected during `oat init` and can be overridden via `oat config set git.defaultBranch <branch>`.
121
123
  Archive settings are managed via `oat config get/set`, and `oat config describe archive.s3Uri` (or the other archive keys) shows the lifecycle and ownership details from the CLI.
124
+ Workflow gate objects are structured config and are managed with `oat gate`, not the scalar `oat config set` surface. See [Workflow Gates](../cli-utilities/workflow-gates.md).
122
125
 
123
126
  Example:
124
127
 
@@ -1,6 +1,6 @@
1
1
  {
2
- "cli": "0.1.33",
3
- "docs-config": "0.1.33",
4
- "docs-theme": "0.1.33",
5
- "docs-transforms": "0.1.33"
2
+ "cli": "0.1.35",
3
+ "docs-config": "0.1.35",
4
+ "docs-theme": "0.1.35",
5
+ "docs-transforms": "0.1.35"
6
6
  }
@@ -1,7 +1,8 @@
1
1
  ---
2
2
  name: oat-project-implement
3
- version: 2.0.20
3
+ version: 2.0.21
4
4
  description: Use when plan.md is ready for execution. Dispatches phase-level subagents with bounded fix loops; supports plan-declared parallel phase groups with worktree-isolated execution and ordered fan-in.
5
+ oat_gateable: true
5
6
  argument-hint: '[--retry-limit <N>] [--dry-run]'
6
7
  disable-model-invocation: true
7
8
  user-invocable: true
@@ -1419,6 +1420,27 @@ Final review:
1419
1420
  Next: Create PR or run the oat-project-pr-final skill (when available)
1420
1421
  ```
1421
1422
 
1423
+ ### Gate Execution
1424
+
1425
+ Before reporting this skill as complete, run the configured gate as the final step:
1426
+
1427
+ 1. Resolve the gate for this skill:
1428
+
1429
+ ```bash
1430
+ oat gate resolve <this-skill> --json
1431
+ ```
1432
+
1433
+ If the command returns JSON `null`, no gate is configured; the skill is complete.
1434
+
1435
+ 2. If a gate config is returned, run its `command` exactly as configured. Capture stdout, stderr, and the exit code. A zero exit code means the gate passed and the skill is complete.
1436
+
1437
+ 3. If the command exits nonzero, use `description` to orient the next steps and handle `onFailure`:
1438
+ - `block`: read gate feedback, remediate, and re-run the gate up to `maxAttempts` attempts (default `2`). If attempts are exhausted, escalate to the human with accumulated feedback and append that feedback to `implementation.md`. Treat a launch failure, missing CLI, or no eligible runtime as escalation-biased and do not spend it as a remediation attempt.
1439
+ - `prompt`: surface the gate failure and ask the human how to proceed.
1440
+ - `warn`: record the gate failure and continue.
1441
+
1442
+ 4. Runtime selection note (V1): the step runs the gate `command` as-is and reads no env var. By default, `oat gate cross-provider-exec` resolves the current host from built-in `hostDetectionCommand`s and avoids the same runtime with zero per-prompt input. It does not read or stamp `OAT_CURRENT_RUNTIME` or `OAT_GATE_EXEC_TARGET`. To pin a specific reviewer for this skill, set `--target <id>` once in that skill's gate `command`; this is the optional precision path and does not require per-prompt input.
1443
+
1422
1444
  ## Success Criteria
1423
1445
 
1424
1446
  - All tasks executed in order
@@ -1,7 +1,8 @@
1
1
  ---
2
2
  name: oat-project-plan
3
- version: 1.3.5
3
+ version: 1.3.6
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
+ oat_gateable: true
5
6
  disable-model-invocation: true
6
7
  user-invocable: true
7
8
  allowed-tools: Read, Write, Bash(git:*), Glob, Grep, AskUserQuestion
@@ -501,6 +502,27 @@ Total: {N} tasks
501
502
  Next: Run oat-project-implement to begin execution.
502
503
  ```
503
504
 
505
+ ### Gate Execution
506
+
507
+ Before reporting this skill as complete, run the configured gate as the final step:
508
+
509
+ 1. Resolve the gate for this skill:
510
+
511
+ ```bash
512
+ oat gate resolve <this-skill> --json
513
+ ```
514
+
515
+ If the command returns JSON `null`, no gate is configured; the skill is complete.
516
+
517
+ 2. If a gate config is returned, run its `command` exactly as configured. Capture stdout, stderr, and the exit code. A zero exit code means the gate passed and the skill is complete.
518
+
519
+ 3. If the command exits nonzero, use `description` to orient the next steps and handle `onFailure`:
520
+ - `block`: read gate feedback, remediate, and re-run the gate up to `maxAttempts` attempts (default `2`). If attempts are exhausted, escalate to the human with accumulated feedback and append that feedback to `implementation.md`. Treat a launch failure, missing CLI, or no eligible runtime as escalation-biased and do not spend it as a remediation attempt.
521
+ - `prompt`: surface the gate failure and ask the human how to proceed.
522
+ - `warn`: record the gate failure and continue.
523
+
524
+ 4. Runtime selection note (V1): the step runs the gate `command` as-is and reads no env var. By default, `oat gate cross-provider-exec` resolves the current host from built-in `hostDetectionCommand`s and avoids the same runtime with zero per-prompt input. It does not read or stamp `OAT_CURRENT_RUNTIME` or `OAT_GATE_EXEC_TARGET`. To pin a specific reviewer for this skill, set `--target <id>` once in that skill's gate `command`; this is the optional precision path and does not require per-prompt input.
525
+
504
526
  ## Success Criteria
505
527
 
506
528
  - All design components covered by tasks
@@ -1 +1 @@
1
- {"version":3,"file":"create-program.d.ts","sourceRoot":"","sources":["../../src/app/create-program.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAC;AAO5C,wBAAgB,aAAa,IAAI,OAAO,CAavC"}
1
+ {"version":3,"file":"create-program.d.ts","sourceRoot":"","sources":["../../src/app/create-program.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMpC,wBAAgB,aAAa,IAAI,OAAO,CASvC"}
@@ -1,8 +1,7 @@
1
1
  import { OAT_VERSION } from '../shared/oat-version.js';
2
- import { Command, Option } from 'commander';
2
+ import { Command } from 'commander';
3
3
  const PROGRAM_NAME = 'oat';
4
4
  const PROGRAM_DESCRIPTION = 'Open Agent Toolkit CLI for provider interoperability';
5
- const SCOPE_CHOICES = ['project', 'user', 'all'];
6
5
  export function createProgram() {
7
6
  return new Command()
8
7
  .name(PROGRAM_NAME)
@@ -10,8 +9,6 @@ export function createProgram() {
10
9
  .version(OAT_VERSION)
11
10
  .option('--json', 'Output a single JSON document')
12
11
  .option('--verbose', 'Enable verbose debug output')
13
- .addOption(new Option('--scope <scope>', 'Limit execution scope')
14
- .choices([...SCOPE_CHOICES])
15
- .default('all'))
16
- .option('--cwd <path>', 'Override working directory');
12
+ .option('--cwd <path>', 'Override working directory')
13
+ .configureHelp({ showGlobalOptions: true });
17
14
  }
@@ -0,0 +1,12 @@
1
+ import type { Command } from 'commander';
2
+ /**
3
+ * Commander's `.addCommand()` does not inherit the parent's help configuration.
4
+ * This recursive helper applies `showGlobalOptions: true` to every node in the
5
+ * command tree after registration, so that each subcommand's `--help` output
6
+ * includes a "Global Options" section showing `--json`, `--verbose`, and `--cwd`.
7
+ *
8
+ * Must be called once at the end of `registerCommands(program)` after all
9
+ * subcommands have been added via `.addCommand()`.
10
+ */
11
+ export declare function applyHelpConfiguration(command: Command): void;
12
+ //# sourceMappingURL=help-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"help-config.d.ts","sourceRoot":"","sources":["../../src/app/help-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAK7D"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Commander's `.addCommand()` does not inherit the parent's help configuration.
3
+ * This recursive helper applies `showGlobalOptions: true` to every node in the
4
+ * command tree after registration, so that each subcommand's `--help` output
5
+ * includes a "Global Options" section showing `--json`, `--verbose`, and `--cwd`.
6
+ *
7
+ * Must be called once at the end of `registerCommands(program)` after all
8
+ * subcommands have been added via `.addCommand()`.
9
+ */
10
+ export function applyHelpConfiguration(command) {
11
+ command.configureHelp({ showGlobalOptions: true });
12
+ for (const sub of command.commands) {
13
+ applyHelpConfiguration(sub);
14
+ }
15
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/doctor/index.ts"],"names":[],"mappings":"AAWA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,aAAa,EACnB,MAAM,sBAAsB,CAAC;AAE9B,OA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AE,MAAM,CAAC;IACnC,cAAc,EAAE,oBAAoB,EAAE,CAAC;CACxC;AAsbD,wBAAgB,mBAAmB,CACjC,SAAS,GAAE,OAAO,CAAC,kBAAkB,CAAM,GAC1C,OAAO,CAcT"}
@@ -5,6 +5,7 @@ import { buildCommandContext, } from '../../app/command-context.js';
5
5
  import { compareVersions } from '../init/tools/shared/version.js';
6
6
  import { createPjmDisabledCheck, runPjmDoctorChecks, } from '../pjm/doctor.js';
7
7
  import { getSkillVersion } from '../shared/frontmatter.js';
8
+ import { withScopeOption } from '../shared/scope-option.js';
8
9
  import { readGlobalOptions, resolveConcreteScopes, } from '../shared/shared.utils.js';
9
10
  import { readOatConfig } from '../../config/oat-config.js';
10
11
  import { resolveAssetsRoot } from '../../fs/assets.js';
@@ -379,7 +380,7 @@ export function createDoctorCommand(overrides = {}) {
379
380
  ...createDependencies(),
380
381
  ...overrides,
381
382
  };
382
- return new Command('doctor')
383
+ return withScopeOption(new Command('doctor'))
383
384
  .description('Run environment and setup diagnostics')
384
385
  .action(async (_options, command) => {
385
386
  const context = dependencies.buildCommandContext(readGlobalOptions(command));
@@ -0,0 +1,35 @@
1
+ import { type CommandContext, type GlobalOptions } from '../../app/command-context.js';
2
+ import { type ExecTarget, type OatConfig, type OatLocalConfig, type UserConfig } from '../../config/oat-config.js';
3
+ import { type ResolvedConfig } from '../../config/resolve.js';
4
+ import { Command } from 'commander';
5
+ interface GateCommandDependencies {
6
+ buildCommandContext: (options: GlobalOptions) => CommandContext;
7
+ resolveProjectRoot: (cwd: string) => Promise<string>;
8
+ readOatConfig: (repoRoot: string) => Promise<OatConfig>;
9
+ writeOatConfig: (repoRoot: string, config: OatConfig) => Promise<void>;
10
+ readOatLocalConfig: (repoRoot: string) => Promise<OatLocalConfig>;
11
+ writeOatLocalConfig: (repoRoot: string, config: OatLocalConfig) => Promise<void>;
12
+ readUserConfig: (userConfigDir: string) => Promise<UserConfig>;
13
+ writeUserConfig: (userConfigDir: string, config: UserConfig) => Promise<void>;
14
+ resolveEffectiveConfig: (repoRoot: string, userConfigDir: string, env: NodeJS.ProcessEnv) => Promise<ResolvedConfig>;
15
+ runProcess: (command: string, args: string[], options: ProcessRunOptions) => Promise<ProcessRunResult>;
16
+ processEnv: NodeJS.ProcessEnv;
17
+ }
18
+ interface ProcessRunOptions {
19
+ cwd: string;
20
+ env: NodeJS.ProcessEnv;
21
+ purpose: 'host-detection' | 'availability' | 'execute';
22
+ stdio: 'ignore' | 'inherit';
23
+ }
24
+ interface ProcessRunResult {
25
+ exitCode: number;
26
+ }
27
+ type CrossProviderAvoid = 'same-runtime' | 'none';
28
+ export interface SelectedExecTarget {
29
+ id: string;
30
+ target: ExecTarget;
31
+ }
32
+ export declare function selectExecTarget(registry: Readonly<Record<string, ExecTarget>>, currentRuntime: string, avoid: CrossProviderAvoid): SelectedExecTarget | null;
33
+ export declare function createGateCommand(overrides?: Partial<GateCommandDependencies>): Command;
34
+ export {};
35
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/gate/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,aAAa,EACnB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAQL,KAAK,UAAU,EAIf,KAAK,SAAS,EACd,KAAK,cAAc,EACnB,KAAK,UAAU,EAEhB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAIL,KAAK,cAAc,EACpB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,UAAU,uBAAuB;IAC/B,mBAAmB,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,cAAc,CAAC;IAChE,kBAAkB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACrD,aAAa,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,SAAS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