@open-agent-toolkit/cli 0.1.43 → 0.1.46

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 (94) hide show
  1. package/assets/agents/oat-reviewer.md +2 -2
  2. package/assets/config/dispatch-matrix-recommendation.json +23 -0
  3. package/assets/docs/cli-utilities/config-and-local-state.md +7 -0
  4. package/assets/docs/cli-utilities/configuration.md +104 -25
  5. package/assets/docs/cli-utilities/workflow-gates.md +79 -16
  6. package/assets/docs/contributing/code.md +10 -4
  7. package/assets/docs/contributing/hooks-and-safety.md +23 -0
  8. package/assets/docs/provider-sync/config.md +5 -1
  9. package/assets/docs/provider-sync/manifest-and-drift.md +6 -1
  10. package/assets/docs/provider-sync/providers.md +6 -3
  11. package/assets/docs/provider-sync/scope-and-surface.md +2 -1
  12. package/assets/docs/reference/oat-directory-structure.md +2 -2
  13. package/assets/docs/workflows/projects/dispatch-ceiling.md +110 -27
  14. package/assets/docs/workflows/projects/implementation-execution.md +20 -13
  15. package/assets/public-package-versions.json +4 -4
  16. package/assets/skills/oat-project-implement/SKILL.md +155 -58
  17. package/assets/skills/oat-project-plan/SKILL.md +22 -3
  18. package/assets/skills/oat-project-quick-start/SKILL.md +54 -23
  19. package/assets/templates/state.md +5 -0
  20. package/dist/commands/config/index.d.ts +6 -0
  21. package/dist/commands/config/index.d.ts.map +1 -1
  22. package/dist/commands/config/index.js +429 -20
  23. package/dist/commands/doctor/index.d.ts +6 -1
  24. package/dist/commands/doctor/index.d.ts.map +1 -1
  25. package/dist/commands/doctor/index.js +209 -19
  26. package/dist/commands/gate/index.d.ts +39 -2
  27. package/dist/commands/gate/index.d.ts.map +1 -1
  28. package/dist/commands/gate/index.js +343 -30
  29. package/dist/commands/internal/cursor-current-target.d.ts +37 -0
  30. package/dist/commands/internal/cursor-current-target.d.ts.map +1 -0
  31. package/dist/commands/internal/cursor-current-target.js +228 -0
  32. package/dist/commands/internal/index.d.ts.map +1 -1
  33. package/dist/commands/internal/index.js +2 -0
  34. package/dist/commands/project/dispatch-ceiling/index.d.ts.map +1 -1
  35. package/dist/commands/project/dispatch-ceiling/index.js +487 -17
  36. package/dist/commands/providers/codex/index.d.ts +4 -0
  37. package/dist/commands/providers/codex/index.d.ts.map +1 -0
  38. package/dist/commands/providers/codex/index.js +7 -0
  39. package/dist/commands/providers/codex/materialize.d.ts +5 -0
  40. package/dist/commands/providers/codex/materialize.d.ts.map +1 -0
  41. package/dist/commands/providers/codex/materialize.js +152 -0
  42. package/dist/commands/providers/index.d.ts +2 -2
  43. package/dist/commands/providers/index.d.ts.map +1 -1
  44. package/dist/commands/providers/index.js +4 -2
  45. package/dist/commands/providers/providers.types.d.ts +23 -0
  46. package/dist/commands/providers/providers.types.d.ts.map +1 -1
  47. package/dist/commands/shared/codex-strays.d.ts.map +1 -1
  48. package/dist/commands/shared/codex-strays.js +11 -1
  49. package/dist/commands/status/index.d.ts +4 -1
  50. package/dist/commands/status/index.d.ts.map +1 -1
  51. package/dist/commands/status/index.js +1 -1
  52. package/dist/commands/sync/index.d.ts.map +1 -1
  53. package/dist/commands/sync/index.js +1 -1
  54. package/dist/commands/sync/sync.types.d.ts +4 -1
  55. package/dist/commands/sync/sync.types.d.ts.map +1 -1
  56. package/dist/config/dispatch-ceiling-preset.d.ts +4 -0
  57. package/dist/config/dispatch-ceiling-preset.d.ts.map +1 -1
  58. package/dist/config/dispatch-ceiling-preset.js +3 -0
  59. package/dist/config/dispatch-policy-options.d.ts +20 -0
  60. package/dist/config/dispatch-policy-options.d.ts.map +1 -0
  61. package/dist/config/dispatch-policy-options.js +96 -0
  62. package/dist/config/oat-config.d.ts +21 -5
  63. package/dist/config/oat-config.d.ts.map +1 -1
  64. package/dist/config/oat-config.js +118 -10
  65. package/dist/config/resolve.js +12 -0
  66. package/dist/manifest/manifest.types.d.ts +12 -12
  67. package/dist/providers/ceiling/registry.d.ts +7 -5
  68. package/dist/providers/ceiling/registry.d.ts.map +1 -1
  69. package/dist/providers/ceiling/registry.js +32 -5
  70. package/dist/providers/codex/codec/config-merge.d.ts +6 -0
  71. package/dist/providers/codex/codec/config-merge.d.ts.map +1 -1
  72. package/dist/providers/codex/codec/config-merge.js +7 -0
  73. package/dist/providers/codex/codec/materialize.d.ts +16 -0
  74. package/dist/providers/codex/codec/materialize.d.ts.map +1 -0
  75. package/dist/providers/codex/codec/materialize.js +57 -0
  76. package/dist/providers/codex/codec/shared.d.ts +1 -0
  77. package/dist/providers/codex/codec/shared.d.ts.map +1 -1
  78. package/dist/providers/codex/codec/shared.js +9 -1
  79. package/dist/providers/codex/codec/sync-extension.d.ts +7 -1
  80. package/dist/providers/codex/codec/sync-extension.d.ts.map +1 -1
  81. package/dist/providers/codex/codec/sync-extension.js +183 -46
  82. package/dist/providers/identity/availability.d.ts +45 -0
  83. package/dist/providers/identity/availability.d.ts.map +1 -0
  84. package/dist/providers/identity/availability.js +353 -0
  85. package/dist/providers/identity/family.d.ts +13 -0
  86. package/dist/providers/identity/family.d.ts.map +1 -0
  87. package/dist/providers/identity/family.js +32 -0
  88. package/dist/providers/identity/provenance.d.ts +21 -0
  89. package/dist/providers/identity/provenance.d.ts.map +1 -0
  90. package/dist/providers/identity/provenance.js +65 -0
  91. package/dist/providers/identity/stamp.d.ts +35 -0
  92. package/dist/providers/identity/stamp.d.ts.map +1 -0
  93. package/dist/providers/identity/stamp.js +171 -0
  94. package/package.json +2 -2
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: oat-project-implement
3
- version: 2.0.27
3
+ version: 2.0.31
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]'
@@ -209,7 +209,9 @@ Resolution order:
209
209
  "value": "high",
210
210
  "mode": "enforced",
211
211
  "mechanism": "pinned-variant",
212
- "dispatchArgs": { "variant": "oat-phase-implementer-high" },
212
+ "dispatchArgs": {
213
+ "variant": "oat-phase-implementer-gpt-5-6-terra-high"
214
+ },
213
215
  "verifyOnDispatch": false,
214
216
  "selection": {
215
217
  "role": "implementer",
@@ -236,50 +238,61 @@ point.
236
238
  Print before phase work:
237
239
 
238
240
  ```text
239
- Dispatch policy: balanced (codex, managed capped — pinned-variant)
241
+ OAT Dispatch Tier: balanced (codex, managed capped — pinned-variant)
240
242
  Resolved cap: high
241
243
  Source: project state
242
244
  Provider default effort: medium
243
- Note: OAT will use pinned subagent variants up to high. Base/unpinned roles resolve through the provider default only on fallback paths.
245
+ Note: OAT will use resolver-returned materialized Codex role names up to high. Base/unpinned roles resolve through the provider default only on fallback paths.
244
246
  ```
245
247
 
246
248
  If no policy resolves and the session is interactive, present the dispatch
247
249
  policy prompt once before starting work:
248
250
 
249
- ```text
250
- No dispatch policy is configured for this project.
251
+ Print the unresolved-policy heading, then generate the choice text from
252
+ canonical CLI metadata immediately before presenting it:
251
253
 
252
- Set the dispatch policy — how OAT should choose subagent model/effort controls.
254
+ ```bash
255
+ oat project dispatch-ceiling choices --format markdown
256
+ ```
253
257
 
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
258
+ Do not hand-type the dispatch policy menu or omit canonical choices. If the CLI
259
+ is unavailable in this environment, derive the same labels and descriptions from
260
+ `packages/cli/src/config/dispatch-policy-options.ts`; include every managed
261
+ policy returned by `VALID_MANAGED_DISPATCH_POLICIES` plus `Uncapped`, `Inherit
262
+ Host Defaults`, and `Leave Unresolved`.
259
263
 
260
- Managed uncapped:
261
- 5. Uncapped — OAT selects the preferred implementer/fix target without a stored maximum cap.
264
+ At minimum, preserve these semantics in any fallback text:
262
265
 
263
- Host defaults:
264
- 6. Inherit Host Defaults OAT does not select model/effort controls.
266
+ - `Uncapped`: OAT still manages dispatch selection, but stores no maximum cap.
267
+ It is not host/default behavior and must not be represented by absent policy
268
+ state.
269
+ - `Inherit Host Defaults`: OAT does not choose model or effort controls; the
270
+ executing host/provider owns implementation, fix, and review defaults.
271
+ - `Leave Unresolved`: planning/preflight deferral only. It records no runtime
272
+ policy and is not a runnable implementation setting. Implementation preflight
273
+ must block until a policy resolves.
265
274
 
266
275
  OAT applies managed policies where the provider exposes a reliable mechanism
267
276
  (Codex: pinned variants; Claude: Task model parameter). Other providers may
268
277
  treat managed policies as advisory.
269
- ```
270
278
 
271
- **Managed capped policy selection (options 1-4)** persists `mode: managed`,
279
+ **Managed capped policy selection** persists `mode: managed`,
272
280
  `policy`, and the compiled provider targets. On selection, print the exact
273
281
  compiled result (e.g., "Dispatch policy set: balanced -> Codex: high · Claude:
274
282
  sonnet") before proceeding.
275
283
 
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.
284
+ **Uncapped** persists explicit managed uncapped state. OAT still manages
285
+ dispatch selection. It does not write provider caps, and it must not be
286
+ represented by leaving dispatch policy state absent.
287
+
288
+ **Inherit Host Defaults** persists explicit inherit/default state. Use this only
289
+ when the user wants OAT to leave implementation, fix, and review model/effort
290
+ controls to the executing host/provider. OAT does not choose model or effort in
291
+ this mode.
279
292
 
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.
293
+ **Leave Unresolved** records no runtime policy for implementation. Stop before
294
+ phase work and report the unresolved state; Implementation preflight must block
295
+ until a policy resolves.
283
296
 
284
297
  Persist in project `state.md` frontmatter using the normalized shape:
285
298
 
@@ -341,6 +354,23 @@ Use these inputs:
341
354
  - host-exposed provider controls, by axis
342
355
  - prior outcomes for the phase, including review results and failed retries
343
356
 
357
+ Route selection is part of runtime dispatch selection when the resolver returns
358
+ an ordered matrix route:
359
+
360
+ - Start every implementation/fix scope at route level `0` unless the plan's
361
+ `## Dispatch Profile` names a different starting route level for that
362
+ phase/task. Level `0` is the route floor.
363
+ - Pass `--escalation-level <route-level>` on implementer/fix resolver calls.
364
+ Single-axis providers ignore this flag and keep their normal capped `min()`
365
+ behavior.
366
+ - Read `providers.<provider>.target` and `providers.<provider>.selection.target`
367
+ from resolver JSON when present. A target with `crossHarness: true` is an
368
+ explicit deferred cross-harness target: log it as advisory and do not invent a
369
+ same-harness fallback.
370
+ - On repeated review failure or retry-loop escalation, advance by one route
371
+ entry before retrying, up to the last available route entry and within
372
+ `oat_orchestration_retry_limit`.
373
+
344
374
  Axis states:
345
375
 
346
376
  - `selected:<value>` - host exposes the axis and the orchestrator chose a value.
@@ -360,12 +390,12 @@ Codex rules:
360
390
  3. For capped managed implementer/fix work, selected effort is `min(preferred, resolved_cap)`.
361
391
  4. For managed `Uncapped` implementer/fix work, selected effort is the preferred effort with no cap.
362
392
  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.
363
- 6. For implementer/fix dispatch: call `oat project dispatch-ceiling resolve --provider codex --role implementer --preferred <preferred-effort>`; read `providers.codex.selection.selectedValue` and `providers.codex.dispatchArgs.variant` for the selected role name (e.g., `oat-phase-implementer-medium`). Never pass a cap-only implementer variant when `selection.selectedValue` is lower.
364
- 7. For review dispatch: call `oat project dispatch-ceiling resolve --provider codex --role reviewer`; read `providers.codex.dispatchArgs.variant`.
393
+ 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`, `providers.codex.selection.target`, and any `providers.codex.target` for the selected materialized Codex role name or route target. Never pass a cap-only implementer variant when `selection.selectedValue` is lower.
394
+ 7. For review dispatch: call `oat project dispatch-ceiling resolve --provider codex --role reviewer`; read `providers.codex.dispatchArgs.variant` and `providers.codex.selection.target`.
365
395
  - Capped managed policy: reviewer targets the configured cap for deterministic quality gate behavior.
366
396
  - Managed `Uncapped`: no reviewer target exists; use base/unpinned reviewer fallback and log `selectionMode=no-review-target`, `selectedValue=null`, and `effort_axis=provider-default`.
367
397
  - Inherit/default: no reviewer target exists; use base/unpinned reviewer fallback and log `selectionMode=inherit-default`, `selectedValue=null`, and `effort_axis=provider-default`.
368
- 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.
398
+ 8. Codex payload-first assertion applies only when the resolver returns a materialized model+effort variant. 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. If the resolver returns no variant, use the base role and log provider-default. Always derive `model_axis` and `effort_axis` from resolver output, not from legacy role-name parsing.
369
399
  9. Do not use top-level per-call `reasoning_effort` as the standard OAT selected-effort path; dogfooding showed that path can be inconsistent.
370
400
 
371
401
  Claude rules:
@@ -378,7 +408,7 @@ Claude rules:
378
408
  - Review dispatch:
379
409
  - Capped managed policy: target the configured policy cap directly.
380
410
  - Managed `Uncapped` or inherit/default: no reviewer target exists; omit `model` and log inherited/default model behavior.
381
- - For implementer/fix dispatch, call `oat project dispatch-ceiling resolve --provider claude --role implementer --preferred <preferred-model> --orchestrator-tier <current-orchestrator-tier>`; for review dispatch, call the same resolver with `--role reviewer` and no `--preferred`. Read `providers.claude.selection.selectedValue` and `providers.claude.dispatchArgs.model` for the selected model string to pass. Pass `--orchestrator-tier` so the resolver can flag above-orchestrator upgrade requests and set `verifyOnDispatch` correctly.
411
+ - 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.
382
412
  - Pass `model: "<value>"` when `model_axis=selected:<value>` on the Task tool call.
383
413
  - Keep `effort_axis=not-applicable`; Claude Code has no separate per-dispatch effort axis.
384
414
 
@@ -387,22 +417,59 @@ Payload-first invariant:
387
417
  - Build the actual host dispatch argument map before logging.
388
418
  - Do not emit `selected:<value>` unless the host invocation contains the corresponding role/model selection.
389
419
  - Derive `Dispatch target` and `Effort axis` / `Model axis` from the payload.
420
+ - After the payload is built, append a formal dispatch stamp to Dispatch Notes
421
+ for every implementation, fix, and review dispatch. Use the p01 grammar
422
+ exactly:
423
+ `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>`.
424
+ Derive `producer` and `provenance` from the resolver payload and actual host
425
+ arguments. Only concrete model arguments, including same-harness route model
426
+ args for model-arg providers, declare producer identity. Codex materialized
427
+ model+effort variants declare `model_axis=selected:<model>` and
428
+ `effort_axis=selected:<effort>` from resolver output, but keep
429
+ `producer=unknown provenance=unknown` unless an observed/inferred model
430
+ identity is available. Base/unpinned or deferred cross-harness paths are also
431
+ `producer=unknown provenance=unknown` unless an observed/inferred identity is
432
+ available. Do not write prose-only or legacy comma-separated stamp forms.
433
+
434
+ Human-facing dispatch display rules:
435
+
436
+ - Lead with route, OAT dispatch tier, requested controls, configured defaults, and runtime confirmation. These are the fields humans use to understand what OAT asked for and what the host appears to be running.
437
+ - Do not headline `producer=unknown` or `provenance=unknown`. Those values are
438
+ audit fields for the formal stamp, not the primary status. Put unknown
439
+ producer/provenance only in `Dispatch stamp:` or in a low-priority note after
440
+ the route and runtime confirmation.
441
+ - Separate requested controls from configured defaults. For example, a Codex
442
+ materialized role may request `model_axis=selected:<model>` and
443
+ `effort_axis=selected:<effort>` while the provider default effort remains a
444
+ separate fallback/default fact.
445
+ - Separate configured policy/cap from runtime confirmation. A resolver payload
446
+ can declare a target before the host has confirmed it; an observed mismatch
447
+ must be called out as `Runtime confirmation: mismatch:<detail>` and handled as
448
+ an orchestration deviation.
449
+ - Keep the `Dispatch stamp: Dispatch: ...` line parseable and grammar-stable.
450
+ Do not move display-only prose into the formal stamp.
390
451
 
391
452
  Structured dispatch log:
392
453
 
393
454
  ```text
394
455
  OAT Dispatch: Phase {phase_id} {implementation | fix | review}
395
456
  Host: {Claude Code | Codex | Cursor | other host}
457
+ Route: {route label or target path | none}; level={0 | 1 | ... | none}
458
+ Requested controls: {model=<value|none>, effort=<value|none>, target=<value|unknown>}
459
+ Configured defaults: {provider default effort/model | unknown | not-applicable}
460
+ Runtime confirmation: {observed:<slug> | declared:<slug> | not-observable | mismatch:<detail>}
396
461
  Preferred effort: {low | medium | high | xhigh | provider-default | not-applicable}
397
- Dispatch policy: {economy | balanced | high | frontier | uncapped | inherit host defaults | legacy capped}
462
+ OAT Dispatch Tier: {economy | balanced | high | frontier | uncapped | inherit host defaults | legacy capped}
398
463
  Resolved cap: {resolved cap value | none}
399
464
  Selected effort: {low | medium | high | xhigh | provider-default | not-applicable}
400
465
  Policy source: {repo config | project state | preflight prompt}
401
466
  Provider default effort: {value | unknown | not-applicable}
402
467
  Selection mode: {capped | uncapped | review-target | no-review-target | inherit-default}
468
+ Route level: {0 | 1 | ... | none}
403
469
  Model axis: { selected:<value> | inherited | not-applicable | host-auto }
404
470
  Effort axis: { selected:<value> | provider-default | inherited | not-applicable | host-auto }
405
471
  Dispatch target: {host-specific subagent/role/tool target}
472
+ 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>
406
473
  Rationale: {short rationale grounded in phase scope and any policy cap/uncapped/default behavior}
407
474
  ```
408
475
 
@@ -411,16 +478,20 @@ Codex capped example:
411
478
  ```text
412
479
  OAT Dispatch: Phase p02 implementation
413
480
  Host: Codex
481
+ Route: codex/implementer/gpt-5.6-sol/medium; level=0
482
+ Requested controls: model=gpt-5.6-sol, effort=medium, target=oat-phase-implementer-gpt-5-6-sol-medium
483
+ Configured defaults: provider default effort=high
484
+ Runtime confirmation: declared:gpt-5.6-sol/medium
414
485
  Preferred effort: high
415
- Dispatch policy: economy
486
+ OAT Dispatch Tier: economy
416
487
  Resolved cap: medium
417
488
  Selected effort: medium
418
489
  Policy source: repo config
419
490
  Provider default effort: high
420
491
  Selection mode: capped
421
- Model axis: inherited
492
+ Model axis: selected:gpt-5.6-sol
422
493
  Effort axis: selected:medium
423
- Dispatch target: oat-phase-implementer-medium
494
+ Dispatch target: oat-phase-implementer-gpt-5-6-sol-medium
424
495
  Rationale: normal multi-file implementation; high preferred due to integration risk, capped by configured policy.
425
496
  ```
426
497
 
@@ -429,16 +500,20 @@ Codex uncapped implementer example:
429
500
  ```text
430
501
  OAT Dispatch: Phase p02 implementation
431
502
  Host: Codex
503
+ Route: codex/implementer/gpt-5.6-terra/xhigh; level=0
504
+ Requested controls: model=gpt-5.6-terra, effort=xhigh, target=oat-phase-implementer-gpt-5-6-terra-xhigh
505
+ Configured defaults: provider default effort=medium
506
+ Runtime confirmation: declared:gpt-5.6-terra/xhigh
432
507
  Preferred effort: xhigh
433
- Dispatch policy: uncapped
508
+ OAT Dispatch Tier: uncapped
434
509
  Resolved cap: none
435
510
  Selected effort: xhigh
436
511
  Policy source: project state
437
512
  Provider default effort: medium
438
513
  Selection mode: uncapped
439
- Model axis: inherited
514
+ Model axis: selected:gpt-5.6-terra
440
515
  Effort axis: selected:xhigh
441
- Dispatch target: oat-phase-implementer-xhigh
516
+ Dispatch target: oat-phase-implementer-gpt-5-6-terra-xhigh
442
517
  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.
443
518
  ```
444
519
 
@@ -447,16 +522,20 @@ Codex capped reviewer example:
447
522
  ```text
448
523
  OAT Dispatch: Phase p02 review
449
524
  Host: Codex
525
+ Route: codex/reviewer/gpt-5.6-terra/xhigh; level=0
526
+ Requested controls: model=gpt-5.6-terra, effort=xhigh, target=oat-reviewer-gpt-5-6-terra-xhigh
527
+ Configured defaults: provider default effort=medium
528
+ Runtime confirmation: declared:gpt-5.6-terra/xhigh
450
529
  Preferred effort: high
451
- Dispatch policy: high
530
+ OAT Dispatch Tier: high
452
531
  Resolved cap: xhigh
453
532
  Selected effort: xhigh
454
533
  Policy source: project state
455
534
  Provider default effort: medium
456
535
  Selection mode: review-target
457
- Model axis: inherited
536
+ Model axis: selected:gpt-5.6-terra
458
537
  Effort axis: selected:xhigh
459
- Dispatch target: oat-reviewer-xhigh
538
+ Dispatch target: oat-reviewer-gpt-5-6-terra-xhigh
460
539
  Rationale: reviewer runs at the configured policy cap for deterministic quality gate behavior.
461
540
  ```
462
541
 
@@ -465,8 +544,12 @@ Codex inherit/default fallback example:
465
544
  ```text
466
545
  OAT Dispatch: Phase p02 review
467
546
  Host: Codex
547
+ Route: none; level=none
548
+ Requested controls: model=none, effort=provider-default, target=oat-reviewer
549
+ Configured defaults: provider default effort=medium
550
+ Runtime confirmation: not-observable
468
551
  Preferred effort: provider-default
469
- Dispatch policy: inherit host defaults
552
+ OAT Dispatch Tier: inherit host defaults
470
553
  Resolved cap: none
471
554
  Selected effort: provider-default
472
555
  Policy source: project state
@@ -490,8 +573,12 @@ Codex generic explorer example:
490
573
  ```text
491
574
  OAT Dispatch: p02-t10 sidecar exploration
492
575
  Host: Codex
576
+ Route: sidecar/explorer; level=none
577
+ Requested controls: model=none, effort=provider-default, target=explorer
578
+ Configured defaults: provider default effort=xhigh
579
+ Runtime confirmation: not-observable
493
580
  Preferred effort: provider-default
494
- Dispatch policy: high
581
+ OAT Dispatch Tier: high
495
582
  Resolved cap: xhigh
496
583
  Selected effort: provider-default
497
584
  Policy source: project state
@@ -518,6 +605,11 @@ dispatch_policy:
518
605
  ceiling_source: { repo config | project state | preflight prompt }
519
606
  policy_source: { repo config | project state | preflight prompt }
520
607
  provider_default_effort: { value | unknown | not-applicable }
608
+ dispatch_route_level:
609
+ { integer route level; omit when no ordered route is in play }
610
+ dispatch_target:
611
+ { resolver target or host-specific dispatch target; omit if unknown }
612
+ dispatch_stamp: { exact `Dispatch: ...` line written to Dispatch Notes }
521
613
  dispatch_rationale: { short rationale }
522
614
  ```
523
615
 
@@ -536,9 +628,9 @@ Dispatch policy: {policy}; selected={selected value | none}; cap={value | none}
536
628
  **Log examples (matching resolver output):**
537
629
 
538
630
  ```text
539
- Dispatch policy: balanced; selected=high; cap=high (codex, enforced — variant oat-phase-implementer-high)
540
- Dispatch policy: high; selected=xhigh; cap=xhigh (codex, enforced — variant oat-reviewer-xhigh)
541
- Dispatch policy: uncapped; selected=xhigh; cap=none (codex, enforced — variant oat-phase-implementer-xhigh)
631
+ Dispatch policy: balanced; selected=high; cap=high (codex, enforced — variant oat-phase-implementer-gpt-5-6-sol-high)
632
+ Dispatch policy: high; selected=xhigh; cap=xhigh (codex, enforced — variant oat-reviewer-gpt-5-6-terra-xhigh)
633
+ Dispatch policy: uncapped; selected=xhigh; cap=none (codex, enforced — variant oat-phase-implementer-gpt-5-6-terra-xhigh)
542
634
  Dispatch policy: inherit host defaults; selected=none; cap=none (codex, advisory — base role follows provider default)
543
635
  Dispatch policy: balanced; selected=sonnet; cap=sonnet (claude, enforced — Task model arg)
544
636
  Dispatch policy: frontier; selected=fable; cap=fable (claude, enforced — Task model arg)
@@ -886,21 +978,24 @@ For each phase `pNN` in the plan (or each phase in the current parallel group),
886
978
  policy_source: {repo config | project state | preflight prompt; omit if unknown}
887
979
  ceiling_source: {repo config | project state | preflight prompt; omit if unknown; compatibility alias for policy_source}
888
980
  provider_default_effort: {value | unknown | not-applicable; omit if unknown}
981
+ dispatch_route_level: {integer route level; omit when no ordered route is in play}
982
+ dispatch_target: {resolver target or host-specific dispatch target; omit if unknown}
983
+ dispatch_stamp: {exact `Dispatch: ...` line written to Dispatch Notes; omit if not yet written}
889
984
  dispatch_rationale: {short rationale; omit if unknown}
890
985
  ```
891
986
 
892
987
  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.
893
988
  - Codex implementer/fix dispatch:
894
- - 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>`.
895
- - 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.
896
- - Example selected low payload shape: `agent_type: "oat-phase-implementer-low"` and a Phase Scope message containing `effort_axis: selected:low`.
989
+ - 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>`.
990
+ - Build the `spawn_agent` argument map from `providers.codex.selection.selectedValue`, `providers.codex.dispatchArgs.variant`, and `providers.codex.selection.target` 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:<value>`, the argument map MUST use the materialized Codex role name returned in `providers.codex.dispatchArgs.variant` as `agent_type`; do not re-derive an effort-only role name from the selected effort. Then derive the `OAT Dispatch:` block `Model axis:` and `Effort axis:` fields from resolver output and that same argument map.
991
+ - Example selected payload shape: `agent_type: "oat-phase-implementer-gpt-5-6-sol-low"` and a Phase Scope message containing `model_axis: selected:gpt-5.6-sol` and `effort_axis: selected:low`.
897
992
  - 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.
898
- - 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.
993
+ - If the resolver returns no `dispatchArgs.variant`, use base `agent_type: "oat-phase-implementer"` only for provider-default/base fallback and omit `reasoning_effort`. The dispatch rationale MUST say this is a base/unpinned fallback and include provider default effort when known. Use base `oat-phase-implementer` only when the resolver returns no `dispatchArgs.variant`.
899
994
  - Claude Code implementer/fix dispatch:
900
995
  - If `model_axis=selected:<value>`, the Task tool call MUST include `model: "<value>"`.
901
996
  - If `model_axis=inherited`, omit `model`.
902
997
 
903
- 3. Dispatch the selected implementer role (Tier 1 via provider-native subagent mechanism) — the role asserted in the pre-dispatch step above (e.g., `oat-phase-implementer-low`, `oat-phase-implementer-medium`, `oat-phase-implementer-high`, `oat-phase-implementer-xhigh`, or base `oat-phase-implementer` only for provider-default fallback) — with the Phase Scope block as input and with the asserted host invocation parameters.
998
+ 3. Dispatch the selected implementer role (Tier 1 via provider-native subagent mechanism) — the resolver-returned materialized Codex role name in `providers.codex.dispatchArgs.variant`, or base `oat-phase-implementer` only when no variant is returned for provider-default fallback — with the Phase Scope block as input and with the asserted host invocation parameters.
904
999
 
905
1000
  4. Receive the structured summary (DONE | DONE_WITH_CONCERNS | NEEDS_CONTEXT | BLOCKED).
906
1001
 
@@ -935,13 +1030,15 @@ Escalate the runtime dispatch control when there is evidence that the current co
935
1030
  When escalation is needed:
936
1031
 
937
1032
  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:
1033
+ - **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.
938
1034
  - **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.
939
1035
  - **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.
940
1036
  2. Count the escalation redispatch against the existing bounded retry budget. Escalation changes the control; it does not create extra retry attempts.
941
- 3. Record a compact note in `implementation.md` when practical:
942
- - `Dispatch: p03 escalated to model_axis=selected:opus, effort_axis=not-applicable after repeated review failures.` (Claude Code)
943
- - `Dispatch: p03 escalated to effort_axis=selected:high, model_axis=inherited after repeated review failures.` (Codex)
944
- - `Dispatch: p02 remained model_axis=host-auto, effort_axis=host-auto; no explicit stronger control is exposed by this host.`
1037
+ 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:
1038
+ - `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`
1039
+ - `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`
1040
+ - `Dispatch: scope=p03 action=implementation role=implementer producer=unknown provenance=unknown model_axis=selected:gpt-5.6-sol effort_axis=selected:high dispatch_policy=high dispatch_ceiling=high target=oat-phase-implementer-gpt-5-6-sol-high`
1041
+ - `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`
945
1042
  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.
946
1043
 
947
1044
  #### Dispatch Retry (Transient Failures)
@@ -955,7 +1052,7 @@ After the implementer returns DONE (or DONE_WITH_CONCERNS without correctness co
955
1052
  **Dispatch:**
956
1053
 
957
1054
  - Use the same tier that was selected at start.
958
- - 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.
1055
+ - For Codex with a capped managed policy, dispatch the materialized reviewer role returned in `providers.codex.dispatchArgs.variant` for deterministic quality gates.
959
1056
  - 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.
960
1057
  - 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`.
961
1058
  - Tier 1: dispatch the selected reviewer target via provider-native subagent mechanism with Review Scope:
@@ -974,13 +1071,13 @@ After the implementer returns DONE (or DONE_WITH_CONCERNS without correctness co
974
1071
  policy_source: {repo config | project state | preflight prompt}
975
1072
  ceiling_source: {repo config | project state | preflight prompt} # compatibility alias for policy_source
976
1073
  provider_default_effort: {value | unknown | not-applicable}
977
- model_axis: {inherited | selected:<Claude model>}
1074
+ model_axis: { selected:<value> | inherited | not-applicable | host-auto }
978
1075
  effort_axis: {selected:<Codex value> | provider-default | not-applicable}
979
1076
  dispatch_rationale: {capped reviewer target | uncapped/inherit reviewer fallback}
980
1077
  ```
981
1078
 
982
1079
  - 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.
983
- - 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.
1080
+ - 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 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.
984
1081
  - Treat the commit range as authoritative for review scope. `files_changed` is optional orientation metadata only.
985
1082
  - 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.
986
1083
 
@@ -1001,7 +1098,7 @@ On reviewer verdict `fail`, run a bounded fix loop.
1001
1098
 
1002
1099
  1. Read `oat_orchestration_retry_limit` from `state.md` frontmatter (default: `2`, range 0–5).
1003
1100
  2. For each retry (up to the limit):
1004
- 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.
1101
+ 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:<value>` MUST use the materialized Codex role name returned in `providers.codex.dispatchArgs.variant`; 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.
1005
1102
  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
1006
1103
  c. Receive the fix summary.
1007
1104
  d. Re-dispatch the reviewer with the updated commit range.
@@ -1157,7 +1254,7 @@ Append a new entry to the `## Orchestration Runs` section between the `<!-- orch
1157
1254
 
1158
1255
  #### Dispatch Notes
1159
1256
 
1160
- - Dispatch: {phase dispatch control and rationale, including escalation notes when applicable}
1257
+ - Dispatch stamps: {formal `Dispatch: ...` records, plus route level and escalation rationale when applicable}
1161
1258
 
1162
1259
  #### Outstanding Items
1163
1260
 
@@ -1229,7 +1326,7 @@ Before pausing at a checkpoint, check if auto-review is enabled:
1229
1326
  1. Read `oat_auto_review_at_hill_checkpoints` from plan.md frontmatter. If not present, fall back to legacy `oat_auto_review_at_checkpoints`. If neither is present, fall back to `oat config get workflow.autoReviewAtHillCheckpoints` (which itself falls back to legacy `.oat/config.json` `autoReviewAtCheckpoints` when unset).
1230
1327
 
1231
1328
  2. If enabled and this is a checkpoint phase:
1232
- a. **Determine review scope:** Find the highest completed implementation phase already covered by a **`passed`** code-review row in plan.md Reviews table. Count only whole-phase scopes: `pNN` or `pNN-pMM`. Ignore task scopes (`pNN-tNN`) and rows with `fixes_added` or `fixes_completed` because those reviews did not pass and must be re-covered. Scope = every implementation phase after that passed coverage through the current phase, inclusive. If no earlier passed whole-phase review exists, start from the first implementation phase. Use `pNN-pMM` when the scope spans multiple phases. If this is the final implementation phase checkpoint, use scope `final`.
1329
+ a. **Determine review scope:** Find the highest completed implementation phase already covered by a **`passed`** code-review row in plan.md Reviews table. Count only whole-phase scopes: `pNN` or `pNN-pMM`. Ignore task scopes (`pNN-tNN`) and rows with `fixes_added` or `fixes_completed` because those reviews did not pass and must be re-covered. Scope = every implementation phase after that passed coverage through the current phase, inclusive. If no earlier passed whole-phase review exists, start from the first implementation phase. Use `pNN-pMM` when the scope spans multiple phases. If this is the final implementation phase checkpoint, run `oat-project-review-provide code final`; use scope `final` and do not run a duplicate final phase-only lifecycle review, because Tier 1 already runs the standard per-phase reviewer before the final checkpoint branch.
1233
1330
  - Example: prior passed row `p01`, current checkpoint `p03` → review `p02-p03`
1234
1331
  - Example: no prior passed whole-phase review, current checkpoint `p03` → review `p01-p03`
1235
1332
  - Example: current checkpoint is the last implementation phase → review `final`
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: oat-project-plan
3
- version: 1.3.9
3
+ version: 1.3.10
4
4
  description: Use when design.md is complete and executable implementation tasks are needed. Breaks design into bite-sized TDD tasks in canonical plan.md format.
5
5
  oat_gateable: true
6
6
  disable-model-invocation: true
@@ -321,7 +321,7 @@ Before marking the plan ready for implementation, resolve the dispatch policy.
321
321
  Resolution order:
322
322
 
323
323
  1. Config keys `workflow.dispatchPolicy.mode` / `workflow.dispatchPolicy.policy` via the resolver CLI
324
- 2. Compatibility config keys `workflow.dispatchCeiling.providers.<provider>`
324
+ 2. Layered dispatch matrix / compatibility config under `workflow.dispatchCeiling.providers.<provider>` and `workflow.dispatchCeiling.providers.<provider>.<tier>`
325
325
  3. Project `state.md` frontmatter key `oat_dispatch_policy`
326
326
  4. Legacy project `state.md` frontmatter key `oat_dispatch_ceiling`
327
327
  5. Interactive planning prompt (below)
@@ -347,7 +347,14 @@ Set the dispatch policy — how OAT should choose subagent model/effort controls
347
347
 
348
348
  OAT applies managed policies where the provider exposes a reliable mechanism
349
349
  (Codex: pinned variants; Claude: Task model parameter). Other providers may
350
- treat managed policies as advisory.
350
+ treat managed policies as advisory until their provider column has a resolvable
351
+ matrix cell.
352
+
353
+ For multi-family providers such as Cursor, these options choose the abstract
354
+ policy rung; concrete model values live in the dispatch matrix under
355
+ `workflow.dispatchCeiling.providers.*`. If the user wants OAT's recommended
356
+ starting matrix, offer `oat config adopt dispatch-matrix` for the chosen config
357
+ layer before finalizing the plan.
351
358
  ```
352
359
 
353
360
  **Managed capped policy selection (options 1-4)** persists `mode: managed`,
@@ -355,6 +362,18 @@ treat managed policies as advisory.
355
362
  compiled result (e.g., "Dispatch policy set: balanced → Codex: high · Claude:
356
363
  sonnet") before proceeding.
357
364
 
365
+ If the resolver reports that the selected policy has a missing matrix cell for
366
+ the active provider/tier, run prompt-and-persist once before final review:
367
+
368
+ 1. Ask for the exact provider value for the missing cell, using the provider's
369
+ native vocabulary (for example, `composer-2.5`, `gpt-5.5-xhigh`, `opus`, or
370
+ `xhigh`), or an ordered route when escalation needs multiple targets.
371
+ 2. Persist the answer to the selected config layer with
372
+ `workflow.dispatchCeiling.providers.<provider>.<tier>`. Use project
373
+ `state.md` only for sparse project-specific matrix overrides.
374
+ 3. Re-run the resolver. Do not silently treat a missing cell as uncapped,
375
+ inherited, or provider-default behavior.
376
+
358
377
  **Uncapped (option 5)** persists explicit managed uncapped state. It does not
359
378
  write provider caps, and it must not be represented by leaving dispatch policy
360
379
  state absent.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: oat-project-quick-start
3
- version: 2.1.9
3
+ version: 2.1.11
4
4
  description: Use when a task is small enough for quick mode or rapid iteration is preferred. Scaffolds a lightweight OAT project from discovery directly to a runnable plan, with optional brainstorming and lightweight design.
5
5
  argument-hint: '<project-name> ["project description"]'
6
6
  oat_gateable: true
@@ -475,7 +475,7 @@ dispatch policy.
475
475
  Resolution order:
476
476
 
477
477
  1. Config keys `workflow.dispatchPolicy.mode` / `workflow.dispatchPolicy.policy` via the resolver CLI
478
- 2. Compatibility config keys `workflow.dispatchCeiling.providers.<provider>`
478
+ 2. Layered dispatch matrix / compatibility config under `workflow.dispatchCeiling.providers.<provider>` and `workflow.dispatchCeiling.providers.<provider>.<tier>`
479
479
  3. Project `state.md` frontmatter key `oat_dispatch_policy`
480
480
  4. Legacy project `state.md` frontmatter key `oat_dispatch_ceiling`
481
481
  5. Interactive quick-planning prompt (below)
@@ -484,38 +484,69 @@ Resolution order:
484
484
  If no policy resolves and the session is interactive, present the dispatch
485
485
  policy prompt once before finalizing `plan.md`:
486
486
 
487
- ```text
488
- Set the dispatch policy — how OAT should choose subagent model/effort controls.
487
+ Generate the choice text from canonical CLI metadata immediately before
488
+ presenting it:
489
489
 
490
- Managed capped policies:
491
- 1. Economy — Codex: medium · Claude: sonnet
492
- 2. Balanced — Codex: high · Claude: sonnet (recommended)
493
- 3. High — Codex: xhigh · Claude: opus
494
- 4. Frontier — Codex: xhigh · Claude: fable
490
+ ```bash
491
+ oat project dispatch-ceiling choices --format markdown
492
+ ```
493
+
494
+ Do not hand-type the dispatch policy menu or omit canonical choices. If the CLI
495
+ is unavailable in this environment, derive the same labels and descriptions from
496
+ `packages/cli/src/config/dispatch-policy-options.ts`; include every managed
497
+ policy returned by `VALID_MANAGED_DISPATCH_POLICIES` plus `Uncapped`, `Inherit
498
+ Host Defaults`, and `Leave Unresolved`.
495
499
 
496
- Managed uncapped:
497
- 5. Uncapped — OAT selects the preferred implementer/fix target without a stored maximum cap.
500
+ At minimum, preserve these semantics in any fallback text:
498
501
 
499
- Host defaults:
500
- 6. Inherit Host Defaults OAT does not select model/effort controls.
502
+ - `Uncapped`: OAT still manages dispatch selection, but stores no maximum cap.
503
+ It is not host/default behavior and must not be represented by absent policy
504
+ state.
505
+ - `Inherit Host Defaults`: OAT does not choose model or effort controls; the
506
+ executing host/provider owns implementation, fix, and review defaults.
507
+ - `Leave Unresolved`: planning/preflight deferral only. It records no runtime
508
+ policy. Implementation preflight must block until a policy resolves.
501
509
 
502
510
  OAT applies managed policies where the provider exposes a reliable mechanism
503
511
  (Codex: pinned variants; Claude: Task model parameter). Other providers may
504
- treat managed policies as advisory.
505
- ```
512
+ treat managed policies as advisory until their provider column has a resolvable
513
+ matrix cell.
514
+
515
+ For multi-family providers such as Cursor, these options choose the abstract
516
+ policy rung; concrete model values live in the dispatch matrix under
517
+ `workflow.dispatchCeiling.providers.*`. If the user wants OAT's recommended
518
+ starting matrix, offer `oat config adopt dispatch-matrix` for the chosen config
519
+ layer before finalizing `plan.md`.
506
520
 
507
- **Managed capped policy selection (options 1-4)** persists `mode: managed`,
521
+ **Managed capped policy selection** persists `mode: managed`,
508
522
  `policy`, and the compiled provider targets. On selection, print the exact
509
523
  compiled result (e.g., "Dispatch policy set: balanced → Codex: high · Claude:
510
524
  sonnet") before proceeding.
511
525
 
512
- **Uncapped (option 5)** persists explicit managed uncapped state. It does not
513
- write provider caps, and it must not be represented by leaving dispatch policy
514
- state absent.
515
-
516
- **Inherit Host Defaults (option 6)** persists explicit inherit/default state.
517
- Use this only when the user wants OAT to leave implementation, fix, and review
518
- model/effort controls to the executing host/provider.
526
+ If the resolver reports that the selected policy has a missing matrix cell for
527
+ the active provider/tier, run prompt-and-persist once before final review:
528
+
529
+ 1. Ask for the exact provider value for the missing cell, using the provider's
530
+ native vocabulary (for example, `composer-2.5`, `gpt-5.5-xhigh`, `opus`, or
531
+ `xhigh`), or an ordered route when escalation needs multiple targets.
532
+ 2. Persist the answer to the selected config layer with
533
+ `workflow.dispatchCeiling.providers.<provider>.<tier>`. Use project
534
+ `state.md` only for sparse project-specific matrix overrides.
535
+ 3. Re-run the resolver. Do not silently treat a missing cell as uncapped,
536
+ inherited, or provider-default behavior.
537
+
538
+ **Uncapped** persists explicit managed uncapped state. OAT still manages
539
+ dispatch selection. It does not write provider caps, and it must not be
540
+ represented by leaving dispatch policy state absent.
541
+
542
+ **Inherit Host Defaults** persists explicit inherit/default state. Use this only
543
+ when the user wants OAT to leave implementation, fix, and review model/effort
544
+ controls to the executing host/provider. OAT does not choose model or effort in
545
+ this mode.
546
+
547
+ **Leave Unresolved** leaves dispatch policy unset for implementation preflight.
548
+ Use this only when non-interactive planning cannot choose a policy yet.
549
+ Implementation preflight must block until a policy resolves.
519
550
 
520
551
  Persist the answer in `"$PROJECT_PATH/state.md"` frontmatter using the
521
552
  normalized shape:
@@ -20,6 +20,11 @@ oat_phase_status: in_progress # Status: in_progress | complete | pr_open
20
20
  # providers: # present for capped managed policies; omitted for uncapped/inherit
21
21
  # codex: high # low|medium|high|xhigh
22
22
  # claude: sonnet # haiku|sonnet|opus|fable
23
+ # matrix: # optional sparse project override; full dispatch matrix lives in layered config
24
+ # cursor:
25
+ # high:
26
+ # - composer-2.5
27
+ # - { harness: cursor, model: gpt-5.5-xhigh }
23
28
  # source: project-state
24
29
  # oat_dispatch_ceiling: # legacy compatibility alias for capped managed provider targets
25
30
  oat_workflow_mode: { OAT_WORKFLOW_MODE } # spec-driven | quick | import