@open-agent-toolkit/cli 0.1.50 → 0.1.51
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.
- package/assets/agents/oat-phase-implementer.md +16 -5
- package/assets/docs/cli-utilities/workflow-gates.md +1 -1
- package/assets/docs/provider-sync/commands.md +29 -1
- package/assets/docs/provider-sync/providers.md +13 -4
- package/assets/docs/provider-sync/scope-and-surface.md +13 -0
- package/assets/docs/workflows/projects/implementation-execution.md +29 -3
- package/assets/docs/workflows/projects/reviews.md +18 -1
- package/assets/public-package-versions.json +4 -4
- package/assets/skills/oat-agent-instructions-analyze/references/docs/provider-reference.md +8 -2
- package/assets/skills/oat-agent-instructions-apply/references/docs/provider-reference.md +8 -2
- package/assets/skills/oat-project-implement/SKILL.md +93 -38
- package/assets/skills/oat-project-review-provide/SKILL.md +27 -9
- package/dist/commands/doctor/index.d.ts.map +1 -1
- package/dist/commands/doctor/index.js +148 -85
- package/dist/commands/gate/index.js +1 -1
- package/dist/commands/project/dispatch-ceiling/index.d.ts.map +1 -1
- package/dist/commands/project/dispatch-ceiling/index.js +80 -0
- package/dist/commands/providers/codex/materialize.d.ts.map +1 -1
- package/dist/commands/providers/codex/materialize.js +31 -15
- package/dist/providers/codex/codec/config-merge.d.ts +8 -2
- package/dist/providers/codex/codec/config-merge.d.ts.map +1 -1
- package/dist/providers/codex/codec/config-merge.js +17 -2
- package/dist/providers/codex/codec/sync-extension.d.ts.map +1 -1
- package/dist/providers/codex/codec/sync-extension.js +14 -4
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: oat-phase-implementer
|
|
3
|
-
version: 1.0.
|
|
3
|
+
version: 1.0.5
|
|
4
4
|
description: Acts as a phase coordinator that dispatches one exact target-pinned task worker at a time, or executes exactly one bounded Task Scope when dispatched as a worker. Used by oat-project-implement.
|
|
5
5
|
tools: Read, Write, Edit, Bash, Grep, Glob, Task
|
|
6
6
|
color: cyan
|
|
@@ -148,10 +148,12 @@ downgrade for a managed task.
|
|
|
148
148
|
|
|
149
149
|
#### 4. Build the Exact Invocation Before Logging
|
|
150
150
|
|
|
151
|
-
- Codex: use `providers.codex.dispatchArgs.variant` as the actual `agent_type
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
151
|
+
- Codex: use `providers.codex.dispatchArgs.variant` as the actual `agent_type`
|
|
152
|
+
and attempt the exact materialized `agent_type` first. Only explicit
|
|
153
|
+
pre-start native role-selection rejection of that exact `agent_type`, before
|
|
154
|
+
any child starts, permits a fresh pinned fallback: launch a fresh Codex child
|
|
155
|
+
pinned to `selection.target.model` and `selection.target.effort` with these
|
|
156
|
+
canonical instructions and the Task Scope. If neither exact route is
|
|
155
157
|
available, block.
|
|
156
158
|
- Claude: pass `providers.claude.dispatchArgs.model` as the actual Task `model`.
|
|
157
159
|
- Cursor: pass `providers.cursor.dispatchArgs.model` byte-for-byte as the actual
|
|
@@ -163,6 +165,15 @@ transient retry must reuse the same exact role/model/effort payload. A
|
|
|
163
165
|
substantive escalation must re-resolve another configured candidate without
|
|
164
166
|
exceeding the same named maximum.
|
|
165
167
|
|
|
168
|
+
The launcher-owned `target`, `model_axis`, and `effort_axis` come only from the
|
|
169
|
+
resolver output and constructed invocation payload. They are immutable and
|
|
170
|
+
must not be populated, replaced, or contradicted by worker self-report. Spawn
|
|
171
|
+
acceptance confirms that configured invocation; worker output is only task
|
|
172
|
+
outcome data. Missing telemetry, missing self-report, and accepted terminal
|
|
173
|
+
results including `BLOCKED` never trigger fallback. Once a child starts, every
|
|
174
|
+
terminal result is authoritative for that attempt and is not native
|
|
175
|
+
role-selection rejection.
|
|
176
|
+
|
|
166
177
|
#### 5. Dispatch and Verify Serially
|
|
167
178
|
|
|
168
179
|
Run one exact task worker at a time, serially in the same worktree:
|
|
@@ -518,7 +518,7 @@ Gate failure behavior is owned by the gate-aware skill:
|
|
|
518
518
|
available target. Once a target actually runs, its exit code is the gate result;
|
|
519
519
|
OAT does not try another target after a failed review.
|
|
520
520
|
|
|
521
|
-
Gate target execution has a child-process timeout (default
|
|
521
|
+
Gate target execution has a child-process timeout (default 15 minutes, override
|
|
522
522
|
with `OAT_GATE_EXEC_TIMEOUT_MS`). When a review target times out, JSON output
|
|
523
523
|
reports `status: review_failed`, `outcome: review_did_not_complete`,
|
|
524
524
|
`timedOut: true`, and the timeout value so automation can distinguish a hung
|
|
@@ -21,7 +21,7 @@ These command definitions inherit the cross-cutting CLI conventions in:
|
|
|
21
21
|
|
|
22
22
|
- What it does: defines the day-to-day provider-sync command surface for inspecting state, reconciling provider views, and changing provider enablement.
|
|
23
23
|
- When to use it: after you have canonical assets in place and need to check sync state, write provider views, or change provider config.
|
|
24
|
-
- Primary commands: `oat status`, `oat sync`, `oat providers list`, `oat providers inspect`, `oat providers set`
|
|
24
|
+
- Primary commands: `oat status`, `oat sync`, `oat providers list`, `oat providers inspect`, `oat providers set`, `oat providers codex materialize`
|
|
25
25
|
|
|
26
26
|
## `oat status`
|
|
27
27
|
|
|
@@ -71,6 +71,34 @@ Key behavior:
|
|
|
71
71
|
- Options: `--enabled <providers>`, `--disabled <providers>` (comma-separated)
|
|
72
72
|
- Changes take effect on next `oat sync`
|
|
73
73
|
|
|
74
|
+
## `oat providers codex materialize`
|
|
75
|
+
|
|
76
|
+
Purpose:
|
|
77
|
+
|
|
78
|
+
- Materialize one canonical Markdown agent as a Codex TOML role and register it
|
|
79
|
+
in Codex configuration
|
|
80
|
+
|
|
81
|
+
Required operands:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
oat providers codex materialize <agent-name> \
|
|
85
|
+
--model <model-id> \
|
|
86
|
+
--effort <reasoning-effort>
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Key behavior:
|
|
90
|
+
|
|
91
|
+
- Project scope is the default and writes only `.codex/config.toml` plus the
|
|
92
|
+
project role file; `--scope user` writes only under `~/.codex`
|
|
93
|
+
- `--agent-path` selects a specific canonical agent and `--role-name` overrides
|
|
94
|
+
the generated role name
|
|
95
|
+
- Managed role registration enables multi-agent support and merges an
|
|
96
|
+
`agents.max_depth` floor of `2`
|
|
97
|
+
- Project writes preserve a higher existing project depth or inherited user
|
|
98
|
+
depth without mutating user configuration; user writes do not inspect or
|
|
99
|
+
mutate project configuration
|
|
100
|
+
- Existing unrelated Codex configuration and custom roles are preserved
|
|
101
|
+
|
|
74
102
|
## Notes
|
|
75
103
|
|
|
76
104
|
- `oat init --scope project` is commonly used before provider-interop commands because it initializes `.oat/sync/config.json`.
|
|
@@ -61,6 +61,9 @@ description: 'Provider-specific path mappings for Claude, Cursor, Copilot, Gemin
|
|
|
61
61
|
- Codex `max` is a first-class dispatch effort. It is present only for the Sol family in the committed supported catalogue, for both implementer and reviewer roles.
|
|
62
62
|
- Codex multi-agent dispatch uses config-defined roles (`[agents.<name>]`) and `agent_type`
|
|
63
63
|
- Codex subagent workflows require `[features] multi_agent = true` in active Codex config layers
|
|
64
|
+
- Managed Codex roles require `agents.max_depth >= 2` for the native topology: root (depth 0) → phase coordinator (depth 1) → task worker (depth 2). Sync and direct materialization merge that floor without lowering a higher target value; project writes also preserve a higher inherited user value.
|
|
65
|
+
- Project sync or materialization writes only the project's `.codex/config.toml`; explicit user-scope materialization writes only `~/.codex/config.toml`. Project scope may read the lower-precedence user depth, but never mutates user configuration.
|
|
66
|
+
- When managed roles exist and effective depth is missing, invalid, or below `2`, `oat doctor` and managed implementation preflight explain the topology and recommend `oat sync --scope project` or `oat sync --scope user` for the affected scope. Direct materialization with the same scope is the single-role repair path.
|
|
64
67
|
- `oat-phase-implementer` is dual-mode: Phase Scope makes it a phase coordinator, while Task Scope makes the exact materialized variant a one-task worker. The coordinator does not implement ordinary tasks itself.
|
|
65
68
|
|
|
66
69
|
## Managed dispatch views
|
|
@@ -84,10 +87,16 @@ that repository change.
|
|
|
84
87
|
|
|
85
88
|
At implementation time, the phase coordinator passes the recorded named
|
|
86
89
|
maximum through invocation-only `--ceiling-tier`, resolves one exact candidate
|
|
87
|
-
per bounded task, and dispatches one task worker at a time. Codex
|
|
88
|
-
resolver-returned materialized role
|
|
89
|
-
|
|
90
|
-
|
|
90
|
+
per bounded task, and dispatches one task worker at a time. Codex first
|
|
91
|
+
attempts the resolver-returned materialized role as the native `agent_type`.
|
|
92
|
+
The launcher records the target, model axis, and effort axis from that resolved
|
|
93
|
+
payload; worker self-report is not provenance and cannot replace those values.
|
|
94
|
+
Only an explicit pre-start native role-selection rejection permits a fresh
|
|
95
|
+
pinned-child fallback. An accepted child, including one that later returns
|
|
96
|
+
`BLOCKED` or lacks telemetry, is a task outcome rather than a fallback signal.
|
|
97
|
+
Claude and Cursor bind the exact model arguments described above. A missing or
|
|
98
|
+
unselectable managed target blocks rather than falling back to the coordinator
|
|
99
|
+
or a base role.
|
|
91
100
|
|
|
92
101
|
## Scope rules
|
|
93
102
|
|
|
@@ -48,9 +48,22 @@ Rules are currently project-scoped canonical content. Unlike skills and agents,
|
|
|
48
48
|
- `oat init --scope project` (interactive) prompts for supported providers and persists explicit true/false values.
|
|
49
49
|
- `oat sync --scope project` uses config-aware provider activation and can prompt to remediate detected mismatches.
|
|
50
50
|
- Codex project-scope subagent sync writes `.codex/config.toml` and `.codex/agents/*.toml` at command layer after path-mapping sync. Every generated project Codex variant and registration is repository-owned, version-controlled provider output. OAT provides no automatic ignore mechanism for this project output; collaborators review and commit it like other project configuration.
|
|
51
|
+
- Managed Codex roles require an effective `agents.max_depth` of at least `2` for `root (0) → phase coordinator (1) → task worker (2)`. Sync and direct materialization apply that floor without lowering a higher target value. A project write may read a higher lower-precedence user value and preserves it in the project configuration; it writes only project `.codex/config.toml`. User scope writes only `~/.codex/config.toml` and does not read or change project configuration.
|
|
52
|
+
- If a managed role has missing, invalid, or insufficient effective depth, `oat doctor` and managed implementation preflight report the topology and give a scope-specific repair: `oat sync --scope project` for project scope or `oat sync --scope user` for user scope. For a single role, use `oat providers codex materialize` with the same explicit scope.
|
|
51
53
|
- Codex aggregate config drift is reported via sync/status extension metadata (`aggregateConfigHash`); it is not persisted as a separate manifest schema entry.
|
|
52
54
|
- Codex user-config materialization writes user-owned implementer and reviewer roles under the user provider directory, `~/.codex`; it does not write those roles into the repository.
|
|
53
55
|
|
|
56
|
+
## Codex managed dispatch
|
|
57
|
+
|
|
58
|
+
For managed Codex work, the resolver-returned materialized role is attempted as
|
|
59
|
+
the native `agent_type` first. The launcher owns the resulting target, model,
|
|
60
|
+
and reasoning-effort provenance, derived from the resolved candidate and
|
|
61
|
+
compiled invocation payload; worker output cannot populate or overwrite it.
|
|
62
|
+
A fresh pinned child is allowed only after explicit pre-start native
|
|
63
|
+
role-selection rejection. Missing runtime telemetry, missing self-report, or a
|
|
64
|
+
child accepted by the native route that later returns `BLOCKED` are not
|
|
65
|
+
role-selection rejection and do not permit fallback.
|
|
66
|
+
|
|
54
67
|
## Non-interop namespaces in the same CLI
|
|
55
68
|
|
|
56
69
|
- `oat project new <name>` (workflow/project scaffolding)
|
|
@@ -113,6 +113,19 @@ An unresolved non-interactive preflight blocks. Managed `Uncapped` and
|
|
|
113
113
|
`Inherit Host Defaults` are explicit modes; omitted policy state is not an
|
|
114
114
|
implicit fallback.
|
|
115
115
|
|
|
116
|
+
For a managed Codex implementer, preflight also resolves the effective
|
|
117
|
+
`agents.max_depth`. Native `root (0) → phase coordinator (1) → task worker (2)`
|
|
118
|
+
execution requires a depth of at least `2`. Missing, invalid, or lower values
|
|
119
|
+
block before dispatch and identify the owning scope:
|
|
120
|
+
|
|
121
|
+
- Project scope: run `oat sync --scope project`
|
|
122
|
+
- User scope: run `oat sync --scope user`
|
|
123
|
+
- Single-role repair: rerun `oat providers codex materialize` with the required
|
|
124
|
+
agent name, model, effort, and matching scope
|
|
125
|
+
|
|
126
|
+
Project preflight may inherit a valid higher user depth, but remediation never
|
|
127
|
+
writes across the project/user boundary.
|
|
128
|
+
|
|
116
129
|
## Resolve the Effective Named Maximum
|
|
117
130
|
|
|
118
131
|
For each phase, the orchestrator determines the task maximum:
|
|
@@ -202,9 +215,14 @@ candidate above the maximum or absent from the configured ladder blocks.
|
|
|
202
215
|
Build the complete host payload before writing dispatch logs:
|
|
203
216
|
|
|
204
217
|
- **Codex:** use `providers.codex.dispatchArgs.variant` as the actual
|
|
205
|
-
`agent_type`.
|
|
206
|
-
|
|
207
|
-
|
|
218
|
+
`agent_type`. An accepted launch with that exact materialized role is
|
|
219
|
+
authoritative evidence of the configured invocation for coordinators and
|
|
220
|
+
task workers. A fresh Codex child pinned to `selection.target.model` and
|
|
221
|
+
`selection.target.effort` is permitted only after an actual native
|
|
222
|
+
role-selection rejection; missing self-reporting or model/effort telemetry
|
|
223
|
+
does not justify the fallback. An accepted child, including one that later
|
|
224
|
+
returns `BLOCKED`, is a task outcome and never triggers another pinned-child
|
|
225
|
+
fallback.
|
|
208
226
|
- **Claude:** pass `providers.claude.dispatchArgs.model` as the actual Task
|
|
209
227
|
`model`. Its separate effort axis is `not-applicable`.
|
|
210
228
|
- **Cursor:** pass `providers.cursor.dispatchArgs.model` byte-for-byte as the
|
|
@@ -238,6 +256,14 @@ Configured defaults and configured gate invocation remain distinct from runtime
|
|
|
238
256
|
identity; when runtime identity is not observed, the report says so without
|
|
239
257
|
weakening exact requested model or effort controls.
|
|
240
258
|
|
|
259
|
+
After constructing the complete payload, the launcher records the selected
|
|
260
|
+
target and requested model/effort controls in the report. Those configured
|
|
261
|
+
invocation fields are launcher-owned and derive from resolver output plus the
|
|
262
|
+
actual payload; worker output cannot populate or overwrite them. Optional
|
|
263
|
+
coordinator or worker self-report remains non-authoritative runtime evidence.
|
|
264
|
+
Runtime attestation, when available, is separate host-generated metadata rather
|
|
265
|
+
than an agent claim.
|
|
266
|
+
|
|
241
267
|
## Task Scope and Commit Verification
|
|
242
268
|
|
|
243
269
|
Each worker receives only one task:
|
|
@@ -207,7 +207,24 @@ Final review `passed` gate requires:
|
|
|
207
207
|
- Project-scope Codex role files are generated from canonical `.agents/agents/*.md` during `oat sync --scope project`.
|
|
208
208
|
- User-config Codex roles materialize under `~/.codex`; project-config and supported-catalogue roles remain in the project-scoped, version-controlled `.codex` view.
|
|
209
209
|
- Some Codex hosts require explicit user authorization before the skill may call `spawn_agent`. In those hosts, `oat-project-review-provide` should ask whether to delegate to `oat-reviewer` instead of reporting the reviewer as unresolved.
|
|
210
|
-
-
|
|
210
|
+
- An accepted launch using the exact materialized `agent_type` is authoritative
|
|
211
|
+
configured-invocation evidence for a reviewer. After the complete payload
|
|
212
|
+
is built, the launcher records its `target`, `model_axis`, and
|
|
213
|
+
`effort_axis`; reviewer self-report cannot supply or overwrite those
|
|
214
|
+
fields. Optional self-report is non-authoritative, while runtime
|
|
215
|
+
attestation is host-generated metadata.
|
|
216
|
+
- A fresh pinned CLI child is a fallback only for an actual native
|
|
217
|
+
role-selection rejection, never for absent self-reporting or model/effort
|
|
218
|
+
telemetry. A child accepted by the native host, including one that later
|
|
219
|
+
returns `BLOCKED`, has produced a review outcome and cannot trigger the
|
|
220
|
+
fallback.
|
|
221
|
+
- An accepted reviewer that returns `BLOCKED` blocks the relevant review. It
|
|
222
|
+
cannot trigger the pinned fallback, and absent findings in that blocked
|
|
223
|
+
outcome cannot be interpreted as a pass.
|
|
224
|
+
- For unmanaged review dispatch, if subagent dispatch is unavailable, follow
|
|
225
|
+
the existing fallback path (fresh session preferred, inline reset as
|
|
226
|
+
fallback). This generic fallback does not override managed exact-target
|
|
227
|
+
rules: a managed reviewer that cannot be launched exactly blocks the review.
|
|
211
228
|
|
|
212
229
|
## Reference artifacts
|
|
213
230
|
|
|
@@ -220,6 +220,8 @@ The package manager for the agent skills ecosystem. Installs skills across 27+ a
|
|
|
220
220
|
- Enable feature flag in config:
|
|
221
221
|
- `[features]`
|
|
222
222
|
- `multi_agent = true`
|
|
223
|
+
- For OAT's nested root → coordinator → worker topology, configure
|
|
224
|
+
`[agents] max_depth = 2` or higher.
|
|
223
225
|
- Define role(s) in config:
|
|
224
226
|
- `[agents.oat-reviewer]` (or role names your workflow dispatches)
|
|
225
227
|
- Dispatch by role name using `agent_type` (not `subagent_type`).
|
|
@@ -228,8 +230,12 @@ The package manager for the agent skills ecosystem. Installs skills across 27+ a
|
|
|
228
230
|
**Note on OAT provider sync:**
|
|
229
231
|
|
|
230
232
|
- Codex runtime dispatch is config-role based (`[agents.<name>]`) and TOML-backed.
|
|
231
|
-
- OAT
|
|
232
|
-
|
|
233
|
+
- OAT sync exports canonical Markdown agents as `.codex/agents/*.toml` role
|
|
234
|
+
configs and registers them in `.codex/config.toml`.
|
|
235
|
+
- Project-scoped output is repository-owned and version controlled. Explicit
|
|
236
|
+
user-scope materialization writes under `~/.codex` instead.
|
|
237
|
+
- Sync and direct materialization merge an `agents.max_depth` floor of `2`
|
|
238
|
+
without lowering a higher project or inherited user value.
|
|
233
239
|
|
|
234
240
|
### Other Codex Resources
|
|
235
241
|
|
|
@@ -220,6 +220,8 @@ The package manager for the agent skills ecosystem. Installs skills across 27+ a
|
|
|
220
220
|
- Enable feature flag in config:
|
|
221
221
|
- `[features]`
|
|
222
222
|
- `multi_agent = true`
|
|
223
|
+
- For OAT's nested root → coordinator → worker topology, configure
|
|
224
|
+
`[agents] max_depth = 2` or higher.
|
|
223
225
|
- Define role(s) in config:
|
|
224
226
|
- `[agents.oat-reviewer]` (or role names your workflow dispatches)
|
|
225
227
|
- Dispatch by role name using `agent_type` (not `subagent_type`).
|
|
@@ -228,8 +230,12 @@ The package manager for the agent skills ecosystem. Installs skills across 27+ a
|
|
|
228
230
|
**Note on OAT provider sync:**
|
|
229
231
|
|
|
230
232
|
- Codex runtime dispatch is config-role based (`[agents.<name>]`) and TOML-backed.
|
|
231
|
-
- OAT
|
|
232
|
-
|
|
233
|
+
- OAT sync exports canonical Markdown agents as `.codex/agents/*.toml` role
|
|
234
|
+
configs and registers them in `.codex/config.toml`.
|
|
235
|
+
- Project-scoped output is repository-owned and version controlled. Explicit
|
|
236
|
+
user-scope materialization writes under `~/.codex` instead.
|
|
237
|
+
- Sync and direct materialization merge an `agents.max_depth` floor of `2`
|
|
238
|
+
without lowering a higher project or inherited user value.
|
|
233
239
|
|
|
234
240
|
### Other Codex Resources
|
|
235
241
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: oat-project-implement
|
|
3
|
-
version: 2.0.
|
|
3
|
+
version: 2.0.35
|
|
4
4
|
description: Use when plan.md is ready for execution. Dispatches phase coordinators that select one exact target-pinned worker per task; supports bounded fix loops and plan-declared worktree-isolated parallel phases.
|
|
5
5
|
oat_gateable: true
|
|
6
6
|
argument-hint: '[--retry-limit <N>] [--dry-run]'
|
|
@@ -107,16 +107,21 @@ PROJECTS_ROOT="${PROJECTS_ROOT%/}"
|
|
|
107
107
|
**Mandatory target-first order:** Complete Dispatch Policy Preflight and resolve
|
|
108
108
|
the concrete managed Codex target before probing generic agent availability or
|
|
109
109
|
locking Tier 1/Tier 2. A concrete target takes precedence over tier selection:
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
110
|
+
first send the exact registered role through native dispatch. Only a native
|
|
111
|
+
role-selection rejection permits an explicitly pinned fresh Codex child. If
|
|
112
|
+
neither exact route is possible, inline execution is allowed only with verified
|
|
113
|
+
equivalent current-host model and effort controls; otherwise block before work
|
|
114
|
+
starts. Explicit inherit/default and documented managed-uncapped reviewer
|
|
115
|
+
behavior remain the only base-role exceptions.
|
|
116
|
+
|
|
117
|
+
For a concrete managed Codex role, first send the resolver-returned Codex
|
|
118
|
+
variant through the native spawn API as `agent_type`. Spawn acceptance plus the
|
|
119
|
+
constructed launcher payload is configured invocation evidence; independent
|
|
120
|
+
runtime telemetry or agent self-report is not required. Launch a fresh Codex
|
|
121
|
+
child pinned to the resolver-returned model and effort with canonical role
|
|
122
|
+
instructions only after a native role-selection rejection as defined below. If
|
|
123
|
+
that fresh child cannot be launched, fail closed and block; never substitute
|
|
124
|
+
the coordinator or base role.
|
|
120
125
|
|
|
121
126
|
Use base `oat-phase-implementer` only for the allowed exceptions above:
|
|
122
127
|
explicit inherit/default behavior. It is never a managed task-worker fallback.
|
|
@@ -142,9 +147,9 @@ Detection logic:
|
|
|
142
147
|
- Declined → Tier 2.
|
|
143
148
|
|
|
144
149
|
- If the host does not resolve either generic agent, first attempt the exact
|
|
145
|
-
registered role
|
|
146
|
-
|
|
147
|
-
target-first rule above.
|
|
150
|
+
registered role natively for any concrete managed target. Use the explicitly
|
|
151
|
+
pinned fresh-child route only after a native role-selection rejection. Select
|
|
152
|
+
Tier 2 only when inline execution is allowed by the target-first rule above.
|
|
148
153
|
|
|
149
154
|
**Approval scope rule:** this Tier selection applies to both phase implementation and checkpoint review. Do not infer a mixed mode from conversational emphasis on review checkpoints. If the user has not explicitly approved Tier 1 for the run, stay Tier 2 throughout. Mixed mode is only valid when the user explicitly requests it.
|
|
150
155
|
|
|
@@ -181,6 +186,20 @@ If approved: Selected: Tier 1 — Subagents
|
|
|
181
186
|
Forbidden: Selected: Tier 2 — Inline because the user did not separately mention subagents.
|
|
182
187
|
```
|
|
183
188
|
|
|
189
|
+
**Native role-selection rejection:** This means the native host explicitly
|
|
190
|
+
reports that the requested `agent_type` is unsupported, unknown, unregistered,
|
|
191
|
+
or rejected before the child or agent starts. Missing runtime telemetry,
|
|
192
|
+
missing agent self-report, a timeout after spawn acceptance, or any terminal
|
|
193
|
+
result from an accepted child — including `BLOCKED` — is not role
|
|
194
|
+
unavailability and is not a native role-selection rejection. Self-report is
|
|
195
|
+
optional diagnostic data and cannot populate or overwrite launcher-owned
|
|
196
|
+
`target`, `model_axis`, or `effort_axis` fields. An accepted child cannot
|
|
197
|
+
trigger the fresh pinned-child or CLI fallback. If an accepted native reviewer
|
|
198
|
+
later times out, retry the same already-selected native `agent_type` route. The
|
|
199
|
+
fresh pinned-child route is eligible only when the original native attempt
|
|
200
|
+
received explicit pre-start role-selection rejection; a timeout after native
|
|
201
|
+
spawn acceptance never changes routes.
|
|
202
|
+
|
|
184
203
|
**Legacy state migration:** If `state.md` contains `oat_execution_mode: subagent-driven`, silently ignore it. On the next bookkeeping write, remove that key. Do not redirect to `oat-project-subagent-implement` — that skill is deprecated.
|
|
185
204
|
|
|
186
205
|
### Dispatch Policy Preflight
|
|
@@ -427,14 +446,19 @@ Axis states:
|
|
|
427
446
|
Codex rules:
|
|
428
447
|
|
|
429
448
|
**Managed Codex execution invariant:** When the resolver returns a model+effort
|
|
430
|
-
target,
|
|
431
|
-
`providers.codex.dispatchArgs.variant
|
|
432
|
-
|
|
433
|
-
|
|
449
|
+
target, the resolver-returned Codex variant from
|
|
450
|
+
`providers.codex.dispatchArgs.variant` must first be sent through the native
|
|
451
|
+
spawn API as `agent_type`. Spawn acceptance plus the launcher payload is
|
|
452
|
+
configured invocation evidence with launcher-selected/config-declared
|
|
453
|
+
provenance. If and only if the host returns a native role-selection rejection,
|
|
454
|
+
launch a fresh Codex child with the resolver target's explicit model, reasoning
|
|
455
|
+
effort, and canonical role instructions from
|
|
434
456
|
`.agents/agents/oat-phase-implementer.md` or
|
|
435
|
-
`.agents/agents/oat-reviewer.md`.
|
|
436
|
-
|
|
437
|
-
|
|
457
|
+
`.agents/agents/oat-reviewer.md`. Missing runtime telemetry or agent self-report
|
|
458
|
+
is not role unavailability, and an accepted child result such as `BLOCKED`
|
|
459
|
+
cannot trigger fallback. Workflow correctness must not require provider restart
|
|
460
|
+
or hot reload. A managed base role is forbidden when a concrete target was
|
|
461
|
+
requested; never silently downgrade to it. Base roles remain valid only for
|
|
438
462
|
explicit inherit/default behavior and the documented managed-uncapped reviewer
|
|
439
463
|
fallback.
|
|
440
464
|
|
|
@@ -453,7 +477,7 @@ fallback.
|
|
|
453
477
|
- Capped managed policy: reviewer targets the configured cap for deterministic quality gate behavior.
|
|
454
478
|
- Managed `Uncapped`: no reviewer target exists; use base/unpinned reviewer fallback and log `selectionMode=no-review-target`, `selectedValue=null`, and `effort_axis=provider-default`.
|
|
455
479
|
- Inherit/default: no reviewer target exists; use base/unpinned reviewer fallback and log `selectionMode=inherit-default`, `selectedValue=null`, and `effort_axis=provider-default`.
|
|
456
|
-
8. Codex payload-first assertion applies whenever the resolver returns a materialized model+effort target. If `providers.codex.dispatchArgs.variant` is present, the actual `spawn_agent` payload MUST use it as `agent_type`; when that variant came from a Codex model+effort target, log `model_axis=selected:<model>` and `effort_axis=selected:<effort>` from resolver output.
|
|
480
|
+
8. Codex payload-first assertion applies whenever the resolver returns a materialized model+effort target. If `providers.codex.dispatchArgs.variant` is present, the actual `spawn_agent` payload MUST first use it as native `agent_type`; when that variant came from a Codex model+effort target, log `model_axis=selected:<model>` and `effort_axis=selected:<effort>` from resolver output and the constructed launcher payload. Spawn acceptance is sufficient configured invocation evidence. Missing telemetry or self-report does not make the variant unusable. If native role selection explicitly rejects the variant, use the explicitly pinned fresh-child route or block. Use the base role and log provider-default only for explicit inherit/default behavior or the documented managed-uncapped reviewer exception. Always derive `model_axis` and `effort_axis` from resolver output, not from legacy role-name parsing or agent self-report.
|
|
457
481
|
9. Do not use top-level per-call `reasoning_effort` as the standard OAT selected-effort path; dogfooding showed that path can be inconsistent.
|
|
458
482
|
|
|
459
483
|
Claude rules:
|
|
@@ -486,6 +510,11 @@ Payload-first invariant:
|
|
|
486
510
|
|
|
487
511
|
- Build the actual host dispatch argument map before logging.
|
|
488
512
|
- Do not emit `selected:<value>` unless the host invocation contains the corresponding role/model selection.
|
|
513
|
+
- For every coordinator, task-worker, fix, and review launch, record `target`,
|
|
514
|
+
`model_axis`, and `effort_axis` from resolver output and the actual launcher
|
|
515
|
+
payload after payload construction.
|
|
516
|
+
- Those fields are launcher-owned. Agent self-report cannot populate or
|
|
517
|
+
overwrite them; it may only be retained separately as optional diagnostics.
|
|
489
518
|
- Derive `Dispatch target` and `Effort axis` / `Model axis` from the payload.
|
|
490
519
|
- After the payload is built, append the compatibility stamp returned from
|
|
491
520
|
`formatDispatchStamp(dispatchReport)` to Dispatch Notes for every
|
|
@@ -1068,10 +1097,15 @@ coordinator_target: {resolver-selected coordinator target}
|
|
|
1068
1097
|
|
|
1069
1098
|
Tier 1 uses the already resolved exact coordinator role/model payload and sends
|
|
1070
1099
|
the Phase Scope. A concrete Codex coordinator uses
|
|
1071
|
-
`providers.codex.dispatchArgs.variant
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1100
|
+
`providers.codex.dispatchArgs.variant` first as native `agent_type`. After the
|
|
1101
|
+
host accepts the spawn, record the coordinator `target`, `model_axis`, and
|
|
1102
|
+
`effort_axis` from resolver output and that constructed launcher payload; do not
|
|
1103
|
+
wait for or accept a coordinator self-report as proof. Only an actual native
|
|
1104
|
+
role-selection rejection permits the fresh child pinned to the resolver's model
|
|
1105
|
+
and effort with canonical coordinator instructions. An accepted coordinator
|
|
1106
|
+
that later returns `BLOCKED` has produced a coordinator outcome and cannot
|
|
1107
|
+
trigger fallback. Claude and Cursor coordinator calls pass their exact resolver
|
|
1108
|
+
model argument.
|
|
1075
1109
|
|
|
1076
1110
|
Tier 2 may run the coordinator instructions in the current context only when
|
|
1077
1111
|
that context can still dispatch every exact task worker. Tier 2 never permits
|
|
@@ -1104,14 +1138,19 @@ For each task in dependency order, the coordinator must:
|
|
|
1104
1138
|
is read-only and must never persist its override.
|
|
1105
1139
|
|
|
1106
1140
|
3. Build the actual provider invocation before logging:
|
|
1107
|
-
- Codex uses `providers.codex.dispatchArgs.variant` as
|
|
1108
|
-
|
|
1109
|
-
|
|
1141
|
+
- Codex first uses `providers.codex.dispatchArgs.variant` as native
|
|
1142
|
+
`agent_type`. Spawn acceptance establishes the configured invocation; only
|
|
1143
|
+
a native role-selection rejection permits the exact fresh pinned-child
|
|
1144
|
+
model/effort route.
|
|
1110
1145
|
- Claude passes `providers.claude.dispatchArgs.model` as the actual Task
|
|
1111
1146
|
`model`.
|
|
1112
1147
|
- Cursor passes `providers.cursor.dispatchArgs.model` byte-for-byte as the
|
|
1113
1148
|
actual invocation model. Treat the string as opaque and never normalize or
|
|
1114
1149
|
infer capability from it.
|
|
1150
|
+
- After construction, record the task-worker `target`, `model_axis`, and
|
|
1151
|
+
`effort_axis` from resolver output and the launcher payload. Missing worker
|
|
1152
|
+
telemetry or self-report is not unavailability, and self-report cannot
|
|
1153
|
+
replace those launcher-owned values.
|
|
1115
1154
|
4. Send one bounded Task Scope, never the full phase task list:
|
|
1116
1155
|
|
|
1117
1156
|
```yaml
|
|
@@ -1162,8 +1201,8 @@ After the implementer returns DONE (or DONE_WITH_CONCERNS without correctness co
|
|
|
1162
1201
|
**Dispatch:**
|
|
1163
1202
|
|
|
1164
1203
|
- Use the same tier that was selected at start.
|
|
1165
|
-
- For Codex with a capped managed policy, dispatch the materialized reviewer role returned in `providers.codex.dispatchArgs.variant` for deterministic quality gates.
|
|
1166
|
-
-
|
|
1204
|
+
- For Codex with a capped managed policy, first dispatch the materialized reviewer role returned in `providers.codex.dispatchArgs.variant` as native `agent_type` for deterministic quality gates. After spawn acceptance, record the review `target`, `model_axis`, and `effort_axis` from resolver output and the constructed launcher payload; reviewer self-report cannot populate or overwrite them.
|
|
1205
|
+
- Only if the exact registered reviewer role receives a native role-selection rejection may the launcher start a fresh Codex child with explicit model, reasoning effort, and canonical role instructions from `.agents/agents/oat-reviewer.md`; never substitute the managed base role and never require restart/hot reload. Missing reviewer telemetry or self-report is not a rejection, and an accepted reviewer that later returns `BLOCKED` cannot trigger fallback.
|
|
1167
1206
|
- For Codex with managed `Uncapped` or inherit/default mode, no reviewer target exists; use base `oat-reviewer`, log `effort_axis=provider-default`, and explain that the base role follows the provider default.
|
|
1168
1207
|
- For Claude Code with a capped managed policy, require `providers.claude.dispatchArgs.model` and pass that exact value as the review `model`; managed `Uncapped` or inherit/default mode omits `model` because no reviewer target exists. Always keep `effort_axis=not-applicable`.
|
|
1169
1208
|
- For Cursor with a concrete managed reviewer target, require `providers.cursor.dispatchArgs.model` and pass that exact opaque, unnormalized string as the actual review invocation's `model` argument.
|
|
@@ -1192,7 +1231,7 @@ After the implementer returns DONE (or DONE_WITH_CONCERNS without correctness co
|
|
|
1192
1231
|
- For Codex Tier 1 dispatches, send the Review Scope block as a self-contained packet and keep fresh context (`fork_context: false`). The reviewer is expected to reconstruct context from git state and the OAT artifacts listed above.
|
|
1193
1232
|
- For Codex Tier 1 review dispatches, use the materialized Codex role name from `providers.codex.dispatchArgs.variant` only when the resolver returns a reviewer variant for a capped managed policy. A Codex materialized reviewer role selected from a model+effort target must carry `model_axis=selected:<model>` and `effort_axis=selected:<effort>` from resolver output. Use base `oat-reviewer` only when the resolver returns no `dispatchArgs.variant` for managed `Uncapped`, inherit/default mode, or provider-default fallback, and log `effort_axis=provider-default`. For Claude Code, pass `model: providers.claude.dispatchArgs.model` for a concrete managed reviewer and never pass a per-review effort override. For Cursor, pass `model: providers.cursor.dispatchArgs.model` byte-for-byte for a concrete managed reviewer.
|
|
1194
1233
|
- Treat the commit range as authoritative for review scope. `files_changed` is optional orientation metadata only.
|
|
1195
|
-
- If a reviewer does not return a terminal result on the first wait, poll once more. If it still has not concluded, send one concise nudge to return immediately with current findings. If the reviewer still does not conclude, treat the target-preserving review dispatch as failed for this phase.
|
|
1234
|
+
- If a reviewer does not return a terminal result on the first wait, poll once more. If it still has not concluded, send one concise nudge to return immediately with current findings. If the reviewer still does not conclude, treat the target-preserving review dispatch as failed for this phase. When the original native reviewer spawn was accepted, retry the same already-selected native `agent_type` route within the retry bound; do not switch that timed-out reviewer to a fresh pinned child. The fresh pinned-child route is eligible only when the original native attempt received explicit pre-start role-selection rejection. Retry an already-selected pinned fresh-child route or complete Claude/Cursor invocation payload without changing routes, preserving the exact model argument; never downgrade a timed-out managed reviewer to unpinned inline execution.
|
|
1196
1235
|
|
|
1197
1236
|
- Tier 2: read `.agents/agents/oat-reviewer.md` and review inline only with verified equivalent current-host model and effort controls, explicit inherit/default behavior, or the documented managed-uncapped reviewer behavior. Otherwise block.
|
|
1198
1237
|
|
|
@@ -1202,6 +1241,9 @@ Parse the reviewer's confirmation for verdict + finding severities. Map to pass
|
|
|
1202
1241
|
|
|
1203
1242
|
- **pass:** zero Critical and zero Important findings.
|
|
1204
1243
|
- **fail:** one or more Critical or Important findings.
|
|
1244
|
+
- **blocked:** An accepted reviewer `BLOCKED` terminal blocks this phase review.
|
|
1245
|
+
It does not invoke fallback and must not be interpreted as a pass due to
|
|
1246
|
+
absent findings. Stop and surface the review target and blocker reason.
|
|
1205
1247
|
|
|
1206
1248
|
Medium / Minor findings do not block the phase but are recorded.
|
|
1207
1249
|
|
|
@@ -1212,7 +1254,7 @@ On reviewer verdict `fail`, run a bounded fix loop.
|
|
|
1212
1254
|
1. Read `oat_orchestration_retry_limit` from `state.md` frontmatter (default: `2`, range 0–5).
|
|
1213
1255
|
2. For each retry (up to the limit):
|
|
1214
1256
|
a. Convert Critical/Important findings into bounded fix scopes associated with one planned task/file boundary at a time. Do not hand one worker the full phase finding list.
|
|
1215
|
-
b. Reuse the phase coordinator in `fix` mode. It selects an exact candidate under the same project or phase named ceiling with `--ceiling-tier`, then emits one Task Scope per bounded fix. Codex uses `providers.codex.dispatchArgs.variant`; Claude and Cursor pass their exact `providers.<provider>.dispatchArgs.model` value on the actual invocation. Every fix worker writes the formal `Dispatch: scope=<phase-or-task> action=fix role=fix producer=<slug|unknown> provenance=<declared|observed|inferred|unknown> model_axis=<axis> effort_axis=<axis> dispatch_policy=<policy|unknown> dispatch_ceiling=<value|none> target=<target|unknown>` stamp before execution.
|
|
1257
|
+
b. Reuse the phase coordinator in `fix` mode. It selects an exact candidate under the same project or phase named ceiling with `--ceiling-tier`, then emits one Task Scope per bounded fix. Codex first uses `providers.codex.dispatchArgs.variant` as native `agent_type`; only a native role-selection rejection permits the exact fresh-child fallback. Claude and Cursor pass their exact `providers.<provider>.dispatchArgs.model` value on the actual invocation. After constructing the launcher payload, record the fix `target`, `model_axis`, and `effort_axis` from that payload and resolver output. Missing fix-worker telemetry or self-report is not unavailability, and an accepted fix worker — including one that returns `BLOCKED` — cannot trigger fallback. Every fix worker writes the formal `Dispatch: scope=<phase-or-task> action=fix role=fix producer=<slug|unknown> provenance=<declared|observed|inferred|unknown> model_axis=<axis> effort_axis=<axis> dispatch_policy=<policy|unknown> dispatch_ceiling=<value|none> target=<target|unknown>` stamp before execution.
|
|
1216
1258
|
c. Receive and verify each fix result and commit. The coordinator must not apply fixes itself, and Tier 2 does not authorize inline task edits.
|
|
1217
1259
|
d. Re-dispatch the reviewer with the updated commit range.
|
|
1218
1260
|
e. Parse the new verdict.
|
|
@@ -1655,6 +1697,10 @@ All must pass before proceeding.
|
|
|
1655
1697
|
|
|
1656
1698
|
**At the final plan phase boundary, a code review is required before PR.**
|
|
1657
1699
|
|
|
1700
|
+
An accepted reviewer `BLOCKED` terminal blocks final review. It does not invoke
|
|
1701
|
+
fallback and must not be interpreted as a pass due to absent findings. Stop and
|
|
1702
|
+
surface the review target and blocker reason.
|
|
1703
|
+
|
|
1658
1704
|
Before requesting final review, ensure the latest project-artifact bookkeeping is already committed. Review should evaluate the implementation state as it actually stands on the branch, not a half-tracked working tree.
|
|
1659
1705
|
|
|
1660
1706
|
Check if final review already completed (preferred source of truth: plan.md Reviews table):
|
|
@@ -1681,13 +1727,22 @@ echo "$FINAL_ROW"
|
|
|
1681
1727
|
**Workflow preference check (before prompting):**
|
|
1682
1728
|
|
|
1683
1729
|
First resolve the final reviewer target with the same target-first contract as
|
|
1684
|
-
per-phase review. A concrete managed Codex target must
|
|
1685
|
-
reviewer
|
|
1686
|
-
|
|
1730
|
+
per-phase review. A concrete managed Codex target must first send its exact
|
|
1731
|
+
registered reviewer as native `agent_type`; only a native role-selection
|
|
1732
|
+
rejection permits an explicitly pinned fresh child. Spawn acceptance plus the
|
|
1733
|
+
launcher payload supplies configured invocation evidence, so missing telemetry,
|
|
1734
|
+
missing self-report, or a later `BLOCKED` result cannot trigger fallback. Record
|
|
1735
|
+
the final review `target`, `model_axis`, and `effort_axis` from resolver output
|
|
1736
|
+
and the constructed launcher payload, never from reviewer self-report. A
|
|
1737
|
+
concrete managed Claude or Cursor target must put
|
|
1738
|
+
`providers.claude.dispatchArgs.model` or
|
|
1687
1739
|
`providers.cursor.dispatchArgs.model` respectively into the actual provider
|
|
1688
1740
|
invocation as the exact `model` argument; Cursor strings remain opaque. On
|
|
1689
|
-
timeout or retry, preserve the
|
|
1690
|
-
|
|
1741
|
+
timeout or retry, preserve the already-selected route as well as its complete
|
|
1742
|
+
invocation payload: an accepted native reviewer retries the same native
|
|
1743
|
+
`agent_type`, while a fresh pinned-child route is eligible only when the
|
|
1744
|
+
original native attempt received explicit pre-start role-selection rejection.
|
|
1745
|
+
Preserve the exact model argument. If the host cannot apply the required role or
|
|
1691
1746
|
model argument, fail closed or block unless verified equivalent current-host
|
|
1692
1747
|
controls permit inline execution. The preference below chooses only among
|
|
1693
1748
|
routes that preserve that target; it cannot authorize generic inline or base
|