@open-agent-toolkit/cli 0.1.42 → 0.1.45
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 +11 -7
- package/assets/agents/oat-reviewer.md +6 -4
- package/assets/config/dispatch-matrix-recommendation.json +23 -0
- package/assets/docs/cli-utilities/configuration.md +95 -40
- package/assets/docs/cli-utilities/workflow-gates.md +79 -16
- package/assets/docs/contributing/code.md +10 -4
- package/assets/docs/contributing/hooks-and-safety.md +23 -0
- package/assets/docs/reference/oat-directory-structure.md +26 -24
- package/assets/docs/workflows/projects/dispatch-ceiling.md +193 -80
- package/assets/docs/workflows/projects/implementation-execution.md +68 -45
- package/assets/docs/workflows/projects/index.md +2 -2
- package/assets/docs/workflows/projects/lifecycle.md +17 -2
- package/assets/public-package-versions.json +4 -4
- package/assets/skills/oat-project-implement/SKILL.md +232 -100
- package/assets/skills/oat-project-plan/SKILL.md +80 -30
- package/assets/skills/oat-project-plan-writing/SKILL.md +10 -10
- package/assets/skills/oat-project-quick-start/SKILL.md +80 -30
- package/assets/templates/plan.md +4 -4
- package/assets/templates/state.md +12 -3
- package/dist/commands/config/index.d.ts +6 -0
- package/dist/commands/config/index.d.ts.map +1 -1
- package/dist/commands/config/index.js +432 -11
- package/dist/commands/doctor/index.d.ts +6 -1
- package/dist/commands/doctor/index.d.ts.map +1 -1
- package/dist/commands/doctor/index.js +138 -4
- package/dist/commands/gate/index.d.ts +39 -2
- package/dist/commands/gate/index.d.ts.map +1 -1
- package/dist/commands/gate/index.js +343 -30
- package/dist/commands/internal/cursor-current-target.d.ts +37 -0
- package/dist/commands/internal/cursor-current-target.d.ts.map +1 -0
- package/dist/commands/internal/cursor-current-target.js +228 -0
- package/dist/commands/internal/index.d.ts.map +1 -1
- package/dist/commands/internal/index.js +2 -0
- package/dist/commands/project/dispatch-ceiling/index.d.ts.map +1 -1
- package/dist/commands/project/dispatch-ceiling/index.js +646 -56
- package/dist/config/dispatch-ceiling-preset.d.ts +37 -1
- package/dist/config/dispatch-ceiling-preset.d.ts.map +1 -1
- package/dist/config/dispatch-ceiling-preset.js +20 -0
- package/dist/config/oat-config.d.ts +25 -6
- package/dist/config/oat-config.d.ts.map +1 -1
- package/dist/config/oat-config.js +123 -11
- package/dist/config/resolve.d.ts.map +1 -1
- package/dist/config/resolve.js +16 -0
- package/dist/manifest/manifest.types.d.ts +12 -12
- package/dist/providers/ceiling/registry.d.ts.map +1 -1
- package/dist/providers/ceiling/registry.js +22 -1
- package/dist/providers/codex/codec/sync-extension.js +1 -1
- package/dist/providers/identity/availability.d.ts +22 -0
- package/dist/providers/identity/availability.d.ts.map +1 -0
- package/dist/providers/identity/availability.js +119 -0
- package/dist/providers/identity/family.d.ts +13 -0
- package/dist/providers/identity/family.d.ts.map +1 -0
- package/dist/providers/identity/family.js +32 -0
- package/dist/providers/identity/provenance.d.ts +21 -0
- package/dist/providers/identity/provenance.d.ts.map +1 -0
- package/dist/providers/identity/provenance.js +65 -0
- package/dist/providers/identity/stamp.d.ts +35 -0
- package/dist/providers/identity/stamp.d.ts.map +1 -0
- package/dist/providers/identity/stamp.js +171 -0
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: oat-project-implement
|
|
3
|
-
version: 2.0.
|
|
3
|
+
version: 2.0.28
|
|
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
5
|
oat_gateable: true
|
|
6
6
|
argument-hint: '[--retry-limit <N>] [--dry-run]'
|
|
@@ -163,12 +163,14 @@ Forbidden: Selected: Tier 2 — Inline because the user did not separately menti
|
|
|
163
163
|
|
|
164
164
|
**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.
|
|
165
165
|
|
|
166
|
-
### Dispatch
|
|
166
|
+
### Dispatch Policy Preflight
|
|
167
167
|
|
|
168
|
-
Before any phase work, resolve and print the OAT dispatch
|
|
168
|
+
Before any phase work, resolve and print the OAT dispatch policy. This is a
|
|
169
169
|
preflight gate, not a mid-run question.
|
|
170
170
|
|
|
171
|
-
Use the CLI resolver as the source of truth
|
|
171
|
+
Use the CLI resolver as the source of truth. The command name remains
|
|
172
|
+
`dispatch-ceiling` for compatibility, but the returned contract is dispatch
|
|
173
|
+
policy:
|
|
172
174
|
|
|
173
175
|
```bash
|
|
174
176
|
oat project dispatch-ceiling resolve --provider <active-provider> --preflight --json
|
|
@@ -182,10 +184,12 @@ pnpm run cli -- project dispatch-ceiling resolve --provider <active-provider> --
|
|
|
182
184
|
|
|
183
185
|
Resolution order:
|
|
184
186
|
|
|
185
|
-
1. Config keys `workflow.
|
|
186
|
-
2.
|
|
187
|
-
3.
|
|
188
|
-
4.
|
|
187
|
+
1. Config keys `workflow.dispatchPolicy.mode` / `workflow.dispatchPolicy.policy` (local > shared > user)
|
|
188
|
+
2. Compatibility config keys `workflow.dispatchCeiling.providers.<provider>` (local > shared > user)
|
|
189
|
+
3. Project `state.md` frontmatter key `oat_dispatch_policy`
|
|
190
|
+
4. Legacy project `state.md` frontmatter key `oat_dispatch_ceiling`
|
|
191
|
+
5. Interactive implementation preflight prompt (below)
|
|
192
|
+
6. Non-interactive unresolved: block before work starts
|
|
189
193
|
|
|
190
194
|
**JSON response shape** (from `--json`):
|
|
191
195
|
|
|
@@ -194,6 +198,8 @@ Resolution order:
|
|
|
194
198
|
"status": "resolved",
|
|
195
199
|
"provider": "codex",
|
|
196
200
|
"value": "high",
|
|
201
|
+
"policyMode": "managed",
|
|
202
|
+
"policy": "balanced",
|
|
197
203
|
"source": "project-state",
|
|
198
204
|
"preset": "balanced",
|
|
199
205
|
"unresolved": false,
|
|
@@ -209,7 +215,10 @@ Resolution order:
|
|
|
209
215
|
"role": "implementer",
|
|
210
216
|
"preferredValue": null,
|
|
211
217
|
"selectedValue": "high",
|
|
212
|
-
"capped": false
|
|
218
|
+
"capped": false,
|
|
219
|
+
"selectionMode": "capped",
|
|
220
|
+
"policyMode": "managed",
|
|
221
|
+
"policy": "balanced"
|
|
213
222
|
}
|
|
214
223
|
}
|
|
215
224
|
}
|
|
@@ -220,58 +229,88 @@ Read `providers.<active-provider>` for the concrete dispatch controls. The
|
|
|
220
229
|
`dispatchArgs` field carries the provider-specific argument to pass through
|
|
221
230
|
(Codex: `variant` name; Claude: `model` string). For implementer/fix dispatch,
|
|
222
231
|
pass `--preferred <preferred-effort>` and use `selection.selectedValue` as the
|
|
223
|
-
selected axis value. Never re-derive these from the
|
|
224
|
-
variant
|
|
232
|
+
selected axis value when it is present. Never re-derive these from the policy
|
|
233
|
+
label or a ceiling-only variant - the resolver is the single compilation/join
|
|
234
|
+
point.
|
|
225
235
|
|
|
226
236
|
Print before phase work:
|
|
227
237
|
|
|
228
238
|
```text
|
|
229
|
-
Dispatch
|
|
230
|
-
|
|
239
|
+
Dispatch policy: balanced (codex, managed capped — pinned-variant)
|
|
240
|
+
Resolved cap: high
|
|
241
|
+
Source: project state
|
|
231
242
|
Provider default effort: medium
|
|
232
|
-
Note: OAT will use pinned subagent variants up to high. Base/unpinned roles resolve through the provider default.
|
|
243
|
+
Note: OAT will use pinned subagent variants up to high. Base/unpinned roles resolve through the provider default only on fallback paths.
|
|
233
244
|
```
|
|
234
245
|
|
|
235
|
-
If no
|
|
236
|
-
prompt once before starting work:
|
|
246
|
+
If no policy resolves and the session is interactive, present the dispatch
|
|
247
|
+
policy prompt once before starting work:
|
|
237
248
|
|
|
238
249
|
```text
|
|
239
|
-
No dispatch
|
|
250
|
+
No dispatch policy is configured for this project.
|
|
240
251
|
|
|
241
|
-
Set the dispatch
|
|
252
|
+
Set the dispatch policy — how OAT should choose subagent model/effort controls.
|
|
242
253
|
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
254
|
+
Managed capped policies:
|
|
255
|
+
1. Economy — Codex: medium · Claude: sonnet
|
|
256
|
+
2. Balanced — Codex: high · Claude: sonnet (recommended)
|
|
257
|
+
3. High — Codex: xhigh · Claude: opus
|
|
258
|
+
4. Frontier — Codex: xhigh · Claude: fable
|
|
248
259
|
|
|
249
|
-
|
|
250
|
-
|
|
260
|
+
Managed uncapped:
|
|
261
|
+
5. Uncapped — OAT selects the preferred implementer/fix target without a stored maximum cap.
|
|
262
|
+
|
|
263
|
+
Host defaults:
|
|
264
|
+
6. Inherit Host Defaults — OAT does not select model/effort controls.
|
|
265
|
+
|
|
266
|
+
OAT applies managed policies where the provider exposes a reliable mechanism
|
|
267
|
+
(Codex: pinned variants; Claude: Task model parameter). Other providers may
|
|
268
|
+
treat managed policies as advisory.
|
|
251
269
|
```
|
|
252
270
|
|
|
253
|
-
**
|
|
254
|
-
|
|
255
|
-
Codex: high · Claude:
|
|
271
|
+
**Managed capped policy selection (options 1-4)** persists `mode: managed`,
|
|
272
|
+
`policy`, and the compiled provider targets. On selection, print the exact
|
|
273
|
+
compiled result (e.g., "Dispatch policy set: balanced -> Codex: high · Claude:
|
|
274
|
+
sonnet") before proceeding.
|
|
256
275
|
|
|
257
|
-
**
|
|
258
|
-
|
|
276
|
+
**Uncapped (option 5)** persists explicit managed uncapped state. It does not
|
|
277
|
+
write provider caps, and it must not be represented by leaving dispatch policy
|
|
278
|
+
state absent.
|
|
259
279
|
|
|
260
|
-
**
|
|
261
|
-
|
|
280
|
+
**Inherit Host Defaults (option 6)** persists explicit inherit/default state.
|
|
281
|
+
Use this only when the user wants OAT to leave implementation, fix, and review
|
|
282
|
+
model/effort controls to the executing host/provider.
|
|
262
283
|
|
|
263
284
|
Persist in project `state.md` frontmatter using the normalized shape:
|
|
264
285
|
|
|
265
286
|
```yaml
|
|
266
|
-
|
|
267
|
-
|
|
287
|
+
oat_dispatch_policy:
|
|
288
|
+
mode: managed
|
|
289
|
+
policy: balanced
|
|
268
290
|
providers:
|
|
269
291
|
codex: high
|
|
270
292
|
claude: sonnet
|
|
271
293
|
source: project-state
|
|
272
294
|
```
|
|
273
295
|
|
|
274
|
-
|
|
296
|
+
For `Uncapped`:
|
|
297
|
+
|
|
298
|
+
```yaml
|
|
299
|
+
oat_dispatch_policy:
|
|
300
|
+
mode: managed
|
|
301
|
+
policy: uncapped
|
|
302
|
+
source: project-state
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
For `Inherit Host Defaults`:
|
|
306
|
+
|
|
307
|
+
```yaml
|
|
308
|
+
oat_dispatch_policy:
|
|
309
|
+
mode: inherit
|
|
310
|
+
source: project-state
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
If no policy resolves and `OAT_NON_INTERACTIVE=1` or no user-response channel
|
|
275
314
|
exists, rerun the resolver with non-interactive behavior and stop before work
|
|
276
315
|
starts if it blocks:
|
|
277
316
|
|
|
@@ -280,11 +319,11 @@ oat project dispatch-ceiling resolve --provider <active-provider> --preflight --
|
|
|
280
319
|
```
|
|
281
320
|
|
|
282
321
|
```text
|
|
283
|
-
BLOCKED: Codex dispatch
|
|
284
|
-
Set workflow.dispatchCeiling.providers.codex
|
|
322
|
+
BLOCKED: Codex dispatch policy is unresolved in non-interactive mode.
|
|
323
|
+
Set workflow.dispatchPolicy.mode/workflow.dispatchPolicy.policy, workflow.dispatchCeiling.providers.codex, oat_dispatch_policy, or legacy oat_dispatch_ceiling.
|
|
285
324
|
```
|
|
286
325
|
|
|
287
|
-
Dry-run mode must report the unresolved
|
|
326
|
+
Dry-run mode must report the unresolved policy and planned behavior without
|
|
288
327
|
modifying project state.
|
|
289
328
|
|
|
290
329
|
### Runtime dispatch selection
|
|
@@ -296,12 +335,29 @@ dispatch selection decides model/effort controls for the specific work.
|
|
|
296
335
|
|
|
297
336
|
Use these inputs:
|
|
298
337
|
|
|
299
|
-
- resolved dispatch
|
|
338
|
+
- resolved dispatch policy, source, and provider-specific selection
|
|
300
339
|
- phase ID and phase scope
|
|
301
340
|
- optional `## Dispatch Profile` row in `plan.md`
|
|
302
341
|
- host-exposed provider controls, by axis
|
|
303
342
|
- prior outcomes for the phase, including review results and failed retries
|
|
304
343
|
|
|
344
|
+
Route selection is part of runtime dispatch selection when the resolver returns
|
|
345
|
+
an ordered matrix route:
|
|
346
|
+
|
|
347
|
+
- Start every implementation/fix scope at route level `0` unless the plan's
|
|
348
|
+
`## Dispatch Profile` names a different starting route level for that
|
|
349
|
+
phase/task. Level `0` is the route floor.
|
|
350
|
+
- Pass `--escalation-level <route-level>` on implementer/fix resolver calls.
|
|
351
|
+
Single-axis providers ignore this flag and keep their normal capped `min()`
|
|
352
|
+
behavior.
|
|
353
|
+
- Read `providers.<provider>.target` and `providers.<provider>.selection.target`
|
|
354
|
+
from resolver JSON when present. A target with `crossHarness: true` is an
|
|
355
|
+
explicit deferred cross-harness target: log it as advisory and do not invent a
|
|
356
|
+
same-harness fallback.
|
|
357
|
+
- On repeated review failure or retry-loop escalation, advance by one route
|
|
358
|
+
entry before retrying, up to the last available route entry and within
|
|
359
|
+
`oat_orchestration_retry_limit`.
|
|
360
|
+
|
|
305
361
|
Axis states:
|
|
306
362
|
|
|
307
363
|
- `selected:<value>` - host exposes the axis and the orchestrator chose a value.
|
|
@@ -317,19 +373,29 @@ Codex rules:
|
|
|
317
373
|
- `low`: trivial docs-only, narrow single-file, or mechanical changes
|
|
318
374
|
- `medium`: normal multi-file implementation and moderate integration risk
|
|
319
375
|
- `high`: broad architecture, security/auth/redaction boundaries, subtle state behavior, or repeated substantive review failures
|
|
320
|
-
- `xhigh`: highest-risk work that requires
|
|
321
|
-
3.
|
|
322
|
-
4. For
|
|
323
|
-
5. For
|
|
324
|
-
6.
|
|
325
|
-
7.
|
|
376
|
+
- `xhigh`: highest-risk work that requires a capped policy to allow xhigh or a managed `Uncapped` policy to select it
|
|
377
|
+
3. For capped managed implementer/fix work, selected effort is `min(preferred, resolved_cap)`.
|
|
378
|
+
4. For managed `Uncapped` implementer/fix work, selected effort is the preferred effort with no cap.
|
|
379
|
+
5. For inherit/default mode, the resolver returns no selected dispatch args. Use the base/unpinned Codex role, log `Selected effort: provider-default`, display provider default effort when known, and do not describe this as managed uncapped behavior.
|
|
380
|
+
6. For implementer/fix dispatch: call `oat project dispatch-ceiling resolve --provider codex --role implementer --preferred <preferred-effort> --escalation-level <route-level>`; read `providers.codex.selection.selectedValue`, `providers.codex.dispatchArgs.variant`, and any `providers.codex.target` for the selected role name or route target. Never pass a cap-only implementer variant when `selection.selectedValue` is lower.
|
|
381
|
+
7. For review dispatch: call `oat project dispatch-ceiling resolve --provider codex --role reviewer`; read `providers.codex.dispatchArgs.variant`.
|
|
382
|
+
- Capped managed policy: reviewer targets the configured cap for deterministic quality gate behavior.
|
|
383
|
+
- Managed `Uncapped`: no reviewer target exists; use base/unpinned reviewer fallback and log `selectionMode=no-review-target`, `selectedValue=null`, and `effort_axis=provider-default`.
|
|
384
|
+
- Inherit/default: no reviewer target exists; use base/unpinned reviewer fallback and log `selectionMode=inherit-default`, `selectedValue=null`, and `effort_axis=provider-default`.
|
|
385
|
+
8. Codex payload-first assertion applies only when the resolver returns a pinned variant. If `effort_axis=selected:<value>`, the actual `spawn_agent` payload MUST use the matching pinned `agent_type`. If the resolver returns no variant, use the base role and log provider-default.
|
|
386
|
+
9. Do not use top-level per-call `reasoning_effort` as the standard OAT selected-effort path; dogfooding showed that path can be inconsistent.
|
|
326
387
|
|
|
327
388
|
Claude rules:
|
|
328
389
|
|
|
329
|
-
- Claude
|
|
330
|
-
- Implementer/fix dispatch: classify the preferred model (`haiku`, `sonnet`, or `
|
|
331
|
-
-
|
|
332
|
-
-
|
|
390
|
+
- Claude policy selection is model-based: `haiku < sonnet < opus < fable`.
|
|
391
|
+
- Implementer/fix dispatch: classify the preferred model (`haiku`, `sonnet`, `opus`, or `fable`) and pass it to the resolver as `--preferred <preferred-model>`.
|
|
392
|
+
- Capped managed policy: the resolver selects `min(preferred, resolved_cap)`.
|
|
393
|
+
- Managed `Uncapped`: the resolver selects the preferred model with no cap.
|
|
394
|
+
- Inherit/default: the resolver returns no selected model; omit `model` so Claude Code inherits host/default behavior.
|
|
395
|
+
- Review dispatch:
|
|
396
|
+
- Capped managed policy: target the configured policy cap directly.
|
|
397
|
+
- Managed `Uncapped` or inherit/default: no reviewer target exists; omit `model` and log inherited/default model behavior.
|
|
398
|
+
- For implementer/fix dispatch, call `oat project dispatch-ceiling resolve --provider claude --role implementer --preferred <preferred-model> --orchestrator-tier <current-orchestrator-tier> --escalation-level <route-level>`; for review dispatch, call the same resolver with `--role reviewer` and no `--preferred`. Read `providers.claude.selection.selectedValue`, `providers.claude.dispatchArgs.model`, and any `providers.claude.target` for the selected model string or route target. Pass `--orchestrator-tier` so the resolver can flag above-orchestrator upgrade requests and set `verifyOnDispatch` correctly.
|
|
333
399
|
- Pass `model: "<value>"` when `model_axis=selected:<value>` on the Task tool call.
|
|
334
400
|
- Keep `effort_axis=not-applicable`; Claude Code has no separate per-dispatch effort axis.
|
|
335
401
|
|
|
@@ -338,6 +404,19 @@ Payload-first invariant:
|
|
|
338
404
|
- Build the actual host dispatch argument map before logging.
|
|
339
405
|
- Do not emit `selected:<value>` unless the host invocation contains the corresponding role/model selection.
|
|
340
406
|
- Derive `Dispatch target` and `Effort axis` / `Model axis` from the payload.
|
|
407
|
+
- After the payload is built, append a formal dispatch stamp to Dispatch Notes
|
|
408
|
+
for every implementation, fix, and review dispatch. Use the p01 grammar
|
|
409
|
+
exactly:
|
|
410
|
+
`Dispatch: scope=<phase-or-task> action=<implementation|fix|review> role=<implementer|fix|reviewer> 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>`.
|
|
411
|
+
Derive `producer` and `provenance` from the resolver payload and actual host
|
|
412
|
+
arguments. Only concrete model arguments, including same-harness route model
|
|
413
|
+
args for model-arg providers, declare producer identity. Codex pinned
|
|
414
|
+
variants declare the effort axis only; record `effort_axis=selected:<value>`
|
|
415
|
+
and keep `producer=unknown provenance=unknown` unless an observed/inferred
|
|
416
|
+
model identity is available. Base/unpinned or deferred cross-harness paths are
|
|
417
|
+
also `producer=unknown provenance=unknown` unless an observed/inferred
|
|
418
|
+
identity is available. Do not write prose-only or legacy comma-separated stamp
|
|
419
|
+
forms.
|
|
341
420
|
|
|
342
421
|
Structured dispatch log:
|
|
343
422
|
|
|
@@ -345,14 +424,18 @@ Structured dispatch log:
|
|
|
345
424
|
OAT Dispatch: Phase {phase_id} {implementation | fix | review}
|
|
346
425
|
Host: {Claude Code | Codex | Cursor | other host}
|
|
347
426
|
Preferred effort: {low | medium | high | xhigh | provider-default | not-applicable}
|
|
348
|
-
Dispatch
|
|
427
|
+
Dispatch policy: {economy | balanced | high | frontier | uncapped | inherit host defaults | legacy capped}
|
|
428
|
+
Resolved cap: {resolved cap value | none}
|
|
349
429
|
Selected effort: {low | medium | high | xhigh | provider-default | not-applicable}
|
|
350
|
-
|
|
430
|
+
Policy source: {repo config | project state | preflight prompt}
|
|
351
431
|
Provider default effort: {value | unknown | not-applicable}
|
|
432
|
+
Selection mode: {capped | uncapped | review-target | no-review-target | inherit-default}
|
|
433
|
+
Route level: {0 | 1 | ... | none}
|
|
352
434
|
Model axis: { selected:<value> | inherited | not-applicable | host-auto }
|
|
353
435
|
Effort axis: { selected:<value> | provider-default | inherited | not-applicable | host-auto }
|
|
354
436
|
Dispatch target: {host-specific subagent/role/tool target}
|
|
355
|
-
|
|
437
|
+
Dispatch stamp: Dispatch: scope=<phase-or-task> action=<implementation|fix|review> role=<implementer|fix|reviewer> 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>
|
|
438
|
+
Rationale: {short rationale grounded in phase scope and any policy cap/uncapped/default behavior}
|
|
356
439
|
```
|
|
357
440
|
|
|
358
441
|
Codex capped example:
|
|
@@ -361,46 +444,70 @@ Codex capped example:
|
|
|
361
444
|
OAT Dispatch: Phase p02 implementation
|
|
362
445
|
Host: Codex
|
|
363
446
|
Preferred effort: high
|
|
364
|
-
Dispatch
|
|
447
|
+
Dispatch policy: economy
|
|
448
|
+
Resolved cap: medium
|
|
365
449
|
Selected effort: medium
|
|
366
|
-
|
|
450
|
+
Policy source: repo config
|
|
367
451
|
Provider default effort: high
|
|
452
|
+
Selection mode: capped
|
|
368
453
|
Model axis: inherited
|
|
369
454
|
Effort axis: selected:medium
|
|
370
455
|
Dispatch target: oat-phase-implementer-medium
|
|
371
|
-
Rationale: normal multi-file implementation; high preferred due to integration risk, capped by configured
|
|
456
|
+
Rationale: normal multi-file implementation; high preferred due to integration risk, capped by configured policy.
|
|
372
457
|
```
|
|
373
458
|
|
|
374
|
-
Codex
|
|
459
|
+
Codex uncapped implementer example:
|
|
460
|
+
|
|
461
|
+
```text
|
|
462
|
+
OAT Dispatch: Phase p02 implementation
|
|
463
|
+
Host: Codex
|
|
464
|
+
Preferred effort: xhigh
|
|
465
|
+
Dispatch policy: uncapped
|
|
466
|
+
Resolved cap: none
|
|
467
|
+
Selected effort: xhigh
|
|
468
|
+
Policy source: project state
|
|
469
|
+
Provider default effort: medium
|
|
470
|
+
Selection mode: uncapped
|
|
471
|
+
Model axis: inherited
|
|
472
|
+
Effort axis: selected:xhigh
|
|
473
|
+
Dispatch target: oat-phase-implementer-xhigh
|
|
474
|
+
Rationale: high-risk phase; managed uncapped policy allows the preferred pinned variant. Actual host support for upward effort selection must be verified by the dispatching host.
|
|
475
|
+
```
|
|
476
|
+
|
|
477
|
+
Codex capped reviewer example:
|
|
375
478
|
|
|
376
479
|
```text
|
|
377
480
|
OAT Dispatch: Phase p02 review
|
|
378
481
|
Host: Codex
|
|
379
482
|
Preferred effort: high
|
|
380
|
-
Dispatch
|
|
381
|
-
|
|
382
|
-
|
|
483
|
+
Dispatch policy: high
|
|
484
|
+
Resolved cap: xhigh
|
|
485
|
+
Selected effort: xhigh
|
|
486
|
+
Policy source: project state
|
|
383
487
|
Provider default effort: medium
|
|
488
|
+
Selection mode: review-target
|
|
384
489
|
Model axis: inherited
|
|
385
|
-
Effort axis: selected:
|
|
386
|
-
Dispatch target: oat-reviewer-
|
|
387
|
-
Rationale: reviewer runs at the configured
|
|
490
|
+
Effort axis: selected:xhigh
|
|
491
|
+
Dispatch target: oat-reviewer-xhigh
|
|
492
|
+
Rationale: reviewer runs at the configured policy cap for deterministic quality gate behavior.
|
|
388
493
|
```
|
|
389
494
|
|
|
390
|
-
Codex
|
|
495
|
+
Codex inherit/default fallback example:
|
|
391
496
|
|
|
392
497
|
```text
|
|
393
498
|
OAT Dispatch: Phase p02 review
|
|
394
499
|
Host: Codex
|
|
395
500
|
Preferred effort: provider-default
|
|
396
|
-
Dispatch
|
|
501
|
+
Dispatch policy: inherit host defaults
|
|
502
|
+
Resolved cap: none
|
|
397
503
|
Selected effort: provider-default
|
|
398
|
-
|
|
504
|
+
Policy source: project state
|
|
399
505
|
Provider default effort: medium
|
|
506
|
+
Selection mode: inherit-default
|
|
400
507
|
Model axis: inherited
|
|
401
508
|
Effort axis: provider-default
|
|
402
509
|
Dispatch target: oat-reviewer
|
|
403
|
-
Rationale: base unpinned role
|
|
510
|
+
Rationale: explicit inherit/default policy; base unpinned role follows Codex provider default.
|
|
404
511
|
```
|
|
405
512
|
|
|
406
513
|
Generic sidecar/explorer dispatch:
|
|
@@ -416,9 +523,10 @@ Codex generic explorer example:
|
|
|
416
523
|
OAT Dispatch: p02-t10 sidecar exploration
|
|
417
524
|
Host: Codex
|
|
418
525
|
Preferred effort: provider-default
|
|
419
|
-
Dispatch
|
|
526
|
+
Dispatch policy: high
|
|
527
|
+
Resolved cap: xhigh
|
|
420
528
|
Selected effort: provider-default
|
|
421
|
-
|
|
529
|
+
Policy source: project state
|
|
422
530
|
Provider default effort: xhigh
|
|
423
531
|
Model axis: inherited
|
|
424
532
|
Effort axis: provider-default
|
|
@@ -435,12 +543,22 @@ effort_axis:
|
|
|
435
543
|
selected:<value> | provider-default | inherited | not-applicable | host-auto,
|
|
436
544
|
}
|
|
437
545
|
dispatch_ceiling: { resolved ceiling value }
|
|
546
|
+
dispatch_policy:
|
|
547
|
+
{
|
|
548
|
+
economy | balanced | high | frontier | uncapped | inherit host defaults | legacy capped,
|
|
549
|
+
}
|
|
438
550
|
ceiling_source: { repo config | project state | preflight prompt }
|
|
551
|
+
policy_source: { repo config | project state | preflight prompt }
|
|
439
552
|
provider_default_effort: { value | unknown | not-applicable }
|
|
553
|
+
dispatch_route_level:
|
|
554
|
+
{ integer route level; omit when no ordered route is in play }
|
|
555
|
+
dispatch_target:
|
|
556
|
+
{ resolver target or host-specific dispatch target; omit if unknown }
|
|
557
|
+
dispatch_stamp: { exact `Dispatch: ...` line written to Dispatch Notes }
|
|
440
558
|
dispatch_rationale: { short rationale }
|
|
441
559
|
```
|
|
442
560
|
|
|
443
|
-
### Dispatch
|
|
561
|
+
### Dispatch Policy Enforcement Log
|
|
444
562
|
|
|
445
563
|
After each phase dispatch (implementation, fix, or review), append one enforcement
|
|
446
564
|
log line. The log reflects the `mode` and `mechanism` returned by
|
|
@@ -449,18 +567,20 @@ log line. The log reflects the `mode` and `mechanism` returned by
|
|
|
449
567
|
**Three-state log format:**
|
|
450
568
|
|
|
451
569
|
```text
|
|
452
|
-
Dispatch
|
|
570
|
+
Dispatch policy: {policy}; selected={selected value | none}; cap={value | none} ({provider}, {mode} — {mechanism detail})
|
|
453
571
|
```
|
|
454
572
|
|
|
455
573
|
**Log examples (matching resolver output):**
|
|
456
574
|
|
|
457
575
|
```text
|
|
458
|
-
Dispatch
|
|
459
|
-
Dispatch
|
|
460
|
-
Dispatch
|
|
461
|
-
Dispatch
|
|
462
|
-
Dispatch
|
|
463
|
-
Dispatch
|
|
576
|
+
Dispatch policy: balanced; selected=high; cap=high (codex, enforced — variant oat-phase-implementer-high)
|
|
577
|
+
Dispatch policy: high; selected=xhigh; cap=xhigh (codex, enforced — variant oat-reviewer-xhigh)
|
|
578
|
+
Dispatch policy: uncapped; selected=xhigh; cap=none (codex, enforced — variant oat-phase-implementer-xhigh)
|
|
579
|
+
Dispatch policy: inherit host defaults; selected=none; cap=none (codex, advisory — base role follows provider default)
|
|
580
|
+
Dispatch policy: balanced; selected=sonnet; cap=sonnet (claude, enforced — Task model arg)
|
|
581
|
+
Dispatch policy: frontier; selected=fable; cap=fable (claude, enforced — Task model arg)
|
|
582
|
+
Dispatch policy: high; selected=none; cap=high (cursor, unsupported — no adapter; informational)
|
|
583
|
+
Dispatch policy: unresolved; selected=none; cap=none (codex, advisory — policy set but no value resolved)
|
|
464
584
|
```
|
|
465
585
|
|
|
466
586
|
**Verify-on-upgrade (`verifyOnDispatch: true`):**
|
|
@@ -471,16 +591,18 @@ logging `enforced`, confirm the actual model/tier used by the dispatched agent.
|
|
|
471
591
|
If the provider honored the request, log `enforced`. If it did not:
|
|
472
592
|
|
|
473
593
|
```text
|
|
474
|
-
Dispatch
|
|
594
|
+
Dispatch policy: high; selected=opus; cap=opus (claude, advisory — provider did not honor upgrade; ran sonnet)
|
|
475
595
|
```
|
|
476
596
|
|
|
477
597
|
**`enforced`** — the adapter compiled concrete dispatch args and the provider
|
|
478
598
|
accepted them. Log value + provider + mechanism detail (variant name or "Task
|
|
479
599
|
model arg").
|
|
480
600
|
|
|
481
|
-
**`advisory`** — the adapter supports the
|
|
482
|
-
|
|
483
|
-
but
|
|
601
|
+
**`advisory`** — the adapter supports the policy but no concrete value resolved,
|
|
602
|
+
the policy intentionally inherits provider defaults, or the provider is known
|
|
603
|
+
but could not be verified. Log with note "policy set but no value resolved",
|
|
604
|
+
"base role follows provider default", or "provider did not honor upgrade; ran
|
|
605
|
+
\<tier\>".
|
|
484
606
|
|
|
485
607
|
**`unsupported`** — the provider has no registered adapter. Log with note "no
|
|
486
608
|
adapter; informational". Never block on unsupported — dispatch follows provider
|
|
@@ -796,16 +918,21 @@ For each phase `pNN` in the plan (or each phase in the current parallel group),
|
|
|
796
918
|
workflow_mode: {from state.md or plan.md frontmatter}
|
|
797
919
|
model_axis: {selected:<value> | inherited | not-applicable | host-auto; omit if unknown}
|
|
798
920
|
effort_axis: {selected:<value> | provider-default | inherited | not-applicable | host-auto; omit if unknown}
|
|
799
|
-
|
|
800
|
-
|
|
921
|
+
dispatch_policy: {economy | balanced | high | frontier | uncapped | inherit host defaults | legacy capped; omit if unknown}
|
|
922
|
+
dispatch_ceiling: {resolved cap value; omit if none or unknown}
|
|
923
|
+
policy_source: {repo config | project state | preflight prompt; omit if unknown}
|
|
924
|
+
ceiling_source: {repo config | project state | preflight prompt; omit if unknown; compatibility alias for policy_source}
|
|
801
925
|
provider_default_effort: {value | unknown | not-applicable; omit if unknown}
|
|
926
|
+
dispatch_route_level: {integer route level; omit when no ordered route is in play}
|
|
927
|
+
dispatch_target: {resolver target or host-specific dispatch target; omit if unknown}
|
|
928
|
+
dispatch_stamp: {exact `Dispatch: ...` line written to Dispatch Notes; omit if not yet written}
|
|
802
929
|
dispatch_rationale: {short rationale; omit if unknown}
|
|
803
930
|
```
|
|
804
931
|
|
|
805
932
|
2. Perform a pre-dispatch assertion against the host invocation parameters. The Phase Scope fields are audit/context fields; selected axes must also be represented in the actual host dispatch call.
|
|
806
933
|
- Codex implementer/fix dispatch:
|
|
807
|
-
- Before building the `spawn_agent` argument map, classify the phase complexity and choose preferred effort (`low`, `medium`, `high`, or `xhigh`), then call `oat project dispatch-ceiling resolve --provider codex --role implementer --preferred <preferred-effort>`.
|
|
808
|
-
- Build the `spawn_agent` argument map from `providers.codex.selection.selectedValue` and `providers.codex.dispatchArgs.variant` before logging the dispatch. If `effort_axis=selected:low|medium|high|xhigh`, the argument map MUST use the matching `agent_type`: `"oat-phase-implementer-low"`, `"oat-phase-implementer-medium"`, `"oat-phase-implementer-high"`, or `"oat-phase-implementer-xhigh"`. Then derive the `OAT Dispatch:` block `Effort axis:` field from that same argument map.
|
|
934
|
+
- Before building the `spawn_agent` argument map, classify the phase complexity and choose preferred effort (`low`, `medium`, `high`, or `xhigh`), determine the current route level (Dispatch Profile floor or `0`), then call `oat project dispatch-ceiling resolve --provider codex --role implementer --preferred <preferred-effort> --escalation-level <route-level>`.
|
|
935
|
+
- Build the `spawn_agent` argument map from `providers.codex.selection.selectedValue` and `providers.codex.dispatchArgs.variant` before logging the dispatch. If `providers.codex.target.crossHarness` is true, the resolver intentionally returns no native dispatch args; log the deferred target and use provider-default/base fallback only when that is the explicit selected fallback. If `effort_axis=selected:low|medium|high|xhigh`, the argument map MUST use the matching `agent_type`: `"oat-phase-implementer-low"`, `"oat-phase-implementer-medium"`, `"oat-phase-implementer-high"`, or `"oat-phase-implementer-xhigh"`. Then derive the `OAT Dispatch:` block `Effort axis:` field from that same argument map.
|
|
809
936
|
- Example selected low payload shape: `agent_type: "oat-phase-implementer-low"` and a Phase Scope message containing `effort_axis: selected:low`.
|
|
810
937
|
- Immediately after spawning, compare the returned Codex status line with the selected effort before waiting on the agent. If the spawned status reports a different effort than the selected value (for example, the log says `effort_axis=selected:medium` but the spawn result reports `gpt-5.5 high`), treat this as an orchestration deviation. Stop, record the deviation in `implementation.md`, and redispatch with corrected parameters before continuing. Do not use work from the mismatched dispatch.
|
|
811
938
|
- If `effort_axis=provider-default`, use base `agent_type: "oat-phase-implementer"` and omit `reasoning_effort`. The dispatch rationale MUST say this is a base/unpinned fallback and include provider default effort when known.
|
|
@@ -848,13 +975,15 @@ Escalate the runtime dispatch control when there is evidence that the current co
|
|
|
848
975
|
When escalation is needed:
|
|
849
976
|
|
|
850
977
|
1. If a stronger available control exists, re-dispatch at the next stronger control and include the reason in the scope packet. The escalation ladder is provider-specific:
|
|
851
|
-
- **
|
|
852
|
-
- **
|
|
978
|
+
- **Route-backed matrix cells:** increment `--escalation-level` by one and re-resolve before using provider-specific ladders. The resolver's `providers.<provider>.target.routeLength` is the route bound; never advance past the final route entry.
|
|
979
|
+
- **Codex:** `selected:low -> selected:medium -> selected:high -> selected:xhigh`, capped by the resolved managed cap when one exists; managed `Uncapped` may select up to the preferred value; inherit/default mode has no OAT escalation control.
|
|
980
|
+
- **Claude Code:** `selected:haiku -> selected:sonnet -> selected:opus -> selected:fable`, capped by the resolved managed cap when one exists; managed `Uncapped` may select up to the preferred model; inherit/default mode has no OAT escalation control.
|
|
853
981
|
2. Count the escalation redispatch against the existing bounded retry budget. Escalation changes the control; it does not create extra retry attempts.
|
|
854
|
-
3. Record a compact
|
|
855
|
-
- `Dispatch: p03
|
|
856
|
-
- `Dispatch: p03
|
|
857
|
-
- `Dispatch:
|
|
982
|
+
3. Record a compact formal stamp in `implementation.md` when practical; surrounding prose may describe why the route advanced, but the `Dispatch:` line itself must stay parseable:
|
|
983
|
+
- `Dispatch: scope=p03 action=implementation role=implementer producer=gpt-5.5-xhigh provenance=declared model_axis=selected:gpt-5.5-xhigh effort_axis=not-applicable dispatch_policy=high dispatch_ceiling=gpt-5.5-xhigh target=cursor`
|
|
984
|
+
- `Dispatch: scope=p03 action=implementation role=implementer producer=opus provenance=declared model_axis=selected:opus effort_axis=not-applicable dispatch_policy=high dispatch_ceiling=opus target=claude`
|
|
985
|
+
- `Dispatch: scope=p03 action=implementation role=implementer producer=unknown provenance=unknown model_axis=inherited effort_axis=selected:high dispatch_policy=high dispatch_ceiling=high target=oat-phase-implementer-high`
|
|
986
|
+
- `Dispatch: scope=p02 action=implementation role=implementer producer=unknown provenance=unknown model_axis=host-auto effort_axis=host-auto dispatch_policy=unknown dispatch_ceiling=none target=unknown`
|
|
858
987
|
4. If the phase is already at the strongest available control, do not invent a stronger tier. Provide more context, split the phase, revise the plan, or stop for user direction.
|
|
859
988
|
|
|
860
989
|
#### Dispatch Retry (Transient Failures)
|
|
@@ -868,8 +997,9 @@ After the implementer returns DONE (or DONE_WITH_CONCERNS without correctness co
|
|
|
868
997
|
**Dispatch:**
|
|
869
998
|
|
|
870
999
|
- Use the same tier that was selected at start.
|
|
871
|
-
- For Codex, dispatch the reviewer variant matching the resolved
|
|
872
|
-
- For
|
|
1000
|
+
- For Codex with a capped managed policy, dispatch the reviewer variant matching the resolved cap (`oat-reviewer-low|medium|high|xhigh`) for deterministic quality gates.
|
|
1001
|
+
- 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.
|
|
1002
|
+
- For Claude Code with a capped managed policy, pass the resolved cap as the review `model`; managed `Uncapped` or inherit/default mode omits `model` because no reviewer target exists. Always keep `effort_axis=not-applicable`.
|
|
873
1003
|
- Tier 1: dispatch the selected reviewer target via provider-native subagent mechanism with Review Scope:
|
|
874
1004
|
|
|
875
1005
|
```
|
|
@@ -881,16 +1011,18 @@ After the implementer returns DONE (or DONE_WITH_CONCERNS without correctness co
|
|
|
881
1011
|
workflow_mode: {from state.md}
|
|
882
1012
|
artifact_paths: {same as Phase Scope}
|
|
883
1013
|
tasks_in_scope: {list of pNN-tNN IDs in the phase}
|
|
884
|
-
|
|
885
|
-
|
|
1014
|
+
dispatch_policy: {economy | balanced | high | frontier | uncapped | inherit host defaults | legacy capped}
|
|
1015
|
+
dispatch_ceiling: {resolved cap value | null}
|
|
1016
|
+
policy_source: {repo config | project state | preflight prompt}
|
|
1017
|
+
ceiling_source: {repo config | project state | preflight prompt} # compatibility alias for policy_source
|
|
886
1018
|
provider_default_effort: {value | unknown | not-applicable}
|
|
887
|
-
model_axis: inherited
|
|
888
|
-
effort_axis: selected
|
|
889
|
-
dispatch_rationale: reviewer
|
|
1019
|
+
model_axis: {inherited | selected:<Claude model>}
|
|
1020
|
+
effort_axis: {selected:<Codex value> | provider-default | not-applicable}
|
|
1021
|
+
dispatch_rationale: {capped reviewer target | uncapped/inherit reviewer fallback}
|
|
890
1022
|
```
|
|
891
1023
|
|
|
892
1024
|
- 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.
|
|
893
|
-
- For Codex Tier 1 review dispatches, use `agent_type: "oat-reviewer-low|medium|high|xhigh"`
|
|
1025
|
+
- For Codex Tier 1 review dispatches, use `agent_type: "oat-reviewer-low|medium|high|xhigh"` only when the resolver returns a pinned reviewer variant for a capped managed policy. Use base `oat-reviewer` for managed `Uncapped`, inherit/default mode, or provider-default fallback, and log `effort_axis=provider-default`. For Claude Code review dispatches, do not pass a per-review effort override because the effort axis is not applicable; pass `model` only when the resolver returns a selected review model.
|
|
894
1026
|
- Treat the commit range as authoritative for review scope. `files_changed` is optional orientation metadata only.
|
|
895
1027
|
- If a Codex 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 Tier 1 review dispatch as failed for this phase and perform the review inline instead of waiting indefinitely.
|
|
896
1028
|
|
|
@@ -911,7 +1043,7 @@ On reviewer verdict `fail`, run a bounded fix loop.
|
|
|
911
1043
|
|
|
912
1044
|
1. Read `oat_orchestration_retry_limit` from `state.md` frontmatter (default: `2`, range 0–5).
|
|
913
1045
|
2. For each retry (up to the limit):
|
|
914
|
-
a. Select/log fix dispatch axes from the fix scope, then perform the same pre-dispatch assertion used for implementation dispatch. A Codex fix dispatch with `effort_axis=selected:low|medium|high|xhigh` MUST use matching `agent_type: "oat-phase-implementer-low|medium|high|xhigh"`; a Claude Code fix dispatch with `model_axis=selected:<value>` MUST pass `model: "<value>"` on the Task call.
|
|
1046
|
+
a. Select/log fix dispatch axes from the fix scope, advance the route level by one after repeated review failure when the resolver reports an ordered target route, then perform the same pre-dispatch assertion used for implementation dispatch. A Codex fix dispatch with `effort_axis=selected:low|medium|high|xhigh` MUST use matching `agent_type: "oat-phase-implementer-low|medium|high|xhigh"`; a Claude Code fix dispatch with `model_axis=selected:<value>` MUST pass `model: "<value>"` on the Task call. Every fix dispatch 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 waiting on the implementer result.
|
|
915
1047
|
b. Dispatch the selected phase implementer role in `fix` mode (Tier 1) OR read the agent and apply fixes inline (Tier 2), with: - `review_artifact`: the path written by the reviewer - `findings`: the Critical + Important findings list - `prior_summary`: the last implementer summary
|
|
916
1048
|
c. Receive the fix summary.
|
|
917
1049
|
d. Re-dispatch the reviewer with the updated commit range.
|
|
@@ -1067,7 +1199,7 @@ Append a new entry to the `## Orchestration Runs` section between the `<!-- orch
|
|
|
1067
1199
|
|
|
1068
1200
|
#### Dispatch Notes
|
|
1069
1201
|
|
|
1070
|
-
- Dispatch: {
|
|
1202
|
+
- Dispatch stamps: {formal `Dispatch: ...` records, plus route level and escalation rationale when applicable}
|
|
1071
1203
|
|
|
1072
1204
|
#### Outstanding Items
|
|
1073
1205
|
|